2010-04-28 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2010-04-28  Zoltan Varga  <vargaz@gmail.com>
2
3         * aot-compiler.c (emit_got_info): Double the buffer size to avoid an assert.
4
5 2010-04-27  Zoltan Varga  <vargaz@gmail.com>
6
7         * dwarfwriter.c (emit_line_number_info): Get rid of the usage of GArray, so
8         line number support works with eglib.
9
10 2010-04-27  Miguel de Icaza  <miguel@novell.com>
11
12         * driver.c, mini.c: Since linking with LLVM makes the default Mono
13         dirty an extra 70kb pages on startup we are now going to choose a
14         different strategy: ship mono and mono-llvm binaries, with the
15         second being the one that links with LLVM and defaults to LLVM
16         being enabled.
17
18 2010-04-27  Zoltan Varga  <vargaz@gmail.com>
19
20         * tramp-x86.c exceptions-x86.c mini-x86.c aot-compiler.c aot-runtime.c: 
21         Implement full-aot support on x86.
22
23         * method-to-ir.c: Always use a got var on x86 too, just like on ppc, because the
24         trampolines depend on it. Use MONO_ARCH_GOT_REG as the got register, instead of
25         the first register returned by get_global_int_regs ().
26
27         * cpu-x86.md: Fix the length of insertx_u1_slow.
28
29         * iltests.il.in: Disable tail call tests when running with full-aot.
30
31 2010-04-26  Zoltan Varga  <vargaz@gmail.com>
32
33         * method-to-ir.c (mono_op_to_op_imm_noemul): Fix a warning.
34
35 2010-04-24  Mark Probst  <mark.probst@gmail.com>
36
37         * mini.c, driver.c: Initialize mono_use_llvm in mono_main(), not
38         in the initializer, because it's non-constant.
39
40 2010-04-23  Miguel de Icaza  <miguel@novell.com>
41
42         * mini.c: Use MONO_USE_LLVM as an environment flag to turn the use
43         of LLVM on by default.   Used for buildbots and other setups.
44
45 2010-04-24  Zoltan Varga  <vargaz@gmail.com>
46
47         * mini.c: Set mono_use_llvm to FALSE even if mono is compiled with LLVM.
48
49 2010-04-23  Kornel Pal  <kornelpal@gmail.com>
50
51         * method-to-ir.c (mono_method_to_ir): Enable inlining of pointer-sized unmanaged
52         initonly static fields when using moving GC.
53
54         Contributed under MIT/X11 license.
55
56 2010-04-23  Geoff Norton  <gnorton@novell.com>
57
58         * mini-amd64.h: Darwin x86_64 support.
59
60 2010-04-20  Jonathan Pryor  <jpryor@novell.com>
61
62         * exceptions-arm.c: Remove platform checks in favor of configure checks.
63
64 2010-04-19  Jonathan Pryor  <jpryor@novell.com>
65
66         * exceptions-arm.c: Add Android support for sigcontext structure.
67
68 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
69
70         * mini.c (mono_jit_compile_method_inner): Implement the check for native func
71         wrappers correctly now that their wrapper info is NULL.
72
73 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
74
75         * mini.c (mono_jit_compile_method_inner): Avoid calling
76         mono_marshal_method_from_wrapper () for native func wrappers. Fixes #597189.
77
78 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
79
80         * genmdesc.c (inst_name): Define this as a copy of mono_inst_name in helpers.c,
81         so the latter can be #ifndef DISABLE_JIT-ed.
82
83         * helpers.c: Comment out the opstr array if DISABLE_JIT is set.
84
85 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
86
87         * method-to-ir.c driver.c: Disable a few more things when DISABLE_JIT is set.
88
89 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
90
91         * mini-llvm.c (emit_entry_bb): Fix support for simd arguments passed on the
92         stack.
93
94 2010-04-15  Zoltan Varga  <vargaz@gmail.com>
95
96         * debugger-agent.c (type_commands): Call mono_class_setup_methods () before
97         calling mono_class_num_methods (). Fixes #592244.
98
99 2010-04-14  Zoltan Varga  <vargaz@gmail.com>
100
101         * mini-x86.c (mono_arch_get_llvm_call_info): Handle empty structures correctly.
102
103         * mini-llvm.c: Disable LLVM for calls with non-default calling conventions.
104
105 2010-04-14  Zoltan Varga  <vargaz@gmail.com>
106
107         * method-to-ir.c (handle_box_inst): Merge into handle_box, simplify the merged
108         version.
109         * (handle_alloc): Ditto.
110         (mono_method_to_ir): Remove the constrained call restriction added by a previous
111         change, its not needed anymore.
112
113 2010-04-12 Rodrigo Kumpera  <rkumpera@novell.com>
114
115         * mini-posix.c (sigusr1_signal_handler): Fix build on
116         non x86/amd64 systems.
117
118 2010-04-13  Zoltan Varga  <vargaz@gmail.com>
119
120         * method-to-ir.c (mono_method_to_ir): Disable generic sharing for constrained
121         calls where the constrained class needs a context. Fixes #595863.
122
123         * iltests.il.in: Add a test.
124
125 2010-04-13  Zoltan Varga  <vargaz@gmail.com>
126
127         * mini.c (mini_method_compile): Disable llvm+methods with clauses again, llvm
128         2.6/SVN seems to have broken support for them.
129
130 2010-04-13  Zoltan Varga  <vargaz@gmail.com>
131
132         * mini-llvm.c: Fix support for LLVM 2.6.
133
134 2010-04-10  Zoltan Varga  <vargaz@gmail.com>
135
136         * debugger-agent.c (thread_commands): Add a GET_ID command to get the
137         MonoInternalThread belonging to the thread.
138
139 Fri Apr 9 15:28:01 CEST 2010 Paolo Molaro <lupus@ximian.com>
140
141         * driver.c, optflags-def.h, ir-emit.h: introduce an unsupported
142         unsafe optimization that will remove bound checks.
143
144 2010-04-08  Kornel Pal  <kornelpal@gmail.com>
145
146         * method-to-ir.c (mini_emit_inst_for_method): Fix a typo that caused
147         CompareExchange not to be inlined for I8.
148
149         Contributed under MIT/X11 license.
150
151 2010-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
152
153         * array.cs: Add tests for cast between primitive array types.
154
155 2010-04-07 Andreia Gaita  <avidigal@novell.com>
156
157         * Makefile.am: create a convenience library for moon to link with
158
159 2010-04-07 Paolo Molaro <lupus@ximian.com>
160
161         * method-to-ir.c: optimize array accesses from generic interfaces.
162
163 2010-04-06  Zoltan Varga  <vargaz@gmail.com>
164
165         * mini-llvm.c: Update after the memset/memcpy intrinsics changes in LLVM SVN.
166
167 2010-04-05 Rodrigo Kumpera  <rkumpera@novell.com>
168
169         * method-to-ir.c (mono_method_to_ir): Handle call to virtual final methods
170         of marshalbyref classes.
171
172         Fixes #515884.
173
174 2010-04-05 Rodrigo Kumpera  <rkumpera@novell.com>
175
176         * aot-compiler.c (emit_exception_debug_info): Encode try holes
177         information.
178
179         * aot-runtime.c (decode_exception_debug_info): Decode try holes
180         information.
181
182         * mini.h: Increase AOT version.
183
184 2010-04-04  Andreas Faerber  <andreas.faerber@web.de>
185
186         * mini-x86.h: Only enable soft debugger when using sigaction or on
187         Windows. Fixes build on Haiku (lacks siginfo_t).
188
189         Code is contributed under MIT/X11 license.
190
191 2010-04-02  Andreas Faerber  <andreas.faerber@web.de>
192
193         * mini.h, mini-x86.h: Suppress sigaction for Haiku, add support for
194         BeOS-style signal handlers.
195
196         Code is contributed under MIT/X11 license.
197         
198 2010-04-02  Zoltan Varga  <vargaz@gmail.com>
199
200         * mini-posix.c (sigusr1_signal_handler): Fix openbsd support.
201
202 2010-04-01 Rodrigo Kumpera  <rkumpera@novell.com>
203
204         * mini-exceptions.c: Fix win32 build.
205
206 2010-04-01  Mark Probst  <mark.probst@gmail.com>
207
208         * mini.c, driver.c: Call mono_gc_base_init() before
209         mono_debug_init().
210
211 2010-04-01  Sebastien Pouliot  <sebastien@ximian.com>
212
213         * method-to-ir.c (ensure_method_is_allowed_to_[access_field|
214         call_method]): Delegate the actual work in security-core-clr.c
215         to ease code sharing.
216
217 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
218
219         * decompose.c (mono_decompose_opcode): Set the cfg exception if the unsupported
220         float conv.ovf.un opcodes are encountered, instead of asserting later.
221         Fixes #566296.
222
223 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
224
225         * decompose.c (mono_decompose_opcode): Add OP_ICONV_TO_U4_UN as a no-op.
226
227         * iltests.il.in: Add a test.
228
229 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
230
231         * mini-amd64.c (mono_arch_emit_call): Fail compilation if an argument is too
232         large. Fixes #567040.
233
234         * method-to-ir.c: Call CHECK_CFG_EXCEPTION after emitting a call.
235
236 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
237
238         * method-to-ir.c (handle_ccastclass): Call save_cast_details (). Fixes
239         #592711.
240
241 2010-03-31 Rolf Bjarne Kvinge <RKvinge@novell.com>
242
243         * mini-trampolines.c: Surround mono_handler_block_guard_trampoline and
244         mono_create_handler_block_trampoline with the proper #ifdef so that it
245         compiles on amd64.
246
247 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
248
249         * mini-exceptions.c: Introduce mono_walk_stack_full, which
250         allows to select if it's new or old context that is passed to 
251         the callback.
252
253         * mini-exceptions.c (mono_handle_exception_internal): Handle the
254         case when executing a guarded handler from the EH machinery.
255
256         * mini-exceptions.c (mono_install_handler_block_guard): New function
257         responsible for checking for handler blocks, installing the guard and
258         clearing abort state.
259
260         * mini-posix.c (sigusr1_signal_handler): Call mono_install_handler_block_guard
261         to check for handler blocks and skip interruption logic if one was found.
262
263         * mini-trampolines.c (mono_handler_block_guard_trampoline): Function called
264         by the handler block guard trampoline. Resumes interruption by raising the
265         pending ThreadAbortException.
266
267         * mini.c (create_jit_info): Calculate the end address of a finally block.
268
269         * mini-x86.c (mono_arch_install_handler_block_guard): Patch the return address
270         of a finally block to a specified address and return the old one.
271
272         * tramp-x86.c (mono_arch_create_handler_block_trampoline): The handler block
273         trampoline patches the original return address and calls the trampoline function.
274
275 2010-03-30  Zoltan Varga  <vargaz@gmail.com>
276
277         * mini-trampolines.c (mono_aot_trampoline): Remove some dead code.
278
279         * aot-runtime.c (mono_aot_patch_plt_entry): New helper function, which only
280         does the patching if the callee is in the same domain.
281
282         * aot-runtime.c mini-trampolines.c: Call mono_aot_patch_plt_entry instead
283         of mono_arch_patch_plt_entry ().
284
285 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
286
287         * mini.c (create_jit_info): Fix try block hole length encoding.
288
289 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
290
291         * mini.c (create_jit_info): Emit saner debug spew. Now it doesn't
292         duplicate information and print offsets instead of absolute addresses.
293
294 2010-03-29  Zoltan Varga  <vargaz@gmail.com>
295
296         * debugger-agent.c (jit_end): Send type loads for types loaded before the VMStart
297         event is sent. Fixes #591733.
298
299 2010-03-26  Zoltan Varga  <vargaz@gmail.com>
300
301         * mini-posix.c (SIG_HANDLER_SIGNATURE): Handle the case when ctx is NULL on
302         OpenBSD.
303
304 2010-03-26  Zoltan Varga  <vargaz@gmail.com>
305
306         * debugger-agent.c (mono_debugger_agent_init): Set the GC type of the
307         thread_to_tls hash table.
308
309         * image-writer.c (bin_writer_emit_writeout): Fix the size of the got.plt
310         section. Fixes #591000.
311
312 2010-03-26  Andreas Faerber  <andreas.faerber@web.de>
313
314         * Makefile.am (version.h): Check for pure .git directory only,
315         fixes SVN revision when using git without git-svn.
316
317         Contributed under MIT/X11 license.
318
319 2010-03-26  Zoltan Varga  <vargaz@gmail.com>
320
321         * aot-runtime.c: Apply some openbsd changes from openbsd ports.
322
323 2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
324
325         * basic-simd.cs: Test for vector x scalar binary operators.
326
327 2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
328
329         * simd-intrincs.c (simd_intrinsic_emit_binary): Support binary
330         intrinsics with expanded scalar arguments.
331
332 2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
333
334         * mini-exceptions.c (get_exception_catch_class): Non catch clauses
335         don't have an exception class, so don't decode it. This would crash
336         with filter clauses.
337
338 2010-03-24  U-anarquia\miguel  <miguel@anarquia>
339
340         Make sure that trunk builds with DISABLE_JIT, an update to the
341         PlayStation 3 port.
342         
343         * mini.c (mini_get_shared_method): this code seems to be necessary
344         regardless of whether DISABLE_JIT has been defined.
345
346         (mono_jit_compile_method_inner): it seems that this method is
347         required even in full AOT mode, so ifdef out only the pieces that
348         try to genrate code (the body of code that applies patches to the
349         code).  
350
351         (mini_method_compile): do not compile when using DISABLE_JIT.
352
353         * mini-ppc.c (mono_arch_get_allocatable_int_vars)
354         (mono_arch_output_basic_block, mono-arch_emit_exceptions): Do not
355         compile when DISABLE_JIT is set.
356
357 2010-03-24  Mark Probst  <mark.probst@gmail.com>
358
359         * mini.c (mono_create_tls_get): Only create a TLS operation if the
360         arch really supports it.
361
362 2010-03-24  Mark Probst  <mark.probst@gmail.com>
363
364         * mini-x86.c, mini-x86.h, mini.c: CEE_MONO_TLS support for Darwin/x86.
365
366 2010-03-23  Neale Ferguson <neale@sinenomine.net>
367
368         * exceptions-s390x.c: Add support for
369         mono_arch_get_throw_corlib_exception and fix throw by name.
370
371         * mini-s390x.c: Add IMT support; Fix stack parameter passing
372         logic (especially for varargs); Correct localloc sizing; Add
373         mono_arch_get_this_arg_from_call and
374         mono_arch_get_this_arg_from_call.
375
376         * mini-s390x.h: Add support for facility list extraction;
377         Correct/update MONO_ARCH_xxx settings.
378
379         * mini-s390.c: Minor corrections to instruction output for
380         varargs. No IMT implementation - I think it's time to deprecate
381         s390 and just leave s390x.
382
383         * tramp-s390x.c: Correct creation of trampoline instruction
384
385
386         * cpu-s390x.md: Update some instruction lengths
387
388 2010-03-23  Zoltan Varga  <vargaz@gmail.com>
389
390         * mini-generic-sharing.c (fill_in_rgctx_template_slot): Remove an assert which
391         can be hit with partial sharing.
392
393         * mini-generic-sharing.c (get_shared_class): Handle partially shared methods
394         in non-shared classes correctly.
395         (generic_inst_is_sharable): Allow all primitive types in partial sharing.
396         Turn on partial sharing.
397
398 2010-03-23  Zoltan Varga  <vargaz@gmail.com>
399
400         * mini-amd64.h: Put back MONO_ARCH_NOMAP32BIT for OpenBSD which was removed
401         by mistake.
402
403 2010-03-23  Zoltan Varga  <vargaz@gmail.com>
404
405         * method-to-ir.c (mono_method_to_ir): Handle the failure of
406         mono_method_signature ().
407
408         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
409
410         * mini.c (mini_method_compile): Get the signature of cfg->method early with
411         error checking, so later calls do not need error checking.
412
413 2010-03-22  Zoltan Varga  <vargaz@gmail.com>
414
415         * exceptions-amd64.c: Add support for OpenBSD which has no UCONTEXT_GREGS.
416
417         * mini-amd64.h: Enable MONO_ARCH_USE_SIGACTION on OpenBSD as well.
418
419 2010-03-22 Rodrigo Kumpera  <rkumpera@novell.com>
420
421         * mini-exceptions.c (mono_handle_exception_internal): Don't
422         check try_end for archs different than s390. 
423
424         * mini.c (create_jit_info): Don't crash if the finallt block is the
425         last one.
426
427 2010-03-22 Rodrigo Kumpera  <rkumpera@novell.com>
428
429         * driver.c (mono_main): Don't free global codeman under linux since
430         glic now peeks at code on stack for more archs than just amd64.
431
432 Mon Mar 22 18:09:09 CET 2010 Paolo Molaro <lupus@ximian.com>
433
434         * mini.c, method-to-ir.c: changes to support compressed interface
435         bitmaps.
436
437 2010-03-22  Zoltan Varga  <vargaz@gmail.com>
438
439         * mini-x86.h: Applied patch from Robert Nagy (Robert@openbsd.org).
440         Use sigaction on OpenBSD too.
441
442 2010-03-22  Zoltan Varga  <vargaz@gmail.com>
443
444         * debugger-agent.c (event_req_matches_assembly): Handle request modifiers too.
445
446 2010-03-21  Andreas Faerber  <andreas.faerber@web.de>
447
448         * debugger-agent.c: #include sys/select.h for fd_set.
449
450         Code is contributed under MIT/X11 license.
451
452 2010-03-21  Zoltan Varga  <vargaz@gmail.com>
453
454         * mini.c (SIG_HANDLER_SIGNATURE): Fix the build on platforms without sigaction
455         (openbsd+amd64 ?).
456
457 2010-03-21  Zoltan Varga  <vargaz@gmail.com>
458
459         * mini-ppc.c (mono_arch_emit_exceptions): Avoid an assert in ppc_patch () for
460         some large methods with lots of exception handlers. Fixes #440924.
461
462 Sat Mar 20 11:56:24 CET 2010 Paolo Molaro <lupus@ximian.com>
463
464         * method-to-ir.c: remove code duplication for interface checks.
465
466 2010-03-19  Zoltan Varga  <vargaz@gmail.com>
467
468         * debugger-agent.c (clear_event_requests_for_assembly): New helper function.
469         (assembly_unload): Clear all event requests referencing the to-be unloaded
470         assembly.
471
472
473 Fri Mar 19 16:45:20 CET 2010 Paolo Molaro <lupus@ximian.com>
474
475         * mini.h, mini-exceptions.c: restore the state of the stack
476         guard page permissions.
477
478 2010-03-19  Zoltan Varga  <vargaz@gmail.com>
479
480         * mini-trampolines.c (common_call_trampoline): Remove the condition guarding the
481         call site patching code, it doesn't appear to be needed.
482
483 2010-03-19  Zoltan Varga  <vargaz@gmail.com>
484
485         * mini-generic-sharing.c: Add infrastructure for partial sharing, ie.
486         sharing generic methods whose type arguments are a mix of reference and
487         non-reference types. Not yet turned on.
488
489         * mini.c (mini_get_shared_method): New helper function to return
490         the method which will be compiled/registered in the JIT tables when doing
491         generic sharing.
492         (mono_domain_lookup_shared_generic): Moved to mini.c from mini-generic-sharing.c,
493         use mini_get_shared_method ().
494
495         * mini.c (mini_method_compile): Register the same method which is compiled when
496         doing generic sharing.
497
498         * mini.c aot-compiler.c aot-runtime.c: Add support for partial sharing.
499
500         * generics.cs: Add partial sharing tests.
501
502 2010-03-17 Jerry Maine  <crashfourit@gmail.com>
503
504         * mini.h : Changed the SIMD_VERSION* enum values to match those in Mono.Simd.AccelMode.
505                    Add an enum value that or's all possable values together. Add an enum value
506                    that marks the end of the used bit indexes.
507
508         * mini-amd64.c : Make changes to match the changes in mini.h 
509
510         * mini-x86.c : Make changes to match the changes in mini.h
511
512         * simd-intrinsics.c : Reorder the SimdIntrinsc struct to add more bits to
513                    simd_version to support more simd versions. Changed the name of
514                    simd_version to simd_version_flags to make it more intuitive that
515                    it now contains bit flags. Reordered the *_intrinsics arrays to
516                    match the changes above. Changed emit_intrinsics() to use the new
517                    setup mentioned above.
518
519         Code is contributed under MIT/X11 license.
520
521 2010-03-17 Rodrigo Kumpera  <rkumpera@novell.com>
522
523         * mini-*.c (mono_arch_output_basic_block): Record try block holes on all
524         remaining archs. Alpha and hppa maintainers, please stand up.
525
526 2010-03-17  Zoltan Varga  <vargaz@gmail.com>
527
528         * mini-ppc.c (mono_arch_build_imt_thunk): Always save and restore r11 since it
529         is needed even when fail_tramp!=NULL.
530
531 2010-03-17  Zoltan Varga  <vargaz@gmail.com>
532
533         * debugger-agent.c (insert_breakpoint): Write a log message.
534
535 2010-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
536
537         * iltests.il.in: Add a few tests for LEAVE going over multiple
538         finally clauses.
539
540 2010-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
541
542          * mini-x86.c (mono_arch_output_basic_block): Record try block holes.
543
544 2010-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
545
546         * mini.h (MonoBasicBlock): Add native_length field.
547         * mini.h (MonoCompile): Add try_block_holes field.
548         * mini.h (MonoInst): Add exception_clause pointer to
549         the data union.
550
551         * mini.c (mono_codegen): Calculate MonoBasicBlock::native_length.
552         * mini.c (mono_cfg_add_try_hole): New function to register possible
553         holes in try blocks.
554         * mini.c (create_jit_info): Fill in the holes information.
555
556         * mini-exceptions.c: Verify for holes when checking if an IP is covered
557         by a try block.
558
559         * method-to-ir.c: Add the EH clause to the CALL_HANDLE instruction.
560
561 Tue Mar 16 13:16:16 CET 2010 Paolo Molaro <lupus@ximian.com>
562
563         * jit-icalls.c: adjusted for the array API changes.
564
565 2010-03-16  Zoltan Varga  <vargaz@gmail.com>
566
567         * iltests.il.in: Disable the fconv_to_i test on sparc too.
568
569 2010-03-16  Zoltan Varga  <vargaz@gmail.com>
570
571         * debugger-agent.c: Simplify the way breakpoints are processed by removing
572         the 'pending' flag. This fixes support for appdomains too.
573
574
575 Mon Mar 15 18:25:49 CET 2010 Paolo Molaro <lupus@ximian.com>
576
577         * mini-amd64.c, mini-ia64.c: remove direct access to method->header.
578
579 2010-03-12  Zoltan Varga  <vargaz@gmail.com>
580
581         * simd-intrinsics.c (simd_intrinsic_emit_getter): Don't emit shuffle opcodes
582         when using LLVM, LLVM generates it itself when needed.
583
584         * mini-llvm-cpp.cpp (mono_llvm_build_aligned_load): New helper function.
585
586         * mini-llvm.c: Use an unaligned load for OP_LOADX_MEMBASE. Add zero extension
587         to some OP_EXTRACT_ opcodes. Fix the naming of some sse intrinsics. Fix
588         OP_ANDNPS/OP_ANDNPD.
589
590 2010-03-11  Zoltan Varga  <vargaz@gmail.com>
591
592         * tramp-x86.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code' for
593         the pc instead of 'buf'. Fix the call to mono_arch_flush_icache ().
594         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
595
596 2010-03-11  Martin Baulig  <martin@ximian.com>
597
598         * debugger-agent.c (type_commands): Add NULL check to
599         `CMD_TYPE_GET_SOURCE_FILES'.
600
601 2010-03-09  Zoltan Varga  <vargaz@gmail.com>
602
603         * mini-ppc.c (mono_arch_decompose_opts): Fix OP_ICONV_TO_R_UN when cross-compiling.
604
605 2010-03-09  Zoltan Varga  <vargaz@gmail.com>
606
607         * mini-codegen.c (mono_peephole_ins): Fix the OP_FMOVE optimization. Fixes
608         #586664.
609
610         * iltests.il.in: Add a test.
611
612 2010-03-05  Martin Baulig  <martin@ximian.com>
613
614         Add support for aborting invocations.
615
616         * debugger-agent.c
617         (InvokeData): Added `InvokeData *last_invoke'.
618         (DebuggerTlsData): Renamed `invoke' into `pending_invoke' and
619         added a new `invoke' field to keep the `InvokeData *' throughout
620         the invocation.
621         (ErrorCode): Added `ERR_NO_INVOCATION'.
622         (CmdVM): Added `CMD_VM_ABORT_INVOKE'.
623         (mono_debugger_agent_handle_exception): Don't report any exception
624         if an abort was requested.
625         (invoke_method): Store the `InvokeData *' in `tls->invoke'; reset
626         a thread abort if necessary.
627         (vm_commands): Implement `CMD_VM_ABORT_INVOKE'.
628
629 2010-03-08  Rodrigo Kumpera  <rkumpera@novell.com>
630
631         * method-to-ir.c: Store the initial basic block returned by mono_basic_block_split
632         so we can release the whole list and not just the first one. Free
633         it in more places as well.
634
635 2010-03-08  Rodrigo Kumpera  <rkumpera@novell.com>
636
637         * method-to-ir.c: Revert r153222 as it doesn't belong here.
638
639 Mon Mar 8 17:58:26 CET 2010 Paolo Molaro <lupus@ximian.com>
640
641         * mini.h, *.c: prepare for MonoMethodHeader to become a transient entity.
642
643 Mon Mar 8 17:35:26 CET 2010 Paolo Molaro <lupus@ximian.com>
644
645         * driver.c: report also other misc build options.
646
647 2010-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
648
649         * method-to-ir.c: Generate better code for the NewObject
650         intrinsic.
651         
652 2010-03-07  Zoltan Varga  <vargaz@gmail.com>
653
654         * branch-opts.c (mono_if_conversion): Disable one of the cases when deadce
655         is disabled. Fixes #582322.
656
657         * iltests.il.in: Add a test.
658
659 2010-03-06  Zoltan Varga  <vargaz@gmail.com>
660
661         * tramp-amd64.c (mono_arch_create_monitor_exit_trampoline_full): Delegate
662         the handling of obj->synchronization == null and owner != current thread to
663         mono_monitor_exit ().
664
665         * tramp-x86.c (mono_arch_create_monitor_exit_trampoline_full): Ditto.
666
667
668 Sat Mar 6 18:14:15 CET 2010 Paolo Molaro <lupus@ximian.com>
669
670         * mini.c: change the way emulated opcode info is stored and save about
671         4 KB of runtime memory.
672
673 2010-03-04  David S. Miller  <davem@davemloft.net>
674
675        * mini-sparc.h: Always use MONO_ARCH_USE_SIGACTION.  Linux kernels
676        that don't provide the siginfo in the second signal handler argument
677        are buggy, and this has been fixed for years.
678        * mini.h (GET_CONTEXT): Remove __sparc__ special case.
679        (SIG_HANDLER_SIGNATURE, SIG_HANDLER_PARMS): Likewise.
680
681 2010-03-04  Zoltan Varga  <vargaz@gmail.com>
682
683         * aot-runtime.c (find_symbol): Fix a leak.
684         (decode_patch): Ditto.
685
686 2010-03-04  Zoltan Varga  <vargaz@gmail.com>
687
688         * mini.h (MONO_INST_IS_TEMP): Kill this unused define.
689
690 2010-03-04  Zoltan Varga  <vargaz@gmail.com>
691
692         * mini.c (mono_resolve_patch_target): Fix an uninitialized variable.
693
694 Wed Mar 3 19:19:21 CET 2010 Paolo Molaro <lupus@ximian.com>
695
696         * method-to-ir.c: MONO_PROFILE_STRING_ALLOC is dead.
697
698 2010-03-03  Rodrigo Kumpera  <rkumpera@novell.com>
699
700         * method-to-ir.c (mono_method_to_ir): Don't create a runtime vtable
701         to check for errors, it's enough to create the metadata open.
702
703         Fixes #562150
704
705 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
706
707         * trace.c|h:
708         * mini-exceptions.c: Add support for printing stack traces when handling
709         exceptions, and when printing exceptions thrown while tracing also print
710         the exception message.
711
712 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
713
714         * trace.c: We need to parse exclude tokens ('-') before string tokens,
715         since the exclude token is a valid string character.
716
717 2010-03-02  Levi Bard  <levi@unity3d.com>
718
719         * debugger-agent.c: Invalidate thread stacks on domain unload.
720
721 2010-03-02  Mark Probst  <mark.probst@gmail.com>
722
723         * method-to-ir.c: Emit dummy_use for stored reference after write
724         barriers to make sure the object is pinned if the GC interrupts
725         before the write barrier is done.
726
727 2010-03-02  Zoltan Varga  <vargaz@gmail.com>
728
729         * cpu-<ARCH>.md: dummy_use was missing src1:i.
730
731 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
732
733         * debugger-agent.c: Add a log message printing the protocol version.
734
735 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
736
737         * debugger-agent.c: Add a new command to communicate the protocol version used
738         by the client. This could be used to allow newer runtimes to communicate with
739         older clients.
740
741 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
742
743         * debugger-agent.c (domain_commands): Add a new command to create a boxed value.
744
745 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
746
747         * debugger-agent.c (type_commands): Fix the setting of fields with a reference
748         type.
749
750 Mon Mar 1 15:20:44 CET 2010 Paolo Molaro <lupus@ximian.com>
751
752         * mini-arm.c: make the arm cpu arch configurable with the
753         MONO_CPU_ARCH env var (for example: "armv4 thumb").
754         Bug #584198.
755
756 Mon Mar 1 14:48:35 CET 2010 Paolo Molaro <lupus@ximian.com>
757
758         * mini.c, mini.h, driver.c: added the --jitmap option to enable
759         support for the perf tool on Linux.
760
761 Mon Mar 1 14:43:55 CET 2010 Paolo Molaro <lupus@ximian.com>
762
763         * method-to-ir.c: make string.InsertenalSetChar() specialization
764         effective.
765
766 2010-03-01  Robert Jordan  <robertj@gmx.net>
767
768         * Makefile.am: fix the non-static build.
769
770 2010-02-26  Zoltan Varga  <vargaz@gmail.com>
771
772         * mini-generic-sharing.c: Move the contents of ../metadata/generic-sharing.c
773         here.
774
775 2010-02-26  Robert Jordan  <robertj@gmx.net>
776
777         * tasklets.c (continuation_store): Return from an error condition
778         immediately.
779
780 2010-02-26  Martin Baulig  <martin@ximian.com>
781
782         * debug-debugger.c (MonoDebuggerInfo): Added `abort_runtime_invoke'.
783
784         * debug-mini.c
785         (MonoDebuggerThreadInfo): Added `internal_flags'.
786         (MonoDebuggerInternalThreadFlags): New enum.
787         (_mono_debugger_throw_exception): Don't signal the debugger if a
788         type abort was requested.
789         (_mono_debugger_unhandled_exception): Likewise.
790         (mono_debugger_abort_runtime_invoke): New method to abort an invocation.
791         (mono_debugger_runtime_invoke): If the debugger requested a thread
792         abort during the invocation, reset it here.
793
794 2010-02-26  Martin Baulig  <martin@ximian.com>
795
796         * debug-mini.c (MonoDebuggerThreadInfo): Use `MonoInternalThread *'
797         instead of `MonoThread *'.
798
799 2010-02-25  Zoltan Varga  <vargaz@gmail.com>
800
801         * aot-runtime.c (mono_aot_find_jit_info): Use a merge sort for sorting the
802         code offsets table, as it is mostly sorted.
803
804 2010-02-25  Zoltan Varga  <vargaz@gmail.com>
805
806         * debugger-agent.c (do_invoke_method): Fix invoking of static methods on vtypes.
807         Fixes #582991.
808
809 2010-02-25  Zoltan Varga  <vargaz@gmail.com>
810
811         * driver.c (mono_main): Get rid of mono_setup_vtable_in_class_init.
812
813 Wed Feb 24 15:58:03 CET 2010 Paolo Molaro <lupus@ximian.com>
814
815         * Makefile.am: build the new ABI version of the libmono library.
816         * debugger-agent.c, mini.c: fix warnings with the new API.
817         * jit.h: don't depend on glib.h being included.
818
819 2010-02-24  Zoltan Varga  <vargaz@gmail.com>
820
821         * method-to-ir.c (mono_method_to_ir): Implement AOT support for fast TLS access.
822
823 2010-02-24  Zoltan Varga  <vargaz@gmail.com>
824
825         * method-to-ir.c (mono_method_to_ir): Implement support for fast access to
826         ThreadStatic variables.
827
828 2010-02-24  Zoltan Varga  <vargaz@gmail.com>
829
830         * debugger-agent.c (notify_thread): Skip terminated threads, since their tls
831         data is not freed yet. Fixes #582460.
832
833 2010-02-23  Zoltan Varga  <vargaz@gmail.com>
834
835         * debugger-agent.c: Add support for the caught/uncaught flags on exception
836         event requests. Bump protocol minor version.
837
838 2010-02-22  Zoltan Varga  <vargaz@gmail.com>
839
840         * decompose.c (mono_decompose_long_opts): Handle OP_LCONV_TO_OVF_I8 here too.
841
842 2010-02-22  Zoltan Varga  <vargaz@gmail.com>
843
844         * decompose.c (mono_decompose_opcode): Handle OP_LCONV_TO_OVF_I8. Fixes
845         #581950.
846
847         * iltests.il.in: Add a test.
848
849 2010-02-22  Rodrigo Kumpera  <rkumpera@novell.com>
850
851         * mini.c (inline_method): Check for loader errors.
852
853 2010-02-22  Rodrigo Kumpera  <rkumpera@novell.com>
854
855         * mini.c (mono_method_check_inlining): Use !mono_method_get_header_summary
856         instead of mono_method_get_header as it doesn't decode locals
857         so the called method can have unresolved dependencies that will only
858         be satisfied after the current method is JIT'd.
859
860         Fixes #550968.
861
862 2010-02-22  Zoltan Varga  <vargaz@gmail.com>
863
864         * basic.cs (test_0_div_opt): Speed this up a bit.
865
866 2010-02-20  Zoltan Varga  <vargaz@gmail.com>
867
868         * mini-amd64.c: Fix DISABLE_JIT support after the latest changes.
869
870         * mini.c (mono_jit_create_remoting_trampoline): Call
871         mono_create_specific_trampoline () instead of
872         mono_arch_create_specific_trampoline ().
873
874         * mini-trampolines.c tramp-arm.c: Disable more stuff when DISABLE_JIT is set.
875
876 2010-02-20  Zoltan Varga  <vargaz@gmail.com>
877
878         * unwind.c (mono_unwind_get_cie_program): New function, moved here from
879         aot-compiler.c, so it can be found even if DISABLE_JIT is set.
880
881         * aot-compiler.c xdebug.c: Update callers of mono_arch_unwind_get_cie_program ().
882
883         * mini-amd64.c: Fix DISABLE_JIT support.
884
885 2010-02-20  Geoff Norton  <gnorton@novell.com>
886
887         * aot-runtime.c: Ensure we dont leak a held lock when unwinding exceptions.
888
889 2010-02-20  Zoltan Varga  <vargaz@gmail.com>
890
891         * debugger-agent.c (mono_debugger_agent_handle_exception): Receive two contexts,
892         one for the throw and one for the catch. Mark uncaught exceptions by a NULL
893         CATCH_TXT. Send normal exception events for unhandled exceptions too.
894         (mono_debugger_agent_handle_unhandled_exception): Remove this, merged into
895         handle_exception.
896
897 2010-02-18  Zoltan Varga  <vargaz@gmail.com>
898
899         * exceptions-x86.c (mono_arch_get_restore_context): Changes this so it restores
900         edx/ecx too. This is needed to support OP_SEQ_POINT.
901
902 2010-02-18  Zoltan Varga  <vargaz@gmail.com>
903
904         * exceptions-amd64.c (get_throw_trampoline): Add xdebug info.
905
906         * method-to-ir.c (mono_method_to_ir): Fix SIZEOF in dynamic methods.
907
908 2010-02-16  Zoltan Varga  <vargaz@gmail.com>
909
910         * mini-llvm.c aot-compiler.c aot-runtime.c unwind.c: Finish support
911         LLVM+AOT+exceptions, not enabled yet.
912
913 2010-02-15  Zoltan Varga  <vargaz@gmail.com>
914
915         * mini.c (SIG_HANDLER_SIGNATURE): Fix the windows build.
916
917 2010-02-15  Zoltan Varga  <vargaz@gmail.com>
918
919         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Emit
920         xdebug info for these.
921
922         * mini-trampolines.c (common_call_trampoline): Use mini_jit_info_table_find ()
923         in a few places.
924
925         * mini.c (mini_get_vtable_trampoline): Make this take a 'slot_index' argument,
926         not used yet.
927
928 2010-02-13  Zoltan Varga  <vargaz@gmail.com>
929
930         * aot-compiler.c (load_profile_files): Update after the profiler changes.
931
932 2010-02-13  Zoltan Varga  <vargaz@gmail.com>
933
934         * mini.c (mono_jit_compile_method_inner): Avoid passing icall wrappers to
935         mono_profiler_method_end_jit, since the profiler has no way to process wrappers.
936
937         * aot-runtime.c mini.c: Resurrect the aot pagefault profiling stuff, it is useful
938         for mtouch.
939
940 2010-02-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
941
942         * debugger-agent.c: handle incomplete reads and EINTR in
943         recv()/send(). This could have been causing random
944         disconnections.
945
946 2010-02-13  Zoltan Varga  <vargaz@gmail.com>
947
948         * aot-runtime.c (decode_exception_debug_info): Fix aot support for sequence
949         points.
950
951         * mini-arm.c (mono_arch_allocate_vars): Allocate the seq point related vars first
952         so they have small offsets. Fixes #566311.
953
954 2010-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
955
956         * method-to-ir.c (mono_method_check_inlining): Check for loader errors.
957
958 2010-02-11  Zoltan Varga  <vargaz@gmail.com>
959
960         * mini-amd64.c: Remove the special casing of byref in a few places now that
961         mini_type_get_underlying_type () handles it.
962
963         * mini-generic-sharing.c (mini_type_get_underlying_type): Handle byref as well
964         by returning native int. Fixes #577984.
965
966 2010-02-11  Zoltan Varga  <vargaz@gmail.com>
967
968         * method-to-ir.c (handle_isinst): Factor out the is_complex_isinst check into
969         a macro.
970
971         * mini-llvm.c (exception_cb): Put the clause index into the type info instead
972         of putting the clause itself.
973
974         * mini-arm.c mini.c linear-scan.c: Disable more stuff when DISABLE_JIT is used.
975
976 2010-02-09  Zoltan Varga  <vargaz@gmail.com>
977
978         * unwind.c (mono_unwind_frame): Use read32 for reading a 32 bit value, since it
979         might be unaligned.
980
981 2010-02-10  Geoff Norton  <gnorton@novell.com>
982
983         * aot-compiler.c: Make the number of IMT trampolines configurable as well.
984
985 2010-02-08  Zoltan Varga  <vargaz@gmail.com>
986
987         * aot-compiler.c (emit_code): Create the ut trampolines here, so they work for
988         llvm methods too.
989
990         * aot-compiler.c (emit_code): Don't add the llvm label prefix to 'methods', since
991         it is not an LLVM generated symbol.
992
993         * mini-llvm.c (emit_entry_bb): Fix the handling of simd types.
994
995         * method-to-ir.c (handle_castclass): Turn off the more efficient isinst/castclass
996         implementation in gshared mode because it causes regressions.
997
998         * mini-trampolines.c: Add a stat for the number of calls to trampolines.
999
1000         * image-writer.c (asm_writer_emit_global): Don't prepend the global prefix, it
1001         should be done by the caller.
1002
1003         * mini-llvm.c (mono_llvm_emit_method): Don't make the debug symbols global.
1004
1005         * aot-compiler.c (emit_code): Add the llvm label prefix before 'methods'.
1006
1007         * mini-exceptions.c (mini_jit_info_table_find): Search the root domain as well,
1008         since mono_jit_info_table_find () doesn't do it anymore.
1009
1010         * mini-generic-sharing.c debugger-agent.c: Call mini_jit_info_table_find ()
1011         instead of mono_jit_info_table_find ().
1012
1013 2010-02-07  Zoltan Varga  <vargaz@gmail.com>
1014
1015         * aot-compiler.c aot-runtime.c: Add support for MONO_WRAPPER_WRITE_BARRIER.
1016
1017         * aot-compiler.c (encode_method_ref): Update after the removal of
1018         mono_gc_get_managed_allocator_type ().
1019
1020         * method-to-ir.c (mono_method_to_ir): Place a seq point just before a RET.
1021         Fixes #564538.
1022
1023 2010-02-06  Zoltan Varga  <vargaz@gmail.com>
1024
1025         * method-to-ir.c (handle_castclass): Use the icall for classes with variant
1026         generic params as well.
1027         (handle_isinst): Ditto.
1028
1029         * method-to-ir.c: Make isninst/castclass checks in gshared code more efficient
1030         instead of always calling an icall.
1031
1032         * aot-compiler.c (emit_llvm_file): Take into account trampolines etc when
1033         computing the size of the got.
1034
1035         * aot-compiler.c (emit_code): Change the way the 'methods' symbol is emitted
1036         when using LLVM. Instead of emitting it as an LLVM method, emit it using
1037         the assembly directive '.set' so it points to the first LLVM emitted method.
1038
1039 2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>
1040
1041         * mini.c (mini_method_verify): Report the method which failed to verify.
1042
1043 2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>
1044
1045         * method-to-ir.c (mono_method_to_ir): Use the new basic block formation pass
1046         to avoid JIT'ng dead basic blocks. This is the same behavior as the
1047         runtime MS verifier.
1048
1049 2010-02-04  Zoltan Varga  <vargaz@gmail.com>
1050
1051         * debugger-agent.c (decode_value): Fix decoding of vtype instances. Fixes
1052         #561962.
1053
1054 2010-02-04  Zoltan Varga  <vargaz@gmail.com>
1055
1056         * mini-llvm.c: Init the jit module only when first JITting.
1057
1058         * aot-compiler.c (emit_plt): Fix the naming of plt entries of llvm+darwin.
1059
1060         * mini-llvm.c (get_plt_entry): Make the plt entries have hidden visibility.
1061
1062         * mini-llvm.c (mono_llvm_emit_aot_module): Remove the dummy got after it is
1063         replaced with the real got.
1064
1065         * debugger-agent.c (type_commands): Return the enumness if the type as well.
1066
1067         * image-writer.c: Reduce the amount of #ifdefs a bit.
1068
1069         * aot-compiler.c: Reduce the amount of #ifdefs. Add beginnings of support for
1070         llvm on darwin/arm.
1071
1072         * aot-compiler.c (mono_compile_assembly): Handle asmonly+llvm mode.
1073
1074         * mini-llvm.c (mono_llvm_emit_method): Don't make the 'type_info' symbols
1075         global.
1076
1077 2010-02-02  Zoltan Varga  <vargaz@gmail.com>
1078
1079         * mini-llvm.c (mono_llvm_emit_method): Add support for unaligned loads.
1080         (mono_llvm_emit_method): Fix unaligned stores too.
1081
1082         * mini-amd64.c (mono_arch_emit_prolog): Initialize lmf->rsp in the prolog too
1083         so async stack walks don't crash.
1084
1085 2010-02-02  Zoltan Varga  <vargaz@gmail.com>
1086
1087         * mini-trampolines.c (common_call_trampoline): Fix a problem where the callsite
1088         was not patched if the callee needed an rgctx trampoline.
1089
1090 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
1091
1092         * mini-ppc.c (mono_arch_get_global_int_regs): Reserve r29 for holding the
1093         vtable address in AOT code.
1094
1095 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
1096
1097         * mini-codegen.c: Remove support for CEE_ opcodes which cannot occur in
1098         MonoInst's.
1099
1100 Mon Feb 1 16:29:10 CET 2010 Paolo Molaro <lupus@ximian.com>
1101
1102         * genmdesc.pl: remove dependency on external cpp.
1103
1104 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
1105
1106         * method-to-ir.c (mini_emit_ldelema_1_ins): Avoid emitting an OP_SEXT_I4 when
1107         using LLVM, its not needed, and abcrem can't handle it.
1108
1109 Mon Feb 1 14:29:43 CET 2010 Paolo Molaro <lupus@ximian.com>
1110
1111         * genmdesc.c, genmdesc.pl, cpu-x86.md: introduced templates to make
1112         it easier to group instructions and reduce duplication.
1113
1114 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
1115
1116         * decompose.c: Move the array/soft float decompose routines here from
1117         method-to-ir.c.
1118
1119         * method-to-ir.c: Export a few functions so they can be used from decompose.c.
1120
1121 2010-01-31  Zoltan Varga  <vargaz@gmail.com>
1122
1123         * mini-llvm.c (mono_llvm_emit_method): Add a call to llvm.invariant.start
1124         to tell LLVM that the got is constant, not used yet.
1125
1126         * aot-compiler.c: Pass more optimization flags to llvm's 'opt'.
1127
1128 2010-01-30  Zoltan Varga  <vargaz@gmail.com>
1129
1130         * mini-ppc.c (mono_arch_emit_prolog): Fix full aot support for native to
1131         managed wrappers.
1132
1133 2010-01-30  Zoltan Varga  <vargaz@gmail.com>
1134
1135         * aot-compiler.c (add_wrappers): Commit the hack which generates
1136         native-to-managed wrappers for methods decorated with the MonoPInvokeCallback
1137         custom attribute.
1138
1139 2010-01-29  Zoltan Varga  <vargaz@gmail.com>
1140
1141         * mini.h (MONO_INST_FAULT): New instruction flag for loads which can cause
1142         a fault, only used by the LLVM backend.
1143
1144         * ir-emit.h: Add _FAULT variants of the LOAD_MEMBASE macros. Mark
1145         OP_CHECK_THIS with OP_IMPLICIT_EXCEPTION.
1146
1147         * method-to-ir.c: Use the new LOAD_MEMBASE_FAULT opcodes, get rid of the
1148         calls to MONO_EMIT_NULL_CHECK which is automatically done by the new macros.
1149
1150         * mini-llvm.c: Only generate volatile loads from load instructions which have
1151         the MONO_INST_FAULT flag set.
1152
1153 2010-01-29  Zoltan Varga  <vargaz@gmail.com>
1154
1155         * unwind.c (mono_unwind_decode_fde): Fix the decoding of the LSDA offset on
1156         64 bit platforms.
1157
1158 2010-01-28  Zoltan Varga  <vargaz@gmail.com>
1159
1160         * mini.c (mono_save_seq_point_info): Fix the handling of bblocks without
1161         sequence points. Fixes #571236.
1162
1163 2010-01-28  Zoltan Varga  <vargaz@gmail.com>
1164
1165         * debugger-agent.c (mono_debugger_agent_init): Call appdomain_unload at the
1166         end of the appdomain unload process, after assemblies have been unloaded.
1167         Fixes #574842.
1168
1169 2010-01-27  Zoltan Varga  <vargaz@gmail.com>
1170
1171         * abcremoval.c (process_block): Fix the if (region) check so abcrem actually
1172         works.
1173
1174         * mini-amd64.c: Make the soft debugger work on platforms without MAP_32BIT.
1175         Fixes #573988.
1176
1177 2010-01-26  Zoltan Varga  <vargaz@gmail.com>
1178
1179         * dwarfwriter.c (emit_type): Treat MONO_TYPE_PTR as 'I' not 'I4'.
1180
1181 2010-01-26  Geoff Norton  <gnorton@novell.com>
1182
1183         * aot-compiler.c: Fix a logic error introduced when guarding against enums
1184         with struct marshalability.
1185
1186 2010-01-24  Zoltan Varga  <vargaz@gmail.com>
1187
1188         * mini.c (mini_method_compile): Improve the processing MONO_VERBOSE_METHOD so
1189         it supports class names as well.
1190
1191         * mini.h (MonoCompile): Add a few flags to control JIT behavior which are
1192         needed by the GC map code.
1193
1194         * mini.c (mini_method_compile): Call a function in mini-gc.c to set the new
1195         flags if needed.
1196
1197         * method-to-ir.c (mono_method_to_ir): Emit initialization code for ref variables
1198         if cfg->init_ref_vars is set.
1199
1200         * liveness.c (optimize_initlocals): Disable the initlocals opt for ref vars if
1201         cfg->disable_initlocals_op_refs is set.
1202
1203         * method-to-ir.c (mono_spill_global_vars): Compute more precise live ranges
1204         using liveness info if cfg->compute_precise_live_ranges is set.
1205
1206         * mini-gc.c: Ongoing work. Improve logging and debugging support. Handle
1207         volatile variables correctly. Add comments about the live ranges. Not enabled
1208         yet.
1209
1210 2010-01-24  Zoltan Varga  <vargaz@gmail.com>
1211
1212         * mini.h (MonoDebugOptions): Add an option to init stack frames by writing
1213         0x2a into them in method prologs.
1214
1215         * mini-amd64.c (mono_arch_emit_prolog): Implement it.
1216
1217 2010-01-22  Zoltan Varga  <vargaz@gmail.com>
1218
1219         * mini-llvm-cpp.cpp: Remove uses of dynamic_cast, it no longer works with llvm
1220         classes, since llvm is compiled with -fno-rtti.
1221
1222         * mini.h (COMPILE_SOFT_FLOAT): New macro, similar to COMPILE_LLVM.
1223
1224         * method-to-ir.c ir-emit.h: Use if (COMPILE_SOFT_FLOAT) in a few places since
1225         llvm does not require it.
1226
1227         * aot-runtime.c (load_method): Print the full name of the last aot method.
1228
1229 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
1230
1231         * exceptions-amd64.c (mono_arch_notify_pending_exc): Avoid a crash if the
1232         thread has not fully started yet.
1233
1234 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
1235
1236         * aot-compiler.c (can_marshal_struct): Allow marshalling enums.
1237
1238 2010-01-21  Miguel de Icaza  <miguel@novell.com>
1239
1240         * driver.c: Do not abort if LLVM is not supported, print a
1241         warning and add the information to the Mono JIT information.
1242
1243 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
1244
1245         * ir-emit.h (MONO_EMIT_NULL_CHECK): Don't emit an OP_IMPLICIT_EXCEPTION when
1246         using explicit null checks.
1247
1248 2010-01-20  Zoltan Varga  <vargaz@gmail.com>
1249
1250         * xdebug.c: New file extracted from aot-compiler.c, containing the XDEBUG
1251         related code.
1252
1253         * aot-compiler.c (encode_method_ref): Use mono_marshal_wrapper_info_from_wrapper
1254         () in one place.
1255         (mono_aot_wrapper_name): Remove the special handling of delegate invoke wrappers,
1256         its no longer needed.
1257
1258         * method-to-ir.c (mono_method_to_ir): Fix a warning.
1259
1260         * exceptions-<ARCH>.c: Introduce a MONO_ARCH_HAVE_THROW_EXCEPTION_BY_NAME
1261         define for platforms still using it (s390). Get rid of the
1262         mono_arch_get_throw_exception_by_name () routines on all other platforms.
1263
1264         * exceptions-x86.c: Rework the throw trampolines so there is only one function
1265         which can generate throw/rethrow/corlib trampolines for llvm/not llvm code.
1266
1267         * exceptions-x86.c: Add LLVM specific throw trampolines which doesn't assume
1268         the caller pushed the arguments.
1269
1270         * mini-llvm.c: Enable throwing exceptions on x86.
1271
1272         * mini-posix.c (SIG_HANDLER_SIGNATURE): Avoid
1273         "Thread (nil) may have been prematurely finalized" messages if this is called
1274         on a thread not registered with the runtime.
1275
1276         * mini-exceptions.c (mono_handle_native_sigsegv): Ditto.
1277
1278 2010-01-19  Zoltan Varga  <vargaz@gmail.com>
1279
1280         * jit-icalls.c (mono_array_new_3): New jit icall.
1281
1282         * aot-compiler.c aot-runtime.c: Add support for ElementAddr wrappers.
1283
1284         * arrays.cs: Add a test for 3 dimensional arrays.
1285
1286 2010-01-19  Zoltan Varga  <vargaz@gmail.com>
1287
1288         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Emit xdebug info.
1289         (mono_arch_find_jit_info_ext): Disable the popping of arguments when LLVM is
1290         used.
1291
1292         * mini-llvm.c (emit_cond_system_exception): Abort when an implicit exception is
1293         thrown on x86.
1294
1295         * unwind.c (mono_unwind_decode_fde): Fix an assert on x86.
1296
1297         * mini-x86.h (MONO_CONTEXT_SET_LLVM_EXC_REG): Define this for x86.
1298
1299         * mini-llvm.c: Disable OP_THROW on x86, it doesn't work yet.
1300
1301 2010-01-18  Bill Holmes  <billholmes54@gmail.com>
1302
1303         * debugger-agent.c : Changing the PLATFORM_WIN32 preprocessor check to
1304           HOST_WIN32.  Also including winsock2. to define struct in_addr.
1305
1306         * mini-amd64.h : Changing the PLATFORM_WIN32 preprocessor check to HOST_WIN32.
1307
1308         * mini-x86.h : Changing the PLATFORM_WIN32 preprocessor check to HOST_WIN32.
1309
1310         Code is contributed under MIT/X11 license.
1311
1312 2010-01-18  Zoltan Varga  <vargaz@gmail.com>
1313
1314         * mini.h (MonoCompile): Add 'disable_out_of_line_bblocks' flag.
1315
1316         * branch-opts.c (mono_optimize_branches): Honor the new flag.
1317
1318         * mini.c (mini_method_compile): Set the new flag when running under the
1319         debugger.
1320
1321 2010-01-18  Zoltan Varga  <vargaz@gmail.com>
1322
1323         * mini-gc.c: Change the GC map to use a ref/noref/pin value instead of just
1324         a ref/noref value + a global pin flag, so parts of stack frames can still be
1325         precisely marked even if they include stuff which needs pinning. Improve logging.
1326         Fix many bugs. Not enabled yet.
1327
1328         * gc-test.cs: Add a few tests.
1329
1330         * liveness.c (mono_analyze_liveness): Make the debug output controllable by
1331         the normal -v options. Avoid propagating liveness information through bblocks
1332         which end with a NOT_REACHED opcode.
1333
1334         * mini.c (mono_jit_compile_method_inner): Avoid reading cfg->prof_options
1335         after cfg has been freed.
1336
1337 2010-01-17  Zoltan Varga  <vargaz@gmail.com>
1338
1339         * branch-opts.c (mono_branch_optimize_exception_target): Stop the optimization
1340         if a clause is skipped because it uses the exception object, since it could
1341         have caught the exception.
1342
1343         * exceptions.cs: Add a test.
1344
1345 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
1346
1347        * mini-trampolines.c (mono_create_static_rgctx_trampoline): Add an assert.
1348
1349         * aot-runtime.c (mono_aot_get_method): Handle ftnptr's correctly for the
1350         ICollection<T> wrappers.
1351
1352 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
1353
1354         * debugger-agent.c (decode_value): Fix the decoding of I/U/PTR.
1355
1356 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
1357
1358         * mini-amd64.c (emit_call_body): Always use near calls when AOTing even if
1359         NOMAP32BIT or optimize_for_xen is set.
1360
1361 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
1362
1363         * aot-compiler.c aot-runtime.c: Get rid of mono_aot_str_hash (), use
1364         mono_metadata_str_hash () instead.
1365
1366 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
1367
1368         * ir-emit.h (MONO_EMIT_NEW_ICOMPARE_IMM): Use sizeof (mgreg_t) instead of
1369         sizeof (void*).
1370
1371         * unwind.c (mono_unwind_frame): Use mgreg_t instead of gssize.
1372
1373 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
1374
1375         * ir-emit.h (MONO_EMIT_NEW_CHECK_THIS): Emit an explicit null check if the
1376         flag is set.
1377
1378         * mini-ppc.c (mono_arch_emit_exceptions): Compute the size of the exception
1379         throwing code correctly.
1380
1381         * mini.h (MONO_AOT_FILE_VERSION): Bump this because of the IMT hashing changes.
1382
1383 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
1384
1385         * aot-runtime.c (mono_aot_plt_resolve): Reenable the previous assert for
1386         ftnptrs created by us, handle RGCTX_FETCH correctly.
1387         (mono_aot_get_lazy_fetch_trampoline): Add an ftnptr.
1388
1389         * mini-trampolines.c (mono_create_generic_class_init_trampoline): Remove the
1390         ftnptr added by mono_aot_get_named_code ().
1391
1392 2010-01-14  Zoltan Varga  <vargaz@gmail.com>
1393
1394         * mini-arm.c: Fix a few LLVM problems.
1395
1396         * mini-llvm.c (simd_class_to_llvm_type): Fix compilation on !x86/amd64.
1397
1398 2010-01-13  Mark Probst  <mark.probst@gmail.com>
1399
1400         * method-to-ir.c (mini_emit_stobj): Use EMIT_NEW_CLASSCONST when
1401         AOT compiling.
1402
1403 Wed Jan 13 15:54:53 CET 2010 Paolo Molaro <lupus@ximian.com>
1404
1405         * jit.h, method-to-ir.c: added ability to set the policy for
1406         inserting breakpoints from the break IL instruction or the
1407         Debugger.Break () API call.
1408
1409 2010-01-13  Zoltan Varga  <vargaz@gmail.com>
1410
1411         * aot-runtime.c (load_aot_module): Add more comments to explain why referenced
1412         assemblies need to be eagerly loaded.
1413
1414 2010-01-12  Zoltan Varga  <vargaz@gmail.com>
1415
1416         * dwarfwriter.c (emit_line_number_info): Fix the eglib case so it doesn't crash.
1417
1418 2010-01-11  Zoltan Varga  <vargaz@gmail.com>
1419
1420         * debugger-agent.c (mono_debugger_agent_parse_options): Allow onthrow without
1421         an argument which matches any exception.
1422
1423 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
1424
1425         * method-to-ir.c (mono_emit_method_call_full): Avoid the virt->nonvirt
1426         optimization if the called method is gshared and marshalbyref, since gshared
1427         methods can' have wrappers. Fixes #569390.
1428
1429         * generics.cs: Add a test.
1430
1431 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
1432
1433         * mini-exceptions.c (mono_print_thread_dump_from_ctx): New helper function
1434         callable from gdb.
1435
1436 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
1437
1438         * mini.c (mono_print_method_from_ip): Fix the lookup of trampolines.
1439
1440 2010-01-09  Zoltan Varga  <vargaz@gmail.com>
1441
1442         * debugger-agent.c (transport_connect): comment out freeaddrinfo calls under win32,
1443         since it is not supported in win2000.
1444
1445 2010-01-08  Zoltan Varga  <vargaz@gmail.com>
1446
1447         * aot-runtime.c (load_image): Add a SET_ERROR argument to set the loader
1448         error if loading an assembly fails.
1449         (mono_aot_plt_resolve): Return NULL instead of asserting if loading fails.
1450
1451         * mini-trampolines.c (mono_aot_plt_trampoline): Throw a pending loader error
1452         if exists.
1453
1454         * aot-runtime.c (decode_exception_debug_info): Set jinfo->from_llvm for LLVM
1455         compiled methods.
1456
1457         * mini-llvm-cpp.cpp: Remove the unused ctx variable.
1458
1459         * mini-llvm.c (mono_llvm_emit_method): Add some comments about why aot+clauses
1460         is not supported yet.
1461
1462         * unwind.c (DW_EH_PE_absptr): Add more DW_EH_PE_ constants.
1463
1464 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
1465
1466         * method-to-ir.c: All types with variant arguments must fallback to the
1467         slow path. This makes cast of variant delegates work.
1468
1469         * mini-trampolines.c (mono_get_vcall_slot_addr): Add new variance_used out
1470         argument that is set to TRUE is the returned vtable slot is for a variant
1471         interface. Changed a g_print + g_assert_not_reached to a g_error.
1472
1473         * mini-trampilines.c (common_call_trampoline): Handle variant interfaces in
1474         a similar fashion of generic virtual methods.
1475
1476 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
1477
1478         * helpers.c (mono_disassemble_code): Fix a g_hash_table warning
1479         when cfg is null.
1480
1481         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Convert a given
1482         method using a variance aware function.
1483
1484         * mini-x86.c: Add support for dumping IMT thunks if DEBUG_IMT is defined.
1485
1486 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
1487
1488         * method-to-ir.c (mono_method_to_ir): Casts to variant interfaces
1489         do an icall for now.
1490
1491 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
1492
1493         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add an ugly hack to fix #564695.
1494         If LLVM decides to set the code model to Large, reset it to Default.
1495
1496 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
1497
1498         * aot-compiler.c (mono_xdebug_flush): Export it so it is present in
1499         stripped binaries as well.
1500
1501 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
1502
1503         * mini-trampolines.c (common_call_trampoline): Add an rgctx trampoline if a shared
1504         method is called from LLVM compiled code, as that code can't pass an rgctx arg.
1505
1506         * mini-llvm.c (mono_llvm_emit_method): Enable calls to methods needing an rgctx
1507         reg.
1508
1509 2010-01-06  Zoltan Varga  <vargaz@gmail.com>
1510
1511         * mini.c (mini_method_compile): Extract the JIT info creation code into a
1512         separate function.
1513
1514         * mini-llvm.c (mono_llvm_emit_method): Pass the info in MonoExceptionClause
1515         as the type info to llvm.eh.selector.
1516         (exception_cb): Use the type info for filling out some fields of
1517         MonoJitExceptionInfo like the flags and the exception class. This is needed
1518         because the LLVM produced exception handling clauses might not match the original
1519         IL clauses, i.e. there might be more than one LLVM clause for one IL clause.
1520
1521         * unwind.c (mono_unwind_decode_fde): Extract the LSDA decoding code into a
1522         separate function. Add an extra argument which returns the type infos
1523         corresponding to the exception clauses.
1524
1525         * mini.c (mini_method_compile): Enable LLVM compilation of methods having
1526         exception handling clauses.
1527
1528 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
1529
1530         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
1531         mono_method_get_vtable_slot () instead of accessing imt_method->slot directly,
1532         to fix an AOT case.
1533
1534 2010-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1535
1536         * mini.c (mono_compile_is_broken): Skip methods from serialization's
1537         internal assembly.
1538
1539 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
1540
1541         * mini.c (mini_method_compile): Fix a few memory leaks introduced by the
1542         llvm code.
1543
1544 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1545
1546         * mini.c (mini_method_compile): Verify the method before calling
1547         mono_compile_create_vars as this might crash since it uses method
1548         information.
1549
1550         Fixes #560196.
1551
1552 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
1553
1554         * method-to-ir.c (mono_method_to_ir): Avoid calling mono_class_vtable () in
1555         one case if AOTing, since the class might not be a concrete class.
1556
1557 2010-01-03  Zoltan Varga  <vargaz@gmail.com>
1558
1559         * mini-codegen.c abcremoval.c: Remove the duplicate g_slist_append_mempool
1560         functions which are now defined in mempool-internals.h.
1561
1562         * mini.c (mini_free_jit_domain_info): Free the seq point hash tables.
1563
1564         * mini-llvm.c (mono_llvm_emit_method): Handle OP_ABS.
1565
1566 2009-12-30  Rodrigo Kumpera  <rkumpera@novell.com>
1567
1568         * mini.c:
1569         * method-to.ir.c:
1570         * mini-*.c: Properly handle generic enums.
1571
1572         Fixes #566294
1573
1574 2009-12-28  Zoltan Varga  <vargaz@gmail.com>
1575
1576         * method-to-ir.c (mono_method_to_ir): Handle the failure of mono_class_vtable ()
1577         in a few more places.
1578
1579 2009-12-27  Zoltan Varga  <vargaz@gmail.com>
1580
1581         * aot-compiler.c (add_wrappers): Don't use dyn runtime invoke for methods with
1582         nullable parameters. Fixes #567351.
1583
1584 2009-12-26  Rodrigo Kumpera  <rkumpera@novell.com>
1585
1586         * mini-trampolines.c (common_call_trampoline): Add assert for NULL resolved generic method.
1587
1588 2009-12-26  Zoltan Varga  <vargaz@gmail.com>
1589
1590         * mini-trampolines.c: Use mono_arch_get_this_arg_from_call () to avoid the slow
1591         mono_get_generic_context_from_code () call.
1592
1593         * mini-<ARCH>.c: Get rid of mono_arch_find_this_arg (), it is no longer used.
1594
1595 2009-12-25  Zoltan Varga  <vargaz@gmail.com>
1596
1597         * aot-runtime.c (decode_klass_ref): Don't call mono_class_init (), its not
1598         needed.
1599
1600 2009-12-24  Sebastien Pouliot  <sebastien@ximian.com>
1601
1602         * method-to-ir.c (mono_method_to_ir): Avoid SIGSEGV when
1603         mono_method_get_signature returns NULL. Fix #567084
1604
1605 2009-12-25  Zoltan Varga  <vargaz@gmail.com>
1606
1607         * aot-runtime.c (find_extra_method): Call mono_aot_wrapper_name only once,
1608         instead of once for each module.
1609
1610 2009-12-22  Zoltan Varga  <vargaz@gmail.com>
1611
1612         * debugger-agent.c (ss_start): Implement step over for the last sequence
1613         point in methods.
1614
1615         * mini.c (mono_save_seq_point_info): Don't link sequence points which don't
1616         have the STEP_LOC flag set.
1617
1618         * aot-runtime.c (decode_klass_ref): Avoid a crash if a decode_klass_ref () call
1619         fails. Fixes #566689.
1620
1621 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
1622
1623         * mini.c (mono_add_seq_point): New helper function.
1624         (mono_save_seq_point_info): New function to save sequence point info, extracted
1625         from mini_method_compile ().
1626
1627         * mini-<ARCH>.c: Call mono_add_seq_point to remember sequence points.
1628
1629         * mini.h (MonoSeqPointInfo): New structure containing information about
1630         the sequence points of a JITted method.
1631         (MonoBasicBlock): Add 'seq_points' and 'last_seq_point' fields. Remove unused
1632         'bucket' field.
1633
1634         * mini.c debugger-agent.c aot-compiler.c aot-runtime.c: Change the way sequence
1635         point information is stored, use a MonoSeqPointInfo structure instead of a
1636         GPtrArray. For each seq point, compute a list of successor seq points.
1637
1638         * debugger-agent.c: Use the successor list to implement step-over more
1639         efficiently: instead of single stepping until a different line/IL offset is
1640         reached, place breakpoints into all successor seq points.
1641
1642         * mini.h: Bump AOT file format version.
1643
1644 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
1645
1646         * Makefile.am (AM_CFLAGS): Include LLVM_CFLAGS.
1647
1648         * mini-llvm.c: Avoid defining the __STDC_... macros if already defined.
1649
1650 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
1651
1652         * exceptions-ppc.c (mono_ppc_set_func_into_sigctx): Fix the cross-compiler
1653         build.
1654
1655 2009-12-18  Zoltan Varga  <vargaz@gmail.com>
1656
1657         * mini-x86.c (mono_arch_get_argument_info): Allocate memory for CallInfo using
1658         alloca as g_malloc is not signal safe.
1659
1660 2009-12-18  Zoltan Varga  <vargaz@gmail.com>
1661
1662         * tramp-x86.c (mono_arch_patch_callsite): Fix the call to
1663         VALGRIND_DISCARD_TRANSLATIONS.
1664
1665         * *.c: Include mono/utils/memcheck.h, and remove #ifdef HAVE_VALGRIND_MEMCHECK_H
1666         checks, they are no longer needed.
1667
1668         * exceptions-ppc.c (mono_ppc_set_func_into_sigctx): New helper function to set
1669         a function into a sigctx which can handle function pointers.
1670
1671         * mini-ppc.c: Implement soft debugger support on ppc64.
1672
1673         * mini-ppc.c: Implement soft debugger support.
1674
1675 2009-12-17  Zoltan Varga  <vargaz@gmail.com>
1676
1677         * mini-llvm.c: Handle OP_LADD_OVF_UN. Place all alloca's into the entry bb.
1678
1679 2009-12-17  Marek Habersack  <mhabersack@novell.com>
1680
1681         * mini.c (mono_get_runtime_build_info): include Mono version in
1682         the returned value.
1683
1684         * driver.c (mono_main): VERSION is now included in the string
1685         returned from mono_get_runtime_build_info()
1686
1687 2009-12-17  Zoltan Varga  <vargaz@gmail.com>
1688
1689         * method-to-ir.c (mono_method_to_ir): Add support for CALLI with unmanaged
1690         signatures. Fixes #565143.
1691
1692         * jit-icalls.c (mono_get_native_calli_wrapper): New JIT icall.
1693
1694 2009-12-16  Zoltan Varga  <vargaz@gmail.com>
1695
1696         * aot-compiler.c (arch_emit_autoreg): Align code to 4 in the ppc case.
1697
1698 2009-12-16 Rodrigo Kumpera  <rkumpera@novell.com>
1699
1700         * mini-x86.h: Forgot to add a 0x to MONO_ARCH_MAX_FRAME_SIZE define
1701         making max stack 10x smaller.
1702
1703 2009-12-16  Zoltan Varga  <vargaz@gmail.com>
1704
1705         * mini.c (mono_resolve_patch_target): Comment out an assert which could be hit.
1706
1707 2009-12-15 Rodrigo Kumpera  <rkumpera@novell.com>
1708
1709         * method-to-ir.c (mini_emit_memcpy): Assert if size is too big.
1710
1711 2009-12-15 Rodrigo Kumpera  <rkumpera@novell.com>
1712
1713         * mini-x86.c (mono_arch_allocate_vars): Fail compilation if the frame size is
1714         bigger than MONO_ARCH_MAX_FRAME_SIZE.
1715
1716         * mini-x86.c (mono_arch_emit_prolog): Handle huge frames.
1717
1718         * mini-x86.h: Define MONO_ARCH_MAX_FRAME_SIZE to be 1Mb.
1719
1720         * mini-amd64.c / mini-amd64.h: Same fixes as of above.
1721
1722         * mini.c (mini_method_compile): Check if mono_arch_allocate_vars failed
1723         the compilation.
1724
1725 2009-12-14  Miguel de Icaza  <miguel@novell.com>
1726
1727         * method-to-ir.c (mono_method_to_ir): CEE_UNUSUED opcodes now
1728         raise an invalid program exception.   
1729
1730         For other opcodes that we might not handle use a g_warning and
1731         raise the exception.   Beats termination.
1732
1733         Fixes #561724
1734
1735 2009-12-14  Zoltan Varga  <vargaz@gmail.com>
1736
1737         * method-to-ir.c (mono_emit_rgctx_method_call_full): Fix a warning.
1738
1739         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix the LLVM support
1740         by merging the LLVM and !MAP_32BIT cases.
1741
1742 2009-12-13 Jonathan Chambers <joncham@gmail.com>
1743
1744         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Handle a NULL
1745         sigctx being passed in, as we have no CONTEXT available in the APC.
1746
1747         (mono_debugger_agent_cleanup): Use explicit cond wait implementation
1748         for now.
1749
1750         Code contributed under MIT/X11 license.
1751
1752 2009-12-13  Zoltan Varga  <vargaz@gmail.com>
1753
1754         * method-to-ir.c mini-llvm.c: Fix support for monitor enter/exit trampolines
1755         in the LLVM backend on AMD64.
1756
1757         * aot-runtime.c (decode_eh_frame): Initialize the clauses from the info in the
1758         FDE.
1759
1760         * unwind.c (mono_unwind_decode_fde): Implement decoding of a couple more formats.
1761
1762         * mini-llvm.c: Export mono_personality for AOT.
1763
1764         * mini.c (mini_method_compile): Fix some problems with llvm+aot+clauses.
1765
1766         * mini-ops.h (OP_IMPLICIT_EXCEPTION): New opcode marking the place where an
1767         implicit exception can occur.
1768
1769         * ir-emit.h (MONO_EMIT_NEW_IMPLICIT_EXCEPTION): New macro to emit an
1770         OP_IMPLICIT_EXCEPTION instruction.
1771
1772         * ir-emit.h (MONO_EMIT_NEW_CHECK_THIS): New macro.
1773
1774         * method-to-ir.c: Use MONO_EMIT_NEW_CHECK_THIS in a few places.
1775
1776         * mini-llvm.c: Handle OP_IMPLICIT_EXCEPTION by disabling llvm if it occurs
1777         inside a protected block.
1778
1779         * mini-llvm.c: Revert the last change, the signature of monitor entry/exit
1780         trampolines doesn't include the argument.
1781
1782         * mini-llvm.c (mono_llvm_emit_method): Enable calls to monitor entry/exit
1783         trampolines on amd64.
1784
1785         * mini-amd64.h (MONO_ARCH_MONITOR_OBJECT_REG): Use MONO_AMD64_ARG_REG1 instead
1786         of RDI.
1787
1788         * mini.c (mini_method_compile): Add some comments as to why LLVM is currently
1789         disabled for methods with clauses.
1790
1791         * mini-llvm.c: Enable support for catch clauses.
1792
1793         * mini-exceptions.c (mono_resume_unwind): New function to resume unwinding at the
1794         end of an LLVM compiled finally clause.
1795         (mono_handle_exception_internal): Save the exception handling state in TLS
1796         before calling an LLVM compiled finally clause, so mono_resume_unwind () can
1797         resume unwinding from that point.
1798
1799         * unwind.c (mono_unwind_get_ops_from_fde): Rename this to
1800         mono_unwind_decode_fde, decode the Language Specific Data Area (LSDA) too,
1801         to obtain the addresses of the exception handling regions.
1802
1803         * mini-llvm.c: Add beginnings of support for exception handling, currently only
1804         finally clauses are supported.
1805
1806         * mini.c (mini_method_compile): Add support for LLVM code with exception
1807         handlers.
1808
1809 2009-12-12  Zoltan Varga  <vargaz@gmail.com>
1810
1811         * mini-llvm.c (mono_llvm_emit_method): Allocate the 'pindexes' array with the
1812         proper size.
1813
1814 2009-12-12  Zoltan Varga  <vargaz@gmail.com>
1815
1816         * debugger-agent.c: Encode the this argument of vtype methods as a struct, not
1817         as a primitive type.
1818
1819 2009-12-11  Zoltan Varga  <vargaz@gmail.com>
1820
1821         * driver.c: Applied patch from Matt McClellan (matt@mc-c.net). Add a check
1822         for 2 parameter sched_setaffinity in older glibc versions. Fixes
1823         #564000.
1824
1825 2009-12-11  Marek Habersack  <mhabersack@novell.com>
1826
1827         * method-to-ir.c (mini_redirect_call): do not redirect the
1828         InternalAllocateStr internal call if string profiling is enabled.
1829
1830 2009-12-10  Zoltan Varga  <vargaz@gmail.com>
1831
1832         * aot-compiler.c (add_wrappers): Avoid generating synchronized wrappers for
1833         generic methods.
1834
1835         * unwind.h: Rename this to mini-unwind.h to avoid conflicts with the gcc
1836         unwind.h header file.
1837
1838         * tramp-x86.c (mono_arch_patch_callsite): Patch the code when using valgrind,
1839         newer valgrind versions seems to handle this fine.
1840
1841 2009-12-09  Zoltan Varga  <vargaz@gmail.com>
1842
1843         * debugger-agent.c (start_runtime_invoke): Fix a crash if this is called
1844         on the debugger thread.
1845
1846 2009-12-08  Zoltan Varga  <vargaz@gmail.com>
1847
1848         * mini-llvm.c (mono_llvm_emit_method): Add more SIMD opcodes.
1849
1850         * mini.c (mono_print_method_from_ip): Fix the lookup of trampolines.
1851
1852         * mini-codegen.c (mono_local_regalloc): Allow non-call opcodes with cloc:c.
1853
1854         * cpu-<ARCH>.md: Make call_handler clob:c.
1855
1856         * mini.c: Reenable SSA for methods with clauses.
1857
1858         * mini.c (mini_method_compile): Disable SSA for now for methods with clauses,
1859         as it causes failures on x86.
1860
1861 2009-12-08  Sebastien Pouliot  <sebastien@ximian.com>
1862
1863         * driver.c: Fail gracefully with --compile-all if mono_method_signature
1864         returns NULL (e.g. a bad assembly).
1865
1866 2009-12-08  Geoff Norton  <gnorton@novell.com>
1867
1868         * debugger-agent.c:  Refactor the mono_runtime_invoke guarding against
1869         stepping out into native code.  There were issues with nested invokes
1870         like .cctors.
1871
1872 2009-12-07  Zoltan Varga  <vargaz@gmail.com>
1873
1874         * mini.c (mini_method_compile): Do the disable_llvm checks early
1875         and avoid the LLVM compile pass if the checks fail.
1876
1877         * mini.c ssa.c abcremoval.c: Enable SSA for methods with exception clauses.
1878
1879         * mini-llvm.c: Put our methods/globals into the 'llvm.used' array, so the
1880         LLVM optimizations don't try to remove them.
1881
1882         * aot-compiler.c (emit_llvm_file): Save the result of opt into a
1883         different file so the original remains.
1884
1885 2009-12-06  Zoltan Varga  <vargaz@gmail.com>
1886
1887         * mini-llvm.c mini.c: Fix alignment issues with SIMD vars.
1888
1889         * aot-runtime.c (decode_arm_exidx): Handle most descriptors created by gas.
1890
1891         * aot-runtime.c (decode_arm_exidx): Refactor this into two functions, add
1892         support for non-inline unwind descriptors.
1893
1894 2009-12-07  Geoff Norton  <gnorton@novell.com>
1895
1896         * debugger-agent.c:  Darwin can colesce signals, so we need to handle
1897         the interrupt_count slightly differently.  Native threads were never
1898         marked as resumed.
1899
1900 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
1901
1902         * aot-runtime.c (decode_arm_exidx): New function to initialize a MonoJitInfo
1903         based on the contents of the ARM .exidx section. Not yet used since llvm doesn't
1904         yet generate this info.
1905
1906         * mini-llvm.c: Fix the conversion of call results if they are unsigned.
1907
1908         * debugger-agent.c (buffer_add_value): Treat I/U as a valuetype, so the
1909         client can distinguish between intptrs and longs.
1910
1911 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
1912
1913         * aot-compiler.c (emit_trampoline): Emit the trampoline info into the global
1914         blob.
1915
1916         * aot-runtime.c (load_function): Update after the change above.
1917
1918         * mini.h: Bump AOT file format version.
1919
1920         * method-to-ir.c (mono_method_to_ir): Disallow the delegate optimization
1921         if the delegate class is dynamic.
1922
1923         * method-to-ir.c (handle_delegate_ctor): Allow the method_code optimization
1924         in gshared code too using the new rgctx info type
1925         MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
1926
1927 2009-12-04  Geoff Norton  <gnorton@novell.com>
1928
1929         * debugger-agent.c: When doing a func-eval invoke on a suspended runtime,
1930         we need to track the original suspend count so the thread properly
1931         wakes up in resume_thread.
1932
1933 2009-12-04  Zoltan Varga  <vargaz@gmail.com>
1934
1935         * method-to-ir.c (handle_delegate_ctor): Add support for using this from gshared
1936         code.
1937
1938         * generics.cs: Add a test.
1939
1940         * method-to-ir.c (emit_get_rgctx_method): Make this work even if context_used
1941         is 0. Simplify a lot of code using this.
1942
1943         * mini-trampolines.c (mono_delegate_trampoline): Call
1944         mono_create_static_rgctx_trampoline () before saving the final address in
1945         delegate->method_code, to avoid calling it each time a delegate is first called.
1946
1947         * method-to-ir.c (mono_method_to_ir): Allow fast delegate creation for methods
1948         which need static rgctx trampolines.
1949
1950         * mini-trampolines.c (mono_create_static_rgctx_trampoline): Use a cache
1951         keyed on the method+addr pair, since addr could be either the method addr or
1952         an unbox trampoline in the AOT case. Fixes #560246.
1953
1954 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
1955
1956         * mini.c (mini_method_compile): Call handle_exception_clauses () in the same
1957         place it was called before too.
1958
1959 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
1960
1961         * mini.c (mono_jit_runtime_invoke): Avoid the call to mono_class_setup_vtable ()
1962         if no security manager is present, to speed up the AOT case. Call
1963         mono_class_vtable () full with raise_on_error == TRUE instead.
1964
1965 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
1966
1967         * mini.c (mini_method_compile): Call handle_exception_clauses earlier so
1968         the local optimization passes can take its result into account. Fixes
1969         #559876.
1970
1971         * exceptions.cs: Add a test.
1972
1973 2009-01-24  Steven Munroe  <munroesj@us.ibm.com>
1974
1975         This patch is contributed under the terms of the MIT/X11 license
1976
1977         * cpu-ppc64.md (load_memindex): Add loadi8_memindex.
1978
1979 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
1980
1981         * mini.h (MonoInst): Remove unused 'ssa_op' field.
1982
1983         * debugger-agent.c: Rework the handling of stack traces of running threads to
1984         avoid crashes if compute_frames () tries to walk the stack of running thread.
1985
1986         * mini.c (mono_print_method_from_ip): Use mini_jit_info_table_find.
1987
1988         * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): Set frame->lmf.
1989
1990         * mini.h (StackFrameInfo): Add an 'lmf' field.
1991
1992 2009-12-02  Zoltan Varga  <vargaz@gmail.com>
1993
1994         * debugger-agent.c (suspend_current): Always set really_suspended.
1995
1996         * debugger-agent.c (clear_event_request): Clear method entry/exit requests too.
1997
1998         * exceptions-x86.c (mono_arch_get_restore_context): Restore EAX too.
1999
2000 2009-12-01  Zoltan Varga  <vargaz@gmail.com>
2001
2002         * debugger-agent.c (vm_commands): Don't allow invokes on threads which are not
2003         really suspended.
2004
2005 2009-12-01  Zoltan Varga  <vargaz@gmail.com>
2006
2007         * cpu-ppc64.md (store_memindex): Add storei8_memindex.
2008
2009 2009-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
2010
2011         * mini-trampolines.c: Fix MSVC build.
2012
2013 2009-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
2014
2015         * mini-trampolines.c: Check for mono_method_get_vtable_slot failures.
2016
2017 2009-11-30  Zoltan Varga  <vargaz@gmail.com>
2018
2019         * mini-arm.c (mono_arch_lowering_pass): Fix an assert which is hit when
2020         the instruction following an OP_FCOMPARE is optimized away.
2021
2022 2009-11-30  Zoltan Varga  <vargaz@gmail.com>
2023
2024         * aot-compiler.c (arch_emit_autoreg): Extract the auto-registration code from
2025         emit_autoreg () into this arch-specific function.
2026
2027         * aot-compiler.c (emit_exception_debug_info): Don't emit the length of the
2028         code, it is no longer needed.
2029
2030         * aot-runtime.c (decode_exception_debug_info): Don't read the code length.
2031
2032         * mini.h: Bump AOT file format version.
2033
2034         * aot-runtime.c (mono_aot_find_jit_info): Compute the length of the method
2035         using the sorted_code_offsets array, instead of reading it from the
2036         exception debug info.
2037         (load_method): Call mono_aot_find_jit_info instead of
2038         decode_exception_debug_info ().
2039
2040         * aot-compiler.c (emit_exception_debug_info): Emit whenever the method was
2041         LLVM compiled as a flag.
2042
2043 2009-11-29  Zoltan Varga  <vargaz@gmail.com>
2044
2045         * debugger-agent.c (resume_thread): Fix a warning.
2046
2047         * aot-compiler.c: Add an option to set the number of static rgctx trampolines
2048         generated.
2049
2050 2009-11-28  Zoltan Varga  <vargaz@gmail.com>
2051
2052         * aot-compiler.c aot-runtime.c: Get rid of a few global symbols, move their
2053         contents to MonoAotFileInfo.
2054
2055 2009-11-27  Zoltan Varga  <vargaz@gmail.com>
2056
2057         * aot-compiler.c aot-runtime.c: Reorganize the AOT file format once again.
2058         Put all binary data into a giant blob, similarly to the way .net assemblies
2059         store binary data. Emit offset tables in a compact form to reduce their size.
2060
2061         * mini.h: Bump AOT file format version.
2062
2063         * aot-compiler.c (emit_globals_table): Use temp_prefix instead of .L in a few
2064         places.
2065
2066         * aot-compiler.c (emit_globals_table): Emit a hash table for the globals, to
2067         avoid linear searches at runtime.
2068
2069         * aot-runtime.c (find_symbol): Update this to use the hash.
2070
2071         * mini.h: Bump AOT file format version.
2072
2073 2009-11-26  Zoltan Varga  <vargaz@gmail.com>
2074
2075         * aot-compiler.c (emit_klass_info): Save whenever the class has a generic
2076         container.
2077
2078         * aot-runtime.c (decode_cached_class_info): Set the is_generic_container field
2079         too.
2080
2081         * aot-compiler.c (mono_compile_assembly): Add a 'stats' option to print out
2082         the distribution of got slot types.
2083
2084         * mini.h (MonoDebugOptions): Add 'explicit_null_checks' option.
2085
2086         * method-to-ir.c: Add support for generating explicit null checks.
2087
2088 2009-11-25  Zoltan Varga  <vargaz@gmail.com>
2089
2090         * debugger-agent.c (vm_commands): Implement EXIT by invoking Environment.Exit ()
2091         on a random thread if possible.
2092
2093         * aot-runtime.c (mono_aot_plt_resolve): Clean up the handling of function
2094         descriptors a bit, add comments, handle RGCTX_FETCH/GENERIC_CLASS_INIT_TRAMPOLINE
2095         correctly.
2096
2097         * exceptions-ppc.c (mono_arch_find_jit_info_ext): Use mgreg_t as the type of
2098         regs. Pass the real size of the regs array to mono_unwind_frame ().
2099
2100         * unwind.c (mono_unwind_frame): Remove an incorrect assert, add more correct
2101         ones instead.
2102
2103 2009-11-24  Geoff Norton  <gnorton@novell.com>
2104
2105         * mini-darwin.c: Work around apple bug rdar://7209349  See
2106         http://openradar.appspot.com/7209349 for details.  Synopsis,
2107         CoreFoundation SIGTRAP's if you dlopen it off the main thread if its
2108         never been initialized before.
2109
2110 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
2111
2112         * tramp-arm.c: Use blx instead of mov pc, reg to improve support for thumb.
2113
2114         * mini-arm.c (mono_arm_thumb_supported): New helper function.
2115
2116 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
2117
2118         * cfold.c (mono_constant_fold_ins): Fix a problem in the previous change,
2119         OP_SHL_IMM is not 32 bit.
2120
2121 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
2122
2123         * aot-compiler.c (encode_patch): Fix the encoding of R8 on big-endian systems.
2124
2125 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
2126
2127         * aot-compiler.c: Avoid infinite recursion when generic virtual recursion is
2128         encountered.
2129
2130         * debugger-agent.c (resume_vm): Signal the suspend_cond even if suspend_count
2131         > 0 since some threads can resume if their resume_count is > 0.
2132         (invoke_method): Avoid reading freed memory.
2133
2134         * debugger-agent.c (process_suspend): Extract the suspend code from
2135         process_single_step_inner () to a separate function. Rework the code to prevent
2136         races between this function and thread interrupts.
2137
2138         * debugger-agent.c (suspend_current): Check the resume_count field instead
2139         of resume_one so suspends+resumes during single threaded invokes work
2140         correctly.
2141
2142 2009-11-23  Zoltan Varga  <vargaz@gmail.com>
2143
2144         * aot-compiler.c (emit_llvm_file): Enable some llvm optimizations which seem
2145         to make the generated code smaller.
2146
2147         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Add a code
2148         sequence generated by recent LLVM versions.
2149
2150         * mini-llvm.c: Add support for a few simple cases which weren't supported
2151         before.
2152
2153         * mini-trampolines.c (mono_magic_trampoline): Don't call
2154         mono_arch_get_vcall_slot () when llvm is enabled.
2155
2156         * aot-compiler.c (emit_llvm_file): Add code to run the 'opt' llvm tool.
2157
2158         * mini-trampolines.c (mono_magic_trampoline): Extract the bulk of this function
2159         into a new function called common_call_trampoline () which is used by the
2160         llvm vcall trampoline as well.
2161
2162         * debugger-agent.c: Implement single threaded invokes.
2163
2164         * debugger-agent.c: Revert change which broke the agent on linux.
2165
2166         * method-to-ir.c (inline_method): Prevent infinite recursion. Fixes
2167         #557606.
2168
2169         * generics.cs: Add a test.
2170
2171 2009-11-22  Zoltan Varga  <vargaz@gmail.com>
2172
2173         * debugger-agent.c: Fix the cygwin build.
2174
2175 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
2176
2177         * cprop.c: Remove this unused file.
2178
2179 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
2180
2181         * cfold.c (mono_constant_fold_ins): Fix constant folding of shr_imm. Fixes
2182         #557262.
2183
2184         * basic.cs: Add a test.
2185
2186 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
2187
2188         * method-to-ir.c (mono_method_to_ir): Use mono_use_llvm instead of ENABLE_LLVM
2189         in one more place.
2190
2191 2009-11-20  Zoltan Varga  <vargaz@gmail.com>
2192
2193         * mini.c mini-trampolines.c driver.c: Add a 'mono_use_llvm' flag to control
2194         whenever the runtime uses LLVM code. Add a '--llvm' command line option to set
2195         it. Use this flag to control llvm related code paths instead of #ifdef
2196         ENABLE_LLVM, so a runtime configured without --enable-llvm can use LLVM compiled
2197         AOT code.
2198
2199         * aot-runtime.c aot-compiler.c: Add a 'flag' field to MonoAotFileInfo.
2200
2201         * mini.h: Bump AOT file format version.
2202
2203         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline_full): These
2204         receive their argument in MONO_ARCH_VTABLE_REG, not in the first argument reg.
2205
2206         * debugger-agent.c (create_event_list): Fix a crash if an empty assembly list
2207         was used as an assembly filter.
2208
2209 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
2210
2211         * unwind.c: Fix support for ppc.
2212
2213         * exceptions-ppc.c (mono_arch_find_jit_info): Change this to use dwarf frame
2214         unwind info. Change to the mono_arch_find_jit_info_ext () interface.
2215
2216 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
2217
2218         * mini-ppc.c (mono_arch_emit_prolog): Fix a copy-paste error to fix the ppc64
2219         port.
2220         (mono_arch_cpu_init): Don't set cpu_hw_flags to 0 at the end, this was somehow
2221         added by the ps3 changes.
2222
2223 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
2224
2225         * mini-gc.c: Resurrect this, so at least it compiles.
2226
2227         * debugger-agent.c (assembly_commands): Implement GET_NAME command.
2228
2229 2009-11-18  Zoltan Varga  <vargaz@gmail.com>
2230
2231         * debugger-agent.c (mono_debugger_agent_handle_exception): Pass a MonoJitInfo to
2232         create_event_list () so assembly filters can be used.
2233
2234         * exceptions-ppc.c (mono_arch_find_jit_info): Fix the restoration of registers
2235         from the LMF.
2236
2237 2009-11-17  Zoltan Varga  <vargaz@gmail.com>
2238
2239         * debugger-agent.c (mono_debugger_agent_breakpoint_hit): Fix a warning.
2240         (mono_debugger_agent_thread_interrupt): Make this return FALSE if the agent
2241         is disabled.
2242
2243         * aot-compiler.c (add_generic_instances): Emit instances of common generic
2244         classes for char/bool too.
2245
2246         * debugger-agent.c (DebuggerTlsData): Honor the DISABLE_SOFT_DEBUG option.
2247
2248         * debugger-agent.c (DebuggerTlsData): Add a 'really_suspended' flag, not yet
2249         used.
2250
2251         * debugger-agent.c: Add some definitions to make backporting to 2.6 easier.
2252         Fix warnings.
2253
2254 2009-11-15  Andreas Faerber  <andreas.faerber@web.de>
2255
2256         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Signature fix.
2257         
2258         Code contributed under MIT/X11 license.
2259
2260 2009-11-14  Zoltan Varga  <vargaz@gmail.com>
2261
2262         (mono_debugger_agent_thread_interrupt): Save the context so stacktraces for
2263         threads in native code work.
2264
2265         * debugger-agent.c: Pass the 'flags' argument to VM_INVOKE_METHOD earlier in
2266         the parameter list, so it can be acted upon by vm_commands (). Bump protocol
2267         version.
2268
2269 2009-11-13 Jonathan Chambers <joncham@gmail.com>
2270
2271         * debugger-agent.c: Implementation for Windows platform.
2272
2273         * mini-x86.c: Add support for Windows. Use mono-* synchronization
2274         primitives. Use SEH to implement breakpoints and single stepping.
2275
2276         * mini-x86.h: Enable soft debugger on Windows.
2277
2278         Code contributed under MIT/X11 license.
2279
2280 2009-11-13  Zoltan Varga  <vargaz@gmail.com>
2281
2282         * mini-amd64.c (emit_call_body): Disable usage of near calls when running
2283         under XEN. Fixes #522894.
2284
2285         * patch-info.h: Add LLVM_IMT_TRAMPOLINE.
2286
2287         * mini-llvm.c aot-compiler.c aot-runtime.c mini.c: Add support for making
2288         interface calls in LLVM AOT code.
2289
2290         * aot-compiler.c mini-llvm.c: Abort llvm compilation if a non-encodable patch
2291         is found.
2292
2293         * mini-llvm.c: Add support for OP_VPHI.
2294
2295         * objects.cs: Add a test.
2296
2297 2009-11-13  Zoltan Varga  <vargaz@gmail.com>
2298
2299         * debugger-agent.c (mono_debugger_agent_single_step_event): Avoid a crash if
2300         this is called on the debugger thread.
2301
2302 2009-11-12  Zoltan Varga  <vargaz@gmail.com>
2303
2304         * mini-llvm.c: Add soft-float support.
2305
2306         * method-to-ir.c (mono_decompose_soft_float): Restart after decomposing an
2307         FCALL which returns an R4.
2308
2309         * driver.c (mono_main): Add a missing '\n'.
2310
2311         * mini-trampolines.c (mono_create_llvm_imt_trampoline): Fix the build on
2312         platforms which doesn't support the LLVM IMT trampoline.
2313
2314 2009-11-11  Zoltan Varga  <vargaz@gmail.com>
2315
2316         * mini-llvm.c (mono_llvm_emit_method): Fix LOCALLOC.
2317
2318         * mini-llvm-cpp.cpp: Update to latest LLVM SVN.
2319
2320         * mini-llvm.c (mono_llvm_emit_method): Avoid creating plt entries for
2321         virtual calls.
2322
2323         * aot-runtime.c: Don't define HAVE_DL_ITERATE_PHDR, configure now does that.
2324
2325 2009-11-10  Zoltan Varga  <vargaz@gmail.com>
2326
2327         * aot-compiler.c aot-runtime.c: Change how mono_arch_find_jit_info () works.
2328         Instead of emitting a method_order table, sort the contents of the code_offsets
2329         table and do a binary search in the sorted table. The previous approach doesn't
2330         work with LLVM which emits methods in a arbitrary order.
2331
2332         * aot-runtime.c: Add support for creating MonoJitInfo structures by searching
2333         in the .eh_frame section in ELF files.
2334
2335         * mini.h: Bump corlib file format version.
2336
2337         * mini-llvm.c aot-compiler.c: Add support for AOT to the LLVM back end.
2338
2339         * exceptions-arm.c (mono_arch_get_call_filter_full): Update after the
2340         LDMIA->LDM macro name change.
2341
2342 2009-11-09  Zoltan Varga  <vargaz@gmail.com>
2343
2344         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Fix and enable this for
2345         x86.
2346
2347         * mini-llvm-cpp.cpp (JITMemoryManager): Fix compilation with LLVM 2.7
2348         SVN.
2349
2350         * aot-compiler.c: Ditto.
2351
2352         * mini-arm.c (mono_arch_allocate_vars): Fix the previous change by passing
2353         &align to mini_type_stack_size_full ().
2354
2355         * mini-arm.c (mono_arch_emit_prolog): Implement support for varargs.
2356
2357         * mini-ops.h: Add documentation for the OP_ARGLIST opcode.
2358
2359 2009-11-08  Zoltan Varga  <vargaz@gmail.com>
2360
2361         * mini-arm.c: Compute the stack space used by arguments using
2362         mini_type_stack_size_full ().
2363
2364 2009-11-08  Zoltan Varga  <vargaz@gmail.com>
2365
2366         * optflags-def.h: Remove dead TREEPROP optimization.
2367
2368 2009-11-08  Rodrigo Kumpera  <rkumpera@novell.com>
2369
2370         * mini-ppc.h: Make mono compiler under FreeBSD/ppc64. 
2371
2372         Patch by Justin Hibbits <chmeeedalf@gmail.com>.
2373
2374 2009-11-07  Zoltan Varga  <vargaz@gmail.com>
2375
2376         * driver.c (mono_jit_parse_options): New public API function to parse options
2377         as done by the runtime executable.
2378
2379         * debugger-agent.c (buffer_add_cattrs): Fix reading an uninitialized variable
2380         when handling named arguments.
2381
2382 2009-11-07  Zoltan Varga  <vargaz@gmail.com>
2383
2384         * mini-arm.c: Implement support for returning vtypes in registers, fix support
2385         for passing small vtypes in registers, make the CallInfo structures more
2386         similar to the code on the other platforms.
2387
2388         * mini-arm.c (mono_arch_allocate_vars): Align small vtypes to 4 bytes too since
2389         the code in the prolog requires it.
2390
2391 2009-11-06  Zoltan Varga  <vargaz@gmail.com>
2392
2393         * mini-arm.c debugger-agent.c: Android changes from Koushik K. Dutta
2394         (koush@koushikdutta.com).
2395
2396         * mini-arm.c (handle_thunk): Add a domain argument to control the domain
2397         where the thunk memory should be allocated from. Fixes appdomain unloading
2398         on arm.
2399
2400 2009-11-06  Zoltan Varga  <vargaz@gmail.com>
2401
2402         * mini-arm.c exceptions-arm.c: Make ctx->regs map directly to the 16 hardware
2403         registers, instead of r4..r11,ip,lr. Make restore_context () restore r0..r3 too.
2404
2405 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
2406
2407         * mini-amd64.c (mono_arch_output_basic_block): Don't allow OP_SEQ_POINT in
2408         AOT, as it is not implemented yet.
2409
2410         * mini-x86.c (mono_arch_output_basic_block): Ditto.
2411
2412 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2413
2414         * debugger-agent.c: Fix windows build.
2415
2416 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
2417
2418         * debugger-agent.c (debugger_thread): Call mono_set_is_debugger_attached ()
2419         after the client connects/disconnects.
2420
2421         * debugger-agent.c: Add an 'onthrow' option to start the debugger agent
2422         when an exception of a given type is thrown.
2423
2424         * debugger-agent.c: Add a 'onuncaught' option to start the debugger agent
2425         only on an uncaught exception.
2426
2427         * mini-exceptions.c: Notify the debugger agent on an uncaught exception.
2428
2429         * debugger-agent.c: Add a 'launch' option.
2430
2431 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
2432
2433         * debugger-agent.c: Add a 'timeout' option.
2434
2435 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
2436
2437         * debugger-agent.c: Implement the 'server' and 'suspend' options supported by
2438         the JDWP agent.
2439
2440 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
2441
2442         * debugger-agent.c (set_breakpoint): Emit a log message.
2443
2444 2009-11-04  Zoltan Varga  <vargaz@gmail.com>
2445
2446         * mini-arm.c: Fix the arm build.
2447
2448 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
2449
2450         * aot-compiler.c: don't leak the value returned from
2451         mono_type_full_name().
2452
2453 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
2454
2455         * debugger-agent.c: defer including mono-mutex.h until we know the
2456         agent is supported.
2457
2458 2009-11-04 Jonathan Chambers <joncham@gmail.com>
2459
2460         * debugger-agent.c: Changes to build on windows. Use mono-mutex instead
2461         of pthreads directly.
2462
2463         * mini.c (mono_sigfpe_signal_handler): Changed signature of Windows
2464         exception handlers. Pass info argument.
2465
2466         * mini.h: Adjust signatures of soft debugger functions to pass void*
2467         instead of siginfo_t. Adjust SIG_HANDLER_SIGNATURE on Windows.
2468
2469         * mini-amd64.c (mono_arch_is_single_step_event): Adjust signature to pass void*
2470         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
2471         (mono_arch_is_breakpoint_event): Adjust signature to pass void*
2472         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
2473
2474         * mini-amd64.h: Adjust MonoW32ExceptionHandler signature.
2475
2476         * mini-x86.c (mono_arch_is_single_step_event): Adjust signature to pass void*
2477         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
2478         (mono_arch_is_breakpoint_event): Adjust signature to pass void*
2479         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
2480
2481         * mini-x86.h: Adjust MonoW32ExceptionHandler signature.
2482
2483         * exceptions-x86.c: Adjust W32_SEH_HANDLE_EX for new signature.
2484
2485         * exceptions-amd64.c: Adjust W32_SEH_HANDLE_EX for new signature.
2486
2487         * mono-semaphore.h: Skeleton implementation for Windows.
2488
2489         Code contributed under MIT/X11 license.
2490
2491 2009-11-04 Jonathan Chambers <joncham@gmail.com>
2492
2493         * simd-intrinsics.c (simd_intrinsic_emit_setter): Unfix my fix.
2494
2495         Code contributed under MIT/X11 license.
2496
2497 2009-11-04 Jonathan Chambers <joncham@gmail.com>
2498
2499         * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix windows build.
2500
2501         Code contributed under MIT/X11 license.
2502
2503 2009-11-04  Zoltan Varga  <vargaz@gmail.com>
2504
2505         * aot-compiler.c (mono_save_xdebug_info): Bump the threshold for flushing
2506         debug info to 100 because 10 still slows down gdb too much.
2507
2508         * method-to-ir.c (mono_method_to_ir): Avoid rethrowing thread abort exceptions
2509         inside runtime invoke wrappers. This avoids the need to call ResetAbort () on
2510         them in the wrappers.
2511
2512 2009-11-03  Zoltan Varga  <vargaz@gmail.com>
2513
2514         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
2515
2516         * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix a warning.
2517
2518         * aot-runtime.c (mono_aot_get_method): Refactor some code into a new helper
2519         function mono_aot_get_array_helper_from_wrapper ().
2520
2521         * aot-compiler.c (add_generic_class): Refactor the code a bit, really emit
2522         array helper methods.
2523
2524 2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2525
2526         * simd-intrinsics.c (load_simd_vreg): Add extra argument to signal if
2527         the value was loaded from memory.
2528
2529         * simd-intrinsics.c (simd_intrinsic_emit_setter): Store back to memory if
2530         the value was loader from there.
2531
2532         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Fail correctly for Shuffle
2533         without constant swizzle.
2534
2535 2009-11-02 Jonathan Chambers <joncham@gmail.com>
2536
2537         * mini-amd64.c: Put soft debugger functions behind a
2538         #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
2539
2540         * mini-amd64.h: disable the soft debugger in windows.
2541
2542         Code contributed under MIT/X11 license.
2543
2544 2009-11-02 Jonathan Chambers <joncham@gmail.com>
2545
2546         * mini-x86.c: Put soft debugger functions behind a
2547         #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
2548
2549         Code contributed under MIT/X11 license.
2550
2551 2009-11-02 Jonathan Chambers <joncham@gmail.com>
2552
2553         * exceptions-x86.c (win32_handle_stack_overflow): Fix parameters
2554         to mono_arch_find_jit_info_ext.
2555
2556         Code contributed under MIT/X11 license.
2557
2558 2009-11-03  Zoltan Varga  <vargaz@gmail.com>
2559
2560         * debugger-agent.c: Include netinet/in.h to fix the bsd build.
2561
2562         * debugger-agent.c: Add support for filtering events by assemblies.
2563
2564         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Return false if
2565         the agent is not enabled.
2566
2567 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2568
2569         * exceptions-x86.c: hopefully last change to fix the windows build.
2570         This one courtesy of Jonathan Chambers.
2571
2572 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2573
2574         * debugger-agent.c: remove unused function.
2575
2576 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2577
2578         * debugger-agent.c: add #ifdefs for a few header files.
2579         * mini-x86.h: disable the soft debugger in windows.
2580         Step 1 of 2 to make this compile on windows with gcc.
2581
2582 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
2583
2584         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Comment this out for now
2585         as it breaks the build.
2586
2587 2009-07-01  Zoltan Varga  <vargaz@gmail.com>
2588
2589         Merge the soft debugger branch.
2590
2591         * debugger-agent.h debugger-agent.c: New files containing the soft
2592         mode debugger module.
2593
2594         * method-to-ir.c (mono_method_to_ir): Generate OP_SEQ_POINT opcodes
2595         at the appropriate locations.
2596
2597         * mini-<ARCH>.c (mono_arch_output_basic_block): Handle OP_SEQ_POINT
2598         opcode.
2599
2600         * mini-<ARCH>.c: Add new arch-specific functions to set/clear breakpoints,
2601         enable/disable single stepping.
2602
2603         * exceptions-<ARCH>.c (mono_arch_find_jit_info_ext): New stack unwinding api
2604         which returns all information in a StackFrameInfo structure, and can handle the
2605         LMF frames added by the debugger.
2606
2607         * mini-<ARCH>.h (MonoLMFExt): New structure containing additional information
2608         about an LMF frame.
2609
2610         * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): New stack
2611         walker function which works on a specific thread and passes a StackFrameInfo
2612         structure to its callback.
2613
2614         * mini.c (mini_init): Initialize the debugger agent.
2615
2616         * aot-compiler.c aot-runtime.c: Add soft-debug support.
2617
2618         * mini-ops.h: Add OP_SEQ_POINT opcode.
2619
2620         * driver.c (mono_main): Add new '--debugger-agent' option for passing
2621         arguments to the debugger agent.
2622
2623 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
2624
2625         * mini.c (mini_method_compile): Disable llvm for methods with an lmf here to
2626         speed things up.
2627
2628         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOCALLOC.
2629
2630         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Implement this for x86.
2631
2632         * mini.c (mini_init): Avoid using the IMT trampoline in the LLVM case.
2633
2634         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add a static rgctx trampoline
2635         if needed.
2636         (mono_create_llvm_imt_trampoline): New function to create a trampoline which
2637         sets the IMT argument and makes a virtual call.
2638
2639         * mini-llvm.c: Enable interface calls using the llvm imt trampoline.
2640
2641 2009-11-01  Zoltan Varga  <vargaz@gmail.com>
2642
2643         * Makefile.am (llvm_sources): Enable the llvm option since it no longer breaks
2644         the windows build.
2645
2646 2009-10-30  Zoltan Varga  <vargaz@gmail.com>
2647
2648         * mini.c (mini_cleanup): Call profiler shutdown before shutting down the
2649         runtime. Fixes #551228.
2650
2651 2009-10-29  Zoltan Varga  <vargaz@gmail.com>
2652
2653         * mini-x86.c (mono_arch_output_basic_block): Fix % 1. Fixes #550970.
2654
2655         * basic.cs: Add a test.
2656
2657         * method-to-ir.c (mono_method_to_ir): Use EMIT_NEW_LOAD_MEMBASE_TYPE to
2658         load vtypes instead if OP_LOADV_MEMBASE in the implementation of
2659         CONSTRAINED. Fixes #550964.
2660
2661         * generics.cs: Add a test.
2662
2663 2009-10-28  Mark Probst  <mark.probst@gmail.com>
2664
2665         * mini-posix.c (add_signal_handler): Use
2666         mono_gc_get_suspend_signal() instead of GC_get_suspend_signal().
2667
2668 2009-10-28 Jerry Maine <crashfourit@gmail.com>
2669
2670         Contributed under the terms of the MIT/X11 license by
2671         Jerry Maine <crashfourit@gail.com>.
2672
2673         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
2674         sse4a for simd intrinsics.
2675
2676         * mini-amd64.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
2677         sse4a for simd intrinsics.
2678
2679 2009-10-27  Zoltan Varga  <vargaz@gmail.com>
2680
2681         * ir-emit.h method-to-ir.c: Change a few _IMM macros to assign to inst_imm
2682         instead of inst_p1 which is not the same on ILP32 platforms.
2683
2684 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
2685
2686         * mini-ppc.c (mono_arch_emit_prolog): Load the current got address,
2687         not the mscorlib one before calling mono_get_lmf_addr.
2688
2689         * tramp-ppc.c (mono_arch_create_trampoline_code_full): Fix the storing
2690         of the ip to the LMF.
2691
2692         * method-to-ir.c (mono_method_to_ir): Fix the handling of the
2693         immediate in the op->op_imm optimization.
2694
2695         * mini-ppc.c: Add a 'vtregs' field to ArgInfo to make the code easier to
2696         understand. VTypes now work, but are not abi compliant, as they are
2697         split into 4 byte parts instead of 8.
2698         (emit_memcpy): Fix the unrolled case to work on the PS3.
2699
2700         * mini-ppc.c (get_delegate_invoke_impl): Fix this for the PS3.
2701
2702         * aot-compiler.c (mono_compile_assembly): Make the autoreg option
2703         the default when static linking.
2704
2705         * mini-ppc.c (mono_arch_emit_prolog): Fix handling of I8 arguments.
2706
2707         * aot-compiler.c: Add an autoreg option to automatically register
2708         statically linked aot modules using ELF .ctors.
2709
2710         * genmdesc.pl: Add __ppc64__ to allowed defines.
2711
2712 2009-10-25  Zoltan Varga  <vargaz@gmail.com>
2713
2714         * mini-posix.c (add_signal_handler): Delay the GC suspend signal while
2715         executing a SIGSEGV handler on an altstack, since libgc can't handle that.
2716
2717 2009-10-24  Mark Probst  <mark.probst@gmail.com>
2718
2719         * exceptions-x86.c (mono_arch_find_jit_info): Fix build.
2720
2721 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
2722
2723         * mini-exceptions.c (mini_jit_info_table_find): Add an 'out_domain' argument
2724         which will contain the domain where the method was found.
2725
2726         * exceptions-<ARCH>.c mini-exceptions.c: Update callers of
2727         mini_jit_info_table_find ().
2728
2729         * aot-compiler.c (xdebug_end_emit): Remove so stray debug code.
2730
2731         * branch-opts.c (mono_if_conversion): Avoid running deadce if it is disabled.
2732
2733 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
2734
2735         * mini-x86.c (mono_arch_emit_prolog): Disable aot for methods with save_lmf
2736         set, its not supported yet.
2737
2738 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
2739
2740         * aot-runtime.c (mono_aot_get_method): Avoid asserting if a array generic
2741         iface wrapper is not found.
2742         (mono_aot_get_method): Ditto for GetGenericValueImpl.
2743
2744 2009-10-21  Zoltan Varga  <vargaz@gmail.com>
2745
2746         * aot-runtime.c (mono_aot_get_method): Fix support for the IList<T> wrappers,
2747         which have a different name.
2748
2749         * aot-runtime.c (mono_aot_get_method): Special case the array generic iface
2750         wrappers and Array.GetGenericValueImpl ().
2751
2752         * aot-compiler.c: Avoid emitting some wrappers which are not needed anymore
2753         because of the change above.
2754
2755         * generics.cs: Add a test for full aot + generic array ifaces.
2756
2757 2009-10-19  Sebastien Pouliot  <sebastien@ximian.com>
2758
2759         * aot-compiler.c (emit_plt): Remove duplicate 'debug_sym' variable 
2760         that hides the previous one.
2761
2762 2009-10-18  Zoltan Varga  <vargaz@gmail.com>
2763
2764         * aot-compiler.c (can_marshal_struct): Allow some System.dll structs to be
2765         marshalled. Fixes #541623.
2766
2767 2009-10-16  Zoltan Varga  <vargaz@gmail.com>
2768
2769         * aot-compiler.c (emit_extra_methods): Remove some asserts which are not needed.
2770
2771 2009-10-15  Zoltan Varga  <vargaz@gmail.com>
2772
2773         * mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.
2774
2775 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
2776
2777         * mini-posix.c (sigprof_signal_handler):
2778         Implemented support for building stat call chans in different ways.
2779
2780 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
2781
2782         * mini-exceptions.c (mono_find_jit_info):
2783         Also check that a jit info has been found (fixes a profiler crash).
2784
2785 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
2786
2787         * mini.c (mono_codegen):
2788         Call mono_profiler_code_buffer_new with correct code address.
2789
2790 2009-10-14  Zoltan Varga  <vargaz@gmail.com>
2791
2792         * driver.c (mono_main): Change the date in the copyright.
2793
2794 2009-10-14  Mark Probst  <mark.probst@gmail.com>
2795
2796         * method-to-ir.c (mono_method_to_ir): Don't use a managed array
2797         allocator in shared generic code for open classes, because we
2798         can't get those classes' vtables.  We need to make managed
2799         allocators not depend on the vtable at compile-time to solve this.
2800
2801 2009-10-13  Martin Baulig  <martin@ximian.com>
2802
2803         * debug-mini.c (mono_debugger_trampoline_compiled): Add
2804         `const guint8 *trampoline' argument; send both the old and the new
2805         notification.
2806
2807 2009-09-30  Zoltan Varga  <vargaz@gmail.com>
2808
2809         * aot-compiler.c (add_wrappers): Add a runtime invoke wrapper which is used by
2810         mono_runtime_capture_context () without calling mono_runtime_invoke ().
2811         (can_marshal_struct): Skip structures with auto layout.
2812
2813         * tramp-arm.c (GEN_TRAMP_SIZE): Increase this by 4.
2814
2815 2009-10-02  Zoltan Varga  <vargaz@gmail.com>
2816
2817         * mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
2818         (mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
2819         a variable to hold the stack slot used by the int<->float conversion opcodes.
2820
2821         * mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.
2822
2823 2009-10-04  Zoltan Varga  <vargaz@gmail.com>
2824
2825         * aot-compiler.c (add_generic_class): Only add GetGenericValueImpl wrappers
2826         when using full-aot.
2827
2828 2009-10-06  Zoltan Varga  <vargaz@gmail.com>
2829
2830         * aot-compiler.c (add_generic_class): Add an instance of GenericComparer<T> for
2831         each instance of Comparer<T>.
2832
2833         * generics.cs: Add a new test.
2834
2835 2009-10-09  Zoltan Varga  <vargaz@gmail.com>
2836
2837         * driver.c (parse_debug_options): Add a 'gdb' option.
2838
2839         * mini.c (mini_parse_debug_options): Add a 'gdb' option.
2840
2841         * image-writer.c: Add support for emitting the image into a memory buffer.
2842
2843         * dwarfwriter.c: Add support for sharing one IL file between multiple images.
2844
2845         * aot-compiler.c: Add support for registering debug info with GDB using the
2846         new JIT debugging interface in GDB 7.0. It can be turned on by setting
2847         MONO_XDEBUG to 'gdb'.
2848
2849 2009-10-10  Zoltan Varga  <vargaz@gmail.com>
2850
2851         * aot-compiler.c (mono_save_trampoline_xdebug_info): Implement this for the
2852         gdb mode.
2853
2854 2009-10-11  Zoltan Varga  <vargaz@gmail.com>
2855
2856         * aot-compiler.c (mono_save_xdebug_info): Emit a symbol for the method which
2857         can be used to set breakpoints in gdb.
2858
2859         * image-writer.c (bin_writer_emit_writeout): Add support for setting the text
2860         segment to an absolute address.
2861
2862 2009-10-13  Mark Probst  <mark.probst@gmail.com>
2863
2864         * method-to-ir.c: Use the managed array allocator method if
2865         available.
2866
2867 2009-10-13  Bill Holmes  <billholmes54@gmail.com>
2868
2869         * aot-compiler.c : Fix the MSVC builds
2870
2871         Code is contributed under MIT/X11 license.
2872
2873 2009-10-13  Zoltan Varga  <vargaz@gmail.com>
2874
2875         * aot-compiler.c (mono_save_xdebug_info): Group methods into groups of 10 to
2876         avoid registering 1 symbol file per method with gdb.
2877
2878 2009-09-29  Zoltan Varga  <vargaz@gmail.com>
2879
2880         * mini-sparc.c: Fix the handling of enums with base type long.
2881
2882         * mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.
2883
2884         * mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
2885         instead of using type->data.klass as the later doesn't work with generics.
2886
2887 2009-09-25  Mark Probst  <mark.probst@gmail.com>
2888
2889         * method-to-ir.c, mini.h, mini-alpha.c, mini-amd64.c, mini-arm.c,
2890         mini-hppa.c, mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c,
2891         mini-s390x.c, mini-sparc.c, mini-x86.c: Thread.get_CurrentThread
2892         works differently now and we don't handle it in the JIT anymore.
2893
2894         * mini.c, mini-exceptions.c, mini-posix.c, debug-debugger.c,
2895         debug-mini.c, tramp-amd64.c, tramp-x86.c: Changes resulting from
2896         the Thread class split.
2897
2898 2009-09-25  Zoltan Varga  <vargaz@gmail.com>
2899
2900         * driver.c: Don't run tests with the obsolete treeprop optimization.
2901
2902         * mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
2903         variable volatile. Fixes #541577.
2904
2905         * basic-calls.cs: Add a new test.
2906
2907         * basic-long.cs: Remove tests which are now in basic-calls.cs.
2908
2909 2009-09-24  Zoltan Varga  <vargaz@gmail.com>
2910
2911         * dwarfwriter.c (emit_debug_info_end): Disable this as it doesn't seem to
2912         work/required with recent iphone sdk versions.
2913
2914         * aot-compiler.c (add_wrappers): Generate PtrToStructure wrappers for more
2915         structures.
2916
2917         * decompose.c (mono_decompose_vtype_opts): Avoid reading uninitialized memory
2918         in the VCALL decomposition code.
2919
2920 2009-09-22  Zoltan Varga  <vargaz@gmail.com>
2921
2922         * mini-ia64.c (mono_arch_output_basic_block): Fix ISHR/ISHR_IMM.
2923
2924         * basic.cs: Add a test.
2925
2926         * mini-ia64.c (mono_arch_build_imt_thunk): Implement support the virtual
2927         generic invokes.
2928
2929         * mini-exceptions.c (mini_jit_info_table_find): New helper function which
2930         searches all the domains of the current thread.
2931
2932         * exceptions-<ARCH>.c: Use it. Fixes #539394.
2933
2934 2009-09-21  Zoltan Varga  <vargaz@gmail.com>
2935
2936         * exceptions-arm.c (mono_arm_throw_exception): Set ctx->ebp to fp instead of sp
2937         so catching exceptions thrown in the same method works. Fixes exception17.exe.
2938
2939         * tramp-arm.c (mono_arch_create_trampoline_code_full): Store NULL into lmf->method
2940         for non-jit trampolines.
2941
2942         * mini.c (mono_jit_runtime_invoke): Allow string ctors with dyn runtime invoke.
2943
2944         * aot-compiler.c (add_wrappers): Ditto.
2945
2946         * mini-arm.c: Implement support for passing vtypes and floats, and increase
2947         the size of the param area used by dyn_call to 6 which covers the majority of
2948         methods.
2949
2950         * mini.c aot-compiler.c: Allow dyn_call for string methods except ctors.
2951
2952         * mini-arm.c: Implement support for passing/receiving
2953         longs and receiving floats in the dyn_call code.
2954
2955         * mini-amd64.c: Implement support for receiving vtypes in registers in
2956         the dyn_call code.
2957
2958         * mini.c mini-amd64.c: Implement partial support for passing vtypes in
2959         the dyn_call code.
2960
2961 2009-09-20  Zoltan Varga  <vargaz@gmail.com>
2962
2963         * mini-arm.c (get_call_info): Return more precise information in
2964         ArgInfo->regtype.
2965         (dyn_call_supported): Use the information in CallInfo.
2966
2967         * mini-arm.c: Enable support for returning vtypes in the dyn_call code.
2968
2969         * mini.c mini-amd64.c: Enable support for returning vtypes in the dyn_call
2970         code.
2971
2972         * mini-arm.c: Update after the dyn_call api changes.
2973
2974         * mini.c (mini_create_jit_domain_info): Register a destructor function
2975         for the runtime_invoke_hash.
2976
2977         * mini-amd64.c (mono_arch_get_dyn_call_args): Rename this to
2978         'mono_arch_dyn_call_start'. Pass the pointer to the return value buffer to
2979         this function.
2980         (mono_arch_get_dyn_call_ret): Rename this to 'mono_arch_dyn_call_finish'.
2981         (dyn_call_supported): Simplify this by using get_call_info ().
2982         (mono_arch_dyn_call_free): New destructor function.
2983
2984         * generics.cs: Remove a printf.
2985
2986         * method-to-ir.c (mono_method_to_ir): Allocate some param area for DYN_CALL.
2987
2988         * mini-arm.c: Add support for enum return values and passing a few arguments
2989         on the stack.
2990         
2991         * mini.c (mono_jit_runtime_invoke): Add support for enum return values to
2992         dyn invoke.
2993
2994         * mini-amd64.c (mono_arch_get_dyn_call_ret): Ditto.
2995
2996         * aot-compiler.c (add_wrappers): Add a few restrictions for the use of
2997         the dynamic invoke wrappers.
2998
2999         * mini-arm.c: Implement OP_DYN_CALL for arm.
3000
3001         * aot-compiler.c (add_wrappers): Avoid aot-ing runtime invoke wrappers
3002         supported by the dynamic runtime invoke wrapper.
3003
3004         * aot-compiler.c aot-runtime.c: Add support for encoding the dynamic
3005         runtime invoke wrapper.
3006
3007         * mini.c (mono_jit_runtime_invoke): Use the dynamic runtime invoke wrappers
3008         if possible when running with full-aot.
3009
3010         * mini-ops.h: Add OP_DYN_CALL opcode.
3011
3012         * mini-amd64.c method-to-ir.c: Add infrastructure for making method calls
3013         with dynamic arguments lists similar to libffi.
3014
3015 2009-09-19  Zoltan Varga  <vargaz@gmail.com>
3016
3017         * method-to-ir.c: Fix the previous change on 64 bit platforms.
3018         
3019         * method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
3020         to NEWARR.
3021
3022         * iltests.il.in: Add a new test.
3023         
3024 2009-09-18  Zoltan Varga  <vargaz@gmail.com>
3025
3026         * aot-compiler.c (add_generic_instances): Add more instances of
3027         GenericEqualityComparer.
3028
3029 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
3030
3031         * mini.c: Add asserts for mono_class_vtable calls that are not meant to fail.
3032
3033 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
3034
3035         * method-to-ir.c: Handle failures from mono_class_vtable. Added some
3036         comments on some functions that now can fail.
3037
3038 2009-09-17  Andrew Jorgensen  <ajorgensen@novell.com>
3039
3040         * Makefile.am: Add Info.plist to EXTRA_DIST
3041
3042 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
3043
3044         * method-to-ir.c (mono_method_to_ir): Allow AOT for CEE_LDTOKEN in
3045         static synchronized wrappers. Fixes #539500.
3046
3047 2009-09-14  Rodrigo Kumpera  <rkumpera@novell.com>
3048
3049         * jit-icalls.c (mono_class_static_field_address): handle vtable failure
3050         properly.
3051
3052 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
3053
3054         * mini-exceptions.c (mono_handle_exception_internal): Store the computed
3055         lmf before calling filter clauses as well. Fixes #539550.
3056
3057         * exceptions.cs: Add a test.
3058         
3059 2009-09-14  Zoltan Varga  <vargaz@gmail.com>
3060
3061         * aot-compiler.c (add_generic_class): Add instances of
3062         Array.GetGenericValueImpl as well.
3063
3064         * Makefile.am (fullaotcheck): Copy and aot more assemblies so linq
3065         can be tested too.
3066
3067         * generics.cs: Add a fullaot linq test.
3068
3069 2009-09-10  Zoltan Varga  <vargaz@gmail.com>
3070
3071         * aot-compiler.c (arch_emit_static_rgctx_trampoline): Don't clobber argument
3072         reg r1 on arm.
3073
3074 2009-09-10  Bill Holmes  <billholmes54@gmail.com>
3075
3076         * mini-trampolines.c (mono_delegate_trampoline) : Call
3077           mono_cominterop_get_invoke if the delegate target object
3078           is a COM object.
3079
3080         Code is contributed under MIT/X11 license.
3081
3082 2009-09-09  Sebastien Pouliot  <sebastien@ximian.com>
3083
3084         * method-to-ir.c: For CoreCLR throw a SecurityException if an 
3085         internal call is defined outside platform code. Reduce code 
3086         duplication with existing [Method|Field]AccessException
3087
3088 2009-09-08  Rodrigo Kumpera  <rkumpera@novell.com>
3089
3090         * mini-x86.c (mono_arch_emit_call): Don't reduce stack usage by 4
3091         if the return value is a small struct passed on regs.
3092
3093 2009-09-09  Zoltan Varga  <vargaz@gmail.com>
3094
3095         * cpu-arm.md mini-arm.c: Remove unused opcodes.
3096
3097         * mini-codegen.c: Enable the cpu description validation for arm.
3098
3099 2009-09-08  Zoltan Varga  <vargaz@gmail.com>
3100
3101         * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
3102         test which depends on structs to objects.cs.
3103         
3104         * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
3105         require object model related stuff working.
3106
3107         * cpu-x86.md mini-x86.c: Remove more unused opcodes.
3108
3109         * mini-ops.h: Fix OP_BIGMUL instruction descriptions.
3110
3111         * mini-codegen.c (mono_local_regalloc): Validate the cpu description 
3112         against the instruction metadata in mini-ops.h. amd64 only for now.
3113
3114         * mini-ops.h: Fix some instruction descriptions.
3115
3116         * mini-ops.h mini-x86.c mini-amd64.c cpu-<ARCH>.md: Remove some
3117         unused instructions.
3118
3119 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
3120
3121         * exceptions.cs: Add a new test.
3122
3123 2009-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
3124
3125         * mini-x86.c (needs_stack_frame): OSX requires full frames to keep proper alignment.
3126
3127 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
3128
3129         * mini-llvm.c (mono_llvm_emit_method): Add a few more missing casts,
3130         skip empty phi opcodes.
3131         
3132         * mini-llvm.c (mono_llvm_emit_method): Handle unsigned volatile variables
3133         correctly by zero extending after loads. Skip methods containing calls
3134         to the monitor enter/exit trampolines.
3135
3136         * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
3137         when calling mono_thread_force_interruption_checkpoint ().
3138
3139         * mini.c (mini_method_compile): Disable llvm when AOT compiling.
3140
3141         * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
3142         64 bit thunks.
3143         (mono_arch_nullify_class_init_trampoline): Read 'buf' instead of 'code'.
3144
3145         * mini-llvm.c (mono_llvm_emit_method): Add a few missing conversions so a 
3146         bootstrap could run.
3147
3148 2009-09-04  Zoltan Varga  <vargaz@gmail.com>
3149
3150         * mini.c (mini_init): Set callbacks.get_runtime_build_info ().
3151
3152 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
3153
3154         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass the start
3155         of the method to
3156         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
3157         LLVM might be very short.
3158
3159         * mini-x86.c (mono_arch_output_basic_block): Maintain stack alignment
3160         in OP_THROW/RETHROW.
3161
3162         * exceptions-x86.c: Rewrite the throw trampolines so they maintain stack
3163         alignment on osx.
3164
3165 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
3166
3167         * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
3168         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
3169         LLVM might be very short.
3170
3171 2009-09-01  Zoltan Varga  <vargaz@gmail.com>
3172
3173         * exceptions-x86.c (throw_exception): Fix the previous change by substracting
3174         the alignment for the value of sp.
3175
3176 2009-09-01  Geoff Norton  <gnorton@novell.com>
3177
3178         * mini.c (mono_get_lmf_addr): Fix jit_thread_attach for native to 
3179         managed wrappers in full aot.
3180
3181 2009-08-31  Zoltan Varga  <vargaz@gmail.com>
3182
3183         * exceptions-x86.c (get_throw_exception): Align the stack on osx.
3184
3185 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
3186
3187         * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
3188
3189 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
3190
3191         * aot-compiler.c (emit_exception_debug_info): Emit ei->flags too.
3192
3193         * aot-runtime.c (decode_exception_debug_info): Decode ei->flags from the
3194         saved info.
3195
3196         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3197
3198         * aot-runtime.c aot-compiler.c: Emit exception causes fully so we don't
3199         depend on the info MonoMethodHeader which could be missing in IL stripped
3200         assemblies.
3201
3202 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
3203
3204         * mini-arm.c (add_general): Fix the passing of 64 bit values on darwin, where
3205         they are only 4 byte aligned.
3206
3207 2009-08-21  Zoltan Varga  <vargaz@gmail.com>
3208
3209         * mini-arm.c (mono_arch_allocate_vars): Use FP as the frame pointer as
3210         was done previously, since using SP causes too many problems.
3211
3212         * exceptions-arm.c: Fix the handling of sp/fp so unwinding through
3213         frames without a frame pointer works.
3214
3215         * mini-arm.c (mono_arch_get_global_int_regs): Avoid using V5 as a
3216         global register in methods with calls, since the calls can go through
3217         a static rgctx trampoline which doesn't save it.
3218
3219 2009-08-19  Zoltan Varga  <vargaz@gmail.com>
3220
3221         * mini-arm.c (mono_arch_context_get_int_reg): Handle SP as well.
3222
3223 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
3224
3225         * aot-compiler.c (add_generic_instances): Fix the net 1.1 build.
3226
3227 2009-08-18  Christian Hergert  <chris@dronelabs.com>
3228
3229         * method-to-ir.c: Fix warnings for uninitialized variables.
3230
3231 2009-08-18  Christian Hergert  <chris@dronelabs.com>
3232
3233         * mini-exceptions.c:
3234         * aot-compiler.c: Fix printf warnings.
3235
3236 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
3237
3238         * aot-compiler.c (add_generic_instances): Add string[] wrapper methods.
3239         Add GetGenericValueImpl<string>.
3240         
3241         * aot-compiler.c (add_generic_instances): Add instances of
3242         GenericEqualityComparer<T> for primitive types. Only emit the array
3243         wrappers into the mscorlib image.
3244
3245 2009-08-15  Zoltan Varga  <vargaz@gmail.com>
3246
3247         * aot-runtime.c (load_method): Rename 'aot_module' -> 'amodule'. Allocate
3248         the methods_loaded array using amodule->info->nmethods.
3249
3250         * mini.h (MonoAotFileInfo): Add an 'nmethods' field.
3251         (MONO_AOT_FILE_VERSION): Bump this.
3252
3253         * aot-compiler.c: Emit more generic instances allowing some parts of linq
3254         to work.
3255
3256         * aot-runtime.c (mono_aot_get_unwind_info): Handle the case when the
3257         MonoJitInfo doesn't belong to its methods aot image.
3258
3259 2009-08-14  Zoltan Varga  <vargaz@gmail.com>
3260
3261         * mini-arm.c (mono_arch_allocate_vars): Use SP as the default frame reg.
3262
3263         * mini-arm.c: Fix warnings.
3264         
3265         * mini-arm.c (mono_arm_emit_load_imm): Only emit a movt if needed.
3266
3267         * mini-arm.c (mono_arm_emit_load_imm): Use movt/movw if the cpu
3268         supports it.
3269
3270 2009-08-12  Zoltan Varga  <vargaz@gmail.com>
3271
3272         * aot-compiler.c (arch_emit_imt_thunk): Rework the arm code to
3273         avoid clobbering IP.
3274
3275         * mini-trampolines.c (mono_magic_trampoline): Allocate a local to
3276         hold the trampoline argument, so its initial value is available during
3277         debugging.
3278
3279 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3280
3281         * exceptions-arm.c:
3282         * exceptions-hppa.c:
3283         * mini.c:
3284         * exceptions-s390x.c:
3285         * exceptions-mips.c:
3286         * exceptions-ppc.c:
3287         * exceptions-sparc.c:
3288         * exceptions-alpha.c:
3289         * aot-runtime.c:
3290         * mini-trampolines.c:
3291         * exceptions-x86.c:
3292         * exceptions-s390.c: add and use #define's instead of sizeof()
3293         for MonoJitInfo and MonoJitInfoTable.
3294
3295 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
3296
3297         * tramp-arm.c:
3298         * tramp-amd64.c:
3299         * tramp-ppc.c:
3300         * tramp-x86.c: use a #define instead of sizeof() for a few
3301         structures that use a zero-length array.
3302
3303 2009-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
3304
3305         * method-to-ir.c (mono_method_to_ir/CEE_CONSTRAINED_): Handle the
3306         case when the method is dynamic. Fixes #529238.
3307
3308 2009-08-06  Zoltan Varga  <vargaz@gmail.com>
3309
3310         * mini.c (mono_jit_compile_method_inner): Throw an exception instead
3311         of asserting when a method is JIT compiled in full-aot mode.
3312
3313 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
3314         
3315         Contributed under the terms of the MIT/X11 license by
3316         Jerry Maine <crashfourit@gail.com>.
3317         
3318         * fixed wrong dates in changelog.
3319
3320 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
3321         
3322         Contributed under the terms of the MIT/X11 license by
3323         Jerry Maine <crashfourit@gail.com>.
3324
3325         * basic-simd.cs: added test for packed double square root.
3326         * cpu-amd64.md: added opcode info for packed double square root.
3327         * cpu-x86.md: added opcode info for packed double square root.
3328         * mini-ops.h: added IR opcode for packed double square root.
3329         * mini-x86.c: added IR to native translation code for packed double square root.
3330         * mini-amd64.c: removed todo for packed double square root.
3331         * simd-intrinsics.c: added method to IR opcode converstion for
3332         packed double square root.
3333
3334 2009-08-03 Jerry Maine <crashfourit@gmail.com>
3335
3336         Contributed under the terms of the MIT/X11 license by
3337         Jerry Maine <crashfourit@gail.com>.
3338
3339         * mini-amd64.c: Added a change to help tell the difference as 
3340         to what perpose the xmm register is being used--mainly to help
3341         with debuging.
3342         * mini-amd64.h: Changed callee regs to use 15 out of 16 
3343         (one used for special cases) xmm registers for both fp
3344         and simd ops. Added define to turn on new feature in the regalloc
3345         that allows fp and simd ops to share the xmm regs happily.
3346         * codegen.c: Added code to detect for which perpose an xmm reg is
3347         being used (fp or simd) and to translate back and forth to the
3348         correct logical reg bank (fp or simd) for 'spill load's.
3349
3350 2009-08-03 Jerry Maine <crashfourit@gmail.com>
3351
3352         Contributed under the terms of the MIT/X11 license by
3353         Jerry Maine <crashfourit@gail.com>.
3354
3355         * basic-simd.cs: Added tests for stressing the regalloc when running with
3356         16 simd regs and when simd and fp ops share the same reg bank.
3357
3358 2009-08-01  Mark Probst  <mark.probst@gmail.com>
3359
3360         * method-to-ir.c (mini_emit_stobj): If we call mono_value_copy()
3361         in shared generic code, we might have to look up the class in the
3362         RGCTX.  If we use the class directly, compute its GC descriptor.
3363
3364 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
3365
3366         * mini.c (mono_jit_runtime_invoke): Fix a warning.
3367
3368 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
3369
3370         * mini.c (mono_jit_runtime_invoke): Initialize the class and
3371         check for errors. Fixed the case when the class with the Main
3372         method is broken.
3373
3374 2009-07-31 Jerry Maine <crashfourit@gmail.com>
3375
3376         Contributed under the terms of the MIT/X11 license by
3377         Jerry Maine <crashfourit@gail.com>.
3378
3379         * cpu-amd64.md: Fixed simple bug in machine discrition file.
3380
3381 2009-07-31  Zoltan Varga  <vargaz@gmail.com>
3382
3383         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.
3384
3385 2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
3386
3387         * method-to-ir.c: Fix naming of stelem and ldelem.
3388
3389 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
3390
3391         * driver.c (main_thread_handler): Check that the assembly loaded
3392         matches the filename when doing AOT.
3393
3394 2009-07-30  Mark Probst  <mark.probst@gmail.com>
3395
3396         * mini.c: get_ip_from_sigctx installer has been removed, so don't
3397         call it anymore.
3398
3399         * mini-x86.h, mini-amd64.h, mini-ppc.h: UCONTEXT macros moved (to
3400         utils/mono-sigcontext.h).
3401
3402         * exceptions-amd64.c: Use the UCONTEXT_GREGS macro instead of an
3403         #ifdef.
3404
3405 2009-07-29  Massimiliano Mantione  <massi@ximian.com>
3406
3407         * mini.c (mono_codegen):
3408         Call profiler hook to keep track of method code buffers.
3409
3410 2009-07-27  Mark Probst  <mark.probst@gmail.com>
3411
3412         * method-to-ir.c: Invoke write barriers for the
3413         Interlocked.(Compare)Exchange JIT intrinsics.
3414
3415 2009-07-26  Raja R Harinath  <harinath@hurrynot.org>
3416
3417         * Makefile.am (version.h): Fix issues when built out of tree.
3418         Remove some redundant 'grep's piped through 'sed's.
3419
3420 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
3421
3422         This patch is contributed under the terms of the MIT/X11 license
3423
3424         * mini-ppc.c (mono_arch_output_basic_block):
3425         (OP_STOREI1_MEMBASE_REG): Handle 32-bit offsets combining addis
3426         for bits 32-47 with signed load/store diplacements for bits
3427         48-63.  Use prefered base/offset order for indexed form.
3428         (OP_STOREI2_MEMBASE_REG, OP_STORE_MEMBASE_REG): Same.
3429         (OP_LOAD_MEMBASE, OP_LOADI4_MEMBASE, OP_LOADU4_MEMBASE,
3430         OP_LOADI1_MEMBASE, OP_LOADU1_MEMBASE, OP_LOADU2_MEMBASE,
3431         OP_LOADI2_MEMBASE): Same.
3432         (OP_STORER8_MEMBASE_REG, OP_LOADR8_MEMBASE,
3433         OP_STORER4_MEMBASE_REG, OP_LOADR4_MEMBASE): Same.
3434         (OP_STOREI1_MEMINDEX): Use prefered base/offset order for
3435         indexed form.
3436         (OP_STOREI2_MEMINDEX, OP_STORE_MEMINDEX): Same.
3437         (OP_LOAD_MEMINDEX, OP_LOADI4_MEMINDEX, OP_LOADU4_MEMINDEX,
3438         OP_LOADU2_MEMINDEX, OP_LOADI2_MEMINDEX, OP_LOADU1_MEMINDEX,
3439         OP_LOADI1_MEMINDEX): Same
3440         (OP_LOADR4_MEMINDEX, OP_LOADR8_MEMINDEX, OP_STORER4_MEMINDEX,
3441         OP_STORER8_MEMINDEX): Same
3442         (OP_JMP): Use addis/addi sequence for int cfg->stack_usage
3443         computations.
3444         (mono_arch_emit_prolog): Handle 32-bit offsets combining addis
3445         for bits 32-47 with signed load/store diplacements for bits
3446         48-63.  Use prefered base/offset order for indexed form.
3447
3448 Fri Jul 24 16:57:12 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
3449
3450 This patch is contributed under the terms of the MIT/X11 license
3451
3452         * mini-ppc.c: Define PPC_MOVE_FPR_GPR and PPC_ISA_64.
3453         (mono_arch_get_vcall_slot): Fx pointer to int cast warning.
3454         (mono_arch_decompose_opts): Make OP_ICONV_TO_R4 and
3455         OP_ICONV_TO_R8 decompose conditional on !PPC_ISA_64.
3456         (mono_arch_output_basic_block) [OP_JMP]: Use ppc_load32 for
3457         cfg->stack_usage to avoid size warnings.
3458         (mono_arch_output_basic_block) [__mono_ppc64__]: Replace
3459         store/load sequence with mffgpr if PPC_MOVE_FPR_GPR is true.
3460         (mono_arch_output_basic_block) [!__mono_ppc64__]: For
3461         OP_ICONV_TO_R4 or OP_ICONV_TO_R8 and PPC_ISA_64 use fcfid
3462         to convert.
3463         (mono_arch_emit_prolog): Move mono_emit_unwind_op_def_cfa 
3464         after code varible is initialized.
3465         Add g_assert ppc_is_imm16 for ainfo->offset. Handle
3466         ainfo->size == 8 when ainfo->offset !ppc_is_imm16.
3467         (mono_arch_emit_epilog): 
3468         Move Use ppc_load32 for cfg->stack_usage to avoid size
3469         warnings.
3470
3471 2009-07-24  Mark Probst  <mark.probst@gmail.com>
3472
3473         * method-to-ir.c: The write barrier doesn't do the store anymore,
3474         so we have always to emit it.  Also, emit the wbarrier after the
3475         store.
3476
3477 2009-07-24  Zoltan Varga  <vargaz@gmail.com>
3478
3479         * mini-arm.c (mono_arch_get_delegate_invoke_impls): Add a trampoline
3480         for argument count 3 too.
3481
3482 2009-07-23  Zoltan Varga  <vargaz@gmail.com>
3483
3484         * mini.c (mono_jit_compile_method_with_opt): Add an 'ex' argument to let
3485         the caller handle the exceptions.
3486         (mono_jit_runtime_invoke): Handle exceptions thrown while compiling the
3487         method. Fixes #524498.
3488
3489 2009-07-22  Geoff Norton  <gnorton@novell.com>
3490
3491         * mini-exceptions.c: Fix build on ia64.
3492
3493 2009-07-22  Mark Probst  <mark.probst@gmail.com>
3494
3495         * mini-exceptions.c (ves_icall_get_frame_info): Use write
3496         barriers.
3497
3498 2009-07-21  Zoltan Varga  <vargaz@gmail.com>
3499
3500         * mini-arm.c (mono_arch_emit_prolog): Fix thread attaching in aot
3501         code.
3502
3503 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
3504
3505         * basic-simd.cs (Main): Pass args to the test driver.
3506
3507 2009-07-20  Geoff Norton  <gnorton@novell.com>
3508
3509         * mini-x86.h: Fix the x86 version guards to use Apple's
3510         properly defined macros.
3511
3512 2009-07-20  Geoff Norton  <gnorton@novell.com>
3513
3514         * mini-x86.c: Fix --trace on darwin-x86 and other systems which require
3515         aligned access.
3516
3517 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
3518
3519         * mini.c (mono_jit_runtime_invoke): Speed this up by adding a hash to
3520         MonoJitDomainInfo which maps MonoMethod's to a structure containing all
3521         the information which is needed for invokes, so only one locking+hash table
3522         lookup is needed.
3523
3524         * aot-compiler.c: Add a 'tool-prefix' option to be used when cross-compiling.
3525         
3526         * aot-compiler.c (add_generic_instances): Emit instances of 
3527         GenericComparer<T> for primitive types.
3528
3529 2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>
3530
3531         * mini-posix.c: Fix linux build.
3532
3533 2009-07-19  Geoff Norton  <gnorton@novell.com>
3534
3535         * mini.h: Add prototypes for mono_runtime_syscall_fork and
3536         mono_gdb_render_native_backtraces
3537         * mini-darwin.c: Apple's syscall(SYS_fork) is very weird on x86,
3538         so we implement the sane semantics to the runtime here
3539         (mono_gdb_render_native_backtraces).  Apple also uses an ancient gdb
3540         so we need to call it differently (mono_gdb_render_native_backtraces)
3541         * mini-posix.c: Move the old semantics from mini.c to the prototypes
3542         here for default implementations.
3543         * mini.c: Refactor mono_handle_native_sigsegv so that we can properly
3544         support Apple's weird syscall (SYS_fork) implementation and not busy
3545         loop in abort() on native crashes on OSX anymore.
3546
3547 2009-07-18  Zoltan Varga  <vargaz@gmail.com>
3548
3549         * aot-runtime.c (load_method): Change the handling of the
3550         MONO_LASTAOT env variable so MONO_LASTAOT=0 means that no aot methods
3551         are used.
3552
3553         * mini.c (mono_patch_info_equal): Really fix the handling of RGCTX_FETCH.
3554
3555 2009-07-17  Zoltan Varga  <vargaz@gmail.com>
3556
3557         * mini.c (mono_patch_info_equal): Revert the last change for now as it
3558         seems to break the aot tests.
3559         
3560         * mini.c (mono_patch_info_equal): Fix the handling of 
3561         MONO_PATCH_INFO_RGCTX_FETCH.
3562
3563 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
3564
3565         * unwind.c: Use TARGET_AMD64 instead of __x86_64__.
3566
3567         * mini.c (mono_patch_info_hash): Fix the handling of 
3568         MONO_PATCH_INFO_INTERNAL_METHOD.
3569         (mono_patch_info_equal): Ditto.
3570
3571 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
3572
3573         * mini-llvm.c (mono_llvm_emit_method): Use module instead of ctx->module
3574         in a few places.
3575         
3576         * mini-llvm.c: Add some infrastructure for AOT support.
3577
3578 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
3579
3580         * mini-llvm-cpp.c: Update to the latest llvm api.
3581         
3582         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Set the EnablePrettyStackTrace
3583         option to false to prevent llvm from installing signal handlers which
3584         trip up the gc.
3585         
3586 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
3587
3588         * cpu-x86.md:
3589         * cpu-amd64.md: Revert previous change as those instructions
3590         take 2 separate arguments. Remember to read the arch docs more
3591         carefully next time.
3592
3593 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
3594
3595         * mini-llvm-cpp.cpp (mono_llvm_build_alloca): Update to latest llvm api.
3596
3597 Wed Jul 15 17:20:27 CEST 2009 Paolo Molaro <lupus@ximian.com>
3598
3599         * mini-ppc.c: exploit multiple load/store units if available (rest of
3600         the change from Steven Munroe (<munroesj@us.ibm.com>) first patch at 
3601         http://bugzilla.novell.com/show_bug.cgi?id=487846).
3602
3603 Wed Jul 15 16:24:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
3604
3605         * mini-ppc.c: integrate most of Steven Munroe (<munroesj@us.ibm.com>)
3606         first patch at http://bugzilla.novell.com/show_bug.cgi?id=487846.
3607
3608 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
3609
3610         * cpu-x86.md: Fix missing clobbering from trancendental simd
3611         ops.
3612
3613         * cpu-amd64.md: Same.
3614
3615 2009-07-14 Jerry Maine <crashfourit@gmail.com>
3616
3617         Contributed under the terms of the MIT/X11 license by
3618         Jerry Maine <crashfourit@gail.com>.
3619
3620         * basic-simd.cs: Added tests for single and doulble indexers.
3621
3622         * cpu-amd64.md: Added simd opcode information.
3623
3624         * mini-amd64.c: Added IR to native simd generation code.
3625         Added simd register names and function that returns them.
3626
3627         * mini-amd64.h: Added marcos to turn on simd code compilation in
3628         amd64. Added max simd register count marco. Added caller/callee
3629         register mask marcos. Added marcos to use simd register bank.
3630
3631         * mini.h: Added helper marco for shufling dwords and simple
3632         floats.
3633
3634 2009-07-14  Zoltan Varga  <vargaz@gmail.com>
3635
3636         * mini-llvm-cpp.cpp: Update to latest llvm SVN api.
3637
3638         * Makefile.am (mono_LDADD): Pass LLVM_LDFLAGS to the linked.
3639
3640         * unwind.c (mono_unwind_get_ops_from_fde): Make this return
3641         the length of the native code as well.
3642
3643         * basic-simd.cs: Add a test for #521662.
3644
3645 Mon Jul 13 17:58:50 CEST 2009 Paolo Molaro <lupus@ximian.com>
3646
3647         * mini-ppc.c: fixed bug introduced by Steven's TLS changes.
3648
3649 2009-07-13  Mark Probst  <mark.probst@gmail.com>
3650
3651         * mini.c: Register function for getting the IP from a signal
3652         context with metadata.
3653
3654 2009-07-13  Zoltan Varga  <vargaz@gmail.com>
3655
3656         * method-to-ir.c (mono_method_to_ir): When calling a gshared method,
3657         call a generic class init trampoline if needed. Fixes #519336.
3658
3659         * generics.cs: Add a test.
3660         
3661 2009-07-09  Mark Probst  <mark.probst@gmail.com>
3662
3663         * method-to-ir.c: When doing a call which might be remote from
3664         shared generic code to other shared code with open type arguments,
3665         get the remoting invoke wrapper from the RGCTX and do an indirect
3666         call to it.
3667
3668 2009-07-03  Zoltan Varga  <vargaz@gmail.com>
3669
3670         * mini-trampolines.c (get_unbox_trampoline): Add an rgctx trampoline
3671         after the unbox trampoline in the full-aot case.
3672
3673 2009-07-02  jonas echterhoff <jonas@unity3d.com>
3674         
3675         * mini.c: Move initialization of jit_mutex before debugger initialization
3676         
3677         to avoid crashes.
3678         
3679         
3680         * Info.plist: added Info.plist and link flag to enable the mono executable
3681         to access other processes. Requires codesigning of the executable to work.
3682         
3683         * mdb-debug-info32-darwin.s: The same as mdb-debug-info32.s, changed to 
3684         
3685         compile on OS X.
3686         
3687
3688 2009-06-30  Zoltan Varga  <vargaz@gmail.com>
3689
3690         * driver.c (mini_regression): Handle loading errors. Fixes #508869.
3691
3692 2009-06-29  Zoltan Varga  <vargaz@gmail.com>
3693
3694         * mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
3695         when the generic instance is an instantiation of a subclass of the
3696         methods class. Fixes #517166.
3697
3698 2009-06-26  Zoltan Varga  <vargaz@gmail.com>
3699
3700         * mini-amd64.c (mono_arch_emit_prolog): Fix thread attaching in AOTed
3701         code.
3702
3703         * mini.c (mono_jit_thread_attach): Allow domain to be NULL for calls from
3704         AOTed code.
3705
3706         * CMakeLists.txt: Add minimal support for installation.
3707
3708 2009-06-25  Zoltan Varga  <vargaz@gmail.com>
3709
3710         * aot-compiler.c (emit_and_reloc_code): Factor out the code to
3711         determine whenever a method is directly callable to a separate function.
3712
3713         * mini-<ARCH>.c tramp-<ARCH>.c: Remove needless casts and add new
3714         needed ones as a result of the previous change.
3715
3716         * mini-<ARCH>.c tramp-<ARCH>.c: Use mgreg_t* as the
3717         type of register arrays.
3718
3719         * mini-trampolines.c tramp-<ARCH>.c aot-runtime.c: Use mgreg_t* as the
3720         type of register arrays.
3721
3722 2009-06-24  Jerry Maine  <crashfourit@gmail.com>
3723         
3724         Contributed under the terms of the MIT/X11 license by
3725         Jerry Maine <crashfourit@gail.com>.
3726
3727         * mini-amd64.c: Added code to convert simd IR to native amd64 sse.
3728
3729 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
3730
3731         * aot-compiler.c (emit_plt): Define debug labels for most plt entries.
3732
3733 2009-06-24  Neale Ferguson <neale@sinenomine.net>
3734
3735         * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
3736         dump of structure return value. Fix some formatting.
3737         * cpu-s390x.md: Fix lengths of instruction sequences.
3738         * mini-s390.c: Minor formatting changes.
3739
3740 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
3741
3742         * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
3743         Use sigaction on freebsd as well.
3744
3745 2009-06-23  Zoltan Varga  <vargaz@gmail.com>
3746
3747         * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
3748         uses #ifdef on it.
3749         
3750         * mini.c (mini_init): Revert a change which breaks cross-compilation.
3751
3752 2009-06-22  Mark Probst  <mark.probst@gmail.com>
3753
3754         * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
3755
3756 2009-06-22  Mark Probst  <mark.probst@gmail.com>
3757
3758         * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
3759
3760 2009-06-20  Martin Baulig  <martin@ximian.com>
3761
3762         * debug-mini.c
3763         (MonoDebuggerThreadFlags): New enum typedef.
3764         (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
3765         (mono_debugger_thread_created): Added `gpointer func' argument;
3766         initialize the new `thread_flags' field.
3767
3768 2009-06-18  Martin Baulig  <martin@ximian.com>
3769
3770         * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
3771         (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
3772
3773         * debug-debugger.c
3774         (mini_debugger_set_attach_ok): New function; sets the attach-ok
3775         flag in `MONO_DEBUGGER__info.runtime_info'.
3776
3777         * driver.c
3778         (mono_main): Call mini_debugger_set_attach_ok() if generics
3779         sharing is disabled.
3780
3781 2009-06-22  Zoltan Varga  <vargaz@gmail.com>
3782
3783         * aot-compiler.c (add_wrappers): Fix a warning.
3784
3785         * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
3786         the ppc load/store macro changes.
3787
3788 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
3789
3790         * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
3791
3792         * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
3793         not just the got symbol.
3794
3795         * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
3796         on ppc.
3797
3798         * aot-compiler.c unwind.c: Add infrastructure for unwind support on
3799         ppc.
3800         
3801         * aot-compiler.c: Remove some fixmes.
3802
3803         * driver.c (mono_main): Print a helpful message when cross-compiling.
3804
3805         * mini.c (mini_init): Disable signal handlers when cross-compiling.
3806
3807         * method-to-ir.c (initialize_array_data): Do the optimization if the
3808         target byte order is little endian, instead of the host byte order.
3809
3810         * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
3811         wrappers into the mscorlib image, Emit a unique plt symbol for each
3812         image, emit symbols for plt entries.
3813
3814         * image-writer.c (img_writer_emit_symbol_size): New function to emit
3815         a .size directive.
3816         
3817 2009-06-20  Zoltan Varga  <vargaz@gmail.com>
3818
3819         * aot-compiler.c (add_wrappers): Avoid calling 
3820         mono_marshal_get_type_info () since it can assert for some types.
3821
3822         * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of 
3823         ldtoken are used inside wrappers.
3824
3825         * helpers.c: Add support for prefixing tools with the arch name.
3826
3827         * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
3828         quantities when using ilp32.
3829
3830         * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
3831         spill slots. Use sizeof(mgreg_t) for the spill slot size.
3832
3833         * image-writer.c: Use .long on ilp32.
3834
3835         * aot-compiler.c: Use 32 bit loads on ilp32.
3836         
3837 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
3838
3839         * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
3840
3841         * mini-ops.h: Use TARGET_POWERPC define for consistency.
3842
3843         * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
3844
3845         * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the 
3846         second got slot of every aot image.
3847         
3848         * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
3849         aot on platforms with function pointers.
3850
3851         * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
3852         support for aot/full aot on ppc/ppc64.
3853         
3854         * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
3855         arguments which are needed on ppc.
3856
3857         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
3858         argument.
3859
3860         * mini-trampolines.c aot-runtime.c: Update after the above changes.
3861         
3862         * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
3863
3864         * regalloc2.c (BITS_PER_CHUNK): Ditto.  
3865
3866         * aot-compiler.c (emit_got_info): Fix reading unused memory.
3867
3868         * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
3869
3870 2009-06-17  Geoff Norton  <gnorton@novell.com>
3871
3872         * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
3873
3874 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
3875
3876         * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
3877         to control whenever the dwarf writer is in xdebug or aot mode.
3878         (emit_class_dwarf_info): Use a separate abbrev for structures without
3879         children.
3880
3881         * aot-compiler.c: Pass the appending parameter to 
3882         mono_dwarf_writer_create ().
3883
3884         * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
3885         falls through to its next bblock. Fixes #513931.
3886
3887         * iltests.il: Add a test.
3888
3889         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
3890         infor even if emit_line is FALSE, as the apple linker seems to require it.
3891
3892         * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
3893
3894         * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
3895         gcc does.
3896         (emit_fde): Ditto.
3897
3898 2009-06-15  Zoltan Varga  <vargaz@gmail.com>
3899
3900         * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
3901         mips build.
3902
3903 2009-06-13  Zoltan Varga  <vargaz@gmail.com>
3904
3905         * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and 
3906         'has_call_handler' fields.
3907
3908         * method-to-ir.c (mono_method_to_ir): Set them if needed.
3909
3910         * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
3911         first bblock if not needed. Fixes #512790.
3912         
3913 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
3914
3915         * aot-compiler.c (mono_compile_assembly): Fix a warning.
3916         
3917         * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
3918         wrappers.
3919
3920         * aot-runtime.c (mono_aot_get_method): Use the original method's code for
3921         remoting-invoke-with-check wrappers, which are not needed when running with
3922         full-aot, since it doesn't support remoting.
3923         
3924 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
3925
3926         * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
3927
3928         * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
3929         method info, it is not used anymore.
3930
3931         * mini.h: Bump AOT file format version.
3932         
3933         * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
3934         word smaller.
3935
3936         * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
3937         change above.
3938         
3939         * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
3940
3941         * mini.h: Bump AOT file format version.
3942         
3943 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
3944
3945         * image-writer.c (asm_writer_emit_symbol_diff): Disable the 
3946         TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
3947         iphone.
3948
3949         * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
3950         of CKFINITE and FBGE for VFP.
3951
3952 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
3953
3954         * aot-compiler.c: Don't align code to 16 bytes on arm.
3955         
3956         * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
3957         before the methods they belong to.
3958
3959         * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
3960         the full-aot case if possible, since the trampoline will be called right 
3961         away.
3962
3963         * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
3964         trampolines to 1024 after the change above.
3965
3966         * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
3967         trampoline to save 8 bytes per trampoline.
3968
3969         * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
3970         change above.
3971
3972 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
3973
3974         * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
3975
3976 2009-06-08  Martin Baulig  <martin@ximian.com>
3977
3978         * debug-mini.c
3979         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
3980         (_mono_debugger_throw_exception): Don't make this static.
3981         (_mono_debugger_unhandled_exception): Likewise.
3982         (mono_debugger_handle_exception): Moved to mini-exceptions.c
3983
3984         * debug-mini.c
3985         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
3986         (_mono_debugger_throw_exception): Add function prototype.
3987         (_mono_debugger_unhandled_exception): Likewise.
3988
3989         * mini-exceptions.c
3990         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
3991         arg; return the first exception handler if the exception is caught
3992         and we're running inside the debugger.
3993         (mono_debugger_handle_exception): Moved here from debug-mini.c;
3994         improve exception handle inside runtime-invoke, check whether the
3995         exception is actually caught in the method being invoked and not
3996         by the runtime-invoke-wrapper.
3997
3998 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
3999
4000         * image-writer.c: Improve support for the osx assembler.
4001
4002         * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
4003         support them.
4004
4005 2009-06-08  Martin Baulig  <martin@ximian.com>
4006
4007         * debug-mini.c
4008         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
4009         (_mono_debugger_throw_exception): Don't make this static.
4010         (_mono_debugger_unhandled_exception): Likewise.
4011         (mono_debugger_handle_exception): Moved to mini-exceptions.c
4012
4013         * debug-mini.c
4014         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
4015         (_mono_debugger_throw_exception): Add function prototype.
4016         (_mono_debugger_unhandled_exception): Likewise.
4017
4018         * mini-exceptions.c
4019         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
4020         arg; return the first exception handler if the exception is caught
4021         and we're running inside the debugger.
4022         (mono_debugger_handle_exception): Moved here from debug-mini.c;
4023         improve exception handle inside runtime-invoke, check whether the
4024         exception is actually caught in the method being invoked and not
4025         by the runtime-invoke-wrapper.
4026
4027 2009-06-07  Zoltan Varga  <vargaz@gmail.com>
4028
4029         * image-writer.c (append_subsection): Don't align subsections of the
4030         debug_line section as a workaround.
4031
4032         * dwarfwriter.c: Emit line number info in the AOT case as well.
4033
4034 2009-06-06  Steven Munroe  <munroesj@us.ibm.com>
4035
4036         This patch is contributed under the terms of the MIT/X11 license
4037
4038        * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
4039        code_len <= code_size
4040
4041 2009-06-06  Zoltan Varga  <vargaz@gmail.com>
4042
4043         * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
4044
4045 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
4046
4047         * aot-compiler.c aot-runtime.c: Delete references to static rgctx
4048         invoke wrappers, we now use trampolines instead.
4049
4050 2009-06-04  Mark Probst  <mark.probst@gmail.com>
4051
4052         * mini-darwin.c: The exception thread must not be registered with
4053         the GC.
4054
4055 2009-06-04  Mark Probst  <mark.probst@gmail.com>
4056
4057         * mini-gc.c: Disable the code because it makes SGen crash.
4058
4059 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
4060
4061         * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
4062         instead of asserting.
4063
4064 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
4065
4066         * aot-compiler.c (mono_compile_assembly): Move the creation of the
4067         output file after the code has been compiled.
4068
4069 2009-05-30  Zoltan Varga  <vargaz@gmail.com>
4070
4071         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
4072
4073 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
4074
4075         * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
4076         entries distinction to simplify the code.
4077
4078         * mini.h: Bump AOT file format version.
4079         
4080 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
4081
4082         * objects.cs: Fix the signature of one of the tests.
4083
4084         * mini.c (mini_create_ftnptr): New helper function, moved here from
4085         object.c.
4086         (mini_get_addr_from_ftnptr): Ditto.
4087         (mini_init): Install the new helpers.
4088
4089 2009-05-28  Martin Baulig  <martin@ximian.com>
4090
4091         Correctly initialize the debugger when embedding Mono.
4092
4093         * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
4094         `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
4095         see documentation in mini_debug_running_inside_mdb().
4096
4097         * debug-debugger.c
4098         (mini_debug_running_inside_mdb): New function to check whether
4099         we're running inside mdb.
4100
4101         * mini.c (mini_init): Call mini_debugger_init() if we're running
4102         inside the debugger.
4103
4104         * driver.c (mono_main): Moved the call to mini_debugger_init()
4105         into mini_init() to make this work when embedding Mono.
4106
4107         * debug-debugger.c (mini_debugger_init): Warn about duplicate
4108         calls to mini_debugger_init().
4109
4110         * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
4111         mono_debugger_main() -> mini_debugger_main() and put them inside a
4112         `MONO_DEBUGGER_SUPPORTED' conditional.
4113
4114 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
4115
4116         * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
4117         this is no longer in use.
4118         * mini.h: Same.
4119
4120 2009-05-26  Zoltan Varga  <vargaz@gmail.com>
4121
4122         * mini-sparc.c (add_outarg_load): Fix the sparc build.
4123
4124         * aot-compiler.c (emit_method_code): Always write out C style symbols for
4125         methods.
4126
4127 2009-05-27  Martin Baulig  <martin@ximian.com>
4128
4129 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
4130
4131         * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
4132         long_conv_to_r_un to 64 bits.
4133
4134         * cpu-x86.md: Increase the instruction size due to the changes.
4135
4136         * iltests.il.in: Add regression test.
4137
4138         Fixes #467201.
4139
4140 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
4141
4142         * objects.cs: Move the previous test from basic.cs to here.
4143
4144 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
4145
4146         * basic.cs: Add regression test for #506915.
4147
4148 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
4149
4150         * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
4151         optimization we must check the bb of the first byte of stobj as
4152         it's the only one set in cil_offset_to_bb.
4153
4154         Fixes #506915.  
4155
4156 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
4157
4158         * image-writer.c: Fix pointer directive on ppc64.
4159
4160 2009-05-24  Zoltan Varga  <vargaz@gmail.com>
4161
4162         * image-writer.c (asm_writer_emit_section_change): Avoid using
4163         .bss subsections on ppc too.
4164
4165 2009-05-23  Zoltan Varga  <vargaz@gmail.com>
4166
4167         * image-writer.c: Fix the definition of TARGET_ASM_....
4168         
4169         * image-writer.c: Fix the emission of assembler directives in the last
4170         change.
4171
4172         * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
4173         exception throwing code to accomodate ppc64.
4174
4175         * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
4176         size to work on ppc64 too.
4177
4178         * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
4179         too.
4180
4181         * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
4182         the assembler dialect instead of using platform specific defines.
4183
4184 2009-05-22  Geoff Norton  <gnorton@novell.com>
4185
4186         * mini-arm.c (get_call_info): If a structure is split between the stack
4187         and argument registers, we should not advance the stack pointer by the entire
4188         native size, but just by the amount that spilled.
4189
4190 2009-05-22  Zoltan Varga  <vargaz@gmail.com>
4191
4192         * mini-arm.c (get_call_info): Handle structures with alignment requirements
4193         correctly.
4194
4195 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
4196
4197         * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
4198         wrappers normally.
4199         
4200         * aot-compiler.c (add_extra_method): Fix up the collection of extra
4201         methods so wrapper don't get added twice.
4202         (add_generic_instances): Don't add methods of arrays.
4203
4204         * generics.cs: Mark one test as !FULLAOT.
4205
4206 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
4207
4208         * mini-x86.c (emit_move_return_value): Remove unused vars.
4209
4210 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
4211
4212         * mini-x86.c (mono_arch_emit_call): The decompose code now supports
4213         decomposing 8 bytes structs into a LCALL.
4214
4215         * mini-x86.c (emit_move_return_value): We no longer push the vtype
4216         pointer for where to store the returned regs.
4217
4218         * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
4219         state the concern.
4220
4221         Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
4222
4223 2009-05-20  Miguel de Icaza  <miguel@novell.com>
4224
4225         * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
4226         without getenv.
4227
4228 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
4229
4230         * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
4231
4232         * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
4233         generics.
4234
4235 2009-05-20 Rodrigo Kumpera  <rkumpera@novell.com>
4236
4237         * local-propagation.c (mono_local_cprop): Avoid local propagation
4238         across paired add/sub if the first instruction dest reg is it's
4239         source reg. For example:
4240
4241         int_add_imm R12 <- R12 [1] clobbers: 1
4242         int_sub_imm R42 <- R12 [1] clobbers: 1
4243
4244         The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
4245         maintain the math identify.
4246
4247         Fixes #505375.
4248
4249 2009-05-20  Andreia Gaita  <avidigal@novell.com>
4250
4251         * Makefile.am: avoid going on the network just to get the revision,
4252         use git log instead
4253
4254 2009-05-19  Massimiliano Mantione  <massi@ximian.com>
4255
4256         Fixed estimate for short branches on amd64 (they were off mark, and
4257         enabling call prolog-epilog instrumentations caused assertions).
4258         * mini.h (struct MonoBasicBlock): added max_length field to hold the
4259         estimate for the maximum length of this basic block.
4260         * mini-amd64.c:
4261         - mono_arch_emit_prolog: compute max_length for each basic block
4262           (instead of max_offset), and inflate size estimate also for entry bb
4263           in case of code instrumentation.
4264         - mono_arch_output_basic_block: get rid of "cpos" (the current
4265           estimated "position" in the code), and always use "offset" instead,
4266           which is accurate; at the beginning of the function quickly recompute
4267           max_offset for all the remaining blocks, starting from the current
4268           cfg->code_len (which is correct, and not estimated) and using the
4269           estimated block lengths computed previously.
4270
4271 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
4272
4273         * exceptions-ppc.c: Remove the caching from the trampoline creation 
4274         functions, it is already done in the caller.
4275
4276         * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
4277
4278         * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add 
4279         MONO_ARCH_GSHARED_SUPPORTED define.
4280
4281         * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
4282
4283         * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
4284         function.
4285
4286 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
4287
4288         * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the 
4289         call to mono_marshal_get_rgctx_invoke ().
4290
4291         * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
4292         mono_marshal_get_static_rgctx_invoke (), all platforms which support
4293         gshared use the static rgctx trampolines now.
4294         
4295         * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
4296         platform supports it.
4297
4298 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
4299
4300         * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
4301
4302         * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
4303
4304 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
4305
4306         * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
4307
4308         * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
4309         for ppc.
4310
4311 2009-05-15  Massimiliano Mantione  <massi@ximian.com>
4312
4313         Made it possible for mono_arch_instrument_epilog to preserve
4314         argument registers, otherwise instrumenting the "epilogue" before
4315         a tail call would clobber them.
4316         * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
4317         if like mono_arch_instrument_epilog but with an additional parameter
4318         that states if argument registers must be preserved.
4319         * mini.c: implemented mono_arch_instrument_epilog as a call to
4320         mono_arch_instrument_epilog_full without asking to preserve argument
4321         registers (this makes the existing code work as usual).
4322         * mini-amd64.c:
4323         - mono_arch_instrument_epilog: add parameter to transform it into
4324         mono_arch_instrument_epilog_full, and preserve argument registers
4325         when required.
4326         - mono_arch_output_basic_block, OP_TAILCALL case: call
4327         mono_arch_instrument_epilog_full.
4328         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4329         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
4330         only transformed mono_arch_instrument_epilog into
4331         mono_arch_instrument_epilog_full.
4332
4333 2009-05-15  Geoff Norton  <gnorton@novell.com>
4334
4335         * mini-darwin.c: This works on arm now.
4336
4337 2009-05-14  Geoff Norton  <gnorton@novell.com>
4338
4339         * jit.h, driver.c: Allow full-aot to be decided programatically by the
4340         embedding api.
4341
4342 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
4343
4344         * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
4345         label names.
4346
4347         * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
4348         wrappers during full aot mode correctly.
4349
4350         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
4351         methods correctly.
4352
4353         * aot-compiler.c (mono_aot_method_hash): Use our internal version of
4354         mono_metadata_type_hash ().
4355
4356 2009-05-14  Massimiliano Mantione  <massi@ximian.com>
4357
4358         * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
4359         mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
4360         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
4361         Removed MONO_INST_BRLABEL from the instruction flags, and the
4362         remaining code that used it, because we do not support branches inside
4363         basic blocks (and branch target labels) anymore.
4364         * Makefile.am: As part of the above cleanup, remove reference to
4365         BURG files which don't exist anymore.
4366
4367 2009-05-14  Zoltan Varga  <vargaz@gmail.com>
4368
4369         * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
4370         osx.
4371
4372         * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
4373         to use mono_arch_throw_corlib_exception.
4374
4375         * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use 
4376         mono_arch_throw_corlib_exception for throwing corlib exceptions.
4377
4378         * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
4379         domain mempool.
4380
4381         * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
4382
4383         * aot-compiler.c: Emit a local symbol prefixed with the assembly name 
4384         for the got to make debugging easier and to avoid confusing it with the
4385         system got.
4386         
4387         * aot-compiler.c (emit_method_code): Emit a C style symbol for each
4388         method so a breakpoint can be set when using gdb.
4389
4390 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
4391
4392         * aot-compiler.c (mono_aot_method_hash): Implement this properly based
4393         on mono_method_get_imt_slot ().
4394
4395         * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
4396         num_decodes variables.
4397
4398         * aot-compiler.c (mono_aot_method_hash): Revert part of the last
4399         change as it doesn't seem to work.
4400         
4401         * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
4402         wrappers.
4403
4404 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
4405
4406         * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill 
4407         MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
4408
4409         * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
4410         builder when using full aot.
4411
4412         * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
4413         here, it is already handled.
4414         
4415         * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
4416         correctly for IMT.
4417
4418         * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
4419
4420         * mini-arm.h: Enable IMT for full aot.
4421         
4422         * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
4423         arch doesn't support it.
4424
4425         * mini.c (mini_init): Don't disable IMT for full aot if the
4426         architecture supports it.
4427
4428         * mini.h (MonoAotTrampoline): New enum containing the different types
4429         of 'numerous' trampolines.
4430         (MONO_AOT_FILE_VERSION): Bump this.
4431
4432         * aot-compiler.c aot-runtime.c: Unify the handling of specific and
4433         static rgctx trampolines. Add support for full-aot IMT thunks.
4434
4435         * mini-amd64.h: Enable IMT for full aot.
4436
4437         * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
4438         to exclude tests belonging to a category.
4439
4440         * generics.cs: Mark some tests with a !FULLAOT category.
4441
4442         * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
4443         generics tests.
4444
4445 2009-05-11  Zoltan Varga  <vargaz@gmail.com>
4446
4447         * aot-compiler.c (emit_and_reloc_code): Move the implementation of
4448         MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
4449         (emit_plt): Fix a warning.
4450
4451 2009-05-10  Zoltan Varga  <vargaz@gmail.com>
4452
4453         * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
4454         back into aot-compiler.c to a place where the other functions shared by
4455         the runtime and aot compiler are.
4456         
4457         * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
4458         as done previously, instead of in MonoAotFileInfo, since pointers might have
4459         alignment requirements.
4460
4461         * mini.h: Bump AOT file format version.
4462
4463 2009-05-10  Miguel de Icaza  <miguel@novell.com>
4464
4465         * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
4466         that is used at runtime from the aot-compiler.c, this makes it
4467         work on setups that remove the AOT compiler from the output
4468         image. 
4469
4470 2009-05-09  Zoltan Varga  <vargaz@gmail.com>
4471
4472         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
4473         PPC.
4474
4475         * mini-ppc.h: Enable static rgctx trampolines for ppc.
4476
4477         * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
4478
4479         * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific 
4480         stuff to mono_arch_decompose_long_opts ().
4481         (mono_decompose_opcode): Remove some dead code.
4482
4483 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
4484
4485         * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
4486         cmethod can be null for quite a some reasons.
4487
4488 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
4489
4490         * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
4491
4492 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
4493
4494         * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
4495
4496 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
4497
4498         * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
4499         (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
4500         whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
4501         calls returning structures by addr on amd64.
4502
4503         * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
4504
4505         * iltests.il.in: Restructure the tail call tests a bit.
4506         
4507 2009-05-07  Zoltan Varga  <vargaz@gmail.com>
4508
4509         * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
4510         for virtual methods too.
4511
4512 2009-05-06  Raja R Harinath  <harinath@hurrynot.org>
4513
4514         * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
4515         due to regression in verifying System.dll.
4516
4517 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
4518
4519         * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
4520         in dynamic methods.
4521
4522         * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
4523         instances.
4524
4525         * aot-compiler.c aot-runtime.c: Use our own hash function instead of
4526         g_str_hash () which can change.
4527
4528         * driver.c (mini_regression): Disable optimizations not supported by
4529         the cpu. Fixes #500019.
4530
4531         * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
4532         build.
4533
4534 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
4535
4536         * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
4537         to the latest LLVM code.
4538
4539 2009-05-05  Zoltan Varga  <vargaz@gmail.com>
4540
4541         * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
4542
4543 2009-05-04  Zoltan Varga  <vargaz@gmail.com>
4544
4545         * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on 
4546         x86/amd64.
4547
4548         * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
4549         no longer saving offsets, so just save the patch types along with the other
4550         info.
4551         * aot-runtime.c (load_patch_info): Update after the changes to 
4552         encode_patch_list ().
4553         (decode_got_entry): Removed, merged into load_patch_info ().
4554         (is_shared_got_patch): Removed, call the same function from
4555         aot-compiler.c.
4556
4557         * mini.h: Bump aot file format version.
4558         
4559         * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
4560         half-finished no-dlsym code.
4561
4562         * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
4563         option.
4564
4565         * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the 
4566         MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
4567
4568 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
4569
4570         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
4571         buffer length to work with AOT code.
4572
4573         * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
4574         ldfld/stfld opcodes.
4575
4576         * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
4577         as it is not used.
4578
4579         * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
4580
4581         * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
4582
4583         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
4584         LLVM API.
4585
4586         * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
4587         if needed. Don't decompose long operations when using llvm.
4588
4589 2009-05-01  Zoltan Varga  <vargaz@gmail.com>
4590
4591         * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
4592         PAGESIZE constant.
4593
4594         * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
4595
4596 2009-05-03  Martin Baulig  <martin@ximian.com>
4597
4598         * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
4599         mono_debugger_insert_method_breakpoint() since the class init
4600         handler we're inserting at the top of the method already gives us
4601         a notification.
4602
4603 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
4604
4605         * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
4606         to mono_arch_decompose_long_opts () for x86 and arm.
4607
4608 2009-04-29  Zoltan Varga  <vargaz@gmail.com>
4609
4610         * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
4611         TARGET_AMD64 here.
4612
4613 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
4614
4615         * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
4616         JIT code.
4617
4618 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
4619
4620         * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
4621         number of trampolines used in full-aot mode.
4622
4623         * aot-compiler.c: Add an ntrampolines option to set the number of 
4624         trampolines emitted in full-aot mode.
4625
4626 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
4627
4628         * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
4629         a volatile load. Get rid of get_tempname (), llvm assigns names
4630         automatically.
4631
4632         * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
4633         builder function.
4634
4635         * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
4636         a value.
4637
4638         * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
4639         level 1.
4640
4641         * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
4642         to the same register as a fixed sreg2. Fixes #497271.
4643
4644         * iltests.il.in: Add a new test.
4645
4646 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
4647
4648         * mini-amd64.c: Use moves instead of pushes for passing arguments on the
4649         stack, since pushes complicate exception handling.
4650
4651         * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
4652         the stack if they are passed using moves.
4653
4654         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
4655
4656         * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
4657         when using llvm.
4658
4659         * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the 
4660         icalls themselves. Convert arguments of FCOMPARE. Convert the destination
4661         of FMOVE if it is an R4.
4662
4663 2009-04-25  Zoltan Varga  <vargaz@gmail.com>
4664
4665         * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
4666
4667         * mini.h (LLVMCallInfo): New structure to store calling convention 
4668         information for the LLVM back end similar to the CallInfo structures in 
4669         the back-ends.
4670
4671         * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
4672         call information in a format usable by LLVM.
4673         (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
4674
4675         * method-to-ir.c (mono_emit_call_args): Emit calls using 
4676         mono_llvm_emit_call () when compiling using LLVM.
4677
4678         * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
4679         comments to all functions. Fix memory leaks. Add a public init/cleanup
4680         function.
4681
4682         * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
4683
4684         * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
4685         mono_array_new_va () jit icall.
4686         
4687 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
4688
4689         * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
4690         multiple machine description files to be specified.
4691         * mini-ops.h: fixes for cross-compilation.
4692
4693 2009-04-22  Miguel de Icaza  <miguel@novell.com>
4694
4695         * aot-runtime.c (make_writable): Use mono_mprotect to simplify
4696         some porting work.
4697
4698 2009-04-22  Zoltan Varga  <vargaz@gmail.com>
4699
4700         * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
4701         to prevent asserts in various passes. Fixes #497220.
4702
4703 2009-04-21  Zoltan Varga  <vargaz@gmail.com>
4704
4705         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
4706         a racy assert.
4707
4708         * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
4709         table to avoid duplicates.
4710
4711         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4712         
4713         * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
4714         option is used.
4715
4716 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
4717
4718         * mini.c (mini_method_verify): Fail fulltrust code if the exception
4719         is for method or field access.
4720
4721 2009-04-20  Zoltan Varga  <vargaz@gmail.com>
4722
4723         * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
4724         a Value to stdout.
4725
4726         * mini-llvm.c (mono_llvm_emit_method): Use it.
4727         
4728         * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
4729         (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
4730         on volatile values.
4731
4732         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for 
4733         synchronized methods.
4734
4735         * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
4736
4737         * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
4738
4739         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
4740         OP_LOADI8_MEM.
4741
4742         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
4743         allowing some options to be set dynamically.
4744
4745 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
4746
4747         * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
4748         unconditional branch.
4749
4750         * mini.h (MonoTrampolineType): Add new trampoline type 
4751         'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
4752         compiled code.
4753
4754         * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline 
4755         function.
4756
4757         * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
4758         creation function.
4759
4760         * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
4761         is enabled. Instead, use the llvm vcall trampoline.
4762         
4763         * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
4764
4765         * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
4766         
4767         * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
4768         functions.
4769
4770         * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of 
4771         MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
4772
4773         * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
4774         OP_IA64_CSET opcode.
4775
4776         * mini.c: Fix a warning.
4777
4778         * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
4779         THROW to the appropriate llvm type.
4780
4781 2009-04-18  Zoltan Varga  <vargaz@gmail.com>
4782
4783         * mini.c (mini_method_compile): Add statistics for methods JITted
4784         with/without LLVM.
4785
4786 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
4787
4788         * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
4789         OP_IA64_CMP_<cond>_IMM opcodes.
4790
4791 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
4792
4793         * mini-llvm.c (emit_cond_system_exception): Implement throwing of
4794         corlib exceptions.
4795
4796         * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
4797         correctly.
4798
4799         * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
4800         GENERICINST.
4801
4802 2009-04-17  Atsushi Enomoto  <atsushi@ximian.com>
4803
4804         * mini-exceptions.c : add thread id to EXCEPTION trace message.
4805
4806 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
4807
4808         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
4809         support.
4810
4811         * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
4812         rgctx invoke trampolines for x86.
4813
4814         * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
4815         indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
4816         (mono_arch_get_vcall_slot): Simplify this.
4817
4818 2009-04-16  Zoltan Varga  <vargaz@gmail.com>
4819
4820         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
4821         mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
4822
4823 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
4824
4825         * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx 
4826         trampolines for ARM. Add full-aot support for delegate invokes for ARM.
4827
4828         * mini-trampolines.c (mono_magic_trampoline): Fix the build.
4829
4830         * liveness.c (visit_bb): Remove a needless assert.
4831
4832 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
4833
4834         * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
4835         full aot support to the arch specific code.
4836
4837         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
4838
4839         * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
4840
4841         * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
4842         
4843         * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
4844         collect information about the delegate invoke impl trampolines.
4845
4846         * mini.h (MonoAotTrampInfo): New structure collecting the information needed
4847         to save trampolines during full-aot mode.
4848
4849         * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
4850         creation function which returns a trampoline which sets the rgctx
4851         argument.
4852         (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
4853         wrapper if possible.
4854         (mono_delegate_trampoline): Ditto.
4855
4856         * mini.c (mono_jit_runtime_invoke): Ditto.
4857
4858         * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
4859         
4860         * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
4861
4862         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4863         
4864 2009-04-12  Zoltan Varga  <vargaz@gmail.com>
4865
4866         * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
4867         just setting the opcode to OP_NOP.
4868
4869 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
4870
4871         * mini.c (mini_method_compile): Put the last change inside an 
4872         #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
4873         
4874         * mini.c (mini_method_compile): Disable sharing of stack slots/registers
4875         and extend live ranges to cover the whole method when using xdb.
4876
4877         * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
4878         do it in the trampolines.
4879
4880         * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
4881         needed.
4882
4883         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
4884         
4885         * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
4886         call code in full-aot mode since IMT is disabled there.
4887         (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
4888         new JIT no longer has that restriction.
4889
4890         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4891
4892         * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
4893         a more compact format.
4894         (mono_aot_wrapper_name): New function to return a unique name for a
4895         wrapper method, also used by the AOT runtime.
4896
4897         * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
4898         aot-compiler.c.
4899
4900         * aot-compiler.c (add_generic_class): Add the helper methods from T[]
4901         when a ICollection<T> etc is encountered.
4902         (add_generic_instances): Process method arguments/locals too.
4903         (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
4904         trampoline names.
4905
4906         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
4907         
4908 2009-04-10  Zoltan Varga  <vargaz@gmail.com>
4909
4910         * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
4911
4912         * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
4913
4914         * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
4915         representing the result of the decomposition. Nullify instructions
4916         instead of setting them to OP_NOP since nops can't have registers
4917         set.
4918
4919 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
4920
4921         * aot-compiler.c (mono_compile_assembly): Split this huge function into
4922         smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
4923         info. Strip 'mapping symbols' on ARM.
4924
4925         * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
4926         
4927         * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
4928         this with the native genmdesc.
4929
4930 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
4931
4932         * aot-runtime.c:  Fixing the MSVC build.
4933
4934         Code is contributed under MIT/X11 license.
4935
4936 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
4937
4938         * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since 
4939         JITted code depends on it.
4940
4941 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
4942
4943         * aot-compiler.c: Use new MonoGenericParam accessors.
4944
4945 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
4946
4947         Reduce memory usage and improve correctness wrt MonoGenericParam
4948         * aot-runtime.c (decode_klass_ref): Simplify generic parameter
4949         handing.  Avoid allocating MonoGenericParams, but use the ones in
4950         the container itself.
4951
4952 2009-04-07  Miguel de Icaza  <miguel@novell.com>
4953
4954         * tasklets.c: Return exceptions in the out argument.
4955
4956 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
4957
4958         * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
4959         opcode. Use pointer types in more places instead of casting them to 
4960         integers.
4961
4962         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
4963         optimizations.
4964         (mono_llvm_optimize_method): New helper function to optimize a method.
4965
4966         * method-to-ir.c (mono_emit_widen_call_res): Extract the call result 
4967         widening code so it could be called from more places.
4968         (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
4969         code paths in the call opcodes.
4970
4971 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
4972
4973         * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
4974
4975 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
4976
4977         * dwarfwriter.c: Use _ to separate class name 
4978         components as gdb can't handle '.'. Represent reference variables
4979         as 'class <NAME>&'.
4980         
4981         * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
4982
4983         * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
4984         
4985         * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
4986
4987         * gc-test.cs: New file with GC stack marking tests.
4988         
4989         * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
4990         negative numbers for vfp.
4991
4992         * basic-float.cs: Add a test.
4993         
4994 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
4995
4996         * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
4997
4998 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
4999
5000         * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
5001         part of tasklet/continuation support.
5002
5003 2009-04-05  Zoltan Varga  <vargaz@gmail.com>
5004
5005         * mini-llvm.c (mono_llvm_emit_method): Move the handling of
5006         amd64 opcodes inside an ifdef.
5007
5008         * dwarfwriter.c: Emit inheritance information for classes, emit fields
5009         of complex types.
5010         
5011         * dwarfwriter.c (emit_type): Emit the class info for classes.
5012
5013 2009-04-04  Zoltan Varga  <vargaz@gmail.com>
5014
5015         * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
5016
5017         * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
5018
5019         * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
5020
5021         * ssa.c (mono_ssa_compute): Fix some memory leaks.
5022
5023 2009-04-03  Zoltan Varga  <vargaz@gmail.com>
5024
5025         * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
5026
5027         * mini-llvm.c: Update comments.
5028
5029         * mini.h (COMPILE_LLVM): New macro.
5030
5031         * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
5032
5033         * ssa.c (mono_ssa_compute): Ditto.
5034         
5035         * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
5036         the unwind ops from a DWARF FDE.
5037
5038         * mini-llvm.c: Implement generation of unwind info for LLVM compiled
5039         methods by extracting the dwarf unwind ops from the unwind info generated
5040         by LLVM.
5041         
5042         * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
5043         calls.
5044
5045         * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
5046         addressing modes.
5047
5048 2009-04-02  Zoltan Varga  <vargaz@gmail.com>
5049
5050         * Makefile.am (llvm_sources): Enable this.
5051
5052         * mini.c (mini_method_compile): Add support for compiling with LLVM, 
5053         failing back to the JIT if something cannot be handled.
5054
5055         * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
5056         compiling with LLVM.
5057
5058         * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
5059         compiling with LLVM.
5060
5061         * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when 
5062         compiling with LLVM.
5063
5064         * mini-ops.h: Add a few opcodes needed by LLVM.
5065
5066         * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
5067         has no unwind info.
5068
5069         * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
5070         backend.
5071
5072         * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
5073
5074         * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
5075
5076 2009-04-01  Mark Probst  <mark.probst@gmail.com>
5077
5078         * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
5079         ridiculously large methods.
5080
5081 2009-03-31  Martin Baulig  <martin@ximian.com>
5082
5083         * debug-debugger.c (debugger_remove_breakpoint): Call
5084         mono_debugger_remove_class_init_callback ().
5085
5086 2009-03-31  Zoltan Varga  <vargaz@gmail.com>
5087
5088         * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
5089         right before emitting code, not at the start.
5090
5091         * mini.c (mono_postprocess_patches): Extract this into a separate function
5092         from mono_codegen ().
5093
5094         * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
5095         byref types correctly.
5096
5097 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
5098
5099         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
5100         by the last change.
5101
5102 2009-03-29  Zoltan Varga  <vargaz@gmail.com>
5103
5104         * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before 
5105         indirect calls, this avoids problems where get_vcall_slot () would get
5106         confused by the native code for the instruction preceeding the call.
5107         (mono_arch_get_vcall_slot): Simplify this.
5108         (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
5109
5110         * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
5111         register allocator now seems to depend on them instead of the data in
5112         cpu-<ARCH>.md.
5113
5114         * mini.c (mini_method_compile): Throw the correct type of exception if
5115         mono_method_get_header () fails because of a loading error.
5116
5117 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
5118
5119         * mini.c (mini_method_compile): Clear the loader error if the method
5120         header cannot be decoded.
5121
5122         * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual 
5123         interface methods on proxies correctly.
5124
5125         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
5126         this argument for vtype methods. Add precise liveness info for arguments.
5127
5128         * mini-codegen.c (mono_print_ins_index): Print the vreg of the
5129         LIVERANGE_START/END opcodes.
5130
5131         * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
5132         for arguments and values in registers.
5133
5134 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
5135
5136         * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
5137         return a valuetype. Fixes #487518.
5138
5139         * iltests.il: Add a test.
5140         
5141         * aot-compiler.c: Use mono_thread_create () to create helper threads.
5142
5143         * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
5144         closed over a null reference correctly.
5145
5146 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
5147
5148         * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
5149
5150 2009-03-25  Mark Probst  <mark.probst@gmail.com>
5151
5152         * mini-codegen.c (mono_local_regalloc): Don't let sregs get
5153         allocated to the same registers as fixed sregs.
5154
5155 2009-03-24  Mark Probst  <mark.probst@gmail.com>
5156
5157         * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
5158         ATOMIC_CAS_IMM ops.
5159
5160         * method-to-ir.c: Handle more cases for
5161         Interlocked.CompareExchange.
5162
5163         * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
5164         mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
5165         ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
5166
5167 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
5168
5169         * aot-runtime.c (decode_method_ref): Fix a warning.
5170
5171         * unwind.c (mono_unwind_frame): Ditto.  
5172
5173 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
5174
5175         * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
5176         (mono_compile_assembly): Enable the binary writer for full-aot as well.
5177
5178         * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
5179         fix the handling of large values in the ALU_PC_G0_NC relocation.
5180
5181 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
5182
5183         * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
5184
5185 2009-03-22  Mark Probst  <mark.probst@gmail.com>
5186
5187         * method-to-ir.c (mono_spill_global_vars): Support for ternary
5188         ops.
5189
5190 2009-03-22  Mark Probst  <mark.probst@gmail.com>
5191
5192         * method-to-ir.c: MINI_OP3 needs a comma.
5193
5194         * method-to-ir.c, mini.h, mini.c: Remove
5195         mono_init_op_sreg_counts ().
5196
5197 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
5198
5199         * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
5200         OP_JMP.
5201         
5202         * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
5203         assertion.
5204
5205         * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
5206
5207         * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
5208         code somewhat.
5209
5210 2009-03-21  Mark Probst  <mark.probst@gmail.com>
5211
5212         * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
5213         liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
5214         mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
5215         operations.
5216
5217 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
5218
5219         * driver.c: Change location of gc_wrapper.h.
5220
5221         * method-to-ir.c (mono_find_block_region): Handle try clauses nested
5222         inside finally clauses correctly. Fixes #485721.
5223
5224         * mini.c (mono_find_spvar_for_region): This needs to handle try regions
5225         after the change above.
5226
5227         * exceptions.cs: Add a test.
5228         
5229 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
5230
5231         * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
5232
5233         * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
5234         into cfg->used_int_regs, it is not needed with the dwarf unwinder.
5235         (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
5236
5237         * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
5238         the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
5239
5240 2009-03-19  Sebastien Pouliot  <sebastien@ximian.com>
5241
5242         * method-to-ir.c: Allow CoreCLR to throw FieldAccessException. 
5243         Simplify logic for ensure_method_is_allowed_to_call_method. 
5244         Handle wrappers on callers.
5245
5246 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
5247
5248         * Makefile.am (fullaotcheck): Don't run the generics tests, some of
5249         them don't run yet.
5250
5251         * basic-simd.cs: Fix the names of some test methods.
5252
5253 2009-03-18  Geoff Norton  <gnorton@novell.com>
5254
5255         * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
5256
5257 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
5258
5259         * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
5260
5261 2009-03-17  Jb Evain  <jbevain@novell.com>
5262
5263         * driver.c: remove now uneeded call to mono_gc_base_init before
5264         mono_profiler_load.
5265
5266 2009-03-17  Jb Evain  <jbevain@novell.com>
5267
5268         * dwarfwriter.c (token_handler): handle more cases.
5269
5270 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com> 
5271
5272         * method-to-ir.c: Remove more dead code (that was required only
5273         because of method_is_safe). Fix compiler warnings.
5274
5275 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
5276
5277         * method-to-ir.c: Remove unneeded/useless method_is_safe
5278         http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
5279
5280 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
5281
5282         * mini.c (mini_method_compile): Print the method been compiled with
5283         verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
5284         for people not familiar with the runtime.
5285
5286 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
5287
5288         * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
5289         a managed object which is later put into a GList. Return its class instead.
5290
5291         * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
5292         stack slots when using sgen.
5293
5294 2009-03-16  Zoltan Varga  <vargaz@gmail.com>
5295
5296         * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
5297
5298 2009-03-14  Zoltan Varga  <vargaz@gmail.com>
5299
5300         * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
5301         > so it works on the first vreg as well.
5302
5303 2009-03-13  Zoltan Varga  <vargaz@gmail.com>
5304
5305         * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
5306         trigger randomly.
5307
5308         * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
5309         
5310         * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
5311         implement GArray.
5312
5313 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
5314
5315         * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
5316         native->IL offset mapping.
5317
5318 2009-03-11  Zoltan Varga  <vargaz@gmail.com>
5319
5320         * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
5321
5322         * basic.cs: Add a test.
5323
5324 2009-03-11  Mark Probst  <mark.probst@gmail.com>
5325
5326         * mini-x86.c (mono_arch_output_basic_block): Use different
5327         registers in case the ones we want to overwrite are used by the
5328         other operand.  Fixes regression in #480807.
5329
5330 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
5331
5332         * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
5333
5334         * dwarfwriter.c (emit_line_number_info): The line number info for
5335         IL code was off by one. Fix that.
5336
5337         * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
5338         stack.
5339
5340 2009-03-09  Mark Probst  <mark.probst@gmail.com>
5341
5342         Contributed under the terms of the MIT/X11 license by Steven
5343         Munroe <munroesj@us.ibm.com>.
5344
5345         * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
5346         Fixes #483462.
5347
5348 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
5349
5350         * dwarfwriter.c (token_handler): Decode method references in non-wrappers
5351         as well.
5352
5353 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
5354
5355         * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
5356         the delegate ctor handling code. Fixes #482638.
5357         
5358         * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
5359         #481458.
5360
5361         * iltests.il.in: Add a test.
5362         
5363         * mini-darwin.c (mono_chain_signal): Remove this, it is already in
5364         mini-posix.c.
5365
5366 2009-03-05  Mark Probst  <mark.probst@gmail.com>
5367
5368         * mini-trampolines.c (mono_create_jump_trampoline): If the method
5369         is shared generic code, return the trampoline, even if the method
5370         has already been compiled.  Fixes #479763.
5371
5372         * mini.c, mini.h: New function
5373         mono_jit_find_compiled_method_with_jit_info() which is the same as
5374         mono_jit_find_compiled_method() but also returns the jit info.
5375
5376 2009-03-05  Mark Probst  <mark.probst@gmail.com>
5377
5378         * method-to-ir.c (mono_method_to_ir): Only force the vtable var
5379         for methods which actually have one.  For all other methods, make
5380         sure the this argument var is live the whole method.
5381
5382         * mini.c (mini_method_compile): Every shared method has a
5383         this/vtable/mrgctx info.  Fixes #480807.
5384
5385 2009-03-05  Mark Probst  <mark.probst@gmail.com>
5386
5387         * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
5388         generic/imt thunks where some entries branch through the vtable,
5389         while other entries branch directly.
5390
5391 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
5392
5393         * mini-darwin.c (mono_chain_signal): Define this to fix the build.
5394
5395         * mini-windows.c: Ditto.
5396         
5397         * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
5398         ctors.
5399
5400 2009-03-04  Zoltan Varga  <vargaz@gmail.com>
5401
5402         * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
5403         down an assert.
5404
5405 2009-03-04  Mark Probst  <mark.probst@gmail.com>
5406
5407         * method-to-ir.c: Don't inline methods that use JMP.  Fixes
5408         #481403.
5409
5410 2009-03-04  Mark Probst  <mark.probst@gmail.com>
5411
5412         * exceptions-x86.c: Include debug-mini.h - fixes build.
5413
5414 2009-03-04  Martin Baulig  <martin@ximian.com>
5415
5416         * debug-mini.c: Clean up the exception API and add documentation.
5417         (mono_debugger_handle_exception): New public method; this is
5418         called when throwing an exception or encountering an unhandled one.
5419         (mono_debugger_call_exception_handler): Formerly known as
5420         mono_debugger_handle_exception(); this is used to tell the
5421         debugger that we're about to invoke an exception handler.
5422
5423 2009-03-04  Martin Baulig  <martin@ximian.com>
5424
5425         * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
5426         ../metadata/mono-debug-debugger.c; save and reset exception state.
5427
5428 2009-03-02  Martin Baulig  <martin@ximian.com>
5429
5430         * debug-mini.c: Moved the debugger exception handling here from
5431         ../metadata/mono-debug-debugger.c.
5432
5433         * debug-mini.h
5434         (MonoDebuggerExceptionAction): New exception typedef.
5435
5436         * debug-mini.c
5437         (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
5438
5439         * exceptions-amd64.c
5440         (mono_amd64_throw_exception): Use the new debugger exception
5441         handling code.
5442
5443         * mini-exceptions.c
5444         (mono_handle_exception_internal): Don't call
5445         mono_debugger_unhandled_exception() here.
5446
5447 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
5448
5449         * mini.c aot-compiler.c: Update after the changes to 
5450         mono_marshal_get_runtime_invoke ().
5451
5452         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): 
5453         Virtual generic methods might not have method->slot set, work around
5454         that.
5455
5456         * generics.cs: Add a test.
5457
5458 2009-03-02  Geoff Norton  <gnorton@novell.com>
5459
5460         * mini.c:
5461         * driver.c: Allow signal chaining of SIGFPE as well.
5462
5463 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
5464
5465         * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
5466         this since it now receives the method not its generic context in the
5467         IMT reg.
5468
5469         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
5470         generic/imt thunks where some entries branch through the vtable, while
5471         other entries branch directly.
5472
5473         * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
5474
5475         * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call 
5476         support for interface methods as well.
5477
5478         * mini-trampolines.c: Add support for virtual generic methods in interfaces
5479         using the normal IMT thunks.
5480
5481         generics.cs: Add new tests.
5482         
5483         * method-to-ir.c (mono_method_to_ir): Pass the method instead of
5484         the generic inst to the generic imt thunks. This fixes AOT support, 
5485         improves consistency with the normal IMT thunks, and makes it easier to
5486         add support for interface generic virtual methods later.
5487
5488         * mini-trampolines.c (mono_magic_trampoline): Ditto.    
5489         
5490 2009-02-28  Zoltan Varga  <vargaz@gmail.com>
5491
5492         * driver.c (mono_set_signal_chaining): New public API function to enable
5493         signal chaining on POSIX platforms.
5494
5495         * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland 
5496         (si@lindenlab.com) to implement signal chaining. The original patch was
5497         contributed under the MIT X/11 license:
5498         https://bugzilla.novell.com/show_bug.cgi?id=318894
5499
5500 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
5501
5502         * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
5503         too until it can be made to run on amd64.
5504
5505 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
5506
5507         * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
5508         to  get_generic_context_from_code () + get_call_info () if possible.
5509
5510 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
5511
5512         * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
5513         suspend-on-sigsegv functionality.
5514
5515         * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
5516         to suspend when a native SIGSEGV is received. This is useful for debugging
5517         crashes which don't happen under gdb, since a live process contains more
5518         information than a core file.
5519
5520         * mini-exceptions.c (mono_print_thread_dump): Use 
5521         MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
5522
5523         * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
5524
5525         * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
5526         
5527         * basic-float.cs: Disable the tests which currently fail on amd64.
5528
5529         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null 
5530         value to mono_arch_patch_callsite () to fix crashes.
5531         
5532         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
5533
5534 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
5535
5536         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
5537         nop code by patching the call address to point to the nullified class init
5538         trampoline, as the former does not seem to be safe on SMP machines.
5539
5540 2009-02-23  Mark Probst  <mark.probst@gmail.com>
5541
5542         * mini-ops.h: Fix the argument types for a few x86 opcodes where
5543         they were wrong.
5544
5545 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
5546
5547         * basic-float.cs basic-calls.cs: Fix warnings.
5548
5549 2009-02-22  Mark Probst  <mark.probst@gmail.com>
5550
5551         * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
5552         correct frame pointer in the LMF.  Should fix #478394.
5553
5554 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
5555
5556         * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
5557
5558         * image-writer.c: Make the binary writer less verbose.
5559
5560 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
5561
5562         * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
5563         are called from runtime invoke wrappers.
5564
5565 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
5566
5567         * cpu-ppc.md (store_memindex): Increase the size of this.
5568
5569 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
5570
5571         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
5572
5573         * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
5574
5575         * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
5576         OP_LCONV_TO_R_UN.
5577
5578         Last fix for of #467201.
5579
5580
5581 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
5582
5583         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
5584
5585         * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
5586         and long_conv_to_r8_2:
5587
5588         Fixed part of #467201.
5589
5590 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
5591
5592         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
5593
5594         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
5595         conversion to 32 bits.
5596
5597         * cpu-x86.md: Increase the size of int_conv_to_r4.
5598
5599         * basic-float.cs: Add a test for this.
5600
5601         Fixed part of #467201.
5602
5603 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
5604
5605         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
5606
5607         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
5608         conversion to 64 bits.
5609
5610         * basic-float.cs: Add a test for this.
5611
5612         Fixed part of #467201.
5613
5614 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
5615
5616         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
5617
5618         * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
5619         This behavior is compatible with MS.
5620
5621         * iltest.il.in: Add a test for this.
5622
5623         Fixed part of #467201.
5624
5625 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
5626
5627         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
5628
5629         * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
5630         change the precision of the value.
5631
5632         * cpu-x86.md: Define len for float_conv_to_r4.
5633
5634         * basic-float.cs: Add a test for this.
5635
5636         Fixed part of #467201.
5637
5638 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
5639
5640         * mini.c: Adjust locking order to the new semantics where the loader lock
5641         comes first.
5642
5643 2009-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
5644
5645         * aot-runtime.c:
5646         * mini-amd64.c:
5647         * mini-arm.c:
5648         * mini-ia64.c:
5649         * mini-mips.c:
5650         * mini-ppc.c:
5651         * mini-sparc.c:
5652         * mini-trampolines.c:
5653         * mini-x86.c:
5654         * mini.c:
5655         * tramp-alpha.c:
5656         * tramp-amd64.c:
5657         * tramp-arm.c:
5658         * tramp-hppa.c:
5659         * tramp-ia64.c:
5660         * tramp-mips.c:
5661         * tramp-ppc.c:
5662         * tramp-s390.c:
5663         * tramp-s390x.c:
5664         * tramp-sparc.c:
5665         * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
5666
5667 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
5668
5669         * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
5670         as it is incorrect.
5671
5672 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
5673
5674         * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
5675         for cctors if needed.
5676
5677 2009-02-17  Mark Probst  <mark.probst@gmail.com>
5678
5679         * mini-ppc.c: Fix build on Darwin.
5680
5681 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
5682
5683         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
5684         version instead of 3 as valgrind doesn't like version 3.
5685
5686         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5687
5688         * aot-compiler.c (mono_aot_method_hash): New function to return a hash
5689         usable for hashing methods.
5690         (emit_extra_methods): Use the new hash to avoid putting every method in the
5691         same hash bucket.
5692
5693         * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
5694
5695         * aot-runtime.c (can_method_ref_match_method): New function to quickly check
5696         whenever a method ref could match a method.
5697         
5698         * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
5699         test to fail.
5700         
5701         * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded 
5702         methods refs.
5703
5704         * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
5705
5706         * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
5707         the encoding buffer.
5708
5709         * method-to-ir.c (mono_method_check_inlining): Avoid calling 
5710         mono_method_get_header () on inflated methods as an optimization.
5711
5712 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
5713
5714         * ssa.c (fold_ins): Fix another crash if the instruction following the
5715         switch was optimized away.
5716
5717 2009-02-16  Mark Probst  <mark.probst@gmail.com>
5718
5719         Contributed under the terms of the MIT/X11 license by Steven
5720         Munroe <munroesj@us.ibm.com>.
5721
5722         * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
5723
5724 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
5725
5726         * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
5727         around the mono_domain_alloc calls, it is now done by the functions
5728         themselves.
5729
5730         * aot-compiler.c (compile_method): Only add wrappers referenced by
5731         the method if compiling with full AOT.
5732         (mono_compile_assembly): Error out if --aot=full is specified on
5733         a platform where it is not supported.
5734
5735         * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
5736         on ARM too.
5737
5738         * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
5739         AOT support.
5740
5741         * aot-runtime.c (load_named_code): Handle 
5742         mono_arm_throw_exception_by_token.
5743
5744         * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
5745
5746         * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
5747         unaligned.
5748
5749         * Makefile.am (fullaotcheck): Exit if a test fails.
5750
5751         * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
5752         on ARM.
5753         (mono_compile_assembly): Handle the assembler failing.
5754
5755         * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
5756         accepting subsections of .bss.
5757
5758         * ssa.c (visit_inst): Fix a crash if the instruction following a switch
5759         was optimized away.
5760
5761         * aot-compiler.c: Remove some unused includes.
5762         
5763         * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
5764         now in MonoImageWriter.
5765
5766         * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
5767         code sequence which matches a non-virtual call. Fixes #472654.
5768
5769 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
5770
5771         * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
5772         xdebug code.
5773         
5774         * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
5775         use the image/dwarf writers directly.
5776
5777         * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
5778         field.
5779
5780         * aot-compiler.c (MonoAotCompile): Remove fields which are now in
5781         MonoDwarfWriter.
5782
5783         * image-writer.h: Fix some typos.
5784
5785         * dwarfwriter.h dwarfwriter.c: New files.
5786         
5787         * aot-compiler.c: Extract the DWARF info writing functionality into a 
5788         separate module.
5789
5790         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
5791         argument to return unwind info.
5792
5793         * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
5794
5795         * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
5796         
5797         * aot-runtime.c (decode_method_ref): Add a case for 
5798         MONO_AOT_METHODREF_WRAPPER_NAME.
5799
5800         * mini.h: Add constants for the magic numbers used in encode_method_ref ()
5801         for AOT.
5802
5803         * aot-compiler.c (encode_method_ref): Use the new constants.
5804
5805         * aot-runtime.c (decode_method_ref): Ditto.
5806
5807         * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
5808         be compiled, not the icall itself.
5809
5810 2009-02-14  Zoltan Varga  <vargaz@gmail.com>
5811
5812         * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
5813         using decode_method_ref ().
5814
5815         * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
5816         convert it to an in32. Fixes #475859.
5817
5818         * arrays.cs: Add a test.
5819
5820 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
5821
5822         * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
5823         OP_LCONV_TO_U2.
5824
5825         * basic-long.cs: Add a test.
5826
5827 2009-02-12  Mark Probst  <mark.probst@gmail.com>
5828
5829         * mini-x86.c, mini-x86.h: Very simple frame pointer removal.  We
5830         remove the frame pointer in leaf methods which don't receive any
5831         arguments, don't throw exceptions and don't do dynamic stack
5832         allocations.
5833
5834 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
5835
5836         * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
5837         the fail_tramp changes. Hopefully fixes #475132.
5838
5839 2009-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
5840
5841         * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
5842         instead of mono_metadata_signature_dup_full.
5843
5844 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
5845
5846         * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
5847         for processing jump tables. Fixes #473787.
5848
5849 2009-02-11  Mark Probst  <mark.probst@gmail.com>
5850
5851         * mini-generic-sharing.c: mini_method_get_context() just calls
5852         mono_method_get_context_general() now.
5853
5854         * mini.c, mini.h: Moved get_object_generic_inst(),
5855         construct_object_context_for_method() and
5856         mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
5857
5858 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
5859
5860         * branch-opts.c (mono_if_conversion): Handle the case where the merged 
5861         basic block fell through to its successor bblock without a branch. Fixes
5862         #474718.
5863
5864         * iltests.il.in: Add a test.
5865         
5866         * aot-compiler.c (encode_method_ref): Encode methods of array types.
5867         (can_encode_patch): We can now handle arrays of generic parameters and
5868         array methods.
5869
5870         * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
5871
5872         * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
5873         the AOT file to avoid some #ifdefs in aot-runtime.c
5874
5875         * mini.h: Bump AOT file format version.
5876
5877 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
5878
5879         * Makefile.am (fullaotcheck): Make this run the tests.
5880
5881         * aot-compiler.c: Make the printing of skipped methods runtime configurable.
5882
5883 2009-02-10  Mark Probst  <mark.probst@gmail.com>
5884
5885         * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
5886         individually.  Fixes #473482.
5887
5888 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
5889
5890         * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
5891
5892 2009-02-09  Jeffrey Stedfast  <fejj@novell.com>
5893
5894         * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
5895         (mono_compile_assembly): Hush compile warnings about
5896         uninitialized [tmp_]outfile_name variables in the !use_bin_writer
5897         code path.
5898
5899 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
5900
5901         * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
5902
5903         * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
5904
5905         * aot-compiler.c: Fix arm support.
5906
5907         * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
5908         img_writer_emit_unset_mode () function.
5909
5910         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
5911         (mono_unwind_get_dwarf_pc_reg): Ditto.
5912
5913         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
5914         Move almost all platform specific code to a set of arch_ functions, 
5915         and document them to ease porting.
5916         
5917         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
5918
5919         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
5920
5921         * aot-compiler.c: Extract the image writing functionality into a separate
5922         module to reduce the size of this file.
5923
5924 2009-02-09  Geoff Norton  <gnorton@novell.com>
5925
5926         * mini-s390.c: Fix the signature of emit_sig_cookie.
5927
5928 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
5929
5930         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
5931
5932         * aot-runtime.c (is_shared_got_patch): Ditto.
5933
5934         * aot-runtime.c (load_named_code): Cope with the fact that 
5935         decode_got_entry () won't decode the patch fully if its corresponding got
5936         entry is already filled.
5937         
5938         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
5939         Initialize *ji.
5940         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
5941
5942         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
5943         as the moving pointer instead of 'buf' for consistency with the rest of the
5944         codebase.
5945         (mono_arch_create_monitor_exit_trampoline): Ditto.
5946
5947         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
5948         generic_class_init trampolines.
5949         (add_generic_class): Extract some code from add_generic_instances () into a
5950         separate function so it can be called from other places too.
5951         (compile_method): Call add_generic_class () for the classes of inflated methods
5952         referenced by the method.
5953         (can_encode_patch): Allow references to generic parameters.
5954
5955         * aot-runtime.c: Add support the patches required by the new trampolines.
5956         
5957         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
5958         support.
5959
5960         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
5961         full-aot support.
5962
5963         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
5964         this from get_throw_pending_exception, make the signature full aot compatible.
5965
5966         * Makefile.am (fullaotcheck): New target to run full-aot tests.
5967
5968         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
5969
5970         * exceptions.cs: Add a test.
5971
5972 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
5973
5974         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
5975         use the DWARF_DATA_ALIGN constant instead.
5976
5977         * exception-<ARCH>.c: Update after the above change.
5978
5979         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
5980         dwarf unwinder.
5981
5982         * mini-arm.c: Enable the dwarf unwinder.
5983
5984         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
5985         instead of mono_class_setup_vtable ().
5986
5987 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
5988
5989         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
5990         dwarf unwinder.
5991
5992         * mini-x86.h: Enable the dwarf unwinder.
5993
5994 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
5995
5996         Fix mcs/tests/test-7.cs
5997         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
5998         2009-02-03.
5999
6000 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
6001
6002         * mini.c (print_jit_stats): Remove some unused statistics.
6003
6004 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
6005
6006         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
6007
6008 2009-02-05  Mark Probst  <mark.probst@gmail.com>
6009
6010         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
6011         the method we get from mono_object_get_virtual_method() because
6012         that function does it properly, now.
6013
6014 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
6015
6016         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
6017         opcodes. Fixes #472775.
6018
6019 2009-02-05  Mark Probst  <mark.probst@gmail.com>
6020
6021         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
6022         fact that mono_find_jit_info() sometimes returns the context
6023         corresponding to the jit info in new_ctx.  Fixes #472600.
6024
6025 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
6026
6027         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
6028         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
6029         klass->enum_basetype directly.
6030
6031         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
6032         enum subtypes.
6033
6034         * unwind.c: Avoid 0 sized arrays.
6035
6036 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
6037
6038         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
6039         size on systems with 64k pages. Fixes #471389.
6040
6041 2009-02-04  Mark Probst  <mark.probst@gmail.com>
6042
6043         Contributed under the terms of the MIT/X11 license by Steven
6044         Munroe <munroesj@us.ibm.com>.
6045
6046         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
6047         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
6048         necessary.
6049
6050 2009-02-04  Mark Probst  <mark.probst@gmail.com>
6051
6052         Contributed under the terms of the MIT/X11 license by Steven
6053         Munroe <munroesj@us.ibm.com>.
6054
6055         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
6056         comparison fix.
6057
6058         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
6059         The trampoline can be longer on PPC64.
6060
6061 2009-02-04  Mark Probst  <mark.probst@gmail.com>
6062
6063         Contributed under the terms of the MIT/X11 license by Steven
6064         Munroe <munroesj@us.ibm.com>.
6065
6066         * mini-ppc.c: Compiler warning fixes and trivial code
6067         simplifications.
6068
6069 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
6070
6071         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
6072         ins->dreg which could be a hardware register, not a vreg.
6073
6074         * aot-compiler.c (emit_method_dwarf_info): Ditto.
6075         
6076         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
6077         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
6078
6079         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
6080         
6081         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
6082         ->dreg, that is not the vreg we are looking for.
6083
6084         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
6085
6086         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
6087         LIVERANGE_END.
6088
6089         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
6090         strange crashes.
6091
6092 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
6093
6094         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
6095
6096         * aot-compiler.c (emit_line_number_info): Fix line number emission when
6097         the line diff is 0.
6098
6099         * aot-compiler.c: Add xdebug support on x86.
6100
6101         * unwind.c: Add x86 support.
6102         
6103         * aot-compiler.c (emit_exception_debug_info): Control the emission of
6104         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
6105
6106         * mini.c (mini_method_compile): Ditto.
6107         
6108         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
6109         the variable index.
6110
6111         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
6112         which mimic .push_section/.pop_section in GAS.
6113         
6114         * aot-compiler.c: Emit precise live range information for variables.
6115
6116         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
6117
6118         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
6119         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
6120         them.
6121
6122         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
6123         the live ranges of variables.
6124
6125         * mini.h (struct MonoMethodVar): Add two fields containing the live range
6126         of the variable in terms of native offsets.
6127
6128 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
6129
6130         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
6131         
6132 2009-02-02  Mark Probst  <mark.probst@gmail.com>
6133
6134         Contributed under the terms of the MIT/X11 license by Steven
6135         Munroe <munroesj@us.ibm.com>.
6136
6137         * exceptions-ppc.c (restore_regs_from_context): Correct operand
6138         order (offset then base reg) for ppc_load_multiple_regs.
6139         (emit_save_saved_regs) Correct operand order for
6140         ppc_store_multiple_regs.
6141         (mono_arch_get_call_filter): Correct operand order for
6142         ppc_load_multiple_regs.
6143
6144         * mini-ppc.c (emit_memcpy): Fix operand order for
6145         ppc_load_reg_update and ppc_store_reg_update.
6146         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
6147         (mono_arch_emit_epilog): Correct operand order for
6148         ppc_load_multiple_regs.
6149
6150         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
6151         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
6152
6153 2009-02-02  Mark Probst  <mark.probst@gmail.com>
6154
6155         * cpu-ppc64.md: Fixed storer4_memindex length.
6156
6157 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
6158
6159         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
6160         line number info.
6161         
6162         * aot-compiler.c (emit_line_number_info): Optimize this.
6163
6164 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
6165
6166         * aot-compiler.c: Disassemble tokens in the IL disassembly.
6167         
6168         * aot-compiler.c: Add debug info for methods without debug info by
6169         emitting an IL file and having the line number info referencing that file.
6170
6171         * aot-compiler.c: Optimize the size of the generated line number info.
6172
6173         * aot-compiler.c: Emit line number info in xdebug mode.
6174
6175         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
6176         million arguments.
6177
6178 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
6179
6180         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
6181
6182         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
6183         is used.
6184
6185 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
6186
6187         * basic-calls.cs: Test for the weird crash found on arm.
6188         
6189 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
6190
6191         * cpu-arm.md: Increase the size of storer8_membase_reg and
6192         loadr8_membase_reg to 24 bytes to accomodate the extra add.
6193
6194         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
6195         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
6196         reg to LR otherwise we'll be loading/storing from just the offset.
6197
6198 2009-01-30  Miguel de Icaza  <miguel@novell.com>
6199
6200         Question: if we are storing gint32's inside the "*native_offset",
6201         should we change the signature to "gint32 *native_offset" to
6202         ensure that we do not have type definition problems?
6203         
6204         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
6205         an int * as this is what the other function expects, causes
6206         problems with Freescale's compiler that defined int32_t to be a
6207         long and makes int incompatible 
6208
6209 2009-01-30  Miguel de Icaza  <miguel@novell.com>
6210
6211         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
6212         filename conflict with bjam.
6213
6214 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6215
6216         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
6217         as it might use decomposed ops.
6218
6219 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6220
6221         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
6222
6223         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
6224         is defined.
6225
6226         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
6227
6228         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
6229         offsets.
6230
6231         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
6232         way registers are stored in MonoContext on arm.
6233
6234         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
6235         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
6236
6237         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
6238
6239         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
6240
6241         * mini.c (mini_init): Register mono_isfinite.
6242
6243         * jit-icalls.c (mono_isfinite): New jit icall.
6244
6245         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
6246         
6247         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
6248         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
6249         the parent frame.
6250
6251 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6252
6253         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
6254         separate frame and stack pointers, so we must use FP to find the register
6255         spill area.
6256         The FP reg is retrieved from the MonoContext::regs array.
6257
6258 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6259
6260         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
6261         as FPA requires it.
6262
6263 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6264
6265         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
6266         return R4 and R8 when not running under softfloat.
6267
6268         Fixes basic-calls.exe
6269
6270 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6271
6272         * mini-arm.c: Implement some overflow opcodes.
6273
6274 2009-01-29  Miguel de Icaza  <miguel@novell.com>
6275
6276         * ssa.c: handle another alloca.h
6277
6278         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
6279         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
6280         MONO_ARCH_USE_SIGACTION. 
6281
6282         * aot-runtime.c, mini-exceptions.c: Replace platform define with
6283         capability defines.
6284
6285         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
6286
6287         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
6288         PPC targets as sigaction does not exist on all platforms, define
6289         this on a per-platform basis.
6290
6291         Instead of erroring out if the platform is not defined, include
6292         mini-ppc-os.h, and expect that the OS specific setting provides
6293         the required information.   
6294
6295 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6296
6297         * aot-compiler.c: Fix --enable-minimal=aot.
6298
6299 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6300
6301         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
6302         previous change.
6303
6304 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
6305
6306         * exceptions-arm.c: Fix warnings.
6307
6308         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
6309         ARM.
6310
6311         * mini-x86.c: Fix --enable-minimal=jit build.
6312
6313         * mini.c: Really fix --enable-minimal=jit build.
6314         
6315         * mini.c (construct_object_context_for_method): Move this outside
6316         the DISABLE_JIT block to fix the --enable-minimal=jit build.
6317
6318         "Backported" of r124984 from 2.0 branch.
6319         
6320         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
6321
6322         "Backport" of r124977 + r124978 from 2.0 branch.
6323         
6324         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
6325         to avoid calling mono_exception_from_token () from the throw trampoline.
6326         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
6327         for throwing corlib exceptions, this fixes full-aot support for corlib
6328         exceptions.
6329
6330         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
6331
6332 2009-01-29  Miguel de Icaza  <miguel@novell.com>
6333
6334         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
6335         part of the changes to split the code in mini into operating
6336         system specific files.
6337
6338         This patch was done by copying mini.c to the respective files to
6339         preserve SVN history.
6340
6341 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
6342
6343         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
6344
6345 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
6346
6347         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
6348         remoting-invoke-with-check wrappers of shared methods.
6349
6350         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
6351
6352 2009-01-27  Mark Probst  <mark.probst@gmail.com>
6353
6354         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
6355         optimization if the top of stack is the last instruction in the
6356         bblock.  Otherwise it might have been used after its definition.
6357         Fixes #469742.
6358
6359 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
6360
6361         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
6362         method as well when get_vcall_slot () fails to match a code sequence.
6363
6364         * mini-arm.c: Fix the android build, which doesn't have
6365         __aeabi_read_tp.
6366
6367 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
6368
6369         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
6370         the s390x build.
6371
6372 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
6373
6374         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
6375
6376 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
6377
6378         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
6379         and put its id into jinfo->used_regs. This is only used on amd64,
6380         which is currently the only platform generating unwind info.
6381
6382         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
6383         the dwarf unwinder. This is required to correctly handle async exceptions
6384         like thread abort and stack overflows, which can happen while a method
6385         is in the middle of its prolog or epilog.
6386         
6387         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
6388         the unwind info belonging to an AOTed method.
6389
6390         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
6391         into cfg->unwind_ops.
6392         
6393         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
6394
6395         * mini.c (mini_init): Call mono_unwind_init ().
6396         (mini_cleanup): Call mono_unwind_cleanup ().
6397
6398         * unwind.c: Add functions for managing a set of unwind info entries, allowing
6399         unwind info to be shared between methods.
6400
6401         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
6402         saved in the LMF.
6403
6404         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
6405         get_throw_pending_exception () to avoid initialization races.
6406
6407         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
6408         mono_arch_exceptions_init () function.
6409
6410         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
6411
6412 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
6413
6414         * mini.c (mono_get_domain_intrinsic): New helper function.
6415         (mono_get_thread_intrinsic): Ditto.
6416
6417         * mini-arm.c mini-ia64.c: Use the new helper functions.
6418         
6419         * method-to-ir.c (mono_method_to_ir): Fix the comment for
6420         the last constrained_call change, since it is needed in the non-AOT
6421         case as well.
6422
6423         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
6424         
6425         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
6426         mono_get_lmf_addr () on arm eabi linux.
6427
6428 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
6429
6430         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
6431         code sequence which matches a non-virtual call.
6432
6433 2009-01-23  Mark Probst  <mark.probst@gmail.com>
6434
6435         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
6436         stack pointer (r1).
6437
6438 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
6439
6440         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
6441         runtime-invoke wrappers, since they are also shared based on signature.
6442
6443 2009-01-22  Mark Probst  <mark.probst@gmail.com>
6444
6445         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
6446         info from the (correct) context.
6447
6448 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
6449
6450         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
6451         
6452         * unwind.c (mono_unwind_frame): New function to unwind through a frame
6453         using dwarf unwinding info. Not yet used.
6454
6455         * mini.c (mini_init): When using xdebug, disable freeing of domains.
6456
6457 2009-01-21  Mark Probst  <mark.probst@gmail.com>
6458
6459         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
6460         descriptors.
6461
6462         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
6463         special case and handle mono_arch_delegate_invoke_impl() returning
6464         function descriptors.
6465
6466         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
6467         trampolines return function descriptors, too.
6468
6469 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
6470
6471         * method-to-ir.c (handle_alloc): Avoid generic instances in the
6472         out_of_line optimization.
6473
6474 2009-01-21  Martin Baulig  <martin@ximian.com>
6475
6476         * mini.h
6477         (MonoCompile): Added `disable_deadce_vars' to disable removing
6478         unused variables.
6479
6480         * mini.c
6481         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
6482         inside the debugger.
6483
6484         * liveness.c (mono_analyze_liveness): Don't remove any unused
6485         variables if `cfg->disable_deadce_vars' is set.
6486
6487 2009-01-21  Mark Probst  <mark.probst@gmail.com>
6488
6489         * method-to-ir.c: Only apply exception constructor optimization if
6490         the the method actually belongs to an exception class.  Fixes
6491         #467456.
6492
6493 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
6494
6495         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
6496         change inside a #ifdef __mono_ppc64__.
6497
6498         * aot-compiler.c (compile_method): Remove the previous limitation.
6499
6500         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
6501         on type variables in AOTed code.
6502         
6503         * aot-compiler.c (compile_method): Skip generic methods having type 
6504         constraints on their generic parameters.
6505
6506         * aot-compiler.c (compile_method): Check for methods which cannot be
6507         encoded inside RGCTX_FETCH patches as well.
6508
6509         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
6510         build.
6511
6512 2009-01-20  Mark Probst  <mark.probst@gmail.com>
6513
6514         * method-to-ir.c: Force the vtable variable in shared generic code
6515         for the case that they might show up on a stack trace where they
6516         are needed.
6517
6518         * mini-exceptions.c: Save and use generic sharing info as well as
6519         IP in stack traces to resolve shared generic instantiations.
6520
6521 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
6522
6523         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
6524         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
6525
6526 2009-01-20  Mark Probst  <mark.probst@gmail.com>
6527
6528         * method-to-ir.c: Do generic sharing for array constructors.
6529
6530 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
6531
6532         * mini-exceptions.c (mono_print_thread_dump): Add information
6533         about the thread state using wapi_current_thread_desc.
6534
6535 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
6536
6537         * basic-simd.cs: Tests for the new constructors. 
6538
6539 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
6540
6541         * mini-ops.h: Added OP_EXPAND_*
6542
6543         * cpu-x86.md: Same.
6544
6545         * mini-x86.c (mono_arch_output_basic_block): Same.
6546         
6547         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
6548
6549 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
6550
6551         * iltests.il.in: Add a test for #467385.
6552
6553 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
6554
6555         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
6556         thread been cleaned up is not the same currently in execution.
6557
6558         Fixes appdomain-unload crashes on windows, osx and linux variants
6559         without the __thread keyword.
6560
6561 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
6562
6563         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
6564         (koush@koushikdutta.com). Implement this for android.
6565
6566         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
6567         begins with a digit.
6568
6569         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
6570         mono_marshal_get_write_barrier ().
6571
6572 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
6573
6574         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
6575         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
6576         that pass them on a register pair.
6577
6578         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
6579         test was crashing due to that.
6580
6581 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
6582
6583         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
6584         trampoline code. Include ucontext.h only if available.
6585
6586 2009-01-15  Mark Probst  <mark.probst@gmail.com>
6587
6588         * mini.c: mono_domain_lookup_shared_generic() takes an open method
6589         and doesn't check whether it's sharable, like it was before
6590         removing the shared generics hash.  This brings IronPython
6591         performance back to what it was before that change.
6592
6593 2009-01-14  Mark Probst  <mark.probst@gmail.com>
6594
6595         * method-to-ir.c: Handle delegate invocation optimization earlier,
6596         otherwise it would be handled (much more slowly) by the
6597         final/sealed optimization.
6598
6599 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
6600
6601         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
6602         domain is not set. Fixes #465864.
6603
6604 2009-01-12  Mark Probst  <mark.probst@gmail.com>
6605
6606         * method-to-ir.c: Don't stop sharing of generic methods with catch
6607         clauses - we already handle those.
6608
6609 2009-01-12  Mark Probst  <mark.probst@gmail.com>
6610
6611         * mini.c, mini.h: lookup_generic_method() is now
6612         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
6613         making the shared_generics_hash obsolete.
6614
6615 2009-01-12  Mark Probst  <mark.probst@gmail.com>
6616
6617         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
6618         use the red zone.  Make room on the stack first and then use it,
6619         not the other way around.
6620
6621 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
6622
6623         * mini.c (mini_init): Call mono_xdebug_init ().
6624
6625         * aot-compiler.c (mono_xdebug_init): Make this non-static.
6626
6627 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
6628
6629         * TestDriver.cs: Add an --iter argument to run tests multiple times.
6630
6631         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
6632         trampolines.
6633
6634         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
6635         debug+unwind info for trampolines.
6636
6637         * mini.c (mono_create_unwind_op): New helper function.
6638
6639         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
6640
6641 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
6642
6643         * aot-compiler.c: Fix the build.
6644
6645 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
6646
6647         * Makefile.am: Update dtrace-prelink.sh location.
6648
6649 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
6650
6651         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
6652         optimization. Fixes #464520.
6653
6654 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
6655
6656         * mini-amd64.c : Adding code to save/restore non-volatile registers
6657            on Winx64.
6658
6659         * exceptions-amd64.c : Adding code to save/restore non-volatile 
6660           registers on Winx64.
6661
6662         Contributed under MIT/X11 license.
6663
6664 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
6665
6666         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
6667         __GNUC_MINOR__ which can break when the major version changes.
6668
6669 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
6670
6671         * basic-simd.cs: Add tests for usage of the sizeof opcode.
6672
6673 2009-01-07  Geoff Norton  <gnorton@novell.com>
6674
6675         * helpers.c:  Allow mono -v -v -v to work on darwin.
6676
6677 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
6678
6679         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
6680           pattern. 
6681
6682         Contributed under MIT/X11 license.
6683
6684 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
6685
6686         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
6687         instead of directly accessing type->data.klass. Fixes #462016.
6688         (mono_allocate_stack_slots_full): Ditto.
6689
6690         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
6691         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
6692
6693         * aot-compiler.c (emit_plt): Fix ARM build.
6694
6695 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
6696
6697         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
6698         
6699         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
6700         change.
6701
6702         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
6703         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
6704         #463357.
6705
6706         * iltests.il.in: Add a regression test.
6707
6708 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
6709
6710         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
6711
6712 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
6713
6714         * basic-simd.cs: Add a regression test for #462457.
6715
6716 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
6717
6718         * mini-ops.h: Add a definition of XPHI.
6719
6720         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
6721
6722         * ssa.c (op_phi_to_move): Handle XPHI.
6723
6724         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
6725
6726         Fixes #462457
6727
6728 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
6729
6730         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
6731
6732 2008-12-31  Geoff Norton  <gnorton@novell.com>
6733
6734         * mini-ppc.c: The prolog size allocated can be too small for darwin
6735         ppc32 under certain circumstances.  Also fix a small logic bug.
6736
6737 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
6738
6739         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
6740         while loading AOT methods.
6741
6742         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
6743         since only the former is nulled out after a successful cast. This prevents
6744         crashes with rethrown exceptions when using --debug=casts.
6745
6746 2008-12-24  Mark Probst  <mark.probst@gmail.com>
6747
6748         * mini.h: New macro for checking whether a method is final,
6749         i.e. whether the method or its class is marked final.
6750
6751         * method-to-ir.c: Use the new macro for all final-checks
6752         consistently.  Fixes the crash in the System.ServiceModel tests.
6753
6754 2008-12-23  Mark Probst  <mark.probst@gmail.com>
6755
6756         * mini-exceptions.c (get_exception_catch_class): Corrected another
6757         overly strict assertion.
6758
6759 2008-12-23  Mark Probst  <mark.probst@gmail.com>
6760
6761         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
6762         Clobbering it is not allowed because the caller might use it as
6763         the vtable register in the interface call.
6764
6765 2008-12-19  Mark Probst  <mark.probst@gmail.com>
6766
6767         * mini-exceptions.c (get_exception_catch_class): Corrected an
6768         overly strict assertion.
6769
6770 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
6771         
6772         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
6773
6774         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
6775
6776         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
6777
6778         * cpu-mips.md: correct lengths for certain long_ opcodes.
6779
6780         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
6781
6782         * 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().
6783         
6784 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
6785
6786         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
6787         
6788 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
6789         
6790         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
6791         
6792 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
6793
6794         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
6795         next basic block.
6796         
6797 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
6798
6799         * 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
6800
6801         * 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)
6802         
6803 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
6804         
6805         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
6806         
6807 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
6808
6809         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
6810         gshared code. Fixes #458947.
6811
6812         * generics.cs: Add a test.
6813
6814 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
6815         
6816         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6817         
6818         * mini-mips.c: first pass n32 code generation.
6819
6820         * mini-mips.h: datatypes and defines for n32 support.
6821
6822         * exceptions-mips.c: first pass n32 code generation.
6823         
6824         * tramp-mips.c: first pass n32 code generation.
6825         
6826         * cpu-mips.md: add long_ opcodes.
6827         
6828 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
6829
6830         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6831
6832         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6833         
6834         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6835         
6836         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6837
6838         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6839
6840         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6841
6842         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6843
6844         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6845
6846         * helpers.c: for mips/n32, don't pass -mips32 to objdump
6847
6848 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
6849
6850         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
6851
6852 2008-12-12  Andres G. Aragoneses  <aaragoneses@novell.com>
6853
6854         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
6855
6856 2008-12-12  Mark Probst  <mark.probst@gmail.com>
6857
6858         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
6859         descriptors for helper functions directly in front of the code.
6860
6861 2008-12-11  Mark Probst  <mark.probst@gmail.com>
6862
6863         * method-to-ir.c: Removed an unnecessary assertion.
6864
6865 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
6866
6867         * method-to-ir.c: Merge SGEN changes from the old JIT.
6868
6869 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
6870
6871         * driver.c (compile_all_methods_thread_main): Handle failure of
6872         mono_get_method ().
6873
6874 2008-12-10  Mark Probst  <mark.probst@gmail.com>
6875
6876         * mini-ppc.c: Merged with mini-ppc64.c.
6877
6878         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
6879
6880         * Makefile.am: Use the same sources for PPC and PPC64.
6881
6882         * mini-ppc64.c: Removed.
6883
6884 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
6885
6886         * branch-opts.c (remove_block_if_useless): Extract fall through detection
6887         code to mono_bb_is_fall_through.
6888         
6889         * branch-opts.c (mono_remove_critical_edges): Same.
6890
6891 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
6892
6893         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
6894         expect that an OP_BR_REG will be there.
6895
6896 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
6897
6898         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
6899         for the many branch ops. The original check miss OP_BR_REG.
6900
6901         Fixes #457574.
6902         
6903 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
6904
6905         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
6906
6907 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
6908
6909         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
6910         while holding the aot lock.
6911
6912 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
6913
6914         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
6915         
6916 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
6917
6918         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
6919           to release all runtime callable wrappers held by the runtime.
6920
6921         Contributed under MIT/X11 license.
6922
6923 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
6924
6925         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
6926           for Winx64.
6927
6928         Contributed under MIT/X11 license.
6929
6930 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
6931
6932         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
6933         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
6934
6935 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
6936
6937         * cpu-mips.md: fix ckfinite length
6938
6939         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
6940         (mono_arch_lowering_pass): cleanup, rearrange for clarity
6941         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
6942         
6943 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
6944
6945         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
6946         
6947 2008-12-08  Geoff Norton  <gnorton@novell.com>
6948
6949         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
6950         size by 8 bytes as well.
6951
6952 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6953
6954         * basic-simd.cs: Fix method names for Vector16b.
6955         
6956 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6957
6958         * basic-simd.cs: Fix method names for Vector16sb.
6959
6960 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6961
6962         * basic-simd.cs: Fix method names for Vector8us.
6963         
6964 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6965
6966         * basic-simd.cs: Fix method names for Vector8s.
6967         
6968 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6969
6970         * basic-simd.cs: Fix method names for Vector4ui.
6971
6972 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6973
6974         * basic-simd.cs: Fix method names for Vector2l.
6975
6976 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6977
6978         * basic-simd.cs: Fix method names for Vector2d.
6979
6980 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6981
6982         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
6983         that are extension methods.
6984
6985 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6986
6987         * basic-simd.cs: Fix method names for Vector4f.
6988
6989 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
6990
6991         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
6992         as such. Fixes #456669.
6993
6994 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
6995
6996         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
6997         
6998 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
6999
7000         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
7001         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
7002         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
7003         (mips_adjust_stackframe): handle FP spills
7004                 
7005         * mini-ops.h: add mips_mtc1_s2
7006         
7007         * cpu-mips.md: add mips_mtc1_s2
7008         
7009 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
7010
7011         * unwind.c: New file, move the unwind info encoding functions here from
7012         aot-compiler.c, so they could be used at runtime too.
7013
7014 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
7015
7016         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
7017         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
7018         
7019 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
7020
7021         * mini-mips.c: cleanup warnings
7022         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
7023         (mips_adjust_stackframe): handle case of taking the address of stack locals
7024         
7025 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
7026
7027         * aot-compiler.c: Implement a few functions missing from the asm writer.
7028         (emit_method_code): Only write symbols for methods when using the bin
7029         writer, since the assembler can't deal with the characters in our method
7030         names.
7031
7032         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
7033
7034         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
7035         call.
7036
7037         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
7038         a bit to also restore %rax.
7039
7040 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7041
7042         * mini-ppc.c: Some simple merges from mini-ppc64.c.
7043
7044 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
7045
7046         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
7047         arguments.
7048
7049 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7050
7051         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
7052
7053         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
7054         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
7055
7056         * exceptions-ppc64.c: Removed.
7057
7058         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
7059
7060 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7061
7062         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
7063         tramp-ppc64.c.
7064
7065         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
7066
7067         * tramp-ppc64.c: Removed.
7068
7069 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
7070
7071         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
7072         the TYPESPEC table.
7073
7074 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7075
7076         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
7077
7078         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
7079         mini-ppc.h instead of mini-ppc64.h.
7080
7081         * mini-ppc64.h: Removed.
7082
7083 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7084
7085         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
7086         
7087         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
7088         
7089 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7090
7091         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
7092         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
7093         code easier.
7094
7095 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
7096
7097         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
7098
7099 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
7100
7101         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
7102
7103 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
7104
7105         * basic-simd.cs: Tests for operator == and != on Vector4f.
7106
7107 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
7108
7109         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
7110
7111         * simd-intrinsics.c: Kill useless enum.
7112
7113 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7114
7115         * cpu-mips.md: add long_conv_to_ovf_i4_2
7116         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
7117
7118 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7119
7120         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
7121         
7122         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
7123
7124 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7125
7126         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
7127         
7128 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
7129
7130         * basic-simd.cs: Add tests for new methods.
7131
7132 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
7133
7134         * simd-intrinsics.c: Add support for operator == and !=
7135         on Vector4(u)i.
7136
7137         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
7138
7139 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
7140
7141         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
7142
7143 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
7144
7145         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
7146
7147         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
7148         MONO_PATCH_INFO_ICALL_ADDR.
7149
7150         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
7151
7152         * aot-compiler.c: Resurrect full-aot support.
7153
7154 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7155
7156         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
7157         
7158 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7159
7160         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
7161         
7162 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
7163
7164         * basic-simd.cs: Fix tests to work under ppc.
7165         Remove tests for methods that will be removed.
7166
7167 2008-12-03  Mark Probst  <mark.probst@gmail.com>
7168
7169         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
7170         generic type (via a typedef or typeref) correctly.
7171
7172 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
7173
7174         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
7175         diagnose an assertion failure.
7176
7177 2008-12-02  Mark Probst  <mark.probst@gmail.com>
7178
7179         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
7180         Fix trampoline size.
7181
7182         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
7183         conversion opcodes are implemented natively instead via emulation.
7184
7185 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
7186
7187         * cpu-mips.md: remove mips_xori
7188
7189         * mini-ops.h:  remove mips_xori
7190
7191         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
7192
7193         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
7194         
7195         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
7196         
7197 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
7198
7199         * cpu-mips.md: fix instruction lengths.
7200
7201         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
7202
7203         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
7204
7205         * mini-ops.h: fix slti / sltiu op profiles.
7206         
7207 2008-12-02  Martin Baulig  <martin@ximian.com>
7208
7209         * method-to-ir.c (mono_method_to_ir): Disable debugging
7210         information for the init locals block to make the debugger stop
7211         after all locals have been initalized.
7212
7213 2008-12-02  Martin Baulig  <martin@ximian.com>
7214
7215         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
7216         running inside the debugger.
7217
7218 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
7219
7220         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
7221         is enabled.
7222
7223         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
7224         alu->alu imm optimization which only shows if deadce is disabled.
7225
7226         * aot-compiler.c: Rename the function names for the binary and asm writers
7227         so they can coexist in the same process. Rework the xdebug code to use the
7228         asm writer. This avoids the need to call into the runtime to dump the
7229         debugging info. Add more debugging info for types.
7230
7231         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
7232
7233         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
7234         cpu description tables, they can't occur in cpu-<ARCH>.md.
7235
7236         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
7237         the stack in CEE_LDFLDA. Fixes #450542.
7238
7239         * generics.cs: Add a new test.
7240
7241 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
7242
7243         * mini-ops.h: updated MIPS opcodes
7244         * mini-mips.c: decompose long opts
7245         * mini-mips.h: decompose long opts
7246         
7247 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
7248
7249         * cpu-mips.md: fix length on int_rem_un
7250         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
7251         
7252 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
7253
7254         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
7255
7256         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
7257
7258 2008-11-29  Martin Baulig  <martin@ximian.com>
7259
7260         * mini-exceptions.c (mono_handle_native_sigsegv): Check
7261         mono_debug_using_mono_debugger() in addition to the
7262         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
7263
7264 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
7265
7266         * mini-ops.h: updated more MIPS opcodes
7267         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
7268         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
7269         
7270 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7271
7272         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
7273
7274 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
7275
7276         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
7277         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
7278         * mini-ops.h: correct selected mips opcode entries
7279         
7280 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7281
7282         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
7283         make them work.
7284
7285 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7286
7287         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
7288
7289 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
7290
7291         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
7292         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
7293         * mini-mips.h: disable IMT
7294         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
7295         
7296 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7297
7298         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
7299
7300 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7301
7302         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
7303
7304 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
7305
7306         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
7307         consistency.
7308
7309 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
7310
7311         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
7312         for Set/GetVector aligned versions.
7313
7314 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
7315
7316         * basic-simd.cs: Add tests for Get/SetVector.
7317
7318 2008-11-27  Mark Probst  <mark.probst@gmail.com>
7319
7320         * mini.c: Removed g_slist_append_mempool().  Now in
7321         metadata/mempool.c.
7322
7323 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
7324
7325         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
7326         size properly and make the bounds check optional.
7327
7328         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
7329         for SetVector and IsAligned.
7330
7331 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
7332
7333         * mini.c: Remove unused mono_normalize_opcodes () function.
7334
7335 2008-11-26  Mark Probst  <mark.probst@gmail.com>
7336
7337         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
7338         using the new atomic add ops now.
7339
7340         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
7341         add.
7342
7343 2008-11-26  Mark Probst  <mark.probst@gmail.com>
7344
7345         * mini-ppc64.c: Several fixes.
7346
7347 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7348
7349         * cpu-mips.md: added jump_table
7350         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
7351
7352 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7353
7354         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
7355
7356 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7357
7358         * mini-ops.h: corrected a handful of MIPS opcodes.
7359
7360 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7361
7362         * aot-compiler.c: MIPS to use ELF writer
7363
7364 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7365
7366         * mini-codegen.c: remove MIPS specific assert.
7367
7368 2008-11-25  Mark Probst  <mark.probst@gmail.com>
7369
7370         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
7371         fixes.  PPC64 now passes most of the runtime regressions.
7372
7373 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
7374
7375         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
7376         volatile intervals a bit.
7377
7378 2008-11-24  Mark Probst  <mark.probst@gmail.com>
7379
7380         * basic-long.cs: New test case.
7381
7382 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
7383
7384         * mini.c (mini_method_compile): Disable globalra for large methods for 
7385         now.
7386
7387         * regalloc2.c (order_moves): Add fp support.
7388
7389         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
7390         source bblock ends with an OP_BR_REG.
7391
7392         * ratests.cs: Add a new test.
7393
7394 2008-11-23  Mark Probst  <mark.probst@gmail.com>
7395
7396         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
7397         sharing.  PPC64 now passes generics.exe.
7398
7399 2008-11-23  Mark Probst  <mark.probst@gmail.com>
7400
7401         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
7402
7403 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
7404
7405         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
7406         memory when mono_jit_info_table_find () can't find the method in the
7407         LMF case.
7408
7409         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
7410         AOTed code too.
7411         
7412         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
7413         writer too.
7414
7415 2008-11-23  Mark Probst  <mark.probst@gmail.com>
7416
7417         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
7418         Several fixes.  PPC64 now runs exceptions.exe and
7419         devirtualization.exe.
7420
7421 2008-11-22  Mark Probst  <mark.probst@gmail.com>
7422
7423         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
7424         arrays.exe and basic-math.exe.
7425
7426 2008-11-22  Mark Probst  <mark.probst@gmail.com>
7427
7428         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
7429         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
7430
7431 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
7432
7433         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
7434
7435 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
7436
7437         * method-to-ir.c: Move bounds checking macros to ir-emit.h
7438
7439         * ir-emit.h: Move macros from method-to-ir.c to here.
7440
7441 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
7442
7443         * mini-ops.h: Correct the long simd ops to use LREG.
7444
7445 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
7446
7447         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
7448         
7449         * mini-ops.h: Correct the dreg type of a few long opcodes.
7450
7451         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
7452         Add netbsd support.
7453
7454 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
7455
7456         * mini-ppc.c: remove negative stack references in epilog
7457         for platforms that don't support the red zone.
7458
7459 2008-11-21  Mark Probst  <mark.probst@gmail.com>
7460
7461         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
7462         point regs.  Now PPC64 passes basic-calls.exe.
7463
7464 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7465
7466         * basic-simd.cs: Add tests for accessors of Vector2l.
7467
7468 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7469
7470         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
7471
7472         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
7473         
7474         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
7475
7476 2008-11-21  Mark Probst  <mark.probst@gmail.com>
7477
7478         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
7479         PPC64 passes basic-long.exe.
7480
7481 2008-11-20  Mark Probst  <mark.probst@gmail.com>
7482
7483         * decompose.c: Decompose carry and overflow add on PPC64 like on
7484         other 64 bit archs.  Don't decompose sub at all on PPC64.
7485
7486         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
7487         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
7488         basic-long.exe.
7489
7490 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7491
7492         * basic-simd.cs: Add tests for accessors of Vector2d.
7493
7494 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7495
7496         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
7497
7498         * cpu-x86.md: Same.
7499
7500         * mini-x86.c (mono_arch_output_basic_block): Same.
7501         
7502         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
7503
7504 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7505
7506         * basic-simd.cs: Add tests for accessors of Vector4f.
7507
7508 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7509
7510         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
7511
7512         * cpu-x86.md: Same.
7513
7514         * mini-x86.c (mono_arch_output_basic_block): Same.
7515         
7516         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
7517
7518 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7519
7520         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
7521
7522 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7523
7524         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
7525
7526         * cpu-x86.md: Same.
7527
7528         * mini-x86.c (mono_arch_output_basic_block): Same.
7529         
7530         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
7531
7532 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7533
7534         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
7535
7536 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7537
7538         * simd-intrinsics.c: Enable setters for Vector16sb.
7539
7540 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7541
7542         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
7543
7544         * cpu-x86.md: Same.
7545
7546         * mini-x86.c (mono_arch_output_basic_block): Same.
7547         
7548         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
7549
7550 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
7551
7552         * simd-intrinsics.c: Implement setter for Vector8us.
7553
7554 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
7555
7556         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
7557         for dead variables.
7558
7559 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
7560
7561         * mini-ppc.c: remove references to the red zone in the prolog
7562         (for systems that don't support it).
7563
7564 2008-11-19  Mark Probst  <mark.probst@gmail.com>
7565
7566         * cpu-ppc64.md: Fixed a few instruction lengths.
7567
7568         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
7569         now.
7570
7571 2008-11-19  Mark Probst  <mark.probst@gmail.com>
7572
7573         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
7574         basic.exe now.
7575
7576 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
7577
7578         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
7579
7580 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
7581
7582         * mini-ops.h: Added OP_INSERT_I2.
7583
7584         * cpu-x86.md: Same.
7585
7586         * mini-x86.c (mono_arch_output_basic_block): Same.
7587         
7588         * simd-intrinsics.c: Implement setter for Vector8s.
7589
7590         * simd-methods.h: Add the names of get setters of Vector8s.
7591
7592 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
7593
7594         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
7595         
7596         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
7597         parameters.
7598
7599         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
7600
7601 2008-11-18  Mark Probst  <mark.probst@gmail.com>
7602
7603         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
7604         for PPC64.  An empty program runs now.
7605
7606 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
7607
7608         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
7609
7610         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
7611         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
7612         info for JITted code is emitted into a shared library, loadable into gdb.
7613
7614 2008-11-18  Mark Probst  <mark.probst@gmail.com>
7615
7616         * Makefile.am: Changes to build PPC64.
7617
7618         * mini-arch.h: Include mini-ppc64.h on PPC64.
7619
7620 2008-11-18  Mark Probst  <mark.probst@gmail.com>
7621
7622         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
7623         in PPC code up to r119147.
7624
7625 2008-11-18  Mark Probst  <mark.probst@gmail.com>
7626
7627         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
7628         cpu-ppc64.md: Changes for PPC64.
7629
7630         Based on code submitted by andreas.faerber@web.de at
7631         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
7632         X11/MIT license.
7633
7634 2008-11-18  Mark Probst  <mark.probst@gmail.com>
7635
7636         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
7637         cpu-ppc64.md: Copied from the corresponding PPC files from
7638         r118846.
7639
7640 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
7641
7642         * mini-ops.h: Added OP_ROUND.
7643
7644         * cpu-x86.md: Added round.
7645
7646         * mini-x86.c: Added support for intrinsicing Math.Round (double).
7647
7648         * basic-math.cs: Added test_0_round to test rounding.
7649
7650         Contributed under MIT/X11 license.
7651
7652 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
7653
7654         * aot-compiler.c : Fix the Winx64 build.
7655
7656         Contributed under MIT/X11 license.
7657
7658 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
7659
7660         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
7661         in OP_EXTRACT_R8 to avoid possible stack corruption.
7662
7663 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
7664
7665         * mini-ops.h: Added OP_EXTRACT_R8/I8.
7666
7667         * cpu-x86.md: Added extract_r8.
7668
7669         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
7670         
7671         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
7672         a couple of OP_EXTRACT_I4.
7673
7674         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
7675
7676         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
7677
7678 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
7679
7680         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
7681         and not 4.1. 
7682
7683 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
7684
7685         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
7686         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
7687
7688         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
7689         are not needed any more.
7690
7691         * mini.h: Remove the unused INS_LIST macros.
7692
7693         * mini.c (mini_method_compile): Remove a disable globalra case which is no
7694         longer needed.
7695
7696         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
7697         ir-emit.h.
7698
7699         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
7700         mono_alloc_ireg () instead.
7701
7702         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
7703         macros.
7704
7705         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
7706         on amd64.
7707
7708         * aot-runtime.c (load_aot_module): Disable AOT when running under
7709         CAS.
7710
7711         * mini-amd64.h: Change the monitor fastpath defines to check for
7712         !PLATFORM_WIN32 so they work on *bsd too.
7713
7714         * mini.h mini.c mini-hhpa.c: Remove more unused code.
7715
7716         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
7717
7718         * mini.h (MonoCompile): Remove new_ir flag.
7719
7720         * regalloc.h regalloc.c: Remove unused code.
7721
7722         * cpu-*.md: Remove more unused opcodes.
7723
7724         * simple-cee-ops.h simple-mini-ops.h: Removed.
7725
7726         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
7727         
7728 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
7729
7730         * aliasing.h: Removed.
7731
7732         * *.c: Remove references to aliasing.h and inssel.h.
7733
7734         * mini.c: Remove additional unused functions.
7735
7736         * mini-ops.h cpu-*.md: Remove unused opcodes.
7737
7738 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
7739
7740         Remove the old JIT code.
7741
7742         * inssel*.brg: Removed.
7743
7744         * ssa.c abcremoval.c aliasing.c: Removed.
7745
7746         * ssa2.c: Renamed to ssa.c.
7747
7748         * abcremoval2.c: Renamed to abcremoval.c.
7749
7750         * *.c: Removed all !cfg->new_ir code.
7751
7752         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
7753         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
7754
7755         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
7756         
7757 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
7758
7759         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
7760         to simplify the code and cut back on the number of global symbols in the AOT
7761         file.
7762         
7763         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
7764
7765 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
7766
7767         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
7768         with the got/got_info tables.
7769
7770         * mini.h: Bump AOT file format version.
7771         
7772         * unwind.h: New file, contains definitions for stack unwinding.
7773
7774         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
7775         to cfg->unwind_ops.
7776         
7777         * aot-compiler.c: Generalize the emitting of unwind information to use the
7778         information in cfg->unwind_ops.
7779
7780         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
7781
7782         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
7783         AOT method frames. Enable writing symbols for methods by default.
7784
7785 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
7786
7787         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
7788         and make it work with vectors of element sizes 1, 2 and 4.
7789
7790         * simd-intrinsics.c: Enable getter for all vectors with element size
7791         1, 2 or 4.
7792
7793         * simd-methods.h: Add the names of other getters.
7794
7795         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
7796
7797         * cpu-x86.md: Same.
7798
7799         * mini-x86.c: Same.
7800
7801 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
7802
7803         * mini-ppc.h: portability fix.
7804
7805 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
7806
7807         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
7808         buggy and will overwrite it.
7809
7810 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
7811
7812         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
7813         Use it to emit local symbols for all methods so AOTed methods show up with
7814         their full name in gdb/valgrind output.
7815
7816 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
7817
7818         * mini-ppc.c: portability fixes.
7819
7820 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
7821
7822         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
7823         entries out of the if (!generic_shared...) code so it is always done.
7824         (mono_class_init_trampoline): Do the patching when running under valgrind
7825         too, newer versions of valgrind have no problems with it.
7826
7827 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
7828
7829         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
7830         further sections.
7831
7832 2008-11-13  Mark Probst  <mark.probst@gmail.com>
7833
7834         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
7835         filters.
7836
7837 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
7838
7839         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
7840
7841 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
7842
7843         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
7844
7845         * cpu-x86.md: Same.
7846
7847         * mini-x86.c: Same.
7848
7849         * simd-intrinsics.c: Same.
7850
7851 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
7852
7853         * simd-intrinsics.c: Enable constructor intrinsics for all types.
7854
7855 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
7856
7857         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
7858         to work with more Vector types.
7859
7860 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
7861
7862         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
7863         store the elemens directly instead of using and intermediate.
7864
7865 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
7866
7867         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
7868
7869         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
7870         to preserve %eax for aot plt trampolines.
7871
7872         * aot-compiler.c (compile_method): Don't skip synchronized methods.
7873         (encode_method_ref): Flag synchronized methods so they won't go through
7874         the AOT trampoline.
7875
7876         * aot-compiler.c: Additional work to support AOTing synchronized methods/
7877         wrappers.
7878
7879         * cpu-ia64.md (jmp): Increase max length.
7880
7881 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
7882
7883         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
7884         open generic classes.
7885
7886         * aot-compiler.c: Enable the ELF writer on ELF platforms.
7887
7888         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
7889         box+brtrue optimization since it causes test failures on x86.
7890
7891 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
7892
7893         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
7894
7895         * cpu-x86.md: Same.
7896
7897         * mini-x86.c: Same.
7898
7899         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
7900         for simd ctor values. 
7901
7902         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
7903         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
7904
7905 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
7906
7907         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
7908         LogicalRightShift.
7909
7910         * simd-instrincs.c: Same.
7911
7912         * basic-simd.cs: Same.
7913
7914 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
7915
7916         * ratests.cs: Add more tests.
7917
7918         * regalloc2.c (add_spill_code): Handle more corner cases.
7919
7920 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
7921
7922         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
7923         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
7924         both the source an destination of an instruction.
7925
7926 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
7927
7928         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
7929         wapihandles.c: more portability changes.
7930
7931 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
7932
7933         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
7934         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
7935         safe to execute in a signal handler and the kernel provides better
7936         the info in /proc/self/smaps. Avoid the assert on sigaction during
7937         cleanup.
7938
7939 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
7940
7941         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
7942         do the bblock linking hack if it is actually needed.
7943
7944         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
7945         up linking.
7946
7947         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
7948         crash problem is fixed.
7949
7950         * branch-opts.c (mono_remove_critical_edges): Link up newly added
7951         bblocks.
7952
7953         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
7954         for catch clauses.
7955         (mini_method_compile): Set the starting value of next_vreg to 
7956         MAX_IREGS + MAX_FREGS when using globalra.
7957
7958         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
7959         filter clauses with BB_EXCEPTION_HANDLER.
7960
7961         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
7962
7963 2008-11-10  Mark Probst  <mark.probst@gmail.com>
7964
7965         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
7966         space for stdcall.  Fixes regressions on Win32.
7967
7968 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
7969
7970         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
7971         bblocks.
7972         (linear_scan): Remove an assert which doesn't seem to be needed.
7973
7974         * local-propagation.c (mono_local_deadce): Avoid a call to
7975         MONO_DELETE_INS which would screw up the instruction linking.
7976
7977         * mini.c (mono_decompose_op_imm): Make this work with globalra.
7978
7979         * regalloc2.c: Upgrade to work the current JIT code.
7980
7981 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
7982
7983         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
7984         case.
7985
7986         * aot-runtime.c: Remove some dead code.
7987
7988         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
7989         consistency.
7990         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
7991
7992         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
7993         trampolines using sscanf since atoi doesn't work on large unsigned values.
7994
7995         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
7996         Initialize code_size.
7997
7998 2008-11-08  Mark Probst  <mark.probst@gmail.com>
7999
8000         * method-to-ir.c (mini_emit_inst_for_method): Make
8001         Interlocked.CompareExchange work for Int arguments on 32 bit
8002         archs, as well.
8003
8004 2008-11-07  Mark Probst  <mark.probst@gmail.com>
8005
8006         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
8007
8008 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
8009
8010         * main.c Fix MSVC build.
8011
8012         Contributed under MIT/X11 license.
8013
8014 2008-11-06  Mark Probst  <mark.probst@gmail.com>
8015
8016         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
8017         alignment larger than 8 bytes are aligned correctly, too.
8018
8019         * mini.c: Honor the min_align field of MonoClass when laying out
8020         the stack.
8021
8022 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
8023
8024         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
8025
8026         * aot-compiler.c (emit_plt): Fix a warning.
8027         
8028         * aot-compiler.c: Implement ARM support in the binary writer.
8029
8030 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
8031
8032         * basic-simd.cs: Add test for getter with byref arg.
8033         Fix the naming of a few tests.
8034         Add missing checks to a test.
8035
8036 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
8037
8038         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
8039
8040         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
8041         most of the full-aot support for monitor enter/exit trampolines.
8042
8043         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
8044         enter/exit trampoline creation functions.
8045
8046         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
8047         make dist.
8048
8049 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
8050
8051         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
8052         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
8053         implement the needed functionality without adding crap to the runtime.
8054
8055 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
8056
8057         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
8058         non-x86 builds.
8059
8060         * mini.c (mono_build_date): New global version holding the build date in
8061         string format.
8062         
8063         * Makefile.am (buildver.c): Generate a file containing the build date.
8064
8065         * main.c: Set the build date from the generated file.
8066
8067         * mini.c (mono_get_runtime_build_info): New helper function returning build
8068         information in a string format.
8069         
8070         * driver.c (mono_main): Print the build date in --version.
8071
8072         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
8073         file when the bind-to-runtime-version option is used.
8074
8075 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
8076
8077         * simd-intrinsics.c: Fix bug when using getters and byref args. 
8078
8079 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
8080
8081         * simd-methods.h: Rename prefetch methods.
8082
8083         * simd-intrinsics.c: Same.      
8084
8085 2008-11-05  Mark Probst  <mark.probst@gmail.com>
8086
8087         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
8088         sizes.
8089
8090 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
8091
8092         * aot-compiler.c: Use the bundled elf header files instead of depending on
8093         the system one.
8094         
8095         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
8096         mempool.
8097
8098         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
8099         on every call.
8100
8101 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
8102
8103         * cpu-x86.md: Add store nta ops.
8104
8105         * mini-ops.h: Same.
8106
8107         * mini-x86.c: Same.
8108
8109         * mini.h: Add an enum for simd prefetch modes.
8110
8111         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
8112         of store. Use the changed code to support store nta.
8113
8114         * simd-intrinsics.c: Add prefetch ops for all vector types.
8115
8116 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
8117
8118         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
8119         threads.
8120         
8121         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
8122         names.
8123
8124         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
8125         trampolines.
8126
8127 2008-11-04  Mark Probst  <mark.probst@gmail.com>
8128
8129         * mini-x86.c: Fixed commit.
8130
8131 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
8132
8133         * aot-compiler.c (emit_plt): Align the plt section only on x86.
8134
8135 2008-11-04  Mark Probst  <mark.probst@gmail.com>
8136
8137         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
8138         and MONITOR_EXIT, for the ASM fastpaths.
8139
8140         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
8141         available.
8142
8143         * mini.c, patch-info.h: Signature and patch infos for
8144         Monitor.Enter/Exit trampolines.
8145
8146         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
8147
8148         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
8149         Monitor.Enter/Exit ASM fastpath for Linux.
8150
8151 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
8152
8153         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
8154
8155         * objects.cs: Add a new test.
8156         
8157         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
8158
8159         * aot-runtime.c (load_method): Run class initialization in the PLT case even
8160         if MONO_LOG_LEVEL is set.
8161
8162         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
8163
8164         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
8165
8166         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
8167         
8168         * aot-compiler.c: Change the relocation code to use virtual addresses instead
8169         of file offsets. Align the sections belonging to the data segment to 
8170         PAGESIZE.
8171
8172 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
8173
8174         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
8175         elf.h. Port it to amd64.
8176
8177 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
8178
8179         * driver.c: Enable SIMD by default.
8180
8181 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
8182
8183         * cpu-x86.md: Add prefetch op.
8184
8185         * mini-ops.h: Same.
8186
8187         * mini-x86.c: Same.
8188
8189         * mini.h: Add an enum for simd prefetch modes.
8190
8191         * simd-methods.h: Add prefetch function names.
8192
8193         * simd-intrinsics.c: Add prefetch ops for all vector types.
8194
8195 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
8196
8197         * aot-compiler.c (emit_bytes): Speed this up a little.
8198
8199 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
8200
8201         * aot-compiler.c: Add JIT time etc. statistics.
8202         
8203         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
8204
8205         * mini.h (MonoCompile): Add 'got_offset' field.
8206
8207         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
8208         method_got_offsets array.
8209
8210         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
8211         wrappers.
8212
8213         * aot-compiler.c (compile_method): Add generic method instances referenced
8214         by the method to the list of methods to be compiled, this is required so if
8215         A<T> references B<T>, and another assembly references A<int>, then it will
8216         also get a copy of B<int>.
8217
8218         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
8219         when checking for monitor enter/exit.
8220
8221 2008-10-30  Mark Probst  <mark.probst@gmail.com>
8222
8223         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
8224         for Monitor.Enter and Monitor.Exit if enabled.
8225
8226         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
8227         Solaris.
8228
8229 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
8230
8231         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
8232         of an OP_MOVE. Fixes #440046.
8233
8234         * basic-long.cs: Add a new test.
8235
8236 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
8237
8238         * mini.h: Add synchronization note for the managed counter-part.
8239
8240         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
8241         returns the simd caps of the current cpu.
8242
8243 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
8244
8245         * basic-simd.cs: Remove Console.WriteLine.
8246
8247 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8248
8249         * basic-simd.cs: New tests for Vector2ul.
8250
8251 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8252
8253         * simd-intrinsics.c: Add new vector type Vector2ul.
8254
8255 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8256
8257         * basic-simd.cs: New tests for Vector2l.
8258
8259 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8260
8261         * cpu-x86.md: Add long version of most packed int ops.
8262
8263         * mini-ops.h: Same.
8264
8265         * mini-x86.h: Same.
8266
8267         * simd-intrinsics.c: Add new vector type Vector2l.
8268
8269 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8270
8271         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
8272
8273         * simd-methods.h: Remove SN_op_BitwiseXor.
8274
8275 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
8276
8277         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
8278         alignment.
8279
8280 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
8281
8282         * basic-simd.cs: Test for Vector2d.
8283
8284         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
8285         value.
8286
8287 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
8288
8289         * cpu-x86.md: Add double version of all packed float ops.
8290
8291         * mini-ops.h: Same.
8292
8293         * mini-x86.h: Same.
8294
8295         * simd-intrinsics.c: Add new vector type Vector2d.
8296
8297         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
8298
8299         * simd-methods.h: Add Duplicate.
8300
8301 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
8302
8303         * basic-simd.cs: Test for packing with signed saturation.
8304
8305 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
8306
8307         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
8308         found in the TYPESPEC table.
8309
8310 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
8311
8312         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
8313         too.
8314
8315         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8316
8317         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
8318         instead of the RVA, since the RVA can be changed by tools like the cil 
8319         stripper.
8320
8321         * method-to-ir.c (mono_method_to_ir2): Ditto.
8322
8323         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
8324         (deserialize_variable): Ditto.
8325
8326 2008-10-25  Martin Baulig  <martin@ximian.com>
8327
8328         * debug-mini.c (write_variable): Use
8329         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
8330
8331 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8332
8333         * cpu-x86.md: Add unsigned variants of packd and packw.
8334
8335         * mini-ops.h: Same.
8336
8337         * mini-x86.h: Emit the right instruction for packd and packw.
8338         Add unsigned variants of packd and packw.
8339
8340         * simd-intrinsics.c: Packd and packw were used in place of their
8341         unsigned variants. Change that.
8342         Add intrinsics for (Signed)PackWithSignedSaturation.
8343
8344         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
8345
8346 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8347
8348         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
8349
8350 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8351
8352         * mini-ops.h: Remove dword packed add/sub with saturation ops.
8353
8354         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
8355
8356         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
8357         sse instructions.
8358
8359         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
8360
8361 2008-10-24  Mark Probst  <mark.probst@gmail.com>
8362
8363         * method-to-ir.c, mini.c: Special casing for the synchronized
8364         wrapper for the ldtoken+GetTypeFromHandle case.
8365
8366 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
8367
8368         * mini.c (mono_replace_ins): Move this to branch-opts.c.
8369
8370         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
8371         created/split bblocks.
8372
8373 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8374
8375         * mini-ops.h: Add packed signed mul high.
8376         
8377         * cpu-x86.md: Same.
8378
8379         * mini-x86.c (mono_arch_output_basic_block): Same.
8380
8381         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
8382
8383         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
8384
8385 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8386
8387         * basic-simd.cs: Tests for Vector16sb.
8388
8389 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
8390
8391         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
8392
8393 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
8394
8395         * mini-ops.h: Add packed signed min, max and compare greater.
8396         
8397         * cpu-x86.md: Same.
8398
8399         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
8400         saturation.
8401
8402         * simd-methods.h: Add CompareGreaterThan.
8403
8404         * simd-methods.h: Remove CompareEquals.
8405
8406         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
8407
8408         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
8409
8410         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
8411         CompareEqual.
8412
8413 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
8414
8415         * basic-simd.cs: Fix tests due to change in the API.
8416
8417 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
8418
8419         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
8420
8421 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
8422
8423         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
8424
8425         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
8426         inst_offset as this has invalid values for LDADDR.
8427
8428 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
8429
8430         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
8431
8432         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
8433
8434 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
8435
8436         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
8437         for accessing field->data.
8438
8439 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
8440
8441         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
8442
8443 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
8444
8445         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
8446
8447         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
8448
8449 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
8450
8451         * dominators.c (mono_compute_natural_loops): Allocate GList enties
8452         from the cfg mempool.
8453
8454 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
8455
8456         * basic-simd.cs: Tests for new methods in Vector8us.
8457
8458 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
8459
8460         * mini-ops.h: Add multiply and store high.
8461         
8462         * cpu-x86.md: Same.
8463
8464         * mini-x86.c (mono_arch_output_basic_block): Same.
8465
8466         * simd-methods.h: Same.
8467
8468         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
8469         and CompareEqual.
8470
8471 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
8472
8473         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
8474         mono_class_setup_vtable ().
8475
8476         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
8477         mono_class_get_vtable_entry () for accessing klass->vtable.
8478
8479         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
8480
8481         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
8482         found.
8483
8484         * method-to-ir.c (mono_save_token_info): Don't save references made from
8485         wrappers.
8486
8487         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
8488         of generic instances.
8489
8490         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
8491
8492 2008-10-19  Mark Probst  <mark.probst@gmail.com>
8493
8494         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
8495         OP_JMP depends on the method signature.  Calculate it properly.
8496
8497 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
8498         
8499         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
8500         called directly.
8501
8502         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
8503         instances.
8504         (emit_extra_methods): Add another table mapping method indexes to 
8505         offsets in the extra_method_info table.
8506
8507         * mini.h: Bump AOT file format version.
8508         
8509         * aot-runtime.c: Merge most of the code from mono_aot_get_method
8510         and mono_aot_get_method_from_token () into one function.
8511
8512 2008-10-19  Mark Probst  <mark.probst@gmail.com>
8513
8514         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
8515         separate counter.
8516
8517 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
8518
8519         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
8520         methods.
8521
8522         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
8523         disable_aot.
8524
8525         * mini.c (mono_patch_info_equal): Compare the generic context as well.
8526
8527         * mini.h: Bump aot file format version.
8528
8529         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
8530         AOT file can contain native code for methods which are not in the METHOD
8531         table. Generate code for non-sharable generic instances of generic methods
8532         found in the METHODSPEC table.
8533         
8534         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
8535         encoding generic type handles.
8536
8537         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
8538         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
8539
8540         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
8541         macros + MONO_ADD_INS.
8542
8543         * mini.c (mono_jump_info_token_new2): New function which takes a generic
8544         context as well.
8545
8546         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
8547
8548         * mini.h: Bump aot file format version.
8549
8550         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
8551
8552 2008-10-17  Mark Probst  <mark.probst@gmail.com>
8553
8554         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
8555         platforms, with definable stack alignment value.  Set to 16 now
8556         for all platforms.
8557
8558         * mini.c, mini.h, driver.c: Command line option for disabling
8559         stack alignment.
8560
8561 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
8562
8563         * basic-simd.cs: Tests for new methods in Vector4ui.
8564
8565 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
8566
8567         * mini-ops.h: Add packed int shuffle.
8568         
8569         * cpu-x86.md: Same.
8570
8571         * mini-x86.c (mono_arch_output_basic_block): Same.
8572
8573         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
8574         extract mask, max, min, shuffle.
8575
8576         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
8577
8578 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
8579
8580         * basic-simd.cs: Tests for new methods in Vector8us.
8581
8582 2008-10-17  Mark Probst  <mark.probst@gmail.com>
8583
8584         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
8585         RuntimeTypeHandle, not a TypedReference.
8586
8587 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
8588
8589         * simd-intrinsics.c: remove relocations.
8590
8591 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
8592
8593         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
8594         optimizations from the x86 backend.
8595
8596 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
8597
8598         * simd-methods.h, simd-intrinsics.c: debloat method names and
8599         prepare for no relocations.
8600
8601 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
8602
8603         * mini-ops.h: Add packed min/equal and sum of absolute differences.
8604         
8605         * cpu-x86.md: Same.
8606
8607         * mini-x86.c (mono_arch_output_basic_block): Same.
8608
8609         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
8610         extract mask, max, min and sum of absolute differences.
8611
8612         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
8613         method name.
8614
8615 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
8616
8617         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
8618         Renamed one test for consistency.
8619
8620 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
8621
8622         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
8623         fix to the code that deal with other blocks.
8624
8625 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
8626
8627         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
8628
8629 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
8630
8631         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
8632         that deals with vreg interference. Explicitly check for OP_LDADDR to be
8633         able to process the source reg.
8634
8635 2008-10-16  Martin Baulig  <martin@ximian.com>
8636
8637         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
8638
8639         * inssel.brg: Add `OP_HARD_NOP'.
8640
8641         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
8642
8643         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
8644         `OP_HARD_NOP' instruction when running inside the debugger.
8645
8646         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
8647         `OP_HARD_NOP' instruction when running inside the debugger.
8648
8649 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
8650
8651         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
8652         now works. The issue with the regalloc tripping up no longer
8653         happens.
8654
8655         * simd-intrinsics.c (load_simd_vreg): Same.
8656
8657 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
8658         
8659         * basic-simd.cs: Tests for new Vector8ui methods.
8660
8661 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
8662
8663         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
8664         only for type. This fixes crashes where MonoInst::klass is checked
8665         for ops of type != VTYPE or OBJ.
8666
8667         * simd-intrinsics.c (load_simd_vreg): Same.
8668
8669 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
8670
8671         * mini-ops.h: Add ops for packed shuffle/max/avg and
8672         extract mask.
8673         
8674         * cpu-x86.md: Same.
8675
8676         * mini-x86.c (mono_arch_output_basic_block): Same.
8677
8678         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
8679         extract mask.
8680
8681         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
8682         to emit extract mask op.
8683
8684         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
8685         to emit word shuffles.
8686
8687 2008-10-15  Mark Probst  <mark.probst@gmail.com>
8688
8689         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
8690         the largest alignment needed by a variable, but at least
8691         sizeof(gpointer).
8692
8693 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
8694
8695         * basic-simd.cs: Tests for the fixes in the last commit.
8696
8697 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
8698
8699         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
8700         no longer handles STACK_PTR input.
8701
8702         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
8703
8704         * simd-intrinsics.c (load_simd_vreg): New function that works like 
8705         get_simd_vreg   but handles STACK_PTR input.
8706
8707         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
8708         as the input can be an arbitrary pointer.
8709
8710         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
8711         LDADDR local optimization directly otherwise use a store op.
8712
8713 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
8714
8715         * basic-simd.cs: Tests for dup low and dup high.
8716
8717 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
8718
8719         * mini-ops.h: Add dup low and dup high ops.
8720         
8721         * cpu-x86.md: Same.
8722
8723         * mini-x86.c (mono_arch_output_basic_block): Same.
8724
8725         * simd-intrinsics.c (vector4f_intrinsics): Same.
8726
8727 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
8728
8729         * basic-simd.cs: Tests for recently added functionality.
8730
8731 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
8732
8733         * mini-ops.h: Add remaining sse1 fp ops.
8734         
8735         * cpu-x86.md: Add remaining sse1 fp ops.
8736
8737         * mini-x86.c (mono_arch_output_basic_block): Same.
8738
8739         * mini.h: Add enum for simd FP compare conditions.
8740
8741         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
8742
8743         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
8744         so the backed can generate the appropriate op.
8745
8746 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
8747         This patch squeese one more byte from the SimdIntrinsc struct.
8748
8749         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
8750         a a shift amount intead of simply or'ing it.
8751
8752         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
8753
8754         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
8755         byte so we can have an aditional flags field without increasing struct size.
8756
8757         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
8758         against the simd_supported_versions bitmask.
8759
8760         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
8761
8762 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
8763
8764         * mini.c: remove rawbuffer code (the only use here is unsafe because
8765         it takes locks during signal handling and the kernel now provides much
8766         better info in proc/pid/smaps these days).
8767
8768 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
8769
8770         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
8771         OP_X86_PUSH_OBJ. Fixes #434620.
8772
8773         * objects.cs: Add a test.
8774         
8775 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
8776
8777         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
8778         that the packuswb/packusdw don't work with unsigned numbers for what
8779         would be negative numbers in signed format.
8780
8781         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
8782         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
8783
8784         * mini-ops.h: Add doubleword forms of many ops and packing ones.
8785
8786         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
8787
8788         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
8789
8790         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
8791
8792         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
8793         add more ops.
8794
8795         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
8796         version as the enum in mini.h.
8797
8798         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
8799         for sse3 ops, check the simd_version field if present. This way the code
8800         works with all versions of sse.
8801
8802 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
8803
8804         * simd-intrinsics.c: Fixed intrinsic name typo.
8805
8806         * mini.h: Added missing simd exported function.
8807
8808         * basic-simd.cs: Added tests for Vector4ui.
8809         Fixed broken test for Vector16b.
8810
8811 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
8812
8813         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
8814         the max length to 64.
8815
8816 2008-10-10  Mark Probst  <mark.probst@gmail.com>
8817
8818         * method-to-ir.c: Only do the fast virtual generic method call for
8819         non-wrapper methods.
8820
8821         * mini.h, mini-trampolines.c: The new generic virtual remoting
8822         trampoline handles virtual method calls via the vtable (as done by
8823         the fast virtual generic method calls) to remoting proxies.
8824
8825         * mini.c (mono_jit_create_remoting_trampoline): For generic
8826         methods reate a generic virtual remoting trampoline.
8827
8828         * mini-amd64.h: Enable fast virtual generic method calls again.
8829
8830 2008-10-10  Mark Probst  <mark.probst@gmail.com>
8831
8832         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
8833         restore registers when doing tail calls.
8834
8835 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
8836
8837         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
8838         Vector4ui.
8839
8840 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
8841
8842         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
8843
8844 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
8845
8846         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
8847
8848 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
8849
8850         * basic-simd.cs: Retrofit for API changes.
8851
8852 2008-10-10  Mark Probst  <mark.probst@gmail.com>
8853
8854         * mini-ppc.c: Handle integer stack arguments for tail calls.
8855
8856 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
8857
8858         * optflags-def.h: Removed sse3 optimization.
8859
8860         * driver.c: Same.
8861
8862         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
8863         sse3.
8864
8865         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
8866
8867         * mini.h: Added enumeration with simd versions.
8868
8869         * simd-intrinsics.c (emit_intrinsics): Use the new static var
8870         for detecting SSE3.
8871
8872         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
8873
8874         * mini.c (mini_init): Call mono_simd_intrinsics_init.
8875
8876 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
8877
8878         * basic-simd.cs: Added tests for Vector8u and Vector16u.
8879
8880         * basic-simd.cs: Fixed test naming.
8881
8882 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
8883
8884         * mini-ops.h: Added ops for packed and saturated math, shifts
8885         and packing/unpacking.
8886
8887         * cpu-x86.md: Added descriptors for the above ops.
8888
8889         * mini-x86.c: Added code to emmit the above ops.
8890
8891         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
8892
8893 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
8894
8895         * aot-compiler.c (compile_method): Enable AOT for generic code.
8896
8897         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
8898
8899 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
8900
8901         * mini.c: add a workaround for a common screwup that ends up blamed
8902         to mono (other processes blocking signal delivery).
8903
8904 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
8905
8906         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
8907         in the LDFLD/STFLD opcodes. Fixes #432673.
8908
8909         * iltests.il.in: Add a new test.
8910
8911 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
8912
8913         * mini-arm.c: attach the thread in unmanaged->managed transitions
8914         using delegates (bug #433148).
8915
8916 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
8917
8918        * basic-simd.cs: Use new ShuffleSel constants.
8919
8920 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
8921
8922         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
8923
8924         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
8925         only disable simd intrinsics if no sse2 is detected.
8926
8927         * optflags-def.h: Added sse3.
8928
8929         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
8930         is disabled.
8931
8932 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
8933
8934         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
8935         when adding delegate-invoke wrappers.
8936
8937 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
8938
8939         * Makefile.am: Reenable the simd tests.
8940
8941 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
8942
8943         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
8944           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
8945           other vreg is allocated to that hreg.
8946
8947         Contributed under MIT/X11 license.
8948
8949 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
8950
8951         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
8952         yet checked in.
8953
8954 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
8955
8956         * basic-simd.cs: New test suite for SIMD intrinsics.
8957
8958         * Makefile.am: Added new tests.
8959
8960 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
8961
8962         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
8963
8964         * mini-ops.h: Same.
8965
8966         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
8967
8968         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
8969         using SSE2 aware opcodes.
8970
8971         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
8972         is enabled, this code path is only reachable if conversion ops are emmited after
8973         mono_method_to_ir.
8974
8975         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
8976
8977         This optimization saves 6 bytes per conversion against the old version.
8978
8979 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
8980
8981         * aot-compiler.c (compile_method): Don't skip methods referencing 
8982         generic methods without a corresponding entry in token_info_hash, since
8983         encode_method_ref () can handle all generic methods now.
8984
8985         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
8986         generic context is set.
8987         
8988         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
8989         generic sharing of LDTOKEN.
8990
8991 2008-10-06  Mark Probst  <mark.probst@gmail.com>
8992
8993         * mini-amd64.h: Temporarily disabled fast virtual generic method
8994         calls because it breaks the System.Runtime.Remoting tests.
8995
8996 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
8997
8998         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
8999
9000         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
9001         so inlining actually works.
9002         (check_inline_caller_method_name_limit): Ditto.
9003
9004 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
9005
9006         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
9007         64 bit safety (from Olaf Hering and Andreas Farber).
9008
9009 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
9010         
9011         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
9012         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
9013         unused virtual call support code.
9014
9015         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
9016         
9017         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
9018         which can't use aot trampolines.
9019         (decode_patch): Don't create aot trampolines for methods which can't use
9020         them.
9021
9022         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
9023         use aot trampolines.
9024
9025         * mini.h: Bump AOT image format version.
9026         
9027 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
9028
9029         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
9030         to save_token_info () since cmethod is inflated for constrained calls.
9031
9032         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
9033
9034 2008-10-04  Andreas Farber  <andreas.faerber@web.de>
9035
9036         * Makefile.am: Add build rules for ppc64.
9037         This avoids the build failing at pedump with unresolved symbols
9038         due to lack of arch_sources. Instead it will now fail earlier
9039         due to lack of cpu-ppc64.md.
9040
9041         Contributed under MIT/X11 license.
9042
9043 2008-10-04  Mark Probst  <mark.probst@gmail.com>
9044
9045         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
9046         tail calls.
9047
9048         * iltests.il.in: Add test case for tail call with many arguments.
9049
9050 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
9051
9052         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
9053         to the fast virtual generic method code until the aot case is fixed.
9054
9055 2008-10-03  Mark Probst  <mark.probst@gmail.com>
9056
9057         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
9058
9059 2008-10-03  Mark Probst  <mark.probst@gmail.com>
9060
9061         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
9062         thunks.
9063
9064 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
9065         
9066         * simd-intrinsics.c: Forgot to add this one.
9067
9068         * mini-codegen.c: Fix macro in case SIMD is not supported.
9069
9070 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
9071         
9072         This patch land initial JIT support for simd intrinsics.
9073
9074         * mini-x86.h: Added new define to make --enable_minimal work on x86.
9075
9076         * Makefile.am: Added simd-intrinsics.c
9077
9078         * simd-intrinsics.c: New file with simd instrinsic related
9079         code.
9080
9081         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
9082
9083         * cpu-x86.md: Add simd related instructions.
9084
9085         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
9086
9087         * driver.c: Added two new --regression variants.
9088
9089         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
9090
9091         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
9092
9093         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
9094         extract some complicated logic to helper functions.
9095
9096         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
9097
9098         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
9099
9100         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
9101         the specialized simplification pass.
9102
9103         * method-to-ir.c (mono_spill_global_vars): Use new macro.
9104
9105         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
9106
9107         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
9108         table.
9109
9110         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
9111         if MONO_ARCH_NEED_SIMD_BANK is defined.
9112
9113         * mini-ops.h: Added the new simd ops.
9114
9115         * mini-x86.c: Added mono_arch_xregname.
9116
9117         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
9118
9119         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
9120
9121         * mini-x86.h: Define simd related MONO_ARCH macros.
9122
9123         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
9124
9125         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
9126
9127         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
9128         MONO_CLASS_IS_SIMD to deal with simd related IR.
9129
9130         * mini.h (MonoInst): Added spill_var to the backend union.
9131
9132         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
9133
9134         * mini.h: Added forward declarations of the new simd fuctions.
9135
9136         * optflags-def.h: Added new optimization names SIMD.
9137
9138         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
9139
9140         * regalloc.h: Added support for working with 3 register banks.
9141
9142         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
9143
9144         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
9145
9146 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
9147
9148         * mini-exceptions.c: remove 64 bit related ifdef clutter.
9149
9150 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
9151
9152         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
9153         instead of one on 64 bit systems.
9154
9155         * method-to-ir.c: Remove unused includes.
9156
9157 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
9158
9159         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
9160         cfg->used_int_regs, since the two are different on arm.
9161
9162 2008-10-02  Mark Probst  <mark.probst@gmail.com>
9163
9164         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
9165         mono_method_get_vtable_index() to get the vtable index.
9166
9167 2008-10-02  Mark Probst  <mark.probst@gmail.com>
9168
9169         * method-to-ir.c (mono_method_to_ir2): Don't create native
9170         wrappers for array methods, because they're never called (and if
9171         they were called they wouldn't work).
9172
9173 2008-10-02  Mark Probst  <mark.probst@gmail.com>
9174
9175         * method-to-ir.c (mono_method_to_ir2): Array methods are
9176         special-cased and must not be invoked indirectly via the (M)RGCTX
9177         when generic sharing is turned on.  Fixes #431413.
9178
9179 2008-10-01  Mark Probst  <mark.probst@gmail.com>
9180
9181         * method-to-ir.c: When generic sharing is active, call
9182         non-interface virtual generic methods via the standard trampoline.
9183
9184         * mini-trampolines.c: Handle virtual generic shared methods.
9185
9186         * mini.h, mini-x86.c, mini-x86.h: New argument for
9187         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
9188         method thunks and which is the trampoline to call if the lookup
9189         fails.  Enable the virtual generic method thunk for x86.
9190
9191         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
9192         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
9193         argument but assert that it's NULL, because these archs don't yet
9194         implement the virtual generic method thunk.  Changes in the IMT
9195         thunk data structures.
9196
9197 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
9198
9199         * aot-compiler.c (emit_globals): Avoid invalid characters in
9200         the static linking symbol.
9201
9202         * objects.cs: Add a test for the range check optimization. Fix warnings.
9203
9204         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
9205         optimization from the current JIT.
9206
9207         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
9208         later in decompose_array_access_opts () to allow more optimizations.
9209
9210         * method-to-ir.c (mono_handle_soft_float): Rename this to 
9211         mono_decompose_soft_float () for consistency.
9212
9213         * mini-ops.h: Fix arguments of OP_STRLEN.
9214
9215         * method-to-ir.c (save_cast_details): Extract the cast details saving code
9216         into a separate function.
9217         (reset_cast_details): Ditto.
9218         (handle_unbox): Save cast details. Fixes #431254.
9219
9220         * method-to-ir.c: Remove some obsolete FIXMEs.
9221
9222 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9223
9224         * ir-emit.h (alloc_dreg): Write a warning before crashing.
9225
9226 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9227
9228         * mini-codegen.c: More work on macros to make them
9229         ready for multiple regbanks.
9230
9231 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9232
9233         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
9234
9235         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
9236
9237 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9238
9239         * mini-codegen.c (mono_spillvar_offset): Proper support for
9240         multiple regbanks.
9241
9242 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
9243
9244         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
9245         the stack overflow changes.
9246
9247 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9248
9249         * mini-codegen.c: Make all bank macros depend on reg_bank.
9250
9251         * mini-codegen.c (mono_local_regalloc): Make free mask
9252         initialization regbank aware.
9253
9254 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9255
9256         * mini-codegen.c (mono_local_regalloc): Extract callee
9257         mask selection to a function and make it regbank aware.
9258
9259 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9260
9261         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
9262         code to deal with many regbanks.
9263
9264 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
9265
9266         * mini-codegen.c: More fp->regbank changes.
9267
9268 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
9269
9270         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
9271         of a hardcoded constant.
9272
9273 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
9274
9275         * method-to-ir.c (type_from_stack_type): Fix typo.
9276
9277 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
9278
9279         * mini-ia64.c (emit_move_return_value): Convert float return values to
9280         double.
9281
9282         * objects.cs: Add a new test.
9283         
9284         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
9285         VARARG methods to fix an assert later.
9286
9287         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
9288         end so it at least compiles.
9289
9290 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
9291
9292         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
9293
9294 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
9295
9296         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
9297         optimization to a new function (emit_optimized_ldloca_ir) and enable
9298         it for both ldloca and ldloca_s.
9299
9300 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
9301
9302         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
9303         gshared CASTCLASS code.
9304
9305         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
9306         amd64, where the libc stack unwinder encounters stack frames referring to
9307         native code in unmapped memory.
9308
9309         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
9310         sharing.
9311
9312         * generics.cs: Add new test.
9313
9314 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
9315
9316         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
9317         add a check that one of the ARM_FPU_ constants is defined.
9318
9319         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
9320         
9321         * mini-exceptions.c: Fix build on non-altstack platforms.
9322
9323         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
9324         sharing of vtypes.
9325
9326         * ir-emit.h: Add a comment to NEW_PCONST.
9327
9328         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
9329
9330         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
9331
9332         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
9333         after the changes to MonoJitDomainInfo.
9334
9335 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9336
9337         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
9338
9339 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9340
9341         * mini-ppc.c: Compiler warning fixes.
9342
9343 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9344
9345         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
9346         for pinvokes.
9347
9348 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9349
9350         * exceptions-ppc.c, mini-ppc.h: Compile
9351         mono_arch_handle_altstack_exception() on Darwin, too.
9352
9353 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9354
9355         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
9356         work on archs which don't have generic sharing implemented, only
9357         without the vtable_arg.
9358
9359 2008-09-26  Mark Probst  <mark.probst@gmail.com>
9360
9361         * mini.c: Added comment explaining why delegate ctor icall
9362         wrappers are compiled.
9363
9364 2008-09-26  Mark Probst  <mark.probst@gmail.com>
9365
9366         * mini.c: Don't produce trampolines to delegate ctor icall
9367         wrappers but compile them upfront.
9368
9369 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
9370
9371         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
9372         runtime-set function when going back to managed code. Currently this
9373         is used to set back the protection on the soft ovf pages and/or to
9374         throw the stack overflow exception that happened in unmanaged code.
9375
9376 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
9377
9378         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
9379         runtime-set function when going back to managed code. Currently this
9380         is used to set back the protection on the soft ovf pages and/or to
9381         throw the stack overflow exception that happened in unmanaged code.
9382
9383 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
9384
9385         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
9386         the support code for restoring stack protection after stack overflows
9387         that happen in unmanaged code. Don't set the exec permission on the
9388         soft overflow area.
9389
9390 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
9391
9392         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
9393         delegate->method_ptr is set. Fixes #428054.
9394
9395 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
9396
9397         * tests.cs: Rename to ratests.cs.
9398
9399         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
9400         emit_get_rgctx_... functions.
9401
9402 2008-09-25  Mark Probst  <mark.probst@gmail.com>
9403
9404         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
9405
9406 2008-09-25  Mark Probst  <mark.probst@gmail.com>
9407
9408         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
9409         before asserting that method is sharable.
9410
9411 2008-09-25  Mark Probst  <mark.probst@gmail.com>
9412
9413         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
9414         whether method needs a static RGCTX wrapper used instead of
9415         complex conditions.
9416
9417         * generic-sharing.c, mini.h: A few functions moved to
9418         metadata/generic-sharing.c.
9419
9420 2008-09-25  Mark Probst  <mark.probst@gmail.com>
9421
9422         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
9423         Generic code sharing for value types, which essentially means
9424         treating value type methods like static methods.  The RGCTX is
9425         passed in the same way.
9426
9427 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
9428
9429         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
9430         opcode when creating multi-dimensional arrays of open types.
9431
9432         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
9433         open generic types.
9434
9435         * generics.cs: Add a test.
9436
9437         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
9438
9439 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
9440
9441         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
9442
9443         * mini.c (mini_method_compile): Set it when running under the debugger. 
9444
9445         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
9446         vreg optimization if the flag is set.
9447
9448         * driver.c (mono_main): Add --attach= option to pass options to
9449         the attach agent.
9450
9451         * mini.c (sigquit_signal_handler): Start the attach agent.
9452
9453         * ssapre.c: Disable this to save space since it is not yet ported to
9454         linear IR.
9455
9456         * regalloc2.c: Disable this to save space.
9457
9458         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
9459
9460 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
9461
9462         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
9463         the -v option useful again.
9464
9465 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
9466
9467         * mini-amd64.c (mono_arch_output_basic_block): Add support for
9468         --break-at-bb.
9469
9470         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
9471         arrays of arrays. Fixes #428406.
9472
9473         * method-to-ir.c (mini_emit_castclass): Ditto.
9474
9475         * objects.cs: Add new test.
9476         
9477 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
9478
9479         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
9480         was wrong at it choked against target_type_is_incompatible for byref types.
9481
9482 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
9483
9484         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
9485         places.
9486
9487 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
9488
9489         * mini-exceptions.c: update a few more exceptions-related counters.
9490
9491 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
9492
9493         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
9494         new functions to allocate from persistent mempools.
9495
9496 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
9497
9498         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
9499         multiple register banks in the future.
9500
9501         * mini-codegen.c (mono_local_regalloc): Fix a warning.
9502
9503 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
9504
9505         * mini.c (type_to_eval_stack_type): Remove duplicated function.
9506
9507         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
9508
9509         * mini.h: Export type_to_eval_stack_type.
9510
9511         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
9512         is only ins->klass of byref types.
9513
9514 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
9515
9516         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
9517         (mini_emit_memcpy2): Ditto.
9518
9519         * mini-amd64.c: Fix a warning.
9520
9521 2008-09-21  Mark Probst  <mark.probst@gmail.com>
9522
9523         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
9524         linking.
9525
9526 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
9527
9528         * method-to-ir.c: Extract stloc micro-optimization to a
9529         function and apply it to all cases.
9530
9531 2008-09-19  Mark Probst  <mark.probst@gmail.com>
9532
9533         * method-to-ir.c: Don't fail generic code sharing in cases we
9534         already support.
9535
9536 2008-09-18  Mark Probst  <mark.probst@gmail.com>
9537
9538         * mini-ppc.c: Handle structs in tailcalls on Darwin.
9539
9540 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
9541
9542         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
9543         implementation.
9544
9545 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
9546
9547         * trace.c: make tracing more useful and correct, with per-thread
9548         id and indent info.
9549
9550 2008-09-15  Mark Probst  <mark.probst@gmail.com>
9551
9552         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
9553         doing a method call and the argument is an R4.
9554
9555 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
9556
9557         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
9558         generic methods.
9559
9560 2008-09-13  Mark Probst  <mark.probst@gmail.com>
9561
9562         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
9563
9564 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
9565
9566         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
9567         (MONO_JUMP_TABLE_FROM_INS): Ditto.
9568
9569 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
9570
9571         * driver.c: Add a --agent argument (not supported yet) to load managed
9572         agent assemblies before loading the main assembly, similarly to how the
9573         Java VM handles agents.
9574
9575 2008-09-11  Mark Probst  <mark.probst@gmail.com>
9576
9577         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
9578         function to do stack layout of local variables.
9579
9580 2008-09-11  Mark Probst  <mark.probst@gmail.com>
9581
9582         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
9583         calculation.
9584
9585 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
9586
9587         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
9588         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
9589         JIT if DISABLE_JIT is defined.
9590
9591         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
9592         defined.
9593
9594 2008-09-10  Mark Probst  <mark.probst@gmail.com>
9595
9596         * iltests.il.in: Disable the fconv test on PPC (the result is
9597         undefined according to ECMA).
9598
9599 2008-09-10  Mark Probst  <mark.probst@gmail.com>
9600
9601         * iltests.il.in: Enable tail call tests for PPC.
9602
9603         * mini.h: Add variable for storing incoming valuetype argument
9604         addresses for tail calls.
9605
9606         * mini-ppc.c: Implement valuetype arguments and return values for
9607         tailcalls on Linux.
9608
9609 2008-09-09  Mark Probst  <mark.probst@gmail.com>
9610
9611         * mini-ppc.c: Partially implement tail calls (struct arguments and
9612         return values not supported).
9613
9614         * method-to-ir.c: Enable tail calls on PPC.
9615
9616 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
9617
9618         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
9619         runtime-invoke wrappers to work around the problem of them getting
9620         assigned to a random class.
9621
9622         * aot-runtime.c (mono_aot_get_method): Ditto.
9623         
9624 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
9625
9626         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
9627         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
9628
9629 2008-09-07  Mark Probst  <mark.probst@gmail.com>
9630
9631         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
9632         until they're implemented properly.
9633
9634         * exceptions-ppc.c: Use arch-independent exception-handling code
9635         instead of custom one.
9636
9637         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
9638         for Linear IR.
9639
9640         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
9641
9642         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
9643         applies when __powerpc__ is defined.
9644
9645 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
9646
9647         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
9648         methods to their code to avoid computing the full name of wrappers and
9649         doing a lookup in a string hash table.
9650
9651 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
9652
9653         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
9654         we identify bblocks before method_to_ir () is ran.
9655
9656         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
9657         Also avoid optimizing branches pointing to themselves.
9658
9659         * mini.c (mini_method_compile): Ditto. Fixes #422947.
9660
9661 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
9662
9663         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
9664
9665 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
9666
9667         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
9668         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
9669         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
9670         'buf'.
9671
9672         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
9673         jumped to the same entry in plt_jump_table.
9674
9675 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
9676
9677         * method-to-ir.c (initialize_array_data): Handle field with RVA from
9678         dynamic images.
9679
9680 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
9681
9682         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
9683         other assignment can be if converted. Saves 1.5% on corlib size and fixes
9684         #421807.
9685
9686 2008-08-29  Geoff Norton  <gnorton@novell.com>
9687
9688         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
9689         segment, and doesn't properly handle .space as .text.  Fixes
9690         AOT Mach/ARM
9691
9692 2008-08-29  Geoff Norton  <gnorton@novell.com>
9693
9694         * mini.c: Disable the mach exception handler when running on 
9695         ARM
9696
9697 2008-08-29  Geoff Norton  <gnorton@novell.com>
9698
9699         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
9700         globals on Darwin/ARM
9701
9702 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
9703
9704         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
9705         since too many things depend on it. Instead, call 
9706         mono_runtime_set_no_exec ().
9707         
9708         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
9709         the new JIT.
9710
9711         * aot-compiler.c: Add an 'asm-only' AOT option.
9712
9713         * mini.c: Avoid initializing the runtime when doing AOT compilation.
9714                 
9715         * aot-compiler.c (compile_method): Disable gshared support for now as it
9716         doesn't yet work.
9717
9718 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
9719
9720         * mini-amd64.h : Fix a compiler warning.
9721
9722         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
9723           Changed to use a callback function to retrieve the unwind info.
9724           This avoids problems observed when code blocks were removed by
9725           unloading an app domain.
9726
9727         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
9728           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
9729           to work properly.
9730
9731         Contributed under MIT/X11 license.
9732
9733 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
9734
9735         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
9736           case to keep the stack aligned to 8.
9737
9738         Contributed under MIT/X11 license.
9739
9740 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
9741
9742         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
9743         avoid repeated linear searches.
9744
9745 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
9746
9747         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
9748         methods it can't handle.
9749         
9750         * aot-compiler.c (add_method): Avoid adding a method twice.
9751         (add_wrappers): Add runtime invoke wrappers for all methods.
9752
9753         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
9754         function to create an aot-compatible version of this trampoline.
9755
9756         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
9757
9758 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
9759
9760         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
9761
9762         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
9763         with a generic sharing failure.
9764
9765         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
9766
9767         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
9768         CEE_RETHROW. Fixes #419634.
9769
9770         * mini.c (mono_method_to_ir): Ditto.
9771
9772         * exceptions.cs: Add a new test.
9773         
9774         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
9775         to mono_type_stack_size_internal () since some callers might not pass in
9776         an rgctx.
9777
9778         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
9779         instrument_prolog. Fixes #419878.
9780
9781         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
9782         doubles in soft float mode volatile.
9783
9784 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
9785
9786         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
9787
9788         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
9789         to handle soft float correctly.
9790
9791         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
9792         the fast path.
9793
9794         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
9795
9796         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
9797         to sp, since the generics catch code requires it.
9798
9799         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
9800         copying.
9801
9802         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
9803         mono_arch_emit_imt_argument ().
9804
9805         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
9806
9807         * mini-arm.c tramp-arm.c: Generic sharing updates.
9808
9809 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
9810
9811         * mini-arm.c: Fix the arm build.
9812
9813         * generic-sharing.c (mini_type_get_underlying_type): New helper function
9814         handling enums, generic instances and generic sharing.
9815         (mini_type_stack_size_full): Ditto.
9816
9817         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
9818         
9819         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
9820
9821         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
9822
9823         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
9824         trampolines.
9825
9826         * mini-arm.c: Various small generic sharing changes.
9827
9828         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
9829         this for x86.
9830         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
9831         custom code.
9832
9833         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
9834         helper function to return a generic class init trampoline.
9835
9836         * method-to-ir.c mini.c: Use it.
9837         
9838         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
9839         arch-specfic function to return a generic class init trampoline.
9840
9841         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
9842         the GENERIC_CLASS_INIT custom code.
9843
9844         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
9845         a fatal error, not a sharing failure.
9846
9847         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
9848         needed.
9849
9850         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
9851         trampoline argument from MONO_ARCH_VTABLE_REG.
9852
9853         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
9854         order of the arguments to the C trampoline: pass 'slot' as the trampoline
9855         argument, and pass the vtable in VTABLE_REG.
9856
9857         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
9858         order of the arguments to the C trampoline: pass 'slot' as the trampoline
9859         argument, and pass the vtable in VTABLE_REG.
9860         (mono_arch_create_trampoline_code_full): Remove some special casing for
9861         the rgctx fetch trampoline.
9862
9863         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
9864         Fixes #419273.
9865
9866         * iltests.il: Add a test for it.
9867
9868 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
9869
9870         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
9871
9872         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
9873         no longer needed.
9874
9875         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
9876         use mono_jit_info_table_find () to avoid recursion.
9877         (mono_delegate_trampoline): Add a sync wrapper here.
9878
9879         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
9880         here.
9881
9882         * mini.c (mono_method_to_ir): Ditto.
9883         
9884         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
9885         add_sync_wrapper argument. Don't add a sync wrapper here.
9886         (mono_create_jump_trampoline): Don't add a sync wrapper here.
9887
9888         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
9889         
9890 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
9891
9892         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
9893           of nonvolatile registers back from MonoContext to CONTEXT.
9894
9895         Contributed under MIT/X11 license.
9896
9897 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
9898
9899         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
9900           arguments on Winx64 there are only 4 argument registers.  For this
9901           logic to work the last argument must be pulled from the stack.  
9902
9903         Contributed under MIT/X11 license.
9904
9905 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
9906
9907         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
9908
9909         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
9910         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
9911         encode/decode_method_ref ().
9912
9913         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
9914
9915         * aot-runtime.c (decode_patch): Ditto.  
9916
9917         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
9918         MONO_PATCH_INFO_METHOD.
9919
9920         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
9921         MonoGenericJitInfo.
9922
9923         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
9924         MonoGenericJitInfo.
9925
9926         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
9927
9928         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
9929         one from the caller.
9930
9931         * aot-runtime.c (decode_generic_inst): New function to decode and
9932         return a interned generic inst.
9933         (decode_klass_ref): Use it.
9934         (decode_method_ref): Ditto.
9935
9936         * aot-compiler.c (emit_exception_debug_info): Save 
9937         jinfo->has_generic_jit_info too.
9938
9939 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
9940
9941         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
9942
9943         * iltests.il.in: Add a test for fconv_to_i.
9944
9945         * liveness.c: Disable the liveness2 pass for now to save space.
9946
9947         * regalloc2.c: Include mempool-internals.h to fix warnings.
9948
9949         * aot-compiler.c (encode_method_ref): Encode the context of generic
9950         instance methods.
9951
9952         * aot-runtime.c (decode_method_ref): Inflate generic methods using
9953         the context saved in the aot file.
9954
9955         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
9956
9957         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
9958
9959         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
9960         volatile so they won't be optimized away.
9961
9962 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
9963
9964         * ssa.c:
9965         * ssa2.c:
9966         * mini.c:
9967         * regalloc2.c:
9968         * dominators.c: Remove duplicated functions that now are in
9969         mempool-internals.h.
9970
9971 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
9972
9973         * aot-compiler.c: Fix warnings.
9974
9975         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
9976
9977         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
9978
9979         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
9980         as the patch type.
9981
9982         * mini.c (mono_resolve_patch_target): Ditto.
9983         
9984         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
9985         (encode_klass_ref): Add support for encoding VARs/MVARs.
9986
9987         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
9988
9989         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
9990         the handling of the got entries into a separate 'decode_got_entry' function.
9991         Add support for RGCTX_FETCH.
9992
9993         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
9994         clobbered by the trampoline code.
9995
9996         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
9997         not clobbered by the indirect calling code.
9998
9999 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
10000
10001         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
10002         to fix the build.
10003
10004 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
10005
10006         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
10007         signature using the compilation mempool otherwise we would leak it.
10008
10009 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
10010
10011         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
10012         mono_emit_abs_call ().
10013
10014         * patch-info.h: Add GENERIC_CLASS_INIT.
10015
10016         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
10017
10018         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
10019         as their target as a near call.
10020
10021         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
10022         ABS handling code.
10023         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
10024
10025         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
10026         call to a runtime function described by a patch.
10027
10028         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
10029         mono_emit_abs_call, this has the advantage that the ABS handling code in
10030         mono_codegen () can handle them both, and can handle other stuff in the
10031         future without additional code.
10032
10033         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
10034         entry.
10035         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
10036         abs addresses.
10037
10038         * mini.h: Add missing bblock related prototypes.
10039
10040         * mini.h (MonoCompile): Remove unused reverse_inst_list and
10041         reverse_inst_list_len fields.
10042
10043         * mini.c: Refactor this file a bit by moving branch optimizations to 
10044         branch-opts.c.
10045
10046         * method-to-ir.c: Merge generic sharing changes missed earlier.
10047
10048         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
10049
10050         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
10051         shared patches. Process METHODCONST as a shared patch.
10052
10053         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
10054         as it crashes on the 2.0 mscorlib.
10055
10056         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
10057         to cause crashes.
10058         
10059         * aot-compiler.c: Use is_plt_patch () in a few additional places.
10060         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
10061         by IMT.
10062
10063         * aot-compiler.c: Reorganize the got handling code to be a bit more
10064         understandable.
10065
10066 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
10067
10068         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
10069         mono_patch_info_equals/hash, and use it to massively simplify
10070         get_plt_index ().
10071
10072         * mini.c (mono_patch_info_hash): Simplify this and add support for
10073         more patch types.
10074
10075         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
10076
10077         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
10078         handling code, since an offset is not enough to identify a trampoline.
10079
10080         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
10081
10082 2008-08-17  Mark Probst  <mark.probst@gmail.com>
10083
10084         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
10085
10086         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
10087
10088         * mini-ops.h: Argument and result types for OVF_CARRY ops.
10089
10090         * decompose.c: PPC decompositions for various ops.
10091
10092         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
10093
10094 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
10095
10096         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
10097         call the generic trampoline code using a call, instead of a jump, to
10098         remove some special casing from the generic trampoline code.
10099
10100         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
10101         (mono_codegen): Ditto.
10102
10103         * aot-compiler.c aot-runtime.c: Ditto.
10104
10105         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
10106
10107         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
10108         helper function to find the offset corresponding to a lazy fetch trampoline.
10109
10110         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
10111         when doing generic sharing.
10112
10113         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
10114         places.
10115         
10116         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
10117         mini-trampolines.c to be with the other trampoline creation functions.
10118
10119         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
10120         as it is equal to method->signature in most cases, add a 
10121         mono_emit_method_call_full variant which takes a signature and an imt
10122         argument as well.
10123
10124 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
10125
10126         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
10127         to this function, since it could be computed easily from the method 
10128         argument.
10129         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
10130         more.
10131
10132         * method-to-ir.c mini.c: Remove references to 
10133         compile_generic_method_wo_context.
10134
10135         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
10136         generic method calls.
10137         
10138         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
10139         dimensional non-szarrays.
10140
10141         * mini.c (mini_init): Register mono_array_new_1.
10142
10143         * jit-icalls.c (mono_array_new_1): New jit icall.
10144
10145         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
10146         pointing to the method.
10147
10148         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
10149         method addresses belonging to METHOD_JUMP patches in the 
10150         jump_target_got_slot_hash.
10151         (mono_aot_load_method): Ditto.
10152
10153         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
10154         METHOD_JUMP patches.
10155
10156         * mini.c (mini_create_jit_domain_info): New helper function which 
10157         initializes/frees domain->runtime_info.
10158         (mini_free_jit_domain_info): Ditto.
10159         (mini_init): Install the domain hook functions with the runtime.
10160
10161         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
10162         information maintained by the JIT.
10163
10164         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
10165         insertion into jump_table_hash into mono_codegen (), also implement proper
10166         locking.
10167
10168         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
10169         tail calls, it is already done by the aot code.
10170         
10171         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
10172         mechanism on amd64.
10173
10174         * iltests.il.in: Make the jmp test a bit more complex.
10175
10176         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
10177         generic instances which doesn't have a token.
10178
10179         * aot-runtime.c (decode_method_ref): Ditto.
10180         
10181         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
10182         can handle this case now.
10183         (handle_box): Ditto.
10184
10185 2008-08-15  Geoff Norton  <gnorton@novell.com>
10186
10187         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
10188         debugging check.
10189
10190 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
10191
10192         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
10193         calling generic methods.
10194
10195         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
10196
10197         * aot-runtime.c (decode_patch_info): Ditto.
10198
10199         * mini.c (mono_resolve_patch_target): Ditto.
10200         
10201         * patch-info.h: Add METHOD_RGCTX.
10202
10203         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
10204
10205 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
10206
10207         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
10208         arguments in registers.
10209
10210         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
10211         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
10212
10213         * mini.c (mini_method_compile): Abort aot compilation for generic
10214         methods if generic sharing is disabled.
10215         
10216         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
10217         an mrgctx.
10218
10219         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
10220         requiring an mrgctx.
10221
10222         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
10223         store instructions when converting a vcall to a normal call.
10224
10225         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
10226         mono_arch_find_jit_info.
10227
10228 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
10229
10230         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
10231         avoid calling mono_method_full_name () for every method even if the
10232         env var is not set.
10233         (check_inline_caller_method_name_limit): Ditto.
10234
10235 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
10236
10237         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
10238         assemblies in one run.
10239
10240         * aot-compiler.c (mono_compile_assembly): Only print out a count of
10241         skipped methods if it is not 0.
10242
10243         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
10244
10245 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
10246
10247         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
10248           MONO_ARCH_HAVE_UNWIND_TABLE.
10249
10250         Contributed under MIT/X11 license.
10251
10252 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
10253
10254         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
10255           from default optimizaton list on Winx64.
10256
10257         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
10258
10259         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
10260           the LMF from the MonoJitTlsData structure.
10261
10262         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
10263
10264         Contributed under MIT/X11 license.
10265
10266 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
10267
10268         * mini.c (sigsegv_signal_handler): Fix the build.
10269
10270         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
10271         assembly->aot_module.
10272
10273         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
10274         hash table. This simplifies and speeds up a lot of code, and fixes support
10275         for .netmodules.
10276
10277         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
10278         with the runtime.
10279
10280         * mini-exceptions.c: Ditto.
10281         
10282         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
10283         'native_offset' argument, since these are computed in the 
10284         mono_find_jit_info () function.
10285
10286         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
10287         is used by exceptions-ppc.c.
10288
10289         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
10290         mono_arch_find_jit_info ().
10291         
10292         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
10293         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
10294         generic code in mini-exceptions.c.
10295
10296 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
10297
10298         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
10299
10300         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
10301         
10302         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
10303         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
10304         called while holding the loader lock. Fixes #415608.
10305         (mono_aot_get_method_from_token_inner): Ditto.
10306
10307 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
10308
10309         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
10310         to reduce differences between this and the generic implementation in
10311         mini-exceptions.c.
10312         (ves_icall_get_frame_info): Ditto.
10313
10314         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
10315
10316         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
10317         longer neccesarry.
10318
10319         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
10320         mono_arch_get_call_filter () and make it non-static, for consistency with the
10321         other architectures.
10322
10323 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
10324
10325         * mini.c:
10326         * local-propagation.c:
10327         * mini-x86.c: Correct the name of arch defines.
10328
10329 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
10330
10331         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
10332         NO_EMULATE_LONG_SHIFT_OPS define.
10333
10334 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
10335
10336         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
10337         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
10338
10339         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
10340         MACH fixes. Merged from the 2.0 branch.
10341
10342         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
10343
10344         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
10345         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
10346
10347         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
10348
10349         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
10350         mono_marshal_get_native_wrapper () signature changes.
10351
10352 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
10353
10354         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
10355         conversion bug under arm.
10356
10357 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
10358
10359         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
10360
10361         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
10362         with overflow checking.
10363
10364 2008-08-05  Marek Habersack  <mhabersack@novell.com>
10365
10366         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
10367         to the genmdesc.pl file
10368
10369 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
10370
10371         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
10372         arg_array in the soft-float versions of the LOAD/STORE macros.
10373
10374         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
10375         implementation.
10376
10377         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
10378
10379 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
10380
10381         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
10382         a float HFA. Fixes #413621.
10383
10384 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
10385
10386         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
10387         frame_size to args_size. Fixes build.
10388
10389 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
10390
10391         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
10392         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
10393
10394         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
10395         the stack are not unaligned. Fixes #413247.
10396         
10397 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
10398
10399         * mini.c: update jitted methods performance counters.
10400
10401 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
10402
10403         * mini-exceptions.c: increase the exceptions thrown performance
10404         counter in mono_handle_exception ().
10405
10406 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
10407
10408         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
10409         can work with netmodules.
10410
10411 2008-07-28  Geoff Norton  <gnorton@novell.com>
10412
10413         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
10414         regression tests.
10415
10416 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
10417
10418         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
10419         correct place.
10420
10421 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
10422
10423         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
10424           The float param registers and other param registers must be the 
10425           same index on Windows x64.
10426
10427         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
10428           ArgValuetypeAddrInIReg argument case.  Setting the argument
10429           op to OP_VTARG_ADDR (OP_REGOFFSET)).
10430
10431         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
10432           variable computed above as the copy length for arguments of storage
10433           type ArgValuetypeAddrInIReg.
10434
10435         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
10436           ArgValuetypeAddrInIReg argument case.  This case will rely on
10437           mono_arch_emit_outarg_vt to emit the correct code later in the process.
10438
10439         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
10440           a 32 byte stack allocation for all calls.  We will omit the adjustment for
10441           jump and tail call instructoins as they do not follow the typical call behavior.
10442
10443         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
10444           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
10445           local variable and pass the local variable by reference to the called method.
10446
10447         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
10448           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
10449           of a struct is passed in a register it must be saved with the other
10450           volatile argument on the stack.
10451
10452         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
10453           frame pointer the stack adjustment value must be saved to the unwind 
10454           info structure.
10455
10456         Contributed under MIT/X11 license.
10457
10458 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
10459
10460         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
10461         which got lost in the merge.
10462
10463 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
10464
10465         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
10466         build.
10467
10468         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
10469         
10470         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
10471         icalls, since they won't be patched.
10472
10473         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
10474         different code sequence when running under valgrind to prevent some valgrind
10475         errors.
10476
10477         * iltests.il.in: Add new regression test.
10478
10479         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
10480         end with a throw.
10481
10482         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
10483         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
10484
10485         * iltests.il.in: Add new test.
10486
10487         * aot-compiler.c: Fix some warnings.
10488
10489         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
10490         Fixes #412494.
10491
10492 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
10493
10494         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
10495         (mini_usage_jitdeveloper): Add a missing --wapi option.
10496
10497 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
10498
10499         * mini-codegen.c: Simplify the is_fp macros.
10500         (free_up_ireg): Remove, use free_up_reg instead.
10501         (free_up_reg): Fix the fp case.
10502
10503 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
10504
10505         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
10506         lowered earlier.
10507
10508         * exceptions-x86.c: Merge some changes which seemed to have got lost
10509         in the linear-ir merge.
10510
10511         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
10512
10513         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
10514         long vreg volatile even if the variable was already created.
10515
10516         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
10517         volatile variables.
10518
10519 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
10520
10521         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
10522
10523         * mini.c (mono_jit_compile_method_inner): Add support for 
10524         MONO_EXCEPTION_BAD_IMAGE.
10525
10526         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
10527         mini_method_get_context () returns NULL. Fixes #356531.
10528
10529         * mini.c (mono_method_to_ir): Ditto.
10530         
10531         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
10532         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
10533
10534 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
10535
10536         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
10537         in the LDFTN implementation.
10538
10539 2008-07-25  Mark Probst  <mark.probst@gmail.com>
10540
10541         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
10542         code, patch calls to icalls, too, even if they're not in the
10543         shared generic code hash.  Fixes #411962.
10544
10545 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
10546
10547         * cpu-x86.md: Increase the length of the fcall opcodes.
10548
10549         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
10550         calls returning floats.
10551
10552         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
10553         on NEWARR.
10554         
10555         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
10556         missed earlier.
10557
10558         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
10559         into the domain->method_code_hash.
10560
10561         * aot-compiler.c: Fix win32 build.
10562
10563         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
10564         
10565         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
10566         gshared NEWARR implementation.
10567
10568         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
10569
10570         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
10571         can be used outside of method_to_ir.
10572
10573         * mini.h (MonoCompile): Add arg_types field.
10574
10575         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
10576         
10577         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
10578         the values of the local arg_array and param_types array.
10579
10580 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
10581
10582         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
10583         got accesses might only get generated later when NEWOBJ is decomposed.
10584         
10585         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
10586         looking up the native code of the target method when a delegate is called
10587         for the first time.
10588
10589         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
10590         optimization.
10591
10592         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
10593
10594         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
10595         AOT work on platforms without a working dlsym implementation.
10596
10597         * mini.h: Bump AOT image format version.
10598         
10599 2008-07-24  Mark Probst  <mark.probst@gmail.com>
10600
10601         * mini-exceptions.c: Free a MonoType with
10602         mono_metadata_free_type() instead of g_free().
10603
10604         * aot-runtime.c: Free a MonoType.
10605
10606 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
10607
10608         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
10609         optimization.
10610
10611         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
10612         fp stack on x86.
10613
10614 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
10615         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
10616         profiler hook.
10617
10618 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
10619
10620         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
10621         NEWOBJ calls on valuetypes.
10622
10623         * iltests.il.in: Add new test.
10624
10625         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
10626
10627 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
10628
10629         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
10630         is no longer needed.
10631
10632         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
10633         non register sized integer arguments.
10634         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
10635         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
10636         emit_memcpy2 ().
10637
10638         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
10639         CEE_MONO_RETOBJ.
10640         
10641         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
10642         two a binop with different sized arguments is emitted.
10643
10644         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
10645         instruction in the ins==NULL case.
10646
10647 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
10648
10649         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
10650
10651         * mini-x86.c: Fix osx build.
10652
10653         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
10654         opcodes as well.
10655
10656         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
10657         instruction for non int sized variables.
10658
10659         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
10660         implementation.
10661
10662 2008-07-23  Robert Jordan  <robertj@gmx.net>
10663
10664         * method-to-ir.c: Fix MSVC build.
10665
10666 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
10667
10668         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
10669         a non int sized type, widen it to an int since newer versions of gcc seem to
10670         generate code which needs this.
10671
10672         * ssa2.c abcremoval2.c: Fix warnings.
10673
10674         * *: Merge the Linear IR branch.
10675
10676         The original branch is at trunk/branches/vargaz/mini-linear-il, and
10677         the ChangeLog file there describes all the changes done over the years. 
10678         Further documentation can be found at www.mono-project.com/Linear_IL.
10679
10680 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
10681
10682         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
10683           The float param registers and other param registers must be the 
10684           same index on Windows x64.
10685
10686         Contributed under MIT/X11 license.
10687
10688 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
10689
10690         * mini.c: Make the previous fix GC safe.
10691
10692 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
10693
10694         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
10695
10696 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
10697
10698         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
10699           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
10700           ArgValuetypeAddrInIReg instead.
10701
10702         Contributed under MIT/X11 license.
10703
10704 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
10705
10706         * mini-codegen.c (get_register_spilling): Fix a warning.
10707
10708 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
10709
10710         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
10711         for types which the initialization fails. Raises the provided exception
10712         at the right stop after cleanup.
10713
10714 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
10715
10716         * aot-compiler.c: Free most of the memory allocated during compilation.
10717
10718         * mini.c (mini_parse_debug_options): Fix a leak.
10719         
10720         * mini.c (mini_method_compile): Don't add the method to the jit info tables
10721         during aot compilation.
10722
10723 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
10724
10725         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
10726         it has too much register pressure.
10727
10728 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
10729
10730         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
10731
10732 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
10733
10734         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
10735         on x86.
10736
10737         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
10738         on amd64 similar to the way it is done on arm.
10739
10740         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
10741
10742         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
10743         consistency, normalize error messages, avoid loading aot-only modules in
10744         normal mode.
10745
10746         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
10747         for consistency.
10748
10749         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
10750
10751 2008-07-11  Martin Baulig  <martin@ximian.com>
10752
10753         * debug-debugger.h
10754         (MonoDebuggerInfo): Add `interruption_request'.
10755
10756 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
10757
10758         * aot-compiler.c (emit_plt): Remove some dead code.
10759
10760         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
10761
10762         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
10763         return the plt info offset belonging to a given plt entry.
10764
10765         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
10766         mono_aot_get_plt_info_offset.
10767         
10768         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
10769         similar to the amd64 code by makeing jumps through a separate jump table 
10770         instead of embedding the jump addresses into the code.
10771
10772 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
10773
10774         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
10775         method.
10776
10777 2008-07-10  Martin Baulig  <martin@ximian.com>
10778
10779         * mini.c (mini_method_compile): Disable generics sharing when
10780         running in the debugger.
10781
10782 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
10783
10784         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
10785
10786         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
10787         the local register allocator from running out of registers on x86 when 
10788         using aot.
10789
10790 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
10791
10792         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
10793         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
10794         C4146.
10795
10796         Contributed under MIT/X11 license.
10797
10798 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
10799
10800         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
10801         speed up the assembler.
10802
10803 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
10804
10805         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
10806         support.
10807
10808         * mini.c: Move the soft float handling macros a bit earlier, add 
10809         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
10810         place.
10811
10812         * mini.h: Add prototype for mono_arch_fixup_jinfo.
10813
10814         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
10815         read-only to help catch code allocation requests.
10816         
10817         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
10818         and turn it off when using --aot-only or when compiling with --aot=full.
10819
10820         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
10821         jump table for switches from the normal domain mempool, not the code
10822         manager.
10823
10824         * mini-trampolines.c (get_unbox_trampoline): New function to return an
10825         unbox trampoline which handles aot-only mode too.
10826
10827         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
10828         an AOTed unbox trampoline.
10829
10830         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
10831
10832 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
10833
10834         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
10835         ""
10836
10837         Contributed under MIT/X11 license.
10838
10839 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
10840
10841         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
10842           the unwind information for the method at the end of the allocated block.
10843           
10844         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
10845           MonoCompileArch to hold the unwind info for SEH on Winx64
10846         
10847         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
10848           frame pointer info for the method being compiled.
10849           
10850         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
10851           the call to mono_exception_from_token.
10852           
10853         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
10854           storing the method prolog information in a format that the Winx64 SEH can understand.  This
10855           information is stored a the end of the method block because it is all 32-bit offset based.
10856
10857         Contributed under MIT/X11 license.
10858
10859 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
10860
10861         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
10862
10863         * wapihandles.c: Fix warnings.
10864
10865         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
10866         mode.
10867
10868         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
10869         mono_jit_compile_method in aot-only mode since that calls the type 
10870         initializer.
10871         
10872         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
10873         get_delegate_invoke_impl in aot-only mode.
10874
10875         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
10876
10877 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
10878
10879         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
10880
10881         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
10882         is on by default.
10883
10884         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
10885
10886         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
10887         init trampoline from the AOT file as well.
10888
10889         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
10890         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
10891         code.
10892
10893         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
10894         mono_init.
10895
10896         * exceptions-amd64.c: Add _full variants for the remaining exception code
10897         creation functions as well, allow emission of relocatable code, remove
10898         caching since that is now done by the caller.
10899
10900         * mini-exceptions.c: Add _full variants for the remaining exception code
10901         creation functions as well, add aot-only support.
10902
10903         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
10904         if we can determine a proper token for them.
10905         (add_wrappers): Add a few more wrappers.
10906         (emit_method_code): Remove some dead code.
10907         (emit_trampolines): Emit exception code too.
10908
10909         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
10910
10911         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
10912         mono_array_new_va which avoids varargs.
10913
10914         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
10915
10916         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
10917         mono_arch_create_specific_trampoline () in all places.
10918
10919         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
10920         a bit so it can be used for other things as well.
10921         
10922         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
10923         on demand as well.
10924
10925         * exceptions-amd64.c: Rename the caching from the exception code creation
10926         functions, it is done by the caller instead.
10927         
10928         * exceptions-amd64.c: Change the signature of the exception code creation 
10929         functions to allow the creation of relocatable code later.
10930
10931         * mini-exceptions.c: Add a set of functions to query the various 
10932         runtime-generated exception functions.
10933
10934         * mini.c mini-exceptions.c: Use the newly added functions instead of the
10935         mono_arch_.. () functions.
10936         
10937 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
10938
10939         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
10940
10941         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
10942
10943         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
10944         (mini_get_vtable_trampoline): Ditto.
10945
10946         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
10947         code in the AOT case by returning the code size and a list of relocations to
10948         the caller.
10949
10950         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
10951
10952 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
10953
10954         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
10955           clean the stack.
10956
10957         Contributed under MIT/X11 license.
10958
10959 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
10960
10961         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
10962         so the buffer size can be computed correctly. Fixes #404735.
10963
10964         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
10965         normally as cfg->debug_info is already freed.
10966
10967 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
10968
10969         * mini-amd64.c: For calls returning vtypes in registers, don't store
10970         the return address on the stack, instead allocate a separate local for
10971         it. Fixes #404729.
10972
10973 2008-07-05  Mark Probst  <mark.probst@gmail.com>
10974
10975         * mini-trampolines.c, mini.h: Add an argument to
10976         mono_create_jit_trampoline_in_domain() for turning off the adding
10977         of the sync wrapper.
10978
10979         * mini.c: Use the JIT trampoline without sync instead of
10980         ldftn_nosync in static RGCTX invoke wrappers so that the call can
10981         be patched.
10982
10983 2008-07-04  Mark Probst  <mark.probst@gmail.com>
10984
10985         * driver.c: Turn on GSHARED optimization by default.
10986
10987 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
10988
10989         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
10990         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
10991
10992         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
10993         create a variant of the generic trampoline code callable from AOTed trampolines.
10994
10995         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
10996         trampoline code callable from AOTed trampolines.
10997
10998         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
10999
11000 2008-07-04  Mark Probst  <mark.probst@gmail.com>
11001
11002         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
11003         pass-through manner.
11004
11005         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
11006         and don't fail sharing for them anymore.
11007
11008         * mini-exceptions.c: Handle exceptions in shared generic methods.
11009
11010         * generic-sharing.c: When checking the context of a generic
11011         method, also check its class's context.  Don't treat wrappers as
11012         sharable.
11013
11014         * mini-trampolines.c: Some code factored out to
11015         metadata/generic-sharing.c.  Handle the MRGCTX case.
11016
11017         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
11018         we must deal with the method being of another instantiation of the
11019         class.  Add static rgctx invoke wrappers to generic methods.
11020
11021 2008-07-04  Mark Probst  <mark.probst@gmail.com>
11022
11023         * mini.c: Provide all jit infos of generic shared methods with a
11024         generic jit info.
11025
11026         * mini-exceptions.c: Handle the new situation that a generic info
11027         might be available, but not info about the this/vtable/mrgctx
11028         variable.
11029
11030 2008-07-03  Mark Probst  <mark.probst@gmail.com>
11031
11032         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
11033         generic methods.
11034
11035 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
11036
11037         * dominators.c (check_dominance_frontier): Fix a warning.
11038
11039         * mini.h: Add some missing prototypes.
11040
11041         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
11042
11043         * driver.c (mono_jit_init_version): Correct the comments since the first
11044         argument should be the name of the root domain, not a filename.
11045
11046         * aot-runtime.c (make_writable): Error out if this is called while running
11047         with --aot-only.
11048         (load_aot_module): Ditto.
11049
11050         * aot-compiler.c: Really fix the computation of method indexes.
11051
11052         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
11053         optimizations as this is no longer called frequently.
11054
11055         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
11056         method and the invoke impl code and pass it to the delegate trampoline instead of
11057         just the delegate class.
11058
11059 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
11060
11061         * aot-compiler.c: Fixup the computation of method indexes.
11062         (add_wrappers): Create the base methods of the runtime invoke wrappers using
11063         the method builder infrastructure.
11064
11065         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
11066         has no header.
11067
11068         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
11069         mode, load the method right away instead of creating a trampoline.
11070
11071         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
11072
11073         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
11074         some checks a bit.
11075
11076 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
11077
11078         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
11079         (mono_aot_load_method): Use method_index instead of method->token.
11080
11081         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
11082         can handle icalls etc. properly.
11083
11084         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
11085
11086         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
11087
11088         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
11089         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
11090         JIT_ICALL_ADDR patch type.
11091
11092         * patch-info.h: Add JIT_ICALL_ADDR patch type.
11093
11094         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
11095         request flag.
11096         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
11097
11098         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
11099
11100 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
11101
11102         * mini.c: Use domain->jit_code_hash_lock for controlling access to
11103         domain->jit_code_hash.
11104
11105 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
11106
11107         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
11108
11109 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
11110
11111         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
11112         get_this_arg_from_call, let it compute it when needed.
11113
11114         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
11115         gsctx from code only when needed.
11116
11117         * mini-trampolines.c (get_generic_context): Rename this to 
11118         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
11119         it can be called by the arch backends.
11120
11121         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
11122
11123 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
11124
11125         * driver.c (mono_main): Add experimental --aot-only command line option.
11126
11127         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
11128         set.
11129
11130 2008-06-26  Kornel Pal  <kornelpal@gmail.com>
11131
11132         * driver.c (DllMain): Remove mono_module_handle.
11133
11134         Contributed under MIT/X11 license.
11135
11136 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
11137
11138         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
11139         for emitting methods which are not in the source assembly. Detect and report
11140         failure of assembling+linking.
11141         
11142         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
11143
11144         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
11145
11146 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
11147
11148         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
11149
11150 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
11151
11152         * mini.h: Remove some obsolete prototypes.
11153
11154         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
11155
11156 2008-06-24  Mark Probst  <mark.probst@gmail.com>
11157
11158         * mini.c (get_object_generic_inst): Variable-sized arrays are not
11159         supported by Visual Studio, so use alloca().
11160
11161 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
11162
11163         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
11164         Fixes #402585.
11165
11166 2008-06-23  Mark Probst  <mark.probst@gmail.com>
11167
11168         * mini.c: Fail sharing of a generic method if it contains an open
11169         catch clause (because we don't pass MRGCTXs yet).
11170
11171 2008-06-23  Mark Probst  <mark.probst@gmail.com>
11172
11173         * mini.c: When compiling a method with generic sharing, insert the
11174         method instantiated with an all-Object generic context into the
11175         jit info table, instead of the context of the first instantiation
11176         of the method we happen to compile.
11177
11178 2008-06-18  Martin Baulig  <martin@ximian.com>
11179
11180         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
11181         `major_version' and `minor_version'.
11182
11183 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11184
11185         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
11186         mono_method_is_generic_sharable_impl() takes an additional
11187         argument specifying whether to treat type variables as reference
11188         types.
11189
11190 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11191
11192         * mini.h: Removed obsolete prototypes.
11193
11194 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11195
11196         * mini.c: Don't fail generic sharing for initobj and sizeof - we
11197         already handle them.
11198
11199 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11200
11201         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
11202         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
11203         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
11204         tramp-x86.c: Added a MonoGenericContext* argument to
11205         mono_arch_get_unbox_trampoline() so that it can call other
11206         functions which require it.
11207
11208 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11209
11210         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
11211         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
11212         mono_arch_get_this_arg_from_call() takes a
11213         MonoGenericSharingContext* as well.
11214
11215 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11216
11217         * mini.c: Factor out code for emitting unbox into emit_unbox() and
11218         implement generic sharing of unbox.
11219
11220 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11221
11222         * mini.c: Don't compute the vtable to determine whether a field is
11223         special static, because it might not work for open types.
11224
11225 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11226
11227         * mini.c: Removed the unused token_type and token_source arguments
11228         from get_runtime_generic_context_ptr().
11229
11230 2008-06-17  Marek Habersack  <mhabersack@novell.com>
11231
11232         * mini.c (ADD_BINOP): fix the build
11233
11234 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
11235
11236         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
11237         a widening op.
11238
11239 2008-06-16  Mark Probst  <mark.probst@gmail.com>
11240
11241         * mini.h: Removed class relations enum that's not used anymore.
11242
11243 2008-06-16  Mark Probst  <mark.probst@gmail.com>
11244
11245         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
11246
11247         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
11248         the lazy fetch trampoline access code.
11249
11250 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
11251
11252         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
11253
11254 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
11255
11256         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
11257
11258         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
11259
11260         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
11261
11262 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
11263
11264         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
11265         intrinsics.
11266
11267         * mini-ops.h: Add MIN/MAX_UN opcodes.
11268
11269         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
11270         intrinsics.
11271
11272         * basic-math.cs: Add more min/max tests.
11273
11274         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
11275
11276 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11277
11278         * mini.c: Small fix in the prologue of emit_castclass.
11279
11280 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
11281
11282         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
11283
11284         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
11285         do not work even for unsigned types. Fixes #400014.
11286
11287         * basic-math.cs: Add regression tests for unsigned Min/Max.
11288
11289 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11290
11291         * mini.c: Added additional context_used argument to several
11292         functions, which will be needed for sharing generic methods.  Use
11293         GET_RGCTX macro wherever appropriate.  Declare only one
11294         context_used in mono_method_to_ir().
11295
11296 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11297
11298         * mini.c, generic-sharing.c: Removed generic class relations.
11299
11300         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
11301         functions due to MRGCTX changes.
11302
11303 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11304
11305         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
11306         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
11307         with calculated IMT.
11308
11309         * mini.c: Generic sharing of calls via generic interfaces.
11310
11311         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
11312         generic method with non-constant MonoGenericContext*.  Instead,
11313         the context is taken out of the method itself.
11314
11315 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11316
11317         * mini.c: Generic sharing of ldvirtftn.
11318
11319 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11320
11321         * mini.c: Generic sharing of ldftn.
11322
11323 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11324
11325         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
11326
11327 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11328
11329         * mini.c: Generic sharing of the special case of ldtoken followed
11330         by a call to GetTypeFromHandle.
11331
11332 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11333
11334         * mini.c: Generic sharing of box for nullable types.
11335
11336 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
11337
11338         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
11339         are passed on the stack. Fixes #324807.
11340
11341 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
11342
11343         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
11344         for the ArgValuetypeAddrInIReg case.
11345
11346         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
11347         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
11348
11349         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
11350         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
11351         local variable and pass the local variable by reference to the called method.
11352           
11353         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
11354         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
11355
11356         Contributed under MIT/X11 license.
11357
11358 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
11359
11360         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
11361
11362         * debug-mini.c (mono_debug_print_vars): Release memory after printing
11363         everything.
11364
11365 2008-06-10  Martin Baulig  <martin@ximian.com>
11366
11367         * debug-mini.c
11368         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
11369
11370 2008-06-09  Kornel Pal  <kornelpal@gmail.com>
11371
11372         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
11373         possible error when no arguments are passed.
11374
11375         Contributed under MIT/X11 license.
11376
11377 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
11378
11379         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
11380         where the file name is NULL.
11381
11382 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
11383
11384         * mini.c: Fix s390 build.
11385
11386 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
11387
11388         * trace.c (mono_trace_parse_options): Fix warnings.
11389
11390         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
11391
11392 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
11393
11394         * mini.c (remove_block_if_useless): Avoid printing the method name.
11395         
11396         * mini.c: Remove needless setting of ins->cil_code which is now done by 
11397         MONO_INST_NEW.
11398
11399         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
11400         LMF. Not yet used.
11401
11402         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
11403         translated code after it has been patched.
11404
11405 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
11406
11407         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
11408         avoid problems during code patching on SMP systems.
11409         (emit_call): Avoid adding a patch info which is already added by 
11410         emit_call_body.
11411         (mono_arch_emit_exceptions): Ditto.
11412
11413 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
11414
11415         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
11416         MONO_TYPE_ISSTRUCT already checks for it.
11417
11418 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
11419
11420         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
11421           structs with floats on Winx64 the float registers are not used.  
11422           The integer registers are always used..
11423         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
11424           only one register will be used and only if the size of the struct 
11425           is 1,2,4, or 8 bytes.
11426
11427         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
11428           to work for Winx64.
11429
11430         Contributed under MIT/X11 license.
11431
11432 2008-06-05  Martin Baulig  <martin@ximian.com>
11433
11434         * debug-debugger.c (debugger_lookup_class): Also call
11435         mono_class_setup_methods() here; we're only called from RTI.
11436
11437 2008-06-05  Andreas Farber  <andreas.faerber@web.de>
11438
11439         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
11440         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
11441         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
11442         Post-process object files and add dtrace-generated object, if necessary.
11443
11444         Contributed under MIT/X11 license.
11445
11446 2008-06-04  Mark Probst  <mark.probst@gmail.com>
11447
11448         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
11449         element class.
11450
11451         * mini.c: Generic sharing for unbox.any and castclass.
11452
11453 2008-06-04  Mark Probst  <mark.probst@gmail.com>
11454
11455         * mini.c: Ignore tailcall prefix in shared generic code and when
11456         doing calls which require a vtable/rgctx argument.
11457
11458 2008-06-04  Mark Probst  <mark.probst@gmail.com>
11459
11460         * mini.c: Don't free the JIT info.
11461
11462         * driver.c: Changes in the JIT info table testing code.
11463
11464 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
11465
11466         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
11467         interruption. Fix some warnings.
11468
11469         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
11470         interruption_checkpoint.
11471
11472 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
11473
11474         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
11475         from embedding applications.
11476
11477 2008-06-02  William Holmes  <billholmes54@gmail.com>
11478
11479         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
11480           reserving 32 bytes on the stack when making calls. 
11481
11482         Contributed under MIT/X11 license.
11483
11484 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
11485
11486         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
11487         the linear IL branch.
11488
11489         * driver.c: Print out more information for --version on arm.
11490
11491 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
11492
11493         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
11494         bb_exit instead, since out of line bblocks might not actually be emitted
11495         out-of-line.
11496         
11497         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
11498         maximum epilog size for out of line bblocks if tracing is enabled.
11499
11500         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
11501
11502 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
11503
11504         * arrays.cs: Regression tests for allocating arrays with negative sizes.
11505
11506 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
11507
11508         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
11509         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
11510         opcodes.
11511
11512 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
11513
11514         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
11515         the 'value' to store is a constant.
11516
11517         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
11518
11519         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
11520         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
11521
11522 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
11523
11524         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
11525         for accessing method->generic_container.
11526
11527 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
11528
11529         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
11530         
11531         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
11532
11533         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
11534
11535         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
11536         fails.
11537
11538 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
11539
11540         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
11541
11542         * mini.c: Handle the case when mono_class_vtable () fails.
11543
11544 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
11545         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
11546         the stat profiler.
11547
11548 2008-05-22  Mark Probst  <mark.probst@gmail.com>
11549
11550         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
11551         together with domain sharing.
11552
11553 2008-05-22  Mark Probst  <mark.probst@gmail.com>
11554
11555         * mini.c: Treat callvirts to final methods like non-virtual calls
11556         when doing generic sharing, i.e. look them up in the runtime
11557         generic context.
11558
11559 2008-05-22  Mark Probst  <mark.probst@gmail.com>
11560
11561         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
11562         with computed types (for generic sharing).
11563
11564         * mini.c: Generic sharing for mkrefany and refanyval.
11565
11566 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
11567
11568         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
11569         possible.
11570
11571         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
11572         the generic sharing code.
11573         
11574         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
11575         when needed.
11576
11577 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
11578
11579         * mini.h: Remove the declaration of mono_aot_init_vtable ().
11580
11581 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
11582
11583         * driver.c: updated copyright date
11584
11585 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
11586
11587         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
11588         needed.
11589
11590 2008-05-19  Martin Baulig  <martin@ximian.com>
11591
11592         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
11593         pointing to the new `_mono_debug_using_mono_debugger' variable.
11594
11595         * driver.c
11596         (mono_main): Check mono_debug_using_mono_debugger() rather than
11597         the `MONO_INSIDE_MDB' environment variable to check whether we're
11598         inside the debugger.
11599
11600 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
11601
11602         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
11603         argument.
11604
11605 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
11606
11607         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
11608
11609         * mini.c: Added mini_assembly_can_skip_verification. This
11610         function checks if the assembly requested to skip verification. 
11611         Fixes part of #387274.
11612
11613 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
11614
11615         * mini.c (mini_get_method): Disable the check for open generic classes when
11616         using generic sharing.
11617
11618         * generics.cs: Add a test for #387034.
11619
11620         * mini.c (mini_get_method): Check whenever the method class is an open generic
11621         type, and return NULL in that case, causing a verification error. Fixes
11622         #384123.
11623
11624 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
11625
11626         * driver.c (mono_main): Revert r102623. The right
11627         thing to do is to enable the verifier under verifiable
11628         unless a --security flag was passed.
11629
11630         We need this non-trivial behavior for --verify-all otherwise
11631         mcs-compileall won't be able to use it. As it needs everything to
11632         be verified under validil.
11633
11634 2008-05-06  Martin Baulig  <martin@ximian.com>
11635
11636         Fix #383749.
11637
11638         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
11639         (mono_debugger_thread_cleanup): Likewise.
11640         (mono_debugger_extended_notification): Likewise.
11641
11642 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
11643
11644         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
11645         against both inflated and non-inflated methods. We need to check against the
11646         generic definition for cases where the instantiated method is not visible.
11647         We need to check against the inflated types for cases where the instantiation
11648         changes any super type. This fixes #382986.
11649
11650         Note that this doesn't need to be applied to other parts of mono_method_to_ir
11651         that check for visibiliy as generic params only appears as the type subject
11652         of tokens on call opcodes. Field manipulation and ldftn must always
11653         target an exact type.
11654
11655 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
11656
11657         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
11658         if no related --security flag is passed.
11659
11660 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
11661
11662         * mini-arch.h: Prepare support for ppc64.
11663
11664         Contributed under MIT/X11 license.
11665
11666 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
11667
11668         * aot-runtime.c: Prepare support for ppc64.
11669
11670         Contributed under MIT/X11 license.
11671
11672 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
11673
11674         * mini-ops.h: Prepare support for ppc64.
11675
11676         Contributed under MIT/X11 license.
11677
11678 2008-05-04  Andreas Farber  <andreas.faerber@web.de>
11679
11680         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
11681
11682         Contributed under MIT/X11 license.
11683
11684 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
11685
11686         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
11687         assemblies, since aot_name is not a full path, causing us to load MS.NET 
11688         assemblies on windows.
11689
11690 ?2008-04-28  Kornel Pal  <kornelpal@gmail.com>
11691
11692         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
11693         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
11694         * main.c: Use UTF-8 encoded command line instead of Windows default code
11695         page on Windows to support Unicode.
11696         * driver.c (DllMain): New function for mixed-mode assembly support.
11697         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
11698         export __stdcall functions without decoration.
11699
11700         Contributed under MIT/X11 license.
11701
11702 2008-04-28  Mark Probst  <mark.probst@gmail.com>
11703
11704         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
11705         saving it very early.
11706
11707 2008-04-28  Mark Probst  <mark.probst@gmail.com>
11708
11709         * mini.h, mini.c: Lots of code for accessing the old RGCTX
11710         deleted.  The only way to access the new RGCTX is via the
11711         trampline.
11712
11713         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
11714         vtable instead of the RGCTX to static methods.
11715
11716         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
11717         accessing the new RGCTX.
11718
11719         * generic-sharing.c: There is no separation between self, type
11720         arguments and other types in the RGCTX anymore.
11721
11722 2008-04-25  Jonathan Chambers <joncham@gmail.com>
11723
11724         * mini-amd64.c (add_general): Remove previous stack adjustment.
11725         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
11726         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
11727         for 32 bytes of stack space reserved for all calls.
11728         
11729         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
11730         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
11731         adjustment.
11732         
11733         Code contributed under MIT/X11 license.
11734
11735 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
11736
11737         * mini.c (mini_method_verify): Only verify non-inflated methods, check
11738         against the root definition, peeling out method and type instantiations.
11739         Cache verify success results, code that fails verification is still
11740         checked multiple times.
11741
11742 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
11743
11744         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
11745
11746 2008-04-23  Jonathan Chambers <joncham@gmail.com>
11747
11748         * mini-amd64.c (add_general): Always increment stack on Win64.
11749         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
11750         on Win64.
11751         
11752         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
11753         stack based argument handling on Win64.
11754         
11755         Code contributed under MIT/X11 license.
11756
11757 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
11758
11759         * Makefile.am (version.h): Add support for git-svn.
11760
11761 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
11762
11763         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
11764         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
11765         avoiding allocations and libc functions which might deadlock.
11766         
11767         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
11768         'no-gdb-backtrace' option is set.
11769
11770         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
11771
11772         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
11773
11774 2008-04-21  Martin Baulig  <martin@ximian.com>
11775
11776         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
11777         and `get_lmf_addr'; `notification_address' is no longer a pointer.
11778
11779 2008-04-21  Martin Baulig  <martin@ximian.com>
11780
11781         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
11782         `thread_vtable', `event_handler_ptr' and `event_handler'.
11783
11784 2008-04-21  Martin Baulig  <martin@ximian.com>
11785
11786         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
11787         allows delayed initialization of the `executable_code_buffer' when
11788         attaching.
11789
11790 2008-04-21  Martin Baulig  <martin@ximian.com>
11791
11792         * mini.h (mono_debugger_create_notification_function): Removed.
11793         * tramp-*.c (mono_debugger_create_notification_function): Removed.
11794
11795         * mdb-debug-info64.s
11796         (MONO_DEBUGGER__notification_function): Added this in the .text section.
11797
11798         * mdb-debug-info32.s
11799         (MONO_DEBUGGER__notification_function): Added this in the .text section.
11800
11801         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
11802         currently only works on x86 and x86_64, so don't create it on ppc.
11803
11804 2008-04-21  Martin Baulig  <martin@ximian.com>
11805
11806         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
11807
11808         * mini.c
11809         (mini_method_compile): In the fp elimination check, check
11810         `debug_options.mdb_optimizations' in addition to
11811         mono_debug_using_mono_debugger().       
11812
11813         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
11814         disable some JIT optimizations which are only disabled when
11815         running inside the debugger.
11816         Added `--help-debug' option to describe the debugging options.
11817         (parse_debug_options): New static function to parse the `--debug'
11818         options, so we can easily add more stuff in future.
11819
11820 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
11821
11822         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
11823         the method has no body.
11824
11825 2008-04-19  Jonathan Chambers <joncham@gmail.com>
11826
11827         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
11828         assembly is not allowed in MSVC 64-bit compiler. 
11829         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
11830         as we get floating point exceptions everywhere.
11831         
11832         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
11833         correctly align arguments for call to throw_exception.
11834         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
11835         
11836         Code contributed under MIT/X11 license.
11837
11838 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
11839
11840         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
11841
11842 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
11843
11844         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
11845
11846         * mini-amd64.c (NEW_INS): Set cil_code.
11847
11848         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
11849         from mini-amd64.c so all debugger related logic is in one place.
11850
11851         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
11852         later won't have a random ip assigned to them.
11853
11854 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
11855
11856         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
11857         the arch specific function initializes code_size.
11858         (mono_create_delegate_trampoline): Ditto.
11859
11860         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
11861         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
11862         platforms.
11863
11864         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
11865         running under the debugger.
11866
11867         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
11868         debugger.
11869
11870         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
11871         debugger. Also move the disabling of optimizations here from driver.c.
11872         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
11873         debugger.
11874
11875         * mini.h (MonoCompile): Add a few new flags.
11876
11877 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
11878
11879         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
11880         so the cil_code field of created MonoInst's is properly set.
11881         (mini_select_instructions): Ditto.
11882
11883         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
11884         (MONO_INST_NEW_CALL): Ditto.
11885
11886         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
11887         in many places so the ins->cil_code field is properly initialized.
11888
11889         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
11890         place.
11891
11892 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
11893
11894         * mini.c (mini_method_compile): Print a different message when compiling a 
11895         shared method.
11896         
11897         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
11898         > 1.
11899
11900 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
11901
11902         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
11903         SSE2 instructions.
11904
11905         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
11906         
11907 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
11908
11909         * mini.c (handle_stack_args): Make this return void since its return value was
11910         never used. Also set cfg->unverifiable for invalid IL instead of calling
11911         G_BREAKPOINT ().
11912
11913 2008-04-10  Mark Probst  <mark.probst@gmail.com>
11914
11915         * mini.c: Make sure "this" is live in catch clauses with type
11916         variables in shared generic code.
11917
11918 2008-04-08  Mark Probst  <mark.probst@gmail.com>
11919
11920         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
11921         generic_class_is_reference_type() to ensure the proper behaviour
11922         when sharing generic code and the type in question is a type
11923         argument.
11924
11925 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
11926
11927         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
11928         race conditions when printing thread dumps. Fixes #377738.
11929
11930 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
11931         
11932         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
11933         shows up when both MonoInst arguments can cause aliasig.
11934         There is likely no way in the current JIT to trigger this problem, but
11935         it showed up in the development of generics sharing, when in a new
11936         opcode both args of an OP_GROUP can be aliases (addresses of a local).
11937         When the generics sharing code will be committed, its tests will be
11938         valid also for this bug.
11939
11940 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
11941
11942         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
11943         PATCH_INFO_METHOD.
11944
11945         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
11946         NULL.
11947
11948 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
11949
11950         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
11951         use a more detailed exception message for InvalidCastException.
11952
11953         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
11954
11955         * driver.c (mono_main): Add --debug=casts option to turn on better 
11956         InvalidCastException message details.
11957
11958         * mini.c (mini_get_debug_options): New helper function to return the address of
11959         the debug_options variable.
11960
11961         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
11962         the jit_tls TLS variable.
11963
11964         * mini.c (mono_jit_tls): New TLS variable.
11965
11966         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
11967         option is used.
11968
11969 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
11970
11971         * mini.h: Removed verifer related stuff. This code was moved to verify.c
11972
11973         * mini.c: Removed verifer related stuff, code moved to verify.c.
11974
11975         * driver.c: Using code from verify.c instead of mini.c.
11976
11977 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
11978
11979         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
11980         longer valid.
11981
11982 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
11983
11984         * mini.c (check_for_method_verify): Enabling verification of
11985         corlib if mono_verify_all is set. Bugs in the verifier preventing that
11986         have been fixed.
11987
11988 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
11989
11990         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
11991         caller saved registers as well.
11992         
11993         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
11994         saved registers as well.
11995
11996 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
11997
11998         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
11999
12000         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
12001         code.
12002
12003 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
12004
12005         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
12006         to get_call_info.
12007         (get_call_info): Take a gsctx argument instead of 'cfg'.
12008
12009 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
12010
12011         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
12012         mono_verify_all is set.
12013
12014         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
12015
12016         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
12017
12018 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
12019
12020         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
12021         an exception.
12022
12023         * driver.c mini.c mini.h: Add a --verify-all development option to test the
12024         verifier and the code generated by the compiler.
12025
12026 2008-03-25  Mark Probst  <mark.probst@gmail.com>
12027
12028         * mini.c: Generic sharing of the non-nullable case of the box
12029         instruction.
12030
12031 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
12032
12033         * inssel.brg: Fix the build.
12034
12035         * iltests.il.in: Add a test for lconv.ovf.u8.un.
12036
12037 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
12038
12039         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
12040         Array:Address. Fixes #372410.
12041
12042         * iltests.il.in: New tests for readonly prefix.
12043
12044 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
12045
12046         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
12047         mini-trampolines.c.
12048
12049         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
12050         mini-exceptions.c.
12051
12052         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
12053         
12054         * mini.c (mono_decompose_op_imm): New helper function.
12055
12056         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
12057         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
12058         return value.
12059
12060         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
12061         mono_arch_output_basic_block. Fix warnings.
12062
12063         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
12064         for now.
12065
12066 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
12067
12068         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
12069         since the extra frame is now detected automatically inside the loop.
12070
12071         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
12072         opts which are now in mono_peephole_ins ().
12073         
12074         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
12075
12076         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
12077         frames and skip duplicate managed-to-native frames. Fixes #367665.
12078
12079         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
12080         opts which are now in mono_peephole_ins ().
12081         (mono_arch_peephole_pass_2): Ditto.
12082
12083         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
12084
12085         * mini-codegen.c (mono_peephole_ins): New helper function containing the
12086         arch independent peephole optimizations.
12087
12088         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
12089         opts which are now in mono_peephole_ins ().
12090
12091         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
12092         
12093         * mini-s390.c (mono_arch_output_basic_block): Fix build.
12094
12095         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
12096         pattern.
12097
12098         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
12099         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
12100         opcode. 
12101
12102 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
12103
12104         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
12105         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
12106         return value.
12107
12108         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
12109         mono_arch_output_basic_block. Fix warnings.
12110
12111 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
12112
12113         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
12114         conv.ovf.u.un.
12115
12116 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
12117
12118         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
12119         conv.ovf.u.un.
12120
12121         * iltests.il: Add new tests.
12122
12123 2008-03-20  Kornel Pal  <kornelpal@gmail.com>
12124
12125         * mini.c: Removed Windows version macros.
12126
12127 2008-03-20  Mark Probst  <mark.probst@gmail.com>
12128
12129         * generic-sharing.c: Put reflection types in the extensible part
12130         of the runtime generic context.
12131
12132         * mini.c: Generic sharing of the GetTypeHandle special case of the
12133         ldtoken instruction.
12134
12135 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
12136
12137         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
12138
12139         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
12140         
12141         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
12142         consistency with the other version on the linear IR branch.
12143
12144         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
12145
12146         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
12147
12148         * iltests.il.in: Add new tests.
12149
12150 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
12151
12152         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
12153
12154         * iltests.il.in: Add new tests.
12155
12156 2008-03-19  Mark Probst  <mark.probst@gmail.com>
12157
12158         * mini.c: Two variables with the same name were declared in
12159         nesting contexts and one wasn't initialized.  Fixed.
12160
12161 2008-03-19  Mark Probst  <mark.probst@gmail.com>
12162
12163         * mini.c: Generic sharing of the initobj instruction.
12164
12165 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
12166
12167         * mini.c: make the test to optimize ldtoken from typeof() more
12168         precise.
12169
12170 2008-03-18  Mark Probst  <mark.probst@gmail.com>
12171
12172         * mini.c: Generic sharing of the initobj instruction for reference
12173         types.
12174
12175 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
12176
12177         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
12178         the mono_breakpoint_clean_code() code to perform bound checks.
12179
12180 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
12181
12182         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
12183         mono_arch_patch_callsite() to include the start of the managed method
12184         to be able to perform bound checks.
12185
12186 2008-03-17  Mark Probst  <mark.probst@gmail.com>
12187
12188         * mini.c: Generic sharing for the isinst instruction.
12189
12190 2008-03-17  Mark Probst  <mark.probst@gmail.com>
12191
12192         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
12193         inssel-long32-mips.brg: Added opcodes for doing indirect calls
12194         with the runtime generic context argument.
12195
12196         * mini.c: Share calls to several types of unsharable methods by
12197         putting the address of the method code in the runtime generic
12198         context and doing an indirect call.
12199
12200         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
12201         to switches.
12202
12203 2008-03-16  Mark Probst  <mark.probst@gmail.com>
12204
12205         * generic-sharing.c: Change due to a change in the runtime genric
12206         context API.
12207
12208 2008-03-15  Martin Baulig  <martin@ximian.com>
12209
12210         * tramp-x86.c
12211         (mono_arch_nullify_class_init_trampoline): Add call to
12212         mono_breakpoint_clean_code() to make things work when running
12213         inside the debugger.
12214
12215         * tramp-amd64.c
12216         (mono_arch_nullify_class_init_trampoline): Add call to
12217         mono_breakpoint_clean_code() to make things work when running
12218         inside the debugger.
12219
12220 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
12221
12222         * inssel-long.brg (reg): Fix 64 bit build.
12223
12224 2008-03-14  Mark Probst  <mark.probst@gmail.com>
12225
12226         * mini.c, mini.h: Share static generic code by passing it an
12227         implicit argument pointing to the runtime generic context.
12228
12229         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
12230         inssel-long32-mips.brg: New opcodes for calling shared static,
12231         which need to be passed the runtime generic context.
12232
12233         * mini-amd64.c, mini-x86.c: Save the runtime generic context
12234         argument on the stack in the prologue if needed.  New function for
12235         finding the runtime generic context argument from the registers
12236         saved by the trampoline.
12237
12238         * mini-amd64.h, mini-x86.h: Specify which register to use for the
12239         runtime generic context argument.
12240
12241         * tramp-amd64.c: Also restore the register used for the runtime
12242         generic context argument.
12243
12244         * mini-trampoline.c: Resolve shared static calls by consulting the
12245         runtime generic context via the new argument.
12246
12247         * generic-sharing.c: Add an argument to sharability-checking
12248         functions that specifies whether type variables should be treated
12249         as sharable type arguments.
12250
12251         * inssel-x86.brg: Removed a superfluous, buggy rule.
12252
12253         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
12254         to switches.
12255
12256 2008-03-14  Martin Baulig  <martin@ximian.com>
12257
12258         * debug-debugger.c (main_thread_handler): Call
12259         mono_runtime_run_main() without sending any notifications.
12260
12261         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
12262
12263 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
12264
12265         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
12266
12267 2008-03-14  Mark Probst  <mark.probst@gmail.com>
12268
12269         * tramp-x86.c: Fixed register restore offsets in the trampoline
12270         code for ECX and EDX.
12271
12272 2008-03-12  Geoff Norton  <gnorton@novell.com>
12273
12274         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
12275         different ucontext_t implementations.
12276         * exceptions-arm.c: Use the above defines to get exceptions working on 
12277         iPhone (based on a patch by Luke Howard lukeh@padl.com)
12278         * mini-arm.c: Implement iPhone icache support (based on a patch by
12279         Luke Howard lukeh@padl.com)
12280
12281 2008-03-12  Mark Probst  <mark.probst@gmail.com>
12282
12283         * mini.c: Enable generic sharing of calls to non-static
12284         non-interface non-generic non-value-type methods.
12285
12286         * mini-trampolines.c: Resolve calls from shared generic code.
12287
12288 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
12289
12290         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
12291
12292         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
12293
12294 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
12295
12296         * mini.c: some fixes for the AOT compiler.
12297
12298 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
12299
12300         * cpu-amd64.md: Add clob:1 to some float opcodes.
12301
12302 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
12303
12304         * mini.h: Added MiniVerifierMode enumeration.
12305
12306         * mini.c: Added mini_verifier_set_mode to control
12307         the usage of the new verifier.
12308
12309         * mini.c (mono_method): Integrated the new verifier.
12310
12311         * driver.c: Extended --security option with validil and
12312         verifiable options to activate the new verifier.
12313
12314 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
12315
12316         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
12317         optimization to ctors taking 0 or 2 arguments too.
12318
12319         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
12320         a bit.
12321
12322         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
12323
12324         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
12325
12326 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
12327
12328         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
12329         non-aot case as well.
12330
12331         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
12332
12333         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
12334         changes.
12335
12336         * aot-compiler.c (encode_patch): Ditto.
12337
12338         * mini.h (G_MININT32): Fix the definition of this.
12339
12340 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
12341
12342         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
12343
12344         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
12345
12346 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
12347
12348         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
12349         methods returning vtypes in registers.
12350         (mono_arch_allocate_vars): Ditto.
12351
12352         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
12353
12354         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
12355
12356         * generics.cs: Add a test from the linear IR branch.
12357
12358         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
12359
12360         * mini.c (inline_method): Cache failed inline attempts.
12361
12362 2008-03-04  Mark Probst  <mark.probst@gmail.com>
12363
12364         * mini.c: For shared methods of generic classes put the location
12365         of "this" into the MonoGenericJitInfo.
12366
12367         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
12368         register out of a MonoContext by register number.  Add the generic
12369         sharing context as an argument to mono_arch_find_this_argument().
12370
12371         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
12372         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
12373         for new arch function.
12374
12375         * mini-exception.c: Handle open exception clauses in shared
12376         generic code.
12377
12378         * mini-trampolines.c: Supply additional argument to
12379         mono_arch_find_this_argument().
12380
12381 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
12382
12383         * Makefile.am (regtests): Run the bench.exe tests last.
12384
12385 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
12386
12387         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
12388         a bit.
12389
12390 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
12391
12392         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
12393         with MS.
12394
12395         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
12396         
12397         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
12398
12399         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
12400         whose class has no cctor.
12401
12402         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
12403
12404 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
12405
12406         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
12407         unverified.
12408
12409 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
12410
12411         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
12412         to be in sync with the code on the linear IR branch.
12413
12414         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
12415
12416         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
12417
12418 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
12419
12420         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
12421
12422         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
12423
12424         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
12425
12426         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
12427
12428         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
12429         
12430         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
12431         body.
12432
12433 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
12434
12435         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
12436         OP_LOADR4_MEMBASE emission.
12437
12438         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
12439         (mono_spillvar_offset_float): Ditto.
12440
12441         * mini-mips.c (mono_arch_emit_prolog): Ditto.
12442
12443         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
12444         emission.
12445
12446         * basic-long.cs: Add regression tests for them.
12447
12448         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
12449         use.
12450         (mono_arch_allocate_vars): Fix representation of single-precision float
12451         argument.
12452         (mono_arch_output_basic_block): Ditto.
12453
12454         * inssel-mips.brg: Ditto, remove duplicate items.
12455
12456         * mini-mips.c (emit_load_volatile_arguments): New function to handle
12457         arguments of tail calls as on other platforms.
12458         (mono_arch_output_basic_block): Handle tail calls.
12459
12460         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
12461         register.
12462
12463         * objects.cs (test_5_pass_static_struct): Add test for it.
12464
12465         Contributed under MIT/X11 license.
12466
12467 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
12468
12469         * Makefile.am: Use gmcs for compiling the regression tests.
12470
12471         * *.2.cs *.2.il: Rename to *.cs and *.il.
12472
12473 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
12474
12475         * regalloc.h: Make the vassign array smaller.
12476
12477         * mini.c (mini_method_compile): Remove an unused field in cfg.
12478
12479         * mini-codegen.c: Add a bunch of micro optimizations.
12480
12481 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
12482
12483         * regalloc.h: Remove some unused fields.
12484
12485 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
12486
12487         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
12488
12489         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
12490
12491 2008-02-22  Mark Probst  <mark.probst@gmail.com>
12492
12493         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
12494
12495         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
12496         trampoline: Fetch an entry from the runtime generic context.  If
12497         it's NULL, jump to the actual trampoline to fill the runtime
12498         generic context.  Otherwise, return it.
12499
12500         * mini.c: Call the lazy fetch trampoline to get entries out of the
12501         runtime generic context.
12502
12503         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
12504         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
12505         tramp-sparc.c: Stubs for the lazy fetch trampoline.
12506
12507 2008-02-21  Mark Probst  <mark.probst@gmail.com>
12508
12509         * mini.c: Fetch data out of the extensible part of the runtime
12510         generic context instead of calling a helper function.
12511
12512         * generic-sharing.c: Some functions moved into
12513         metadata/generic-sharing.c.  Helper function for fetching other
12514         types now checks and asserts against extensible rgctx (just for
12515         debugging purposes - the helper function isn't called anymore
12516         unless for debugging).
12517
12518 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
12519
12520         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
12521         for tail calls up to the point that the tests in iltests.exe run. Also add a
12522         dummy CKFINITE implementation.
12523         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
12524         needed for trampoline LMF frames.
12525
12526         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
12527         trampoline LMF frames.
12528
12529 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
12530
12531         * mini.c (inline_method): clean any pending loader error when inlining fail.
12532         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
12533
12534 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
12535
12536         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
12537
12538         * aot-runtime.c (decode_patch_info): Ditto.
12539
12540         * mini.c (mono_resolve_patch_target): Ditto.
12541         
12542         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
12543         icall wrappers.
12544
12545         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
12546         
12547         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
12548         if it references an icall address.
12549
12550 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
12551
12552         * cpu-s390x.md: Remove some more unused opcodes.
12553         
12554         * cpu-s390x.md: Remove some unused opcodes.
12555
12556         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
12557         mono_op_imm_to_op ().
12558
12559         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
12560         instead of a switch statement.
12561         
12562         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
12563         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
12564
12565         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
12566         
12567         * mini-codegen.c: Remove unused mono_regstate2_... functions.
12568
12569         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
12570         -1.
12571
12572 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
12573
12574         * driver.c (mono_main): Improve error reporting when an assembly cannot be
12575         opened. Fixes #362607.
12576
12577         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
12578
12579         * iltests.il.in: Add a test for static methods in interfaces.
12580
12581 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
12582
12583         * genmdesc.c (build_table): Fix a crash on older glib versions.
12584
12585         * cpu-sparc.md: Remove some unused opcodes.
12586         
12587         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
12588         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
12589
12590         * cpu-amd64.md: Remove some unused opcodes.
12591
12592         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
12593         like the other opcodes.
12594
12595 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
12596
12597         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
12598
12599         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
12600
12601         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
12602         variables 'cfg' instead of 'm' for consistency.
12603
12604         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
12605
12606         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
12607         argument holding the vtype return address, to avoid the ambigious use of
12608         cfg->ret for this purpose.
12609
12610         * mini.c (NEW_RETLOADA): Use vret_addr if set.
12611
12612         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
12613         
12614         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
12615         new mono_print_ins () function which only takes one argument.
12616
12617 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
12618
12619         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
12620         macro arguments.
12621
12622 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
12623
12624         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
12625
12626         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
12627
12628         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
12629         opcodes and other small changes.
12630
12631         * mini-ops.h: Add some new opcodes from the linear IR branch.
12632
12633         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
12634
12635         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
12636         opcodes, use the REG_MEMBASE opcodes instead.
12637         
12638         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
12639         opcodes, use the REG_MEMBASE opcodes instead.
12640         
12641         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
12642         linear IR branch.
12643
12644         * mini.c (mono_op_imm_to_op): New helper function.
12645
12646         * mini-ops.h: Add some opcodes from linear IR branch.
12647
12648 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
12649
12650         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
12651         <tsv@solvo.ru>.
12652
12653 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
12654
12655         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
12656         OP_ICONV_TO_R4/R8.
12657
12658         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
12659
12660 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
12661
12662         * aot-compiler.c (emit_method_code): Add an assert.
12663
12664         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
12665         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
12666         methods.
12667
12668 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
12669
12670         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
12671         some load/store opcodes so they are consistent. 
12672         (mono_arch_emit_prolog): Simplify some code.
12673
12674         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
12675
12676         * objects.cs: Add tests for large argument offsets on ARM.
12677
12678         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
12679         stack offsets. Fixes #359651.
12680
12681         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
12682
12683         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
12684
12685         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
12686
12687         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
12688
12689         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
12690
12691         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
12692         rid of CEE_CONV_R_UN.
12693
12694         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
12695
12696 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
12697
12698         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
12699
12700         * mini.c (mono_normalize_opcodes): Add some more opcodes.
12701
12702         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
12703
12704         * cpu-amd64.md: Remove some unused opcodes.
12705
12706         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
12707
12708         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
12709
12710         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
12711         arch specific functions for its parts. Call the peephole pass after local
12712         regalloc so the prolog can compute a more accurate max_offset.
12713         
12714         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
12715         the corresponding OP_I/OP_L opcodes.
12716
12717         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
12718
12719         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
12720
12721 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
12722
12723         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
12724         as they are handled in mini.c.
12725
12726         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
12727         
12728         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
12729         case since it is handled in mini.c.
12730
12731         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
12732
12733         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
12734
12735         * *.c: Use the new opcodes in the IR and back end code.
12736
12737         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
12738
12739         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
12740
12741 2008-02-06  Mark Probst  <mark.probst@gmail.com>
12742
12743         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
12744         an assert because it has a race condition.
12745
12746 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
12747
12748         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
12749
12750         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
12751
12752         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
12753
12754         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
12755         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
12756
12757 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
12758
12759         * cpu-amd64.md (move): Correct the maximum size of move.
12760
12761 2008-02-05  Mark Probst  <mark.probst@gmail.com>
12762
12763         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
12764         the generic class init trampoline to return quickly if the class
12765         is already inited.
12766
12767 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
12768
12769         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
12770         issues where an 32 bit callsite cannot be patched by a 64 bit address.
12771
12772 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
12773
12774         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
12775         branch.
12776
12777 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
12778
12779         * objects.cs: Add some soft-float tests.
12780
12781         * mini.c: Fix a couple more soft-float issues.
12782
12783         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
12784
12785         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
12786         avoid a REX prefix.
12787
12788 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
12789
12790         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
12791         exception happens while compiling a virtual method.
12792
12793 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
12794
12795         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
12796         
12797         * mini-sparc.c: Fix build.
12798
12799         * mini-sparc.c (get_call_info): Add support for generic sharing.
12800
12801         * mini-exceptions.c: Add a FIXME.
12802
12803 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
12804
12805         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
12806         altstack handling code.
12807
12808         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
12809         
12810         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
12811
12812         * mini-s390.c: Add support for generic sharing.
12813
12814         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
12815         Fix CAS on s390.
12816         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
12817
12818         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
12819
12820         * mini-s390x.c: Add support for generic sharing.
12821         
12822         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
12823         Fix CAS on ia64.
12824         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
12825
12826         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
12827         can be used since it takes a 16 bit signed immediate.
12828
12829         * inssel-s390x.brg: Fix OP_SETRET.
12830
12831         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
12832
12833         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
12834
12835         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
12836
12837         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
12838
12839         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
12840         in one place.
12841
12842         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
12843         stuff.
12844
12845         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
12846         of the unused mono_arch_patch_delegate_trampoline stuff.
12847
12848 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
12849
12850         * basic-long.cs: Move the fp related tests to basic-float.cs.
12851
12852         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
12853
12854         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
12855
12856         * basic-calls.cs: Add a test for proper float argument passing.
12857
12858         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
12859         if the context corresponds to an exception received through a signal.
12860
12861         * exceptions.cs: Add a test for nullref handling at the start of a try
12862         clause.
12863
12864         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
12865
12866         * jit-icalls.c (mono_break): New JIT icall.
12867
12868         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
12869
12870         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
12871
12872 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
12873
12874         * cpu-*.md: Get rid of unused opcodes.
12875
12876         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
12877
12878         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
12879         by all platforms.
12880
12881         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
12882         define.
12883
12884         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
12885         the arch independent trampoline code in mini-trampolines.c.
12886
12887         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
12888
12889         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
12890
12891         * mini-s390.h: Remove an unused define.
12892         
12893         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
12894         the arch independent trampoline code in mini-trampolines.c.
12895
12896         * mini-arm.c (mono_arch_emit_prolog): Fix build.
12897
12898 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
12899
12900         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
12901
12902         * mini-s390.c (mono_arch_emit_prolog): Fix build.
12903
12904         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
12905
12906         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
12907
12908         * cpu-amd64.md: Use smaller sizes for int opcodes.
12909
12910         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
12911
12912         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
12913         objects.cs.
12914
12915         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
12916         debugging.
12917
12918         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
12919         instead of though a pointer to save an indirection when accessing elements of
12920         the array.
12921
12922         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
12923         some typos.
12924         (NOT_IMPLEMENTED): New helper macro.
12925         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
12926         of a bb.
12927
12928         * *.c: Use the new helper macro.
12929
12930 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
12931
12932         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
12933
12934 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
12935
12936         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
12937         stack slots.
12938
12939 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
12940
12941         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
12942         profiling is enabled.
12943         
12944         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
12945         the end.
12946         (mono_arch_emit_prolog): Add more first bblock optimizations.
12947
12948         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
12949         in order if possible.
12950         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
12951         bblock, since the arguments are still in their original registers.
12952
12953         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
12954
12955 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
12956
12957         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
12958         as well.
12959
12960         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
12961         offset 0.
12962
12963         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
12964
12965         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
12966         process async exceptions received while in unmanaged code.
12967
12968         * mini.c (mini_init): Install a callback with the runtime which will be called
12969         when a thread receives an async exception while in unmanaged code.
12970
12971         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
12972
12973         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
12974
12975 2008-01-16  Wade Berrier  <wberrier@novell.com>
12976
12977         * cpu-g4.md:
12978         * cpu-arm.md:
12979         * cpu-s390x.md:
12980         fix build
12981
12982 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
12983
12984         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
12985         compilation with sun cc.
12986
12987         * cpu-*.md: Fix the build.
12988
12989         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
12990
12991         * mini-amd64.h: Add some comments to the MonoLMF structure.
12992
12993         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
12994         
12995         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
12996         in the LMF structure if possible. This saves two instructions in the
12997         managed->native wrappers.
12998
12999         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
13000
13001 2008-01-16  Mark Probst  <mark.probst@gmail.com>
13002
13003         * generic-sharing.c: New type argument lookup code which uses the
13004         runtime generic context template.
13005
13006 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
13007
13008         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
13009
13010         * mini-arm.c (add_general): Fix arm eabi parameter passing.
13011         (mono_arch_output_basic_block): Fix localloc implementation.
13012
13013         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
13014
13015         * mini-ia64.c (peephole_pass): Fix ia64 build.
13016
13017         * mini-amd64.c (peephole_pass): Fix a warning.
13018         
13019         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
13020         at a constant offset from sp/fp.
13021
13022         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
13023         instead of obtaining it from *lmf in the managed method case.
13024
13025 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
13026
13027         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
13028
13029 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
13030
13031         * mini.h (MonoInstList): New type.
13032         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
13033         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
13034         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
13035         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
13036         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
13037         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
13038         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
13039         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
13040         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
13041         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
13042         MONO_INST_LIST_FOR_EACH_ENTRY,
13043         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
13044         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
13045         mono_inst_list_first, mono_inst_list_last,
13046         mono_inst_list_next, mono_inst_list_prev): New instruction
13047         list handling interfaces.
13048         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
13049         list head 'ins_list'.
13050         (MonoInst): Replace next pointer with list head 'node'.
13051         (MonoCallInst): Make 'out_args' a MonoInstList.
13052         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
13053         (MonoCompile): Delete reverse_inst_list and
13054         reverse_inst_list_len.
13055         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
13056         mono_arch_lowering_pass, mono_arch_local_regalloc,
13057         mono_arch_output_basic_block, mono_arch_emit_prolog):
13058         Convert to new instruction lists.
13059         (insert_after_ins): Delete.
13060         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
13061         instruction lists.
13062         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
13063         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
13064         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
13065         mono_emulate_opcode, mono_emit_load_got_addr,
13066         inline_method, mono_method_to_ir, mono_print_bb_code,
13067         print_dfn, decompose_pass, nullify_basic_block,
13068         replace_out_block_in_code, remove_block_if_useless,
13069         merge_basic_blocks, move_basic_block_to_end,
13070         try_unsigned_compare, optimize_branches, mono_print_code,
13071         mini_select_instructions, remove_critical_edges): Likewise.
13072         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
13073         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
13074         mono_arch_output_basic_block, mono_arch_emit_prolog):
13075         Likewise.
13076         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
13077         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
13078         mono_arch_output_basic_block): Likewise.
13079         (inst_list_prepend, insert_after_ins): Delete.
13080         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
13081         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
13082         instruction lists.
13083         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
13084         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
13085         mono_arch_emit_prolog): Likewise.
13086         * cfold.c (mono_constant_fold): Likewise.
13087         * liveness.c (visit_bb, mono_analyze_liveness,
13088         optimize_initlocals): Likewise.
13089         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
13090         * graph.c (mono_draw_code_cfg): Likewise.
13091         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
13092         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
13093         mono_ssa_cprop): Likewise.
13094         * abcremoval (get_relations_from_previous_bb, process_block):
13095         Likewise.
13096         * local-propagation (mono_cprop_invalidate_values,
13097         mono_local_cprop_bb): Likewise.
13098         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
13099         peephole_pass, mono_arch_output_basic_block,
13100         mono_arch_emit_prolog): Likewise.
13101         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
13102         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
13103         mono_arch_emit_prolog): Likewise.
13104         (insert_after_ins): Delete.
13105         * aliasing.c (print_code_with_aliasing_information,
13106         mono_build_aliasing_information, mono_aliasing_deadce):
13107         Convert to new instruction lists.
13108         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
13109         peephole_pass, NEW_INS, mono_arch_lowering_pass,
13110         mono_arch_local_regalloc, mono_arch_output_basic_block):
13111         Likewise.
13112         (insert_after_ins): Delete.
13113         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
13114         peephole_pass, mono_arch_output_basic_block): Convert to
13115         new instruction lists.
13116         * mini-codegen (InstList, inst_list_prepend,
13117         insert_after_ins): Delete.
13118         (insert_before_ins, get_register_force_spilling,
13119         get_register_spilling, free_up_ireg, free_up_reg,
13120         create_copy_ins, create_spilled_store, alloc_int_reg,
13121         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
13122         to new instruction lists.
13123         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
13124         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
13125         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
13126         (insert_after_ins): Delete.
13127         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
13128         mono_arch_local_regalloc, mono_arch_output_basic_block,
13129         mono_arch_call_opcode): Convert to new instruction lists.
13130         (insert_after_ins): Delete.
13131         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
13132         peephole_pass, mono_arch_output_basic_block,
13133         mono_arch_emit_prolog): Convert to new instruction lists.
13134
13135 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
13136
13137         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
13138
13139         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
13140         Fixes #353182.
13141
13142         * Makefile.am (version.h): Make this work with non-bash shells.
13143
13144 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
13145
13146         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
13147
13148 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
13149
13150         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
13151         the InitializeArray optimization.
13152
13153 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
13154
13155         * mini.c driver.c: Don't include os/gc_wrapper.h.
13156
13157 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
13158
13159         * mini.c (print_jit_stats): Print GC statistics if available.
13160
13161 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
13162
13163         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
13164
13165 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
13166
13167         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
13168
13169 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
13170
13171         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
13172         
13173         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
13174
13175         * driver.c (mono_main): Ditto.
13176
13177 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
13178
13179         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
13180
13181         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
13182         in the vtable can't be encoded.
13183         (compile_method): Ditto.
13184
13185 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
13186
13187         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
13188         defined.
13189
13190         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
13191         lmf->rbp.
13192
13193         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
13194         the top LMF entry belongs to the current method.
13195
13196         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
13197
13198 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
13199
13200         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
13201         
13202         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
13203
13204         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
13205
13206         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
13207
13208         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
13209
13210         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
13211         implementation.
13212
13213         * basic-float.cs: Add an ulong->double cast test.
13214
13215 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
13216
13217         * mini.c (mono_method_to_ir): Fix a warning.
13218
13219 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
13220
13221         * mini-ops.h: Add OP_SWITCH.
13222
13223         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
13224         CEE_SWITCH in back-end code, use OP_SWITCH instead.
13225
13226 2007-12-11  Geoff Norton  <gnorton@novell.com>
13227
13228         * mini-s390x.c: Minor change to the MAX() define to allow
13229         it to compile with other gcc versions.
13230
13231 2007-12-11  Geoff Norton  <gnorton@novell.com>
13232
13233         * cpu-s390x.md:
13234         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
13235
13236 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
13237
13238         exceptions-arm.c (mono_arch_get_restore_context): Restore
13239         the frame pointer.
13240
13241         exceptions-arm.c (throw_exception): Save the frame pointer.
13242         This is a partial fix for #323747. Only the client side is
13243         fixed.
13244
13245 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
13246
13247         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
13248         was using an unrelated variable to log the class which
13249         needed the cctor to be called. This was crashing on arm.
13250
13251 2007-12-09  Robert Jordan  <robertj@gmx.net>
13252
13253         * mini-x86.c (mono_arch_emit_epilog):
13254         Consider all kinds of 64-bit types. Fixes #323114.
13255
13256 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
13257
13258         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
13259
13260 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
13261
13262         * mini-amd64.c (peephole_pass): Add a missing instruction check.
13263
13264 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13265
13266         * mini.c: run type ctor before allocating an object, not only
13267         when running it's constructor method (fixes at least part of bug #342507).
13268
13269 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
13270         
13271         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
13272         
13273         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
13274         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
13275         function.
13276
13277         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
13278         mono_generic_class_init_trampoline () the same as it is done with the other
13279         trampolines.
13280
13281         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
13282         aot-runtime.c aot-compiler.c: Implement AOT support.    
13283
13284 2007-12-07  Mark Probst  <mark.probst@gmail.com>
13285
13286         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
13287         build for archs which don't have the vtable trampoline defined
13288         yet.
13289
13290 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
13291
13292         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
13293
13294         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
13295
13296         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
13297
13298         * tramp-<ARCH>.c: Use the new helper function.
13299
13300 2007-12-07  Mark Probst  <mark.probst@gmail.com>
13301
13302         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
13303         trampoline call, which takes a vtable argument.
13304
13305         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
13306         OP_TRAMPCALL_VTABLEs like other calls.
13307
13308         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
13309         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
13310         call.  Implemented a support function which fetches the vtable
13311         from a register set.
13312
13313         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
13314         Implemented a generic class init trampoline, using the
13315         OP_TRAMPCALL_VTABLE opcode.
13316
13317         * mini.c: Implemented static field access when sharing generic
13318         code.  This implies initing the class using the new
13319         OP_TRAMPCALL_VTABLE call.
13320
13321 2007-12-07  Mark Probst  <mark.probst@gmail.com>
13322
13323         * mini.c: Don't compile methods with sharing enabled if their
13324         classes are disabled for sharing.
13325
13326 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
13327
13328         * inssel.brg: Add a missing sign extension to the GETCHR and array access
13329         opcodes. Fixes #346563.
13330
13331         * objects.cs: Add a new test.
13332
13333         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
13334
13335         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
13336         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
13337
13338 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
13339
13340         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
13341
13342 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
13343
13344         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
13345         code stream.
13346
13347 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
13348
13349         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
13350
13351         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
13352         optimization in the AOT case.
13353         
13354 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
13355
13356         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
13357         
13358         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
13359
13360         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
13361
13362         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
13363
13364         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
13365         is created by the inlined delegate ctor.
13366
13367         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
13368
13369         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
13370
13371 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
13372
13373         * cpu-x86.md: Fix the length of ckfinite.
13374
13375 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
13376
13377         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
13378         
13379         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
13380         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
13381
13382         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
13383
13384         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
13385         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
13386
13387 2007-11-28  Martin Baulig  <martin@ximian.com>
13388
13389         * mini-x86.c
13390         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
13391         after creating the trampoline.
13392
13393 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
13394
13395         * aot-runtime.c (load_aot_module): Check runtime version if needed.
13396
13397         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
13398         the same version.
13399
13400         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
13401         instead of the calling method to help AOT.
13402
13403         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
13404
13405 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
13406
13407         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
13408         is defined.
13409
13410 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
13411
13412         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
13413         
13414         * aot-compiler.c (compile_method): Correct check for generic method definitions.
13415         (encode_method_ref): No need to handle generic method definitions specially.
13416
13417         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
13418
13419         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
13420         decode_klass_info.
13421
13422         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
13423         encode_klass_info.
13424         (compile_method): Enable generic sharing.
13425
13426 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
13427
13428         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
13429         (mini_method_compile): Add preliminary support for AOTing shared generic code.
13430
13431         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
13432         generic code.
13433
13434         * mini-trampolines.c: Fix a warning.
13435
13436         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
13437         NEW_PCONST.
13438         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
13439         (generic_class_is_reference_type): Remove unused function.
13440
13441         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
13442         in the generic vtable trampoline case.
13443
13444         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
13445         
13446         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
13447         return an AOT method based on a vtable slot.
13448
13449         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
13450
13451         * mini.c (mini_get_vtable_trampoline): Export this.
13452
13453 2007-11-22  Martin Baulig  <martin@ximian.com>
13454
13455         * debug-debugger.h
13456         (MonoDebuggerInfo): Move `debugger_version' up.
13457
13458 2007-11-22  Martin Baulig  <martin@ximian.com>
13459
13460         * mini-amd64.c
13461         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
13462
13463         * mini-trampolines.c
13464         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
13465         after compiling the method.
13466
13467 2007-11-20  Martin Baulig  <martin@ximian.com>
13468
13469         * debug-mini.c
13470         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
13471         (mono_debugger_remove_breakpoint): Likewise.
13472         (mono_debugger_check_breakpoints): Likewise.
13473
13474         * debug-debugger.c: Implement the new breakpoint interface here.
13475
13476 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
13477
13478         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
13479         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
13480
13481         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
13482
13483 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
13484
13485         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
13486
13487         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
13488         mini.c.
13489
13490         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
13491         mini.c.
13492
13493         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
13494         returning a vtype in a register.
13495
13496         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
13497         here from the arch specific code.
13498
13499         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
13500         mini.c.
13501
13502         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
13503         (mono_arch_emit_prolog): Increment maximum prolog size.
13504
13505         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
13506         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
13507
13508         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
13509         MonoGenericSharingContext.
13510
13511         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
13512         MonoGenericSharingContext. Allocate memory from the cfg mempool.
13513
13514 2007-11-15  Mark Probst  <mark.probst@gmail.com>
13515
13516         * mini.c, mini.h, generic-sharing.c: Functions for producing code
13517         which extract fields out of the runtime generic context.  Full
13518         sharing of the NEWARR opcode.
13519
13520 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
13521
13522         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
13523         --enable-minimal=ssa.
13524
13525 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
13526
13527         * mini-trampolines.c (mono_delegate_trampoline): Update after 
13528         mono_marshal_get_delegate_invoke () signature change.
13529
13530 2007-11-13  Mark Probst  <mark.probst@gmail.com>
13531
13532         * mini.c: Removed the shared context in favor of the generic
13533         sharing context.  Allocate the MonoJitInfo structure with room for
13534         the generic sharing context if it's needed.
13535
13536         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
13537         domain-internals.h now.
13538
13539         * mini-x86.c: Pass the generic sharing context to get_call_info ().
13540
13541         * generic-sharing.c: Several changes for working without a shared
13542         context and instead operating on open types instead.
13543
13544 2007-11-12  David S. Miller  <davem@davemloft.net>
13545
13546        * inssel-sparc.brg: Fix double instruction emit.
13547
13548 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
13549
13550         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
13551         Get/Set/Address methods.
13552         
13553         * mini.c debug-debugger.c mini-trampolines.c: Update after 
13554         mono_marshal_get_delegate_invoke signature change.
13555
13556 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
13557
13558         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
13559         This can happens with dynamic methods. Fixes the other bug in #322722.
13560
13561 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
13562
13563         * tramp-arm.c (mono_arch_patch_callsite): Support patching
13564         BX call sequence.
13565
13566         * mini-arm.c (arm_patch): Implement patching of BX call
13567         sequence. Fixes one of the bugs in #322722.
13568
13569 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
13570
13571        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
13572        under Linux.  We only need to flush every 32-byte cache line.    
13573
13574 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
13575
13576         * mini.c:
13577         move_basic_block_to_end: Add branches when needed, eventually creating
13578         a new BB.
13579         optimize_branches: added a parameter that tells if it's ok to create
13580         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
13581         and avoid calling move_basic_block_to_end when it's not ok.
13582         Fixes bug 318677.
13583
13584 2007-11-07  Mark Probst  <mark.probst@gmail.com>
13585
13586         * mini.c: Abort inlining call to InitializeArray if something
13587         looks wrong.  Let the icall handle it, which now has proper safety
13588         checks.
13589
13590 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
13591
13592         * mini.c (mono_spill_call): add support for soft-float.
13593
13594         * mini.c (mono_method_to_ir): add support for soft-float
13595         to inlined functions that return float.
13596
13597         * mini.c (mono_method_to_ir): add support for soft-float
13598         to cee_stsfld opcode on float fields.
13599
13600 2007-11-05  Geoff Norton  <gnorton@novell.com>
13601
13602         * mini-x86.h: Fix the structure access for X86 Leopard.
13603
13604
13605 2007-11-05  Martin Baulig  <martin@ximian.com>
13606
13607         * mini-trampolines.c
13608         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
13609         after compiling the method to notify the debugger.
13610
13611 2007-11-05  Martin Baulig  <martin@ximian.com>
13612
13613         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
13614
13615 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
13616
13617         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
13618         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
13619
13620 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
13621
13622         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
13623         native-to-managed wrappers.
13624         
13625 2007-11-01  Geoff Norton  <gnorton@novell.com>
13626
13627         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
13628         members.
13629
13630 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
13631
13632         * mini.c, mini-x86.c: when getting back from unmanaged code
13633         to managed via a marshaled delegate we also need to set the
13634         right domain.
13635
13636 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
13637
13638         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
13639         for amd64.
13640
13641 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13642
13643         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
13644         let the debugger or other external agents to tell the JIT when
13645         a sw breakpoint has been inserted in the code that the JIT needs
13646         to be able to inspect.
13647
13648 2007-10-31  Martin Baulig  <martin@ximian.com>
13649
13650         * debug-debugger.h
13651         (MonoDebuggerInfo): Remove `runtime_class_init'.
13652
13653 2007-10-30  Martin Baulig  <martin@ximian.com>
13654
13655         * debug-mini.h
13656         (mono_debugger_thread_created): Added `MonoThread *' argument.
13657         (mono_debugger_extended_notification): New public method.
13658         (mono_debugger_trampoline_compiled): New public method.
13659
13660         * debug-mini.c
13661         (MonoDebuggerThreadInfo): Added `thread' and
13662         `extended_notifications' fields.
13663
13664         * debug-debugger.c
13665         (debugger_executable_code_buffer): New static variable.
13666
13667         * debug-debugger.h
13668         (MonoDebuggerInfo): Added `executable_code_buffer',
13669         `executable_code_buffer_size', `breakpoint_info_area',
13670         `breakpoint_table' and `breakpoint_table_size'.
13671
13672 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
13673
13674         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
13675         that IP  either is an unused value or the vtable pointer. IMT 
13676         calls use vtable + offset now. Reduced by almost half the size
13677         of IMT entries.
13678
13679 2007-10-26  Jonathan Chambers <joncham@gmail.com>
13680
13681         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
13682         defines to access param registers. Replace long usage with
13683         gsize as sizeof(long) != sizeof(void*) on Win64.
13684
13685         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
13686         on Win64. Fix intrinsic, use _AddressOfReturnAddress
13687         instead of non-existant _GetAddressOfReturnAddress.
13688
13689         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
13690         param registers. Save/restore %rdi and %rsi in MonoLMF.
13691
13692         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
13693         param registers. Modify (throw_exception) signature to take 
13694         %rdi and %rsi on Win64. 
13695
13696         Code is contributed under MIT/X11 license.
13697
13698 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
13699
13700         * helpers.c: unlink debugging output files.
13701
13702 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
13703
13704         * mini.c: Move mono_create_ftnptr () to object.c.
13705
13706 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
13707
13708         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
13709         optional. This function can now be used to disassemble code generated
13710         outside the JIT such as trampolines and IMT thunks.
13711
13712         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
13713
13714         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
13715         vtable pointer from a ldr instruction.
13716
13717         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
13718         new IMT call sequence.
13719
13720         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
13721         call sequence for interface invocations.
13722
13723         * mini-arm.c (mono_arch_emit_imt_argument): added, required
13724         for imt support. This function is empty since IMT on ARM requires no
13725         special handling on the IR side.
13726
13727         * mini-arm.c (mono_arch_find_imt_method): added, required for
13728         imt support.
13729
13730         * mini-arm.c (mono_arch_find_this_argument): added, required
13731         for imt support.
13732
13733         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
13734         a ldr instruction to load a value stored in the code stream.
13735
13736         * mini-arm.c (mono_arch_build_imt_thunk):added, required
13737         for imt support.
13738
13739
13740 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
13741
13742         * mini.c (mini_init): Install the jump trampoline callback.
13743
13744 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
13745
13746         * mini-trampolines.c: handle synchronized methods with the common
13747         vtable trampoline (bug #335601).
13748
13749 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
13750
13751         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
13752
13753         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
13754         64 bit platforms.
13755
13756         * mini-ia64.h mini-ia64.c: Add support for IMT.
13757
13758         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
13759         prolog. Fixes #331958.
13760
13761 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
13762
13763         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
13764
13765 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
13766
13767         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
13768         trampoline.
13769
13770 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
13771
13772         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
13773         trampoline.
13774
13775 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
13776
13777         * mini-x86.c, mini-x86.h: x86 support for the common vtable
13778         trampoline.
13779
13780 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
13781
13782         * mini-trampolines.c: changed the magic rampoline to understand
13783         the common vtable trampoline method: the method to invoke is
13784         determined by the vtable displacement of the call.
13785
13786 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
13787
13788         * mini.c, mini.h: register the common vtable trampoline if the
13789         architecture supports it.
13790
13791 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
13792
13793         * cpu-amd64.md: use the correct max length for tls_get.
13794
13795 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
13796
13797         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
13798         CEE_STELEM_ANY. Fixes #333696.
13799
13800 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
13801
13802         * exceptions-x86.c: provide more graceful handling of the case where
13803         we followed a bogus function pointer from managed code (bug #332866).
13804
13805 2007-10-11  Mark Probst  <mark.probst@gmail.com>
13806
13807         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
13808         replaces the generic_shared flag and will carry more information
13809         in the future.
13810
13811         * generic-sharing.c: Added mini_type_stack_size() which allows
13812         allows open types if given a generic sharing context.
13813         mini_get_basic_type_from_generic() takes a
13814         MonoGenericSharingContext* instead of a MonoCompile* now.
13815
13816         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
13817         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
13818         mini-sparc.c, mini-x86.c: Trivial changes required by the two
13819         changes above.  Just passing arguments through to the right
13820         places.
13821
13822 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
13823
13824         * mini-arm.c: unify the call emission to emit_code_seq().
13825
13826 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
13827
13828         * tramp-arm.c: reduced the trampoline size.
13829
13830 2007-10-10  Mark Probst  <mark.probst@gmail.com>
13831
13832         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
13833         variable handling out of arch-specific code.
13834
13835 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
13836
13837         * mini-arm.c: implemented fast delegate dispatch.
13838
13839 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
13840
13841         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
13842         that fp elimination is turned off if the space required by locals is too
13843         big. Fixes #331958.
13844
13845 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
13846
13847         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
13848         ARM to the new style trampoline.
13849
13850 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
13851
13852         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
13853
13854         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
13855
13856 2007-10-09  Martin Baulig  <martin@ximian.com>
13857
13858         * debug-debugger.h
13859         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
13860         `field_info_offset_offset'.     
13861
13862 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
13863
13864         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
13865         removed more internal usage of the r11 register and made it available
13866         to the register allocator.
13867
13868 2007-10-08  Mark Probst  <mark.probst@gmail.com>
13869
13870         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
13871         when sharing generics and treat type variables as references.
13872
13873 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
13874
13875         * mini-ppc.c: started removing the internal uses of register r11
13876         to eventually allow the register allocator to manage it as an
13877         additional available register.
13878
13879 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
13880
13881         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
13882
13883 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
13884
13885         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
13886         specific trampolines as they are not performance critical as a jump
13887         target (maybe align as before only for AOT code?). This saves about
13888         200 KB of native code on x86 for monodevelop startup.
13889
13890 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
13891
13892         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
13893         monodevelop startup.
13894
13895 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
13896
13897         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
13898
13899         * mini-sparc.h mini-sparc.c: Implement IMT support.
13900
13901         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
13902         its smaller and doesn't clobber sparc_g1.
13903
13904         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
13905
13906 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
13907
13908         * mini-ppc.c: optimized the size of the IMT thunks a bit.
13909
13910 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
13911
13912         * mini-ppc.c: implemented fast delegate invocation.
13913
13914 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
13915
13916         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
13917
13918 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
13919
13920         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
13921         code to the new style trampoline in preparation for IMT support.
13922
13923 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
13924
13925         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
13926         systems already. This also reduces the specific trampiline sizes and
13927         prepares for the use of r12 as the IMT identifier register.
13928
13929 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
13930
13931         * mini-mips.h: endianess fix (simplified from a patch by
13932         Thomas Kunze <thommy@tabao.de>, bug #323737).
13933
13934 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
13935
13936         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
13937         to access ucontext fields and enable netbsd support
13938         (partially from Magnus Henoch <mange@freemail.hu>).
13939
13940 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
13941
13942         * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
13943         use the preprocessor from the CPP env var if it is set.
13944
13945 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
13946
13947         * mini-trampolines.c: fixed an assertion and moved it earlier in the
13948         code, before interface_offset gets used.
13949
13950 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
13951
13952         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
13953         mono_class_setup_vtable () before accessing klass->vtable.
13954
13955 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
13956
13957         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
13958         hackish.
13959
13960 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
13961
13962         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
13963         IMT slots (this saves hundreds of KB of memory in programs like
13964         IronPython and Monodevelop).
13965
13966 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
13967
13968         * mini.c: print the delegate counter.
13969
13970 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
13971
13972         * mini-x86.c: make it easier to enable the debugging code for IMT
13973         slots.
13974
13975 2007-09-28  Martin Baulig  <martin@ximian.com>
13976
13977         * debug-debugger.h
13978         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
13979         `mono_method_klass_offset' and `mono_method_token_offset'.
13980
13981 2007-09-20  Mark Probst  <mark.probst@gmail.com>
13982
13983         * mini.c: First generics sharing implementation.  Can only share
13984         in very simple cases.  If sharing doesn't work it falls back to
13985         dedicated compilation.
13986
13987         * mini.h: Flag in MonoCompile to specify whether generic
13988         compilation is shared.  Flags enum for marking which generic inst
13989         of a context is used.  Prototypes for helper functions.
13990
13991         * generic-sharing.c: Helper functions for generic method sharing.
13992
13993         * optflags-def.h: Optimization flag (gshared) for enabling generic
13994         method sharing added.
13995
13996         * Makefile.am: generic-sharing.c added.
13997
13998 2007-09-19 Daniel Nauck <dna@mono-project.de>
13999
14000         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
14001
14002 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
14003         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
14004         fixes bug 325507.
14005
14006 2007-09-19  Martin Baulig  <martin@ximian.com>
14007
14008         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
14009         mono_debug_cleanup() is now part of mono_cleanup().
14010
14011 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
14012
14013         * driver.c (mono_main): Fix a warning.
14014
14015 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
14016
14017         * aot-compiler.c: Optimize various parts when processing large assemblies.
14018         Fixes ##325568.
14019
14020         * mini.c (mono_patch_info_hash): Improve hash function.
14021
14022 2007-09-14  Jonathan Chambers <joncham@gmail.com>
14023
14024         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
14025         
14026         Code is contributed under MIT/X11 license.
14027
14028 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
14029
14030         * mini.c (mini_init): Fix a leak.
14031
14032         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
14033
14034 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
14035
14036         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
14037
14038 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
14039
14040         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
14041
14042 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
14043
14044         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
14045         variance tests.
14046
14047         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
14048
14049         * mini.c (handle_alloc): Enable managed allocators in AOT code.
14050
14051         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
14052
14053         * aot-runtime.c (decode_patch_info): Ditto.
14054
14055 2007-09-12  Jonathan Chambers <joncham@gmail.com>
14056
14057         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
14058         static case. Cache delegates in architecture specific code, 
14059         based on number of parameters.
14060         
14061         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
14062         in architecture specific code, based on number of parameters.
14063         
14064         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
14065         caching happen in architecture specific code now.
14066         
14067         Code is contributed under MIT/X11 license.
14068
14069 2007-09-12  Jonathan Chambers <joncham@gmail.com>
14070
14071         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
14072         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
14073         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
14074
14075         Code is contributed under MIT/X11 license.
14076
14077 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
14078         * mini.c: (mono_thread_abort) Fixed bug #82416.
14079
14080 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
14081
14082         * mini.: hook the new managed GC allocation feature into the JIT.
14083
14084 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
14085
14086         * mini.c: implementation for the new runtime tls opcode.
14087
14088 2007-09-11  Martin Baulig  <martin@ximian.com>
14089
14090         * debug-debugger.h
14091         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
14092         `mono_method_inflated_offset'.
14093
14094 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
14095
14096         * driver.c mini.h mini.c: Add a new devel command line option for injecting
14097         async exceptions into a method.
14098
14099         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
14100         purpose of testing whenever the unwinder works at every instruction.
14101
14102 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
14103
14104         * mini.c: check accessibility of method used in ldftn (fixes
14105         bug #82635).
14106
14107 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
14108
14109         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
14110
14111         * inssel.brg: Fix a warning.
14112
14113 2007-09-03  Martin Baulig  <martin@ximian.com>
14114
14115         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
14116         now takes the `main_method' as argument.
14117
14118 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
14119
14120         * cpu-sparc.md (endfilter): Add missing src1:i argument.
14121
14122 2007-08-30  Jonathan Chambers <joncham@gmail.com>
14123
14124         * driver.c: include the cil-coff.h header on Windows.
14125         
14126         Code is contributed under MIT/X11 license.
14127
14128 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
14129
14130         * mini.c, driver.c: don't include the cil-coff.h header.
14131
14132 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
14133
14134         * mini.c: flag places that needs fixes fo soft-float support.
14135
14136 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
14137
14138         * mini.h, inssel-float.brg: fix soft-float constant loads on big
14139         endian systems (partially from Dean Jenkins, bug #81924).
14140
14141 2007-08-28  Mark Probst  <mark.probst@gmail.com>
14142
14143         * mini.c (check_linkdemand): Remove embedded reference object in
14144         call to LinkDemandSecurityException.
14145         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
14146         with an IntPtr instead of a reference object.
14147
14148 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
14149
14150         * mini.c (handle_initobj): Handle alignment properly.
14151
14152         * inssel.brg (mini_emit_memset): Ditto. 
14153
14154         * inssel.brg (mini_emit_memcpy): Ditto. 
14155
14156         * inssel-sparc.brg: Ditto.              
14157
14158         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
14159
14160 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
14161
14162         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
14163         exceptions raised in unmanaged code. Fixes part of #82594.
14164
14165 2007-08-24  Mark Probst  <mark.probst@gmail.com>
14166
14167         * mini.c (mono_method_to_ir), declsec.c
14168         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
14169
14170 2007-08-22  Martin Baulig  <martin@ximian.com>
14171
14172         * debug-mini.h
14173         (MonoDebuggerThreadInfo): New typedef.
14174         (mono_debugger_thread_table): New global variable.
14175         (mono_debugger_thread_created): New public function.
14176         (mono_debugger_thread_cleanup): New public function.
14177
14178         * debug-debugger.h
14179         (MonoDebuggerInfo):
14180         - removed `get_current_thread' and `lookup_assembly'.
14181         - removed `data_table'.
14182         - added `thread_table'.
14183
14184         * mini.c
14185         (mono_thread_start_cb): Call mono_debugger_thread_created().
14186         (mono_thread_attach_cb): Likewise.
14187         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
14188         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
14189         initial domain.
14190
14191         * driver.c (mono_main): Move mono_debug_init() up, before calling
14192         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
14193
14194 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
14195
14196         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
14197         together when passing several arguments of type double (gives a small
14198         speedup and saves a few bytes of generated code).
14199
14200 2007-08-20  Jb Evain  <jbevain@novell.com>
14201
14202         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
14203
14204 2007-08-20  Jb Evain  <jbevain@novell.com>
14205
14206         * mini.c (mono_method_to_ir): throw MethodAccessException
14207         and FieldAccessException instead of InvalidProgramException.
14208
14209 2007-08-20  Mark Probst  <mark.probst@gmail.com>
14210
14211         * mini.c: CoreCLR security checks.
14212
14213         * mini.h: Removed MonoSecurityMode (moved to
14214         metadata/security-manager.h) and mono_security_mode global var
14215         (replaced by set/get functions in security-manager.h).
14216
14217         * driver.c: Added "core-clr-test" security mode for testing.  Used
14218         set-function for setting security mode.
14219
14220 2007-08-17  Mark Probst  <mark.probst@gmail.com>
14221
14222         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
14223         the new jit_info_table.
14224
14225         * driver.c: Test code for the new jit_info_table (enabled by the
14226         define MONO_JIT_INFO_TABLE_TEST).
14227
14228 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
14229
14230         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
14231         detection of call <REG> instruction sequence. Fixes build on freebsd.
14232
14233 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
14234
14235         * mini-exceptions.c: Fix a warning.
14236
14237 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
14238
14239         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
14240         stack overflow handling code on amd64 too.
14241
14242         * mini-exceptions.c (mono_setup_altstack): Make this use 
14243         mono_thread_get_stack_bounds ().
14244
14245         * mini-x86.h: Disable sigaltstack on solaris x86.
14246
14247 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
14248
14249         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
14250
14251 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
14252
14253         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
14254
14255 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
14256
14257         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
14258
14259         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
14260
14261 2007-08-03  Neale Ferguson <neale@sinenomine.net>
14262
14263         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
14264         due to alignment.
14265
14266 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
14267
14268         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
14269         to be emitted (bug #82281).
14270
14271 2007-08-01  Martin Baulig  <martin@ximian.com>
14272
14273         Merged the `debugger-dublin' branch.
14274
14275         * debug-debugger.h (MonoDebuggerInfo):
14276         Removed the `old_*' compatibility entries.
14277         Added `debugger_version' and `data_table'.
14278         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
14279         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
14280
14281         * debug-mini.c
14282         (MiniDebugMethodBreakpointInfo): Add `address_list'.
14283         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
14284         instead of a `gconstpointer'.
14285         (mono_debugger_insert_method_breakpoint): Return a
14286         `MonoDebugMethodAddressList *'.
14287
14288 2007-06-28  Martin Baulig  <martin@ximian.com>
14289
14290         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
14291
14292 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
14293
14294         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
14295         __builtin_frame_address () since it is broken on older gcc versions.
14296
14297 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
14298
14299         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
14300         on the stack overflow handling and made the managed stack overflows
14301         catchable in most cases using soft guard pages.
14302         * exceptions-x86.c: added code to restore the protection in the soft
14303         guard pages at the end of exception handling.
14304
14305 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
14306
14307         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
14308
14309 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
14310
14311         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
14312         exception handling.
14313
14314 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
14315
14316         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
14317         signal handling support until it has been ported to the new mechanism.
14318         * mini.c: fixed stack overflow detection and use the new
14319         architecture code  to handle signals on the altstack.
14320
14321 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
14322
14323         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
14324         stack overflows on the alt stack.
14325
14326 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
14327
14328         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
14329         stack overflows on the alt stack.
14330
14331 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
14332
14333         * exceptions-ppc.c: cleanup preparing for altstack support.
14334
14335 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
14336
14337         * exceptions-arm.c: cleanup preparing for altstack support.
14338
14339 2007-07-27  Mark Probst  <mark.probst@gmail.com>
14340
14341         * mini.c (print_jit_stats): Output hazard pointer stats.
14342
14343 2007-07-26  Mark Probst  <mark.probst@gmail.com>
14344
14345         * driver.c, mini.c: Replaced security mode flags with a single
14346         enum variable.
14347
14348 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14349
14350         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
14351
14352 2007-07-25  Mark Probst  <mark.probst@gmail.com>
14353
14354         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
14355         (which doesn't do anything yet) for activating Core CLR
14356         (Silverlight) security.
14357
14358 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
14359
14360         * mini-codegen.c: work around a possible gcc bug on arm.
14361
14362 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
14363
14364         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
14365         message for platforms that don't support AOT compilation.
14366
14367 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
14368
14369         * mini.h, mini.c, driver.c: temporary smcs hack.
14370
14371 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
14372
14373         * mini-arm.h, mini-arm.c: arm EABI fixes.
14374
14375 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
14376
14377         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
14378         case.
14379
14380         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
14381         trampolines taking a method argument.
14382
14383         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
14384
14385         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
14386         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
14387
14388         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
14389         JIT compilation throws an exception. Fixes #82050.
14390
14391 2007-07-19  Mark Probst  <mark.probst@gmail.com>
14392
14393         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
14394         with the MONO_EXCEPTION_ defines.
14395
14396 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
14397
14398         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
14399         #82117.
14400         
14401         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
14402         the cause of an assertion.
14403
14404 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
14405
14406         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
14407         removed.
14408
14409 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
14410
14411         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
14412         assert. Should fix #82103.
14413
14414 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
14415
14416         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
14417         here too. Fixes #82095.
14418
14419         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
14420         addresses.
14421
14422         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
14423
14424         * mini-amd64.h: Enable IMT for amd64.
14425         
14426         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
14427
14428 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
14429
14430         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
14431
14432 2007-07-12  Mark Probst  <mark.probst@gmail.com>
14433
14434         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
14435         as soon as check_linkdemand sets an exception_type.
14436
14437 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
14438
14439         * mini-x86.c: fixed offsets for IMT call sequence.
14440         * mini-x86.h: enable IMT again.
14441
14442 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
14443
14444         * trace.c (mono_trace_enter_method): Decode MonoType too.
14445
14446         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
14447
14448         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
14449
14450         * mini-amd64.c: Add preliminary IMT implementation.
14451         
14452 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
14453
14454         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
14455         understand the new IMT-base interface invocation (thanks to
14456         Daniel Nauck for the report and the remote debugging session).
14457
14458 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
14459
14460         * mini-x86.c: size and speed optimizations for the IMT bsearch.
14461
14462 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
14463
14464         * Makefile.am (aotcheck): Make this actually use the AOTed code.
14465
14466 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
14467
14468         * mini-trampolines.c: implement AOT IMT support.
14469         * mini-x86.h: enable IMT support for wider testing.
14470
14471 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
14472
14473         * inssel.brg (emit_imt_argument): Add aot support here.
14474
14475         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
14476
14477 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
14478
14479         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
14480         of the IMT implementation, partially from massi, with my
14481         implementation of the bsearch sequence. Disabled by default until
14482         the AOT code is implemented.
14483
14484 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
14485
14486         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
14487
14488         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
14489
14490 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14491
14492         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
14493         arch-independent IMT JIT code from Massimiliano
14494         Mantione (massi@ximian.com) with small cleanups from me.
14495
14496 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
14497
14498         * Makefile.am: fix svn invocation to get the svn revision to be
14499         independent of the local language (build fix).
14500
14501 2007-07-09  Mark Probst  <mark.probst@gmail.com>
14502
14503         * mini.c (inline_method): Reset cfg->exception_type if the
14504         inlining is aborted.  Fixes: 82049.
14505
14506 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
14507
14508         * mini.c: remove assert from exception handling code when exception_ptr
14509         is not set.
14510
14511 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
14512
14513         * mini.c (mono_codegen): Add an assert.
14514
14515         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
14516         enter and leave code.
14517         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
14518
14519 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
14520
14521         * mini-ppc.c: fixed memory corruption for localloc(0)
14522         (bug #81852).
14523
14524 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
14525         
14526         * mini.c: Fix warnings.
14527
14528 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
14529
14530         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
14531         to emit better double->int conversions.
14532
14533 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
14534
14535         * mini.c: the provided Min/Max optimizations are valid for unisgned
14536         ints.
14537
14538 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
14539
14540         * 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
14541
14542 2007-06-28  Miguel de Icaza  <miguel@novell.com>
14543
14544         * mini.c (mono_running_on_valgrind): Add support for reporting the
14545         method and  its boundaries to valgrind.
14546
14547 2007-06-28  Martin Baulig  <martin@ximian.com>
14548
14549         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
14550
14551 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
14552
14553         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
14554
14555         * generic.2.cs: Add new test case.
14556
14557 2007-06-25  Martin Baulig  <martin@ximian.com>
14558
14559         Merged the `debugger-dublin' branch.
14560
14561         * debug-mini.c
14562         (mono_debugger_insert_method_breakpoint): New public method.
14563         (mono_debugger_remove_method_breakpoint): Likewise.
14564         (mono_debugger_check_breakpoints): New static method.
14565         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
14566
14567         * debug-debugger.h (MonoDebuggerInfo):
14568         Renamed (to keep backward compatibility in the vtable):
14569         `insert_breakpoint' -> `old_insert_breakpoint'.
14570         `remove_breakpoint' -> `old_remove_breakpoint'.
14571         `create_string' -> `old_create_string'.
14572         `lookup_class' -> `old_lookup_class'.
14573         `lookup_type' -> removed; changed into a dummy field.
14574         `lookup_assembly' -> `old_lookup_assembly'.
14575         Added (same functionality, but different signature):
14576         `create_string', `lookup_class', `lookup_assembly'
14577         Added new:
14578         `get_method_addr_or_bpt', `remove_method_breakpoint',
14579         `runtime_class_init'.
14580
14581         * debug-debugger.c: Merged the `debugger-dublin' branch.
14582
14583 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
14584
14585         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
14586         well.
14587         (peephole_pass): Likewise.
14588
14589 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
14590
14591         * driver.c: hopefully make setaffinity work also for ancient
14592         versions of linux.
14593
14594 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
14595
14596         * driver.c : win32 build fix.
14597
14598 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
14599
14600         * driver.c: check for the MONO_NO_SMP env var and bind to a single
14601         processor if it is set.
14602
14603 2007-06-21  Martin Baulig  <martin@ximian.com>
14604
14605         * debug-mini.h: New file.
14606
14607         * debug-mini.c
14608         (mono_debugger_insert_breakpoint_full): Moved here from
14609         ../metadata/mono-debug-debugger.c.
14610         (mono_debugger_remove_breakpoint): Likewise.
14611         (mono_debugger_breakpoint_callback): Likewise.
14612
14613 2007-06-15  Raja R Harinath  <rharinath@novell.com>
14614
14615         * jit-icalls.c (mono_helper_compile_generic_method): Update to
14616         changes in MonoGenericClass.
14617
14618 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
14619
14620         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
14621
14622 2007-06-14  Raja R Harinath  <rharinath@novell.com>
14623
14624         * jit-icalls.c (mono_helper_compile_generic_method): Update to
14625         removal of MonoGenericMethod.
14626
14627 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
14628
14629         * mini-exceptions.c: hooks for the exception events profiling API.
14630
14631 2007-06-14  Randolph Chung  <tausq@debian.org>
14632
14633         * Makefile.ma: Add hppa target.
14634         * mini-arch.h: Include mini-hppa.h
14635         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
14636         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
14637         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
14638
14639 2007-06-14  Randolph Chung  <tausq@debian.org>
14640
14641         * inssel.brg: Add rules for "chained" compare-branch operations so that
14642         a single compare op can affect multiple branches.  Adjust cost for
14643         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
14644         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
14645         cost for some rules so that they can more easily be overridden by
14646         per-arch rules (with fixes from lupus).
14647         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
14648
14649 2007-06-13  Randolph Chung  <tausq@debian.org>
14650
14651         * mini-ops.h: Reorder branch ops so that they match the order of the
14652         corresponding CEE_* ops.  The code expects them this way.
14653         Add new ops for HPPA target.
14654         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
14655
14656 2007-06-13  Randolph Chung  <tausq@debian.org>
14657
14658         * mini-exceptions.c: Handle cases where the stack grows towards
14659         larger addresses.
14660         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
14661
14662 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
14663
14664         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
14665         counter.
14666         * driver.c: explain where a non-matching corlib is found.
14667
14668 2007-06-13  Mark Probst  <mark.probst@gmail.com>
14669
14670         * mini.c (print_jit_stats): Output dynamic code allocation stats.
14671
14672 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
14673
14674         * mini-exceptions.c: Generate a method profile leave event during
14675         an exception to ensure that the profiler gets notified.
14676
14677 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
14678
14679         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
14680         branch.
14681
14682         * cpu-amd64.md: Add long_and/or/xor opcodes.
14683
14684 2007-06-06  Wade Berrier  <wberrier@novell.com>
14685
14686         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
14687         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
14688         length of instruction shr_imm (expected 8, got 10)
14689
14690 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
14691
14692         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
14693
14694 2007-06-06  Mark Probst  <mark.probst@gmail.com>
14695
14696         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
14697         MonoInternalHashTable again (fixed bug in the internal hash table
14698         code).
14699
14700 2007-06-06  Mark Probst  <mark.probst@gmail.com>
14701
14702         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
14703         Have to figure out what makes it crash the SWF regression.
14704
14705 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
14706
14707         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
14708
14709 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
14710
14711         * mini.c: optimize out the type check when storing null in a
14712         reference array.
14713
14714 2007-06-04  Mark Probst  <mark.probst@gmail.com>
14715
14716         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
14717         MonoInternalHashTable.
14718
14719 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
14720
14721         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
14722         signed integer methods.
14723
14724 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
14725
14726         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
14727         permanently since the current approach doesn't work.
14728
14729 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
14730
14731         * inssel.brg (stmt): Only call delegate->invoke_impl if 
14732         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
14733
14734 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
14735
14736         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
14737         the sreg2==rdx case.
14738         
14739         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
14740         account if it contains a rex prefix.
14741         (peephole_pass): Handle OP_FMOVE as well.
14742
14743 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
14744
14745         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
14746         as it causes regressions.
14747
14748 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
14749
14750         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
14751         static case as well.
14752
14753         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
14754
14755         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
14756         (mono_arch_get_this_arg_from_call): Ditto.
14757
14758         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
14759
14760         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
14761         invoke_impl field.
14762
14763         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
14764         (mono_arch_get_this_arg_from_call): Ditto.
14765
14766         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
14767         
14768         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
14769         try to create optimized invoke code and use that for further invocations. 
14770         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
14771
14772         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
14773
14774 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
14775
14776         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
14777         sealed classes or methods.
14778         *devirtualization.cs: tests for the new optimization
14779
14780 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
14781
14782         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
14783         by the update_volatile () function.
14784
14785 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
14786
14787         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
14788         require it.
14789
14790         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
14791
14792 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
14793
14794         * mini.c: Add configure checks for header files.
14795         * mini-x86.c: Add configure checks for header files.
14796         * trace.c: Add configure checks for header files.
14797         * aot-runtime.c: Add configure checks for header files.
14798         * aot-compiler.c: Add configure checks for header files.
14799         * driver.c: Add configure checks for header files.
14800         * mini-codegen.c: Add configure checks for header files.
14801         
14802         Code is contributed under MIT/X11 license.
14803
14804 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
14805
14806         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
14807         icompare_imm -128 + op_iclt. Fixes #81703.
14808
14809 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
14810
14811         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
14812
14813 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
14814
14815         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
14816         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
14817         so that all isinst checks now use "interface_bitmap".
14818
14819 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
14820
14821         * cpu-amd64.md (jmp): Fix a warning.
14822
14823         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
14824
14825         * basic.cs: Add new regression test.
14826
14827         * basic.cs: Remove test which is now in basic-long.cs.
14828
14829         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
14830
14831         * basic-long.cs: Add new test.
14832         
14833 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
14834
14835         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
14836
14837 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
14838
14839         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
14840
14841         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
14842         places.
14843         
14844         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
14845         throwing code a bit.
14846
14847         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
14848         the exception throwing code a bit.
14849
14850         * mini-x86.c (get_call_info): Allocate result from a mempool.
14851
14852 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
14853
14854         * aot-compiler.c (find_typespec_for_class): Fix the assert.
14855
14856         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
14857
14858         * mini.h (MonoCompile): Add 'token_info_hash' field.
14859
14860         * mini.c: Save token->method associations during compilation so the AOT 
14861         compiler can use it.
14862         
14863         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
14864         which reference generic classes and methods.
14865
14866 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
14867
14868         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
14869
14870         * aot-compiler.c (compile_method): Fix a typo in a comment.
14871
14872         * aot-runtime.c (decode_cached_class_info): Skip generic types.
14873
14874         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
14875         everything generic.
14876
14877         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
14878
14879 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
14880
14881         * mini.h (MonoCompile): Add 'args' field.
14882
14883         * mini.c (mono_compile_create_vars): Store variables representing the arguments
14884         into cfg->args.
14885
14886         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
14887
14888 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
14889
14890         * mini.c (mono_compile_get_interface_var): Remove this unused function.
14891
14892         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
14893
14894         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
14895         opcodes for some opcodes.
14896
14897         * mini.h *.brg *.c: Use the new opcodes.
14898
14899 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
14900
14901         * mini.h: Bumped aot revision.
14902
14903         * inssel.brg: modified code generation of type checks for interfaces
14904         to use the new "MonoClass.interface_bitmap" instead of the old
14905         "MonoClass.interface_offsets".
14906
14907 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
14908
14909         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
14910
14911 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
14912
14913         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
14914         64 bit platforms.
14915
14916 2007-04-27  Neale Ferguson <neale@sinenomine.net>
14917
14918         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
14919
14920 2007-04-27  Wade Berrier  <wberrier@novell.com>
14921
14922         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
14923         mini.h) to fix build.
14924
14925 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
14926
14927         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
14928         
14929         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
14930         causes the corlib unit tests to fail.
14931
14932 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
14933
14934         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
14935
14936         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
14937
14938         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
14939         opcodes to the comparison relations.
14940
14941         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
14942         opcodes to their types.
14943         
14944         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
14945
14946         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
14947         it in cfg->arch.cinfo.
14948
14949         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
14950
14951         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
14952         cfg->cil_offset_to_bb.
14953
14954 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
14955
14956         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
14957         created becase of initlocals.
14958
14959 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
14960
14961         * mini-alpha.c cpu-alpha.md: More alpha port work from 
14962         Sergey Tikhonov <tsv@solvo.ru>.
14963
14964 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
14965
14966         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
14967
14968 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
14969
14970         * cpu-s390.md (break): Correct the length of break instruction.
14971
14972 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
14973
14974         * mini.c: fix a couple of soft-float issues and comments.
14975
14976 2007-04-15  Miguel de Icaza  <miguel@novell.com>
14977
14978         * trace.c (is_filenamechar): - is also a filename char.
14979
14980 2007-04-15  Neale Ferguson <neale@sinenomine.net>
14981
14982         * mini-s390.c: Correct checking for enum type in return value processing.
14983
14984 2007-04-14  Raja R Harinath  <rharinath@novell.com>
14985
14986         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
14987         (version.h): Makefile is in the build directory.
14988
14989 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
14990
14991         * mini-amd64.h: fix for assertion failure on Solaris/amd64
14992
14993 2007-04-11  Martin Baulig  <martin@ximian.com>
14994
14995         * mini.c (can_access_member): Fix handling of generic classes;
14996         fixes #81259.
14997
14998 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
14999
15000         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
15001
15002 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
15003
15004         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
15005
15006 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
15007
15008         * mini-codegen.c: make sure the right spill amount is
15009         used for fp or integer registers (fixes the float_sub_spill() on ppc).
15010
15011 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
15012
15013         * mini-ppc.c: fixes for the fp_branch_nan test.
15014
15015 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
15016
15017         * basic.cs: Comment out new test which still fails on ia64.
15018
15019 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
15020
15021         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
15022
15023 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
15024
15025         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
15026
15027 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
15028
15029         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
15030         on 64 bit machines. Fixes part of #80738.
15031
15032         * basic.cs: Add regression test.
15033
15034 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
15035
15036         * inssel.brg basic.cs: Revert previous change to fix build.
15037
15038         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
15039         platforms.
15040         
15041         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
15042
15043         * basic.cs: Add new regression test.
15044
15045 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
15046
15047         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
15048         many arguments.
15049
15050 2007-03-16  Neale Ferguson <neale@sinenomine.net>
15051
15052         * cpu-s390x.md: Correct length of break instruction.
15053
15054 2007-03-16  Neale Ferguson <neale@sinenomine.net>
15055
15056         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
15057         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
15058
15059 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
15060
15061         * *.c: Begin WIN64 port.
15062         * mini.c:  Use correct register in profiler.
15063         * mini-amd64.c: No inline assembly on Win64.
15064         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
15065         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
15066         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
15067         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
15068         mono_arch_ip_from_context for Win64.
15069         
15070         Contributed under MIT/X11 license.
15071
15072 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
15073
15074         * exceptions-amd64.c (seh_handler): Ditto.
15075
15076         * exceptions-x86.c (seh_handler): Fix a memory leak.
15077
15078 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
15079
15080         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
15081         mini-s390x.c: fixed peephole optimizations to deal
15082         correctly with 1 and 2 byte reload avoidance.
15083
15084 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
15085
15086         * cpu-s390.md, cpu-s390x.md: update localloc length.
15087
15088 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
15089
15090         * cpu-g4.md: added missing descriptions.
15091
15092 2007-03-14  Miguel de Icaza  <miguel@novell.com>
15093
15094         *  Makefile.am: Add support so the tail tests are not executed on
15095         PowerPC as that is a known limitation of the PowerPC port.
15096
15097 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
15098
15099         * runmdesc.bat:  Move to msvc directory.
15100         
15101 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
15102
15103         * runmdesc.bat:  Run executable that was produced by the current
15104         target and sent via an argument.
15105         
15106 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
15107
15108         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
15109         #81102.
15110
15111         * generics.2.cs: Add regression test.
15112
15113 2007-03-09  Wade berrier  <wberrier@novell.com>
15114
15115         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
15116
15117 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
15118
15119         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
15120         AOT code depends on this.
15121
15122 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
15123
15124         * mini.c: more precise tracking of types in the eval stack
15125         (part of fix for bug #81044).
15126
15127 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
15128
15129         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
15130
15131         * aot-compiler.c (encode_patch): Remove an obsolete comment.
15132
15133 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
15134
15135         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
15136
15137         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
15138
15139 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
15140
15141         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
15142         a pointer on 64 bit systems. Fixes #80190.
15143
15144         * iltests.il: Add new regression test.
15145
15146 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
15147
15148         * mini.c: inline a constant for Environment.IsRunningOnWindows.
15149
15150 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
15151
15152         * trace.c: Remove an erroneous alignemnt check when tracing.
15153           Fixes --trace on OSX86.
15154
15155 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
15156
15157         * mini-$(arch).h: initialize SP in context for all the archs.
15158
15159 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
15160
15161         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
15162         regressions in the thread tests.
15163
15164 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
15165
15166         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
15167         - fixed implementation of LOCALLOC opcode
15168         - implemented non-un compare for floats
15169         - code cleanup
15170         - implementation of FDIV and CKFINITE opcodes
15171         - fixes for latest mono updates
15172         - additional arch opcodes
15173
15174 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
15175
15176         * Makefile.am: simplify and merge rules for cross-compilation.
15177
15178 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
15179
15180         * local-propagation.c: Actually *apply* the fix for bug 80591...
15181
15182 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
15183
15184         * mini-exceptions.c: backuot part of the last change
15185         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
15186
15187 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
15188         * inssel.brg: Fix bug 59286.
15189
15190
15191 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
15192
15193         * mini-exceptions.c: patch from Zoltan to correctly check for
15194         stack boundaries (using the stack register, not the frame register),
15195         fixes bugs #80724, #79717.
15196
15197 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
15198
15199         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
15200         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
15201
15202         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
15203         presence of frame pointer elimination.
15204
15205 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
15206         
15207         * mini-x86.h: NetBSD UCONTEX_REG defines.
15208
15209 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
15210
15211         * inssel-amd64.brg: Fix amd64 build.
15212
15213 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
15214
15215         * mini.h: remove extern to workaround what looks likes gcc bug 26905
15216         on amd64.
15217
15218 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
15219
15220         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
15221         ends.
15222
15223         * mini-<ARCH>.c: Use mono_is_regsize_var ().
15224
15225 2007-01-30 Mark Mason <mason@broadcom.com>
15226
15227            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
15228            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
15229            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
15230            beginning support for CEE_JMP [not quite working yet]
15231            * tramp-mips.c: LMF handling now works
15232         
15233 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
15234
15235         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
15236
15237         * mini.h (NULLIFY_INS): New macro.
15238
15239 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
15240
15241         * mini.c: statistical profiler fix for windows, patch
15242         from Tor Lillqvist (tml@novell.com).
15243
15244 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
15245         * local-propagation.c: Fix bug 80591.
15246
15247 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
15248
15249         * Makefile.am: put back the --export-dynamic option as with
15250         the previous gmodule flags (thanks to Robert Jordan).
15251
15252 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
15253
15254         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
15255
15256         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
15257         simplify and speed up the local register allocator. Also rename some fields
15258         like iassign->vassign.
15259         
15260         * regalloc.c: Remove some functions which are no longer used since their
15261         inlined version is in mini-codegen.c.
15262         
15263         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
15264
15265         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
15266
15267 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
15268
15269         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
15270         narrowing. Fixes #80622.
15271
15272         * iltests.il: Add new regresssion test. 
15273
15274 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
15275
15276         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
15277         debug-debugger.c, debug-debugger.h: warning fixes.
15278         * driver.c: updated copyright year and made it fit in one line.
15279
15280 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
15281
15282         * aot-runtime.c: updated to use mono-dl instead of gmodule.
15283
15284 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
15285
15286         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
15287
15288         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
15289
15290         * iltests.il: Add new test for bug #80507.
15291
15292 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
15293
15294         * mini-arm.h: use soft-float also on vfp for now.
15295
15296 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
15297
15298         * mini.c: fix some more soft-float issues.
15299
15300 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
15301
15302         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
15303
15304 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
15305         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
15306         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
15307         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
15308
15309 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
15310
15311         * mini-arm.c: typo fix.
15312
15313 2007-01-23  Neale Ferguson <neale@sinenomine.net>
15314
15315         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
15316
15317 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
15318
15319         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
15320         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
15321
15322         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
15323
15324         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
15325
15326         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
15327         
15328         * inssel.brg: Fix a warning.
15329
15330         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
15331
15332         * abcremoval.c ssa.c ssapre.c: Update after this change.
15333         
15334         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
15335
15336         * dominators.c (df_set): Use mono_bitset_union_fast.    
15337
15338 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
15339
15340         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
15341         mini-codegen.c: reduce relocations and memory usage for the cpu
15342         description.
15343
15344 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
15345
15346         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
15347
15348         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
15349         to reduce their size.
15350
15351 2007-01-19 Mark Mason <mason@broadcom.com>
15352
15353         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
15354         * mini-mips.c: more configuration macros, support long conditional branches, additional
15355         asserts, fix epilog instrumentation.
15356         * mini-mips.h: use standard stack walk
15357         * cpu-mips.md: increase size of div, rem and conditional branches
15358         
15359 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
15360
15361         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
15362         to cpu spec data.
15363
15364 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
15365
15366         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
15367         (compile_method): Ditto.
15368
15369         * aot-runtime.c (decode_klass_info): Ditto.
15370
15371         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
15372         needed by the code generated by inssel.brg. Also fix a warning.
15373
15374 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
15375
15376         * mini.c: deal with enums that become genericinsts by
15377         being nested in a generic class (bug #79956).
15378
15379 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
15380
15381         * mini.c: match the generic definition to check for
15382         private access with generic types (bug #78431).
15383
15384 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
15385
15386         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
15387         to make life easier for people cross-compiling that insist on not
15388         using scratchbox.
15389
15390 2007-01-17 Mark Mason <mason@broadcom.com>
15391
15392         * inssel-long.brg: patch to deal with mips missing flags
15393         * inssel-long32-mips.brg: implement overflow checks
15394         * insset-mips.brg: implement overflow checks
15395         * mini-mips.h: implement conditional exception handling
15396         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
15397           Remove unused code, minor cleanups.
15398         * exceptions-mips.c: minor cleanups
15399         * mini-ops.h: add mips conditional exception ops
15400         * cpu-mips.md: add mips conditional exception ops
15401
15402         
15403 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
15404
15405         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
15406         to deal with mips missing of flags.
15407
15408 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
15409
15410         * exceptions-ppc.c: execute fault handlers.
15411
15412 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
15413
15414         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
15415
15416 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
15417
15418         * mini.c: handle also floating point values in initialize_array.
15419
15420 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
15421
15422         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
15423         array initialization and make it conditional on the intrins option.
15424
15425 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
15426
15427         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
15428         relocations and put the patch info names close to the enum definition.
15429
15430 2007-01-15 Mark Mason <mason@broadcom.com>
15431
15432         * basic.cs, exceptions.cs: break up large tests to increase debugability.
15433
15434 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
15435
15436         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
15437
15438 2007-01-12  Raja R Harinath  <rharinath@novell.com>
15439
15440         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
15441
15442 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
15443
15444         * Makefile.am: distribute the mips sources.
15445
15446 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
15447
15448         * mini-codegen.h: handle bug #80489 here, by excluding ecx
15449         directly.
15450
15451 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
15452
15453         * cpu-x86.md: back out for now as this triggers other regressions.
15454
15455 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
15456
15457         * cpu-x86.md: force src1 and dest regpair for long shift instructions
15458         to eax:edx, so ecx can't get allocated to them (bug #80489).
15459
15460 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
15461
15462         * mini.c, mini-exceptions.c: enabled running fault handlers
15463         (bug #80469).
15464
15465 2007-01-03  Miguel de Icaza  <miguel@novell.com>
15466
15467         * driver.c: If nothing fail, do not use the string "failed",
15468         because it makes it very annoying to view test result logs on the
15469         web. 
15470
15471 2006-12-30  Miguel de Icaza  <miguel@novell.com>
15472
15473         * debug-debugger.c (mono_debugger_main): Rename "main" to
15474         "main_method" to prevent a warning.
15475
15476         Remove a warning for unused field.
15477
15478 2006-12-28  Martin Baulig  <martin@ximian.com>
15479
15480         * debug-debugger.c
15481         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
15482
15483 2006-12-22  Martin Baulig  <martin@ximian.com>
15484
15485         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
15486         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
15487         seperate `.mdb_debug_info' section, so we can access it from the
15488         debugger even if the binary is stripped.
15489
15490         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
15491         from the `.mdb_debug_info' here to prevent the linker from
15492         removing that section.
15493
15494         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
15495         mdb-debug-info64.s.
15496
15497 2006-12-19  Robert Jordan  <robertj@gmx.net>
15498
15499         * mini-x86: enable the code to return small structures in
15500         registers for FreeBSD as well. Fixes bug #80278.
15501         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
15502
15503 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
15504
15505         * mini-x86.c: align the stack when calling the profiler
15506         function instrumenting the prolog (on OSX).
15507
15508 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
15509
15510         * mini.c: emit a break opcode where Debugger.Break () is called.
15511
15512 2006-12-13  Miguel de Icaza  <miguel@novell.com>
15513
15514         * mini.c (mono_method_to_ir): Provide useful information on this
15515         assert, to prevent others from debugging like I did.
15516
15517 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
15518
15519         * mini.c: enable code which was incorrectly commented
15520         (bug #80235).
15521
15522 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
15523
15524         * mini-x86.c: enable on OSX, too, the code to return small
15525         structures in registers.
15526
15527 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
15528
15529         * mini-x86.c: remove the use of the dynamic code manager here, too.
15530
15531 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
15532
15533         * mini.h, debug-debugger.c, tramp-*.c: fixed 
15534         mono_debugger_create_notification_function() to use
15535         mono_global_codeman_reserve () instead of a dynamic code manager.
15536
15537 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
15538
15539         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
15540         ves_array_element_address() jit icall and use a generated
15541         managed method instead (which is about 4 times faster for a rank 3
15542         array access).
15543
15544 2006-11-29  Mark Mason  <mason@broadcom.com>
15545
15546         * basic-calls.cs: additional tests for passing
15547         structures as function arguments.
15548
15549 2006-11-29  Mark Mason  <mason@broadcom.com>
15550
15551         * mini-mips.h: disable custom exception handling
15552         * mini-mips.c: throw/rethrow should use jalr to call
15553         exception stubs.  Fixed bug with passing structures
15554         by value. More support for tracing floating point
15555         functions.
15556
15557 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
15558
15559         * mini.c: fixed typo in the soft-float ldind.r4 handling
15560         (bug #80086).
15561
15562 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
15563
15564         * mini.c, mini.h, driver.c: added --runtime command line
15565         option to select a different runtime than the autodetected one.
15566         * jit.h: added API for embedders to initialize with a specific
15567         runtime version.
15568
15569 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
15570
15571         * mini.c: handle also boxing of r4 values (bug #80024).
15572
15573 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
15574
15575         * mini-ppc.c: force indirect calls until we reserve
15576         enough address space for all the generated code.
15577
15578 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
15579
15580         * exceptions-arm.c: workaround bugs in the libc definition
15581         of struct ucontext.
15582
15583 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
15584
15585         * inssel.brg: fixes from me and Mark Mason.
15586
15587 2006-11-23  Dick Porter  <dick@ximian.com>
15588
15589         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
15590         semaphore display now we've fixed the initial value
15591
15592 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
15593
15594         * inssel.brg: partially revert the last change to fix the build.
15595
15596 2006-11-21  Mark Mason  <mason@broadcom.com>
15597
15598         * inssel.brg: Add and use compare-and-branch macros to support
15599         architectures that do not have condition code registers (ie. MIPS).
15600         * *-mips.{c,brg,md}: Fix copyright statements
15601
15602 2006-11-20  Mark Mason  <mason@broadcom.com>
15603
15604         * Makefile.am: remove mini-codegen.c from list of MIPS sources
15605         * mini.c: Allow GET_CONTEXT to be specified by the arch port
15606         * mini.h: Added declaration for mono_print_ins()
15607         * mini-codegen.c: added ins_spec initializer for MIPS
15608         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
15609         vreg to be virtual and hreg to be non-virtual.
15610         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
15611         is not yet working/implemented correctly.
15612         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
15613         non-static, fixup calls to print_ins() from other parts in the file.
15614
15615 2006-11-20  Mark Mason  <mason@broadcom.com>
15616
15617         * basic-calls.cs: added tests for passing structures as arguments
15618         to calls.
15619
15620 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
15621
15622         * inssel-long32.brg: optimize signed division by power of two.
15623
15624 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
15625
15626         * mini-arm.c: added support for interworking with thumb code
15627         (mono must be still be built using the ARM instruction encoding).
15628
15629 2006-11-19  Miguel de Icaza  <miguel@novell.com>
15630
15631         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
15632         verifier has different rules for it.   Fixes a few verifier issues
15633         in the test suite.
15634
15635         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
15636         at the end, so people know what happened.
15637
15638 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
15639
15640         * brach-opts.c: in optimize_exception_target() make sure we
15641         are in a catch clause (fixes bug #79871).
15642
15643 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
15644
15645         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
15646         more soft-float support fixes.
15647
15648 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
15649
15650         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
15651         that are passed half on the stack and half in registers.
15652
15653 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
15654
15655         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
15656         more mips integration work from Mark E Mason 
15657         <mark.e.mason@broadcom.com>.
15658
15659 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
15660
15661         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
15662         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
15663         tramp-mips.c: added sources for the mips port, not
15664         integrated in the build yet. Contributed by
15665         Mark E Mason <mark.e.mason@broadcom.com>.
15666
15667 2006-11-14  Neale Ferguson <neale@sinenomine.net>
15668
15669         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
15670
15671 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
15672
15673         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
15674         put the soft-float rules in its own file since it seems to
15675         break s390 compilation.
15676
15677 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
15678
15679         * mini-arm.c: fixed wrnings.
15680
15681 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
15682
15683         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
15684         inssel-arm.brg: ARM support for soft-float.
15685
15686 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
15687
15688         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
15689         loads and stores of 32 bit fp values.
15690
15691 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
15692
15693         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
15694
15695         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
15696         works. Fixes #79852 and #79463.
15697
15698 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
15699
15700         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
15701         more soft-float support WIP and fixes.
15702
15703 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
15704
15705         * mini-arm.c: some VFP updates.
15706
15707 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
15708
15709         * mini-exceptions.c: 0 is a valid local var offset in some
15710         architectures, don't assert (bug #78508).
15711
15712 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
15713
15714         * exceptions-arm.c: fixed off by one error in stack walk code.
15715
15716 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
15717
15718         * mini.h, mini.c: more precise tracking of type load exceptions.
15719
15720 2006-11-03  Robert Jordan  <robertj@gmx.net>
15721
15722         * Makefile.am: [WIN32] Add monow.exe target.
15723         * driver.c: [WIN32] Don't detach the console when debugging.
15724         Fixes bug #79797.
15725         
15726 2006-10-30  Miguel de Icaza  <miguel@novell.com>
15727
15728         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
15729
15730 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
15731
15732         * aot-compiler.c (emit_method_info): Add a case missed earlier.
15733
15734         * driver.c (mini_regression): Fix --regression with AOT.
15735
15736         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
15737
15738 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
15739
15740         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
15741
15742         * mini-sparc.h: Don't use sigaction on sparc/linux.
15743
15744         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
15745
15746         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
15747
15748         * mini-exceptions.c: Add proper include files for getpid ().
15749
15750 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
15751
15752         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
15753         address instead of a MonoJitInfo* to avoid decoding the exception info for the
15754         method.
15755
15756         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
15757         name cache to reduce its size.
15758
15759         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
15760
15761 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
15762
15763         * mini-x86.c: Save/restore the current LMF structure more efficiently using
15764         the mono_lmf TLS variable.
15765
15766         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
15767         trampoline lmf frames.  
15768
15769         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
15770
15771 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
15772
15773         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
15774         the mono_lmf TLS variable.
15775
15776         * mini-exceptions.c: Access the LMF structure through accessors.
15777
15778         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
15779         variable instead of in jit_tls->lmf.
15780
15781         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
15782         
15783         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
15784         trampoline lmf frames.
15785
15786         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
15787
15788 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
15789
15790        * mini.c trace.c mini-x86.c: Revert these too.
15791         
15792        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
15793        signature change.
15794
15795 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
15796
15797         * genmdesc.c: removed now dead code.
15798
15799 2006-10-09  Robert Jordan <robertj@gmx.net>
15800
15801         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
15802
15803 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
15804
15805         * mini.h: do not leave gaps in the opcode values.
15806
15807 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
15808
15809         * jit-icalls.h: flag functions as internal here, too.
15810
15811 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
15812
15813         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
15814         functions with the internal attribute.
15815
15816 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
15817
15818         * aot-compiler.c: fclose the file descriptor in the profile read loop.
15819
15820 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
15821
15822         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
15823         for soft-float.
15824
15825 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
15826
15827         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
15828         tail calls as on other platforms.
15829
15830         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
15831
15832         * iltests.il: Add a few tailcall tests.
15833
15834 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
15835
15836         * driver.c: fix loop for old compilers (bug #79521).
15837
15838 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
15839
15840         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
15841
15842         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
15843
15844         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
15845         metadata without any code.
15846
15847         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
15848         more precise debugging information using gdb.
15849
15850 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
15851
15852         * inssel-ia64.brg: Make the helper methods static.
15853
15854 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
15855
15856         * inssel-x86.brg: make the helper methods static.
15857
15858 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
15859
15860         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
15861
15862 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
15863
15864         * mini.c: updates for monoburg changes.
15865         * inssel.brg: make a few helper functions static as they should.
15866
15867 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
15868
15869         * Makefile.am: Move mini-codegen.c to common_sources.
15870
15871 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
15872
15873         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
15874         instructions.
15875         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
15876         mini-ppc.h: port to use the common local register allocator.
15877
15878 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
15879
15880         * mini.h: Remove the comment too then.
15881
15882 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
15883
15884         * mini.h: put back backend.data which is to be used shortly and
15885         doesn't increase the size of MonoInst. If any 64 bit arch aligned
15886         pointers on 4 byte boundaries it'd have much bigger issues running
15887         and you can ifdef it out anyway.
15888
15889 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
15890
15891         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
15892         MonoInst size by 4 bytes on 64 bit machines.
15893
15894 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
15895
15896         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
15897         replacement with more meaningful field names. Arch maintainers, please
15898         check the assigned names are good enough for your arch.
15899
15900 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
15901
15902         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
15903         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
15904
15905 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
15906
15907         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
15908         relocations and memory requirements, put the optimization flags
15909         definitions in their own file.
15910
15911 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
15912
15913         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
15914
15915         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
15916
15917 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
15918
15919         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
15920
15921 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
15922
15923         * inssel.brg: use the correct function to get the size of an item
15924         in an array, given an element class.
15925         * aot-compiler.c: do not access class->class_size directly.
15926
15927 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
15928
15929         * mini.h, debug-mini.c: added a debugging function to print
15930         info about local variables and arguments in a jitted method.
15931
15932 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
15933
15934         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
15935
15936         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
15937
15938 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
15939
15940         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
15941         inner and outer loops when passing vtypes.
15942
15943 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
15944
15945         * mini-ppc.c: take into account the cpu errata for cache flushing
15946         which caused some random errors (bug #79381).
15947
15948 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
15949
15950         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
15951         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
15952
15953 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
15954
15955         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
15956         loaded.
15957
15958         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
15959         freebsd ports tree.
15960
15961         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
15962         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
15963
15964         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
15965         displacement.
15966
15967 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
15968
15969         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
15970
15971 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
15972
15973         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
15974         macro does not have to be changed during debugging.
15975
15976         * 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>.
15977
15978         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
15979
15980         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
15981         
15982         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
15983         MONO_ARCH_NO_EMULATE_MUL is defined.
15984
15985         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
15986
15987         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
15988
15989         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
15990
15991         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
15992         
15993 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
15994
15995         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
15996         stuff to mini-exceptions.c where it is used.
15997
15998         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
15999         setup code, the real one is in mini-exceptions.c.
16000
16001         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
16002         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
16003         some changes from the freebsd ports tree.
16004
16005         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
16006         constants.
16007         
16008         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
16009
16010 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
16011
16012         * mini.c: on Linux, check for /proc to be mounted
16013         (bug# 79351, novell bug#201204).
16014
16015 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
16016
16017         * mini.c: handle cases where pthread_attr_getstack() behaves
16018         incorrectly (bug #78096).
16019
16020 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
16021
16022         * mini-arm.c: support larger stack frames (bug #79272).
16023
16024 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
16025
16026         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
16027
16028         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
16029         tokens.
16030
16031         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
16032         mono_class_from_name () to find a class from its name.
16033
16034         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
16035
16036 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
16037
16038         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
16039
16040 2006-09-05  Kornel Pal  <kornelpal@gmail.com>
16041
16042         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
16043
16044 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
16045
16046         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
16047         callinfo->trampoline.
16048
16049         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
16050         fixes #79271.
16051         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
16052         future.
16053
16054 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
16055
16056         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
16057
16058 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
16059
16060         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
16061         stats.method_trampolines, it is already done by the generic trampoline code.
16062
16063         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
16064         
16065 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
16066
16067         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
16068
16069         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
16070
16071         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
16072
16073         * mini.c (print_jit_stats): Print mscorlib mempool size too.
16074         
16075         * mini.c (print_jit_stats): Print new stats.
16076
16077         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
16078
16079 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
16080
16081         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
16082         Address on two dimensional arrays. Fixes #78729.
16083
16084         * mini.h (MonoCompile): Add a 'skip_visibility' field.
16085
16086         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
16087         a method.
16088
16089         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
16090
16091         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
16092         #79130.
16093         
16094         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
16095         a race condition.
16096         (mini_get_ldelema_ins): Ditto.
16097
16098 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
16099
16100         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
16101         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
16102         Fixes #79213.
16103
16104 2006-08-29 Neale Ferguson <neale@sinenomine.net>
16105
16106         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
16107         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
16108
16109         * exceptions-s390x.c: Cosmetic change.
16110
16111         * tramp-s390.c: Fix warning.
16112
16113         * cpu-s390.md: Correct length of mul_imm.
16114
16115 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
16116
16117         * aot-compiler.c: added binary writer with ELF backend
16118         implementation (only on Linux/x86 for now).
16119
16120 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
16121
16122         * Makefile.am: Don't run net 2.0 AOT tests.
16123
16124         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
16125         (mono_compile_assembly): Skip net 2.0 assemblies as well.
16126
16127         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
16128
16129 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
16130
16131         * aot-compiler.c: simplified and refactored the asm-writing code
16132         to allow different backends.
16133
16134 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
16135
16136         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
16137
16138         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
16139         little. Share patches of type TYPE_FROM_HANDLE as well.
16140
16141         * mini.c (mono_patch_info_equal): New helper function.
16142         (mono_patch_info_hash): Ditto.
16143
16144         * aot-compiler.c (emit_method_code): Fix s390 build.
16145
16146         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
16147         is not handled because it is stored as a flag and not as a type ctor. Fixes
16148         #79016.
16149
16150 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
16151
16152         * aot-compiler.c: Fix computation of GOT slot statistics.
16153         
16154         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
16155         Also remove support for not PIC AOT.
16156
16157         * mini.h: Bump AOT file format version.
16158
16159         * objects.cs: Add a test for #78990.
16160
16161         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
16162         (peter.dettman@iinet.net.au). Fixes #79087.
16163
16164         * basic-long.cs: Add a test for the above.
16165
16166 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
16167
16168         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
16169         
16170         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
16171         code somewhat.
16172
16173 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
16174
16175         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
16176         exceptions.
16177
16178 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
16179
16180         * mini.c: Don't verify COM proxy invoke calls
16181         
16182
16183 2006-08-10  Dick Porter  <dick@ximian.com>
16184
16185         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
16186         which process is holding semaphores locked.
16187
16188 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
16189
16190         * mini-ia64.c mini-amd64.c: Fix #79027.
16191
16192         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
16193
16194         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
16195
16196         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
16197         implicit arguments in a vararg call. Fixes #79027.
16198
16199 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
16200
16201         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
16202         (mono_get_array_new_va_signature): Ditto.
16203
16204 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
16205
16206         * aot-runtime.c: Call init_plt lazily.
16207
16208         * inssel-long.brg: Fix unsigned long->int conversion.
16209
16210         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
16211
16212         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
16213         that most data is now in the .rss/.data section.
16214
16215 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
16216
16217         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
16218
16219         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
16220
16221         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
16222
16223         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
16224
16225         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
16226         virtual call. Fixes #79010.
16227
16228         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
16229         and use the result as the this argument in the real call.
16230
16231         * generics.2.cs: Add a new test for #79010.
16232         
16233 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
16234
16235         * mini-x86.c: Fix a warning.
16236
16237         * aot-compiler.c: Add a bunch of statistics.
16238
16239         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
16240
16241 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
16242
16243         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
16244
16245 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
16246
16247         * 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>.
16248
16249 2006-07-13  Miguel de Icaza  <miguel@novell.com>
16250
16251         * mini.c (mono_method_to_ir): Obtain the original method in the
16252         CIL stream and use this to perform validation.
16253
16254         Fixed: #78816
16255
16256 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
16257
16258         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
16259         (mono_arch_call_opcode): Ditto.
16260
16261         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
16262         #78826.
16263
16264         * mini.c (mono_patch_info_dup_mp): New helper function.
16265         
16266         * aot-compiler.c (compile_method): Fix some of the memory allocated during
16267         compilation. Fixes #78827.
16268
16269 2006-07-18  Kornel Pal  <kornelpal@gmail.com>
16270
16271         * declsec.c: Use original security informations for
16272           MONO_WRAPPER_MANAGED_TO_MANAGED.
16273
16274 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
16275
16276         * mini.c: Allow Com Interop methods/classes and
16277         don't verify COM wrapper calls
16278         
16279
16280 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
16281
16282         * inssel-long32.brg: Fix long->i4 checked conversion.
16283
16284         * exceptions.cs: Add a test for the above.
16285
16286 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
16287
16288         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
16289
16290         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
16291         leaks.
16292
16293         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
16294         #78775.
16295
16296 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
16297
16298         * mini.c: Fix solaris/x86 exception handling.
16299
16300         * Makefile.am: Get rid of $(ICU_LIBS).
16301
16302 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
16303
16304         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
16305         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
16306         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
16307
16308         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
16309
16310         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
16311         this function causes a SIGSEGV.
16312
16313 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
16314
16315         * mini.c: Remove unused solaris/x86 includes.
16316
16317 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
16318
16319         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
16320
16321 2006-06-20  Jb Evain  <jbevain@gmail.com>
16322
16323         * cpu-g4.md: fix max length of start_handler instruction.
16324
16325 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
16326         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
16327
16328 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
16329         * ssa.c: Fixed bug 78653 for SSA based deadce.
16330         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
16331         MonoInst.flags, used in SSA based deadce.
16332         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
16333         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
16334
16335 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
16336
16337         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
16338         it can end up using non executable memory on ppc64 systems
16339         running ppc32 userspace (fix from Johannes Berg).
16340
16341 2006-06-14  Dick Porter  <dick@ximian.com>
16342
16343         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
16344         4.1.1
16345
16346 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
16347         * mini.c: Made so that inline is locally disabled if it would
16348         trigger a .cctor, because too many apps depend on this behavior
16349         (which seems to be also the one of the MS CLR).
16350
16351 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
16352
16353         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
16354         No idea why this worked before.
16355
16356         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
16357         which branch to outer exception clauses since they could skip the
16358         inner finally clauses. Fixes #78633.
16359
16360         * exceptions.cs: Add a test for the above.
16361
16362         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
16363         Fixes #78629.
16364
16365         * iltests.il: Add a test for the above.
16366
16367 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
16368
16369         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
16370         after the end of a try bblock, to prevent asserts in mini_method_compile ().
16371
16372         * iltests.il: Add a test for the above.
16373
16374 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
16375
16376         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
16377         
16378         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
16379         methods as instrinsics.
16380
16381 2006-06-09  Wade Berrier <wberrier@novell.com>
16382
16383         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
16384         (simple-cee-ops.h ssapre-mini-ops.h)
16385
16386 2006-06-09  Neale Ferguson <neale@sinenomine.net>
16387
16388         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
16389         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
16390         instruction).
16391         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
16392         * cpu-s390x.md: Fix max. length values for a couple of instructions.
16393
16394 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
16395
16396         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
16397
16398 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
16399
16400         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
16401         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
16402         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
16403         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
16404         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
16405         of opcodes, so that bug 78549 should not happen again.
16406         * ssapre.c: Updated to use the renamed files.
16407
16408 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
16409
16410         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
16411         in OP_ATOMIC_EXCHANGE_I4.
16412
16413 2006-06-07  Wade Berrier <wberrier@novell.com>
16414
16415         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
16416         in mono_debugger_create_notification_function)
16417
16418 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
16419
16420         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
16421         
16422         * mini.c (type_from_stack_type): Disable some changes which do not
16423         seem to work.
16424
16425         * driver.c: Reenable opts.
16426
16427         * mini.h (MonoStackSlot): New structure to keep track of the verification state
16428         of the evaluation stack.
16429         
16430         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
16431         evaluation stack trace at entry to the bblock.
16432
16433         * mini.c (merge_stacks): New function to perform verification of stack merges.
16434         Turned off by default.
16435
16436         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
16437         STACK_MP.
16438         
16439 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
16440
16441         * local-propagation.c: Fixed bug 78549.
16442
16443 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
16444
16445         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
16446
16447 2006-06-02  Miguel de Icaza  <miguel@novell.com>
16448
16449         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
16450         tramp-arm.c, tramp-ia64.c
16451         (mono_debugger_create_notification_function): Update signature to
16452         new signature and use new protocol for creating the notification
16453         function.  
16454
16455         Should fix the build.
16456
16457 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
16458
16459         * exceptions-ppc.c (mono_jit_walk_stack)
16460         (ves_icall_get_frame_info): Fix the build
16461
16462 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
16463
16464         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
16465
16466 2006-05-31  Raja R Harinath  <rharinath@novell.com>
16467
16468         * il2tests.2.il: New file for generics CIL tests.  Add test for
16469         #78019.
16470         * Makefile.am: Update.
16471
16472         Fix #78019
16473         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
16474         to nullable types.
16475
16476 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
16477
16478         * aliasing.c: Fixed bug 78311.
16479
16480 2006-05-29  Martin Baulig  <martin@ximian.com>
16481
16482         * mini-exceptions.c (mono_find_jit_info): When computing the
16483         native offset, check whether we're actually inside the method's
16484         code; call mono_debug_print_stack_frame() to format the frame.
16485         (ves_icall_System_Exception_get_trace): Call
16486         mono_debug_print_stack_frame() to format the stack frame.
16487         (ves_icall_get_trace): Update to the new debugging API.
16488         (mono_jit_walk_stack_from_ctx): Likewise.
16489         (ves_icall_get_frame_info): Likewise.
16490
16491         * mini.c (get_method_from_ip): Use the new debugging API.
16492         (mono_print_method_from_ip): Likewise.
16493
16494         * exceptions-ppc.c
16495         (mono_jit_walk_stack): Use the new debugging API.
16496         (ves_icall_get_frame_info): Likewise.   
16497
16498 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
16499
16500         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
16501
16502 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
16503
16504         * mini.c: Added "limitator" to inline for debugging.
16505
16506 2006-05-24  Martin Baulig  <martin@ximian.com>
16507
16508         * debug-debugger.c (mono_debugger_init): Create a private,
16509         malloc()-based code manager for the notification function and
16510         intentionally leak it on exit.  This fixes the crash-on-exit race
16511         condition.
16512
16513         * tramp-amd64.c
16514         (mono_debugger_create_notification_function): Added
16515         `MonoCodeManager *' argument.
16516
16517         * tramp-x86.c
16518         (mono_debugger_create_notification_function): Added
16519         `MonoCodeManager *' argument.
16520
16521 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
16522
16523         * aliasing.c: Fixed 64 bit issue.
16524         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
16525         default since all known bugs are fixed (one more time!).
16526
16527 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
16528
16529         * mini.c: write barrier support.
16530
16531 2006-05-23  Martin Baulig  <martin@ximian.com>
16532
16533         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
16534         check at the top of the file.
16535
16536 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
16537
16538         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
16539         reverting changes without reason and without changelog entries.
16540
16541 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
16542
16543         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
16544         to a few opcodes. Fixes #78439.
16545
16546         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
16547         consistency with other archs.
16548
16549         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
16550
16551 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
16552
16553         * debug-debugger.c: fix the build.
16554
16555 2006-05-17  Martin Baulig  <martin@ximian.com>
16556
16557         * debug-debugger.c
16558         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
16559         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
16560         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
16561         (debugger_attach): Call GC_mono_debugger_add_all_threads().
16562
16563 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
16564
16565         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
16566
16567 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
16568
16569         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
16570         MONO_TYPE_GENERICINST.
16571         
16572         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
16573         MONO_TYPE_GENERICINST.
16574
16575 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
16576
16577         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
16578         #78325.
16579
16580 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
16581
16582         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
16583         mempool.
16584         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
16585
16586 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
16587
16588         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
16589         mono_trace_cleanup ().
16590
16591         * iltests.il: Fix problem with the newly added test.
16592
16593         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
16594         due to register constraints, free up the previous hreg. Fixes #78314.
16595
16596         * iltests.il: Add new test for #78314.  
16597
16598         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
16599         Interlocked.Add. Fixes #78312.
16600
16601         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
16602         
16603 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
16604
16605         * inssel.brg (mini_emit_virtual_call): Fix a warning.
16606
16607 2006-05-05  Martin Baulig  <martin@ximian.com>
16608
16609         * debug-mini.c (mono_debug_open_block): New method.
16610
16611         * mini-amd64.c
16612         (mono_arch_output_basic_block): Call mono_debug_open_block() at
16613         the beginning of each basic block.
16614
16615         * mini-x86.c
16616         (mono_arch_output_basic_block): Call mono_debug_open_block() at
16617         the beginning of each basic block.
16618
16619 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
16620
16621         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
16622         default until I understand why they break the build on amd64.
16623
16624 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
16625
16626         * mini.c (mini_cleanup): Call mono_cleanup ().
16627
16628         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
16629         errors.
16630
16631 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
16632
16633         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
16634         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
16635         default since all known bugs are fixed, and I cannot reproduce bug
16636         77944... I'm asking Matt Hargett to test again after this commit.
16637
16638 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
16639
16640         * mini-codegen.c: Fixed typo that thrashed inline.
16641
16642 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
16643
16644         * dominators.c (compute_dominators): Avoid using a worklist since
16645         it is not correct in some cases. Instead, iterate over all bblocks as
16646         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
16647
16648 2006-04-28  Miguel de Icaza  <miguel@novell.com>
16649
16650         * mini.c (mono_jit_compile_method_inner): Use
16651         mono_prepare_exception_from_error that resets the value
16652         internally.
16653
16654 2006-04-27  Miguel de Icaza  <miguel@novell.com>
16655
16656         * mini.c: Move the mini_loader_error_to_exception to metadata. 
16657         
16658 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
16659
16660         * aliasing.c: Fixed bug 78210.
16661
16662 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
16663
16664         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
16665         default until all their problems (or the ones they trigger) are fixed.
16666
16667 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
16668
16669         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
16670         
16671         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
16672         as loaded only after resolving patches since that could invoke the same method.
16673
16674         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
16675
16676         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
16677         functions.
16678
16679         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
16680         AOT loader.
16681
16682         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
16683         stack.
16684
16685         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
16686         made from AOT code through the PLT table.
16687
16688         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
16689         holding the plt offset when a call is made to the aot plt trampoline.
16690         
16691 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
16692
16693         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
16694         amd64 AOT support.
16695
16696         * Makefile.am (common_sources): Fix build breakage.
16697
16698         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
16699         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
16700         intra-assembly calls if possible.
16701         
16702         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
16703
16704         * mini-trampolines.c: Handle PLT entries.
16705
16706         * mini.c: Avoid creating a GOT var for calls.
16707
16708         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
16709         from mscorlib code.
16710
16711         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
16712         from mscorlib code.
16713
16714         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
16715         AOT code.       
16716
16717         * mini.h: Bump AOT file format version.
16718         
16719         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
16720         covers more cases.
16721
16722 2006-04-25  Martin Baulig  <martin@ximian.com>
16723
16724         * driver.c: Disable copyprop, consprop and inline when running
16725         inside the debugger.
16726
16727 2006-04-25  Martin Baulig  <martin@ximian.com>
16728
16729         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
16730         with `get_current_thread' and added `detach'.
16731         (MonoDebuggerMetadataInfo): Added `thread_size',
16732         `thread_tid_offset', `thread_stack_ptr_offset' and
16733         `thread_end_stack_offset'.
16734
16735 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
16736
16737         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
16738         aot-runtime.c.
16739
16740         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
16741         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
16742
16743         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
16744
16745         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
16746
16747         * aot.c: Add support for ADJUSTED_IID.  
16748
16749 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
16750
16751         * aot.c (emit_method_order): Don't align method_order_end.
16752
16753         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
16754         the interface ID changes.
16755
16756 2006-04-21  Dick Porter  <dick@ximian.com>
16757
16758         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
16759         cleaning up a thread.  Fixes the new part of bug 77470.
16760
16761 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
16762
16763         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
16764         to managed wrapper.
16765                      
16766 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
16767
16768         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
16769         
16770         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
16771         SIGSEGV. Fixes #78072.
16772
16773         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
16774         unregister our SIGABRT handler.
16775
16776 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
16777
16778         * mini.c: Disabled inline where it can alter the call stack in a
16779         way visible from managed code.
16780         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
16781         default.
16782
16783 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
16784
16785         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
16786         on other platforms. Fixes #78089.
16787
16788 2006-04-13  Martin Baulig  <martin@ximian.com>
16789
16790         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
16791         determine whether we're inside the debugger.
16792
16793         * debug-debugger.h
16794         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
16795
16796 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
16797
16798         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
16799         handler clauses. Fixes #78024.
16800
16801         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
16802         in the CALL_MEMBASE opcodes. Fixes #78088.
16803         (mono_arch_get_vcall_slot_addr): Ditto.
16804
16805 2006-04-10  Martin Baulig  <martin@ximian.com>
16806
16807         * debug-debugger.c: The thread handling code has now been moved
16808         into ../metadata/threads.c.
16809
16810 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
16811
16812         * driver.c (mono_main): Fix --with-gc=none build.
16813
16814         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
16815         (mono_spillvar_offset_float): Ditto.
16816         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
16817         hreg, not when its !global, since on ia64, there is a third category: stacked
16818         registers.      
16819
16820 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
16821
16822         * mini.c: set MonoInst->klass for load field address and a few other
16823         places.
16824
16825 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
16826
16827         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
16828
16829 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
16830
16831         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
16832         the branch opt changes.
16833
16834 2006-04-06  Dick Porter  <dick@ximian.com>
16835
16836         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
16837         
16838         * wapihandles.c (mini_wapi_seminfo): 
16839         * driver.c (mono_main): Add semaphore info option
16840
16841 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
16842
16843         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
16844         branch optimization changes. Fixes #78009.
16845
16846 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
16847
16848         * mini.c: ignore accessibility of methods in managed->native wrappers.
16849
16850 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
16851
16852         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
16853         
16854         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
16855
16856 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
16857
16858         * mini.c: Modify the branch optimizations to preserve the invariant that
16859         the entries inside the in_bb and out_bb arrays are unique.
16860         (mono_unlink_bblock): Avoid creation of new arrays.
16861
16862 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
16863
16864         * mini.c (mono_unlink_bblock): Fix regression caused by previous
16865         change (#77992).
16866
16867 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
16868
16869         * mini.c (optimize_branches): Remove the "optimizations" in
16870         the cbranch1/cbranch2 -> branch cases which were causing several
16871         problems in the past. Fixes #77986.
16872
16873 2006-03-31  Chris Toshok  <toshok@ximian.com>
16874
16875         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
16876         default optimizations :(
16877
16878 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
16879
16880         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
16881         branch.
16882
16883 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
16884
16885         * local-propagation.c: Added comments to structs and removed
16886         "Mono" prefixes from local tree mover types.
16887
16888 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
16889
16890         * Makefile.am (arch_sources): Define this for each architecture so 
16891         libmono_la_SOURCES is defined in one place.
16892
16893 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
16894
16895         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
16896         from handles/.
16897
16898 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
16899
16900         * driver.c: print the GC name supplied by configure.
16901
16902 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
16903
16904         * local-propagation.c: Added tree mover, and moved here all the
16905         local propagation code from mini.c
16906         * mini.c: Added support for treeprop, and moved all the local
16907         propagation code to local-propagation.c
16908         * mini.h: Added support for treeprop
16909         * driver.c: Added support for treeprop, enabled consprop, copyprop,
16910         treeprop, inline and deadce by default
16911         * Makefile.am: Added local-propagation.c
16912
16913 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
16914
16915         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
16916
16917 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
16918
16919         * debug-debugger.c: make it compile without the Boehm GC.
16920
16921 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
16922
16923         * mini.c: fixed issue with mismatch when an icall is registered
16924         with multiple names but same address.
16925
16926 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
16927
16928         * declsec.c, mini-exceptions.c: use write barrier to set reference
16929         fields of managed objects.
16930
16931 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
16932
16933         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
16934         (can_access_internals): Fix a warning.
16935
16936         * mini.c (print_method_from_ip): Rename this to 
16937         mono_print_method_from_ip so it gets exported.
16938
16939         * trace.c: Deal with strings inside StringBuilder's containing garbage
16940         and fix memory leaks. Fixes #77848.
16941
16942 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
16943
16944         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
16945         fixes #77787.
16946
16947 2006-03-16 Neale Ferguson <neale@sinenomine.net>
16948         
16949         * mini-s390.c: Remove OP_X86_TEST_NULL.
16950
16951 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
16952
16953         * mini.c: use the correct GetHashCode() for the moving collector.
16954
16955 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
16956
16957         * liveness.c: Regalloc spill cost tuning.
16958
16959 2006-03-15 Neale Ferguson <neale@sinenomine.net>
16960         
16961         * mini-s390x.h: Correct S390_LONG macro.
16962
16963         * mini-s390x.c: Cleanup unused code.
16964
16965 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
16966
16967         * jit-icalls.h: New file.
16968
16969         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
16970         icalls and include that instead of including jit-icalls.c.
16971
16972         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
16973         OP_X86 opcodes.
16974
16975 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
16976
16977         * mini.c: when checking for member accessibility, also check for
16978         friend assemblies and for explicit interface implementations.
16979
16980 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
16981
16982         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
16983
16984         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
16985
16986         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
16987         common cases are done first.    
16988
16989         * mini-ops.h: Only define platform specific opcodes on the given platform.
16990
16991         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
16992         branch.
16993         
16994 2006-03-14  Martin Baulig  <martin@ximian.com>
16995
16996         Revert Paolo's change from r57348:
16997
16998         * mini.h: don't use gboolean for bitfields.
16999         * mini.c: verifier changes for fields and methods accessibility.
17000
17001 2006-03-13  Neale Ferguson <neale@sinenomine.net>
17002
17003         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
17004
17005         * mini-s390x.c: Fix conv_r_un.
17006
17007         * cpu-s390, cpu-s390x.md: Fix lengths.
17008
17009 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
17010
17011         * mini.c: nested types have access to all the nesting
17012         levels, not just the enclosing types.
17013
17014 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
17015
17016         * mini.c: added a few more verification checks.
17017
17018 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
17019
17020         * liveness.c: Merge optimizations from the linear-il branch.
17021
17022 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
17023
17024         * mini-ia64.c (emit_call): Add a comment.
17025
17026         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
17027
17028         * tramp-ia64.c: Fix some warnings.
17029
17030 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
17031
17032         * mini.h: don't use gboolean for bitfields.
17033         * mini.c: verifier changes for fields and methods accessibility.
17034
17035 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
17036
17037         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
17038         lazy icall wrapper changes.
17039
17040         * dominators.c: Replace all the dominator algorithms with faster
17041         ones from the linear-il branch.
17042
17043         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
17044         the mempool.
17045
17046         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
17047         common cases are done first.
17048
17049         * mini-amd64.c: Fix some warnings.
17050
17051         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
17052         from the mempool.
17053
17054         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
17055         added code.
17056
17057         * mini.h: Add a missing prototype.
17058
17059 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
17060
17061         * mini.c: Compile icall wrappers lazily.
17062
17063         * mini-codegen.c: Use printf instead of g_print since its much faster.
17064
17065         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
17066         function.
17067
17068         * mini.c (optimize_branches): Cache the negative result from 
17069         remove_block_if_useless ().
17070
17071         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
17072         Also fix some bblock linking issues.
17073
17074         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
17075         assembly files.
17076
17077         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
17078
17079         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
17080         accessed fields first, for better cache behavior.
17081         
17082 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
17083
17084         * mini.c: speedup IList<T> array accesses.
17085
17086 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
17087
17088         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
17089         inline_costs counter. Fixes #77190.
17090
17091 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
17092
17093         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
17094         trace messages. Fixes #77706.
17095
17096 2006-03-04  Martin Baulig  <martin@ximian.com>
17097
17098         * tramp-amd64.c, tramp-x86.c
17099         (mono_debugger_create_notification_function): Use
17100         mono_global_codeman_reserve() to allocate a buffer at runtime and
17101         return it.
17102
17103         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
17104
17105         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
17106         notification function at runtime and then call `initialize' in the
17107         `MONO_DEBUGGER__debugger_info' vtable.
17108
17109 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
17110
17111         * iltests.il: Fix a visibility problem.
17112
17113 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
17114
17115         * driver.c, mini.c: add hooks for the counters API.
17116
17117 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
17118
17119         * driver.c: show disabled options.
17120
17121 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
17122
17123         * linear-scan.c: always use cost-driven selection.
17124
17125 2006-02-28  Raja R Harinath  <rharinath@novell.com>
17126
17127         * jit-icalls.c (helper_compile_generic_method): Revert change from
17128         2006-02-24.
17129
17130 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
17131
17132         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
17133
17134 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
17135
17136         * inssel.brg: style fixes, mostly to force the updated monoburg
17137         to run for people using svn.
17138
17139 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
17140
17141         * mini.c: match monoburg changes.
17142
17143 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
17144
17145         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
17146         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
17147         declaration in the header file.
17148
17149 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
17150
17151         * helpers.c: reduce relocations and mem usage.
17152
17153 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
17154
17155         * mini.h, mini-codegen.c: disable logging features if
17156         requested by configure.
17157
17158 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
17159
17160         * mini.c: tiny verifier changes.
17161
17162 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
17163
17164         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
17165         cpu-pentium.md: stack alignment changes for osx/x86,
17166         partially from Geoff Norton <gnorton@customerdna.com>.
17167
17168 2006-02-24  Raja R Harinath  <harinath@gmail.com>
17169
17170         * jit-icalls.c (helper_compile_generic_method): Update to changes
17171         in metadata/class.c.
17172
17173 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
17174         
17175         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
17176         
17177         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
17178         interface calls with large offsets.
17179
17180 2006-02-23  Raja R Harinath  <rharinath@novell.com>
17181
17182         * jit-icalls.c (helper_compile_generic_method): Document the
17183         special-case we depend on so that we can inflate the method twice
17184         with the same context with no bad side-effects.
17185
17186 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
17187
17188         * mini-x86.c, mini-amd64.c: fix for case when xen support
17189         is disabled.
17190
17191 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
17192
17193         * mini-x86.c, mini-amd64.c: generate code to access tls items
17194         in a faster way for Xen systems.
17195
17196 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
17197
17198         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
17199         updates and compilation fixes for the OSX/x86 port, mostly from
17200         Geoff Norton <gnorton@customerdna.com>.
17201
17202 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
17203
17204         * inssel.brg: faster interface call implementation
17205         to sync with the interface_offsets MonoVTable changes.
17206
17207 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
17208
17209         * mini.c: more verification checks.
17210
17211 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
17212
17213         * mini.c: added a few more verification checks.
17214
17215 2006-02-17      Neale Ferguson <neale@sinenomine.net>
17216
17217         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
17218         facility on the processor and use it if available.
17219
17220 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
17221
17222         * driver.c, aot.c, mini.c: throw exception if the IL code is
17223         invalid or unverifiable.
17224
17225 2006-02-17  Raja R Harinath  <rharinath@novell.com>
17226
17227         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
17228         m.StructField.
17229
17230 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
17231
17232         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
17233
17234 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
17235
17236         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
17237         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
17238         handling of instantiated generic valuetypes.
17239
17240 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
17241
17242         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
17243         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
17244         instead.
17245
17246         * generics.2.cs: Revert the nullable reftypes tests.
17247
17248 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
17249
17250         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
17251         using __builtin_frame_address (1) as it doesn't work in the presence
17252         of optimizations. Hopefully fixes #77273.
17253
17254         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
17255         -> generics.cs change as it doesn't work with some automake versions.
17256
17257 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
17258
17259         * mini.c: handle systems that sue a different way to
17260         retrieve the stack address of the current thread.
17261
17262 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
17263
17264         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
17265         it specially in the makefile.
17266
17267         * generics.2.cs: Add tests for nullable reference types.
17268
17269 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
17270
17271         * mini.c: always handle the case when mono_jit_init()
17272         is called in a thread different from the main thread,
17273         confusing libgc (bug #77309).
17274
17275 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
17276
17277         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
17278
17279 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
17280
17281         * mini.c: change optimize_branches () to use a single loop
17282         and introduce a new optimization to simplify some range checks.
17283
17284 2006-02-03  Martin Baulig  <martin@ximian.com>
17285
17286         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
17287         and merged with debugger_thread_manager_add_thread().
17288         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
17289         inform the debugger about the main thread.
17290
17291 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
17292
17293         * basic.cs: Add test for div.un/rem.un constant folding.
17294
17295 2006-02-03  Neale Ferguson <neale@sinenomine.net>
17296
17297         * cpu-s390x.md: correct int_xor_imm length
17298
17299 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
17300
17301         * generics.2.cs: New test for #77442.
17302
17303         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
17304         #77442.
17305
17306 2006-02-02  Martin Baulig  <martin@ximian.com>
17307
17308         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
17309         <mono/metadata/mono-debug-debugger.h>   
17310
17311         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
17312
17313 2006-02-02  Martin Baulig  <martin@ximian.com>
17314
17315         * debug-debugger.h: New header file for debug-debugger.c.
17316
17317         * debug-debugger.c: Big API cleanup; don't run the managed Main()
17318         function is a separate thread anymore; add support for attaching.
17319
17320 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
17321
17322         * tramp-x86.c: Fix a warning.
17323
17324 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
17325
17326         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
17327         on very large methods.
17328
17329         * aot.c (load_patch_info): Fix a warning.
17330
17331 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
17332
17333         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
17334         mini-ops.h: alu membase optimizations.
17335
17336 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
17337
17338         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
17339         to speedup StringBuilder.
17340
17341 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
17342
17343         * dominators.c (mono_compute_natural_loops): Fix detection of
17344         loop body start blocks.
17345
17346         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
17347
17348 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
17349
17350         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
17351         #75145.
17352
17353 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
17354
17355         * aliasing.c: Fixed aliasing issue on 64 bit archs.
17356
17357 2006-01-25  Martin Baulig  <martin@ximian.com>
17358
17359         * debug-debugger.c: Moved the `MonoDebuggerManager' and
17360         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
17361         started to cleanup this file a little bit.
17362
17363 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
17364
17365         * mini.c: optimize a codepath frequently happening in generics code.
17366
17367 2006-01-23  Martin Baulig  <martin@ximian.com>
17368
17369         * Makefile.am: Only compile debug-debugger.c on supported platforms.
17370
17371         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
17372         functions directly.
17373
17374         * driver.c: debug-debugger.c is only available if
17375         `MONO_DEBUGGER_SUPPORTED' is defined.   
17376
17377 2006-01-23  Martin Baulig  <martin@ximian.com>
17378
17379         * debug-debugger.c: Only enable this on platforms where the Mono
17380         Debugger is working (x86 and x86_64).
17381
17382 2006-01-21  Martin Baulig  <martin@ximian.com>
17383
17384         The Mono Debugger is now using the normal `mono' instead of the
17385         `mono-debugger-mini-wrapper' when executing managed code.
17386
17387         * debug-debugger.c: New file; previously known as
17388         debugger/wrapper/wrapper.c.
17389
17390         * debug-mini.c (mono_init_debugger): Removed.
17391
17392         * driver.c (mono_main): Added new `--inside-mdb' command line
17393         argument which is used when running inside the debugger.
17394
17395 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
17396
17397         * liveness.c (mono_analyze_liveness): Remove some unused data
17398         structures.
17399
17400 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
17401
17402         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
17403
17404 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
17405
17406         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
17407         depends on implementation details of monobitset.
17408
17409         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
17410         Fixes #77271.
17411
17412 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
17413
17414         * liveness.c: Update after monobitset changes.
17415
17416 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
17417
17418         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
17419
17420 2006-01-11 Neale Ferguson <neale@sinenomine.net>
17421
17422         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
17423
17424         * mini-s390x.c: Remove warning messages.
17425
17426 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
17427
17428         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
17429
17430 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
17431
17432         * generics.2.cs: Add ldelem/stelem_any test.
17433
17434 2006-01-10 Neale Ferguson <neale@sinenomine.net>
17435
17436         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
17437
17438 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
17439
17440         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
17441         
17442 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
17443
17444         * generics.2.cs: Reenable vtype tests.
17445
17446         * inssel-x86.brg: Remove an icorrect valuetype rule.
17447
17448 2006-01-06 Neale Ferguson <neale@sinenomine.net>
17449
17450         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
17451         initial support for OP_ABS.
17452
17453 2006-01-05 Neale Ferguson <neale@sinenomine.net>
17454
17455         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
17456
17457 2006-01-05 Neale Ferguson <neale@sinenomine.net>
17458
17459         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
17460         conversion and implement LADD/LSUB.
17461
17462         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
17463         architectures.
17464
17465 2006-01-05 Neale Ferguson <neale@sinenomine.net>
17466
17467         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
17468
17469         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
17470         architectures.
17471
17472 2006-01-05 Neale Ferguson <neale@sinenomine.net>
17473
17474         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
17475         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
17476         (stack walk problem).
17477
17478 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
17479
17480         * aot.c (mono_aot_load_method): Fix a warning.
17481
17482 2006-01-03  Neale Ferguson <neale@sinenomine.net>
17483
17484         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
17485
17486 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
17487
17488         * iltests.il: Add test for #77148.
17489
17490         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
17491         #77148.
17492
17493 2006-01-03  Neale Ferguson <neale@sinenomine.net>
17494
17495         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
17496
17497 2006-01-03  Neale Ferguson <neale@sinenomine.net>
17498
17499         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
17500         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
17501
17502         * basic-long.cs: Add lconv-to-r4/r8 tests.
17503
17504 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
17505
17506         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
17507
17508         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
17509         here as on other archs.
17510
17511 2005-12-29 Neale Ferguson <neale@sinenomine.net>
17512
17513         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
17514
17515 2005-12-29 Neale Ferguson <neale@sinenomine.net>
17516
17517         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
17518         
17519         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
17520
17521         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
17522         instrument_prolog; Add memory_barrier instruction.
17523
17524 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
17525
17526         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
17527
17528 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
17529
17530         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
17531
17532         * aliasing.c inssel.brg: Fix warnings.
17533
17534         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
17535         could skip initialization of some parts of memory.
17536
17537         * mini.c mini-ia64.c: Fix warnings.
17538
17539         * inssel-sparc.brg: Add an implementation of lneg which actually works.
17540
17541 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
17542
17543         * aliasing.c (mono_build_aliasing_information): Add a workaround for
17544         a crash seen on sparc.
17545
17546         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
17547         
17548         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
17549
17550 2005-12-21 Neale Ferguson <neale@sinenomine.net>
17551
17552         * mini-ops.h: Add s390_backchain instruction
17553
17554         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
17555
17556         * cpu-s390.md: Add s390_backchain instruction
17557
17558         * mini-s390.c: Significant ABI changes
17559
17560         * mini-s390.h: Cater for zero length structures
17561
17562 2005-12-20 Neale Ferguson <neale@sinenomine.net>
17563
17564         * mini-s390.c: ABI fixes
17565
17566         * inssel-s390.brg: Remove debug statements
17567
17568         * cpu-s390.md: Fix length of ATOMIC_xx operations
17569
17570 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
17571
17572         * basic-float.cs: Add float<->long conversion tests.
17573
17574 2005-12-16 Neale Ferguson <neale@sinenomine.net>
17575
17576         * mini-s390.c: Fix LOCALLOC processing.
17577
17578         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
17579
17580 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
17581
17582         * iltests.il: Add tests for some opcodes not covered by the other
17583         tests.
17584
17585 2005-12-15 Neale Ferguson <neale@sinenomine.net>
17586
17587         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
17588         register loading for Tail processing; Correct trace output.
17589
17590         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
17591
17592         * cpu-s390.md: Correct size of jmp instruction. 
17593
17594 2005-12-13 Neale Ferguson <neale@sinenomine.net>
17595
17596         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
17597
17598 2005-12-13 Neale Ferguson <neale@sinenomine.net>
17599
17600         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
17601           Bring s390 up to current level.
17602
17603 2005-12-12  Zltan Varga  <vargaz@gmail.com>
17604
17605         * generics.2.cs: Disable the newly added tests as they do not work yet.
17606         
17607         * generics.2.cs: Add valuetype tests.
17608
17609 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
17610
17611         * basic-long.cs: Add i4->u8 test.
17612
17613         * objects.cs: Add tests for JIT intrinsic.
17614
17615         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
17616         optimizations lost by a mistake.
17617
17618 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
17619
17620         * basic-long.cs: Remove a test moved to objects.cs.
17621
17622         * arrays.cs: Add more array tests.
17623
17624 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
17625
17626         * arrays.cs: Add new tests for multi-dimensional arrays.
17627
17628 2005-12-06  Raja R Harinath  <rharinath@novell.com>
17629
17630         * Makefile.am (test_sources2): Add generics.2.cs.
17631         (EXTRA_DIST): Add test_sources2.
17632
17633 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
17634
17635         Support for boxing and unboxing nullable types as well as the
17636         isinst operation on nullables, per the CLI ammendment.
17637
17638         * inssel.brg (CEE_ISINST): Special case for nullable
17639
17640         * mini.c (handle_unbox_nullable): new method
17641         (handle_box): Special case for nullable types
17642         (mono_method_to_ir): Call handle_unbox_nullable in correct
17643         places.
17644
17645         * generics.2.cs: New test suite
17646
17647         * Makefile.am: Support for regression tests with generics.
17648
17649 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
17650
17651         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
17652         allocated to registers. Fixes #76800.
17653
17654 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
17655
17656         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
17657
17658 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
17659
17660         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
17661         of platforms.
17662
17663 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
17664
17665         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
17666         objects.cs.
17667
17668         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
17669         
17670         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
17671 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
17672
17673         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
17674         single precision before storing to a single precision location.
17675
17676 2005-11-28  Raja R Harinath  <rharinath@novell.com>
17677
17678         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
17679
17680 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
17681
17682         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
17683         correct files.
17684
17685         * basic.cs: Remove test_0_byte_compares test which was moved to
17686         objects.cs a long time ago.
17687
17688 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
17689
17690         * aliasing.c: Fixed aliasing issue on 64 bit archs.
17691
17692 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
17693
17694         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
17695         handlers are called.
17696
17697         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
17698         throwing code.
17699
17700          * mini-ia64.c: Add support for the throw->branch exception 
17701         optimization.   
17702
17703         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
17704
17705 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
17706
17707         * mini.c: Enabled "fastpath" deadce :-)
17708         
17709 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
17710
17711         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
17712         alias analysis pass to support it.
17713         * mini.h: Likewise.
17714         * ssa.c: Likewise.
17715         * liveness.c: Likewise (liveness computation can use aliasing
17716         information to be more accurate).
17717         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
17718         moreover made so that "--compile-all" uses the given optimization
17719         flags and not the default ones.
17720         * aliasing.c: Alias analysis (new file).
17721         * aliasing.h: Likewise.
17722         * Makefile.am: added "aliasing.c" and "aliasing.h".
17723         
17724 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
17725
17726         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
17727         OP_L opcodes.
17728
17729 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
17730
17731         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
17732         fp >= end_of_stack exit condition, as it is not needed, and it might
17733         become true for fp eliminated frames.
17734
17735 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
17736
17737         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
17738         coded offsets.
17739
17740 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
17741
17742         * mini-arm.c: fixed alignment of doubles/longs to match
17743         the C ABI (bug #76635).
17744
17745 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
17746
17747         * aot.c: fix compilation with --enable-minimal=aot.
17748
17749 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
17750
17751         * mini-arm.c: fixed compatibility with the new
17752         floating point emulator package for compares.
17753
17754 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
17755
17756         * mini.c : reverted sig->pinvoke changes (r51396-51397).
17757
17758 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
17759
17760         * mini-exceptions.c (print_stack_frame): Output to stderr.
17761         (mono_handle_native_sigsegv): Ditto.
17762
17763 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
17764
17765         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
17766         OP_LCONV_TO_OVF_I implementation.
17767
17768         * mini-amd64.c: Add support for the throw->branch exception 
17769         optimization.
17770
17771         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
17772         when the catch clause catches a more general exception, i.e. Object.
17773
17774 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
17775
17776         * cpu-ia64.md: Remove unused opcodes.
17777
17778         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
17779         specific defines for architectures defining USE_SIGACTION.
17780
17781         * mini-ia64.c: Fix some warnings.
17782
17783         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
17784         version seemed to skip a frame.
17785
17786 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
17787
17788         * mini.c: Clean up the usage of sig->pinvoke flag. Now
17789         only calls which are made to native code use this flag.
17790
17791 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
17792
17793         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
17794         varargs methods as well.
17795         
17796         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
17797         which have save_lmf set. Reorganize methods prologs a bit.
17798
17799         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
17800         debugger to the proper place.
17801
17802 2005-10-29  Martin Baulig  <martin@ximian.com>
17803
17804         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
17805         when running inside the debugger until the debugger has support
17806         for it.
17807
17808 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
17809
17810         * mini.h: Fix a warning.
17811
17812 2005-10-24  Miguel de Icaza  <miguel@novell.com>
17813
17814         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
17815         we expose publicly, this returns the string.
17816
17817 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
17818
17819         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
17820         with fp elimination.
17821
17822 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
17823
17824         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
17825         native stacktrace using the glibc 'backtrace' function if available.
17826
17827 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
17828
17829         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
17830
17831         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
17832         handle SIGSEGVs received while in native code.
17833
17834         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
17835         code, call mono_handle_native_sigsegv which will abort the runtime
17836         after printing some diagnostics, instead of converting it into a
17837         confusing NullReferenceException.
17838
17839 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
17840
17841         * cpu-pentium.md: Remove unused opcodes.
17842
17843 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
17844
17845         * mini-amd64.h (MonoLMF): Add rsp field.
17846
17847         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
17848         the lmf too.
17849
17850 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
17851
17852         * mini-codegen.c (get_register_spilling): Fix some warnings.
17853
17854 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
17855
17856         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
17857         elimination during exception handling. Enable fp elimination by
17858         default.
17859
17860         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
17861         elimination.
17862
17863 2005-10-16  Martin Baulig  <martin@ximian.com>
17864
17865         * mini-exceptions.c
17866         (mono_debugger_run_finally): New public method for the debugger.
17867
17868 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
17869
17870         * debug-mini.c (mono_debug_init_method): Fix warning.
17871
17872         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
17873         the 'exname' parameter const to fix some warnings.
17874
17875 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
17876
17877         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
17878         introduced by the previous patch.
17879
17880 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
17881
17882         * basic-float.cs: Add test for precision of float arithmetic.
17883
17884         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
17885         when loading/storing single values from/to memory.
17886
17887         * mini.c (mono_jit_compile_method_with_opt): Create the function
17888         pointers in the correct domain.
17889
17890 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
17891
17892         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
17893         introduced by previous patch.
17894         
17895         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
17896         when out_filter_idx is NULL.
17897
17898         * mini-exceptions.c: Don't run filter clauses twice during exception
17899         handling. Fixes #75755.
17900
17901 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
17902
17903         * aot.c: Add support for ldflda wrappers.
17904
17905         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
17906         #75902.
17907
17908 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
17909
17910         * mini.c, mini.h: do not consider exception handlers blocks when
17911         setting up interface variables.
17912
17913 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
17914
17915         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
17916
17917 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
17918
17919         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
17920         causes a regression.
17921
17922         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
17923
17924 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
17925
17926         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
17927         of the OP_P definitions.
17928
17929         * TODO: Add a proposal for dealing with the CEE/OP mess.
17930
17931         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
17932         optimizations from the x86 port.
17933
17934         * cpu-amd64.md: Ditto.
17935
17936         * basic.cs basic-long.cs: Add tests.
17937
17938 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
17939
17940         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
17941         Patrik Torstensson's implementation of my exception-handling
17942         optimization idea, when the exception object is not used
17943         (bug #62150).
17944
17945 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
17946
17947         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
17948         of the mul_imm optimizations from the old jit.
17949
17950 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
17951
17952         * mini.c, liveness.c: patch by Patrik Torstensson and
17953         Zoltan Varga to improve performance in methods with
17954         exception clauses.
17955
17956 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
17957
17958         * driver.c: Remove 'Globalization' entry from --version.
17959
17960 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
17961
17962         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
17963         there is a profiler interested in JIT events.
17964
17965         * aot.c: Load profile files produced by the AOT profiling module, and
17966         reorder methods based on the profiling info. Add a 'method_order' table
17967         to the AOT file to make mono_aot_find_jit_info work with the reordered
17968         methods.
17969
17970         * mini.h: Bump AOT file version info.
17971
17972 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
17973
17974         * mini-arm.h: work around what looks like a gcc bug when optimizations
17975         are enabled.
17976
17977 2005-09-28  Raja R Harinath  <rharinath@novell.com>
17978
17979         * Makefile.am (AM_CFLAGS): Don't use += to append inside
17980         conditionals.  Use ...
17981         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
17982
17983 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
17984
17985         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
17986         to determine the amount of memory to copy when passing valuetypes.
17987
17988         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
17989         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
17990
17991 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
17992
17993         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
17994         information about aot.
17995
17996 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
17997
17998         * *.c: Replace the use of {Enter,Leave}CriticalSection with
17999         macros. This will allow a deadlock debugger to easily be plugged
18000         in.
18001
18002 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
18003
18004         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
18005
18006 2005-09-27  Raja R Harinath  <rharinath@novell.com>
18007
18008         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
18009         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
18010         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
18011         ($(arch_built)) [CROSS_COMPILING]: Error out.
18012
18013 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
18014
18015         * aot.c: Add support for the no_special_static flag for classes.
18016
18017 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
18018
18019         * Reapply reverted patches.
18020
18021         * *: Revert r50174 as well.
18022
18023         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
18024
18025 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
18026
18027         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
18028
18029 2005-09-23  Miguel de Icaza  <miguel@novell.com>
18030
18031         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
18032         part of the SIG_HANDLER_SIGNATURE.  
18033
18034 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
18035
18036         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
18037         statistics.
18038
18039         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
18040         introduced by previous patch.
18041
18042 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
18043
18044         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
18045         saved registers too.
18046
18047         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
18048         upon the information returned by get_call_info ().
18049         
18050         * mini-x86.c (add_float): Fix stack size calculation.
18051         (mono_arch_call_opcode): Rewrite this so it works based up the
18052         information returned by get_call_info ().
18053         (mono_arch_get_this_vret_args): Ditto.
18054
18055 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
18056
18057         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
18058         in cinfo to determine the registers which need to be used.
18059
18060 2005-09-20  Miguel de Icaza  <miguel@novell.com>
18061
18062         * driver.c (mono_main): Add --server and --desktop flags. 
18063
18064 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
18065
18066         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
18067         registers as global registers.
18068
18069         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
18070         longer needed with the new register allocator.
18071
18072         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
18073
18074         * cpu-ia64.md: Remove unused opcodes.
18075         
18076         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
18077         
18078 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
18079
18080         * cpu-amd64.md: Remove unused opcodes.
18081
18082         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
18083         needed with the new register allocator.
18084
18085         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
18086         reg-reg moves.
18087
18088 2005-09-16  Raja R Harinath  <rharinath@novell.com>
18089
18090         * Makefile.am (check-local): Don't invoke semdel-wrapper.
18091
18092 2005-09-16  Martin Baulig  <martin@ximian.com>
18093
18094         * exceptions-amd64.c
18095         (throw_exception): Don't call mono_debugger_throw_exception() if
18096         we're a rethrow - see the FIXME in the code.
18097
18098 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
18099
18100         * mini.c (mono_init_exceptions): This only works on some architectures.
18101         
18102 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
18103
18104         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
18105         on ia64.
18106
18107         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
18108
18109         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
18110         now in mini-exceptions.c.
18111
18112 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
18113
18114         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
18115         now in mini-exceptions.c.
18116
18117 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
18118
18119         * exceptions-x86.c: Applied patch from Patrik Torstensson 
18120         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
18121
18122         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
18123         code into mini-exceptions.c. Add some assertions to it.
18124
18125 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
18126
18127         * aot.c (emit_section_change): Applied patch from "The Software Team" 
18128         (<software@solmersa.com>). Fix as errors on windows.
18129
18130 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
18131
18132         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
18133         method info into the LMF.
18134
18135 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
18136         
18137         * mini-ia64.c: Add proper unwind info for method epilogs.
18138
18139         * exceptions-ia64.c: Add some code to help debugging.
18140         
18141         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
18142
18143         * mini-exceptions.c: Fix warning.
18144
18145 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
18146
18147         * mini.c: Really fix build.
18148
18149         * mini-x86.c mini-amd64.c: Fix build.
18150
18151 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
18152
18153         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
18154
18155         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
18156         some Interlocked methods as intrinsics.
18157
18158         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
18159         for Thread methods as well.
18160
18161         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
18162
18163         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
18164
18165         * mini-ia64.c mini-x86.c mini-amd64.c 
18166         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
18167         OP_MEMORY_BARRIER.
18168         
18169         * mini.c (mono_init_exceptions): Fix build breakage.
18170
18171 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
18172
18173         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
18174         of instructions. Use the new ia64_unw_op macros for emitting unwind
18175         info.
18176
18177         * mini.c (mono_init_exceptions): Initialize exception handling
18178         related trampolines at startup.
18179
18180 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
18181
18182         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
18183
18184 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
18185
18186         * mini.c: Handle type loading errors gracefully during compilation and
18187         throw the appropriate exception.
18188
18189 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
18190
18191         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
18192         for the mono binary.
18193
18194 2005-09-09  Martin Baulig  <martin@ximian.com>
18195
18196         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
18197         the release.
18198
18199 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
18200
18201         * mini-arm.h: use emulation for conv.r.un for the release.
18202
18203 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
18204
18205         * mini-arm.c, objects.cs: more fixes and tests for them.
18206
18207 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
18208
18209         * mini-arm.c: align structures to at least 4 bytes to be able
18210         to keep our current optimized memcpy.
18211
18212 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
18213
18214         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
18215
18216 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18217
18218         * mini.c: ignore SIGPIPE.
18219
18220 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
18221
18222         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
18223
18224         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
18225
18226 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
18227
18228         * mini.h: Add prototype for mono_allocate_stack_slots_full.
18229
18230 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
18231
18232         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
18233         exception handling support.
18234         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
18235         patch by Brian Koropoff <briank@marakicorp.com>).
18236
18237 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
18238
18239         * mini.c: revert another 'optimization' which breaks when
18240         items on the eval stack need to be saved at a basic block end
18241         (bug #75940).
18242
18243 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
18244
18245         * jit-icalls.c: for arrays, ensure we always provide
18246         lower bounds.
18247
18248 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
18249
18250         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
18251         
18252         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
18253
18254 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
18255
18256         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
18257         arguments in their original register.
18258
18259 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
18260
18261         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
18262         memset/memcpy.
18263
18264         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
18265         when ssapre is enabled.
18266
18267         * inssel-long.brg: Fix bug in previous patch.
18268
18269         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
18270         multiplication by a constant.
18271
18272 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
18273
18274         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
18275         icc.
18276
18277         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
18278         saving registers.
18279
18280 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
18281
18282         * inssel-arm.brg: apply changes tested by Brian Koropoff
18283         <briank@marakicorp.com>.
18284
18285 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
18286
18287         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
18288         
18289 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
18290
18291         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
18292         to the same register if dreg is just a base register.
18293         (print_ins): Improve printing of membase opcodes.
18294
18295         * inssel-x86.brg: Add optimized ldind(reg) rules.
18296
18297         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
18298
18299 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
18300
18301         * mini.c: when running under valgrind, set the stack bottom for
18302         the GC at the actual approximate stack for the app (fixes running
18303         mono with valgrind).
18304
18305 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
18306
18307         * mini.c: do no break at the first valuetype to init found
18308         (fixes bug #75791).
18309
18310 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
18311
18312         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
18313
18314 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
18315
18316         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
18317
18318 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
18319
18320         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
18321
18322 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
18323
18324         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
18325
18326         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
18327         code.
18328
18329         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
18330         code.
18331
18332         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
18333         methods.
18334
18335 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
18336
18337         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
18338
18339 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
18340
18341         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
18342         in the tail recursion optimization.
18343
18344         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
18345         debug info into the assembly file.
18346
18347         * iltests.il: Add test for filter regions.
18348
18349         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
18350         initial stack of filter regions. Fixes #75755.
18351
18352 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
18353
18354         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
18355         stack requirements.
18356
18357 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
18358
18359         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
18360         the check for an already compiled method on non-ia64 platforms.
18361         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
18362         proper domain.
18363
18364         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
18365
18366         * inssel-x86.brg: Add some optimized call rules.
18367
18368 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
18369
18370         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
18371         method here.
18372
18373         * mini.h mini-trampolines.c: Pass the trampoline argument to 
18374         mono_arch_patch_delegate_trampoline.
18375
18376         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
18377
18378         * mini-trampolines.c: Fix build.
18379
18380         * mini-amd64.h: Add delegate trampolines.
18381
18382         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
18383
18384         * inssel-amd64.brg: Add optimized call rules.
18385         
18386         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
18387
18388         * inssel-ia64.brg: Add optimized ldind(reg) rules.
18389
18390 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
18391
18392         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
18393         change.
18394
18395         * mini-ia64.c: Remove LMF fixmes.
18396
18397         * mini-ia64.h: Remove most fields from LMF.
18398
18399         * inssel-ia64.brg (stmt): Fix unaligned access errors.
18400
18401         * mini-trampolines.c: Add support for IA64 function descriptors.
18402
18403         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
18404         for IA64 function descriptors.
18405
18406 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
18407
18408         * tramp-arm.c: patch the vtable for virtual calls. Added
18409         support code to register/unregister the LMF.
18410         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
18411         more LMF work.
18412
18413 2005-08-19  Dick Porter  <dick@ximian.com>
18414
18415         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
18416         bit value if needed.
18417
18418 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
18419
18420         * mini.c (mini_get_method): Move handling of wrapper data here.
18421
18422         * mini.c (mono_method_to_ir): Add support for dynamic methods.
18423
18424         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
18425         virtual.
18426
18427         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
18428         bblock->code does not remain empty.
18429
18430 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
18431
18432         * arrays.cs: Add regression test for #75832.
18433
18434         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
18435         rules. Fixes #75832.
18436
18437         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
18438         instruction scheduling.
18439
18440 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
18441
18442         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
18443
18444 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
18445
18446         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
18447
18448         * mini-codegen.c: Fix VC build.
18449
18450         * cpu-pentium.md: Increase length of atomic_exhange_i4.
18451
18452 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18453
18454         * mini.h: fix signature for mono_register_opcode_emulation.
18455
18456 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
18457
18458         * mini.c: Get rid of most of the helper_sig_... constants using
18459         mono_create_icall_signature ().
18460
18461 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
18462
18463         * jit-icalls.c (helper_ldstr): New helper function.
18464
18465         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
18466
18467         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
18468         throw, load the string using a helper call instead of creating a string object.
18469
18470         * aot.c: Update after LDSTR changes.
18471
18472         * mini.h: Bump AOT file version.
18473         
18474         * aot.c: Save class size info into the AOT file. Print more statistics during
18475         compilation.
18476
18477         * mini.h: Bump AOT file version.
18478
18479         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
18480         ordering of disasm cases. Fixes #74957.
18481
18482 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
18483
18484         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
18485         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
18486         the generic code needed for the ARM port.
18487
18488 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
18489
18490         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
18491         inssel-arm.brg: more ARM features and fixes.
18492
18493 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
18494
18495         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
18496         ARM port work in progress.
18497
18498 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
18499
18500         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
18501
18502         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
18503
18504         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
18505
18506         * inssel.brg (mini_emit_memset): Add support for unaligned access.
18507
18508         * *-ia64.*: Ongoing IA64 work.
18509         
18510         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
18511
18512 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
18513
18514         * TODO: Remove out-of-data todo stuff.
18515
18516         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
18517         dead code.
18518
18519         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
18520
18521         * mini.h: Bump corlib version.
18522
18523 2005-07-27  Martin Baulig  <martin@ximian.com>
18524
18525         * mini-codegen.c
18526         (create_copy_ins): Added `const unsigned char *ip' argument; set
18527         `copy->cil_code' from it.
18528
18529 2005-07-27  Martin Baulig  <martin@ximian.com>
18530
18531         * mini-exceptions.c (mono_handle_exception): Don't call
18532         mono_debugger_handle_exception() for filters.
18533
18534 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
18535
18536         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
18537         as well.
18538
18539 2005-07-26  Martin Baulig  <martin@ximian.com>
18540
18541         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
18542
18543         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
18544         helper_compile_generic_method() if the method is actually virtual
18545         and non-final.
18546
18547 2005-07-26  Martin Baulig  <martin@ximian.com>
18548
18549         * mini.c
18550         (trampoline_code): Renamed to `mono_trampoline_code' and made it
18551         public; this is now accessed directly by the debugger.
18552         (mono_generic_trampoline_code): Removed.
18553
18554         * debug-mini.c
18555         (mono_debug_init_method): Also add interncalls and wrappers.
18556
18557 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
18558
18559         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
18560
18561 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
18562
18563         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
18564
18565 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
18566
18567         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
18568
18569 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
18570
18571         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
18572         getting TLS offsets on AMD64 too.
18573
18574 2005-07-20  Kornel Pal <kornelpal@hotmail.com>
18575
18576         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
18577
18578 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
18579
18580         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
18581         inssel-arm.brg, mini-arm.h: ARM port work in progress.
18582
18583 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
18584
18585         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
18586
18587         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
18588         to mini.c.
18589
18590         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
18591         mono_sparc_is_virtual_call ().
18592         
18593         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
18594
18595         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
18596         trampoline parameters.
18597
18598         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
18599         
18600         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
18601         to mono_arch_get_vcall_slot_addr.
18602
18603         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
18604         trampoline code.
18605
18606         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
18607
18608 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
18609
18610         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
18611
18612 2005-07-19  Martin Baulig  <martin@ximian.com>
18613
18614         * exceptions-amd64.c (throw_exception): Call
18615         mono_debugger_throw_exception() here like we're doing it on i386.
18616
18617 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
18618
18619         * mini-ia64.c: Add optimized TLS access support.
18620
18621 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
18622
18623         * mini-exceptions.c: Ongoing IA64 work.
18624
18625         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
18626
18627         * mini.c: Use the default optimization set when embedding. Fixes
18628         #75194.
18629
18630 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
18631
18632         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
18633         of trampolines to a separate file.
18634
18635         * mini-trampolines.c: New file.
18636
18637         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
18638         separate file.
18639         
18640         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
18641         amd64/ia64 code.
18642
18643         * mini-codegen.c: Fix cygwin build.
18644
18645 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
18646
18647         * mini.c: Add some minor changes needed by the IA64 port.
18648
18649         * *-ia64.*: Ongoing IA64 work.
18650
18651 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
18652
18653         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
18654         trampolines into arch-independent and arch-dependent parts.
18655
18656         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
18657
18658 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
18659
18660         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
18661
18662         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
18663         the xp-regalloc-branch for amd64.
18664
18665         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
18666         xp-regalloc-branch for x86.
18667
18668 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
18669
18670         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
18671
18672 2005-07-06  Martin Baulig  <martin@ximian.com>
18673
18674         * mini.c
18675         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
18676         (mono_jit_runtime_invoke): Likewise.
18677
18678 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
18679
18680         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
18681         on x86 too.
18682         
18683         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
18684         without loading their metadata. Reorganize the file format so exception handling+
18685         debug info is kept separate from normal method info. Create MonoJitInfo 
18686         structures for methods lazily.
18687
18688         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
18689         loading metadata.
18690         (x86_class_init_trampoline): Patch AOT class init trampolines too.
18691
18692         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
18693
18694         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
18695         in AOT code.
18696
18697         * mini.h: Bump AOT file version.
18698
18699 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
18700
18701         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
18702
18703 2005-07-01  Raja R Harinath  <rharinath@novell.com>
18704
18705         * Makefile.am (check-local): Call semdel-wrapper.
18706
18707 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
18708
18709         * mini-x86.c: Revert the last change as it seems to break the build..
18710
18711 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
18712
18713         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
18714         
18715         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
18716
18717 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
18718
18719         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
18720         outside of the macro, so strange stuff doesn't happen with gcc4
18721         (NEW_AOTCONST_TOKEN): Likewise.
18722
18723 2005-06-28  Martin Baulig  <martin@ximian.com>
18724
18725         * mini.c (mini_class_is_system_array): New static method; use this
18726         instead of `klass->parent == mono_defaults.array_class' everywhere
18727         since this also works for the new generic array class.
18728
18729 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
18730
18731         * inssel.brg: Remove warnings.
18732
18733 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
18734
18735         * mini-ia64.c: Ongoing IA64 work.
18736
18737         * basic-float.cs: Add float->i1 conversion test.
18738
18739         * iltests.il: Add conv.u4 test.
18740
18741 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
18742
18743         * inssel-long.brg: Fix bug caused by last change.
18744
18745 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
18746
18747         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
18748         BSDs.  Allows the x86 JIT to work on OSX86
18749
18750 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
18751
18752         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
18753         u4->i8 conversion.
18754
18755         * mini-ia64.c: Ongoing IA64 work.
18756
18757 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
18758
18759         * mini-ia64.c: Ongoing IA64 work.
18760
18761         * driver.c: Clean up jit_code_hash as well when using --regression.
18762
18763         * inssel-long.brg: Fix long->i4/u4 conversion rules.
18764
18765         * basic-long.cs: Add tests for long->u4 conversion.
18766
18767 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
18768
18769         * mini.c: Take mono_get_domainvar out of macros. This makes sure
18770         that we do not depend on undefined C behavior: the order stuff
18771         gets evaluated within an expression. Fixes mono when compiled on
18772         GCC 4.
18773
18774 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
18775
18776         * *-ia64.*: Ongoing IA64 work.
18777
18778         * aot.c: Lower memory usage while loading AOT methods.
18779
18780         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
18781
18782         * mini.h: Bump AOT file format version.
18783
18784 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
18785
18786         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
18787
18788 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
18789
18790         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
18791         not on callee assembly). Fixed some comments.
18792
18793 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
18794
18795         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
18796         it gets proper disassembly.
18797         (emit_method_info): Remove some dead code.
18798
18799         * mini.c (mini_method_compile): Allways allocate the GOT var in
18800         mono_method_to_ir for emulating opcodes.
18801
18802 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
18803
18804         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
18805         before freeing the code memory. Fixes #74990.
18806
18807         * objects.cs: Add regression test for #74992.
18808
18809         * liveness.c: Extend live ranges of arguments to the beginning of the
18810         method. Fixes #74992.
18811
18812         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
18813         so it points into the faulting instruction.
18814
18815 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
18816
18817         * jit-icalls.c (mono_imul_ovf): Add exception handling.
18818
18819         * *-ia64.*: Ongoing IA64 work.
18820
18821         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
18822
18823 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
18824
18825         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
18826
18827         * *-ia64.*: Ongoing IA64 work.
18828
18829 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
18830
18831         * basic-long.cs: Add tests for add/sub.ovf.
18832
18833         * basic.cs: Add tests for sub.ovf.
18834
18835         * *-ia64.*: Ongoing IA64 work.
18836
18837 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
18838
18839         * *-ia64.*: Ongoing IA64 work.
18840
18841         * basic.cs: Add conv.ovf.i4.un test.
18842
18843 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
18844
18845         * mini.c: (remove_block_if_useless) Fixed bug 75061.
18846         
18847 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18848
18849         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
18850
18851 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
18852
18853         * *-ia64.*: Ongoing IA64 work.
18854
18855 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18856
18857         * trace.[ch]:
18858         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
18859
18860 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
18861
18862         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
18863
18864 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
18865
18866         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
18867
18868         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
18869         of a call is callable by a near call.
18870
18871 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
18872
18873         * mini-ia64.c: Ongoing IA64 work.
18874
18875 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
18876
18877         * genmdesc.c: Make the generated array non-static.
18878
18879         * inssel-long.brg: Fix LSHR_IMM rule.
18880
18881         * *-ia64.*: Ongoing IA64 work.
18882
18883         * *-ia64.*: Ongoing IA64 work.
18884
18885 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
18886
18887         * *-ia64.*: Ongoing IA64 work.
18888
18889         * *-ia64.*: Ongoing IA64 work.
18890         
18891         * mini-ia64.c: Ongoing IA64 work.
18892
18893         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
18894
18895 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
18896
18897         * objects.cs basic-calls.cs: Move some tests to objects.cs.
18898         
18899         * objects.cs basic-long.cs: Move some tests to objects.cs.
18900
18901 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
18902
18903         * *-ia64.*: Ongoing IA64 work.
18904
18905         * iltests.il: Add a new test.
18906
18907         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
18908         newobj. Fixes #75042.
18909
18910 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
18911
18912         * *-ia64.*: Ongoing IA64 work.
18913         
18914         * *-ia64.*: Ongoing IA64 work.
18915         
18916         * *-ia64.*: Ongoing IA64 work.
18917
18918         * basic.cs objects.cs: Move tests accessing static variables as well.
18919
18920         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
18921
18922 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
18923
18924         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
18925
18926         * driver.c: Always print failed tests.
18927
18928         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
18929         frame pointer.
18930
18931         * *ia64*: Ongoing IA64 work.
18932
18933 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
18934
18935         * basic.cs: Add tests for add.ovf. Fix warnings.
18936
18937 2005-05-18  Miguel de Icaza  <miguel@novell.com>
18938
18939         * driver.c (mono_main): Avoid crash if no argument is passed to
18940         --break;  Do not use g_error, but f_printf.   And fix all other
18941         ocurrences of the same crash.
18942
18943 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
18944
18945         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
18946         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
18947         Fixes #74742.
18948
18949 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
18950
18951         * *-ia64.*: Add beginnings of IA64 backend.
18952
18953         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
18954
18955 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
18956
18957         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
18958         Fixes #74925.
18959
18960         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
18961
18962         * mini-amd64.c: Fix a warning.
18963
18964 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
18965
18966         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
18967         in float_neg. Fixes #74897.
18968
18969         * mini-amd64.c (emit_call): Fix another near call bug.
18970
18971 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
18972
18973         * declsec.c: Keep the appdomain information in the structure. Added a 
18974         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
18975         value gets overwritten).
18976         * declsec.h: Set the default MonoArray for the the stack to 6. Added
18977         an MonoAppDomain member to MonoSecurityFrame.
18978         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
18979         used in the stack walk. Now use a MonoArray which grow (double) when
18980         it gets full.
18981
18982 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
18983
18984         * mini.c: Re-enabled runtime cleanup, since running threads should
18985         now properly stop when exiting.
18986
18987 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
18988
18989         * mini-codegen.c: New file contaning the arch-independent local
18990         register allocator. Not used by any architectures yet.
18991
18992         * mini.h linear-scan.c: Merge some changes from the 
18993         mini-xp-local-regalloc branch.
18994
18995 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
18996
18997         * mini-amd64.c (emit_call): Fix calls to native functions when the
18998         runtime is compiled as a shared library. Fixes #74756.
18999
19000         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
19001         on a literal field. Fixes #74751.
19002
19003 2005-04-25  Raja R Harinath  <rharinath@novell.com>
19004
19005         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
19006
19007 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
19008
19009         * objects.cs: Add missing null casting test.
19010
19011 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
19012
19013         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
19014         in wrapper methods. Also rename 'address' variable to 'offset'.
19015
19016 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
19017
19018         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
19019         warnings.
19020         
19021         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
19022
19023         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
19024         work on windows.
19025
19026 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
19027
19028         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
19029
19030 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
19031
19032         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
19033         just the last bytes.
19034
19035 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
19036
19037         * aot.c (mono_compile_assembly): Fix warning.
19038
19039         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
19040         by the _MSC_VER stuff.
19041
19042 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
19043
19044         * inssel-long.brg: Fix #74588.
19045
19046         * cpu-amd64.md: Fix #74591.
19047
19048         * iltests.il: Add new regression tests.
19049
19050 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
19051
19052         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
19053         valuetype.
19054
19055 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
19056
19057         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
19058
19059         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
19060         from Bill Middleton <flashdict@gmail.com>.
19061
19062 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
19063
19064         * arrays.cs: Add new regression test. Fix warnings.
19065
19066 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
19067
19068         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
19069         and leakage in CKFINITE.
19070
19071         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
19072         this to a null op since it is called on amd64 too.
19073
19074         * exceptions-amd64.c (get_throw_trampoline): Align stack.
19075
19076         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
19077         body since this is not used on amd64.
19078         
19079         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
19080
19081         * mini-amd64.c: Remove obsolete fixmes.
19082
19083         * mini.c (print_method_from_ip): Fix debugging support.
19084
19085 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
19086
19087         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
19088         so that expressions that don't give much gain are not reduced.
19089         * ssapre.h: Likewise.
19090
19091 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
19092
19093         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
19094
19095         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
19096
19097         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
19098
19099 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
19100
19101         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
19102
19103         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
19104
19105 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
19106
19107         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
19108         stack touching.
19109
19110         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
19111
19112         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
19113
19114         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
19115
19116         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
19117         MONO_ARCH_USE_SIGACTION. Fixes #74252.
19118
19119         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
19120
19121         * mini-x86.c: Fix up stack overflow handling.   
19122
19123         * exceptions.cs: Add new regression test.
19124
19125 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
19126
19127         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
19128         mono_jit_thread_attach.
19129
19130         * mini.c (mono_method_to_ir): Verify called method is not abstract.
19131
19132 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
19133
19134         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
19135         avoid calling constructors using callvirt.
19136
19137         * inssel.brg: Fix #74073.
19138
19139 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
19140
19141         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
19142         compilation with non-GCC compilers.
19143         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
19144         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
19145
19146 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
19147
19148         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
19149         klass->interface_offsets (will likely fix bug#74073).
19150
19151 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
19152
19153         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
19154
19155 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
19156
19157         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
19158         to amd64_div_reg_size ().
19159         
19160         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
19161
19162 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
19163
19164         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
19165
19166 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
19167
19168         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
19169
19170 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
19171
19172         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
19173         
19174         * mini.c (mono_precompile_assembly): Load and precompile referenced
19175         assemblies as well. Fixes #74015.
19176
19177 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
19178
19179         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
19180
19181 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
19182
19183         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
19184         a lot of checks and (anyway) permissions cannot work until corlib is 
19185         loaded.
19186
19187 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
19188
19189         * mini-ppc.c: fixed ABI issue on sysv/ppc.
19190
19191 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
19192
19193         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
19194         calls (fixes bug#72824).
19195
19196 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
19197
19198         * mini.c: fix tail recursion elimination (see test in bug#73936).
19199
19200 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
19201
19202         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
19203         some fp functions in sse2 mode.
19204
19205 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
19206
19207         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
19208
19209 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
19210
19211         * mini.h mini.c: Add mono_get_jit_tls_key ().
19212
19213         * mini-x86.c: Enable fast TLS support on windows.
19214
19215 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
19216
19217         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
19218         * mini.c: Check for p/invoke method when generating code. If a
19219         p/invoke method, or it's class, isn't decorated with [Suppress
19220         UnmanagedCodeSecurity] then generate code to call System.Security.
19221         UnmanagedDemand (only if the security manager is active).
19222
19223 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
19224
19225         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
19226         last change as it seems to cause strange crashes.
19227         
19228 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
19229
19230         * *.c: handle unsafe function pointers where needed.
19231
19232 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
19233
19234         * mini.c (mono_jit_free_method): Remove the fixme too.
19235
19236 2005-03-15  Miguel de Icaza  <miguel@novell.com>
19237
19238         * mini.c: As discussed, make the code actually free the delegate
19239         thunk now, to enable the debugging of delegate problems, use
19240         MONO_DEBUG=1 when running Mono. 
19241
19242         This takes also care of parts of the leaks as seen by Joe.
19243
19244 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
19245
19246         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
19247         thread_tls_offset calculation.
19248
19249 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
19250
19251         * declsec.c: Reworked linkdemand checks for icall. The previous code
19252         was using the declaration code (untrusted) and didn't work as expected
19253         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
19254         specific case.
19255
19256 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
19257
19258         * iltests.il: Add new localloc test.
19259
19260         * mini-amd64.c: Handle large stack allocations the same way as on
19261         windows if stack overflow handling is working.
19262         
19263         * mini-amd64.c: Allocate the signal stack using mmap.
19264
19265         * mini.c (sigsegv_signal_handler): Fix reading of context.
19266
19267         * mini-exceptions.c: Fix up stack overflow handling.
19268
19269         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
19270
19271         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
19272
19273         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
19274
19275         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
19276
19277         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
19278         tramp_init functions as they are no longer needed.
19279
19280 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
19281
19282         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
19283         
19284         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
19285
19286         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
19287         
19288         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
19289         support that now.
19290
19291         * mini-ops.h: Add OP_LMUL_IMM.
19292
19293         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
19294         long mul/div opcodes as intrinsic.
19295
19296         * mini-amd64.c (emit_call): Handle the case when the callee might be
19297         an AOT method.
19298
19299 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
19300
19301         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
19302         extra safe.
19303         
19304         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
19305
19306         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
19307
19308 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
19309
19310         * mini.c (mono_codegen): Don't leak here, to help people running
19311         monogrind.
19312
19313 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
19314
19315         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
19316         conversions in sse2 mode.
19317
19318         * basic-float.cs: Add regression test.
19319         
19320         * mini-amd64.c: Reenable sse2.
19321
19322 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
19323
19324         * mini-amd64.c: Disable sse2 until some regressions are fixed.
19325
19326 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
19327
19328         * driver.c: Copyright text should include 2005.
19329         
19330 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
19331
19332         * cpu-amd64.md (load_membase): Fix more max lengths.
19333
19334 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
19335
19336         * cpu-amd64.md (load_membase): Fix max length.
19337
19338         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
19339
19340         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
19341
19342         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
19343         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
19344
19345         * basic-float.cs: Add rounding regression test.
19346
19347         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
19348
19349 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
19350
19351         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
19352         structures in registers for pinvoke wrappers.
19353
19354 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
19355
19356         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
19357
19358 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
19359
19360         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
19361         wrapper to mono_jit_thread_attach.
19362
19363         * mini.c (mini_jit_thread_attach): New jit icall.
19364
19365         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
19366         native->managed wrappers.
19367
19368         * exceptions.cs: Add new regression test.
19369
19370         * mini.c (optimize_branches): Check regions in the cbranch to throw
19371         block case as well. Fixes #73242.
19372
19373 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
19374
19375         * mini.c: thread safety fixes.
19376
19377 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
19378
19379         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
19380         patching stuff, since delegates use jump trampolines so there is
19381         no caller.
19382
19383         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
19384         jump trampolines.
19385         
19386         * tramp-amd64.c: Fix build.
19387
19388         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
19389         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
19390
19391         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
19392         Rename this to mono_arch....
19393         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
19394
19395         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
19396
19397         * mini-amd64.c (emit_call): If both the caller and the callee is
19398         guaranteed to have 32 bit addresses, emit a normal call.
19399
19400         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
19401
19402         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
19403         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
19404         method_ptr inside delegates.
19405
19406 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
19407
19408         * mini.c (mono_jit_free_method): Free the method info even if the native code is
19409         invalidated. Fixes #73001.
19410
19411         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
19412
19413         * mini-x86.c: Only use stdcall for pinvokes on windows.
19414
19415 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
19416
19417         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
19418         * mini-x86.c: remove unreliable __thread var offset detection,
19419         use the correct accessors and enable by default.
19420
19421 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
19422
19423         * mini.c (mono_jit_free_method): Fix memory leak.
19424
19425 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
19426
19427         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
19428
19429 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
19430
19431         * cpu-amd64.md: Fix lengths of atomic opcodes.
19432
19433 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
19434
19435         * driver.c: try to not imply using ICU is any good.
19436
19437 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
19438
19439         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
19440         functions as inline ops.
19441
19442         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
19443         some Interlocked functions as inline ops.
19444
19445         * mini.c (move_basic_block_to_end): Fix bug in last patch.
19446
19447         * mini.h (MonoBasicBlock): Reorganize fields a bit.
19448
19449         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
19450
19451         * mini.c: Add support for OP_NOT_TAKEN.
19452
19453         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
19454         structures in registers for pinvoke wrappers.
19455
19456         * mini-amd64.c: Fix warnings.
19457
19458 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
19459
19460         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
19461
19462         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
19463
19464         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
19465         address instead of loading the address from it.
19466
19467         * mini-x86.c: Add support for returning small structs in registers
19468         on Win32. Fixes part of #70864.
19469         
19470 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
19471
19472         * trace.c (get_token): Improve error checking.
19473
19474 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
19475
19476         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
19477
19478 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
19479  
19480         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
19481         it can be reused for MonoClass.
19482         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
19483         _LINKDEMAND.
19484
19485 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
19486
19487         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
19488         instead of a MonoReflectionMethod. The method information wasn't used
19489         when displaying SecurityException details (but will be now).
19490
19491 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
19492
19493         * Makefile.am : windows build fix.
19494
19495 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
19496
19497         * iltests.il: Add new regression test.
19498
19499         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
19500         #72522.
19501
19502 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
19503  
19504         * mini.c: Moved linkdemand check into helper function check_linkdemand
19505         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
19506         LDFTN, LDVIRTFTN).
19507
19508 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
19509
19510         * declsec.c: Added statistics counter for different kinds of 
19511         LinkDemands.
19512         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
19513         (and commented) declaration.
19514         * mini.c: Added statistics counter for security Demand code 
19515         generation. Added display of security statistics.
19516
19517 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
19518
19519         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
19520         Fix compilation errors under gcc-2.95.
19521
19522 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
19523
19524         * mini.c, driver.c: Use the new jit trampoline hashtable
19525
19526 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
19527
19528         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
19529
19530 2005-02-11  Martin Baulig  <martin@ximian.com>
19531
19532         * debug-mini.c (mono_debug_close_method): Free the line number array.
19533
19534 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
19535
19536         * aot.c: Break up large methods into smaller ones. Share GOT slots for
19537         icalls.
19538
19539         * mini.h: Bump AOT file format version. 
19540
19541 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
19542
19543         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
19544         APTC and P/Invoke.
19545         * declsec.h: Added macros to get/set lazyly initialized security 
19546         informations about assemblies. Added new enum for different type of
19547         possible LinkDemand violation. Added function to check LinkDemands.
19548         * mini.h: Added a field to MonoCompile to hold any security violation
19549         detected when JITting a method (so it can be thrown later).
19550         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
19551         and CEE_CALLVIRT. Added code to throw exception at the end of
19552         mini_method_compile (note: the exception is unhandled right now).
19553
19554 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
19555
19556         * mini.c, jit-icalls.c: use the managed implementation of
19557         memset for initobj and memset, to avoid managed <-> unmanaged
19558         transitions.
19559
19560 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
19561
19562         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
19563         optimization if it would need a GOT var.
19564
19565         * basic.cs: Add tests for constant propagation and switch statements.
19566
19567         * ssa.c: Fix out-of-range constant propagation and switch statements.
19568
19569 2005-02-09    <vargaz@freemail.hu>
19570
19571         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
19572
19573 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
19574
19575         * cpu-amd64.md (load_membase): Fix max length of load_membase.
19576
19577 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
19578
19579         * mini.c: update to new signature of mono_class_get_allocation_ftn().
19580
19581 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
19582
19583         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
19584         arithmetic operations.
19585
19586 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
19587
19588         * mini-ppc.c: add a workaround for broken user code that
19589         DllImports vararg functions with non-vararg signatures.
19590
19591 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
19592
19593         * mini.c (mono_jit_compile_method_inner): Add detection and a 
19594         meaningfull error message for assemblies written in Managed C++.
19595
19596         * tramp-amd64.c mini-amd64.h: Add support for 
19597         create_trampoline_from_token ().
19598
19599         * aot.c mini-x86.c abcremoval.c: Applied patch from
19600         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
19601
19602 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
19603
19604         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
19605         which takes a MonoImage/token as parameter instead of a MonoMethod.
19606
19607         * aot.c: Use the new trampoline for initializing vtables.
19608
19609         * aot.c: Add support for ldfld/stfld_remote wrappers.
19610
19611         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
19612         rules for compare <MEM>, IMM.
19613
19614         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
19615
19616         * aot.c: Handle inherited finalizers correctly.
19617
19618 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
19619
19620         * inssel.brg (stmt): Add a missing _setup_... ().
19621
19622         * aot.c: Save some parts of the class state to the AOT file and use it
19623         to recompute that state when a class is initialized.
19624
19625         * mini.c: Install AOT hooks into the runtime.
19626
19627         * mini.h: Bump AOT file format version.
19628         
19629         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
19630         Fixes #72148.
19631
19632         * iltests.il: Add new test.
19633
19634 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19635
19636         * mini.c: fix typo.
19637
19638 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
19639
19640         * mini.c: setup the statistical profiler in the thread attach
19641         callback to cope with the new single thread code.
19642
19643 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
19644
19645         * mini-ppc.c: ensure we have enough room for the profiler
19646         calls (fixed bug#72084).
19647
19648 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
19649
19650         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
19651         it.
19652
19653 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
19654
19655         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
19656
19657 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
19658
19659         * ssapre.c: Fixed an issue with down safety (this allows IronPython
19660         to succesfully execute parrotbench).
19661         * ssapre.h: Likewise.
19662
19663 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
19664
19665         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
19666         variable for stores to method arguments (fixes a SSAPRE issue).
19667
19668 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
19669
19670         * mini.c: handle value types in dup, fixes gen-112.cs.
19671
19672 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
19673
19674         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
19675         sequence for calls in dynamic methods to avoid thunks.
19676
19677 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19678
19679         * mini.c: correctly remove dynamic methods from the hashtable.
19680
19681 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
19682
19683         * driver.c: Disabled SSAPRE until fix the bug that appears
19684         in IronPython's parrotbench.
19685
19686 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
19687
19688         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
19689
19690         * mini.c (mono_method_to_ir): Revert the previous change.
19691         
19692         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
19693         when AOT compiling.
19694
19695         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
19696         mono_jit_info_table_find () etc. when running under valgrind.
19697
19698         * inssel.brg: Fix warnings.
19699
19700         * mini-exceptions.c: Fix warnings.
19701
19702 2005-01-31  Martin Baulig  <martin@ximian.com>
19703
19704         * driver.c (compile_all_methods_thread_main): Don't try to compile
19705         generic methods or anything which has type parameters.
19706
19707 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
19708
19709         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
19710
19711         * TestDriver.cs: Add --verbose flags.
19712
19713         * graph.c ssa.c: Fix 64 bit warnings.
19714         
19715         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
19716         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
19717         Fix 64 bit warnings.
19718
19719         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
19720         variable not spotted by gcc.
19721         
19722         * mini-amd64.c inssel-amd64.brg: Applied patch from  
19723         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
19724         X86_COMPARE_MEMBASE opcodes.
19725
19726         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
19727
19728 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
19729
19730         * *: MonoMethod->signature might be NULL now. You *MUST* use
19731         mono_method_signature.
19732
19733 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
19734
19735         * driver.c (compile_all_methods_thread_main): Compile the methods
19736         without invoking cctors.
19737
19738 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
19739
19740         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
19741         * basic-calls.cs: test for the above.
19742
19743 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
19744
19745         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
19746         MonoJitInfo changes.
19747
19748 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
19749
19750         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
19751         eagerly if it contains dynamic methods.
19752         
19753         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
19754
19755         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
19756         trace, it is now computed by an icall from trace_ips.
19757         
19758         * mini-exceptions.c: Fix a warning.
19759
19760 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
19761
19762         * mini-exceptions.c: don't bother getting stack trace info if
19763         it's not going to be used.
19764
19765 2005-01-27  Raja R Harinath  <rharinath@novell.com>
19766
19767         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
19768         ssapre-mini-ops.h.
19769
19770 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
19771
19772         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
19773
19774         * aot.c: Avoid calling mono_method_get_header () if not needed.
19775
19776         * mini.h: Bump AOT file format version.
19777         
19778         * mini.c (mono_emit_native_call): Allocate a GOT var here.
19779
19780         * mini.c (mono_print_tree): Print more info for calls.
19781
19782 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
19783
19784         * declsec.h: Remove warning by adding missing include for marshal.h
19785
19786 2005-01-26  Martin Baulig  <martin@ximian.com>
19787
19788         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
19789         `ip' twice.
19790
19791 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
19792
19793         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
19794         flags.
19795
19796         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
19797
19798         * aot.c (mono_compile_assembly): Fix a warning.
19799
19800 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
19801
19802         * declsec.c: Look for security attributes on the original MonoMethod 
19803         (and not the wrapped one). This fix permissions on icalls.
19804
19805 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
19806
19807         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
19808
19809         * mini.c (mono_allocate_stack_slots): Add a fixme.
19810
19811         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
19812
19813 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
19814
19815         * inssel.brg: optimize casts of sealed types (more
19816         optimizations waiting for fixes in remoting).
19817
19818 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
19819
19820         * inssel.brg (stmt): Add another dummy rule.
19821
19822         * driver.c: Fix warnings.
19823
19824         * driver.c (mono_main): If running under valgrind, instruct glib to use
19825         the system allocation functions so valgrind can track the memory
19826         allocated by the g_... functions.
19827
19828         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
19829
19830         * mini-ops.h: Add OP_DUMMY_STORE opcode.
19831
19832         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
19833
19834         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
19835         variables in try regions.
19836
19837         * mini.c (mini_method_compile): Don't disable optimizations on large
19838         methods when AOT compiling.
19839
19840         * mini.c (mono_allocate_stack_slots): New arch independent method to 
19841         allocate stack slots. Not yet used.
19842
19843 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
19844
19845         * debug-mini.c (mono_debug_close_method): Plug some leaks.
19846
19847 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
19848
19849         * mini-ppc.c: make the branch info relative as the code
19850         buffer can be reallocated.
19851
19852 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
19853
19854         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
19855         * driver.c: Removed the AOT/security restriction. Now initialize the
19856         security manager (in metadata) if --security is used.
19857         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
19858         rather than the pointer to declarative security, when AOT is used.
19859
19860 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
19861
19862         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
19863         basic blocks, reduced intrinsic exception throwing code size.
19864
19865 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
19866
19867         * driver.c (mini_usage): Reorder the usage screen.
19868
19869 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
19870
19871         * mini.c (mono_resolve_patch_target): Fix warning.
19872
19873 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
19874
19875         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
19876         previous patch.
19877
19878         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
19879
19880         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
19881         breaks the amd64 build.
19882
19883         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
19884         register allocation. Fixes #71454.
19885
19886         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
19887
19888         * arrays.cs: Add new regression test.   
19889
19890 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
19891
19892         * ssapre.c: Turned usage of snprintf to GString.
19893         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
19894         (I left it on by mistake in my previous commit).
19895
19896 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
19897
19898         * mini.c, cfold.c, basic-calls.cs: preserve side effects
19899         on cond branch optimization (fixes bug# 71515).
19900
19901 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
19902
19903         * abcremoval.c: Fixed bug 71062.
19904         * abcremoval.h: Likewise.
19905
19906 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
19907
19908         * mini.c: Added a new functionality to optimize_branches, the removal
19909         of useless basic blocks, and fixed some problem in the removal of
19910         critical edges; some utility functions added for both purposes.
19911         * ssapre.c: Added complex expression support, and fixed bug 70637.
19912         * ssapre.h: Likewise.
19913         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
19914         enabled in SSAPRE.
19915         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
19916         * driver.c: Re-enabled SSAPRE.
19917
19918 2005-01-19  Martin Baulig  <martin@ximian.com>
19919
19920         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
19921         the result of mono_get_method_constrained().
19922
19923 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
19924
19925         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
19926         manager.
19927
19928 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
19929
19930         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
19931         be detected.  Fixes #59296.
19932
19933 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
19934
19935         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
19936         which can happen. Fixes #71361.
19937
19938 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
19939
19940         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
19941         manager.
19942
19943 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
19944
19945         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
19946         appdomain-unload.exe to fail.
19947         
19948         * mini.c: Fix some memory leaks.
19949
19950 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
19951
19952         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
19953         Fixed bug and sped up some codepaths.
19954
19955 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
19956
19957         * mini.c: Fix some memory leaks.
19958
19959         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
19960         conversion.
19961
19962         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
19963
19964         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
19965         #71320.
19966
19967         * iltests.il: Add regression test for #71320.
19968
19969 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
19970
19971         * mini.c (mono_codegen): Fix installation of profiler hooks.
19972
19973         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
19974
19975 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
19976
19977         * mini.h, mini.c, cfold.c: optimize access to enum
19978         readonly fields, too. Eval conditional branches if possible
19979         to perform unreachable code removal in more cases.
19980
19981 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
19982
19983         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
19984
19985         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
19986         code manager.
19987
19988         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
19989         WinXP DEP. Fixes #71244.
19990
19991 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
19992
19993         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
19994
19995 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
19996
19997         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
19998
19999 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
20000
20001         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
20002         changes.
20003
20004         * mini.h: Bump AOT version.
20005
20006         * mini.h (MonoCompile): Change exvar to a hash table.
20007
20008         * mini.c: Allocate a separate exvar for each handler block.
20009
20010         * mini.c: Get rid of the computation of filter_lengths, its not needed.
20011
20012         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
20013         ex var with the pending exception and only throw if the two are equal.
20014         Fixes #68552.
20015         
20016         * exceptions.cs: Add tests for rethrow and nested catch clauses.
20017
20018         * mini-x86.c: Fix warnings.
20019
20020         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
20021         used by all the ports now.
20022
20023         * aot.c: Add write-symbols and save-temps options.
20024
20025 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
20026
20027         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
20028
20029 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
20030
20031         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
20032         operations.
20033
20034         * tramp-s390.c: Check vtable slot belongs to the domain.
20035
20036         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
20037         as per other platforms.
20038
20039         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
20040
20041 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
20042
20043         * driver.c: we don't run the Main() code in a subthread anymore.
20044
20045 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
20046
20047         * mini.c: added experimental rtc support in the statistical
20048         profiler: if the user has the permission, more accurate statistics
20049         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
20050         The MONO_RTC value must be restricted to what the linux rtc allows:
20051         power of two from 64 to 8192 Hz.
20052
20053 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
20054
20055         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
20056
20057 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
20058
20059         * mini-ppc.c: better icache flush for smp.
20060
20061 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
20062
20063         * mini-amd64.c (emit_move_return_value): Fix memory leak.
20064
20065         * mini-x86.c (get_call_info): Add the get_call_info () code from the
20066         amd64 port, not yet used.
20067
20068 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
20069
20070         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
20071         a struct type.
20072
20073 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
20074
20075         * driver.c: Added --security option to activate the security manager.
20076         Right now this will allow code generation for declarative demands and
20077         is disabled when AOT is specified.
20078         * mini.c: Add code generation for declarative security demands.
20079         * mini.h: Add mono_use_security_manager as an extern gboolean.
20080
20081 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
20082
20083         * aot.c (mono_compile_assembly): Speed up compilation a bit by
20084         emitting more dense assembly code.
20085
20086         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
20087         exception throwing stuff.
20088
20089 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
20090
20091         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
20092         dead code.
20093
20094         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
20095         left in by mistake.
20096
20097         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
20098         fixed.
20099
20100         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
20101
20102         * tramp-*.c: Only patch vtable slots if the object is in the current
20103         domain. Fixes appdomain-unload.exe.
20104
20105         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
20106         
20107         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
20108         x86 branch.
20109
20110 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
20111
20112         * mini.c (reverse_branch_op): New helper function.
20113
20114         * mini.c (optimize_branches): Run the new optimization only on 
20115         platforms which support it. Also reverse all kinds of branches.
20116
20117         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
20118
20119         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
20120         a throw statement.
20121
20122         * mini.c (optimize_branches): Reverse not-equals branches if the false
20123         bblock is a throw. This happens a lot of time with argument checking in
20124         corlib.
20125
20126         * mini.c (mono_codegen): Add support for placing basic blocks after
20127         the function epilogue.
20128
20129         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
20130         function epilogue.
20131         
20132 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
20133
20134         * mini.c (setup_stat_profiler): Only set this up if the platform
20135         supports ITIMER_PROF.
20136
20137 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
20138
20139         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
20140         previous patch.
20141
20142         * inssel.brg: Fix a warning.
20143
20144 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
20145
20146         * mini.c: added support for statistical profiler 
20147         (run with: --profile=default:stat).
20148
20149 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
20150
20151         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
20152
20153         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
20154
20155         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
20156         related to global registers from the amd64 port.
20157
20158 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
20159
20160         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
20161
20162         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
20163         with global registers.
20164         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
20165
20166         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
20167
20168 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
20169
20170         * debug-mini.c (encode_value): Fix off-by-one.
20171
20172         * aot.c (encode_value): Likewise.
20173
20174         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
20175
20176 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
20177
20178         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
20179         AOT.
20180
20181         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
20182         
20183         * aot.c (emit_method_info): Increase size of temp buffer.
20184
20185         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
20186         the AOT case.
20187
20188 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
20189
20190         * aot.c (emit_method_info): Fix build.
20191         
20192         * aot.c: Further rework of the AOT file format to reduce the size of
20193         the method info data.
20194
20195         * mini.h: Bump AOT file format version.
20196
20197 2004-12-27  Martin Baulig  <martin@ximian.com>
20198
20199         * mini.c (mini_get_method): New static method; call
20200         mono_get_method_full() and mono_get_inflated_method().
20201         (mono_method_to_ir): Use mini_get_method() instead of
20202         mono_get_method_full(). 
20203
20204 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
20205
20206         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
20207
20208 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
20209
20210         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
20211
20212         * inssel-amd64.brg: Add some optimization rules.
20213
20214 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
20215
20216         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
20217         standard not GC'd stuff is fine.
20218
20219 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
20220
20221         * aot.c: Rework the AOT file format to get rid of most of the global
20222         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
20223
20224         * mini.h: Bump AOT file format version.
20225         
20226 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
20227
20228         * mini.h: Bump AOT file format version.
20229
20230         * aot.c (mono_aot_is_got_entry): New function to determine if an 
20231         address is inside a GOT.
20232
20233         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
20234
20235         * cpu-pentium.md: Increase the maximum size of some instructions which
20236         might involve a got access.
20237         
20238         * mini.c (get_method_from_ip): Another debug helper function.
20239
20240         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
20241         when got var accesses are created during the decompose phase.
20242
20243         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
20244
20245         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
20246         argument mini_compile_method and to MonoCompile, and use this to
20247         determine whenever a given method is compiled for AOT. This allows the
20248         other methods compiled during AOT compilation to be free of AOT stuff,
20249         so the backends does not need to add special support for them by
20250         creating a fake GOT etc.
20251
20252         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
20253         longer needed.
20254
20255 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
20256
20257         * mini.c (mono_method_to_ir): It turns out that some of the
20258         x-appdomain wrappers are lax with types, so just ignore this for
20259         all wrappers.
20260
20261         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
20262         at the vtable->klass. If it is non-shared code we can just use the
20263         vtable.
20264
20265 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
20266
20267         * mini-ppc.c: access MonoDomain from tls, too.
20268
20269 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
20270
20271         * declsec.c: Removed unused variable (and related warning ;-)
20272
20273 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
20274
20275         * iltests.il: New test for LDELEMA on an array of ref types.
20276
20277         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
20278         all ldelema's on reftypes.
20279         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
20280         it was the wrong place to put it.
20281
20282         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
20283         register to pop to make this cleaner, at the request of Paolo.
20284
20285 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
20286
20287         * mini-ops.h (OP_GETHASHCODE): New op.
20288
20289         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
20290
20291         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
20292         operation.
20293
20294         For a microbenchmark, this reduces the cost of Hashtable.get_Item
20295         by 25%.
20296         
20297         * mini-x86.c (mono_arch_output_basic_block): Rather than
20298
20299         add ebp, 4
20300
20301         Emit
20302
20303         pop edx
20304
20305         The first is 3 bytes while the second is 1. This saves 36 kb on
20306         mscorlib, quite a big saving. When bootstraping mcs, I was able to
20307         see a small boost because of icache locality.
20308
20309         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
20310
20311 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
20312
20313         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
20314         started code sharing with the generic code.
20315
20316 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
20317
20318         * mini-ppc.c, cpu-g4.md: added code for direct access to
20319         tls data slots.
20320
20321 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
20322
20323         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
20324          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
20325         to OP_TLS_GET.
20326
20327 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
20328
20329         * declsec.c|h: Added functions to cache the declarative stack modifiers
20330         in MonoJitInfo and to create a security frame from a MonoJitInfo 
20331         structure.
20332         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
20333         created. Register internal calls for System.Security.SecurityFrame::
20334         _GetSecurityFrame and _GetSecurityStack.
20335         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
20336         the definitions for the new stack walk/callback mechanism.
20337         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
20338         first security frame for LinkDemands and InheritanceDemands) and
20339         GetSecurityStack for Demands. Both use the new mono_walk_stack code
20340         from lupus.
20341         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
20342         walk initialization (lupus).
20343
20344 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
20345
20346         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
20347         idiom.
20348         (handle_loaded_temps): Do not create a temporary variable for
20349         things that we know are temps. They will never be modified.
20350         (mono_spill_call): Set MONO_INST_IS_TEMP
20351         (mono_emulate_opcode): ditto
20352         (emit_tree): ditto
20353         (mono_method_to_ir.CEE_DUP): ditto
20354
20355 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
20356
20357         * mini.c (type_to_eval_stack_type): Make this handle the void type
20358         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
20359         (emit_tree): use ip_in_bb to special case some common idioms
20360         Update all callers to pass in the IP.
20361         (mono_method_to_ir): Make CEE_CALL* do the above as well.
20362
20363         This gives us a nice 2% speedup in mcs bootstrap.
20364
20365         * mini-x86.c (peephole_pass): Peephole pass to make
20366         mov  [foo], eax
20367         push [foo]
20368
20369         into
20370
20371         mov [foo], eax
20372         push eax
20373
20374         * mini.c (ip_in_bb): new method.
20375         (mono_method_to_ir): use this method rather than doing the hash
20376         lookup ourselves.
20377
20378         * linear-scan.c (mono_linear_scan): When expiring actives, you
20379         don't need to keep around variables that expire on this
20380         instruction. This makes it so that:
20381              a = b + 1
20382         will turn into:
20383              store (ebx add (ebx, 1))
20384         which will become
20385              add ebx, 1
20386
20387 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
20388
20389         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
20390         combination to avoid doing two copies. Fix up problems with previous
20391         patch.
20392
20393         * mini.c: Fix 64 bit warnings.
20394
20395         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
20396
20397 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
20398
20399         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
20400         changes from the x86 code.
20401
20402         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
20403
20404 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
20405
20406         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
20407         throwing code to reduce its size, unify the AOT and non-aot code and 
20408         get rid of relocations in the AOT case.
20409
20410         * mini-x86.h mini.c exceptions-x86.c 
20411         (mono_arch_get_throw_corlib_exception): New arch specific function to 
20412         raise corlib exceptions which doesn't require relocations in the 
20413         caller.
20414
20415         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
20416
20417 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
20418
20419         * mini.c (mono_emit_method_call): Only allocate the got var when it is
20420         needed.
20421
20422         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
20423         in the AOT case.
20424
20425 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
20426
20427         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
20428         with add function when used from Inc/dec atomic 
20429         functions. Re-enabled optimization on x86.
20430         * mini-ops.h: renamed atomic_add functions to
20431         allow _add to match the Interlocked::Add and
20432         _add_next to match Interlocked::Inc/Dec.
20433
20434 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
20435
20436         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
20437         linking of BBs to the end BB, and enabled SSAPRE also with
20438         consprop and copyprop (which was prevented by that bug).
20439
20440 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
20441
20442         * mini-x86.c: disabling the Interlocked optimizing code. 
20443
20444 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
20445
20446         * aot.c (load_aot_module): Move reading of got_addr after the AOT
20447         file version check.
20448         
20449 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
20450
20451         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
20452         interlocked optimization due lack of support on x86, rewrote 
20453         exchange to take into account that base may be in eax.
20454         
20455         xsp works again; activated Interlocked optimizing code.
20456         
20457 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
20458
20459         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
20460
20461 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
20462
20463         * mini-ops.h: Add new opcodes.
20464
20465         * mini.h: Add new patch types. Add got_var to MonoCompile.
20466
20467         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
20468         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
20469         make it work with all kinds of patchable code.
20470
20471         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
20472         address of the GOT, and referencing entries in the GOT.
20473
20474         * mini.c: Add code to load the GOT address if needed by an opcode.
20475
20476         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
20477         independent AOT code on the x86 using an elf-style Global Offset Table.
20478
20479 2004-12-14  Raja R Harinath  <rharinath@novell.com>
20480
20481         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
20482
20483 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20484
20485         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
20486         when running xsp.
20487
20488 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
20489
20490         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
20491         of Interlocked:Increment/Decrement/Add as inline ops.
20492         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
20493
20494 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
20495
20496         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
20497         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
20498
20499 2004-12-12  Duncan Mak  <duncan@ximian.com>
20500
20501         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
20502         again. `patch_info->table_size' is no longer valid after Zoltan's
20503         commit #37636.
20504
20505 2004-12-12  Martin Baulig  <martin@ximian.com>
20506
20507         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
20508         if we are the "real" method, ie. not an inlined method inside it.
20509
20510 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
20511
20512         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
20513         before we look in the special fields table. This fixes
20514         ../tests/thread-static-init.cs.
20515
20516 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20517
20518         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
20519         for Array get_Rank and get_Length. Fixes bug #70465.
20520
20521 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
20522
20523         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
20524         separate structure to reduce the size of MonoJumpInfo.
20525
20526 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
20527
20528         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
20529
20530 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
20531
20532         * mini.c (mini_get_inst_for_method): Changed to allow ports
20533         to return a MonoInst instead of opcode 
20534         (renamed mini_get_opcode_for_method to better reflect the new functionality)
20535         
20536         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
20537         Allow ports to return a created MonoInst instead of op-code, will enable
20538         new optimizations.
20539         (renamed mini_get_opcode_for_method to better reflected the functionality)
20540
20541 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
20542
20543         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
20544
20545 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
20546
20547         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
20548         Fixes #69985.
20549
20550 2004-12-08  Martin Baulig  <martin@ximian.com>
20551
20552         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
20553         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
20554
20555 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
20556
20557         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
20558         correctly.
20559
20560         * exceptions.cs: Disable some tests which depend on properties of x86 fp
20561         arithmetic.
20562
20563 2004-12-08  Raja R Harinath  <rharinath@novell.com>
20564
20565         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
20566
20567 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
20568
20569         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
20570         bug introduced by the previous patch.
20571
20572 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
20573
20574         * mini-ppc.c, objectc.cs: handle large structs passed by value
20575         (fixes bug #69972).
20576
20577 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
20578
20579         * mini-ppc.c: OP_ARGLIST implementation from
20580         Geoff Norton  <gnorton@customerdna.com>.
20581
20582 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
20583
20584         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
20585         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
20586
20587 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
20588
20589         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
20590
20591 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20592
20593         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
20594         support.
20595
20596 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
20597
20598         * mini-sparc.c: Zero out localled-ed memory.
20599
20600         * iltests.il: Add tests for zeroing out localloc-ed memory.
20601
20602 2004-12-04  Martin Baulig  <martin@ximian.com>
20603
20604         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
20605         mono_method_get_signature_full().       
20606
20607 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
20608
20609         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
20610         and some utility functions (always for SSAPRE), integrated SSAPRE.
20611         * mini.h: Likewise.
20612         * driver.c: Added ssapre option.
20613         * ssa.c: Small fix on OP_ARG handling.
20614         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
20615         * Makefile.am: Likewise.
20616
20617 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
20618
20619         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
20620         now in the xp code.
20621
20622         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
20623         icall.
20624
20625 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20626
20627         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
20628         
20629         * cpu-s390.md : Increase instruction length of oparglist.
20630
20631         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
20632
20633 2004-11-30  Martin Baulig  <martin@ximian.com>
20634
20635         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
20636         virtual generic methods.  We call a special helper_compile_generic_method()
20637         icall to retrieve the method from the vtable, inflate and compile
20638         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
20639
20640         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
20641
20642 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
20643
20644         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
20645
20646 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
20647
20648         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
20649         Fixes #69929.
20650
20651 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
20652
20653         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
20654         platforms with PIC aot.
20655
20656 2004-11-28  Martin Baulig  <martin@ximian.com>
20657
20658         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
20659         Fixes gen-112.cs.
20660
20661 2004-11-28  Martin Baulig  <martin@ximian.com>
20662
20663         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
20664         the result of mono_type_get_underlying_type() to check whether
20665         we're byref.
20666
20667 2004-11-26  Martin Baulig  <martin@ximian.com>
20668
20669         * mini.c
20670         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
20671         in the g_assert().
20672
20673 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
20674
20675         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
20676         the same way as the other arguments so they won't get clobbered.
20677
20678         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
20679         calls through R11 since it is clobbered by the trampoline code.
20680
20681 2004-11-26  Raja R Harinath  <rharinath@novell.com>
20682
20683         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
20684         pick up in-tree mscorlib.dll.
20685
20686 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
20687
20688         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
20689
20690         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
20691         runtime data/code are now stored in a table similar to the GOT in ELF. 
20692         This allows the code itself to be position independent.
20693
20694         * aot.c: Fix loading of referenced assemblies after the lazy assembly
20695         loading changes.
20696
20697         * aot.c: Attach ELF type (object/function) directives to all global
20698         symbols.
20699
20700         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
20701
20702         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
20703
20704         * mini-amd64.h: Turn on PIC AOT code.
20705
20706         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
20707         returning the offset within an OP_AOTCONST instruction where the GOT
20708         offset needs to be added.
20709
20710         * mini.h: Bump AOT file format version.
20711
20712 2004-11-25  Martin Baulig  <martin@ximian.com>
20713
20714         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
20715         uninflated generic methods.
20716
20717 2004-11-25  Martin Baulig  <martin@ximian.com>
20718
20719         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
20720
20721 2004-11-24  Martin Baulig  <martin@ximian.com>
20722
20723         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
20724         original klass (this only applies for generic instances).
20725
20726 2004-11-24  Martin Baulig  <martin@ximian.com>
20727
20728         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
20729         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
20730         that array).
20731
20732 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
20733
20734         * mini.c (mono_method_to_ir): Disable inlining for methods containing
20735         localloc. Fixes #69678.
20736
20737         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
20738         
20739 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
20740
20741         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
20742         used SSE registers on pinvoke calls. Fixes #69774.
20743
20744 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
20745
20746         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
20747         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
20748
20749 2004-11-23  Raja R Harinath  <rharinath@novell.com>
20750
20751         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
20752         Refer directly to the mcs/ tree.
20753
20754 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20755
20756         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
20757         Check if a trampoline for a synchronized method is required. 
20758
20759 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
20760
20761         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
20762         with localloc if needed. Throe arithmetric exception in
20763         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
20764         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
20765
20766 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
20767
20768         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
20769         types before switching on type.  Fixes #69622.
20770
20771 2004-11-19  Raja R Harinath  <rharinath@novell.com>
20772
20773         * Makefile.am (check-local): New.  Integrate into 'make check'.
20774         (MCS,RUNTIME): Define using in-tree mono and mcs.
20775         (ILASM): New.
20776         (%.exe): Use $(ILASM).
20777
20778 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
20779
20780         * mini-ppc.c: adjust initial prolog size (bug #69691).
20781
20782 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
20783
20784         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
20785         #69664.
20786
20787 2004-11-17  Raja R Harinath  <rharinath@novell.com>
20788
20789         * Makefile.am (clean-local): Rename from 'clean'.
20790
20791 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20792
20793         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
20794         to mono_arch_is_int_overflow. 
20795         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
20796         SIGFPE events.
20797
20798 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
20799
20800         * declsec.c|h: New files to support declarative security attributes.
20801         Added function to check if a method has (applicable) security.
20802         * mini.c|h: Add check for declarative security attributes in
20803         mono_method_check_inlining.
20804         * Makefile.am: Added declsec.c and declsec.h to the build.
20805
20806 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
20807
20808         * mini.c, mini.h: update to keep dynamic code info per-domain.
20809
20810 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
20811
20812         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
20813         (mini_init): Get rid of it from here too.
20814
20815 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
20816
20817         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
20818         implemented OP_RETHROW (patch by Geoff Norton
20819         <gnorton@customerdna.com>).
20820
20821 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
20822
20823         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
20824         between appdomains.  Fixes appdomain-unload on PPC.
20825
20826 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
20827
20828         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
20829         mini-exceptions.c: handle the new wrapper types.
20830         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
20831         token value as a MonoClass* when compiling a wrapper.
20832         mono_jit_create_remoting_trampoline now takes an additional
20833         MonoRemotingTarget parameter.
20834         
20835 2004-11-10  Martin Baulig  <martin@localhost>
20836
20837         * mini.c (mono_method_to_ir): Use `generic_container->context'
20838         rather than creating a new one.
20839
20840 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20841
20842         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
20843
20844         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
20845
20846 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
20847
20848         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
20849         the experimental aot cache stuff.
20850
20851 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
20852
20853         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
20854         mini-exceptions.c: update to exception clause structure changes.
20855
20856 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
20857
20858         * exceptions-x86.c (throw_exception): Fix warnings.
20859
20860         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
20861         for OP_RETHROW.
20862
20863 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
20864
20865         * exceptions-sparc.c (get_throw_exception): Really fix this.
20866
20867 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
20868
20869         * tramp-*.c: we no longer support icalls without wrappers, so
20870         a bit of code can be removed here
20871
20872 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
20873
20874         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
20875         patch.
20876
20877         * cpu-sparc.md: Add op_rethrow.
20878
20879         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
20880
20881         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
20882
20883         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
20884         * mini-ops.h: Add OP_RETHROW.
20885
20886         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
20887
20888         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
20889
20890 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
20891         
20892         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
20893         Makes the output much easier to read
20894
20895 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
20896
20897         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
20898         prevents another huge leak when compiling with ssa. Secondly, the
20899         performance of doing this rather than freeing the lists is much
20900         better. GList does a lock every time you allocate a list link,
20901         so that it can use a memory pool. So, it is better to just use
20902         a memory pool of our own.
20903         
20904         * ssa.c, linear-scan.c: replace g_list_remove_link with
20905         g_list_delete.  The remove one does not free the GList, so we were
20906         leaking memory. On -O=all --compile-all with corlib, this cut down
20907         3 MB of allocations.
20908
20909 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
20910
20911         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
20912
20913         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
20914
20915         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
20916         into a new function mono_create_jit_trampoline ().
20917
20918 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
20919
20920         * trace.c (get_spec): Allow tracing of classes without a namespace.
20921
20922 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
20923
20924         * mini.c: Fix pointer overwrite in mini_method_compile.
20925
20926 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
20927
20928         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
20929         The darwin ABI needs some special handling for 1 and 2 byte structs
20930         Lets use lbz/lhz instead of lwz everywhere.
20931         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
20932         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
20933         Use stb/sth for the former, and put the latter always on stack instead of in
20934         argument registers.
20935
20936 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
20937
20938         * trace.c (is_filenamechar): Add '_'.
20939
20940 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
20941
20942         * mini-s390.c: Fix prolog length to allow for large trace requirements.
20943
20944         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
20945
20946 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
20947
20948         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
20949         depends on libmonogc. Fixes #68805.
20950
20951 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
20952
20953         * mini.c (mono_jit_free_method): Provide extra information for
20954         this error.  Currently this leaks, but will be turned into a
20955         developer option in the future.
20956
20957 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
20958
20959         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
20960
20961 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
20962
20963         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
20964         boundary. Fixes reading of PATCH_INFO_R4 and R8.
20965         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
20966
20967 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
20968
20969         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
20970         trampolines for AOT code.
20971
20972 2004-10-22    <vargaz@freemail.hu>
20973
20974         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
20975         constructed types. Fixes #68136.
20976
20977 2004-10-21  Martin Baulig  <martin@ximian.com>
20978
20979         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
20980         if it returns true, unwind the stack to the call instruction.
20981
20982 2004-10-21    <vargaz@freemail.hu>
20983
20984         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
20985
20986         * mini.h: Bump AOT version number.
20987
20988         * objects.cs: Add another test for unbox trampolines.
20989
20990         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
20991         valuetype methods.
20992
20993 2004-10-20    <vargaz@freemail.hu>
20994
20995         * driver.c: Add SHARED to the set of optimizations tested.
20996
20997         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
20998
20999         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
21000         used by CEE_NEWARR.
21001
21002         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
21003
21004 2004-10-20  Martin Baulig  <martin@ximian.com>
21005
21006         * mini-exceptions.c (mono_handle_exception): Call
21007         mono_debugger_handle_exception() to tell the debugger about
21008         catch/finally clauses.
21009
21010 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
21011
21012         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
21013
21014         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
21015         #68447.
21016
21017 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
21018
21019         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
21020         methods as their native size, fixed bug #57543, #57545.
21021         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
21022         This saves a temporary register and mullw call down into 1 (minor perf
21023         increase for cases like sum = sum * 5;  This use to translate into:
21024             li r11,5
21025             mullw r28,r28,r11
21026         It now translates to
21027             mulli r28,r28,5
21028
21029 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
21030
21031         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
21032         #68388.
21033
21034 2004-10-11  Martin Baulig  <martin@ximian.com>
21035
21036         * mini.c (mono_method_to_ir): If we're a generic method, get the
21037         MonoGenericContainer from our MonoMethodNormal and create a
21038         MonoGenericContext from it.
21039
21040 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
21041
21042         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
21043
21044         * basic-long.cs: Add test for checked i8->i2 cast.
21045
21046 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
21047
21048         * inssel-ppc.brg: added a couple of speedup rules.
21049
21050 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
21051
21052         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
21053         to speed up rebuilds.
21054
21055 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21056
21057         * mini-s390.c: Minor fix to OP_OR_IMM.
21058
21059 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
21060
21061         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
21062         better. Fixes appdomain-unload.exe on sparc.
21063
21064 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
21065
21066         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
21067         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
21068         see bug 67324.
21069
21070 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
21071
21072         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
21073
21074 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
21075
21076         * mini.c: Always generate a field read/write wrapper for members
21077         of the class MarshalByRefObject since the actual instance could
21078         be a CBO.
21079
21080 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
21081
21082         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
21083
21084 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
21085
21086         * driver.c mini.h trace.c: Move the setting of the main assembly into
21087         a separate function called mono_trace_set_assembly () and call it after
21088         actually loading the main assembly. Fixes #66872.
21089
21090 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
21091
21092         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
21093         using the code manager.
21094
21095 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
21096
21097         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
21098
21099 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
21100
21101         * cpu-amd64.md: Fix bug in previous patch.
21102         
21103         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
21104         #66650.
21105
21106 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
21107
21108         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
21109         mini-exceptions.c: updates for changed stack walk interface.
21110
21111 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21112
21113         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
21114
21115 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
21116
21117         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
21118
21119 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
21120
21121         * driver.c (mini_regression_list): Do not call mono_assembly_close 
21122         since assemblies can't be unloaded.
21123         
21124 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
21125
21126         * cpu-amd64.md: Fix more instruction lengths.
21127
21128         * cpu-amd64.md: Fix lengths of some instructions.
21129
21130 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
21131
21132         * inssel.brg: Make the array ldelema check aot friendly.
21133
21134 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
21135
21136         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
21137
21138         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
21139
21140 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
21141
21142         * mini-x86.c: Fix build.
21143
21144         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
21145         mono_type_get_underlying_type () helper function to simplify code.
21146         
21147 2004-09-09  Martin Baulig  <martin@ximian.com>
21148
21149         * mini-amd64.c: Don't access `type->data.klass' directly, call
21150         mono_class_from_mono_type() instead since the type may be a
21151         generic instance.
21152
21153 2004-09-09  Martin Baulig  <martin@ximian.com>
21154
21155         * mini-amd64.c (get_call_info): Fix support for generic instances.
21156         (add_valuetype): Use mono_class_from_mono_type() to get the class
21157         since we can be a generic instance.
21158
21159 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
21160
21161         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
21162
21163 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
21164
21165         * liveness.c: reset spill costs on each scan: bug 62107
21166
21167 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
21168
21169         * exceptions-sparc.c (mono_arch_find_jit_info): remove
21170         unnecessary line that doesn't compile
21171
21172 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
21173
21174         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
21175         trampolines, make them call an error function so people can fix their
21176         code.
21177
21178 2004-09-06  Martin Baulig  <martin@ximian.com>
21179
21180         * mini.c (mono_method_to_ir): When initializing locals, handle a
21181         generic instances like a valuetype if it's a valuetype and like a
21182         class if it's a class.
21183
21184 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
21185
21186         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
21187         stack. Fixes #64674.
21188
21189         * exceptions.cs: Add test for unwinding of call arguments.
21190
21191 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
21192
21193         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
21194         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
21195         set the carry/borrow flag). The sparc and s390 implementations
21196         can now use optimized versions (and simplify the code). ppc bugfixes.
21197
21198 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
21199
21200         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
21201
21202 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
21203
21204         * inssel-amd64.brg: Remove leftover 32 bit rule.
21205
21206         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
21207
21208 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
21209
21210         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
21211         mono_arch_find_jit_info functions into a new function. Fix a memory
21212         leak.
21213
21214         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
21215         refactored code.
21216         
21217 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
21218
21219         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
21220         as well.
21221         
21222         * exceptions.cs: Add array size tests.
21223
21224         * mini.c: Allocate a separate icall wrapper for each arity of 
21225         mono_array_new_va. Fixes #59509.
21226
21227         * exceptions.cs: Add testcase for 64578.
21228
21229         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
21230
21231         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
21232         
21233 2004-09-02  Martin Baulig  <martin@ximian.com>
21234
21235         * mini.c (mono_method_to_ir): When initializing the locals, call
21236         handle_initobj() on the generic instance itself, not its
21237         underlying type.
21238
21239 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
21240
21241         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
21242         MonoJitInfo for dynamic methods.
21243
21244         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
21245
21246         * mini.c: Add support for freeing JIT data for dynamic methods.
21247         
21248 2004-09-01  Martin Baulig  <martin@ximian.com>
21249
21250         * mini-x86.c (is_regsize_var): Added support for generic
21251         instances.
21252         (mono_arch_emit_prolog): Make this compile again, use
21253         `x86_push_imm_template (code)'.
21254
21255 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
21256
21257         * mini-x86.c: make all push_imm instructions that get
21258         patched always emit the long form
21259
21260 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
21261
21262         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
21263         in a per-domain hash.
21264
21265         * mini-amd64.c (merge_argument_class_from_type): Handle generic
21266         types.
21267
21268 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
21269
21270         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
21271         work.
21272         
21273         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
21274         work.
21275
21276         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
21277         Beginnings of SSE2 support.
21278
21279         * exceptions.cs: Add more tests for checked int<->uint casts.
21280
21281 2004-08-28  Martin Baulig  <martin@ximian.com>
21282
21283         * mini-x86.c (mono_arch_instrument_epilog): Added support for
21284         generic instances.
21285
21286         * mini.c
21287         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
21288         Handle generic instances recursively.
21289
21290 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
21291
21292         * iltests.il: test for conv.u8 on a constant
21293
21294 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
21295
21296         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
21297         LCONV_x4 (shrun_32 (membase)).
21298
21299 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
21300
21301         * inssel-x86.brg: c&p rules for push/setret of long
21302
21303 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
21304
21305         * inssel-x86.brg: c&p rules for compare (base, regvar) and
21306         compare (regvar, base)
21307
21308         * inssel-x86.brg: more burg love
21309
21310         * inssel.brg: more cleanup
21311
21312         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
21313
21314 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
21315
21316         * basic-long.cs, basic-calls.cs: new tests for optimization.
21317
21318 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
21319
21320         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
21321         patch.
21322
21323 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
21324
21325         * mini-amd64.c (read_tls_offset_from_method): Add another case.
21326         
21327 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
21328
21329         * inssel.brg (mini_emit_memcpy): use 
21330         NO_UNALIGNED_ACCESS to disable memcpy optimization
21331
21332 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
21333
21334         * mini-amd64.c: Handle generic types in various places.
21335
21336         * mini.c (mono_method_to_ir): Handle generic types in init locals.
21337
21338 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
21339
21340         * mini.c (handle_box): Fix warning.
21341
21342         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
21343
21344         * mini-amd64.h: Enable the emit_state optimization.
21345
21346         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
21347
21348         * mini-amd64.c: Add some new 64 bit peephole opts.
21349
21350         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
21351
21352         * cpu-amd64.md: sreg1 of div instructions must be %rax.
21353
21354         * mini-amd64.c: Register allocator fixes.
21355
21356         * mini.c: Add an optimization to emit_state to avoid allocation of new
21357         registers on some platforms.
21358
21359 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
21360
21361         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
21362
21363         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
21364         allocation. Fixes #63085.
21365
21366         * basic-long.cs: Add new regression test.
21367
21368         * mini-amd64.c: Register allocator improvements.
21369
21370 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
21371
21372         * mini-amd64.c (read_tls_offset_from_method): Add another code
21373         sequence.
21374
21375         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
21376         instruction sequence for nullifying class init trampolines.
21377
21378         * objects.cs: Add new regalloc test.
21379
21380         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
21381
21382 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
21383
21384         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
21385         
21386         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
21387         arguments.
21388
21389         * driver.c: Fix profiling after TLS changes.
21390         
21391         * driver.c (mono_main): Set mono_stats.enabled if needed.
21392
21393         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
21394         CEE_BOX.
21395
21396 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
21397
21398         * mini-x86.c: use a 1 op rather than a 2 op tls access
21399         instruction -> faster.
21400
21401 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
21402
21403         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
21404         x86 backend.
21405
21406 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
21407
21408         * exceptions-sparc.c (throw_exception): fix typo
21409
21410 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
21411
21412         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
21413         set tree->dreg correctly with tls. Allow any
21414         register to be used.
21415
21416         * mini-x86.c (read_tls_offset_from_method): add new code
21417         generation pattern seen with GCC.
21418
21419
21420 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
21421
21422         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
21423         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
21424         exceptions-sparc.c: fix some performance issues in exception
21425         handling and setting of the stack trace for exceptions that were
21426         already thrown.
21427
21428 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
21429
21430         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
21431         x86 backend.
21432         
21433         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
21434         registers.
21435
21436 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
21437
21438         This patch inlines tls access, when possible.
21439         
21440         * mini.h: new arch functions for TLS intrinsics.
21441         All platforms updated with a stub.
21442
21443         * mini.c: use the new intrinsics
21444
21445         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
21446         arch specific intrinsic for tls variables
21447
21448 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
21449
21450         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
21451         under windows.
21452
21453 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
21454
21455         * mini.c: thread local allocation
21456
21457 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
21458
21459         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
21460
21461         * Makefile.am: Link against the static version of libmonogc.
21462         
21463         * Makefile.am: Link the static versions of the convenience libraries
21464         into the mono executable.
21465
21466         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
21467
21468 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
21469
21470         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
21471         on integer overflow.
21472
21473         * mini-amd64.c: Reorganize function call code.
21474
21475         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
21476
21477 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
21478
21479         * inssel-x86.brg: use xor eax,eax.
21480         
21481         * basic.cs: new tests
21482
21483 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
21484
21485         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
21486         in exception throwing code.
21487         
21488 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
21489
21490         * inssel-x86.brg: use xor esi,esi.
21491
21492 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
21493
21494         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
21495         can trace methods compiled during mini_init () too.
21496
21497         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
21498         CEE_CONV_U4.
21499
21500 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
21501
21502         * Makefile.am: static link on x86 (r=zoltan)
21503
21504 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
21505
21506         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
21507         code since it causes some programs to fail.
21508
21509 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
21510
21511         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
21512
21513 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
21514
21515         * mini.c: ovfops_op_map - add STACK_OBJ case for
21516         CONV_I 
21517         * basic.cs: add test_0_pin_string as test
21518         case for above.
21519
21520 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
21521
21522         * Makefile.am: build C# if srcdir != builddir
21523
21524 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
21525
21526         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
21527         fall-through blocks.
21528
21529 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
21530
21531         * driver.c: enable loop by default again and include abcrem in -O=all.
21532
21533 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
21534
21535         * iltests.il: Add some localloc tests.
21536
21537         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
21538
21539         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
21540         Fixes #62574.
21541
21542         * inssel-amd64.brg: Add some optimizations.
21543
21544         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
21545         for gcc-3.4.
21546
21547         * Makefile.am: Statically link mono against libmono on AMD64.
21548         
21549         * mini-amd64.c inssel-amd64.brg: Optimizations.
21550
21551 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
21552
21553         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
21554
21555         * tramp-amd64.c: Patch calling code in trampolines.
21556
21557 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
21558
21559         * mini-amd64.c: pinvoke struct passing fixes.
21560
21561 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
21562
21563         * mini-sparc.c: redo change, make mono_arch_cpu_init call
21564         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
21565
21566 2004-08-05  Duncan Mak  <duncan@ximian.com>
21567
21568         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
21569         CEE_LDELEM_ANY.
21570
21571 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
21572
21573         * mini-amd64.c (emit_move_return_value): Move return value for normal
21574         calls too.
21575
21576 2004-08-05  Martin Baulig  <martin@ximian.com>
21577
21578         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
21579         `type->type'; just modify `type' itself when dealing with enums
21580         and generic instances.
21581         (check_call_signature): Make `simple_type' a `MonoType *'.
21582
21583 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
21584
21585         * mini.c: Use OP_PADD to add offsets to addresses.
21586
21587         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
21588
21589 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
21590
21591         * mini-sparc.c (mono_arch_emit_epilog): fix check
21592         for folding last op into restore instruction
21593
21594 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
21595
21596         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
21597         helper methods using the code manager.
21598         
21599         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
21600
21601         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
21602
21603 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21604         
21605         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
21606           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
21607
21608         * mini-s390.c: fix tail processing
21609
21610 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
21611
21612         * mini-ppc.c: mul.ovf.un exception name fix.
21613
21614 2004-08-03  Martin Baulig  <martin@ximian.com>
21615
21616         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
21617         instances; before jumping to `handle_enum', also modify `ptype'.
21618
21619 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
21620
21621         * cpu-sparc.md: fcall maximal length too small.
21622
21623 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
21624
21625         * mini-amd64.c mini.h: Add initial support for passing/returning 
21626         structures to/from pinvoked methods.
21627
21628 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
21629
21630         * mini-ppc.c: reg allocator fix.
21631
21632 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
21633
21634         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
21635
21636         * inssel.brg: Optimize memset on 64 bit machines.
21637
21638         * mini-amd64.c: Fix some vararg cases.
21639
21640 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21641
21642         * mini-s390.c: Corrected macro in emit_float_to_int
21643
21644         * s390-abi.cs: Tests to exercise the s390 ABI
21645
21646 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
21647
21648         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
21649         caller saved regs.
21650
21651         * basic.cs: Add a test for add.ovf.un.
21652
21653 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
21654
21655         * mini-sparc.c: add case for OP_IDIV_UN
21656
21657 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
21658
21659         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
21660         
21661         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
21662
21663 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
21664
21665         * basic.cs: regression tests.
21666
21667         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
21668         regressions.
21669
21670 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
21671
21672         * basic.cs: Add a new test.
21673
21674         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
21675         and AOT. Various fixes and optimizations.
21676
21677         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
21678
21679 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
21680
21681         * mini-ppc.c: make sure temp regs are not used for global reg
21682         allocation.
21683
21684 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
21685
21686         * cpu-sparc.md: conv_i8 fix for 64bits
21687
21688         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
21689
21690 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
21691         
21692         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
21693         add opcode for cmp BYTE PTR [eax], imm.
21694
21695         * inssel.brg: Make memcpy and memset takes bases.
21696
21697 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
21698
21699         * *-amd64.*: More AMD64 work.
21700         
21701 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
21702
21703         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
21704         add a compare-not-equal opcode.
21705         
21706 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
21707
21708         * mini.c: Use mono_init_from_assembly instead of mono_init.
21709         
21710 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
21711
21712         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
21713
21714         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
21715
21716         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
21717
21718         * inssel.brg: 64 bit fixes.
21719
21720         * mini.h (MonoCallInst): Add some AMD64 specific data.
21721
21722         * mini.h: Add some OP_P opcodes.
21723
21724 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
21725
21726         * basic.cs: tests for 61797 and 61740
21727
21728 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
21729
21730         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
21731         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
21732
21733 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
21734
21735         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
21736
21737         * *-amd64*.*: Ongoing AMD64 work.
21738
21739 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
21740
21741         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
21742
21743         * *-amd64*: Ongoing AMD64 work.
21744
21745         * mini-arch.h: Add AMD64 support.
21746
21747         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
21748
21749         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
21750
21751         * mini-ops.h: Add new opcodes.
21752
21753         * Makefile.am: Add AMD64 support.
21754
21755         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
21756         rules into the inssel-long*.brg files.
21757
21758         * *-amd64.*: Add beginnings of AMD64 backend.
21759
21760 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
21761
21762         * mini.c (print_dfn): commenting out the code that prints
21763         the cil. With -O=deadce, this makes -v -v crash.
21764         
21765         * cpu-pentium.md: make checkthis have a length of 2
21766
21767 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
21768
21769         * mini-sparc.h: fix implementations of __builtin
21770         functions for Sun compiler for V9.
21771
21772 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
21773
21774         * mini.c: use the new stelem.ref wrapper
21775         * exceptions.cs, arrays.cs: new stelem.ref tests
21776
21777 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
21778
21779         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
21780         new XSP should work with these changes).
21781
21782 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
21783         
21784         * inssel-{long32,x86,}.brg: trivial optimizations.
21785         
21786 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
21787
21788         * mini.c: load value when emitting box operation in
21789         constrained calls.
21790
21791 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
21792
21793         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
21794         is one byte shorter than cmp DWORD PTR [eax], 0.
21795
21796 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
21797
21798         * inssel-ppc.brg: arguments on the stack are always
21799         relative to the stack pointer (spotted by Neale Ferguson).
21800
21801 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21802
21803         * exceptions-x86.c: delay appending the method name to the trace until
21804         after mono_jit_info_table_find is called, as this gets the real
21805         MonoMethod.
21806
21807 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
21808
21809         * aot.c: register roots
21810
21811 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
21812
21813         * aot.c : I could just use PLATFORM_WIN32 flag.
21814
21815 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
21816
21817         * aot.c : Reverting the previous fix. This time it broke linux build.
21818
21819 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
21820
21821         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
21822
21823 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
21824
21825         * mini.c (handle_stack_args): Remove some more debugging code.
21826         
21827         * mini.c (handle_stack_args): Remove debug output left in by mistake.
21828
21829         * driver.c mini.h aot.c: Allow additional options to be specified with
21830         --aot and pass them to mono_compile_assembly.
21831
21832         * aot.c: Add experimental code to AOT compile all loaded assemblies
21833         on demand and save the code into a cache in the filesystem.
21834
21835         * aot.c: Add support for more wrapper methods.
21836         
21837         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
21838         58863.
21839
21840         * cpu-*.md: Remove removed opcodes.
21841
21842         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
21843         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
21844         related icalls to marshal.c.
21845
21846 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
21847
21848         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
21849
21850         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
21851
21852         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
21853
21854 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
21855         * liveness.c: If liveness is recomputated we need to reset the information
21856         for each variable. This way, if the liveness range has been narrowed
21857         by optimizations that happened after the last computation, we can return
21858         a smaller range.
21859         
21860         For example, if you have
21861         
21862         {
21863                 int i = 0;
21864                 
21865                 // Tons of code that does not affect i
21866                 
21867                 i = foo ();
21868                 ...
21869         }
21870         
21871         i = 0 is dead code and will be removed by SSA. However, when
21872         linear scan gets to the code, i will still appear to be live
21873         throughout the entire block. This prevents good register allocation.
21874
21875 2004-07-06  Martin Baulig  <martin@ximian.com>
21876
21877         * debug-mini.c (mono_debug_init_method): Allow
21878         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
21879         (mono_debug_add_icall_wrapper): New method.
21880
21881         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
21882
21883 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
21884
21885         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
21886         optimization.
21887
21888 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
21889
21890         * aot.c (mono_aot_load_method): Fix loading of debug info.
21891
21892 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
21893
21894         * aot.c: Add logging support.
21895
21896 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
21897
21898         * mini.h: Add prototype for mono_print_method_from_ip.
21899
21900         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
21901
21902         * inssel.brg: 64 bit fixes.
21903
21904         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
21905         inssel-long32.brg.
21906
21907         * Makefile.am: Add SPARC64 support.
21908
21909 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
21910
21911         * aot.c: Fix alignment problems on 32 bit platforms.
21912
21913 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
21914
21915         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
21916         SPARC64.
21917
21918         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
21919         problems.
21920
21921         * mini.h: Bump AOT file version. Some 64 bit fixes.
21922
21923 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
21924
21925         * inssel-sparc.brg: Add new rule to avoid register moves.
21926
21927         * inssel.brg: Add ldind_to_load_membase helper function.
21928
21929 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
21930
21931         * mini.c: OffsetToStringData intrinsic.
21932         
21933 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
21934
21935         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
21936
21937         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
21938         regression tests.
21939
21940         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
21941 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
21942
21943         * mini.c: reinstated mono_compile_get_interface_var()
21944         on x86, too, since the change breaks the Gtk# build there as well.
21945
21946 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
21947
21948         * driver.c: remove loop from the default optimizations: it seems to
21949         interact badly with some of the other options (see bug #60613).
21950
21951 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
21952
21953         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
21954         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
21955
21956 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
21957
21958         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
21959         vararg-using methods.
21960
21961 2004-06-21  Martin Baulig  <martin@ximian.com>
21962
21963         * mini/mini-exceptions.c
21964         (mono_handle_exception): Added `gpointer original_ip' argument.
21965         After calling mono_unhandled_exception(), call
21966         mono_debugger_unhandled_exception() and if that returns true,
21967         restore the context and return.
21968
21969 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
21970
21971         * mini-ppc.c: prefer the use of relative branches so
21972         they won't need to be patched in aot code (patch from Patrick Beard).
21973
21974 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
21975
21976         * aot.c: patch from Patrick Beard to make the output assembly
21977         more correct for the MacOSX assembler. Small tweak to
21978         generate sane images on Linux/PPC, too.
21979
21980 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
21981
21982         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
21983         case until bug #59509 is fixed (shows up in #60332).
21984
21985 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
21986
21987         * mini.c: make sure the needed wrappers are compiled, too, with
21988         precomp.
21989
21990 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
21991
21992         * driver.c: remove NPTL reference in --version output.
21993
21994 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
21995
21996         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
21997         generate valid assembly for the Mach-O assembler.
21998
21999 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
22000
22001         * driver.c: don't include abcrem in the all optimization specifier
22002         since it slows down jit compilation too much for now.
22003
22004 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
22005
22006         * mini.c: use BIGMUL only if both operands have the same signage.
22007         * iltests.il: Test for bug 60056. (errors related to signage in
22008         BIGMUL).
22009
22010         r=lupus.
22011
22012 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
22013
22014         * mini.c, aot.c: memory leak fixes.
22015
22016 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
22017
22018         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
22019
22020 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
22021
22022         * Makefile.am: remove the -static hack completely, it links in
22023         statically glib as well.
22024
22025 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
22026
22027         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
22028         * exceptions.cs: make it compile with new mcs/csc.
22029
22030 2004-06-03 Massimiliano Mantione <massi@ximian.com>
22031         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
22032         and added relevant test case.
22033
22034 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
22035
22036         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
22037         regressions in gtk-sharp.
22038
22039 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
22040
22041         * exceptions.cs: New regression tests.
22042
22043         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
22044
22045 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
22046
22047         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
22048
22049 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
22050
22051         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
22052
22053         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
22054
22055 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
22056
22057         * mini.c (mono_jit_runtime_invoke): Init class in this
22058         method instead of trusting mono_jit_compile_method to
22059         do the work (because wrappers can be in object class)
22060
22061 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
22062
22063         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
22064
22065         * basic-long.cs: New regression test.
22066
22067 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
22068
22069         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
22070         and div/rem checks.
22071
22072 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
22073
22074         * Makefile.am: fix miguel's change to build mono statically against
22075         libmono (track build dependencies).
22076
22077 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
22078
22079         * cfold.c: Some glib versions do not have G_MININT32.
22080
22081 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
22082
22083         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
22084         with precision of tan, atan, sin and cos, and implemented related
22085         regressions tests (fixes bug 54467, but one new problem appeared and
22086         is not fixed yet).
22087
22088 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
22089
22090         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
22091
22092         * exceptions.cs: Add test for constant folding && division by zero.
22093
22094         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
22095         since driver.c is in libmono too, so the optimization was useless.
22096
22097         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
22098         variable to driver.c so the compiler can emit more efficient code to
22099         access them.
22100
22101 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22102
22103         * Makefile.am: don't distribute generated inssel.[ch] files.
22104
22105 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
22106
22107         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
22108         into the default appdomain. Fixes #58707.
22109
22110         * jit-icalls.c: Remove the broken approximation for truncl, doing
22111         no conversion is better.
22112
22113         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
22114         Fixes #58863.
22115
22116 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
22117
22118         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
22119         of the mcrxr instruction which is not available on some processors
22120         even if it's documented to be. Implement add and sub overflow correctly
22121         (still not complete for long unsigned). Speed up icalls a bit.
22122
22123 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
22124
22125         * mini.c (mono_jit_compile_method_with_opt): Make sure that
22126         we run .cctor in the current domain instead of target_domain.
22127         
22128         Fixes bug #58558, .cctor not being called in -O=shared.
22129
22130 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
22131
22132         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
22133
22134 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
22135
22136         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
22137         which can be done with an imm8, do it that way.
22138         (mono_arch_output_basic_block): ditto for a jmp
22139         (mono_arch_emit_prolog): Computate maximum offset of a label.
22140
22141 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
22142
22143         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
22144         now tries to allocate prefered physical reg's for virtual
22145         regs. This reduces the number of emited spills/loads with
22146         20-30% on our core assemblies.
22147
22148 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
22149
22150         * jit-icalls.c: truncl() is not needed and trunc() is
22151         the correct thing to do anyway (bug #58287).
22152
22153 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
22154
22155         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
22156         if available.
22157
22158 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
22159
22160         * driver.c: enable loop optimizations by default.
22161
22162 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
22163
22164         * mini-x86.c: fix calc of max loop size when aligning loops start.
22165
22166 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
22167
22168         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
22169         the stack.
22170
22171 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
22172
22173         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
22174         should set carry.
22175
22176         * basic-long.cs: Add tests for add/subtract of immediates with carry.
22177
22178         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
22179         
22180         * mini.c (inline_method): Allways inline some wrappers even if the cost
22181         is too large. Fixes #58785.
22182
22183         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
22184         
22185 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
22186
22187         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
22188         (crichton@gimp.org). Beginning of support for sparc/linux.
22189
22190         * mini-sparc.c: Optimize retrieval of LMF address.
22191
22192 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
22193
22194         * exceptions-ppc.c:  handle alloca in methods with clauses.
22195
22196 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
22197
22198         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
22199
22200 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
22201
22202         * mini.c: Delegate most of the abort signal work to 
22203           mono_thread_request_interruption, which also handles Stop and Suspend
22204           states.
22205
22206 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
22207
22208         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
22209         supports the save/restore lmf opcodes.
22210
22211 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
22212
22213         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
22214         by gcc-3.4 as well.
22215
22216         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
22217
22218 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
22219
22220         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
22221         methods which contain array accesses.
22222
22223         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
22224         boundaries. Fixes #58537.
22225
22226         * iltests.il: Add regression test for #58537.
22227
22228 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
22229
22230         * mini-x86.c (mono_arch_local_regalloc): Last part of
22231         fix for bug #58633 (releasing register to early).
22232
22233 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
22234
22235         * basic-long.cs: Add new regression test.
22236
22237 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
22238
22239         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
22240         register too early on the chain.
22241
22242 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
22243
22244         * mini.c (create_helper_signature): Use a helper function to reduce
22245         the code which needs to be written. Also set the calling convention of
22246         icalls on windows. Fixes #57840.
22247
22248 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
22249
22250         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
22251         exceptions-ppc.c: added helper function to get the instruction address
22252         from a signal handler context.
22253
22254 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
22255
22256         * helpers.c: use g_get_tmp_dir. Invokes happyness 
22257         from gonzalo.
22258
22259 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
22260
22261         * helpers.c: Add new env variable to pass args to objdump.
22262         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
22263
22264 2004-05-17  Radek Doulik  <rodo@ximian.com>
22265
22266         * Makefile.am (common_sources): added abcremoval.h so it get
22267         disted and daily mono packages on go-mono.com will build again
22268
22269 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
22270
22271         * abcremoval.c: Fixed coding style, added copyright header.
22272
22273         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
22274
22275         * mini.h: Added prototype for abc removal main function.
22276
22277         * build_relations_propagation_table.pl: Added copyright header.
22278
22279 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
22280
22281         * basic-long.cs: reg test for complex ceq_long bug.
22282
22283 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
22284
22285         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
22286         reg in long and clob case (bug #58343). Fixed/added comments.
22287
22288 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
22289
22290         * mini.c (mono_jit_runtime_invoke): Follow new convention
22291         of calling the invoke method with an function pointer.
22292
22293 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
22294
22295         * ChangeLog: Fix author of memory leak patch.
22296
22297 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
22298
22299         * Makefile.am: fix make dist as well...
22300
22301
22302 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
22303
22304         * cfold.c: Made so that conversions from pointer to int4 are no-ops
22305         on archs where pointers are 4 bytes long.
22306
22307         * Makefile.am: Added abcremoval.c source file.
22308
22309         * abcremoval.c: Added abcremoval.c.
22310
22311         * abcremoval.h: Added abcremoval.h.
22312
22313         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
22314
22315         * inssel.brg: Enabled bounds check removal.
22316
22317         * mini.c: Added support for abcrem optimization.
22318
22319         * mini.h: Added abcrem optimization label.
22320
22321         * driver.c: Added support for abcrem optimization.
22322
22323         * propagated_relations_table.def: Added propagated_relations_table.def.
22324
22325 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
22326
22327         * mini.c, cfold.c: fix style.
22328
22329 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
22330
22331         * mini.c: handle issue with the low-level implementation of
22332         some long opcodes (bug #54209).
22333
22334 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
22335
22336         * basic.cs: test for my new cmov stuff.
22337
22338 2004-05-13      Patrik Torstensson
22339
22340         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
22341         opt and added peephole documentation.
22342
22343 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
22344
22345         * tramp-ppc.c: rewrote the generic trampoline code.
22346
22347 2004-05-11      Patrik Torstensson
22348
22349         * mini-x86.c: optimize long shl/shr asm code (one less branch)
22350
22351 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
22352
22353         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
22354
22355         * mini.h mini.c dominators.c: Applied patch from Derek Woo
22356         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
22357
22358         * mini.c: Add new icalls for AsAny marshalling.
22359
22360 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
22361
22362         * tramp-ppc.c, mini-ppc.c: more cleanups.
22363
22364 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22365
22366         * mini.c: no warnings.
22367
22368 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22369
22370         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
22371
22372 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
22373
22374         * mini.c: In the thread abort signal handler, if the thread is in the
22375         process of being stoped, don't throw the Abort exception, just stop the
22376         thread.
22377
22378 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
22379
22380         * tramp-ppc.c: removed old code.
22381
22382 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22383
22384         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
22385         do some simple speed optimizations on ppc.
22386
22387 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
22388
22389         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
22390         and large offsets in load/store.
22391
22392 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
22393
22394         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
22395         it causes regressions.
22396
22397 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
22398
22399         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
22400         support.
22401
22402 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
22403
22404         * jit-icalls.c: remove warnings.
22405         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
22406         speedups for unsafe code.
22407
22408 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
22409
22410         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
22411
22412 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
22413
22414         * basic-calls.cs: Add new regression test.
22415
22416         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
22417         more portable.
22418
22419         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
22420
22421         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
22422         is no longer used.
22423
22424 2004-05-06      Patrik Torstensson
22425
22426         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
22427         long reg allocation in any reg (not only eax:edx) and implemented 
22428         long shl/shr ops in asm instead of helpers.
22429
22430 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
22431
22432         * mini-sparc.h: Fix warnings.
22433
22434         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
22435         stack.
22436
22437         * mini-exceptions.c (mono_handle_exception): Call the filter in a
22438         separate statement for clarity.
22439
22440         * mini-sparc.c: Update status.
22441
22442 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
22443
22444         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
22445         here.
22446
22447 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
22448
22449         * inssel-ppc.brg: another small pre-release workaround:
22450         we don't do overflow detection for long_sub_un.
22451
22452 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
22453
22454         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
22455         (also works around a weird ppc bug: 57957).
22456
22457 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
22458
22459         * tramp-ppc.c: trampoline fixes.
22460
22461 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
22462
22463         * mini-ppc.c: fixed typos.
22464
22465 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
22466
22467         * mini-ppc.c, exceptions-ppc.c: more code saves registers
22468         at the top of the stack. Fixed typos. Use a frame registers
22469         for all the methods with exception clauses.
22470
22471 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
22472
22473         * exceptions-ppc.c: restore fp registers.
22474
22475 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
22476
22477         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
22478         order from the stack top (moved the stack room to save the
22479         return value for trace after the param area). Fixed corruption
22480         in restoring registers on unwind.
22481
22482 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
22483
22484         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
22485
22486 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
22487
22488         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
22489         and prolog/epilog for methods that use it. Allow
22490         enough param area room for varargs methods. Fix miguel's
22491         breakage in exception handling.
22492
22493 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
22494
22495         * Makefile.am: run genmdesc only on current arch.
22496
22497 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22498
22499         * exceptions-x86.c:
22500         * mini-x86.h: fix the build on windows.
22501
22502 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
22503
22504         * 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.
22505
22506         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
22507
22508         * mini-exceptions.c: New file.
22509         
22510         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
22511         Move some parts of the x86 exception handling code to an 
22512         arch-independent file so it can be shared with other ports.
22513
22514 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
22515
22516         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
22517
22518 2004-04-26  David Waite  <mass@akuma.org>
22519
22520         * driver.c: remove comma from end of enumeration declaration
22521
22522 2004-04-26  Jackson Harper  <jackson@ximian.com>
22523
22524         * driver.c: parse config file before loading first assembly. This
22525         allows the user gac to be enabled/disabled. 
22526         
22527 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
22528
22529         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
22530         simpler mechanism: we do not care what is encoded initially
22531         (branch absolute or relative), we care about the code and its
22532         target.  I kept the old code for reference for now.
22533
22534         The new code tries first to determine if the jump is anywhere in
22535         the -/+32 absolute meg range, if it succeeds, it encodes using the
22536         absolute branch;  If not, it tried to find something in the
22537         relative range, if not, it uses the handle_thunk code. 
22538
22539 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
22540
22541         * exceptions-ppc.c: use the correct ip register on macosx.
22542
22543 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
22544
22545         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
22546
22547 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
22548
22549         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
22550         Raise exception on integer divide by zero by hand since the hw
22551         doesn't support it. Handle NaNs in FP compares.
22552
22553 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
22554
22555         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
22556         code reducing duplication between the platforms and enabled
22557         signal exception handling (on linux for now).
22558
22559 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
22560
22561         * exceptions-ppc.c: more macosx support.
22562
22563 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22564
22565         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
22566
22567 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
22568
22569         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
22570
22571 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
22572
22573         * iltests.il: more tests.
22574
22575 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
22576
22577         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
22578         vars as well.
22579
22580 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
22581
22582         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
22583
22584 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
22585
22586         * liveness.c: Mark variables as volatile in all basic blocks reachable
22587         from exception clauses.
22588
22589 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
22590
22591         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
22592         inlining.
22593
22594 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
22595
22596         * iltests.il, basic.cs: more tests for regalloc.
22597
22598 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
22599
22600         * iltests.il: Some tests for register allocation modifications
22601         I have locally.
22602
22603 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
22604
22605         * exceptions.cs: Add regression test for bug #56782.
22606
22607         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
22608         original stack trace if an exception is rethrown. Fixes #56782. Oh,
22609         the beauty of fixing the same thing in 5 different files...
22610
22611 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
22612
22613         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
22614         methods.
22615
22616 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
22617
22618         * mini.c: Add support for STRWLPARRAY marshalling convention.
22619
22620 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
22621
22622         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
22623         to init the context to setup the regs pointer).
22624
22625 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
22626
22627         * exceptions-ppc.c: more exceptions work.
22628
22629 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
22630
22631         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
22632         not allowed.
22633
22634 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
22635
22636         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
22637         can use the memory directly.
22638
22639         * cpu-pentium.md: Update documentation from a post from Zoltan. 
22640
22641         add x86_add_membase, x86_sub_membase, x86_mul_membase
22642
22643 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
22644
22645         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
22646         GENERAL_REGS they were also hardcoded for all PPC ports.
22647
22648         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
22649
22650         Remove hard-coded limit for floating point registers, use
22651         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
22652
22653         Notice that in MacOS X calling conventions you can fit a lot more
22654         floating point values in registers, so I should update the PInvoke
22655         test to excercise the passing of floating point values on the
22656         stack (currently broken).
22657         
22658 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
22659
22660         * tramp-ppc.c (create_trampoline_code): Added
22661         JUMP_TRAMPOLINE_SIZE. 
22662         (ppc_magic_trampoline): Follow the pattern from
22663         x86_magic_trampoline: if code is set to zero, return. 
22664         (create_trampoline_code): Always pass MonoMethod to the jump
22665         trampoline, before it was passing a null.
22666         (mono_arch_create_jump_trampoline): Implement the jump stub, could
22667         share the code with mono_arch_create_jit_trampoline. 
22668
22669         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
22670         implemented.
22671         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
22672         implemented.  
22673
22674         * cpu-g4.md: Added length for jmp instruction, the worst case
22675         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
22676         for save_lmf).
22677
22678 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
22679
22680         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
22681
22682 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
22683
22684         * mini.c: Only set bblock->real_offset when adding a new bblock, and
22685         before each IL instruction.
22686
22687         * mini.c (CEE_BOX): Fix warnings.
22688
22689 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22690
22691         * mini.c: removed a few unused vars and extra whitespace.
22692
22693 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
22694
22695         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
22696         checks.
22697         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
22698         index.
22699         (OP_GETCHR): use the above
22700         (CEE_LDELEMA): use the above.
22701
22702         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
22703         version of the generic impl.
22704         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
22705         (CEE_LDELEMA): use the above.
22706
22707 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
22708
22709         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
22710         Fixes #56317.
22711
22712         * iltests.il: Added new regression test for #56317.
22713
22714 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
22715
22716         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
22717         under NetBSD. Fixes #56450.
22718
22719         * liveness.c (update_gen_kill_set): Fix previous patch.
22720
22721 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22722
22723         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
22724
22725 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
22726
22727         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
22728         ldsfld and ldsflda.
22729
22730         * inssel-sparc.brg: Add more optimizations.
22731
22732         * mini-sparc.c: Replace multiply/divide with shifts if possible.
22733
22734 2004-04-01  Martin Baulig  <martin@ximian.com>
22735
22736         * mini.c (handle_box): New static function; moved the
22737         implementation of CEE_BOX here.
22738         (mono_method_to_ir): Added `constrained_call' variable.
22739         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
22740         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
22741         mono_method_get_constrained() to get the method.
22742
22743 2004-04-01  Martin Baulig  <martin@ximian.com>
22744
22745         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
22746         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
22747         (mono_method_to_ir): We don't need these macros anymore since
22748         mono_class_get_full() already takes care of it. 
22749
22750 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22751
22752         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
22753         use @function (as doesn't accept #function here) and check the return
22754         value of system and stop if fails.
22755
22756 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22757
22758         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
22759
22760 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
22761
22762         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
22763
22764         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
22765
22766         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
22767         #56223.
22768
22769         * basic-long.cs: Add test for negation of Int64.MinValue.
22770
22771 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
22772
22773         * mini-sparc.c: Update status.
22774
22775         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
22776
22777         * exceptions-sparc.c: Fix return value in filters.
22778
22779         * inssel-sparc.brg: Fix register allocation in some rules.
22780
22781 2004-03-28  Martin Baulig  <martin@ximian.com>
22782
22783         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
22784         if neccessary.  
22785
22786 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
22787
22788         * mini-x86.c (mono_arch_patch_code): Fix warnings.
22789         
22790         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
22791         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
22792         remove unused conv_u4 opcode.
22793
22794         * mini-x86.c: Remove valgrind workaround since it slows down things
22795         even when mono is not run under valgrind.
22796
22797 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
22798
22799         * mini-sparc.c: Update status.
22800
22801         * inssel-sparc.brg: Add some optimizations.
22802
22803         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
22804         future delay slot filling. Add support for varargs, tail calls and JMP.
22805
22806         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
22807         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
22808
22809         * inssel.brg: Fix register allocation in OP_ARGLIST.
22810
22811         * inssel.brg: Fix warnings.
22812
22813 2004-03-25  Martin Baulig  <martin@ximian.com>
22814
22815         * mini.c (inflate_generic_field): Removed.
22816         (mini_get_method): Removed, use mono_get_method_full(),
22817         (mini_get_class): Removed, use mono_class_get_full().
22818         (mono_method_to_ir): Pass our generic context to
22819         mono_field_from_token().        
22820
22821 2004-03-25  Martin Baulig  <martin@ximian.com>
22822
22823         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
22824         of a `MonoMethod *'.
22825         (mini_get_method): Take a `MonoGenericContext *' instead
22826         of a `MonoMethod *'.
22827         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
22828         a new local variable called `generic_context' which holds the
22829         current `MonoGenericContext *'; use it to lookup things.
22830
22831 2004-03-24  Martin Baulig  <martin@ximian.com>
22832
22833         * mini.c (mini_get_class): New static method; if we're inside a
22834         generic instance, inflate the class if neccessary.
22835         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
22836
22837 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
22838
22839         * iltests.il: New regression test for #55976.
22840
22841         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
22842         #55976.
22843
22844 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
22845
22846         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
22847         output.
22848
22849 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
22850
22851         * liveness.c: Consider SSA stores as well as loads when making vars
22852         volatile.
22853
22854         * exceptions.cs: New regression tests for register allocation.
22855         
22856 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
22857
22858         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
22859         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
22860           domain lock only to protect puntual access to data structures.
22861           Added access lock for sighash, jit_icall_hash_name, 
22862           jit_icall_hash_addr and domain->code_mp.
22863
22864 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
22865
22866         * driver.c: Print SIGSEGV handling method.
22867
22868         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
22869
22870         * mini.c (setup_jit_tls_data): Handle case when this is called
22871         multiple times for a thread.
22872
22873         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
22874         is different from fbxx_un. Fixes #54303. Also use constants instead of
22875         magic numbers in a lot of places.
22876
22877 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
22878
22879         * exceptions.cs: Fix cctor test when --regression is used.
22880
22881 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
22882
22883         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
22884         for Linux/ppc.
22885
22886 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
22887
22888         * inssel-ppc.brg: fixed register assignments for some rules.
22889
22890 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
22891
22892         * exceptions.cs: Add test for exceptions in static constructors.
22893
22894         * mini.c (mono_jit_compile_method_with_out): Move the calling of
22895         static constructors outside the domain lock. Fixes #55720.
22896
22897 2004-03-17  Martin Baulig  <martin@ximian.com>
22898
22899         * mini.c (get_generic_field_inst): Removed, this'll never happen.
22900         (inflate_generic_field): Take the `MonoMethod *' instead of the
22901         `MonoClass *' and added support for generic method.
22902         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
22903         have a `field->parent->gen_params', only inflate the field if it's
22904         an open constructed type.
22905
22906 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
22907
22908         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
22909         exception object instead of the preconstructed ones.
22910
22911 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22912
22913         * mini.c: reverted changed to sigsegv_signal_handler commited
22914         accidentally in the previous patch.
22915
22916 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22917
22918         * mini.c:
22919         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
22920         running --aot with an old assembly.
22921
22922 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
22923
22924         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
22925         point values.
22926
22927         * mini-sparc.c: Add support for v9 branches with prediction.
22928
22929 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
22930
22931         * mini.c (mini_init): #warning is GNUC only
22932
22933         * mini-sparc.h: implement __builtin_frame_address
22934         and __builtin_return_address for Sun C compiler
22935
22936 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
22937
22938         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
22939
22940 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
22941
22942         * basic-calls.cs: Add test for unaligned byref long argument passing.
22943
22944         * mini-ops.h: Add sparcv9 compare and branch instructions.
22945
22946         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
22947         v9 instructions if we have a v9 cpu.
22948
22949         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
22950         registers for global allocation.
22951
22952         * exceptions-sparc.c: Fixes.
22953         
22954 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
22955
22956         * liveness.c (mono_analyze_liveness): Optimized version.
22957
22958         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
22959
22960         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
22961         sparc work.
22962
22963         * basic-float.cs basic-calls.cs: New regression tests.
22964
22965 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
22966
22967         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
22968         sigaltstack implementation.
22969
22970         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
22971         
22972         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
22973         stuff if SIGSEGV_ON_ALTSTACK is not defined.
22974
22975 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
22976
22977         * mini.c: Fix warnings.
22978         
22979         * mini.c (mono_resolve_patch_target): New function which contains the
22980         arch independent part of the patching process.
22981
22982         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
22983         patching code to a separate function.
22984
22985 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
22986
22987         * mini.c (add_signal_handler): ifdef out on Windows
22988
22989 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
22990
22991         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
22992         cpu-sparc.md: Add exception handling support + other fixes.
22993
22994         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
22995         typed GC detection in --version.
22996
22997         * basic.cs exceptions.cs: New regression tests.
22998
22999         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
23000         the arch specific code can store data during a compilation.
23001
23002         * mini-ops.h: Add OP_SETFRET.
23003
23004         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
23005         function, register a separate icall for each arity, so the icalls can
23006         get a wrapper.
23007         
23008         * mini.c (mono_print_tree): Print negative offsets in a more readable
23009         form.
23010         
23011         * mini.c: Make signal handling work on sparc.
23012         
23013         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
23014
23015         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
23016
23017         * jit-icalls.c: Emulate truncl by aintl on solaris.
23018
23019         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
23020
23021 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
23022
23023         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
23024
23025 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
23026
23027         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
23028         a MarshalByRef type, inline a method that performs the check, taking into
23029         account that the object can be a proxy. Also implemented tow new opcodes:
23030         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
23031         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
23032         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
23033
23034 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
23035
23036         * mini-ppc.c: if a relative branch displacement is too big
23037         but it points to and area reachable with an absolute branch, 
23038         avoid the thunks.
23039
23040 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
23041
23042         * mini.c: optimize small copies in cpblk.
23043
23044 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
23045
23046         * basic-calls.cs basic-float.cs: New regression tests.
23047
23048         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
23049         negative offsets from %fp. Implement localloc. Fix local register 
23050         allocation. Fix the case when the this argument needs to be saved to
23051         the stack. Implement some missing opcodes.
23052
23053 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
23054
23055         * mini.c (mini_method_compile): Reenable global regalloc in methods
23056         with exception handlers.
23057
23058         * linear-scan.c (mono_varlist_sort): Fix warning.
23059
23060         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
23061
23062         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
23063         regalloc costs.
23064
23065         * liveness.c: Make all variables uses in exception clauses volatile, to
23066         prevent them from being allocated to registers. Fixes #42136.
23067
23068 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
23069
23070         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
23071         causes regressions.
23072
23073         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
23074         argument to mono_arch_regalloc_cost.
23075
23076         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
23077         precisely.
23078
23079 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
23080
23081         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
23082         Make the cost of allocating a variable to a register arch dependent.
23083
23084         * basic-calls.cs: Fix compilation of tests.
23085         
23086         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
23087         helper function to cut back on the number of #ifdefs needed.
23088
23089         * mini-ppc.c: Fix compilation.
23090
23091         * basic-calls.cs: New regression tests.
23092
23093         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
23094
23095         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
23096         of l0 since that is callee saved.
23097
23098         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
23099         to virtual calls.
23100
23101         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
23102         of delay instruction.
23103
23104         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
23105
23106         * mini.h (MonoCallInst): Add 'virtual' flag.
23107
23108         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
23109
23110 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
23111
23112         * *.cs: New regression tests.
23113
23114         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
23115         work.
23116
23117         * mini.c (mono_runtime_install_handlers): Fix build.
23118
23119         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
23120         'signal_stack_size' members.
23121
23122         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
23123         alternate signal stack.
23124
23125         * exceptions-x86.c: Add stack overflow handling.
23126
23127         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
23128         functions to arch independent code.
23129
23130         * mini.c (mono_print_tree): Print more detailed info for load_membase
23131         opcodes.
23132         
23133 2004-02-23  Martin Baulig  <martin@ximian.com>
23134
23135         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
23136
23137 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
23138
23139         * mini-x86.c: fixed reg allocation for div/rem.
23140
23141 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
23142
23143         * driver.c (mono_main): Report some configuratio options on --version.
23144
23145 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
23146
23147         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
23148         low in the address space. Correctly flush memory in thunks where we
23149         output native code.
23150
23151 2004-02-20  Martin Baulig  <martin@ximian.com>
23152
23153         * mini.c (mini_get_method): New static method; inflate all generic
23154         methods and methods in open generic instances.
23155         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
23156         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
23157
23158 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
23159
23160         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
23161
23162         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
23163
23164 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
23165
23166         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
23167
23168         * mini-sparc.c (flushi mono_arch_output_basic_block): make
23169         it compile using Sun's compiler.
23170
23171 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
23172
23173         * 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.
23174
23175         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
23176
23177 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
23178
23179         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
23180         code.
23181         * mini-ppc.c: handle calls outside of the allowed range with thunks
23182         allocated using the code manager.
23183         * tramp-ppc.c: use the code manager to hold generated native code.
23184         Fixed the magic trampoline to just patch vtable entries.
23185
23186 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
23187
23188         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
23189         independent file.
23190
23191 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
23192
23193         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
23194         PPC.
23195
23196         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
23197         if we have a working __thread implementation.
23198
23199         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
23200         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
23201
23202 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
23203
23204         * mini-x86.c: Fix compilation under gcc 2.
23205         
23206 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
23207
23208         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
23209         contains a call to the wrapped function.
23210
23211         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
23212         OP_<CALL>_IMM opcodes, and use them under X86.
23213         
23214         * mini.c (mono_jit_find_compiled_method): Fix warning.
23215
23216         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
23217
23218         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
23219
23220         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
23221         functionality to mini.c.
23222
23223         * mini.c (mono_create_jump_trampoline): New function to create a jump
23224         trampoline. Return a compiled method instead of a trampoline if it
23225         exists. Add a cache for jump trampolines.
23226
23227         * mini.c (mono_jit_find_compiled_method): New function to return a
23228         compiled method if it exists.
23229
23230         * mini-x86.c: Call mono_create_jump_trampoline instead of 
23231         mono_arch_create_jit_trampoline.
23232
23233         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
23234         a jump trampoline. Fixes #52092.
23235         
23236 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
23237
23238         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
23239         which is not up-to-date. Add check_corlib_version () instead.
23240
23241         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
23242         have to call it.
23243         
23244         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
23245         since newer valgrind versions do not need it.
23246
23247         * mini.c (mono_jit_compile_method_with_opt): New helper function to
23248         compile a method with a given set of optimizations.
23249
23250         * mini.c: Compile icall wrappers on-demand instead of at startup.
23251
23252         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
23253         wrapper for an icall.
23254
23255 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
23256
23257         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
23258         #54063.
23259
23260         * iltests.il: Add test for non-empty stack before switch instruction.
23261
23262 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
23263
23264         * mini.c: Add support for new stringbuilder marshalling conventions.
23265
23266         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
23267
23268 2004-02-01  Martin Baulig  <martin@ximian.com>
23269
23270         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
23271         in `ginst->mtype_argv'.
23272
23273 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
23274
23275         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
23276         facilitate grepping.
23277
23278 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
23279
23280         * mini.c: fixed buglet in initobj generic implementation for references.
23281
23282 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
23283
23284         * Makefile.am: make the version script conditional.
23285         * jit-icalls.c: handle missing truncl().
23286
23287 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
23288
23289         * exceptions.cs: Add more tests for double->int conversion.
23290
23291         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
23292         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
23293
23294 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
23295
23296         * driver.c: make --verbose --version emit an error
23297         if the loaded corlib doesn't match the runtime version.
23298
23299 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
23300
23301         * mini-ppc.h: export ppc_patch().
23302         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
23303         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
23304         on par or better than on MacOSX.
23305
23306 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
23307
23308         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
23309         mono_lookup_pinvoke_call.
23310
23311         * mini-x86.c: Under windows, the default pinvoke calling convention is
23312         stdcall. Fixes #52834.
23313
23314         * mini.c (optimize_branches): Add an upper bound to the number of
23315         iterations to prevent infinite loops on strange loops. Fixes #53003.
23316
23317 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
23318
23319         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
23320         and ISINST. Fixes #52093.
23321
23322         * objects.cs (test_0_vector_array_cast): New tests.
23323         
23324 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
23325
23326         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
23327         checking in Array.Set ().
23328
23329         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
23330         #52590.
23331
23332         * object.cs (test_0_multi_array_cast): New regression test.
23333
23334 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
23335
23336         * exceptions-ppc.c: fix build on Linux/PPC.
23337
23338 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
23339
23340         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
23341         running under valgrind.
23342         (x86_magic_trampoline): Fix build bustage.
23343
23344         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
23345         negative values as well. This is needed for the encoding of the line number
23346         info, since sometimes the line numbers are not in increasing order.
23347
23348 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
23349
23350         * cpu-pentium.md (localloc): Increase the size of the localloc 
23351         instruction since it is a loop under Win32.
23352
23353         * debug-mini.c (record_line_number): Get rid of unneccesary memory
23354         allocation.
23355
23356 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
23357
23358         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
23359         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
23360         Max Horn (max@quendi.de). Fix file names in comments.
23361
23362 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
23363
23364         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
23365         avoid stack overflow.
23366         (replace_usage): Avoid uninitialized variable warnings.
23367
23368         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
23369         and taking the address of valuetype variables.
23370
23371 2004-01-03  Patrik Torstensson
23372
23373         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
23374         for other purposes than FP later on.
23375
23376 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
23377
23378         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
23379         of tail calls.
23380
23381 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
23382
23383         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
23384
23385 2003-12-30  Patrik Torstensson <p@rxc.se>
23386
23387         * mini-x86.h: Decreased number of availiable fp regs.
23388         Solves corner cases with FP spilling.
23389
23390 2003-12-23  Patrik Torstensson <p@rxc.se>
23391
23392         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
23393         for floating point stack tracking / spilling on x86. 
23394         Fixes bug #49012.
23395         
23396         * basic-float.cs: added float mul overflow test.
23397
23398 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
23399
23400         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
23401
23402 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23403
23404         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
23405         supports for cond branches that overflow the immediate
23406         overflow offset. mcs can compile simple programs.
23407
23408 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23409
23410         * exceptions-ppc.c: exception handling support wip:
23411         finally handlers get run on exception.
23412
23413 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
23414
23415         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
23416         profiling.
23417
23418 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
23419
23420         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
23421         initial support for stack walking and unwinding.
23422
23423 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
23424
23425         * driver.c (mono_main): Make corlib-out-of-sync message more 
23426         descriptive. Also remove verify_corlib call.
23427
23428 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
23429
23430         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
23431         not overlap with other call's arguments, too.
23432
23433 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
23434
23435         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
23436         move to arch-specific code the choice of arch-specific
23437         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
23438         * mini.c: ensure emulation calls will not interleave
23439         with other calls.
23440
23441 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
23442
23443         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
23444         the magic trampoline stack frame is dropped before executing
23445         the new method.
23446
23447 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
23448
23449         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
23450         and integer to fp conversions. Added support for overflowing
23451         arguments on the stack. Reserve a couple more registers as temps.
23452         Added support for aot compilation (as output still needs to be
23453         tweaked, though).
23454
23455 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
23456
23457         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
23458         Don't overwrite return register in some corner cases.
23459
23460 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
23461
23462         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
23463         static constructors when AOT compiling.
23464
23465         * driver.c (mono_main): Call mono_check_corlib_version.
23466
23467 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
23468
23469         * cpu-g4.md, basic.cs: fixed div target register.
23470
23471 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
23472
23473         * mini-ppc.c, basic.cs: shl_imm fix with test.
23474
23475 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
23476
23477         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
23478         structures by value. Misc fixes.
23479         * objects.cs: more tests.
23480
23481 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
23482
23483         * mini-ppc.c: lconv.ovf.i implemented.
23484
23485 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23486
23487         * mini.c:
23488         (mini_init): don't error out if someone already called g_thread_init.
23489
23490 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
23491
23492         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
23493         to be any type per the spec. Fix abnormal memory usage when
23494         the same object is repeatedly thrown.
23495
23496 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
23497
23498         * mini.c: check for overruns in IL code.
23499
23500 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
23501
23502         * TODO: Add/remove some todo entries.
23503
23504 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
23505
23506         * driver.c (mono_main): Call mono_verify_corlib.
23507
23508 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
23509
23510         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
23511         This has been moved to mini.c
23512         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
23513         type being casted is marshalbyref it could be a proxy, so instead of
23514         emitting the type check code, emit a call to a runtime method that will
23515         perform the check by calling CanCastTo if needed.
23516
23517 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
23518
23519         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
23520         methods with large stack frames under Win32.
23521
23522 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
23523
23524         * Makefile.am: Distribute regression tests.
23525
23526         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
23527         at the end instead of inserting each variable into the sorted list.
23528
23529         * linear-scan.c (mono_varlist_sort): New helper function.
23530         
23531 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
23532
23533         * mini.c: ensure arguments and locals are within bounds.
23534
23535 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
23536
23537         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
23538         related fixes.
23539
23540 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
23541
23542         * mini.c (mono_cprop_copy_values): Fix crash.
23543
23544         * aot.c: Set verbosity back to 0.
23545         
23546 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
23547
23548         * regalloc.c: complete memory leak fix by Laurent Morichetti
23549         (l_m@pacbell.net).
23550
23551 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
23552
23553         * driver.c (main_thread_handler): Revert the previous patch.
23554
23555         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
23556         under valgrind.
23557
23558         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
23559         memory from the memory pool.
23560
23561         * driver.c (main_thread_handler): Turn on all optimizations when
23562         --aot is used.
23563
23564         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
23565         an array for better performance.
23566
23567         * regalloc.c (mono_regstate_assign): Fix memory leak.
23568
23569         * debug-mini.c (mono_debug_serialize_debug_info): New function to
23570         serialize the debug info.
23571
23572         * debug-mini.c (mono_debug_add_aot_method): New function to load the
23573         debug info from the serialized representation.
23574
23575         * aot.c: Save debug info into the generated file and load it when 
23576         loading a method.
23577
23578         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
23579
23580 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
23581
23582         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
23583         More FP-related fixes.
23584
23585 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
23586
23587         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
23588         and register allocation buglet. Hello world now runs.
23589
23590 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
23591
23592         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
23593         * tramp-ppc.c: fixed class init trampoline.
23594         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
23595
23596 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
23597
23598         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
23599         mini.c: more ppc changes/fixes.
23600
23601 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
23602
23603         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
23604         Also optimize the case when the arguments are the same in the caller 
23605         and in the callee.
23606
23607         * iltests.il: Add tests for tail calls with valuetype arguments.
23608
23609 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
23610
23611         * mini-ppc.c: fixes for struct return type.
23612
23613 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
23614
23615         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
23616         mono_spillvar_offset() to arch-specific code.
23617
23618 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
23619
23620         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
23621
23622 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
23623
23624         * exceptions-x86.c: Fix stack space leaks.
23625         
23626         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
23627         registers from the lmf if the method has save_lmf set.
23628
23629 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
23630
23631         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
23632         of icall wrappers into InvokeInDomain, since these are now per-domain.
23633
23634 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
23635
23636         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
23637         make some opcode emulation and intrinsic ops enabled/disabled 
23638         according to the architecture. More fixes.
23639
23640 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
23641
23642         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
23643
23644 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
23645
23646         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
23647         arch-specific handling for 'this' and struct return type to
23648         arch-specific code.
23649
23650 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23651
23652         * aot.c: prevent divide by zero error when reporting (it happened with
23653         Accessibility.dll).
23654
23655 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
23656
23657         * mini.h (inst_switch): Remove unused macro.
23658
23659 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23660
23661         * aot.c:
23662         (load_aot_module): free 'info->methods' and 'info' properly. No more
23663         "free(): invalid pointer blah" messages when you have an old aot
23664         compiled assembly.
23665
23666 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
23667
23668         * jit-icalls.c, mini.c: Added support for context static fields.
23669
23670 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
23671
23672         * mini.c (mono_method_blittable): Methods which set LastError are not 
23673         blittable either. Fixes #51108.
23674         
23675 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
23676
23677         * mini.c: flush icache.
23678         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
23679
23680 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
23681
23682         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
23683
23684 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
23685
23686         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
23687         safe on IA32.
23688
23689         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
23690         vararg calls.
23691
23692         * inssel.brg (CEE_MKREFANY): Fix AOT case.
23693
23694 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
23695
23696         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
23697         instruction when the result is discarded.
23698
23699         * iltests.il (test_0_div_regalloc): New regression test.
23700
23701         * arrays.cs: Fix compilation error.
23702
23703 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
23704
23705         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
23706         float rules to inssel-x86.brg: sane architectures with FP registers
23707         don't need to implement these rules.
23708
23709 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
23710
23711         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
23712
23713 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
23714
23715         * mini.h, inssel-long32.brg: fixed endianess issues in int64
23716         implementation of 32 bit systems.
23717
23718 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
23719
23720         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
23721         (Jeroen Zwartepoorte).
23722
23723 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
23724
23725         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
23726         the caller and the callee matches.
23727         
23728         * mini.c (mono_method_to_ir): Add comment.
23729
23730         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
23731         signbit is missing on some platforms.
23732
23733 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
23734
23735         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
23736
23737         * mini.c (setup_jit_tls_data): Call the new function.
23738         
23739         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
23740
23741         * mini-x86.c: Add experimental support for fast access to the lmf
23742         structure under NPTL/Linux 2.6.x.
23743
23744 2003-11-06  Martin Baulig  <martin@ximian.com>
23745
23746         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
23747         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
23748         the debugger.
23749
23750 2003-11-02  Martin Baulig  <martin@ximian.com>
23751
23752         * mini.c (inflate_generic_field): New static method.
23753         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
23754         generic instance and the field is declared in a generic type, call
23755         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
23756
23757 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
23758
23759         * mini.h mini.c (mono_method_same_domain): New function to return
23760         whenever the caller and the callee are in the same domain.
23761
23762         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
23763
23764 2003-10-30  Martin Baulig  <martin@ximian.com>
23765
23766         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
23767         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
23768         method parameters.
23769         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
23770         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
23771
23772 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
23773
23774         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
23775         propagation.
23776
23777         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
23778         object here, so it is in the correct appdomain etc.
23779
23780 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
23781
23782         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
23783         already done.
23784         (mono_method_to_ir): Avoid freeing the type created returned from
23785         mono_type_create_from_typespec, since it is put into an internal cache
23786         by the function. Fixes pointer.exe.
23787
23788         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
23789         trampolines for icalls and pinvokes as well. Fixes #33569.
23790
23791 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
23792
23793         * mini.c: Update after appdomain changes.
23794
23795         * mini.c (mono_jit_compile_method_inner): Allways compile native
23796         method wrappers in the root domain, since there can only be one
23797         instance of them, whose address is stored in method->info.
23798
23799 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
23800
23801         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
23802         environment variable. Instead detect automatically whenever running
23803         under valgrind using the magic macro RUNNING_ON_VALGRIND from
23804         valgrind.h.
23805
23806 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
23807
23808         * trace.c, trace.h: New files that implement the new trace option
23809         parsing. 
23810
23811         * driver.c: Document new --trace options.
23812
23813         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
23814         mini-x86.c: Apply:
23815
23816         -       if (mono_jit_trace_calls)
23817         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
23818
23819         * mini.h: prototypes.
23820         
23821 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
23822
23823         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
23824
23825         * mini.c inssel.brg: Implement typedefbyref opcodes.
23826
23827         * mini.c (mono_jit_compile_method): Remove unused local variable.
23828
23829         * mini.c (mono_jit_compile_method_inner): Ditto.
23830         
23831 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
23832
23833         * tramp-x86.c (x86_class_init_trampoline): Fix build.
23834         
23835         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
23836
23837 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
23838
23839         * mini.c (mono_no_aot): Remove unused global variable.
23840
23841         * mini.c: Thread safety fixes.
23842
23843 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
23844
23845         * mini.c (mono_create_class_init_trampoline): Add a lock around
23846         class_init_hash_addr.
23847
23848         * arrays.cs (test_0_newarr_emulation): Add new regression test for
23849         #30073.
23850
23851         * mini.c: Decompose the NEWARR instruction before decomposing its
23852         arguments. Fixes #30073.
23853
23854 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
23855
23856         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
23857         convention.
23858
23859 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
23860
23861         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
23862
23863         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
23864
23865         * driver.c: Add support for compiling icall wrappers to --compile.
23866
23867 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
23868
23869         * inssel.brg: The empty value in class->interface_offsets is -1, not
23870         0. Fixes #49287.
23871
23872 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
23873
23874         * objects.cs: New test for 'is' operator on an array of interfaces.
23875
23876 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
23877
23878         * tramp-ppc.c: update trampoline code to support jumps
23879         and class initialization.
23880
23881 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
23882
23883         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
23884
23885         * inssel.brg (OP_UNBOXCAST): Fix #46027.
23886
23887         * inssel.brg (OP_UNBOX): Remove unused rule.
23888
23889         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
23890         region instead of one for each method. Fixes #47813.
23891
23892 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
23893
23894         * exceptions.cs (test_0_nested_finally): New regression test for
23895         nested exception handlers.
23896
23897         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
23898
23899         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
23900
23901         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
23902         inlining.
23903
23904         * mini.c (mono_method_check_inlining): Make the inlining limit 
23905         configurable by an environment variable.
23906         
23907         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
23908
23909         * mini.h: Bump AOT file version.
23910
23911         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
23912         token, store the image along with the token, since the token might not 
23913         refer to the same image as the method containing the relocation, 
23914         because of inlining.
23915
23916 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
23917
23918         * mini.c (mono_precompile_assemblies): New function to compile
23919         all methods in all loaded assemblies.
23920
23921         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
23922
23923         * regalloc.h regalloc.c (MonoRegState): Change the type of 
23924         iassign and fassign to int*, since they can contain large negative
23925         values if the register is spilled. Also added some comments. Fixes
23926         #45817.
23927
23928         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
23929         under Win32. Fixes #42964.
23930
23931 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
23932
23933         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
23934
23935         * aot.c: Added support for AOT compiling methods which contain calls
23936         to wrappers. Currently, only remoting-invoke-with-check wrappers are
23937         handled.
23938         
23939         * driver.c (compile_all_methods): Run the compilation in a thread
23940         managed by mono. Fixes #44023.
23941
23942         * mini.c (mono_codegen): Print full method name in verbose output.
23943
23944         * mini-x86.c (mono_arch_patch_code): Fix warning.
23945         
23946         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
23947         jumps, since the method we are jumping to might be domain-specific.
23948
23949         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
23950
23951 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
23952
23953         * inssel.brg: string chars are unsigned.
23954
23955 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
23956
23957         * TODO: New todo item.
23958
23959         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
23960         which calls mono_runtime_class_init and patches the call site to
23961         avoid further calls.
23962         (mono_arch_create_class_init_trampoline): New arch specific function 
23963         to create a class init trampoline.
23964         (create_trampoline_code): Generalized so it can create
23965         class init trampolines as well.
23966
23967         * mini.c (helper_sig_class_init_trampoline): New helper variable.
23968         (mono_create_class_init_trampoline): New function to create and cache
23969         class init trampolines.
23970         (mono_find_class_init_trampoline_by_addr): New function to lookup the
23971         vtable given the address of a class init trampoline. Used by the
23972         patching process.
23973         (mono_codegen): Generate a call to a trampoline instead of
23974         mono_runtime_class_init in LDSFLD[A].
23975         (mono_codegen): Add relocations for the new trampoline.
23976         
23977         * mini.h mini-x86.c aot.c: Added a new relocation type: 
23978         MONO_PATCH_INFO_CLASS_INIT.
23979
23980         * mini.h: Bump AOT version number.
23981
23982         * aot.c: Create a copy of the loaded code instead of using the original
23983         so methods which call each other will be close in memory, improving
23984         cache behaviour.
23985         
23986         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
23987         patch since it breaks the regression tests.
23988         
23989         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
23990         for the register saving instruction sequence since the 
23991         frame_state_for function in glibc 2.3.2 don't seem to detect it.
23992
23993 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
23994
23995         * TODO: Fix todo item && remove another.
23996
23997 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
23998
23999         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
24000         previous checkin.
24001
24002         * aot.c: Moved the check for MONO_LASTAOT into the initialization
24003         function of the module.
24004
24005         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
24006         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
24007         --no-aot command line option.
24008
24009 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
24010
24011         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
24012         by Bernie Solomon (bernard@ugsolutions.com).
24013
24014         * inssel.brg: Refactor the interface offset table related code into
24015         its separate functions and add support for the AOT case.
24016
24017 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
24018
24019         * aot.c (mono_aot_get_method_inner): Fix memory leak.
24020         
24021         * aot.c: Added mono_aot_verbose variable and made all debugging
24022         output depend on the value of this variable.
24023
24024         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
24025         method_label and info_label.
24026
24027         * mini.h mini-x86.c aot.c: Added a new relocation type 
24028         MONO_PATCH_INFO_IID for klass->interface_id.
24029
24030         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
24031         the MonoJitInfo structure.
24032
24033         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
24034         a non-root appdomain in shared mode.
24035
24036 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
24037
24038         * aot.c: make aot loader less verbose. Remove free of unused variable.
24039
24040 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
24041
24042         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
24043
24044         * .cvsignore: Added *.dll.
24045
24046         * mini.c (mono_print_tree_nl): New function callable while debugging.
24047
24048         * mini.c (mono_print_code): Export this.
24049
24050         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
24051         patched code.
24052
24053 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
24054
24055         * mini.h (MonoCompile): Added 'jit_info' field.
24056
24057         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
24058         the cfg structure, since it is needed by the AOT compiler.
24059
24060         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
24061
24062         * aot.c: A major rewrite. Changes include:
24063         - save exception tables for methods which have them.
24064         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
24065         to g_module_symbol.
24066         - reworked the file format so it is now much smaller and needs
24067         fewer relocation entries.
24068         
24069 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
24070
24071         * aot.c (load_aot_module): Fix build bustage on platforms without
24072         Boehm GC.
24073
24074 2003-09-04  Martin Baulig  <martin@ximian.com>
24075
24076         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
24077
24078 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
24079
24080         * TODO: Some new optimization ideas.
24081
24082         * aot.c: Move AOT module loading logic here from mono_assembly_open.
24083
24084         * aot.c: Save the optimization flags used to compile the code into
24085         the AOT module.
24086
24087         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
24088         support emitting domain specific code.
24089         
24090         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
24091         no longer domain neutral. It can be made domain neutral by compiling 
24092         with --optimize=shared.
24093
24094         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
24095         between appdomains.
24096
24097         * driver.c mini.h mini.c: New --no-aot debugging option which disables
24098         loading of AOT code.
24099
24100         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
24101         
24102         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
24103         if there is no domain neutrality information.
24104
24105 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
24106
24107         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
24108         format version into the generated library.
24109
24110         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
24111         callee method into the caller since one of them could be shared.
24112
24113         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
24114         system exceptions from AOT code now works.
24115
24116         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
24117         method if it is domain neutral and the callee is not.
24118
24119         * graph.c (cfg_emit_one_loop_level): Fix warning.
24120
24121 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
24122
24123         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
24124         last checkin.
24125
24126 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
24127
24128         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
24129         is needed  by code which is executed before mono_runtime_init ().
24130         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
24131         
24132         * mini.c (mono_thread_abort): Fix warning.
24133         (mono_jit_compile_method): Call static constructor in the AOT case too.
24134
24135         * aot.c (mono_compile_assembly): Fix warning.
24136
24137 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24138
24139         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
24140
24141 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
24142
24143         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
24144
24145         * cpu-pentium.md: Fix the length of call opcodes so they include the
24146         ESP restoring instruction. Fixes #47968.
24147
24148 2003-08-28  Martin Baulig  <martin@ximian.com>
24149
24150         * mini-x86.c (mono_arch_call_opcode): Added support for
24151         MONO_TYPE_GENERICINST.
24152
24153         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
24154
24155 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
24156
24157         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
24158         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
24159
24160         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
24161         metadata_section.
24162
24163 2003-08-26  Martin Baulig  <martin@ximian.com>
24164
24165         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
24166         when reporting an error, set this to the actual error location.
24167         (mono_method_to_ir): Report the correct error location if
24168         get_basic_blocks() returned an error.
24169
24170 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
24171
24172         * mini.c (mono_type_blittable): OBJECT is not blittable.
24173         (mono_method_blittable): Methods which have marshalling descriptors
24174         are not blittable either. Fixes #47842.
24175
24176 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
24177
24178         * driver.c mini.c: Use an environment variable instead of a global 
24179         variable. Also fix the build.
24180
24181         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
24182         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
24183         reporting this. 
24184
24185         * driver.c mini.c: Added --with-valgrind option to turn off some
24186         code which prevents mono from running under valgrind.
24187
24188         * mini.c (mono_emit_call_args): Fixed warning.
24189
24190         * mini.c (mono_emulate_opcode): Fixed warning.
24191
24192 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24193
24194         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
24195         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
24196         regalloc.c, regalloc.h: specify available registers in arch-specific
24197         code and support floats in the regallocator (patch by Laurent Morichetti 
24198         <l_m@pacbell.net>)
24199
24200 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
24201
24202         * mini.c: mono_thread_current() can be called only after
24203         mono_runtime_init(): rearrange code to not call it early on.
24204
24205 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
24206
24207         * mini.c: allocate jump tables in the code mempools.
24208
24209 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24210
24211         * mini.c, mini.h: make sure per-thread data allocated by the jit is
24212         freed.
24213
24214 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
24215
24216         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
24217         12 to 16.  This fixes bug #47453.
24218
24219
24220 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
24221
24222         * mini-ppc.c: fixed indexed load and unsigned compares.
24223
24224 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
24225
24226         * mini.c: reenabled installation of handler for
24227           thread abort signal.
24228
24229 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24230
24231         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
24232         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
24233         until it's fixed and actually useful.
24234
24235 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
24236
24237         * inssel-long32.brg: couple more opcodes implemented.
24238
24239 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
24240         
24241         * mini-sparc.c: Even more opcodes implemeted.
24242
24243 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
24244
24245         * mini-sparc.c: More opcodes implemented.
24246
24247 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
24248
24249         * mini-sparc.c: More opcodes implemented.
24250
24251 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
24252
24253         * inssel-sparc.brg: Add some needed rules.  Direct
24254         copy from PPC.
24255         * Makefile.am: Use inssel-sparc.brg
24256         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
24257         an assert happy for now.
24258
24259 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
24260
24261         * mini-sparc.c: Fixed compile errors.
24262         * exceptions-sparc.c: Same.  We now produce a mono binary 
24263         on sparc-linux.  Yea.
24264
24265 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
24266
24267         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
24268         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
24269         They compile, but do not work.
24270
24271 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24272
24273         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
24274         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
24275         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
24276         (ct@gentoo.org).
24277
24278 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24279
24280         * mini.c: more opcodes implemented and better support for generics.
24281
24282 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
24283
24284         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
24285         * mini.c, mini.h: first cut at generics support: some new instructions 
24286         added and changed the behaviour of some of the existing ones.
24287
24288 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
24289
24290         * mini.c: Removed definition of metadata_shared mutex here.
24291
24292 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
24293
24294         * mini-x86.c: make vararg calls work for instance methods.
24295
24296 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24297
24298         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
24299         returns the arguments in a separte list, now.
24300
24301 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
24302
24303         * aot.c, mini.c: updates for array type representation changes.
24304
24305 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
24306
24307         * mini.c: register function to perform jit shutdown.
24308
24309 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24310
24311         * mini.c: use a faster allocator if possible.
24312
24313 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
24314
24315         * aot.c: some cleanups and portability changes.
24316
24317 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24318
24319         * mini.c: use faster allocation for CEE_BOX if possible.
24320
24321 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
24322
24323         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
24324         Moved inlined mempcy code to its own function so that is can be
24325         reused. Added an inline memset function as well (optimized initobj).
24326         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
24327
24328 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24329
24330         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
24331
24332 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
24333
24334         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
24335         arch code can setup the cpu for CLR execution, if needed.
24336         We use it on x86 to set the precision of FP operations.
24337
24338 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24339
24340         * mini.c: disable some optimizations if we can guess they'll cost too
24341         much for a given method.
24342
24343 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
24344
24345         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
24346         
24347 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
24348         * mini.h mini.c mini-x86.c: Added instruction level coverage 
24349         info collection support.
24350
24351 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
24352
24353         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
24354         is now implemented in the profiling API. Get rid of a couple of
24355         unnecessary global variables.
24356
24357 2003-06-15  Nick Drochak <ndrochak@gol.com>
24358
24359         * basic-long.cs: tests for negative values for bigmul, and unsigned.
24360         * cpu-g4.md: add op_bigmul and op_bigmul_un
24361         * cpu_pentium.md: add op_bigmul_un
24362         * inssel-long32.brg: add rule for unsigned bigmul
24363         * mini-ops.h: define OP_BIGMUL_UN
24364         * mini-x86.c: THE BUG: handle (un)signed properly
24365         * mini.c: choose unsigned opcode if needed.
24366         This set of patches fixes bug #44291
24367
24368 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
24369
24370         * mini.c (optimize_branches): improved to handle all kinds of
24371         conditional branches.
24372
24373 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
24374
24375         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
24376         don't raise exceptions.
24377
24378 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
24379
24380         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
24381         to arch-specific files.
24382
24383 2003-06-09  Martin Baulig  <martin@ximian.com>
24384
24385         * Makefile.am (libs): Added $(LIBGC_LIBS).
24386
24387 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
24388
24389         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
24390         and OP_ATAN (fixes bug#44293).
24391
24392 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
24393
24394         * Makefile.am, mini-x86.c: rename cpu description array to
24395         pentium_desc, since some compilers define the 'pentium' preprocessor
24396         symbol.
24397
24398 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
24399
24400         * mini.c (mini_select_instructions): add explicit branch if the
24401         following block is not the false target of a conditional branch -
24402         we need this with any optimization that reorder or remove bblocks
24403
24404         * mini.c (optimize_branches): bug fixes
24405
24406 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
24407
24408         * mini.c (mono_method_to_ir): inline static readonly fields
24409
24410         * ssa.c (fold_tree): start cfold support for long (very simple
24411         cases only)
24412
24413         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
24414
24415 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
24416
24417         * inssel.brg: fixed memcpy (bug #44219).
24418
24419 2003-06-05  Dick Porter  <dick@ximian.com>
24420
24421         * driver.c: Set the glib log levels to not abort if g_message
24422         recurses.
24423
24424         g_set_prgname() has to happen before mini_init() so that the
24425         process handle gets the info.
24426         
24427 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
24428
24429         * driver.c: add intrins to the default optimizations to get wider
24430         exposure.
24431
24432 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
24433
24434         * mini.h: some large basic blocks will overflow a 16-bit
24435         integers for symbolic registers.
24436
24437 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
24438
24439         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
24440         (mono_arch_output_basic_block): fix bug 43499 
24441
24442 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
24443
24444         * mini.c: kill duplicated definition of mono_debug_format.
24445
24446 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
24447
24448         * mini-x86.c, arrays.cs: fixed register allocation bug.
24449
24450 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
24451
24452         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
24453
24454         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
24455
24456 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24457
24458         * mini.c:
24459         (print_method_from_ip): also print source location information if
24460         available.
24461
24462 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
24463
24464         * mini.c (mono_find_block_region): bug fix in region code
24465         (mini_method_compile): enable removing unreachable code again, but
24466         only in methods without exception clauses.
24467
24468 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
24469
24470         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
24471         Implemented arglist opcode and handling of TypedReference type.
24472         Fixed x86 call convention when a structure is returned.
24473         Minimal support for calling static vararg methods.
24474
24475 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
24476
24477         * mini.c (mini_method_compile):  always remove unreachable code,
24478         because the code in them may be inconsistent  (access to dead
24479         variables for example).
24480
24481 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
24482
24483         * driver.c, debug-mini.c: warning fixes.
24484
24485 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
24486
24487         * Makefile.am, jit.h, mini.h: install header for embedding mono.
24488
24489 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
24490
24491         * mini.c: thread-static fields are registered in mono_class_vtable(),
24492         so ensure the function is called before checking for them.
24493
24494 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
24495
24496         * mini.c (optimize_branches): fix for bug 43586
24497
24498         * jit-icalls.c (mono_llmult_ovf): added an additional check for
24499         overflow (fixes Bug #43639)
24500
24501 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24502
24503         * mini.c, objects.cs: allow the use of stobj for primitive types.
24504
24505 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24506
24507         * mini.c: be less strict about argument checking until we support
24508         running the verifier.
24509
24510 2003-05-27  Nick Drochak <ndrochak@gol.com>
24511
24512         * basic-long.cs: tests for (ulong)int * (ulong)int also
24513         * mini.c: use the same trick for (ulong)int * (ulong)int
24514
24515 2003-05-27  Nick Drochak <ndrochak@gol.com>
24516
24517         * basic-long.cs: add regression test for (long)int * (long)int
24518         * cpu-pentium.md: add op_bigmul specification
24519         * inssel-long32.brg: add OP_BIGMUL rule
24520         * mini-ops.h: add OP_BIGMUL
24521         * mini-x86.c: register allocator: handle case where src1 needs to be
24522         in EAX.
24523         * mini.c: substitute special BIGMUL opcode in the tree for 
24524         (long)int * (long)int
24525
24526 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
24527
24528         * jit-icalls.c: call the type ctor on field access if needed.
24529
24530 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
24531
24532         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
24533         to a method (including results of ldelema, bug#43207).
24534
24535 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
24536
24537         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
24538         colors to show exception handler blocks.
24539
24540         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
24541         (fix for pinvoke7.cs).
24542
24543 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24544
24545         * mini.h, mini.c: ensure correct initialization order for types that
24546         require it. Prepare for lazy compilation of jit icall wrappers.
24547         Provide a name for opcode emulation to reduce unneeded mallocing.
24548
24549 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
24550
24551         * mini-x86.c: better register restoring code and profiling
24552         support for tail calls.
24553
24554 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24555
24556         * mini.h, driver.c: prepare for leaf methods optimization.
24557
24558 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
24559
24560         * mini.c: get targets of branches before converting a method.
24561
24562 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
24563
24564         * mini.c (optimize_branches): added some experimental code (disbaled) 
24565
24566 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
24567
24568         * mini.c (optimize_branches): fix branch to branch optimization 
24569
24570         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
24571
24572         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
24573
24574         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
24575
24576         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
24577         if needed.
24578
24579 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
24580
24581         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
24582         enable use of interface variables again.
24583
24584         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
24585         I1 to registers because there is no simply way to sign extend 8bit
24586         quantities in caller saved registers on x86.
24587
24588         * inssel-float.brg: set costs of some rules to 2 so
24589         that monobure always select the arch. specific ones if supplied,
24590         regardless of the order we pass the files to monoburg.
24591
24592 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
24593
24594         * mini.c, mini-x86.c: since the magic trampoline for jumps
24595         can't patch the code directly, we do it as soon as the
24596         method gets compiled.
24597
24598 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
24599
24600         * mini-x86.c, mini.h: introduce a new patching method
24601         to support CEE_JMP and tail calls.
24602         * mini.c: obey tail.call. Don't precompile methods target
24603         of CEE_JMP.
24604         * tramp-x86.c: new trampoline code to handle methods
24605         reached through a jump.
24606
24607 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
24608
24609         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
24610         bit values to registers
24611
24612 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
24613
24614         * mini.c (mono_compile_get_interface_var): share interface
24615         variables if possible.
24616
24617 2003-05-16  Martin Baulig  <martin@ximian.com>
24618
24619         * debug-mini.c (mono_init_debugger): New function to initialize
24620         the debugger.  This is not in the debugger since it needs to
24621         access some of mini's internals.
24622
24623 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
24624
24625         * mini.c (mono_method_to_ir): inlining fixes/cleanups
24626
24627 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
24628
24629         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
24630         for value type handling.
24631
24632 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
24633
24634         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
24635         (mono_method_check_inlining): enable inlining of all kinds of wrappers
24636
24637 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
24638
24639         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
24640           the constructor through a proxy.
24641
24642 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
24643
24644         * jit-icalls.c, inssel.brg: fixes to array element address
24645         calculations.
24646
24647 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
24648
24649         * mini-x86.c (is_regsize_var): allocate pointer to registers
24650
24651 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
24652
24653         * driver.c: fixed typo, added intrins to the set of optimizations
24654         tested with regressions.
24655
24656 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
24657
24658         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
24659         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
24660         test case.
24661
24662 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
24663
24664         * inssel.brg: remove some common pop instructions without side effects
24665
24666 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
24667
24668         * inssel-x86.brg: fixed thinko in int to double conversions.
24669
24670 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
24671
24672         * mini.c, jit-icalls.c: added runtime thread-static variable support.
24673
24674 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
24675
24676         * inssel-long32.brg: two more missing instructions.
24677
24678 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
24679
24680         * mini.c (mono_emit_call_args): set the cil_code for all arguments
24681         if not already set.
24682
24683 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
24684
24685         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
24686         correctly.
24687
24688         * basic-float.cs: Added tests for negative zero.
24689
24690 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
24691
24692         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
24693         a couple of missing operations for long casts, with test cases.
24694
24695 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24696
24697         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
24698
24699 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
24700
24701         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
24702         code size estimation.
24703
24704 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
24705
24706         * mini.c (mono_jit_create_remoting_trampoline): make it work with
24707         abstract methods (fix bug 42542)
24708
24709         * aot.c: add ability to handle array types
24710         
24711 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
24712
24713         * mini.c: Call the _specific versions of the object allocation
24714         functions if possible.
24715
24716 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
24717
24718         * driver.c: call setlocale ().
24719
24720 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
24721
24722         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
24723         windows build.
24724
24725 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
24726
24727         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
24728
24729         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
24730         wrappers (fix bug 42122)
24731
24732 2003-05-04  Martin Baulig  <martin@ximian.com>
24733
24734         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
24735
24736         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
24737         s/mini_set_defaults/mono_set_defaults/g.
24738
24739 2003-05-04  Martin Baulig  <martin@ximian.com>
24740
24741         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
24742
24743 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24744
24745         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
24746         (reported by Don Roberts).
24747
24748 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
24749
24750         * mini.c: temporarily work around two bugs for this release.
24751
24752 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
24753
24754         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
24755         that contains -export-dynamic and it makes using the ld script
24756         useless.
24757         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
24758
24759 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
24760
24761         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
24762         specific cpu.
24763
24764 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
24765
24766         * mini.c: make sure leave calls all the needed finally blocks,
24767         even when the target jumps out of multiple exception clauses.
24768
24769 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
24770
24771         * ldscript, Makefile.am: add linker script to reduce the number of
24772         exported symbols (should also fix the issues with libwine defining
24773         some of the same symbols in io-layer).
24774
24775 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
24776
24777         * driver.c (mini_main): Avoid assertion when no file name is given on 
24778         the command line.
24779
24780 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
24781
24782         * driver.c: added --version/-V command line option.
24783         Added the inline optimization in the regression tests.
24784
24785 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
24786
24787         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
24788         to the type in the method signature (fixes bug#42134).
24789
24790 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
24791
24792         * mini.c: when inlining, check this is not null only when needed (bug #42135).
24793
24794 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
24795
24796         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
24797
24798 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24799
24800         * driver.c: fixed bug #42100.
24801
24802 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
24803
24804         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
24805
24806 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
24807
24808         * mini.c: moved most of the code required to do inlining to its own
24809         function so it can be reused. Inline also ctors if appropriate.
24810
24811 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
24812
24813         * Makefile.am: Link with -export-dynamic so shared libs loaded by
24814         the runtime can call mono API functions.
24815
24816 2003-04-27  Martin Baulig  <martin@ximian.com>
24817
24818         * debug-mini.c (mono_debug_init_method): Added
24819         `guint32 breakpoint_id' argument; if the method has a breakpoint,
24820         send a notification to the debugger.
24821
24822         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
24823         running in the Mono Debugger, just pass the breakpoint number to
24824         mono_debug_init_method().
24825
24826         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
24827
24828 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
24829
24830         * mini.c: allow some more unsafe compares.
24831
24832 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24833
24834         * mini-x86.c, Makefile.am: make distcheck works (partially from
24835         a patch by Richard Lee <r.h.lee@attbi.com>).
24836         * regset.c, regset.h: removed, they are unused.
24837
24838 2003-04-25  Dick Porter  <dick@ximian.com>
24839
24840         * driver.c: Usage reports the name as 'mono' not 'mini'
24841         * exceptions-x86.c: Build and run on freebsd
24842
24843 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
24844
24845         * Makefile.am: install the program with the 'mono' name and
24846         the library as libmono instead of mini and libmini.
24847
24848 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
24849
24850         * driver.c: provide the APIs for the embedding interface of the old jit.
24851
24852 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
24853
24854         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
24855
24856 2003-04-23  Martin Baulig  <martin@ximian.com>
24857
24858         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
24859
24860         * driver.c: Added `--debug' command line argument to enable
24861         debugging support.
24862
24863 2003-04-23  Martin Baulig  <martin@ximian.com>
24864
24865         * debug.[ch]: Removed.  The code is now in
24866         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
24867
24868         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
24869         last six months.
24870
24871 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
24872
24873         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
24874
24875 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24876
24877         * mini.c:
24878         (mini_cleanup): moved mono_runtime_cleanup call after the call to
24879         mono_domain_finalize.
24880         (mini_method_compile): use mono_method_profile* if the the option is
24881         enabled.
24882
24883 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
24884
24885         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
24886         methods with their wrapper.
24887
24888         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
24889         methods with their wrapper.
24890
24891         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
24892         their wrapper.
24893
24894         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
24895         wrapper.
24896
24897         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
24898         methods.
24899
24900 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
24901
24902         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
24903
24904 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
24905
24906         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
24907         of the mempool. This is slightly faster and uses less memory
24908
24909 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24910
24911         * mini.c: avoid O(n) allocation for variables.
24912
24913 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24914
24915         * mini.c: handle items on the stack after inlining methods.
24916
24917 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
24918
24919         * mini.c: make the method->opcode optimization dependent
24920         on MONO_OPT_INSTRINS and do it lazily.
24921
24922 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
24923
24924         * driver.c: print overall results at the end of regression run.
24925
24926 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
24927
24928         * inssel.brg: don't overwrite symbolic registers.
24929
24930 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
24931
24932         * inssel-x86.brg: fix conversion from long to float.
24933
24934 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
24935
24936         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
24937
24938 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
24939
24940         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
24941
24942         * driver.c: Added --print-vtable option as in the old JIT.
24943
24944 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
24945
24946         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
24947
24948 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
24949
24950         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
24951
24952 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
24953
24954         * mini.c regalloc.c regalloc.h: Fix memory leak.
24955
24956 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
24957
24958         * aot.c (mono_aot_get_method): register all used strings
24959
24960 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
24961
24962         * mini.c: always intern strings references with ldstr at compile time.
24963
24964 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
24965
24966         * Makefile.am: add BUILT_SOURCES.
24967
24968 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
24969
24970         * driver.c: give a better error message when the assembly to execute
24971         doesn't have an entry point.
24972
24973 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
24974
24975         * Makefile.am: added hack for automake
24976
24977         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
24978         correct sematics.
24979
24980         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
24981
24982 22003-04-07  Martin Baulig  <martin@ximian.com>
24983
24984         * Makefile.am: Added Makefile.am.
24985
24986         * debugger-main.c: Removed, this is now in the debugger where it
24987         belongs.
24988
24989         * mini.pc.in: Call this package `mini' for the moment.
24990
24991
24992
24993
24994
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004