c9cbb6acec8dd44230c5433828fc2431408f9649
[mono.git] / mono / mini / ChangeLog
1 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
2
3         * decompose.c (mono_decompose_opcode): Add OP_ICONV_TO_U4_UN as a no-op.
4
5         * iltests.il.in: Add a test.
6
7 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
8
9         * mini-amd64.c (mono_arch_emit_call): Fail compilation if an argument is too
10         large. Fixes #567040.
11
12         * method-to-ir.c: Call CHECK_CFG_EXCEPTION after emitting a call.
13
14 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
15
16         * method-to-ir.c (handle_ccastclass): Call save_cast_details (). Fixes
17         #592711.
18
19 2010-03-31 Rolf Bjarne Kvinge <RKvinge@novell.com>
20
21         * mini-trampolines.c: Surround mono_handler_block_guard_trampoline and
22         mono_create_handler_block_trampoline with the proper #ifdef so that it
23         compiles on amd64.
24
25 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
26
27         * mini-exceptions.c: Introduce mono_walk_stack_full, which
28         allows to select if it's new or old context that is passed to 
29         the callback.
30
31         * mini-exceptions.c (mono_handle_exception_internal): Handle the
32         case when executing a guarded handler from the EH machinery.
33
34         * mini-exceptions.c (mono_install_handler_block_guard): New function
35         responsible for checking for handler blocks, installing the guard and
36         clearing abort state.
37
38         * mini-posix.c (sigusr1_signal_handler): Call mono_install_handler_block_guard
39         to check for handler blocks and skip interruption logic if one was found.
40
41         * mini-trampolines.c (mono_handler_block_guard_trampoline): Function called
42         by the handler block guard trampoline. Resumes interruption by raising the
43         pending ThreadAbortException.
44
45         * mini.c (create_jit_info): Calculate the end address of a finally block.
46
47         * mini-x86.c (mono_arch_install_handler_block_guard): Patch the return address
48         of a finally block to a specified address and return the old one.
49
50         * tramp-x86.c (mono_arch_create_handler_block_trampoline): The handler block
51         trampoline patches the original return address and calls the trampoline function.
52
53 2010-03-30  Zoltan Varga  <vargaz@gmail.com>
54
55         * mini-trampolines.c (mono_aot_trampoline): Remove some dead code.
56
57         * aot-runtime.c (mono_aot_patch_plt_entry): New helper function, which only
58         does the patching if the callee is in the same domain.
59
60         * aot-runtime.c mini-trampolines.c: Call mono_aot_patch_plt_entry instead
61         of mono_arch_patch_plt_entry ().
62
63 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
64
65         * mini.c (create_jit_info): Fix try block hole length encoding.
66
67 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
68
69         * mini.c (create_jit_info): Emit saner debug spew. Now it doesn't
70         duplicate information and print offsets instead of absolute addresses.
71
72 2010-03-29  Zoltan Varga  <vargaz@gmail.com>
73
74         * debugger-agent.c (jit_end): Send type loads for types loaded before the VMStart
75         event is sent. Fixes #591733.
76
77 2010-03-26  Zoltan Varga  <vargaz@gmail.com>
78
79         * mini-posix.c (SIG_HANDLER_SIGNATURE): Handle the case when ctx is NULL on
80         OpenBSD.
81
82 2010-03-26  Zoltan Varga  <vargaz@gmail.com>
83
84         * debugger-agent.c (mono_debugger_agent_init): Set the GC type of the
85         thread_to_tls hash table.
86
87         * image-writer.c (bin_writer_emit_writeout): Fix the size of the got.plt
88         section. Fixes #591000.
89
90 2010-03-26  Andreas Faerber  <andreas.faerber@web.de>
91
92         * Makefile.am (version.h): Check for pure .git directory only,
93         fixes SVN revision when using git without git-svn.
94
95         Contributed under MIT/X11 license.
96
97 2010-03-26  Zoltan Varga  <vargaz@gmail.com>
98
99         * aot-runtime.c: Apply some openbsd changes from openbsd ports.
100
101 2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
102
103         * basic-simd.cs: Test for vector x scalar binary operators.
104
105 2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
106
107         * simd-intrincs.c (simd_intrinsic_emit_binary): Support binary
108         intrinsics with expanded scalar arguments.
109
110 2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
111
112         * mini-exceptions.c (get_exception_catch_class): Non catch clauses
113         don't have an exception class, so don't decode it. This would crash
114         with filter clauses.
115
116 2010-03-24  U-anarquia\miguel  <miguel@anarquia>
117
118         Make sure that trunk builds with DISABLE_JIT, an update to the
119         PlayStation 3 port.
120         
121         * mini.c (mini_get_shared_method): this code seems to be necessary
122         regardless of whether DISABLE_JIT has been defined.
123
124         (mono_jit_compile_method_inner): it seems that this method is
125         required even in full AOT mode, so ifdef out only the pieces that
126         try to genrate code (the body of code that applies patches to the
127         code).  
128
129         (mini_method_compile): do not compile when using DISABLE_JIT.
130
131         * mini-ppc.c (mono_arch_get_allocatable_int_vars)
132         (mono_arch_output_basic_block, mono-arch_emit_exceptions): Do not
133         compile when DISABLE_JIT is set.
134
135 2010-03-24  Mark Probst  <mark.probst@gmail.com>
136
137         * mini.c (mono_create_tls_get): Only create a TLS operation if the
138         arch really supports it.
139
140 2010-03-24  Mark Probst  <mark.probst@gmail.com>
141
142         * mini-x86.c, mini-x86.h, mini.c: CEE_MONO_TLS support for Darwin/x86.
143
144 2010-03-23  Neale Ferguson <neale@sinenomine.net>
145
146         * exceptions-s390x.c: Add support for
147         mono_arch_get_throw_corlib_exception and fix throw by name.
148
149         * mini-s390x.c: Add IMT support; Fix stack parameter passing
150         logic (especially for varargs); Correct localloc sizing; Add
151         mono_arch_get_this_arg_from_call and
152         mono_arch_get_this_arg_from_call.
153
154         * mini-s390x.h: Add support for facility list extraction;
155         Correct/update MONO_ARCH_xxx settings.
156
157         * mini-s390.c: Minor corrections to instruction output for
158         varargs. No IMT implementation - I think it's time to deprecate
159         s390 and just leave s390x.
160
161         * tramp-s390x.c: Correct creation of trampoline instruction
162
163
164         * cpu-s390x.md: Update some instruction lengths
165
166 2010-03-23  Zoltan Varga  <vargaz@gmail.com>
167
168         * mini-generic-sharing.c (fill_in_rgctx_template_slot): Remove an assert which
169         can be hit with partial sharing.
170
171         * mini-generic-sharing.c (get_shared_class): Handle partially shared methods
172         in non-shared classes correctly.
173         (generic_inst_is_sharable): Allow all primitive types in partial sharing.
174         Turn on partial sharing.
175
176 2010-03-23  Zoltan Varga  <vargaz@gmail.com>
177
178         * mini-amd64.h: Put back MONO_ARCH_NOMAP32BIT for OpenBSD which was removed
179         by mistake.
180
181 2010-03-23  Zoltan Varga  <vargaz@gmail.com>
182
183         * method-to-ir.c (mono_method_to_ir): Handle the failure of
184         mono_method_signature ().
185
186         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
187
188         * mini.c (mini_method_compile): Get the signature of cfg->method early with
189         error checking, so later calls do not need error checking.
190
191 2010-03-22  Zoltan Varga  <vargaz@gmail.com>
192
193         * exceptions-amd64.c: Add support for OpenBSD which has no UCONTEXT_GREGS.
194
195         * mini-amd64.h: Enable MONO_ARCH_USE_SIGACTION on OpenBSD as well.
196
197 2010-03-22 Rodrigo Kumpera  <rkumpera@novell.com>
198
199         * mini-exceptions.c (mono_handle_exception_internal): Don't
200         check try_end for archs different than s390. 
201
202         * mini.c (create_jit_info): Don't crash if the finallt block is the
203         last one.
204
205 2010-03-22 Rodrigo Kumpera  <rkumpera@novell.com>
206
207         * driver.c (mono_main): Don't free global codeman under linux since
208         glic now peeks at code on stack for more archs than just amd64.
209
210 Mon Mar 22 18:09:09 CET 2010 Paolo Molaro <lupus@ximian.com>
211
212         * mini.c, method-to-ir.c: changes to support compressed interface
213         bitmaps.
214
215 2010-03-22  Zoltan Varga  <vargaz@gmail.com>
216
217         * mini-x86.h: Applied patch from Robert Nagy (Robert@openbsd.org).
218         Use sigaction on OpenBSD too.
219
220 2010-03-22  Zoltan Varga  <vargaz@gmail.com>
221
222         * debugger-agent.c (event_req_matches_assembly): Handle request modifiers too.
223
224 2010-03-21  Andreas Faerber  <andreas.faerber@web.de>
225
226         * debugger-agent.c: #include sys/select.h for fd_set.
227
228         Code is contributed under MIT/X11 license.
229
230 2010-03-21  Zoltan Varga  <vargaz@gmail.com>
231
232         * mini.c (SIG_HANDLER_SIGNATURE): Fix the build on platforms without sigaction
233         (openbsd+amd64 ?).
234
235 2010-03-21  Zoltan Varga  <vargaz@gmail.com>
236
237         * mini-ppc.c (mono_arch_emit_exceptions): Avoid an assert in ppc_patch () for
238         some large methods with lots of exception handlers. Fixes #440924.
239
240 Sat Mar 20 11:56:24 CET 2010 Paolo Molaro <lupus@ximian.com>
241
242         * method-to-ir.c: remove code duplication for interface checks.
243
244 2010-03-19  Zoltan Varga  <vargaz@gmail.com>
245
246         * debugger-agent.c (clear_event_requests_for_assembly): New helper function.
247         (assembly_unload): Clear all event requests referencing the to-be unloaded
248         assembly.
249
250
251 Fri Mar 19 16:45:20 CET 2010 Paolo Molaro <lupus@ximian.com>
252
253         * mini.h, mini-exceptions.c: restore the state of the stack
254         guard page permissions.
255
256 2010-03-19  Zoltan Varga  <vargaz@gmail.com>
257
258         * mini-trampolines.c (common_call_trampoline): Remove the condition guarding the
259         call site patching code, it doesn't appear to be needed.
260
261 2010-03-19  Zoltan Varga  <vargaz@gmail.com>
262
263         * mini-generic-sharing.c: Add infrastructure for partial sharing, ie.
264         sharing generic methods whose type arguments are a mix of reference and
265         non-reference types. Not yet turned on.
266
267         * mini.c (mini_get_shared_method): New helper function to return
268         the method which will be compiled/registered in the JIT tables when doing
269         generic sharing.
270         (mono_domain_lookup_shared_generic): Moved to mini.c from mini-generic-sharing.c,
271         use mini_get_shared_method ().
272
273         * mini.c (mini_method_compile): Register the same method which is compiled when
274         doing generic sharing.
275
276         * mini.c aot-compiler.c aot-runtime.c: Add support for partial sharing.
277
278         * generics.cs: Add partial sharing tests.
279
280 2010-03-17 Jerry Maine  <crashfourit@gmail.com>
281
282         * mini.h : Changed the SIMD_VERSION* enum values to match those in Mono.Simd.AccelMode.
283                    Add an enum value that or's all possable values together. Add an enum value
284                    that marks the end of the used bit indexes.
285
286         * mini-amd64.c : Make changes to match the changes in mini.h 
287
288         * mini-x86.c : Make changes to match the changes in mini.h
289
290         * simd-intrinsics.c : Reorder the SimdIntrinsc struct to add more bits to
291                    simd_version to support more simd versions. Changed the name of
292                    simd_version to simd_version_flags to make it more intuitive that
293                    it now contains bit flags. Reordered the *_intrinsics arrays to
294                    match the changes above. Changed emit_intrinsics() to use the new
295                    setup mentioned above.
296
297         Code is contributed under MIT/X11 license.
298
299 2010-03-17 Rodrigo Kumpera  <rkumpera@novell.com>
300
301         * mini-*.c (mono_arch_output_basic_block): Record try block holes on all
302         remaining archs. Alpha and hppa maintainers, please stand up.
303
304 2010-03-17  Zoltan Varga  <vargaz@gmail.com>
305
306         * mini-ppc.c (mono_arch_build_imt_thunk): Always save and restore r11 since it
307         is needed even when fail_tramp!=NULL.
308
309 2010-03-17  Zoltan Varga  <vargaz@gmail.com>
310
311         * debugger-agent.c (insert_breakpoint): Write a log message.
312
313 2010-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
314
315         * iltests.il.in: Add a few tests for LEAVE going over multiple
316         finally clauses.
317
318 2010-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
319
320          * mini-x86.c (mono_arch_output_basic_block): Record try block holes.
321
322 2010-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
323
324         * mini.h (MonoBasicBlock): Add native_length field.
325         * mini.h (MonoCompile): Add try_block_holes field.
326         * mini.h (MonoInst): Add exception_clause pointer to
327         the data union.
328
329         * mini.c (mono_codegen): Calculate MonoBasicBlock::native_length.
330         * mini.c (mono_cfg_add_try_hole): New function to register possible
331         holes in try blocks.
332         * mini.c (create_jit_info): Fill in the holes information.
333
334         * mini-exceptions.c: Verify for holes when checking if an IP is covered
335         by a try block.
336
337         * method-to-ir.c: Add the EH clause to the CALL_HANDLE instruction.
338
339 Tue Mar 16 13:16:16 CET 2010 Paolo Molaro <lupus@ximian.com>
340
341         * jit-icalls.c: adjusted for the array API changes.
342
343 2010-03-16  Zoltan Varga  <vargaz@gmail.com>
344
345         * iltests.il.in: Disable the fconv_to_i test on sparc too.
346
347 2010-03-16  Zoltan Varga  <vargaz@gmail.com>
348
349         * debugger-agent.c: Simplify the way breakpoints are processed by removing
350         the 'pending' flag. This fixes support for appdomains too.
351
352
353 Mon Mar 15 18:25:49 CET 2010 Paolo Molaro <lupus@ximian.com>
354
355         * mini-amd64.c, mini-ia64.c: remove direct access to method->header.
356
357 2010-03-12  Zoltan Varga  <vargaz@gmail.com>
358
359         * simd-intrinsics.c (simd_intrinsic_emit_getter): Don't emit shuffle opcodes
360         when using LLVM, LLVM generates it itself when needed.
361
362         * mini-llvm-cpp.cpp (mono_llvm_build_aligned_load): New helper function.
363
364         * mini-llvm.c: Use an unaligned load for OP_LOADX_MEMBASE. Add zero extension
365         to some OP_EXTRACT_ opcodes. Fix the naming of some sse intrinsics. Fix
366         OP_ANDNPS/OP_ANDNPD.
367
368 2010-03-11  Zoltan Varga  <vargaz@gmail.com>
369
370         * tramp-x86.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code' for
371         the pc instead of 'buf'. Fix the call to mono_arch_flush_icache ().
372         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
373
374 2010-03-11  Martin Baulig  <martin@ximian.com>
375
376         * debugger-agent.c (type_commands): Add NULL check to
377         `CMD_TYPE_GET_SOURCE_FILES'.
378
379 2010-03-09  Zoltan Varga  <vargaz@gmail.com>
380
381         * mini-ppc.c (mono_arch_decompose_opts): Fix OP_ICONV_TO_R_UN when cross-compiling.
382
383 2010-03-09  Zoltan Varga  <vargaz@gmail.com>
384
385         * mini-codegen.c (mono_peephole_ins): Fix the OP_FMOVE optimization. Fixes
386         #586664.
387
388         * iltests.il.in: Add a test.
389
390 2010-03-05  Martin Baulig  <martin@ximian.com>
391
392         Add support for aborting invocations.
393
394         * debugger-agent.c
395         (InvokeData): Added `InvokeData *last_invoke'.
396         (DebuggerTlsData): Renamed `invoke' into `pending_invoke' and
397         added a new `invoke' field to keep the `InvokeData *' throughout
398         the invocation.
399         (ErrorCode): Added `ERR_NO_INVOCATION'.
400         (CmdVM): Added `CMD_VM_ABORT_INVOKE'.
401         (mono_debugger_agent_handle_exception): Don't report any exception
402         if an abort was requested.
403         (invoke_method): Store the `InvokeData *' in `tls->invoke'; reset
404         a thread abort if necessary.
405         (vm_commands): Implement `CMD_VM_ABORT_INVOKE'.
406
407 2010-03-08  Rodrigo Kumpera  <rkumpera@novell.com>
408
409         * method-to-ir.c: Store the initial basic block returned by mono_basic_block_split
410         so we can release the whole list and not just the first one. Free
411         it in more places as well.
412
413 2010-03-08  Rodrigo Kumpera  <rkumpera@novell.com>
414
415         * method-to-ir.c: Revert r153222 as it doesn't belong here.
416
417 Mon Mar 8 17:58:26 CET 2010 Paolo Molaro <lupus@ximian.com>
418
419         * mini.h, *.c: prepare for MonoMethodHeader to become a transient entity.
420
421 Mon Mar 8 17:35:26 CET 2010 Paolo Molaro <lupus@ximian.com>
422
423         * driver.c: report also other misc build options.
424
425 2010-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
426
427         * method-to-ir.c: Generate better code for the NewObject
428         intrinsic.
429         
430 2010-03-07  Zoltan Varga  <vargaz@gmail.com>
431
432         * branch-opts.c (mono_if_conversion): Disable one of the cases when deadce
433         is disabled. Fixes #582322.
434
435         * iltests.il.in: Add a test.
436
437 2010-03-06  Zoltan Varga  <vargaz@gmail.com>
438
439         * tramp-amd64.c (mono_arch_create_monitor_exit_trampoline_full): Delegate
440         the handling of obj->synchronization == null and owner != current thread to
441         mono_monitor_exit ().
442
443         * tramp-x86.c (mono_arch_create_monitor_exit_trampoline_full): Ditto.
444
445
446 Sat Mar 6 18:14:15 CET 2010 Paolo Molaro <lupus@ximian.com>
447
448         * mini.c: change the way emulated opcode info is stored and save about
449         4 KB of runtime memory.
450
451 2010-03-04  David S. Miller  <davem@davemloft.net>
452
453        * mini-sparc.h: Always use MONO_ARCH_USE_SIGACTION.  Linux kernels
454        that don't provide the siginfo in the second signal handler argument
455        are buggy, and this has been fixed for years.
456        * mini.h (GET_CONTEXT): Remove __sparc__ special case.
457        (SIG_HANDLER_SIGNATURE, SIG_HANDLER_PARMS): Likewise.
458
459 2010-03-04  Zoltan Varga  <vargaz@gmail.com>
460
461         * aot-runtime.c (find_symbol): Fix a leak.
462         (decode_patch): Ditto.
463
464 2010-03-04  Zoltan Varga  <vargaz@gmail.com>
465
466         * mini.h (MONO_INST_IS_TEMP): Kill this unused define.
467
468 2010-03-04  Zoltan Varga  <vargaz@gmail.com>
469
470         * mini.c (mono_resolve_patch_target): Fix an uninitialized variable.
471
472 Wed Mar 3 19:19:21 CET 2010 Paolo Molaro <lupus@ximian.com>
473
474         * method-to-ir.c: MONO_PROFILE_STRING_ALLOC is dead.
475
476 2010-03-03  Rodrigo Kumpera  <rkumpera@novell.com>
477
478         * method-to-ir.c (mono_method_to_ir): Don't create a runtime vtable
479         to check for errors, it's enough to create the metadata open.
480
481         Fixes #562150
482
483 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
484
485         * trace.c|h:
486         * mini-exceptions.c: Add support for printing stack traces when handling
487         exceptions, and when printing exceptions thrown while tracing also print
488         the exception message.
489
490 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
491
492         * trace.c: We need to parse exclude tokens ('-') before string tokens,
493         since the exclude token is a valid string character.
494
495 2010-03-02  Levi Bard  <levi@unity3d.com>
496
497         * debugger-agent.c: Invalidate thread stacks on domain unload.
498
499 2010-03-02  Mark Probst  <mark.probst@gmail.com>
500
501         * method-to-ir.c: Emit dummy_use for stored reference after write
502         barriers to make sure the object is pinned if the GC interrupts
503         before the write barrier is done.
504
505 2010-03-02  Zoltan Varga  <vargaz@gmail.com>
506
507         * cpu-<ARCH>.md: dummy_use was missing src1:i.
508
509 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
510
511         * debugger-agent.c: Add a log message printing the protocol version.
512
513 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
514
515         * debugger-agent.c: Add a new command to communicate the protocol version used
516         by the client. This could be used to allow newer runtimes to communicate with
517         older clients.
518
519 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
520
521         * debugger-agent.c (domain_commands): Add a new command to create a boxed value.
522
523 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
524
525         * debugger-agent.c (type_commands): Fix the setting of fields with a reference
526         type.
527
528 Mon Mar 1 15:20:44 CET 2010 Paolo Molaro <lupus@ximian.com>
529
530         * mini-arm.c: make the arm cpu arch configurable with the
531         MONO_CPU_ARCH env var (for example: "armv4 thumb").
532         Bug #584198.
533
534 Mon Mar 1 14:48:35 CET 2010 Paolo Molaro <lupus@ximian.com>
535
536         * mini.c, mini.h, driver.c: added the --jitmap option to enable
537         support for the perf tool on Linux.
538
539 Mon Mar 1 14:43:55 CET 2010 Paolo Molaro <lupus@ximian.com>
540
541         * method-to-ir.c: make string.InsertenalSetChar() specialization
542         effective.
543
544 2010-03-01  Robert Jordan  <robertj@gmx.net>
545
546         * Makefile.am: fix the non-static build.
547
548 2010-02-26  Zoltan Varga  <vargaz@gmail.com>
549
550         * mini-generic-sharing.c: Move the contents of ../metadata/generic-sharing.c
551         here.
552
553 2010-02-26  Robert Jordan  <robertj@gmx.net>
554
555         * tasklets.c (continuation_store): Return from an error condition
556         immediately.
557
558 2010-02-26  Martin Baulig  <martin@ximian.com>
559
560         * debug-debugger.c (MonoDebuggerInfo): Added `abort_runtime_invoke'.
561
562         * debug-mini.c
563         (MonoDebuggerThreadInfo): Added `internal_flags'.
564         (MonoDebuggerInternalThreadFlags): New enum.
565         (_mono_debugger_throw_exception): Don't signal the debugger if a
566         type abort was requested.
567         (_mono_debugger_unhandled_exception): Likewise.
568         (mono_debugger_abort_runtime_invoke): New method to abort an invocation.
569         (mono_debugger_runtime_invoke): If the debugger requested a thread
570         abort during the invocation, reset it here.
571
572 2010-02-26  Martin Baulig  <martin@ximian.com>
573
574         * debug-mini.c (MonoDebuggerThreadInfo): Use `MonoInternalThread *'
575         instead of `MonoThread *'.
576
577 2010-02-25  Zoltan Varga  <vargaz@gmail.com>
578
579         * aot-runtime.c (mono_aot_find_jit_info): Use a merge sort for sorting the
580         code offsets table, as it is mostly sorted.
581
582 2010-02-25  Zoltan Varga  <vargaz@gmail.com>
583
584         * debugger-agent.c (do_invoke_method): Fix invoking of static methods on vtypes.
585         Fixes #582991.
586
587 2010-02-25  Zoltan Varga  <vargaz@gmail.com>
588
589         * driver.c (mono_main): Get rid of mono_setup_vtable_in_class_init.
590
591 Wed Feb 24 15:58:03 CET 2010 Paolo Molaro <lupus@ximian.com>
592
593         * Makefile.am: build the new ABI version of the libmono library.
594         * debugger-agent.c, mini.c: fix warnings with the new API.
595         * jit.h: don't depend on glib.h being included.
596
597 2010-02-24  Zoltan Varga  <vargaz@gmail.com>
598
599         * method-to-ir.c (mono_method_to_ir): Implement AOT support for fast TLS access.
600
601 2010-02-24  Zoltan Varga  <vargaz@gmail.com>
602
603         * method-to-ir.c (mono_method_to_ir): Implement support for fast access to
604         ThreadStatic variables.
605
606 2010-02-24  Zoltan Varga  <vargaz@gmail.com>
607
608         * debugger-agent.c (notify_thread): Skip terminated threads, since their tls
609         data is not freed yet. Fixes #582460.
610
611 2010-02-23  Zoltan Varga  <vargaz@gmail.com>
612
613         * debugger-agent.c: Add support for the caught/uncaught flags on exception
614         event requests. Bump protocol minor version.
615
616 2010-02-22  Zoltan Varga  <vargaz@gmail.com>
617
618         * decompose.c (mono_decompose_long_opts): Handle OP_LCONV_TO_OVF_I8 here too.
619
620 2010-02-22  Zoltan Varga  <vargaz@gmail.com>
621
622         * decompose.c (mono_decompose_opcode): Handle OP_LCONV_TO_OVF_I8. Fixes
623         #581950.
624
625         * iltests.il.in: Add a test.
626
627 2010-02-22  Rodrigo Kumpera  <rkumpera@novell.com>
628
629         * mini.c (inline_method): Check for loader errors.
630
631 2010-02-22  Rodrigo Kumpera  <rkumpera@novell.com>
632
633         * mini.c (mono_method_check_inlining): Use !mono_method_get_header_summary
634         instead of mono_method_get_header as it doesn't decode locals
635         so the called method can have unresolved dependencies that will only
636         be satisfied after the current method is JIT'd.
637
638         Fixes #550968.
639
640 2010-02-22  Zoltan Varga  <vargaz@gmail.com>
641
642         * basic.cs (test_0_div_opt): Speed this up a bit.
643
644 2010-02-20  Zoltan Varga  <vargaz@gmail.com>
645
646         * mini-amd64.c: Fix DISABLE_JIT support after the latest changes.
647
648         * mini.c (mono_jit_create_remoting_trampoline): Call
649         mono_create_specific_trampoline () instead of
650         mono_arch_create_specific_trampoline ().
651
652         * mini-trampolines.c tramp-arm.c: Disable more stuff when DISABLE_JIT is set.
653
654 2010-02-20  Zoltan Varga  <vargaz@gmail.com>
655
656         * unwind.c (mono_unwind_get_cie_program): New function, moved here from
657         aot-compiler.c, so it can be found even if DISABLE_JIT is set.
658
659         * aot-compiler.c xdebug.c: Update callers of mono_arch_unwind_get_cie_program ().
660
661         * mini-amd64.c: Fix DISABLE_JIT support.
662
663 2010-02-20  Geoff Norton  <gnorton@novell.com>
664
665         * aot-runtime.c: Ensure we dont leak a held lock when unwinding exceptions.
666
667 2010-02-20  Zoltan Varga  <vargaz@gmail.com>
668
669         * debugger-agent.c (mono_debugger_agent_handle_exception): Receive two contexts,
670         one for the throw and one for the catch. Mark uncaught exceptions by a NULL
671         CATCH_TXT. Send normal exception events for unhandled exceptions too.
672         (mono_debugger_agent_handle_unhandled_exception): Remove this, merged into
673         handle_exception.
674
675 2010-02-18  Zoltan Varga  <vargaz@gmail.com>
676
677         * exceptions-x86.c (mono_arch_get_restore_context): Changes this so it restores
678         edx/ecx too. This is needed to support OP_SEQ_POINT.
679
680 2010-02-18  Zoltan Varga  <vargaz@gmail.com>
681
682         * exceptions-amd64.c (get_throw_trampoline): Add xdebug info.
683
684         * method-to-ir.c (mono_method_to_ir): Fix SIZEOF in dynamic methods.
685
686 2010-02-16  Zoltan Varga  <vargaz@gmail.com>
687
688         * mini-llvm.c aot-compiler.c aot-runtime.c unwind.c: Finish support
689         LLVM+AOT+exceptions, not enabled yet.
690
691 2010-02-15  Zoltan Varga  <vargaz@gmail.com>
692
693         * mini.c (SIG_HANDLER_SIGNATURE): Fix the windows build.
694
695 2010-02-15  Zoltan Varga  <vargaz@gmail.com>
696
697         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Emit
698         xdebug info for these.
699
700         * mini-trampolines.c (common_call_trampoline): Use mini_jit_info_table_find ()
701         in a few places.
702
703         * mini.c (mini_get_vtable_trampoline): Make this take a 'slot_index' argument,
704         not used yet.
705
706 2010-02-13  Zoltan Varga  <vargaz@gmail.com>
707
708         * aot-compiler.c (load_profile_files): Update after the profiler changes.
709
710 2010-02-13  Zoltan Varga  <vargaz@gmail.com>
711
712         * mini.c (mono_jit_compile_method_inner): Avoid passing icall wrappers to
713         mono_profiler_method_end_jit, since the profiler has no way to process wrappers.
714
715         * aot-runtime.c mini.c: Resurrect the aot pagefault profiling stuff, it is useful
716         for mtouch.
717
718 2010-02-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
719
720         * debugger-agent.c: handle incomplete reads and EINTR in
721         recv()/send(). This could have been causing random
722         disconnections.
723
724 2010-02-13  Zoltan Varga  <vargaz@gmail.com>
725
726         * aot-runtime.c (decode_exception_debug_info): Fix aot support for sequence
727         points.
728
729         * mini-arm.c (mono_arch_allocate_vars): Allocate the seq point related vars first
730         so they have small offsets. Fixes #566311.
731
732 2010-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
733
734         * method-to-ir.c (mono_method_check_inlining): Check for loader errors.
735
736 2010-02-11  Zoltan Varga  <vargaz@gmail.com>
737
738         * mini-amd64.c: Remove the special casing of byref in a few places now that
739         mini_type_get_underlying_type () handles it.
740
741         * mini-generic-sharing.c (mini_type_get_underlying_type): Handle byref as well
742         by returning native int. Fixes #577984.
743
744 2010-02-11  Zoltan Varga  <vargaz@gmail.com>
745
746         * method-to-ir.c (handle_isinst): Factor out the is_complex_isinst check into
747         a macro.
748
749         * mini-llvm.c (exception_cb): Put the clause index into the type info instead
750         of putting the clause itself.
751
752         * mini-arm.c mini.c linear-scan.c: Disable more stuff when DISABLE_JIT is used.
753
754 2010-02-09  Zoltan Varga  <vargaz@gmail.com>
755
756         * unwind.c (mono_unwind_frame): Use read32 for reading a 32 bit value, since it
757         might be unaligned.
758
759 2010-02-10  Geoff Norton  <gnorton@novell.com>
760
761         * aot-compiler.c: Make the number of IMT trampolines configurable as well.
762
763 2010-02-08  Zoltan Varga  <vargaz@gmail.com>
764
765         * aot-compiler.c (emit_code): Create the ut trampolines here, so they work for
766         llvm methods too.
767
768         * aot-compiler.c (emit_code): Don't add the llvm label prefix to 'methods', since
769         it is not an LLVM generated symbol.
770
771         * mini-llvm.c (emit_entry_bb): Fix the handling of simd types.
772
773         * method-to-ir.c (handle_castclass): Turn off the more efficient isinst/castclass
774         implementation in gshared mode because it causes regressions.
775
776         * mini-trampolines.c: Add a stat for the number of calls to trampolines.
777
778         * image-writer.c (asm_writer_emit_global): Don't prepend the global prefix, it
779         should be done by the caller.
780
781         * mini-llvm.c (mono_llvm_emit_method): Don't make the debug symbols global.
782
783         * aot-compiler.c (emit_code): Add the llvm label prefix before 'methods'.
784
785         * mini-exceptions.c (mini_jit_info_table_find): Search the root domain as well,
786         since mono_jit_info_table_find () doesn't do it anymore.
787
788         * mini-generic-sharing.c debugger-agent.c: Call mini_jit_info_table_find ()
789         instead of mono_jit_info_table_find ().
790
791 2010-02-07  Zoltan Varga  <vargaz@gmail.com>
792
793         * aot-compiler.c aot-runtime.c: Add support for MONO_WRAPPER_WRITE_BARRIER.
794
795         * aot-compiler.c (encode_method_ref): Update after the removal of
796         mono_gc_get_managed_allocator_type ().
797
798         * method-to-ir.c (mono_method_to_ir): Place a seq point just before a RET.
799         Fixes #564538.
800
801 2010-02-06  Zoltan Varga  <vargaz@gmail.com>
802
803         * method-to-ir.c (handle_castclass): Use the icall for classes with variant
804         generic params as well.
805         (handle_isinst): Ditto.
806
807         * method-to-ir.c: Make isninst/castclass checks in gshared code more efficient
808         instead of always calling an icall.
809
810         * aot-compiler.c (emit_llvm_file): Take into account trampolines etc when
811         computing the size of the got.
812
813         * aot-compiler.c (emit_code): Change the way the 'methods' symbol is emitted
814         when using LLVM. Instead of emitting it as an LLVM method, emit it using
815         the assembly directive '.set' so it points to the first LLVM emitted method.
816
817 2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>
818
819         * mini.c (mini_method_verify): Report the method which failed to verify.
820
821 2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>
822
823         * method-to-ir.c (mono_method_to_ir): Use the new basic block formation pass
824         to avoid JIT'ng dead basic blocks. This is the same behavior as the
825         runtime MS verifier.
826
827 2010-02-04  Zoltan Varga  <vargaz@gmail.com>
828
829         * debugger-agent.c (decode_value): Fix decoding of vtype instances. Fixes
830         #561962.
831
832 2010-02-04  Zoltan Varga  <vargaz@gmail.com>
833
834         * mini-llvm.c: Init the jit module only when first JITting.
835
836         * aot-compiler.c (emit_plt): Fix the naming of plt entries of llvm+darwin.
837
838         * mini-llvm.c (get_plt_entry): Make the plt entries have hidden visibility.
839
840         * mini-llvm.c (mono_llvm_emit_aot_module): Remove the dummy got after it is
841         replaced with the real got.
842
843         * debugger-agent.c (type_commands): Return the enumness if the type as well.
844
845         * image-writer.c: Reduce the amount of #ifdefs a bit.
846
847         * aot-compiler.c: Reduce the amount of #ifdefs. Add beginnings of support for
848         llvm on darwin/arm.
849
850         * aot-compiler.c (mono_compile_assembly): Handle asmonly+llvm mode.
851
852         * mini-llvm.c (mono_llvm_emit_method): Don't make the 'type_info' symbols
853         global.
854
855 2010-02-02  Zoltan Varga  <vargaz@gmail.com>
856
857         * mini-llvm.c (mono_llvm_emit_method): Add support for unaligned loads.
858         (mono_llvm_emit_method): Fix unaligned stores too.
859
860         * mini-amd64.c (mono_arch_emit_prolog): Initialize lmf->rsp in the prolog too
861         so async stack walks don't crash.
862
863 2010-02-02  Zoltan Varga  <vargaz@gmail.com>
864
865         * mini-trampolines.c (common_call_trampoline): Fix a problem where the callsite
866         was not patched if the callee needed an rgctx trampoline.
867
868 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
869
870         * mini-ppc.c (mono_arch_get_global_int_regs): Reserve r29 for holding the
871         vtable address in AOT code.
872
873 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
874
875         * mini-codegen.c: Remove support for CEE_ opcodes which cannot occur in
876         MonoInst's.
877
878 Mon Feb 1 16:29:10 CET 2010 Paolo Molaro <lupus@ximian.com>
879
880         * genmdesc.pl: remove dependency on external cpp.
881
882 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
883
884         * method-to-ir.c (mini_emit_ldelema_1_ins): Avoid emitting an OP_SEXT_I4 when
885         using LLVM, its not needed, and abcrem can't handle it.
886
887 Mon Feb 1 14:29:43 CET 2010 Paolo Molaro <lupus@ximian.com>
888
889         * genmdesc.c, genmdesc.pl, cpu-x86.md: introduced templates to make
890         it easier to group instructions and reduce duplication.
891
892 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
893
894         * decompose.c: Move the array/soft float decompose routines here from
895         method-to-ir.c.
896
897         * method-to-ir.c: Export a few functions so they can be used from decompose.c.
898
899 2010-01-31  Zoltan Varga  <vargaz@gmail.com>
900
901         * mini-llvm.c (mono_llvm_emit_method): Add a call to llvm.invariant.start
902         to tell LLVM that the got is constant, not used yet.
903
904         * aot-compiler.c: Pass more optimization flags to llvm's 'opt'.
905
906 2010-01-30  Zoltan Varga  <vargaz@gmail.com>
907
908         * mini-ppc.c (mono_arch_emit_prolog): Fix full aot support for native to
909         managed wrappers.
910
911 2010-01-30  Zoltan Varga  <vargaz@gmail.com>
912
913         * aot-compiler.c (add_wrappers): Commit the hack which generates
914         native-to-managed wrappers for methods decorated with the MonoPInvokeCallback
915         custom attribute.
916
917 2010-01-29  Zoltan Varga  <vargaz@gmail.com>
918
919         * mini.h (MONO_INST_FAULT): New instruction flag for loads which can cause
920         a fault, only used by the LLVM backend.
921
922         * ir-emit.h: Add _FAULT variants of the LOAD_MEMBASE macros. Mark
923         OP_CHECK_THIS with OP_IMPLICIT_EXCEPTION.
924
925         * method-to-ir.c: Use the new LOAD_MEMBASE_FAULT opcodes, get rid of the
926         calls to MONO_EMIT_NULL_CHECK which is automatically done by the new macros.
927
928         * mini-llvm.c: Only generate volatile loads from load instructions which have
929         the MONO_INST_FAULT flag set.
930
931 2010-01-29  Zoltan Varga  <vargaz@gmail.com>
932
933         * unwind.c (mono_unwind_decode_fde): Fix the decoding of the LSDA offset on
934         64 bit platforms.
935
936 2010-01-28  Zoltan Varga  <vargaz@gmail.com>
937
938         * mini.c (mono_save_seq_point_info): Fix the handling of bblocks without
939         sequence points. Fixes #571236.
940
941 2010-01-28  Zoltan Varga  <vargaz@gmail.com>
942
943         * debugger-agent.c (mono_debugger_agent_init): Call appdomain_unload at the
944         end of the appdomain unload process, after assemblies have been unloaded.
945         Fixes #574842.
946
947 2010-01-27  Zoltan Varga  <vargaz@gmail.com>
948
949         * abcremoval.c (process_block): Fix the if (region) check so abcrem actually
950         works.
951
952         * mini-amd64.c: Make the soft debugger work on platforms without MAP_32BIT.
953         Fixes #573988.
954
955 2010-01-26  Zoltan Varga  <vargaz@gmail.com>
956
957         * dwarfwriter.c (emit_type): Treat MONO_TYPE_PTR as 'I' not 'I4'.
958
959 2010-01-26  Geoff Norton  <gnorton@novell.com>
960
961         * aot-compiler.c: Fix a logic error introduced when guarding against enums
962         with struct marshalability.
963
964 2010-01-24  Zoltan Varga  <vargaz@gmail.com>
965
966         * mini.c (mini_method_compile): Improve the processing MONO_VERBOSE_METHOD so
967         it supports class names as well.
968
969         * mini.h (MonoCompile): Add a few flags to control JIT behavior which are
970         needed by the GC map code.
971
972         * mini.c (mini_method_compile): Call a function in mini-gc.c to set the new
973         flags if needed.
974
975         * method-to-ir.c (mono_method_to_ir): Emit initialization code for ref variables
976         if cfg->init_ref_vars is set.
977
978         * liveness.c (optimize_initlocals): Disable the initlocals opt for ref vars if
979         cfg->disable_initlocals_op_refs is set.
980
981         * method-to-ir.c (mono_spill_global_vars): Compute more precise live ranges
982         using liveness info if cfg->compute_precise_live_ranges is set.
983
984         * mini-gc.c: Ongoing work. Improve logging and debugging support. Handle
985         volatile variables correctly. Add comments about the live ranges. Not enabled
986         yet.
987
988 2010-01-24  Zoltan Varga  <vargaz@gmail.com>
989
990         * mini.h (MonoDebugOptions): Add an option to init stack frames by writing
991         0x2a into them in method prologs.
992
993         * mini-amd64.c (mono_arch_emit_prolog): Implement it.
994
995 2010-01-22  Zoltan Varga  <vargaz@gmail.com>
996
997         * mini-llvm-cpp.cpp: Remove uses of dynamic_cast, it no longer works with llvm
998         classes, since llvm is compiled with -fno-rtti.
999
1000         * mini.h (COMPILE_SOFT_FLOAT): New macro, similar to COMPILE_LLVM.
1001
1002         * method-to-ir.c ir-emit.h: Use if (COMPILE_SOFT_FLOAT) in a few places since
1003         llvm does not require it.
1004
1005         * aot-runtime.c (load_method): Print the full name of the last aot method.
1006
1007 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
1008
1009         * exceptions-amd64.c (mono_arch_notify_pending_exc): Avoid a crash if the
1010         thread has not fully started yet.
1011
1012 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
1013
1014         * aot-compiler.c (can_marshal_struct): Allow marshalling enums.
1015
1016 2010-01-21  Miguel de Icaza  <miguel@novell.com>
1017
1018         * driver.c: Do not abort if LLVM is not supported, print a
1019         warning and add the information to the Mono JIT information.
1020
1021 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
1022
1023         * ir-emit.h (MONO_EMIT_NULL_CHECK): Don't emit an OP_IMPLICIT_EXCEPTION when
1024         using explicit null checks.
1025
1026 2010-01-20  Zoltan Varga  <vargaz@gmail.com>
1027
1028         * xdebug.c: New file extracted from aot-compiler.c, containing the XDEBUG
1029         related code.
1030
1031         * aot-compiler.c (encode_method_ref): Use mono_marshal_wrapper_info_from_wrapper
1032         () in one place.
1033         (mono_aot_wrapper_name): Remove the special handling of delegate invoke wrappers,
1034         its no longer needed.
1035
1036         * method-to-ir.c (mono_method_to_ir): Fix a warning.
1037
1038         * exceptions-<ARCH>.c: Introduce a MONO_ARCH_HAVE_THROW_EXCEPTION_BY_NAME
1039         define for platforms still using it (s390). Get rid of the
1040         mono_arch_get_throw_exception_by_name () routines on all other platforms.
1041
1042         * exceptions-x86.c: Rework the throw trampolines so there is only one function
1043         which can generate throw/rethrow/corlib trampolines for llvm/not llvm code.
1044
1045         * exceptions-x86.c: Add LLVM specific throw trampolines which doesn't assume
1046         the caller pushed the arguments.
1047
1048         * mini-llvm.c: Enable throwing exceptions on x86.
1049
1050         * mini-posix.c (SIG_HANDLER_SIGNATURE): Avoid
1051         "Thread (nil) may have been prematurely finalized" messages if this is called
1052         on a thread not registered with the runtime.
1053
1054         * mini-exceptions.c (mono_handle_native_sigsegv): Ditto.
1055
1056 2010-01-19  Zoltan Varga  <vargaz@gmail.com>
1057
1058         * jit-icalls.c (mono_array_new_3): New jit icall.
1059
1060         * aot-compiler.c aot-runtime.c: Add support for ElementAddr wrappers.
1061
1062         * arrays.cs: Add a test for 3 dimensional arrays.
1063
1064 2010-01-19  Zoltan Varga  <vargaz@gmail.com>
1065
1066         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Emit xdebug info.
1067         (mono_arch_find_jit_info_ext): Disable the popping of arguments when LLVM is
1068         used.
1069
1070         * mini-llvm.c (emit_cond_system_exception): Abort when an implicit exception is
1071         thrown on x86.
1072
1073         * unwind.c (mono_unwind_decode_fde): Fix an assert on x86.
1074
1075         * mini-x86.h (MONO_CONTEXT_SET_LLVM_EXC_REG): Define this for x86.
1076
1077         * mini-llvm.c: Disable OP_THROW on x86, it doesn't work yet.
1078
1079 2010-01-18  Bill Holmes  <billholmes54@gmail.com>
1080
1081         * debugger-agent.c : Changing the PLATFORM_WIN32 preprocessor check to
1082           HOST_WIN32.  Also including winsock2. to define struct in_addr.
1083
1084         * mini-amd64.h : Changing the PLATFORM_WIN32 preprocessor check to HOST_WIN32.
1085
1086         * mini-x86.h : Changing the PLATFORM_WIN32 preprocessor check to HOST_WIN32.
1087
1088         Code is contributed under MIT/X11 license.
1089
1090 2010-01-18  Zoltan Varga  <vargaz@gmail.com>
1091
1092         * mini.h (MonoCompile): Add 'disable_out_of_line_bblocks' flag.
1093
1094         * branch-opts.c (mono_optimize_branches): Honor the new flag.
1095
1096         * mini.c (mini_method_compile): Set the new flag when running under the
1097         debugger.
1098
1099 2010-01-18  Zoltan Varga  <vargaz@gmail.com>
1100
1101         * mini-gc.c: Change the GC map to use a ref/noref/pin value instead of just
1102         a ref/noref value + a global pin flag, so parts of stack frames can still be
1103         precisely marked even if they include stuff which needs pinning. Improve logging.
1104         Fix many bugs. Not enabled yet.
1105
1106         * gc-test.cs: Add a few tests.
1107
1108         * liveness.c (mono_analyze_liveness): Make the debug output controllable by
1109         the normal -v options. Avoid propagating liveness information through bblocks
1110         which end with a NOT_REACHED opcode.
1111
1112         * mini.c (mono_jit_compile_method_inner): Avoid reading cfg->prof_options
1113         after cfg has been freed.
1114
1115 2010-01-17  Zoltan Varga  <vargaz@gmail.com>
1116
1117         * branch-opts.c (mono_branch_optimize_exception_target): Stop the optimization
1118         if a clause is skipped because it uses the exception object, since it could
1119         have caught the exception.
1120
1121         * exceptions.cs: Add a test.
1122
1123 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
1124
1125        * mini-trampolines.c (mono_create_static_rgctx_trampoline): Add an assert.
1126
1127         * aot-runtime.c (mono_aot_get_method): Handle ftnptr's correctly for the
1128         ICollection<T> wrappers.
1129
1130 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
1131
1132         * debugger-agent.c (decode_value): Fix the decoding of I/U/PTR.
1133
1134 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
1135
1136         * mini-amd64.c (emit_call_body): Always use near calls when AOTing even if
1137         NOMAP32BIT or optimize_for_xen is set.
1138
1139 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
1140
1141         * aot-compiler.c aot-runtime.c: Get rid of mono_aot_str_hash (), use
1142         mono_metadata_str_hash () instead.
1143
1144 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
1145
1146         * ir-emit.h (MONO_EMIT_NEW_ICOMPARE_IMM): Use sizeof (mgreg_t) instead of
1147         sizeof (void*).
1148
1149         * unwind.c (mono_unwind_frame): Use mgreg_t instead of gssize.
1150
1151 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
1152
1153         * ir-emit.h (MONO_EMIT_NEW_CHECK_THIS): Emit an explicit null check if the
1154         flag is set.
1155
1156         * mini-ppc.c (mono_arch_emit_exceptions): Compute the size of the exception
1157         throwing code correctly.
1158
1159         * mini.h (MONO_AOT_FILE_VERSION): Bump this because of the IMT hashing changes.
1160
1161 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
1162
1163         * aot-runtime.c (mono_aot_plt_resolve): Reenable the previous assert for
1164         ftnptrs created by us, handle RGCTX_FETCH correctly.
1165         (mono_aot_get_lazy_fetch_trampoline): Add an ftnptr.
1166
1167         * mini-trampolines.c (mono_create_generic_class_init_trampoline): Remove the
1168         ftnptr added by mono_aot_get_named_code ().
1169
1170 2010-01-14  Zoltan Varga  <vargaz@gmail.com>
1171
1172         * mini-arm.c: Fix a few LLVM problems.
1173
1174         * mini-llvm.c (simd_class_to_llvm_type): Fix compilation on !x86/amd64.
1175
1176 2010-01-13  Mark Probst  <mark.probst@gmail.com>
1177
1178         * method-to-ir.c (mini_emit_stobj): Use EMIT_NEW_CLASSCONST when
1179         AOT compiling.
1180
1181 Wed Jan 13 15:54:53 CET 2010 Paolo Molaro <lupus@ximian.com>
1182
1183         * jit.h, method-to-ir.c: added ability to set the policy for
1184         inserting breakpoints from the break IL instruction or the
1185         Debugger.Break () API call.
1186
1187 2010-01-13  Zoltan Varga  <vargaz@gmail.com>
1188
1189         * aot-runtime.c (load_aot_module): Add more comments to explain why referenced
1190         assemblies need to be eagerly loaded.
1191
1192 2010-01-12  Zoltan Varga  <vargaz@gmail.com>
1193
1194         * dwarfwriter.c (emit_line_number_info): Fix the eglib case so it doesn't crash.
1195
1196 2010-01-11  Zoltan Varga  <vargaz@gmail.com>
1197
1198         * debugger-agent.c (mono_debugger_agent_parse_options): Allow onthrow without
1199         an argument which matches any exception.
1200
1201 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
1202
1203         * method-to-ir.c (mono_emit_method_call_full): Avoid the virt->nonvirt
1204         optimization if the called method is gshared and marshalbyref, since gshared
1205         methods can' have wrappers. Fixes #569390.
1206
1207         * generics.cs: Add a test.
1208
1209 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
1210
1211         * mini-exceptions.c (mono_print_thread_dump_from_ctx): New helper function
1212         callable from gdb.
1213
1214 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
1215
1216         * mini.c (mono_print_method_from_ip): Fix the lookup of trampolines.
1217
1218 2010-01-09  Zoltan Varga  <vargaz@gmail.com>
1219
1220         * debugger-agent.c (transport_connect): comment out freeaddrinfo calls under win32,
1221         since it is not supported in win2000.
1222
1223 2010-01-08  Zoltan Varga  <vargaz@gmail.com>
1224
1225         * aot-runtime.c (load_image): Add a SET_ERROR argument to set the loader
1226         error if loading an assembly fails.
1227         (mono_aot_plt_resolve): Return NULL instead of asserting if loading fails.
1228
1229         * mini-trampolines.c (mono_aot_plt_trampoline): Throw a pending loader error
1230         if exists.
1231
1232         * aot-runtime.c (decode_exception_debug_info): Set jinfo->from_llvm for LLVM
1233         compiled methods.
1234
1235         * mini-llvm-cpp.cpp: Remove the unused ctx variable.
1236
1237         * mini-llvm.c (mono_llvm_emit_method): Add some comments about why aot+clauses
1238         is not supported yet.
1239
1240         * unwind.c (DW_EH_PE_absptr): Add more DW_EH_PE_ constants.
1241
1242 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
1243
1244         * method-to-ir.c: All types with variant arguments must fallback to the
1245         slow path. This makes cast of variant delegates work.
1246
1247         * mini-trampolines.c (mono_get_vcall_slot_addr): Add new variance_used out
1248         argument that is set to TRUE is the returned vtable slot is for a variant
1249         interface. Changed a g_print + g_assert_not_reached to a g_error.
1250
1251         * mini-trampilines.c (common_call_trampoline): Handle variant interfaces in
1252         a similar fashion of generic virtual methods.
1253
1254 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
1255
1256         * helpers.c (mono_disassemble_code): Fix a g_hash_table warning
1257         when cfg is null.
1258
1259         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Convert a given
1260         method using a variance aware function.
1261
1262         * mini-x86.c: Add support for dumping IMT thunks if DEBUG_IMT is defined.
1263
1264 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
1265
1266         * method-to-ir.c (mono_method_to_ir): Casts to variant interfaces
1267         do an icall for now.
1268
1269 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
1270
1271         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add an ugly hack to fix #564695.
1272         If LLVM decides to set the code model to Large, reset it to Default.
1273
1274 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
1275
1276         * aot-compiler.c (mono_xdebug_flush): Export it so it is present in
1277         stripped binaries as well.
1278
1279 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
1280
1281         * mini-trampolines.c (common_call_trampoline): Add an rgctx trampoline if a shared
1282         method is called from LLVM compiled code, as that code can't pass an rgctx arg.
1283
1284         * mini-llvm.c (mono_llvm_emit_method): Enable calls to methods needing an rgctx
1285         reg.
1286
1287 2010-01-06  Zoltan Varga  <vargaz@gmail.com>
1288
1289         * mini.c (mini_method_compile): Extract the JIT info creation code into a
1290         separate function.
1291
1292         * mini-llvm.c (mono_llvm_emit_method): Pass the info in MonoExceptionClause
1293         as the type info to llvm.eh.selector.
1294         (exception_cb): Use the type info for filling out some fields of
1295         MonoJitExceptionInfo like the flags and the exception class. This is needed
1296         because the LLVM produced exception handling clauses might not match the original
1297         IL clauses, i.e. there might be more than one LLVM clause for one IL clause.
1298
1299         * unwind.c (mono_unwind_decode_fde): Extract the LSDA decoding code into a
1300         separate function. Add an extra argument which returns the type infos
1301         corresponding to the exception clauses.
1302
1303         * mini.c (mini_method_compile): Enable LLVM compilation of methods having
1304         exception handling clauses.
1305
1306 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
1307
1308         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
1309         mono_method_get_vtable_slot () instead of accessing imt_method->slot directly,
1310         to fix an AOT case.
1311
1312 2010-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1313
1314         * mini.c (mono_compile_is_broken): Skip methods from serialization's
1315         internal assembly.
1316
1317 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
1318
1319         * mini.c (mini_method_compile): Fix a few memory leaks introduced by the
1320         llvm code.
1321
1322 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1323
1324         * mini.c (mini_method_compile): Verify the method before calling
1325         mono_compile_create_vars as this might crash since it uses method
1326         information.
1327
1328         Fixes #560196.
1329
1330 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
1331
1332         * method-to-ir.c (mono_method_to_ir): Avoid calling mono_class_vtable () in
1333         one case if AOTing, since the class might not be a concrete class.
1334
1335 2010-01-03  Zoltan Varga  <vargaz@gmail.com>
1336
1337         * mini-codegen.c abcremoval.c: Remove the duplicate g_slist_append_mempool
1338         functions which are now defined in mempool-internals.h.
1339
1340         * mini.c (mini_free_jit_domain_info): Free the seq point hash tables.
1341
1342         * mini-llvm.c (mono_llvm_emit_method): Handle OP_ABS.
1343
1344 2009-12-30  Rodrigo Kumpera  <rkumpera@novell.com>
1345
1346         * mini.c:
1347         * method-to.ir.c:
1348         * mini-*.c: Properly handle generic enums.
1349
1350         Fixes #566294
1351
1352 2009-12-28  Zoltan Varga  <vargaz@gmail.com>
1353
1354         * method-to-ir.c (mono_method_to_ir): Handle the failure of mono_class_vtable ()
1355         in a few more places.
1356
1357 2009-12-27  Zoltan Varga  <vargaz@gmail.com>
1358
1359         * aot-compiler.c (add_wrappers): Don't use dyn runtime invoke for methods with
1360         nullable parameters. Fixes #567351.
1361
1362 2009-12-26  Rodrigo Kumpera  <rkumpera@novell.com>
1363
1364         * mini-trampolines.c (common_call_trampoline): Add assert for NULL resolved generic method.
1365
1366 2009-12-26  Zoltan Varga  <vargaz@gmail.com>
1367
1368         * mini-trampolines.c: Use mono_arch_get_this_arg_from_call () to avoid the slow
1369         mono_get_generic_context_from_code () call.
1370
1371         * mini-<ARCH>.c: Get rid of mono_arch_find_this_arg (), it is no longer used.
1372
1373 2009-12-25  Zoltan Varga  <vargaz@gmail.com>
1374
1375         * aot-runtime.c (decode_klass_ref): Don't call mono_class_init (), its not
1376         needed.
1377
1378 2009-12-24  Sebastien Pouliot  <sebastien@ximian.com>
1379
1380         * method-to-ir.c (mono_method_to_ir): Avoid SIGSEGV when
1381         mono_method_get_signature returns NULL. Fix #567084
1382
1383 2009-12-25  Zoltan Varga  <vargaz@gmail.com>
1384
1385         * aot-runtime.c (find_extra_method): Call mono_aot_wrapper_name only once,
1386         instead of once for each module.
1387
1388 2009-12-22  Zoltan Varga  <vargaz@gmail.com>
1389
1390         * debugger-agent.c (ss_start): Implement step over for the last sequence
1391         point in methods.
1392
1393         * mini.c (mono_save_seq_point_info): Don't link sequence points which don't
1394         have the STEP_LOC flag set.
1395
1396         * aot-runtime.c (decode_klass_ref): Avoid a crash if a decode_klass_ref () call
1397         fails. Fixes #566689.
1398
1399 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
1400
1401         * mini.c (mono_add_seq_point): New helper function.
1402         (mono_save_seq_point_info): New function to save sequence point info, extracted
1403         from mini_method_compile ().
1404
1405         * mini-<ARCH>.c: Call mono_add_seq_point to remember sequence points.
1406
1407         * mini.h (MonoSeqPointInfo): New structure containing information about
1408         the sequence points of a JITted method.
1409         (MonoBasicBlock): Add 'seq_points' and 'last_seq_point' fields. Remove unused
1410         'bucket' field.
1411
1412         * mini.c debugger-agent.c aot-compiler.c aot-runtime.c: Change the way sequence
1413         point information is stored, use a MonoSeqPointInfo structure instead of a
1414         GPtrArray. For each seq point, compute a list of successor seq points.
1415
1416         * debugger-agent.c: Use the successor list to implement step-over more
1417         efficiently: instead of single stepping until a different line/IL offset is
1418         reached, place breakpoints into all successor seq points.
1419
1420         * mini.h: Bump AOT file format version.
1421
1422 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
1423
1424         * Makefile.am (AM_CFLAGS): Include LLVM_CFLAGS.
1425
1426         * mini-llvm.c: Avoid defining the __STDC_... macros if already defined.
1427
1428 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
1429
1430         * exceptions-ppc.c (mono_ppc_set_func_into_sigctx): Fix the cross-compiler
1431         build.
1432
1433 2009-12-18  Zoltan Varga  <vargaz@gmail.com>
1434
1435         * mini-x86.c (mono_arch_get_argument_info): Allocate memory for CallInfo using
1436         alloca as g_malloc is not signal safe.
1437
1438 2009-12-18  Zoltan Varga  <vargaz@gmail.com>
1439
1440         * tramp-x86.c (mono_arch_patch_callsite): Fix the call to
1441         VALGRIND_DISCARD_TRANSLATIONS.
1442
1443         * *.c: Include mono/utils/memcheck.h, and remove #ifdef HAVE_VALGRIND_MEMCHECK_H
1444         checks, they are no longer needed.
1445
1446         * exceptions-ppc.c (mono_ppc_set_func_into_sigctx): New helper function to set
1447         a function into a sigctx which can handle function pointers.
1448
1449         * mini-ppc.c: Implement soft debugger support on ppc64.
1450
1451         * mini-ppc.c: Implement soft debugger support.
1452
1453 2009-12-17  Zoltan Varga  <vargaz@gmail.com>
1454
1455         * mini-llvm.c: Handle OP_LADD_OVF_UN. Place all alloca's into the entry bb.
1456
1457 2009-12-17  Marek Habersack  <mhabersack@novell.com>
1458
1459         * mini.c (mono_get_runtime_build_info): include Mono version in
1460         the returned value.
1461
1462         * driver.c (mono_main): VERSION is now included in the string
1463         returned from mono_get_runtime_build_info()
1464
1465 2009-12-17  Zoltan Varga  <vargaz@gmail.com>
1466
1467         * method-to-ir.c (mono_method_to_ir): Add support for CALLI with unmanaged
1468         signatures. Fixes #565143.
1469
1470         * jit-icalls.c (mono_get_native_calli_wrapper): New JIT icall.
1471
1472 2009-12-16  Zoltan Varga  <vargaz@gmail.com>
1473
1474         * aot-compiler.c (arch_emit_autoreg): Align code to 4 in the ppc case.
1475
1476 2009-12-16 Rodrigo Kumpera  <rkumpera@novell.com>
1477
1478         * mini-x86.h: Forgot to add a 0x to MONO_ARCH_MAX_FRAME_SIZE define
1479         making max stack 10x smaller.
1480
1481 2009-12-16  Zoltan Varga  <vargaz@gmail.com>
1482
1483         * mini.c (mono_resolve_patch_target): Comment out an assert which could be hit.
1484
1485 2009-12-15 Rodrigo Kumpera  <rkumpera@novell.com>
1486
1487         * method-to-ir.c (mini_emit_memcpy): Assert if size is too big.
1488
1489 2009-12-15 Rodrigo Kumpera  <rkumpera@novell.com>
1490
1491         * mini-x86.c (mono_arch_allocate_vars): Fail compilation if the frame size is
1492         bigger than MONO_ARCH_MAX_FRAME_SIZE.
1493
1494         * mini-x86.c (mono_arch_emit_prolog): Handle huge frames.
1495
1496         * mini-x86.h: Define MONO_ARCH_MAX_FRAME_SIZE to be 1Mb.
1497
1498         * mini-amd64.c / mini-amd64.h: Same fixes as of above.
1499
1500         * mini.c (mini_method_compile): Check if mono_arch_allocate_vars failed
1501         the compilation.
1502
1503 2009-12-14  Miguel de Icaza  <miguel@novell.com>
1504
1505         * method-to-ir.c (mono_method_to_ir): CEE_UNUSUED opcodes now
1506         raise an invalid program exception.   
1507
1508         For other opcodes that we might not handle use a g_warning and
1509         raise the exception.   Beats termination.
1510
1511         Fixes #561724
1512
1513 2009-12-14  Zoltan Varga  <vargaz@gmail.com>
1514
1515         * method-to-ir.c (mono_emit_rgctx_method_call_full): Fix a warning.
1516
1517         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix the LLVM support
1518         by merging the LLVM and !MAP_32BIT cases.
1519
1520 2009-12-13 Jonathan Chambers <joncham@gmail.com>
1521
1522         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Handle a NULL
1523         sigctx being passed in, as we have no CONTEXT available in the APC.
1524
1525         (mono_debugger_agent_cleanup): Use explicit cond wait implementation
1526         for now.
1527
1528         Code contributed under MIT/X11 license.
1529
1530 2009-12-13  Zoltan Varga  <vargaz@gmail.com>
1531
1532         * method-to-ir.c mini-llvm.c: Fix support for monitor enter/exit trampolines
1533         in the LLVM backend on AMD64.
1534
1535         * aot-runtime.c (decode_eh_frame): Initialize the clauses from the info in the
1536         FDE.
1537
1538         * unwind.c (mono_unwind_decode_fde): Implement decoding of a couple more formats.
1539
1540         * mini-llvm.c: Export mono_personality for AOT.
1541
1542         * mini.c (mini_method_compile): Fix some problems with llvm+aot+clauses.
1543
1544         * mini-ops.h (OP_IMPLICIT_EXCEPTION): New opcode marking the place where an
1545         implicit exception can occur.
1546
1547         * ir-emit.h (MONO_EMIT_NEW_IMPLICIT_EXCEPTION): New macro to emit an
1548         OP_IMPLICIT_EXCEPTION instruction.
1549
1550         * ir-emit.h (MONO_EMIT_NEW_CHECK_THIS): New macro.
1551
1552         * method-to-ir.c: Use MONO_EMIT_NEW_CHECK_THIS in a few places.
1553
1554         * mini-llvm.c: Handle OP_IMPLICIT_EXCEPTION by disabling llvm if it occurs
1555         inside a protected block.
1556
1557         * mini-llvm.c: Revert the last change, the signature of monitor entry/exit
1558         trampolines doesn't include the argument.
1559
1560         * mini-llvm.c (mono_llvm_emit_method): Enable calls to monitor entry/exit
1561         trampolines on amd64.
1562
1563         * mini-amd64.h (MONO_ARCH_MONITOR_OBJECT_REG): Use MONO_AMD64_ARG_REG1 instead
1564         of RDI.
1565
1566         * mini.c (mini_method_compile): Add some comments as to why LLVM is currently
1567         disabled for methods with clauses.
1568
1569         * mini-llvm.c: Enable support for catch clauses.
1570
1571         * mini-exceptions.c (mono_resume_unwind): New function to resume unwinding at the
1572         end of an LLVM compiled finally clause.
1573         (mono_handle_exception_internal): Save the exception handling state in TLS
1574         before calling an LLVM compiled finally clause, so mono_resume_unwind () can
1575         resume unwinding from that point.
1576
1577         * unwind.c (mono_unwind_get_ops_from_fde): Rename this to
1578         mono_unwind_decode_fde, decode the Language Specific Data Area (LSDA) too,
1579         to obtain the addresses of the exception handling regions.
1580
1581         * mini-llvm.c: Add beginnings of support for exception handling, currently only
1582         finally clauses are supported.
1583
1584         * mini.c (mini_method_compile): Add support for LLVM code with exception
1585         handlers.
1586
1587 2009-12-12  Zoltan Varga  <vargaz@gmail.com>
1588
1589         * mini-llvm.c (mono_llvm_emit_method): Allocate the 'pindexes' array with the
1590         proper size.
1591
1592 2009-12-12  Zoltan Varga  <vargaz@gmail.com>
1593
1594         * debugger-agent.c: Encode the this argument of vtype methods as a struct, not
1595         as a primitive type.
1596
1597 2009-12-11  Zoltan Varga  <vargaz@gmail.com>
1598
1599         * driver.c: Applied patch from Matt McClellan (matt@mc-c.net). Add a check
1600         for 2 parameter sched_setaffinity in older glibc versions. Fixes
1601         #564000.
1602
1603 2009-12-11  Marek Habersack  <mhabersack@novell.com>
1604
1605         * method-to-ir.c (mini_redirect_call): do not redirect the
1606         InternalAllocateStr internal call if string profiling is enabled.
1607
1608 2009-12-10  Zoltan Varga  <vargaz@gmail.com>
1609
1610         * aot-compiler.c (add_wrappers): Avoid generating synchronized wrappers for
1611         generic methods.
1612
1613         * unwind.h: Rename this to mini-unwind.h to avoid conflicts with the gcc
1614         unwind.h header file.
1615
1616         * tramp-x86.c (mono_arch_patch_callsite): Patch the code when using valgrind,
1617         newer valgrind versions seems to handle this fine.
1618
1619 2009-12-09  Zoltan Varga  <vargaz@gmail.com>
1620
1621         * debugger-agent.c (start_runtime_invoke): Fix a crash if this is called
1622         on the debugger thread.
1623
1624 2009-12-08  Zoltan Varga  <vargaz@gmail.com>
1625
1626         * mini-llvm.c (mono_llvm_emit_method): Add more SIMD opcodes.
1627
1628         * mini.c (mono_print_method_from_ip): Fix the lookup of trampolines.
1629
1630         * mini-codegen.c (mono_local_regalloc): Allow non-call opcodes with cloc:c.
1631
1632         * cpu-<ARCH>.md: Make call_handler clob:c.
1633
1634         * mini.c: Reenable SSA for methods with clauses.
1635
1636         * mini.c (mini_method_compile): Disable SSA for now for methods with clauses,
1637         as it causes failures on x86.
1638
1639 2009-12-08  Sebastien Pouliot  <sebastien@ximian.com>
1640
1641         * driver.c: Fail gracefully with --compile-all if mono_method_signature
1642         returns NULL (e.g. a bad assembly).
1643
1644 2009-12-08  Geoff Norton  <gnorton@novell.com>
1645
1646         * debugger-agent.c:  Refactor the mono_runtime_invoke guarding against
1647         stepping out into native code.  There were issues with nested invokes
1648         like .cctors.
1649
1650 2009-12-07  Zoltan Varga  <vargaz@gmail.com>
1651
1652         * mini.c (mini_method_compile): Do the disable_llvm checks early
1653         and avoid the LLVM compile pass if the checks fail.
1654
1655         * mini.c ssa.c abcremoval.c: Enable SSA for methods with exception clauses.
1656
1657         * mini-llvm.c: Put our methods/globals into the 'llvm.used' array, so the
1658         LLVM optimizations don't try to remove them.
1659
1660         * aot-compiler.c (emit_llvm_file): Save the result of opt into a
1661         different file so the original remains.
1662
1663 2009-12-06  Zoltan Varga  <vargaz@gmail.com>
1664
1665         * mini-llvm.c mini.c: Fix alignment issues with SIMD vars.
1666
1667         * aot-runtime.c (decode_arm_exidx): Handle most descriptors created by gas.
1668
1669         * aot-runtime.c (decode_arm_exidx): Refactor this into two functions, add
1670         support for non-inline unwind descriptors.
1671
1672 2009-12-07  Geoff Norton  <gnorton@novell.com>
1673
1674         * debugger-agent.c:  Darwin can colesce signals, so we need to handle
1675         the interrupt_count slightly differently.  Native threads were never
1676         marked as resumed.
1677
1678 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
1679
1680         * aot-runtime.c (decode_arm_exidx): New function to initialize a MonoJitInfo
1681         based on the contents of the ARM .exidx section. Not yet used since llvm doesn't
1682         yet generate this info.
1683
1684         * mini-llvm.c: Fix the conversion of call results if they are unsigned.
1685
1686         * debugger-agent.c (buffer_add_value): Treat I/U as a valuetype, so the
1687         client can distinguish between intptrs and longs.
1688
1689 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
1690
1691         * aot-compiler.c (emit_trampoline): Emit the trampoline info into the global
1692         blob.
1693
1694         * aot-runtime.c (load_function): Update after the change above.
1695
1696         * mini.h: Bump AOT file format version.
1697
1698         * method-to-ir.c (mono_method_to_ir): Disallow the delegate optimization
1699         if the delegate class is dynamic.
1700
1701         * method-to-ir.c (handle_delegate_ctor): Allow the method_code optimization
1702         in gshared code too using the new rgctx info type
1703         MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
1704
1705 2009-12-04  Geoff Norton  <gnorton@novell.com>
1706
1707         * debugger-agent.c: When doing a func-eval invoke on a suspended runtime,
1708         we need to track the original suspend count so the thread properly
1709         wakes up in resume_thread.
1710
1711 2009-12-04  Zoltan Varga  <vargaz@gmail.com>
1712
1713         * method-to-ir.c (handle_delegate_ctor): Add support for using this from gshared
1714         code.
1715
1716         * generics.cs: Add a test.
1717
1718         * method-to-ir.c (emit_get_rgctx_method): Make this work even if context_used
1719         is 0. Simplify a lot of code using this.
1720
1721         * mini-trampolines.c (mono_delegate_trampoline): Call
1722         mono_create_static_rgctx_trampoline () before saving the final address in
1723         delegate->method_code, to avoid calling it each time a delegate is first called.
1724
1725         * method-to-ir.c (mono_method_to_ir): Allow fast delegate creation for methods
1726         which need static rgctx trampolines.
1727
1728         * mini-trampolines.c (mono_create_static_rgctx_trampoline): Use a cache
1729         keyed on the method+addr pair, since addr could be either the method addr or
1730         an unbox trampoline in the AOT case. Fixes #560246.
1731
1732 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
1733
1734         * mini.c (mini_method_compile): Call handle_exception_clauses () in the same
1735         place it was called before too.
1736
1737 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
1738
1739         * mini.c (mono_jit_runtime_invoke): Avoid the call to mono_class_setup_vtable ()
1740         if no security manager is present, to speed up the AOT case. Call
1741         mono_class_vtable () full with raise_on_error == TRUE instead.
1742
1743 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
1744
1745         * mini.c (mini_method_compile): Call handle_exception_clauses earlier so
1746         the local optimization passes can take its result into account. Fixes
1747         #559876.
1748
1749         * exceptions.cs: Add a test.
1750
1751 2009-01-24  Steven Munroe  <munroesj@us.ibm.com>
1752
1753         This patch is contributed under the terms of the MIT/X11 license
1754
1755         * cpu-ppc64.md (load_memindex): Add loadi8_memindex.
1756
1757 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
1758
1759         * mini.h (MonoInst): Remove unused 'ssa_op' field.
1760
1761         * debugger-agent.c: Rework the handling of stack traces of running threads to
1762         avoid crashes if compute_frames () tries to walk the stack of running thread.
1763
1764         * mini.c (mono_print_method_from_ip): Use mini_jit_info_table_find.
1765
1766         * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): Set frame->lmf.
1767
1768         * mini.h (StackFrameInfo): Add an 'lmf' field.
1769
1770 2009-12-02  Zoltan Varga  <vargaz@gmail.com>
1771
1772         * debugger-agent.c (suspend_current): Always set really_suspended.
1773
1774         * debugger-agent.c (clear_event_request): Clear method entry/exit requests too.
1775
1776         * exceptions-x86.c (mono_arch_get_restore_context): Restore EAX too.
1777
1778 2009-12-01  Zoltan Varga  <vargaz@gmail.com>
1779
1780         * debugger-agent.c (vm_commands): Don't allow invokes on threads which are not
1781         really suspended.
1782
1783 2009-12-01  Zoltan Varga  <vargaz@gmail.com>
1784
1785         * cpu-ppc64.md (store_memindex): Add storei8_memindex.
1786
1787 2009-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
1788
1789         * mini-trampolines.c: Fix MSVC build.
1790
1791 2009-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
1792
1793         * mini-trampolines.c: Check for mono_method_get_vtable_slot failures.
1794
1795 2009-11-30  Zoltan Varga  <vargaz@gmail.com>
1796
1797         * mini-arm.c (mono_arch_lowering_pass): Fix an assert which is hit when
1798         the instruction following an OP_FCOMPARE is optimized away.
1799
1800 2009-11-30  Zoltan Varga  <vargaz@gmail.com>
1801
1802         * aot-compiler.c (arch_emit_autoreg): Extract the auto-registration code from
1803         emit_autoreg () into this arch-specific function.
1804
1805         * aot-compiler.c (emit_exception_debug_info): Don't emit the length of the
1806         code, it is no longer needed.
1807
1808         * aot-runtime.c (decode_exception_debug_info): Don't read the code length.
1809
1810         * mini.h: Bump AOT file format version.
1811
1812         * aot-runtime.c (mono_aot_find_jit_info): Compute the length of the method
1813         using the sorted_code_offsets array, instead of reading it from the
1814         exception debug info.
1815         (load_method): Call mono_aot_find_jit_info instead of
1816         decode_exception_debug_info ().
1817
1818         * aot-compiler.c (emit_exception_debug_info): Emit whenever the method was
1819         LLVM compiled as a flag.
1820
1821 2009-11-29  Zoltan Varga  <vargaz@gmail.com>
1822
1823         * debugger-agent.c (resume_thread): Fix a warning.
1824
1825         * aot-compiler.c: Add an option to set the number of static rgctx trampolines
1826         generated.
1827
1828 2009-11-28  Zoltan Varga  <vargaz@gmail.com>
1829
1830         * aot-compiler.c aot-runtime.c: Get rid of a few global symbols, move their
1831         contents to MonoAotFileInfo.
1832
1833 2009-11-27  Zoltan Varga  <vargaz@gmail.com>
1834
1835         * aot-compiler.c aot-runtime.c: Reorganize the AOT file format once again.
1836         Put all binary data into a giant blob, similarly to the way .net assemblies
1837         store binary data. Emit offset tables in a compact form to reduce their size.
1838
1839         * mini.h: Bump AOT file format version.
1840
1841         * aot-compiler.c (emit_globals_table): Use temp_prefix instead of .L in a few
1842         places.
1843
1844         * aot-compiler.c (emit_globals_table): Emit a hash table for the globals, to
1845         avoid linear searches at runtime.
1846
1847         * aot-runtime.c (find_symbol): Update this to use the hash.
1848
1849         * mini.h: Bump AOT file format version.
1850
1851 2009-11-26  Zoltan Varga  <vargaz@gmail.com>
1852
1853         * aot-compiler.c (emit_klass_info): Save whenever the class has a generic
1854         container.
1855
1856         * aot-runtime.c (decode_cached_class_info): Set the is_generic_container field
1857         too.
1858
1859         * aot-compiler.c (mono_compile_assembly): Add a 'stats' option to print out
1860         the distribution of got slot types.
1861
1862         * mini.h (MonoDebugOptions): Add 'explicit_null_checks' option.
1863
1864         * method-to-ir.c: Add support for generating explicit null checks.
1865
1866 2009-11-25  Zoltan Varga  <vargaz@gmail.com>
1867
1868         * debugger-agent.c (vm_commands): Implement EXIT by invoking Environment.Exit ()
1869         on a random thread if possible.
1870
1871         * aot-runtime.c (mono_aot_plt_resolve): Clean up the handling of function
1872         descriptors a bit, add comments, handle RGCTX_FETCH/GENERIC_CLASS_INIT_TRAMPOLINE
1873         correctly.
1874
1875         * exceptions-ppc.c (mono_arch_find_jit_info_ext): Use mgreg_t as the type of
1876         regs. Pass the real size of the regs array to mono_unwind_frame ().
1877
1878         * unwind.c (mono_unwind_frame): Remove an incorrect assert, add more correct
1879         ones instead.
1880
1881 2009-11-24  Geoff Norton  <gnorton@novell.com>
1882
1883         * mini-darwin.c: Work around apple bug rdar://7209349  See
1884         http://openradar.appspot.com/7209349 for details.  Synopsis,
1885         CoreFoundation SIGTRAP's if you dlopen it off the main thread if its
1886         never been initialized before.
1887
1888 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
1889
1890         * tramp-arm.c: Use blx instead of mov pc, reg to improve support for thumb.
1891
1892         * mini-arm.c (mono_arm_thumb_supported): New helper function.
1893
1894 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
1895
1896         * cfold.c (mono_constant_fold_ins): Fix a problem in the previous change,
1897         OP_SHL_IMM is not 32 bit.
1898
1899 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
1900
1901         * aot-compiler.c (encode_patch): Fix the encoding of R8 on big-endian systems.
1902
1903 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
1904
1905         * aot-compiler.c: Avoid infinite recursion when generic virtual recursion is
1906         encountered.
1907
1908         * debugger-agent.c (resume_vm): Signal the suspend_cond even if suspend_count
1909         > 0 since some threads can resume if their resume_count is > 0.
1910         (invoke_method): Avoid reading freed memory.
1911
1912         * debugger-agent.c (process_suspend): Extract the suspend code from
1913         process_single_step_inner () to a separate function. Rework the code to prevent
1914         races between this function and thread interrupts.
1915
1916         * debugger-agent.c (suspend_current): Check the resume_count field instead
1917         of resume_one so suspends+resumes during single threaded invokes work
1918         correctly.
1919
1920 2009-11-23  Zoltan Varga  <vargaz@gmail.com>
1921
1922         * aot-compiler.c (emit_llvm_file): Enable some llvm optimizations which seem
1923         to make the generated code smaller.
1924
1925         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Add a code
1926         sequence generated by recent LLVM versions.
1927
1928         * mini-llvm.c: Add support for a few simple cases which weren't supported
1929         before.
1930
1931         * mini-trampolines.c (mono_magic_trampoline): Don't call
1932         mono_arch_get_vcall_slot () when llvm is enabled.
1933
1934         * aot-compiler.c (emit_llvm_file): Add code to run the 'opt' llvm tool.
1935
1936         * mini-trampolines.c (mono_magic_trampoline): Extract the bulk of this function
1937         into a new function called common_call_trampoline () which is used by the
1938         llvm vcall trampoline as well.
1939
1940         * debugger-agent.c: Implement single threaded invokes.
1941
1942         * debugger-agent.c: Revert change which broke the agent on linux.
1943
1944         * method-to-ir.c (inline_method): Prevent infinite recursion. Fixes
1945         #557606.
1946
1947         * generics.cs: Add a test.
1948
1949 2009-11-22  Zoltan Varga  <vargaz@gmail.com>
1950
1951         * debugger-agent.c: Fix the cygwin build.
1952
1953 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
1954
1955         * cprop.c: Remove this unused file.
1956
1957 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
1958
1959         * cfold.c (mono_constant_fold_ins): Fix constant folding of shr_imm. Fixes
1960         #557262.
1961
1962         * basic.cs: Add a test.
1963
1964 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
1965
1966         * method-to-ir.c (mono_method_to_ir): Use mono_use_llvm instead of ENABLE_LLVM
1967         in one more place.
1968
1969 2009-11-20  Zoltan Varga  <vargaz@gmail.com>
1970
1971         * mini.c mini-trampolines.c driver.c: Add a 'mono_use_llvm' flag to control
1972         whenever the runtime uses LLVM code. Add a '--llvm' command line option to set
1973         it. Use this flag to control llvm related code paths instead of #ifdef
1974         ENABLE_LLVM, so a runtime configured without --enable-llvm can use LLVM compiled
1975         AOT code.
1976
1977         * aot-runtime.c aot-compiler.c: Add a 'flag' field to MonoAotFileInfo.
1978
1979         * mini.h: Bump AOT file format version.
1980
1981         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline_full): These
1982         receive their argument in MONO_ARCH_VTABLE_REG, not in the first argument reg.
1983
1984         * debugger-agent.c (create_event_list): Fix a crash if an empty assembly list
1985         was used as an assembly filter.
1986
1987 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
1988
1989         * unwind.c: Fix support for ppc.
1990
1991         * exceptions-ppc.c (mono_arch_find_jit_info): Change this to use dwarf frame
1992         unwind info. Change to the mono_arch_find_jit_info_ext () interface.
1993
1994 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
1995
1996         * mini-ppc.c (mono_arch_emit_prolog): Fix a copy-paste error to fix the ppc64
1997         port.
1998         (mono_arch_cpu_init): Don't set cpu_hw_flags to 0 at the end, this was somehow
1999         added by the ps3 changes.
2000
2001 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
2002
2003         * mini-gc.c: Resurrect this, so at least it compiles.
2004
2005         * debugger-agent.c (assembly_commands): Implement GET_NAME command.
2006
2007 2009-11-18  Zoltan Varga  <vargaz@gmail.com>
2008
2009         * debugger-agent.c (mono_debugger_agent_handle_exception): Pass a MonoJitInfo to
2010         create_event_list () so assembly filters can be used.
2011
2012         * exceptions-ppc.c (mono_arch_find_jit_info): Fix the restoration of registers
2013         from the LMF.
2014
2015 2009-11-17  Zoltan Varga  <vargaz@gmail.com>
2016
2017         * debugger-agent.c (mono_debugger_agent_breakpoint_hit): Fix a warning.
2018         (mono_debugger_agent_thread_interrupt): Make this return FALSE if the agent
2019         is disabled.
2020
2021         * aot-compiler.c (add_generic_instances): Emit instances of common generic
2022         classes for char/bool too.
2023
2024         * debugger-agent.c (DebuggerTlsData): Honor the DISABLE_SOFT_DEBUG option.
2025
2026         * debugger-agent.c (DebuggerTlsData): Add a 'really_suspended' flag, not yet
2027         used.
2028
2029         * debugger-agent.c: Add some definitions to make backporting to 2.6 easier.
2030         Fix warnings.
2031
2032 2009-11-15  Andreas Faerber  <andreas.faerber@web.de>
2033
2034         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Signature fix.
2035         
2036         Code contributed under MIT/X11 license.
2037
2038 2009-11-14  Zoltan Varga  <vargaz@gmail.com>
2039
2040         (mono_debugger_agent_thread_interrupt): Save the context so stacktraces for
2041         threads in native code work.
2042
2043         * debugger-agent.c: Pass the 'flags' argument to VM_INVOKE_METHOD earlier in
2044         the parameter list, so it can be acted upon by vm_commands (). Bump protocol
2045         version.
2046
2047 2009-11-13 Jonathan Chambers <joncham@gmail.com>
2048
2049         * debugger-agent.c: Implementation for Windows platform.
2050
2051         * mini-x86.c: Add support for Windows. Use mono-* synchronization
2052         primitives. Use SEH to implement breakpoints and single stepping.
2053
2054         * mini-x86.h: Enable soft debugger on Windows.
2055
2056         Code contributed under MIT/X11 license.
2057
2058 2009-11-13  Zoltan Varga  <vargaz@gmail.com>
2059
2060         * mini-amd64.c (emit_call_body): Disable usage of near calls when running
2061         under XEN. Fixes #522894.
2062
2063         * patch-info.h: Add LLVM_IMT_TRAMPOLINE.
2064
2065         * mini-llvm.c aot-compiler.c aot-runtime.c mini.c: Add support for making
2066         interface calls in LLVM AOT code.
2067
2068         * aot-compiler.c mini-llvm.c: Abort llvm compilation if a non-encodable patch
2069         is found.
2070
2071         * mini-llvm.c: Add support for OP_VPHI.
2072
2073         * objects.cs: Add a test.
2074
2075 2009-11-13  Zoltan Varga  <vargaz@gmail.com>
2076
2077         * debugger-agent.c (mono_debugger_agent_single_step_event): Avoid a crash if
2078         this is called on the debugger thread.
2079
2080 2009-11-12  Zoltan Varga  <vargaz@gmail.com>
2081
2082         * mini-llvm.c: Add soft-float support.
2083
2084         * method-to-ir.c (mono_decompose_soft_float): Restart after decomposing an
2085         FCALL which returns an R4.
2086
2087         * driver.c (mono_main): Add a missing '\n'.
2088
2089         * mini-trampolines.c (mono_create_llvm_imt_trampoline): Fix the build on
2090         platforms which doesn't support the LLVM IMT trampoline.
2091
2092 2009-11-11  Zoltan Varga  <vargaz@gmail.com>
2093
2094         * mini-llvm.c (mono_llvm_emit_method): Fix LOCALLOC.
2095
2096         * mini-llvm-cpp.cpp: Update to latest LLVM SVN.
2097
2098         * mini-llvm.c (mono_llvm_emit_method): Avoid creating plt entries for
2099         virtual calls.
2100
2101         * aot-runtime.c: Don't define HAVE_DL_ITERATE_PHDR, configure now does that.
2102
2103 2009-11-10  Zoltan Varga  <vargaz@gmail.com>
2104
2105         * aot-compiler.c aot-runtime.c: Change how mono_arch_find_jit_info () works.
2106         Instead of emitting a method_order table, sort the contents of the code_offsets
2107         table and do a binary search in the sorted table. The previous approach doesn't
2108         work with LLVM which emits methods in a arbitrary order.
2109
2110         * aot-runtime.c: Add support for creating MonoJitInfo structures by searching
2111         in the .eh_frame section in ELF files.
2112
2113         * mini.h: Bump corlib file format version.
2114
2115         * mini-llvm.c aot-compiler.c: Add support for AOT to the LLVM back end.
2116
2117         * exceptions-arm.c (mono_arch_get_call_filter_full): Update after the
2118         LDMIA->LDM macro name change.
2119
2120 2009-11-09  Zoltan Varga  <vargaz@gmail.com>
2121
2122         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Fix and enable this for
2123         x86.
2124
2125         * mini-llvm-cpp.cpp (JITMemoryManager): Fix compilation with LLVM 2.7
2126         SVN.
2127
2128         * aot-compiler.c: Ditto.
2129
2130         * mini-arm.c (mono_arch_allocate_vars): Fix the previous change by passing
2131         &align to mini_type_stack_size_full ().
2132
2133         * mini-arm.c (mono_arch_emit_prolog): Implement support for varargs.
2134
2135         * mini-ops.h: Add documentation for the OP_ARGLIST opcode.
2136
2137 2009-11-08  Zoltan Varga  <vargaz@gmail.com>
2138
2139         * mini-arm.c: Compute the stack space used by arguments using
2140         mini_type_stack_size_full ().
2141
2142 2009-11-08  Zoltan Varga  <vargaz@gmail.com>
2143
2144         * optflags-def.h: Remove dead TREEPROP optimization.
2145
2146 2009-11-08  Rodrigo Kumpera  <rkumpera@novell.com>
2147
2148         * mini-ppc.h: Make mono compiler under FreeBSD/ppc64. 
2149
2150         Patch by Justin Hibbits <chmeeedalf@gmail.com>.
2151
2152 2009-11-07  Zoltan Varga  <vargaz@gmail.com>
2153
2154         * driver.c (mono_jit_parse_options): New public API function to parse options
2155         as done by the runtime executable.
2156
2157         * debugger-agent.c (buffer_add_cattrs): Fix reading an uninitialized variable
2158         when handling named arguments.
2159
2160 2009-11-07  Zoltan Varga  <vargaz@gmail.com>
2161
2162         * mini-arm.c: Implement support for returning vtypes in registers, fix support
2163         for passing small vtypes in registers, make the CallInfo structures more
2164         similar to the code on the other platforms.
2165
2166         * mini-arm.c (mono_arch_allocate_vars): Align small vtypes to 4 bytes too since
2167         the code in the prolog requires it.
2168
2169 2009-11-06  Zoltan Varga  <vargaz@gmail.com>
2170
2171         * mini-arm.c debugger-agent.c: Android changes from Koushik K. Dutta
2172         (koush@koushikdutta.com).
2173
2174         * mini-arm.c (handle_thunk): Add a domain argument to control the domain
2175         where the thunk memory should be allocated from. Fixes appdomain unloading
2176         on arm.
2177
2178 2009-11-06  Zoltan Varga  <vargaz@gmail.com>
2179
2180         * mini-arm.c exceptions-arm.c: Make ctx->regs map directly to the 16 hardware
2181         registers, instead of r4..r11,ip,lr. Make restore_context () restore r0..r3 too.
2182
2183 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
2184
2185         * mini-amd64.c (mono_arch_output_basic_block): Don't allow OP_SEQ_POINT in
2186         AOT, as it is not implemented yet.
2187
2188         * mini-x86.c (mono_arch_output_basic_block): Ditto.
2189
2190 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2191
2192         * debugger-agent.c: Fix windows build.
2193
2194 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
2195
2196         * debugger-agent.c (debugger_thread): Call mono_set_is_debugger_attached ()
2197         after the client connects/disconnects.
2198
2199         * debugger-agent.c: Add an 'onthrow' option to start the debugger agent
2200         when an exception of a given type is thrown.
2201
2202         * debugger-agent.c: Add a 'onuncaught' option to start the debugger agent
2203         only on an uncaught exception.
2204
2205         * mini-exceptions.c: Notify the debugger agent on an uncaught exception.
2206
2207         * debugger-agent.c: Add a 'launch' option.
2208
2209 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
2210
2211         * debugger-agent.c: Add a 'timeout' option.
2212
2213 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
2214
2215         * debugger-agent.c: Implement the 'server' and 'suspend' options supported by
2216         the JDWP agent.
2217
2218 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
2219
2220         * debugger-agent.c (set_breakpoint): Emit a log message.
2221
2222 2009-11-04  Zoltan Varga  <vargaz@gmail.com>
2223
2224         * mini-arm.c: Fix the arm build.
2225
2226 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
2227
2228         * aot-compiler.c: don't leak the value returned from
2229         mono_type_full_name().
2230
2231 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
2232
2233         * debugger-agent.c: defer including mono-mutex.h until we know the
2234         agent is supported.
2235
2236 2009-11-04 Jonathan Chambers <joncham@gmail.com>
2237
2238         * debugger-agent.c: Changes to build on windows. Use mono-mutex instead
2239         of pthreads directly.
2240
2241         * mini.c (mono_sigfpe_signal_handler): Changed signature of Windows
2242         exception handlers. Pass info argument.
2243
2244         * mini.h: Adjust signatures of soft debugger functions to pass void*
2245         instead of siginfo_t. Adjust SIG_HANDLER_SIGNATURE on Windows.
2246
2247         * mini-amd64.c (mono_arch_is_single_step_event): Adjust signature to pass void*
2248         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
2249         (mono_arch_is_breakpoint_event): Adjust signature to pass void*
2250         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
2251
2252         * mini-amd64.h: Adjust MonoW32ExceptionHandler signature.
2253
2254         * mini-x86.c (mono_arch_is_single_step_event): Adjust signature to pass void*
2255         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
2256         (mono_arch_is_breakpoint_event): Adjust signature to pass void*
2257         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
2258
2259         * mini-x86.h: Adjust MonoW32ExceptionHandler signature.
2260
2261         * exceptions-x86.c: Adjust W32_SEH_HANDLE_EX for new signature.
2262
2263         * exceptions-amd64.c: Adjust W32_SEH_HANDLE_EX for new signature.
2264
2265         * mono-semaphore.h: Skeleton implementation for Windows.
2266
2267         Code contributed under MIT/X11 license.
2268
2269 2009-11-04 Jonathan Chambers <joncham@gmail.com>
2270
2271         * simd-intrinsics.c (simd_intrinsic_emit_setter): Unfix my fix.
2272
2273         Code contributed under MIT/X11 license.
2274
2275 2009-11-04 Jonathan Chambers <joncham@gmail.com>
2276
2277         * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix windows build.
2278
2279         Code contributed under MIT/X11 license.
2280
2281 2009-11-04  Zoltan Varga  <vargaz@gmail.com>
2282
2283         * aot-compiler.c (mono_save_xdebug_info): Bump the threshold for flushing
2284         debug info to 100 because 10 still slows down gdb too much.
2285
2286         * method-to-ir.c (mono_method_to_ir): Avoid rethrowing thread abort exceptions
2287         inside runtime invoke wrappers. This avoids the need to call ResetAbort () on
2288         them in the wrappers.
2289
2290 2009-11-03  Zoltan Varga  <vargaz@gmail.com>
2291
2292         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
2293
2294         * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix a warning.
2295
2296         * aot-runtime.c (mono_aot_get_method): Refactor some code into a new helper
2297         function mono_aot_get_array_helper_from_wrapper ().
2298
2299         * aot-compiler.c (add_generic_class): Refactor the code a bit, really emit
2300         array helper methods.
2301
2302 2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2303
2304         * simd-intrinsics.c (load_simd_vreg): Add extra argument to signal if
2305         the value was loaded from memory.
2306
2307         * simd-intrinsics.c (simd_intrinsic_emit_setter): Store back to memory if
2308         the value was loader from there.
2309
2310         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Fail correctly for Shuffle
2311         without constant swizzle.
2312
2313 2009-11-02 Jonathan Chambers <joncham@gmail.com>
2314
2315         * mini-amd64.c: Put soft debugger functions behind a
2316         #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
2317
2318         * mini-amd64.h: disable the soft debugger in windows.
2319
2320         Code contributed under MIT/X11 license.
2321
2322 2009-11-02 Jonathan Chambers <joncham@gmail.com>
2323
2324         * mini-x86.c: Put soft debugger functions behind a
2325         #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
2326
2327         Code contributed under MIT/X11 license.
2328
2329 2009-11-02 Jonathan Chambers <joncham@gmail.com>
2330
2331         * exceptions-x86.c (win32_handle_stack_overflow): Fix parameters
2332         to mono_arch_find_jit_info_ext.
2333
2334         Code contributed under MIT/X11 license.
2335
2336 2009-11-03  Zoltan Varga  <vargaz@gmail.com>
2337
2338         * debugger-agent.c: Include netinet/in.h to fix the bsd build.
2339
2340         * debugger-agent.c: Add support for filtering events by assemblies.
2341
2342         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Return false if
2343         the agent is not enabled.
2344
2345 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2346
2347         * exceptions-x86.c: hopefully last change to fix the windows build.
2348         This one courtesy of Jonathan Chambers.
2349
2350 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2351
2352         * debugger-agent.c: remove unused function.
2353
2354 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2355
2356         * debugger-agent.c: add #ifdefs for a few header files.
2357         * mini-x86.h: disable the soft debugger in windows.
2358         Step 1 of 2 to make this compile on windows with gcc.
2359
2360 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
2361
2362         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Comment this out for now
2363         as it breaks the build.
2364
2365 2009-07-01  Zoltan Varga  <vargaz@gmail.com>
2366
2367         Merge the soft debugger branch.
2368
2369         * debugger-agent.h debugger-agent.c: New files containing the soft
2370         mode debugger module.
2371
2372         * method-to-ir.c (mono_method_to_ir): Generate OP_SEQ_POINT opcodes
2373         at the appropriate locations.
2374
2375         * mini-<ARCH>.c (mono_arch_output_basic_block): Handle OP_SEQ_POINT
2376         opcode.
2377
2378         * mini-<ARCH>.c: Add new arch-specific functions to set/clear breakpoints,
2379         enable/disable single stepping.
2380
2381         * exceptions-<ARCH>.c (mono_arch_find_jit_info_ext): New stack unwinding api
2382         which returns all information in a StackFrameInfo structure, and can handle the
2383         LMF frames added by the debugger.
2384
2385         * mini-<ARCH>.h (MonoLMFExt): New structure containing additional information
2386         about an LMF frame.
2387
2388         * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): New stack
2389         walker function which works on a specific thread and passes a StackFrameInfo
2390         structure to its callback.
2391
2392         * mini.c (mini_init): Initialize the debugger agent.
2393
2394         * aot-compiler.c aot-runtime.c: Add soft-debug support.
2395
2396         * mini-ops.h: Add OP_SEQ_POINT opcode.
2397
2398         * driver.c (mono_main): Add new '--debugger-agent' option for passing
2399         arguments to the debugger agent.
2400
2401 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
2402
2403         * mini.c (mini_method_compile): Disable llvm for methods with an lmf here to
2404         speed things up.
2405
2406         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOCALLOC.
2407
2408         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Implement this for x86.
2409
2410         * mini.c (mini_init): Avoid using the IMT trampoline in the LLVM case.
2411
2412         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add a static rgctx trampoline
2413         if needed.
2414         (mono_create_llvm_imt_trampoline): New function to create a trampoline which
2415         sets the IMT argument and makes a virtual call.
2416
2417         * mini-llvm.c: Enable interface calls using the llvm imt trampoline.
2418
2419 2009-11-01  Zoltan Varga  <vargaz@gmail.com>
2420
2421         * Makefile.am (llvm_sources): Enable the llvm option since it no longer breaks
2422         the windows build.
2423
2424 2009-10-30  Zoltan Varga  <vargaz@gmail.com>
2425
2426         * mini.c (mini_cleanup): Call profiler shutdown before shutting down the
2427         runtime. Fixes #551228.
2428
2429 2009-10-29  Zoltan Varga  <vargaz@gmail.com>
2430
2431         * mini-x86.c (mono_arch_output_basic_block): Fix % 1. Fixes #550970.
2432
2433         * basic.cs: Add a test.
2434
2435         * method-to-ir.c (mono_method_to_ir): Use EMIT_NEW_LOAD_MEMBASE_TYPE to
2436         load vtypes instead if OP_LOADV_MEMBASE in the implementation of
2437         CONSTRAINED. Fixes #550964.
2438
2439         * generics.cs: Add a test.
2440
2441 2009-10-28  Mark Probst  <mark.probst@gmail.com>
2442
2443         * mini-posix.c (add_signal_handler): Use
2444         mono_gc_get_suspend_signal() instead of GC_get_suspend_signal().
2445
2446 2009-10-28 Jerry Maine <crashfourit@gmail.com>
2447
2448         Contributed under the terms of the MIT/X11 license by
2449         Jerry Maine <crashfourit@gail.com>.
2450
2451         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
2452         sse4a for simd intrinsics.
2453
2454         * mini-amd64.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
2455         sse4a for simd intrinsics.
2456
2457 2009-10-27  Zoltan Varga  <vargaz@gmail.com>
2458
2459         * ir-emit.h method-to-ir.c: Change a few _IMM macros to assign to inst_imm
2460         instead of inst_p1 which is not the same on ILP32 platforms.
2461
2462 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
2463
2464         * mini-ppc.c (mono_arch_emit_prolog): Load the current got address,
2465         not the mscorlib one before calling mono_get_lmf_addr.
2466
2467         * tramp-ppc.c (mono_arch_create_trampoline_code_full): Fix the storing
2468         of the ip to the LMF.
2469
2470         * method-to-ir.c (mono_method_to_ir): Fix the handling of the
2471         immediate in the op->op_imm optimization.
2472
2473         * mini-ppc.c: Add a 'vtregs' field to ArgInfo to make the code easier to
2474         understand. VTypes now work, but are not abi compliant, as they are
2475         split into 4 byte parts instead of 8.
2476         (emit_memcpy): Fix the unrolled case to work on the PS3.
2477
2478         * mini-ppc.c (get_delegate_invoke_impl): Fix this for the PS3.
2479
2480         * aot-compiler.c (mono_compile_assembly): Make the autoreg option
2481         the default when static linking.
2482
2483         * mini-ppc.c (mono_arch_emit_prolog): Fix handling of I8 arguments.
2484
2485         * aot-compiler.c: Add an autoreg option to automatically register
2486         statically linked aot modules using ELF .ctors.
2487
2488         * genmdesc.pl: Add __ppc64__ to allowed defines.
2489
2490 2009-10-25  Zoltan Varga  <vargaz@gmail.com>
2491
2492         * mini-posix.c (add_signal_handler): Delay the GC suspend signal while
2493         executing a SIGSEGV handler on an altstack, since libgc can't handle that.
2494
2495 2009-10-24  Mark Probst  <mark.probst@gmail.com>
2496
2497         * exceptions-x86.c (mono_arch_find_jit_info): Fix build.
2498
2499 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
2500
2501         * mini-exceptions.c (mini_jit_info_table_find): Add an 'out_domain' argument
2502         which will contain the domain where the method was found.
2503
2504         * exceptions-<ARCH>.c mini-exceptions.c: Update callers of
2505         mini_jit_info_table_find ().
2506
2507         * aot-compiler.c (xdebug_end_emit): Remove so stray debug code.
2508
2509         * branch-opts.c (mono_if_conversion): Avoid running deadce if it is disabled.
2510
2511 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
2512
2513         * mini-x86.c (mono_arch_emit_prolog): Disable aot for methods with save_lmf
2514         set, its not supported yet.
2515
2516 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
2517
2518         * aot-runtime.c (mono_aot_get_method): Avoid asserting if a array generic
2519         iface wrapper is not found.
2520         (mono_aot_get_method): Ditto for GetGenericValueImpl.
2521
2522 2009-10-21  Zoltan Varga  <vargaz@gmail.com>
2523
2524         * aot-runtime.c (mono_aot_get_method): Fix support for the IList<T> wrappers,
2525         which have a different name.
2526
2527         * aot-runtime.c (mono_aot_get_method): Special case the array generic iface
2528         wrappers and Array.GetGenericValueImpl ().
2529
2530         * aot-compiler.c: Avoid emitting some wrappers which are not needed anymore
2531         because of the change above.
2532
2533         * generics.cs: Add a test for full aot + generic array ifaces.
2534
2535 2009-10-19  Sebastien Pouliot  <sebastien@ximian.com>
2536
2537         * aot-compiler.c (emit_plt): Remove duplicate 'debug_sym' variable 
2538         that hides the previous one.
2539
2540 2009-10-18  Zoltan Varga  <vargaz@gmail.com>
2541
2542         * aot-compiler.c (can_marshal_struct): Allow some System.dll structs to be
2543         marshalled. Fixes #541623.
2544
2545 2009-10-16  Zoltan Varga  <vargaz@gmail.com>
2546
2547         * aot-compiler.c (emit_extra_methods): Remove some asserts which are not needed.
2548
2549 2009-10-15  Zoltan Varga  <vargaz@gmail.com>
2550
2551         * mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.
2552
2553 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
2554
2555         * mini-posix.c (sigprof_signal_handler):
2556         Implemented support for building stat call chans in different ways.
2557
2558 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
2559
2560         * mini-exceptions.c (mono_find_jit_info):
2561         Also check that a jit info has been found (fixes a profiler crash).
2562
2563 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
2564
2565         * mini.c (mono_codegen):
2566         Call mono_profiler_code_buffer_new with correct code address.
2567
2568 2009-10-14  Zoltan Varga  <vargaz@gmail.com>
2569
2570         * driver.c (mono_main): Change the date in the copyright.
2571
2572 2009-10-14  Mark Probst  <mark.probst@gmail.com>
2573
2574         * method-to-ir.c (mono_method_to_ir): Don't use a managed array
2575         allocator in shared generic code for open classes, because we
2576         can't get those classes' vtables.  We need to make managed
2577         allocators not depend on the vtable at compile-time to solve this.
2578
2579 2009-10-13  Martin Baulig  <martin@ximian.com>
2580
2581         * debug-mini.c (mono_debugger_trampoline_compiled): Add
2582         `const guint8 *trampoline' argument; send both the old and the new
2583         notification.
2584
2585 2009-09-30  Zoltan Varga  <vargaz@gmail.com>
2586
2587         * aot-compiler.c (add_wrappers): Add a runtime invoke wrapper which is used by
2588         mono_runtime_capture_context () without calling mono_runtime_invoke ().
2589         (can_marshal_struct): Skip structures with auto layout.
2590
2591         * tramp-arm.c (GEN_TRAMP_SIZE): Increase this by 4.
2592
2593 2009-10-02  Zoltan Varga  <vargaz@gmail.com>
2594
2595         * mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
2596         (mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
2597         a variable to hold the stack slot used by the int<->float conversion opcodes.
2598
2599         * mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.
2600
2601 2009-10-04  Zoltan Varga  <vargaz@gmail.com>
2602
2603         * aot-compiler.c (add_generic_class): Only add GetGenericValueImpl wrappers
2604         when using full-aot.
2605
2606 2009-10-06  Zoltan Varga  <vargaz@gmail.com>
2607
2608         * aot-compiler.c (add_generic_class): Add an instance of GenericComparer<T> for
2609         each instance of Comparer<T>.
2610
2611         * generics.cs: Add a new test.
2612
2613 2009-10-09  Zoltan Varga  <vargaz@gmail.com>
2614
2615         * driver.c (parse_debug_options): Add a 'gdb' option.
2616
2617         * mini.c (mini_parse_debug_options): Add a 'gdb' option.
2618
2619         * image-writer.c: Add support for emitting the image into a memory buffer.
2620
2621         * dwarfwriter.c: Add support for sharing one IL file between multiple images.
2622
2623         * aot-compiler.c: Add support for registering debug info with GDB using the
2624         new JIT debugging interface in GDB 7.0. It can be turned on by setting
2625         MONO_XDEBUG to 'gdb'.
2626
2627 2009-10-10  Zoltan Varga  <vargaz@gmail.com>
2628
2629         * aot-compiler.c (mono_save_trampoline_xdebug_info): Implement this for the
2630         gdb mode.
2631
2632 2009-10-11  Zoltan Varga  <vargaz@gmail.com>
2633
2634         * aot-compiler.c (mono_save_xdebug_info): Emit a symbol for the method which
2635         can be used to set breakpoints in gdb.
2636
2637         * image-writer.c (bin_writer_emit_writeout): Add support for setting the text
2638         segment to an absolute address.
2639
2640 2009-10-13  Mark Probst  <mark.probst@gmail.com>
2641
2642         * method-to-ir.c: Use the managed array allocator method if
2643         available.
2644
2645 2009-10-13  Bill Holmes  <billholmes54@gmail.com>
2646
2647         * aot-compiler.c : Fix the MSVC builds
2648
2649         Code is contributed under MIT/X11 license.
2650
2651 2009-10-13  Zoltan Varga  <vargaz@gmail.com>
2652
2653         * aot-compiler.c (mono_save_xdebug_info): Group methods into groups of 10 to
2654         avoid registering 1 symbol file per method with gdb.
2655
2656 2009-09-29  Zoltan Varga  <vargaz@gmail.com>
2657
2658         * mini-sparc.c: Fix the handling of enums with base type long.
2659
2660         * mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.
2661
2662         * mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
2663         instead of using type->data.klass as the later doesn't work with generics.
2664
2665 2009-09-25  Mark Probst  <mark.probst@gmail.com>
2666
2667         * method-to-ir.c, mini.h, mini-alpha.c, mini-amd64.c, mini-arm.c,
2668         mini-hppa.c, mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c,
2669         mini-s390x.c, mini-sparc.c, mini-x86.c: Thread.get_CurrentThread
2670         works differently now and we don't handle it in the JIT anymore.
2671
2672         * mini.c, mini-exceptions.c, mini-posix.c, debug-debugger.c,
2673         debug-mini.c, tramp-amd64.c, tramp-x86.c: Changes resulting from
2674         the Thread class split.
2675
2676 2009-09-25  Zoltan Varga  <vargaz@gmail.com>
2677
2678         * driver.c: Don't run tests with the obsolete treeprop optimization.
2679
2680         * mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
2681         variable volatile. Fixes #541577.
2682
2683         * basic-calls.cs: Add a new test.
2684
2685         * basic-long.cs: Remove tests which are now in basic-calls.cs.
2686
2687 2009-09-24  Zoltan Varga  <vargaz@gmail.com>
2688
2689         * dwarfwriter.c (emit_debug_info_end): Disable this as it doesn't seem to
2690         work/required with recent iphone sdk versions.
2691
2692         * aot-compiler.c (add_wrappers): Generate PtrToStructure wrappers for more
2693         structures.
2694
2695         * decompose.c (mono_decompose_vtype_opts): Avoid reading uninitialized memory
2696         in the VCALL decomposition code.
2697
2698 2009-09-22  Zoltan Varga  <vargaz@gmail.com>
2699
2700         * mini-ia64.c (mono_arch_output_basic_block): Fix ISHR/ISHR_IMM.
2701
2702         * basic.cs: Add a test.
2703
2704         * mini-ia64.c (mono_arch_build_imt_thunk): Implement support the virtual
2705         generic invokes.
2706
2707         * mini-exceptions.c (mini_jit_info_table_find): New helper function which
2708         searches all the domains of the current thread.
2709
2710         * exceptions-<ARCH>.c: Use it. Fixes #539394.
2711
2712 2009-09-21  Zoltan Varga  <vargaz@gmail.com>
2713
2714         * exceptions-arm.c (mono_arm_throw_exception): Set ctx->ebp to fp instead of sp
2715         so catching exceptions thrown in the same method works. Fixes exception17.exe.
2716
2717         * tramp-arm.c (mono_arch_create_trampoline_code_full): Store NULL into lmf->method
2718         for non-jit trampolines.
2719
2720         * mini.c (mono_jit_runtime_invoke): Allow string ctors with dyn runtime invoke.
2721
2722         * aot-compiler.c (add_wrappers): Ditto.
2723
2724         * mini-arm.c: Implement support for passing vtypes and floats, and increase
2725         the size of the param area used by dyn_call to 6 which covers the majority of
2726         methods.
2727
2728         * mini.c aot-compiler.c: Allow dyn_call for string methods except ctors.
2729
2730         * mini-arm.c: Implement support for passing/receiving
2731         longs and receiving floats in the dyn_call code.
2732
2733         * mini-amd64.c: Implement support for receiving vtypes in registers in
2734         the dyn_call code.
2735
2736         * mini.c mini-amd64.c: Implement partial support for passing vtypes in
2737         the dyn_call code.
2738
2739 2009-09-20  Zoltan Varga  <vargaz@gmail.com>
2740
2741         * mini-arm.c (get_call_info): Return more precise information in
2742         ArgInfo->regtype.
2743         (dyn_call_supported): Use the information in CallInfo.
2744
2745         * mini-arm.c: Enable support for returning vtypes in the dyn_call code.
2746
2747         * mini.c mini-amd64.c: Enable support for returning vtypes in the dyn_call
2748         code.
2749
2750         * mini-arm.c: Update after the dyn_call api changes.
2751
2752         * mini.c (mini_create_jit_domain_info): Register a destructor function
2753         for the runtime_invoke_hash.
2754
2755         * mini-amd64.c (mono_arch_get_dyn_call_args): Rename this to
2756         'mono_arch_dyn_call_start'. Pass the pointer to the return value buffer to
2757         this function.
2758         (mono_arch_get_dyn_call_ret): Rename this to 'mono_arch_dyn_call_finish'.
2759         (dyn_call_supported): Simplify this by using get_call_info ().
2760         (mono_arch_dyn_call_free): New destructor function.
2761
2762         * generics.cs: Remove a printf.
2763
2764         * method-to-ir.c (mono_method_to_ir): Allocate some param area for DYN_CALL.
2765
2766         * mini-arm.c: Add support for enum return values and passing a few arguments
2767         on the stack.
2768         
2769         * mini.c (mono_jit_runtime_invoke): Add support for enum return values to
2770         dyn invoke.
2771
2772         * mini-amd64.c (mono_arch_get_dyn_call_ret): Ditto.
2773
2774         * aot-compiler.c (add_wrappers): Add a few restrictions for the use of
2775         the dynamic invoke wrappers.
2776
2777         * mini-arm.c: Implement OP_DYN_CALL for arm.
2778
2779         * aot-compiler.c (add_wrappers): Avoid aot-ing runtime invoke wrappers
2780         supported by the dynamic runtime invoke wrapper.
2781
2782         * aot-compiler.c aot-runtime.c: Add support for encoding the dynamic
2783         runtime invoke wrapper.
2784
2785         * mini.c (mono_jit_runtime_invoke): Use the dynamic runtime invoke wrappers
2786         if possible when running with full-aot.
2787
2788         * mini-ops.h: Add OP_DYN_CALL opcode.
2789
2790         * mini-amd64.c method-to-ir.c: Add infrastructure for making method calls
2791         with dynamic arguments lists similar to libffi.
2792
2793 2009-09-19  Zoltan Varga  <vargaz@gmail.com>
2794
2795         * method-to-ir.c: Fix the previous change on 64 bit platforms.
2796         
2797         * method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
2798         to NEWARR.
2799
2800         * iltests.il.in: Add a new test.
2801         
2802 2009-09-18  Zoltan Varga  <vargaz@gmail.com>
2803
2804         * aot-compiler.c (add_generic_instances): Add more instances of
2805         GenericEqualityComparer.
2806
2807 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
2808
2809         * mini.c: Add asserts for mono_class_vtable calls that are not meant to fail.
2810
2811 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
2812
2813         * method-to-ir.c: Handle failures from mono_class_vtable. Added some
2814         comments on some functions that now can fail.
2815
2816 2009-09-17  Andrew Jorgensen  <ajorgensen@novell.com>
2817
2818         * Makefile.am: Add Info.plist to EXTRA_DIST
2819
2820 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
2821
2822         * method-to-ir.c (mono_method_to_ir): Allow AOT for CEE_LDTOKEN in
2823         static synchronized wrappers. Fixes #539500.
2824
2825 2009-09-14  Rodrigo Kumpera  <rkumpera@novell.com>
2826
2827         * jit-icalls.c (mono_class_static_field_address): handle vtable failure
2828         properly.
2829
2830 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
2831
2832         * mini-exceptions.c (mono_handle_exception_internal): Store the computed
2833         lmf before calling filter clauses as well. Fixes #539550.
2834
2835         * exceptions.cs: Add a test.
2836         
2837 2009-09-14  Zoltan Varga  <vargaz@gmail.com>
2838
2839         * aot-compiler.c (add_generic_class): Add instances of
2840         Array.GetGenericValueImpl as well.
2841
2842         * Makefile.am (fullaotcheck): Copy and aot more assemblies so linq
2843         can be tested too.
2844
2845         * generics.cs: Add a fullaot linq test.
2846
2847 2009-09-10  Zoltan Varga  <vargaz@gmail.com>
2848
2849         * aot-compiler.c (arch_emit_static_rgctx_trampoline): Don't clobber argument
2850         reg r1 on arm.
2851
2852 2009-09-10  Bill Holmes  <billholmes54@gmail.com>
2853
2854         * mini-trampolines.c (mono_delegate_trampoline) : Call
2855           mono_cominterop_get_invoke if the delegate target object
2856           is a COM object.
2857
2858         Code is contributed under MIT/X11 license.
2859
2860 2009-09-09  Sebastien Pouliot  <sebastien@ximian.com>
2861
2862         * method-to-ir.c: For CoreCLR throw a SecurityException if an 
2863         internal call is defined outside platform code. Reduce code 
2864         duplication with existing [Method|Field]AccessException
2865
2866 2009-09-08  Rodrigo Kumpera  <rkumpera@novell.com>
2867
2868         * mini-x86.c (mono_arch_emit_call): Don't reduce stack usage by 4
2869         if the return value is a small struct passed on regs.
2870
2871 2009-09-09  Zoltan Varga  <vargaz@gmail.com>
2872
2873         * cpu-arm.md mini-arm.c: Remove unused opcodes.
2874
2875         * mini-codegen.c: Enable the cpu description validation for arm.
2876
2877 2009-09-08  Zoltan Varga  <vargaz@gmail.com>
2878
2879         * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
2880         test which depends on structs to objects.cs.
2881         
2882         * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
2883         require object model related stuff working.
2884
2885         * cpu-x86.md mini-x86.c: Remove more unused opcodes.
2886
2887         * mini-ops.h: Fix OP_BIGMUL instruction descriptions.
2888
2889         * mini-codegen.c (mono_local_regalloc): Validate the cpu description 
2890         against the instruction metadata in mini-ops.h. amd64 only for now.
2891
2892         * mini-ops.h: Fix some instruction descriptions.
2893
2894         * mini-ops.h mini-x86.c mini-amd64.c cpu-<ARCH>.md: Remove some
2895         unused instructions.
2896
2897 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
2898
2899         * exceptions.cs: Add a new test.
2900
2901 2009-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
2902
2903         * mini-x86.c (needs_stack_frame): OSX requires full frames to keep proper alignment.
2904
2905 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
2906
2907         * mini-llvm.c (mono_llvm_emit_method): Add a few more missing casts,
2908         skip empty phi opcodes.
2909         
2910         * mini-llvm.c (mono_llvm_emit_method): Handle unsigned volatile variables
2911         correctly by zero extending after loads. Skip methods containing calls
2912         to the monitor enter/exit trampolines.
2913
2914         * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
2915         when calling mono_thread_force_interruption_checkpoint ().
2916
2917         * mini.c (mini_method_compile): Disable llvm when AOT compiling.
2918
2919         * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
2920         64 bit thunks.
2921         (mono_arch_nullify_class_init_trampoline): Read 'buf' instead of 'code'.
2922
2923         * mini-llvm.c (mono_llvm_emit_method): Add a few missing conversions so a 
2924         bootstrap could run.
2925
2926 2009-09-04  Zoltan Varga  <vargaz@gmail.com>
2927
2928         * mini.c (mini_init): Set callbacks.get_runtime_build_info ().
2929
2930 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
2931
2932         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass the start
2933         of the method to
2934         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
2935         LLVM might be very short.
2936
2937         * mini-x86.c (mono_arch_output_basic_block): Maintain stack alignment
2938         in OP_THROW/RETHROW.
2939
2940         * exceptions-x86.c: Rewrite the throw trampolines so they maintain stack
2941         alignment on osx.
2942
2943 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
2944
2945         * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
2946         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
2947         LLVM might be very short.
2948
2949 2009-09-01  Zoltan Varga  <vargaz@gmail.com>
2950
2951         * exceptions-x86.c (throw_exception): Fix the previous change by substracting
2952         the alignment for the value of sp.
2953
2954 2009-09-01  Geoff Norton  <gnorton@novell.com>
2955
2956         * mini.c (mono_get_lmf_addr): Fix jit_thread_attach for native to 
2957         managed wrappers in full aot.
2958
2959 2009-08-31  Zoltan Varga  <vargaz@gmail.com>
2960
2961         * exceptions-x86.c (get_throw_exception): Align the stack on osx.
2962
2963 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
2964
2965         * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
2966
2967 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
2968
2969         * aot-compiler.c (emit_exception_debug_info): Emit ei->flags too.
2970
2971         * aot-runtime.c (decode_exception_debug_info): Decode ei->flags from the
2972         saved info.
2973
2974         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2975
2976         * aot-runtime.c aot-compiler.c: Emit exception causes fully so we don't
2977         depend on the info MonoMethodHeader which could be missing in IL stripped
2978         assemblies.
2979
2980 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
2981
2982         * mini-arm.c (add_general): Fix the passing of 64 bit values on darwin, where
2983         they are only 4 byte aligned.
2984
2985 2009-08-21  Zoltan Varga  <vargaz@gmail.com>
2986
2987         * mini-arm.c (mono_arch_allocate_vars): Use FP as the frame pointer as
2988         was done previously, since using SP causes too many problems.
2989
2990         * exceptions-arm.c: Fix the handling of sp/fp so unwinding through
2991         frames without a frame pointer works.
2992
2993         * mini-arm.c (mono_arch_get_global_int_regs): Avoid using V5 as a
2994         global register in methods with calls, since the calls can go through
2995         a static rgctx trampoline which doesn't save it.
2996
2997 2009-08-19  Zoltan Varga  <vargaz@gmail.com>
2998
2999         * mini-arm.c (mono_arch_context_get_int_reg): Handle SP as well.
3000
3001 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
3002
3003         * aot-compiler.c (add_generic_instances): Fix the net 1.1 build.
3004
3005 2009-08-18  Christian Hergert  <chris@dronelabs.com>
3006
3007         * method-to-ir.c: Fix warnings for uninitialized variables.
3008
3009 2009-08-18  Christian Hergert  <chris@dronelabs.com>
3010
3011         * mini-exceptions.c:
3012         * aot-compiler.c: Fix printf warnings.
3013
3014 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
3015
3016         * aot-compiler.c (add_generic_instances): Add string[] wrapper methods.
3017         Add GetGenericValueImpl<string>.
3018         
3019         * aot-compiler.c (add_generic_instances): Add instances of
3020         GenericEqualityComparer<T> for primitive types. Only emit the array
3021         wrappers into the mscorlib image.
3022
3023 2009-08-15  Zoltan Varga  <vargaz@gmail.com>
3024
3025         * aot-runtime.c (load_method): Rename 'aot_module' -> 'amodule'. Allocate
3026         the methods_loaded array using amodule->info->nmethods.
3027
3028         * mini.h (MonoAotFileInfo): Add an 'nmethods' field.
3029         (MONO_AOT_FILE_VERSION): Bump this.
3030
3031         * aot-compiler.c: Emit more generic instances allowing some parts of linq
3032         to work.
3033
3034         * aot-runtime.c (mono_aot_get_unwind_info): Handle the case when the
3035         MonoJitInfo doesn't belong to its methods aot image.
3036
3037 2009-08-14  Zoltan Varga  <vargaz@gmail.com>
3038
3039         * mini-arm.c (mono_arch_allocate_vars): Use SP as the default frame reg.
3040
3041         * mini-arm.c: Fix warnings.
3042         
3043         * mini-arm.c (mono_arm_emit_load_imm): Only emit a movt if needed.
3044
3045         * mini-arm.c (mono_arm_emit_load_imm): Use movt/movw if the cpu
3046         supports it.
3047
3048 2009-08-12  Zoltan Varga  <vargaz@gmail.com>
3049
3050         * aot-compiler.c (arch_emit_imt_thunk): Rework the arm code to
3051         avoid clobbering IP.
3052
3053         * mini-trampolines.c (mono_magic_trampoline): Allocate a local to
3054         hold the trampoline argument, so its initial value is available during
3055         debugging.
3056
3057 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3058
3059         * exceptions-arm.c:
3060         * exceptions-hppa.c:
3061         * mini.c:
3062         * exceptions-s390x.c:
3063         * exceptions-mips.c:
3064         * exceptions-ppc.c:
3065         * exceptions-sparc.c:
3066         * exceptions-alpha.c:
3067         * aot-runtime.c:
3068         * mini-trampolines.c:
3069         * exceptions-x86.c:
3070         * exceptions-s390.c: add and use #define's instead of sizeof()
3071         for MonoJitInfo and MonoJitInfoTable.
3072
3073 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
3074
3075         * tramp-arm.c:
3076         * tramp-amd64.c:
3077         * tramp-ppc.c:
3078         * tramp-x86.c: use a #define instead of sizeof() for a few
3079         structures that use a zero-length array.
3080
3081 2009-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
3082
3083         * method-to-ir.c (mono_method_to_ir/CEE_CONSTRAINED_): Handle the
3084         case when the method is dynamic. Fixes #529238.
3085
3086 2009-08-06  Zoltan Varga  <vargaz@gmail.com>
3087
3088         * mini.c (mono_jit_compile_method_inner): Throw an exception instead
3089         of asserting when a method is JIT compiled in full-aot mode.
3090
3091 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
3092         
3093         Contributed under the terms of the MIT/X11 license by
3094         Jerry Maine <crashfourit@gail.com>.
3095         
3096         * fixed wrong dates in changelog.
3097
3098 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
3099         
3100         Contributed under the terms of the MIT/X11 license by
3101         Jerry Maine <crashfourit@gail.com>.
3102
3103         * basic-simd.cs: added test for packed double square root.
3104         * cpu-amd64.md: added opcode info for packed double square root.
3105         * cpu-x86.md: added opcode info for packed double square root.
3106         * mini-ops.h: added IR opcode for packed double square root.
3107         * mini-x86.c: added IR to native translation code for packed double square root.
3108         * mini-amd64.c: removed todo for packed double square root.
3109         * simd-intrinsics.c: added method to IR opcode converstion for
3110         packed double square root.
3111
3112 2009-08-03 Jerry Maine <crashfourit@gmail.com>
3113
3114         Contributed under the terms of the MIT/X11 license by
3115         Jerry Maine <crashfourit@gail.com>.
3116
3117         * mini-amd64.c: Added a change to help tell the difference as 
3118         to what perpose the xmm register is being used--mainly to help
3119         with debuging.
3120         * mini-amd64.h: Changed callee regs to use 15 out of 16 
3121         (one used for special cases) xmm registers for both fp
3122         and simd ops. Added define to turn on new feature in the regalloc
3123         that allows fp and simd ops to share the xmm regs happily.
3124         * codegen.c: Added code to detect for which perpose an xmm reg is
3125         being used (fp or simd) and to translate back and forth to the
3126         correct logical reg bank (fp or simd) for 'spill load's.
3127
3128 2009-08-03 Jerry Maine <crashfourit@gmail.com>
3129
3130         Contributed under the terms of the MIT/X11 license by
3131         Jerry Maine <crashfourit@gail.com>.
3132
3133         * basic-simd.cs: Added tests for stressing the regalloc when running with
3134         16 simd regs and when simd and fp ops share the same reg bank.
3135
3136 2009-08-01  Mark Probst  <mark.probst@gmail.com>
3137
3138         * method-to-ir.c (mini_emit_stobj): If we call mono_value_copy()
3139         in shared generic code, we might have to look up the class in the
3140         RGCTX.  If we use the class directly, compute its GC descriptor.
3141
3142 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
3143
3144         * mini.c (mono_jit_runtime_invoke): Fix a warning.
3145
3146 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
3147
3148         * mini.c (mono_jit_runtime_invoke): Initialize the class and
3149         check for errors. Fixed the case when the class with the Main
3150         method is broken.
3151
3152 2009-07-31 Jerry Maine <crashfourit@gmail.com>
3153
3154         Contributed under the terms of the MIT/X11 license by
3155         Jerry Maine <crashfourit@gail.com>.
3156
3157         * cpu-amd64.md: Fixed simple bug in machine discrition file.
3158
3159 2009-07-31  Zoltan Varga  <vargaz@gmail.com>
3160
3161         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.
3162
3163 2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
3164
3165         * method-to-ir.c: Fix naming of stelem and ldelem.
3166
3167 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
3168
3169         * driver.c (main_thread_handler): Check that the assembly loaded
3170         matches the filename when doing AOT.
3171
3172 2009-07-30  Mark Probst  <mark.probst@gmail.com>
3173
3174         * mini.c: get_ip_from_sigctx installer has been removed, so don't
3175         call it anymore.
3176
3177         * mini-x86.h, mini-amd64.h, mini-ppc.h: UCONTEXT macros moved (to
3178         utils/mono-sigcontext.h).
3179
3180         * exceptions-amd64.c: Use the UCONTEXT_GREGS macro instead of an
3181         #ifdef.
3182
3183 2009-07-29  Massimiliano Mantione  <massi@ximian.com>
3184
3185         * mini.c (mono_codegen):
3186         Call profiler hook to keep track of method code buffers.
3187
3188 2009-07-27  Mark Probst  <mark.probst@gmail.com>
3189
3190         * method-to-ir.c: Invoke write barriers for the
3191         Interlocked.(Compare)Exchange JIT intrinsics.
3192
3193 2009-07-26  Raja R Harinath  <harinath@hurrynot.org>
3194
3195         * Makefile.am (version.h): Fix issues when built out of tree.
3196         Remove some redundant 'grep's piped through 'sed's.
3197
3198 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
3199
3200         This patch is contributed under the terms of the MIT/X11 license
3201
3202         * mini-ppc.c (mono_arch_output_basic_block):
3203         (OP_STOREI1_MEMBASE_REG): Handle 32-bit offsets combining addis
3204         for bits 32-47 with signed load/store diplacements for bits
3205         48-63.  Use prefered base/offset order for indexed form.
3206         (OP_STOREI2_MEMBASE_REG, OP_STORE_MEMBASE_REG): Same.
3207         (OP_LOAD_MEMBASE, OP_LOADI4_MEMBASE, OP_LOADU4_MEMBASE,
3208         OP_LOADI1_MEMBASE, OP_LOADU1_MEMBASE, OP_LOADU2_MEMBASE,
3209         OP_LOADI2_MEMBASE): Same.
3210         (OP_STORER8_MEMBASE_REG, OP_LOADR8_MEMBASE,
3211         OP_STORER4_MEMBASE_REG, OP_LOADR4_MEMBASE): Same.
3212         (OP_STOREI1_MEMINDEX): Use prefered base/offset order for
3213         indexed form.
3214         (OP_STOREI2_MEMINDEX, OP_STORE_MEMINDEX): Same.
3215         (OP_LOAD_MEMINDEX, OP_LOADI4_MEMINDEX, OP_LOADU4_MEMINDEX,
3216         OP_LOADU2_MEMINDEX, OP_LOADI2_MEMINDEX, OP_LOADU1_MEMINDEX,
3217         OP_LOADI1_MEMINDEX): Same
3218         (OP_LOADR4_MEMINDEX, OP_LOADR8_MEMINDEX, OP_STORER4_MEMINDEX,
3219         OP_STORER8_MEMINDEX): Same
3220         (OP_JMP): Use addis/addi sequence for int cfg->stack_usage
3221         computations.
3222         (mono_arch_emit_prolog): Handle 32-bit offsets combining addis
3223         for bits 32-47 with signed load/store diplacements for bits
3224         48-63.  Use prefered base/offset order for indexed form.
3225
3226 Fri Jul 24 16:57:12 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
3227
3228 This patch is contributed under the terms of the MIT/X11 license
3229
3230         * mini-ppc.c: Define PPC_MOVE_FPR_GPR and PPC_ISA_64.
3231         (mono_arch_get_vcall_slot): Fx pointer to int cast warning.
3232         (mono_arch_decompose_opts): Make OP_ICONV_TO_R4 and
3233         OP_ICONV_TO_R8 decompose conditional on !PPC_ISA_64.
3234         (mono_arch_output_basic_block) [OP_JMP]: Use ppc_load32 for
3235         cfg->stack_usage to avoid size warnings.
3236         (mono_arch_output_basic_block) [__mono_ppc64__]: Replace
3237         store/load sequence with mffgpr if PPC_MOVE_FPR_GPR is true.
3238         (mono_arch_output_basic_block) [!__mono_ppc64__]: For
3239         OP_ICONV_TO_R4 or OP_ICONV_TO_R8 and PPC_ISA_64 use fcfid
3240         to convert.
3241         (mono_arch_emit_prolog): Move mono_emit_unwind_op_def_cfa 
3242         after code varible is initialized.
3243         Add g_assert ppc_is_imm16 for ainfo->offset. Handle
3244         ainfo->size == 8 when ainfo->offset !ppc_is_imm16.
3245         (mono_arch_emit_epilog): 
3246         Move Use ppc_load32 for cfg->stack_usage to avoid size
3247         warnings.
3248
3249 2009-07-24  Mark Probst  <mark.probst@gmail.com>
3250
3251         * method-to-ir.c: The write barrier doesn't do the store anymore,
3252         so we have always to emit it.  Also, emit the wbarrier after the
3253         store.
3254
3255 2009-07-24  Zoltan Varga  <vargaz@gmail.com>
3256
3257         * mini-arm.c (mono_arch_get_delegate_invoke_impls): Add a trampoline
3258         for argument count 3 too.
3259
3260 2009-07-23  Zoltan Varga  <vargaz@gmail.com>
3261
3262         * mini.c (mono_jit_compile_method_with_opt): Add an 'ex' argument to let
3263         the caller handle the exceptions.
3264         (mono_jit_runtime_invoke): Handle exceptions thrown while compiling the
3265         method. Fixes #524498.
3266
3267 2009-07-22  Geoff Norton  <gnorton@novell.com>
3268
3269         * mini-exceptions.c: Fix build on ia64.
3270
3271 2009-07-22  Mark Probst  <mark.probst@gmail.com>
3272
3273         * mini-exceptions.c (ves_icall_get_frame_info): Use write
3274         barriers.
3275
3276 2009-07-21  Zoltan Varga  <vargaz@gmail.com>
3277
3278         * mini-arm.c (mono_arch_emit_prolog): Fix thread attaching in aot
3279         code.
3280
3281 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
3282
3283         * basic-simd.cs (Main): Pass args to the test driver.
3284
3285 2009-07-20  Geoff Norton  <gnorton@novell.com>
3286
3287         * mini-x86.h: Fix the x86 version guards to use Apple's
3288         properly defined macros.
3289
3290 2009-07-20  Geoff Norton  <gnorton@novell.com>
3291
3292         * mini-x86.c: Fix --trace on darwin-x86 and other systems which require
3293         aligned access.
3294
3295 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
3296
3297         * mini.c (mono_jit_runtime_invoke): Speed this up by adding a hash to
3298         MonoJitDomainInfo which maps MonoMethod's to a structure containing all
3299         the information which is needed for invokes, so only one locking+hash table
3300         lookup is needed.
3301
3302         * aot-compiler.c: Add a 'tool-prefix' option to be used when cross-compiling.
3303         
3304         * aot-compiler.c (add_generic_instances): Emit instances of 
3305         GenericComparer<T> for primitive types.
3306
3307 2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>
3308
3309         * mini-posix.c: Fix linux build.
3310
3311 2009-07-19  Geoff Norton  <gnorton@novell.com>
3312
3313         * mini.h: Add prototypes for mono_runtime_syscall_fork and
3314         mono_gdb_render_native_backtraces
3315         * mini-darwin.c: Apple's syscall(SYS_fork) is very weird on x86,
3316         so we implement the sane semantics to the runtime here
3317         (mono_gdb_render_native_backtraces).  Apple also uses an ancient gdb
3318         so we need to call it differently (mono_gdb_render_native_backtraces)
3319         * mini-posix.c: Move the old semantics from mini.c to the prototypes
3320         here for default implementations.
3321         * mini.c: Refactor mono_handle_native_sigsegv so that we can properly
3322         support Apple's weird syscall (SYS_fork) implementation and not busy
3323         loop in abort() on native crashes on OSX anymore.
3324
3325 2009-07-18  Zoltan Varga  <vargaz@gmail.com>
3326
3327         * aot-runtime.c (load_method): Change the handling of the
3328         MONO_LASTAOT env variable so MONO_LASTAOT=0 means that no aot methods
3329         are used.
3330
3331         * mini.c (mono_patch_info_equal): Really fix the handling of RGCTX_FETCH.
3332
3333 2009-07-17  Zoltan Varga  <vargaz@gmail.com>
3334
3335         * mini.c (mono_patch_info_equal): Revert the last change for now as it
3336         seems to break the aot tests.
3337         
3338         * mini.c (mono_patch_info_equal): Fix the handling of 
3339         MONO_PATCH_INFO_RGCTX_FETCH.
3340
3341 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
3342
3343         * unwind.c: Use TARGET_AMD64 instead of __x86_64__.
3344
3345         * mini.c (mono_patch_info_hash): Fix the handling of 
3346         MONO_PATCH_INFO_INTERNAL_METHOD.
3347         (mono_patch_info_equal): Ditto.
3348
3349 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
3350
3351         * mini-llvm.c (mono_llvm_emit_method): Use module instead of ctx->module
3352         in a few places.
3353         
3354         * mini-llvm.c: Add some infrastructure for AOT support.
3355
3356 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
3357
3358         * mini-llvm-cpp.c: Update to the latest llvm api.
3359         
3360         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Set the EnablePrettyStackTrace
3361         option to false to prevent llvm from installing signal handlers which
3362         trip up the gc.
3363         
3364 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
3365
3366         * cpu-x86.md:
3367         * cpu-amd64.md: Revert previous change as those instructions
3368         take 2 separate arguments. Remember to read the arch docs more
3369         carefully next time.
3370
3371 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
3372
3373         * mini-llvm-cpp.cpp (mono_llvm_build_alloca): Update to latest llvm api.
3374
3375 Wed Jul 15 17:20:27 CEST 2009 Paolo Molaro <lupus@ximian.com>
3376
3377         * mini-ppc.c: exploit multiple load/store units if available (rest of
3378         the change from Steven Munroe (<munroesj@us.ibm.com>) first patch at 
3379         http://bugzilla.novell.com/show_bug.cgi?id=487846).
3380
3381 Wed Jul 15 16:24:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
3382
3383         * mini-ppc.c: integrate most of Steven Munroe (<munroesj@us.ibm.com>)
3384         first patch at http://bugzilla.novell.com/show_bug.cgi?id=487846.
3385
3386 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
3387
3388         * cpu-x86.md: Fix missing clobbering from trancendental simd
3389         ops.
3390
3391         * cpu-amd64.md: Same.
3392
3393 2009-07-14 Jerry Maine <crashfourit@gmail.com>
3394
3395         Contributed under the terms of the MIT/X11 license by
3396         Jerry Maine <crashfourit@gail.com>.
3397
3398         * basic-simd.cs: Added tests for single and doulble indexers.
3399
3400         * cpu-amd64.md: Added simd opcode information.
3401
3402         * mini-amd64.c: Added IR to native simd generation code.
3403         Added simd register names and function that returns them.
3404
3405         * mini-amd64.h: Added marcos to turn on simd code compilation in
3406         amd64. Added max simd register count marco. Added caller/callee
3407         register mask marcos. Added marcos to use simd register bank.
3408
3409         * mini.h: Added helper marco for shufling dwords and simple
3410         floats.
3411
3412 2009-07-14  Zoltan Varga  <vargaz@gmail.com>
3413
3414         * mini-llvm-cpp.cpp: Update to latest llvm SVN api.
3415
3416         * Makefile.am (mono_LDADD): Pass LLVM_LDFLAGS to the linked.
3417
3418         * unwind.c (mono_unwind_get_ops_from_fde): Make this return
3419         the length of the native code as well.
3420
3421         * basic-simd.cs: Add a test for #521662.
3422
3423 Mon Jul 13 17:58:50 CEST 2009 Paolo Molaro <lupus@ximian.com>
3424
3425         * mini-ppc.c: fixed bug introduced by Steven's TLS changes.
3426
3427 2009-07-13  Mark Probst  <mark.probst@gmail.com>
3428
3429         * mini.c: Register function for getting the IP from a signal
3430         context with metadata.
3431
3432 2009-07-13  Zoltan Varga  <vargaz@gmail.com>
3433
3434         * method-to-ir.c (mono_method_to_ir): When calling a gshared method,
3435         call a generic class init trampoline if needed. Fixes #519336.
3436
3437         * generics.cs: Add a test.
3438         
3439 2009-07-09  Mark Probst  <mark.probst@gmail.com>
3440
3441         * method-to-ir.c: When doing a call which might be remote from
3442         shared generic code to other shared code with open type arguments,
3443         get the remoting invoke wrapper from the RGCTX and do an indirect
3444         call to it.
3445
3446 2009-07-03  Zoltan Varga  <vargaz@gmail.com>
3447
3448         * mini-trampolines.c (get_unbox_trampoline): Add an rgctx trampoline
3449         after the unbox trampoline in the full-aot case.
3450
3451 2009-07-02  jonas echterhoff <jonas@unity3d.com>
3452         
3453         * mini.c: Move initialization of jit_mutex before debugger initialization
3454         
3455         to avoid crashes.
3456         
3457         
3458         * Info.plist: added Info.plist and link flag to enable the mono executable
3459         to access other processes. Requires codesigning of the executable to work.
3460         
3461         * mdb-debug-info32-darwin.s: The same as mdb-debug-info32.s, changed to 
3462         
3463         compile on OS X.
3464         
3465
3466 2009-06-30  Zoltan Varga  <vargaz@gmail.com>
3467
3468         * driver.c (mini_regression): Handle loading errors. Fixes #508869.
3469
3470 2009-06-29  Zoltan Varga  <vargaz@gmail.com>
3471
3472         * mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
3473         when the generic instance is an instantiation of a subclass of the
3474         methods class. Fixes #517166.
3475
3476 2009-06-26  Zoltan Varga  <vargaz@gmail.com>
3477
3478         * mini-amd64.c (mono_arch_emit_prolog): Fix thread attaching in AOTed
3479         code.
3480
3481         * mini.c (mono_jit_thread_attach): Allow domain to be NULL for calls from
3482         AOTed code.
3483
3484         * CMakeLists.txt: Add minimal support for installation.
3485
3486 2009-06-25  Zoltan Varga  <vargaz@gmail.com>
3487
3488         * aot-compiler.c (emit_and_reloc_code): Factor out the code to
3489         determine whenever a method is directly callable to a separate function.
3490
3491         * mini-<ARCH>.c tramp-<ARCH>.c: Remove needless casts and add new
3492         needed ones as a result of the previous change.
3493
3494         * mini-<ARCH>.c tramp-<ARCH>.c: Use mgreg_t* as the
3495         type of register arrays.
3496
3497         * mini-trampolines.c tramp-<ARCH>.c aot-runtime.c: Use mgreg_t* as the
3498         type of register arrays.
3499
3500 2009-06-24  Jerry Maine  <crashfourit@gmail.com>
3501         
3502         Contributed under the terms of the MIT/X11 license by
3503         Jerry Maine <crashfourit@gail.com>.
3504
3505         * mini-amd64.c: Added code to convert simd IR to native amd64 sse.
3506
3507 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
3508
3509         * aot-compiler.c (emit_plt): Define debug labels for most plt entries.
3510
3511 2009-06-24  Neale Ferguson <neale@sinenomine.net>
3512
3513         * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
3514         dump of structure return value. Fix some formatting.
3515         * cpu-s390x.md: Fix lengths of instruction sequences.
3516         * mini-s390.c: Minor formatting changes.
3517
3518 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
3519
3520         * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
3521         Use sigaction on freebsd as well.
3522
3523 2009-06-23  Zoltan Varga  <vargaz@gmail.com>
3524
3525         * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
3526         uses #ifdef on it.
3527         
3528         * mini.c (mini_init): Revert a change which breaks cross-compilation.
3529
3530 2009-06-22  Mark Probst  <mark.probst@gmail.com>
3531
3532         * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
3533
3534 2009-06-22  Mark Probst  <mark.probst@gmail.com>
3535
3536         * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
3537
3538 2009-06-20  Martin Baulig  <martin@ximian.com>
3539
3540         * debug-mini.c
3541         (MonoDebuggerThreadFlags): New enum typedef.
3542         (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
3543         (mono_debugger_thread_created): Added `gpointer func' argument;
3544         initialize the new `thread_flags' field.
3545
3546 2009-06-18  Martin Baulig  <martin@ximian.com>
3547
3548         * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
3549         (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
3550
3551         * debug-debugger.c
3552         (mini_debugger_set_attach_ok): New function; sets the attach-ok
3553         flag in `MONO_DEBUGGER__info.runtime_info'.
3554
3555         * driver.c
3556         (mono_main): Call mini_debugger_set_attach_ok() if generics
3557         sharing is disabled.
3558
3559 2009-06-22  Zoltan Varga  <vargaz@gmail.com>
3560
3561         * aot-compiler.c (add_wrappers): Fix a warning.
3562
3563         * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
3564         the ppc load/store macro changes.
3565
3566 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
3567
3568         * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
3569
3570         * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
3571         not just the got symbol.
3572
3573         * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
3574         on ppc.
3575
3576         * aot-compiler.c unwind.c: Add infrastructure for unwind support on
3577         ppc.
3578         
3579         * aot-compiler.c: Remove some fixmes.
3580
3581         * driver.c (mono_main): Print a helpful message when cross-compiling.
3582
3583         * mini.c (mini_init): Disable signal handlers when cross-compiling.
3584
3585         * method-to-ir.c (initialize_array_data): Do the optimization if the
3586         target byte order is little endian, instead of the host byte order.
3587
3588         * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
3589         wrappers into the mscorlib image, Emit a unique plt symbol for each
3590         image, emit symbols for plt entries.
3591
3592         * image-writer.c (img_writer_emit_symbol_size): New function to emit
3593         a .size directive.
3594         
3595 2009-06-20  Zoltan Varga  <vargaz@gmail.com>
3596
3597         * aot-compiler.c (add_wrappers): Avoid calling 
3598         mono_marshal_get_type_info () since it can assert for some types.
3599
3600         * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of 
3601         ldtoken are used inside wrappers.
3602
3603         * helpers.c: Add support for prefixing tools with the arch name.
3604
3605         * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
3606         quantities when using ilp32.
3607
3608         * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
3609         spill slots. Use sizeof(mgreg_t) for the spill slot size.
3610
3611         * image-writer.c: Use .long on ilp32.
3612
3613         * aot-compiler.c: Use 32 bit loads on ilp32.
3614         
3615 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
3616
3617         * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
3618
3619         * mini-ops.h: Use TARGET_POWERPC define for consistency.
3620
3621         * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
3622
3623         * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the 
3624         second got slot of every aot image.
3625         
3626         * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
3627         aot on platforms with function pointers.
3628
3629         * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
3630         support for aot/full aot on ppc/ppc64.
3631         
3632         * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
3633         arguments which are needed on ppc.
3634
3635         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
3636         argument.
3637
3638         * mini-trampolines.c aot-runtime.c: Update after the above changes.
3639         
3640         * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
3641
3642         * regalloc2.c (BITS_PER_CHUNK): Ditto.  
3643
3644         * aot-compiler.c (emit_got_info): Fix reading unused memory.
3645
3646         * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
3647
3648 2009-06-17  Geoff Norton  <gnorton@novell.com>
3649
3650         * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
3651
3652 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
3653
3654         * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
3655         to control whenever the dwarf writer is in xdebug or aot mode.
3656         (emit_class_dwarf_info): Use a separate abbrev for structures without
3657         children.
3658
3659         * aot-compiler.c: Pass the appending parameter to 
3660         mono_dwarf_writer_create ().
3661
3662         * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
3663         falls through to its next bblock. Fixes #513931.
3664
3665         * iltests.il: Add a test.
3666
3667         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
3668         infor even if emit_line is FALSE, as the apple linker seems to require it.
3669
3670         * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
3671
3672         * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
3673         gcc does.
3674         (emit_fde): Ditto.
3675
3676 2009-06-15  Zoltan Varga  <vargaz@gmail.com>
3677
3678         * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
3679         mips build.
3680
3681 2009-06-13  Zoltan Varga  <vargaz@gmail.com>
3682
3683         * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and 
3684         'has_call_handler' fields.
3685
3686         * method-to-ir.c (mono_method_to_ir): Set them if needed.
3687
3688         * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
3689         first bblock if not needed. Fixes #512790.
3690         
3691 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
3692
3693         * aot-compiler.c (mono_compile_assembly): Fix a warning.
3694         
3695         * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
3696         wrappers.
3697
3698         * aot-runtime.c (mono_aot_get_method): Use the original method's code for
3699         remoting-invoke-with-check wrappers, which are not needed when running with
3700         full-aot, since it doesn't support remoting.
3701         
3702 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
3703
3704         * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
3705
3706         * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
3707         method info, it is not used anymore.
3708
3709         * mini.h: Bump AOT file format version.
3710         
3711         * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
3712         word smaller.
3713
3714         * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
3715         change above.
3716         
3717         * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
3718
3719         * mini.h: Bump AOT file format version.
3720         
3721 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
3722
3723         * image-writer.c (asm_writer_emit_symbol_diff): Disable the 
3724         TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
3725         iphone.
3726
3727         * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
3728         of CKFINITE and FBGE for VFP.
3729
3730 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
3731
3732         * aot-compiler.c: Don't align code to 16 bytes on arm.
3733         
3734         * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
3735         before the methods they belong to.
3736
3737         * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
3738         the full-aot case if possible, since the trampoline will be called right 
3739         away.
3740
3741         * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
3742         trampolines to 1024 after the change above.
3743
3744         * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
3745         trampoline to save 8 bytes per trampoline.
3746
3747         * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
3748         change above.
3749
3750 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
3751
3752         * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
3753
3754 2009-06-08  Martin Baulig  <martin@ximian.com>
3755
3756         * debug-mini.c
3757         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
3758         (_mono_debugger_throw_exception): Don't make this static.
3759         (_mono_debugger_unhandled_exception): Likewise.
3760         (mono_debugger_handle_exception): Moved to mini-exceptions.c
3761
3762         * debug-mini.c
3763         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
3764         (_mono_debugger_throw_exception): Add function prototype.
3765         (_mono_debugger_unhandled_exception): Likewise.
3766
3767         * mini-exceptions.c
3768         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
3769         arg; return the first exception handler if the exception is caught
3770         and we're running inside the debugger.
3771         (mono_debugger_handle_exception): Moved here from debug-mini.c;
3772         improve exception handle inside runtime-invoke, check whether the
3773         exception is actually caught in the method being invoked and not
3774         by the runtime-invoke-wrapper.
3775
3776 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
3777
3778         * image-writer.c: Improve support for the osx assembler.
3779
3780         * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
3781         support them.
3782
3783 2009-06-08  Martin Baulig  <martin@ximian.com>
3784
3785         * debug-mini.c
3786         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
3787         (_mono_debugger_throw_exception): Don't make this static.
3788         (_mono_debugger_unhandled_exception): Likewise.
3789         (mono_debugger_handle_exception): Moved to mini-exceptions.c
3790
3791         * debug-mini.c
3792         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
3793         (_mono_debugger_throw_exception): Add function prototype.
3794         (_mono_debugger_unhandled_exception): Likewise.
3795
3796         * mini-exceptions.c
3797         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
3798         arg; return the first exception handler if the exception is caught
3799         and we're running inside the debugger.
3800         (mono_debugger_handle_exception): Moved here from debug-mini.c;
3801         improve exception handle inside runtime-invoke, check whether the
3802         exception is actually caught in the method being invoked and not
3803         by the runtime-invoke-wrapper.
3804
3805 2009-06-07  Zoltan Varga  <vargaz@gmail.com>
3806
3807         * image-writer.c (append_subsection): Don't align subsections of the
3808         debug_line section as a workaround.
3809
3810         * dwarfwriter.c: Emit line number info in the AOT case as well.
3811
3812 2009-06-06  Steven Munroe  <munroesj@us.ibm.com>
3813
3814         This patch is contributed under the terms of the MIT/X11 license
3815
3816        * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
3817        code_len <= code_size
3818
3819 2009-06-06  Zoltan Varga  <vargaz@gmail.com>
3820
3821         * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
3822
3823 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
3824
3825         * aot-compiler.c aot-runtime.c: Delete references to static rgctx
3826         invoke wrappers, we now use trampolines instead.
3827
3828 2009-06-04  Mark Probst  <mark.probst@gmail.com>
3829
3830         * mini-darwin.c: The exception thread must not be registered with
3831         the GC.
3832
3833 2009-06-04  Mark Probst  <mark.probst@gmail.com>
3834
3835         * mini-gc.c: Disable the code because it makes SGen crash.
3836
3837 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
3838
3839         * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
3840         instead of asserting.
3841
3842 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
3843
3844         * aot-compiler.c (mono_compile_assembly): Move the creation of the
3845         output file after the code has been compiled.
3846
3847 2009-05-30  Zoltan Varga  <vargaz@gmail.com>
3848
3849         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
3850
3851 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
3852
3853         * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
3854         entries distinction to simplify the code.
3855
3856         * mini.h: Bump AOT file format version.
3857         
3858 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
3859
3860         * objects.cs: Fix the signature of one of the tests.
3861
3862         * mini.c (mini_create_ftnptr): New helper function, moved here from
3863         object.c.
3864         (mini_get_addr_from_ftnptr): Ditto.
3865         (mini_init): Install the new helpers.
3866
3867 2009-05-28  Martin Baulig  <martin@ximian.com>
3868
3869         Correctly initialize the debugger when embedding Mono.
3870
3871         * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
3872         `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
3873         see documentation in mini_debug_running_inside_mdb().
3874
3875         * debug-debugger.c
3876         (mini_debug_running_inside_mdb): New function to check whether
3877         we're running inside mdb.
3878
3879         * mini.c (mini_init): Call mini_debugger_init() if we're running
3880         inside the debugger.
3881
3882         * driver.c (mono_main): Moved the call to mini_debugger_init()
3883         into mini_init() to make this work when embedding Mono.
3884
3885         * debug-debugger.c (mini_debugger_init): Warn about duplicate
3886         calls to mini_debugger_init().
3887
3888         * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
3889         mono_debugger_main() -> mini_debugger_main() and put them inside a
3890         `MONO_DEBUGGER_SUPPORTED' conditional.
3891
3892 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
3893
3894         * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
3895         this is no longer in use.
3896         * mini.h: Same.
3897
3898 2009-05-26  Zoltan Varga  <vargaz@gmail.com>
3899
3900         * mini-sparc.c (add_outarg_load): Fix the sparc build.
3901
3902         * aot-compiler.c (emit_method_code): Always write out C style symbols for
3903         methods.
3904
3905 2009-05-27  Martin Baulig  <martin@ximian.com>
3906
3907 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
3908
3909         * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
3910         long_conv_to_r_un to 64 bits.
3911
3912         * cpu-x86.md: Increase the instruction size due to the changes.
3913
3914         * iltests.il.in: Add regression test.
3915
3916         Fixes #467201.
3917
3918 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
3919
3920         * objects.cs: Move the previous test from basic.cs to here.
3921
3922 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
3923
3924         * basic.cs: Add regression test for #506915.
3925
3926 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
3927
3928         * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
3929         optimization we must check the bb of the first byte of stobj as
3930         it's the only one set in cil_offset_to_bb.
3931
3932         Fixes #506915.  
3933
3934 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
3935
3936         * image-writer.c: Fix pointer directive on ppc64.
3937
3938 2009-05-24  Zoltan Varga  <vargaz@gmail.com>
3939
3940         * image-writer.c (asm_writer_emit_section_change): Avoid using
3941         .bss subsections on ppc too.
3942
3943 2009-05-23  Zoltan Varga  <vargaz@gmail.com>
3944
3945         * image-writer.c: Fix the definition of TARGET_ASM_....
3946         
3947         * image-writer.c: Fix the emission of assembler directives in the last
3948         change.
3949
3950         * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
3951         exception throwing code to accomodate ppc64.
3952
3953         * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
3954         size to work on ppc64 too.
3955
3956         * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
3957         too.
3958
3959         * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
3960         the assembler dialect instead of using platform specific defines.
3961
3962 2009-05-22  Geoff Norton  <gnorton@novell.com>
3963
3964         * mini-arm.c (get_call_info): If a structure is split between the stack
3965         and argument registers, we should not advance the stack pointer by the entire
3966         native size, but just by the amount that spilled.
3967
3968 2009-05-22  Zoltan Varga  <vargaz@gmail.com>
3969
3970         * mini-arm.c (get_call_info): Handle structures with alignment requirements
3971         correctly.
3972
3973 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
3974
3975         * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
3976         wrappers normally.
3977         
3978         * aot-compiler.c (add_extra_method): Fix up the collection of extra
3979         methods so wrapper don't get added twice.
3980         (add_generic_instances): Don't add methods of arrays.
3981
3982         * generics.cs: Mark one test as !FULLAOT.
3983
3984 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
3985
3986         * mini-x86.c (emit_move_return_value): Remove unused vars.
3987
3988 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
3989
3990         * mini-x86.c (mono_arch_emit_call): The decompose code now supports
3991         decomposing 8 bytes structs into a LCALL.
3992
3993         * mini-x86.c (emit_move_return_value): We no longer push the vtype
3994         pointer for where to store the returned regs.
3995
3996         * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
3997         state the concern.
3998
3999         Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
4000
4001 2009-05-20  Miguel de Icaza  <miguel@novell.com>
4002
4003         * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
4004         without getenv.
4005
4006 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
4007
4008         * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
4009
4010         * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
4011         generics.
4012
4013 2009-05-20 Rodrigo Kumpera  <rkumpera@novell.com>
4014
4015         * local-propagation.c (mono_local_cprop): Avoid local propagation
4016         across paired add/sub if the first instruction dest reg is it's
4017         source reg. For example:
4018
4019         int_add_imm R12 <- R12 [1] clobbers: 1
4020         int_sub_imm R42 <- R12 [1] clobbers: 1
4021
4022         The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
4023         maintain the math identify.
4024
4025         Fixes #505375.
4026
4027 2009-05-20  Andreia Gaita  <avidigal@novell.com>
4028
4029         * Makefile.am: avoid going on the network just to get the revision,
4030         use git log instead
4031
4032 2009-05-19  Massimiliano Mantione  <massi@ximian.com>
4033
4034         Fixed estimate for short branches on amd64 (they were off mark, and
4035         enabling call prolog-epilog instrumentations caused assertions).
4036         * mini.h (struct MonoBasicBlock): added max_length field to hold the
4037         estimate for the maximum length of this basic block.
4038         * mini-amd64.c:
4039         - mono_arch_emit_prolog: compute max_length for each basic block
4040           (instead of max_offset), and inflate size estimate also for entry bb
4041           in case of code instrumentation.
4042         - mono_arch_output_basic_block: get rid of "cpos" (the current
4043           estimated "position" in the code), and always use "offset" instead,
4044           which is accurate; at the beginning of the function quickly recompute
4045           max_offset for all the remaining blocks, starting from the current
4046           cfg->code_len (which is correct, and not estimated) and using the
4047           estimated block lengths computed previously.
4048
4049 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
4050
4051         * exceptions-ppc.c: Remove the caching from the trampoline creation 
4052         functions, it is already done in the caller.
4053
4054         * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
4055
4056         * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add 
4057         MONO_ARCH_GSHARED_SUPPORTED define.
4058
4059         * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
4060
4061         * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
4062         function.
4063
4064 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
4065
4066         * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the 
4067         call to mono_marshal_get_rgctx_invoke ().
4068
4069         * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
4070         mono_marshal_get_static_rgctx_invoke (), all platforms which support
4071         gshared use the static rgctx trampolines now.
4072         
4073         * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
4074         platform supports it.
4075
4076 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
4077
4078         * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
4079
4080         * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
4081
4082 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
4083
4084         * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
4085
4086         * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
4087         for ppc.
4088
4089 2009-05-15  Massimiliano Mantione  <massi@ximian.com>
4090
4091         Made it possible for mono_arch_instrument_epilog to preserve
4092         argument registers, otherwise instrumenting the "epilogue" before
4093         a tail call would clobber them.
4094         * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
4095         if like mono_arch_instrument_epilog but with an additional parameter
4096         that states if argument registers must be preserved.
4097         * mini.c: implemented mono_arch_instrument_epilog as a call to
4098         mono_arch_instrument_epilog_full without asking to preserve argument
4099         registers (this makes the existing code work as usual).
4100         * mini-amd64.c:
4101         - mono_arch_instrument_epilog: add parameter to transform it into
4102         mono_arch_instrument_epilog_full, and preserve argument registers
4103         when required.
4104         - mono_arch_output_basic_block, OP_TAILCALL case: call
4105         mono_arch_instrument_epilog_full.
4106         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4107         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
4108         only transformed mono_arch_instrument_epilog into
4109         mono_arch_instrument_epilog_full.
4110
4111 2009-05-15  Geoff Norton  <gnorton@novell.com>
4112
4113         * mini-darwin.c: This works on arm now.
4114
4115 2009-05-14  Geoff Norton  <gnorton@novell.com>
4116
4117         * jit.h, driver.c: Allow full-aot to be decided programatically by the
4118         embedding api.
4119
4120 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
4121
4122         * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
4123         label names.
4124
4125         * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
4126         wrappers during full aot mode correctly.
4127
4128         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
4129         methods correctly.
4130
4131         * aot-compiler.c (mono_aot_method_hash): Use our internal version of
4132         mono_metadata_type_hash ().
4133
4134 2009-05-14  Massimiliano Mantione  <massi@ximian.com>
4135
4136         * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
4137         mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
4138         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
4139         Removed MONO_INST_BRLABEL from the instruction flags, and the
4140         remaining code that used it, because we do not support branches inside
4141         basic blocks (and branch target labels) anymore.
4142         * Makefile.am: As part of the above cleanup, remove reference to
4143         BURG files which don't exist anymore.
4144
4145 2009-05-14  Zoltan Varga  <vargaz@gmail.com>
4146
4147         * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
4148         osx.
4149
4150         * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
4151         to use mono_arch_throw_corlib_exception.
4152
4153         * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use 
4154         mono_arch_throw_corlib_exception for throwing corlib exceptions.
4155
4156         * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
4157         domain mempool.
4158
4159         * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
4160
4161         * aot-compiler.c: Emit a local symbol prefixed with the assembly name 
4162         for the got to make debugging easier and to avoid confusing it with the
4163         system got.
4164         
4165         * aot-compiler.c (emit_method_code): Emit a C style symbol for each
4166         method so a breakpoint can be set when using gdb.
4167
4168 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
4169
4170         * aot-compiler.c (mono_aot_method_hash): Implement this properly based
4171         on mono_method_get_imt_slot ().
4172
4173         * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
4174         num_decodes variables.
4175
4176         * aot-compiler.c (mono_aot_method_hash): Revert part of the last
4177         change as it doesn't seem to work.
4178         
4179         * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
4180         wrappers.
4181
4182 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
4183
4184         * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill 
4185         MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
4186
4187         * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
4188         builder when using full aot.
4189
4190         * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
4191         here, it is already handled.
4192         
4193         * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
4194         correctly for IMT.
4195
4196         * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
4197
4198         * mini-arm.h: Enable IMT for full aot.
4199         
4200         * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
4201         arch doesn't support it.
4202
4203         * mini.c (mini_init): Don't disable IMT for full aot if the
4204         architecture supports it.
4205
4206         * mini.h (MonoAotTrampoline): New enum containing the different types
4207         of 'numerous' trampolines.
4208         (MONO_AOT_FILE_VERSION): Bump this.
4209
4210         * aot-compiler.c aot-runtime.c: Unify the handling of specific and
4211         static rgctx trampolines. Add support for full-aot IMT thunks.
4212
4213         * mini-amd64.h: Enable IMT for full aot.
4214
4215         * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
4216         to exclude tests belonging to a category.
4217
4218         * generics.cs: Mark some tests with a !FULLAOT category.
4219
4220         * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
4221         generics tests.
4222
4223 2009-05-11  Zoltan Varga  <vargaz@gmail.com>
4224
4225         * aot-compiler.c (emit_and_reloc_code): Move the implementation of
4226         MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
4227         (emit_plt): Fix a warning.
4228
4229 2009-05-10  Zoltan Varga  <vargaz@gmail.com>
4230
4231         * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
4232         back into aot-compiler.c to a place where the other functions shared by
4233         the runtime and aot compiler are.
4234         
4235         * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
4236         as done previously, instead of in MonoAotFileInfo, since pointers might have
4237         alignment requirements.
4238
4239         * mini.h: Bump AOT file format version.
4240
4241 2009-05-10  Miguel de Icaza  <miguel@novell.com>
4242
4243         * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
4244         that is used at runtime from the aot-compiler.c, this makes it
4245         work on setups that remove the AOT compiler from the output
4246         image. 
4247
4248 2009-05-09  Zoltan Varga  <vargaz@gmail.com>
4249
4250         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
4251         PPC.
4252
4253         * mini-ppc.h: Enable static rgctx trampolines for ppc.
4254
4255         * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
4256
4257         * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific 
4258         stuff to mono_arch_decompose_long_opts ().
4259         (mono_decompose_opcode): Remove some dead code.
4260
4261 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
4262
4263         * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
4264         cmethod can be null for quite a some reasons.
4265
4266 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
4267
4268         * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
4269
4270 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
4271
4272         * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
4273
4274 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
4275
4276         * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
4277         (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
4278         whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
4279         calls returning structures by addr on amd64.
4280
4281         * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
4282
4283         * iltests.il.in: Restructure the tail call tests a bit.
4284         
4285 2009-05-07  Zoltan Varga  <vargaz@gmail.com>
4286
4287         * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
4288         for virtual methods too.
4289
4290 2009-05-06  Raja R Harinath  <harinath@hurrynot.org>
4291
4292         * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
4293         due to regression in verifying System.dll.
4294
4295 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
4296
4297         * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
4298         in dynamic methods.
4299
4300         * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
4301         instances.
4302
4303         * aot-compiler.c aot-runtime.c: Use our own hash function instead of
4304         g_str_hash () which can change.
4305
4306         * driver.c (mini_regression): Disable optimizations not supported by
4307         the cpu. Fixes #500019.
4308
4309         * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
4310         build.
4311
4312 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
4313
4314         * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
4315         to the latest LLVM code.
4316
4317 2009-05-05  Zoltan Varga  <vargaz@gmail.com>
4318
4319         * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
4320
4321 2009-05-04  Zoltan Varga  <vargaz@gmail.com>
4322
4323         * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on 
4324         x86/amd64.
4325
4326         * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
4327         no longer saving offsets, so just save the patch types along with the other
4328         info.
4329         * aot-runtime.c (load_patch_info): Update after the changes to 
4330         encode_patch_list ().
4331         (decode_got_entry): Removed, merged into load_patch_info ().
4332         (is_shared_got_patch): Removed, call the same function from
4333         aot-compiler.c.
4334
4335         * mini.h: Bump aot file format version.
4336         
4337         * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
4338         half-finished no-dlsym code.
4339
4340         * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
4341         option.
4342
4343         * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the 
4344         MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
4345
4346 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
4347
4348         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
4349         buffer length to work with AOT code.
4350
4351         * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
4352         ldfld/stfld opcodes.
4353
4354         * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
4355         as it is not used.
4356
4357         * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
4358
4359         * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
4360
4361         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
4362         LLVM API.
4363
4364         * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
4365         if needed. Don't decompose long operations when using llvm.
4366
4367 2009-05-01  Zoltan Varga  <vargaz@gmail.com>
4368
4369         * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
4370         PAGESIZE constant.
4371
4372         * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
4373
4374 2009-05-03  Martin Baulig  <martin@ximian.com>
4375
4376         * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
4377         mono_debugger_insert_method_breakpoint() since the class init
4378         handler we're inserting at the top of the method already gives us
4379         a notification.
4380
4381 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
4382
4383         * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
4384         to mono_arch_decompose_long_opts () for x86 and arm.
4385
4386 2009-04-29  Zoltan Varga  <vargaz@gmail.com>
4387
4388         * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
4389         TARGET_AMD64 here.
4390
4391 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
4392
4393         * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
4394         JIT code.
4395
4396 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
4397
4398         * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
4399         number of trampolines used in full-aot mode.
4400
4401         * aot-compiler.c: Add an ntrampolines option to set the number of 
4402         trampolines emitted in full-aot mode.
4403
4404 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
4405
4406         * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
4407         a volatile load. Get rid of get_tempname (), llvm assigns names
4408         automatically.
4409
4410         * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
4411         builder function.
4412
4413         * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
4414         a value.
4415
4416         * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
4417         level 1.
4418
4419         * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
4420         to the same register as a fixed sreg2. Fixes #497271.
4421
4422         * iltests.il.in: Add a new test.
4423
4424 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
4425
4426         * mini-amd64.c: Use moves instead of pushes for passing arguments on the
4427         stack, since pushes complicate exception handling.
4428
4429         * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
4430         the stack if they are passed using moves.
4431
4432         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
4433
4434         * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
4435         when using llvm.
4436
4437         * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the 
4438         icalls themselves. Convert arguments of FCOMPARE. Convert the destination
4439         of FMOVE if it is an R4.
4440
4441 2009-04-25  Zoltan Varga  <vargaz@gmail.com>
4442
4443         * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
4444
4445         * mini.h (LLVMCallInfo): New structure to store calling convention 
4446         information for the LLVM back end similar to the CallInfo structures in 
4447         the back-ends.
4448
4449         * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
4450         call information in a format usable by LLVM.
4451         (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
4452
4453         * method-to-ir.c (mono_emit_call_args): Emit calls using 
4454         mono_llvm_emit_call () when compiling using LLVM.
4455
4456         * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
4457         comments to all functions. Fix memory leaks. Add a public init/cleanup
4458         function.
4459
4460         * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
4461
4462         * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
4463         mono_array_new_va () jit icall.
4464         
4465 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
4466
4467         * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
4468         multiple machine description files to be specified.
4469         * mini-ops.h: fixes for cross-compilation.
4470
4471 2009-04-22  Miguel de Icaza  <miguel@novell.com>
4472
4473         * aot-runtime.c (make_writable): Use mono_mprotect to simplify
4474         some porting work.
4475
4476 2009-04-22  Zoltan Varga  <vargaz@gmail.com>
4477
4478         * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
4479         to prevent asserts in various passes. Fixes #497220.
4480
4481 2009-04-21  Zoltan Varga  <vargaz@gmail.com>
4482
4483         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
4484         a racy assert.
4485
4486         * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
4487         table to avoid duplicates.
4488
4489         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4490         
4491         * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
4492         option is used.
4493
4494 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
4495
4496         * mini.c (mini_method_verify): Fail fulltrust code if the exception
4497         is for method or field access.
4498
4499 2009-04-20  Zoltan Varga  <vargaz@gmail.com>
4500
4501         * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
4502         a Value to stdout.
4503
4504         * mini-llvm.c (mono_llvm_emit_method): Use it.
4505         
4506         * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
4507         (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
4508         on volatile values.
4509
4510         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for 
4511         synchronized methods.
4512
4513         * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
4514
4515         * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
4516
4517         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
4518         OP_LOADI8_MEM.
4519
4520         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
4521         allowing some options to be set dynamically.
4522
4523 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
4524
4525         * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
4526         unconditional branch.
4527
4528         * mini.h (MonoTrampolineType): Add new trampoline type 
4529         'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
4530         compiled code.
4531
4532         * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline 
4533         function.
4534
4535         * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
4536         creation function.
4537
4538         * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
4539         is enabled. Instead, use the llvm vcall trampoline.
4540         
4541         * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
4542
4543         * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
4544         
4545         * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
4546         functions.
4547
4548         * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of 
4549         MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
4550
4551         * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
4552         OP_IA64_CSET opcode.
4553
4554         * mini.c: Fix a warning.
4555
4556         * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
4557         THROW to the appropriate llvm type.
4558
4559 2009-04-18  Zoltan Varga  <vargaz@gmail.com>
4560
4561         * mini.c (mini_method_compile): Add statistics for methods JITted
4562         with/without LLVM.
4563
4564 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
4565
4566         * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
4567         OP_IA64_CMP_<cond>_IMM opcodes.
4568
4569 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
4570
4571         * mini-llvm.c (emit_cond_system_exception): Implement throwing of
4572         corlib exceptions.
4573
4574         * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
4575         correctly.
4576
4577         * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
4578         GENERICINST.
4579
4580 2009-04-17  Atsushi Enomoto  <atsushi@ximian.com>
4581
4582         * mini-exceptions.c : add thread id to EXCEPTION trace message.
4583
4584 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
4585
4586         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
4587         support.
4588
4589         * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
4590         rgctx invoke trampolines for x86.
4591
4592         * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
4593         indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
4594         (mono_arch_get_vcall_slot): Simplify this.
4595
4596 2009-04-16  Zoltan Varga  <vargaz@gmail.com>
4597
4598         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
4599         mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
4600
4601 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
4602
4603         * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx 
4604         trampolines for ARM. Add full-aot support for delegate invokes for ARM.
4605
4606         * mini-trampolines.c (mono_magic_trampoline): Fix the build.
4607
4608         * liveness.c (visit_bb): Remove a needless assert.
4609
4610 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
4611
4612         * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
4613         full aot support to the arch specific code.
4614
4615         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
4616
4617         * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
4618
4619         * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
4620         
4621         * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
4622         collect information about the delegate invoke impl trampolines.
4623
4624         * mini.h (MonoAotTrampInfo): New structure collecting the information needed
4625         to save trampolines during full-aot mode.
4626
4627         * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
4628         creation function which returns a trampoline which sets the rgctx
4629         argument.
4630         (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
4631         wrapper if possible.
4632         (mono_delegate_trampoline): Ditto.
4633
4634         * mini.c (mono_jit_runtime_invoke): Ditto.
4635
4636         * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
4637         
4638         * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
4639
4640         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4641         
4642 2009-04-12  Zoltan Varga  <vargaz@gmail.com>
4643
4644         * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
4645         just setting the opcode to OP_NOP.
4646
4647 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
4648
4649         * mini.c (mini_method_compile): Put the last change inside an 
4650         #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
4651         
4652         * mini.c (mini_method_compile): Disable sharing of stack slots/registers
4653         and extend live ranges to cover the whole method when using xdb.
4654
4655         * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
4656         do it in the trampolines.
4657
4658         * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
4659         needed.
4660
4661         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
4662         
4663         * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
4664         call code in full-aot mode since IMT is disabled there.
4665         (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
4666         new JIT no longer has that restriction.
4667
4668         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4669
4670         * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
4671         a more compact format.
4672         (mono_aot_wrapper_name): New function to return a unique name for a
4673         wrapper method, also used by the AOT runtime.
4674
4675         * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
4676         aot-compiler.c.
4677
4678         * aot-compiler.c (add_generic_class): Add the helper methods from T[]
4679         when a ICollection<T> etc is encountered.
4680         (add_generic_instances): Process method arguments/locals too.
4681         (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
4682         trampoline names.
4683
4684         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
4685         
4686 2009-04-10  Zoltan Varga  <vargaz@gmail.com>
4687
4688         * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
4689
4690         * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
4691
4692         * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
4693         representing the result of the decomposition. Nullify instructions
4694         instead of setting them to OP_NOP since nops can't have registers
4695         set.
4696
4697 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
4698
4699         * aot-compiler.c (mono_compile_assembly): Split this huge function into
4700         smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
4701         info. Strip 'mapping symbols' on ARM.
4702
4703         * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
4704         
4705         * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
4706         this with the native genmdesc.
4707
4708 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
4709
4710         * aot-runtime.c:  Fixing the MSVC build.
4711
4712         Code is contributed under MIT/X11 license.
4713
4714 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
4715
4716         * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since 
4717         JITted code depends on it.
4718
4719 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
4720
4721         * aot-compiler.c: Use new MonoGenericParam accessors.
4722
4723 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
4724
4725         Reduce memory usage and improve correctness wrt MonoGenericParam
4726         * aot-runtime.c (decode_klass_ref): Simplify generic parameter
4727         handing.  Avoid allocating MonoGenericParams, but use the ones in
4728         the container itself.
4729
4730 2009-04-07  Miguel de Icaza  <miguel@novell.com>
4731
4732         * tasklets.c: Return exceptions in the out argument.
4733
4734 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
4735
4736         * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
4737         opcode. Use pointer types in more places instead of casting them to 
4738         integers.
4739
4740         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
4741         optimizations.
4742         (mono_llvm_optimize_method): New helper function to optimize a method.
4743
4744         * method-to-ir.c (mono_emit_widen_call_res): Extract the call result 
4745         widening code so it could be called from more places.
4746         (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
4747         code paths in the call opcodes.
4748
4749 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
4750
4751         * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
4752
4753 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
4754
4755         * dwarfwriter.c: Use _ to separate class name 
4756         components as gdb can't handle '.'. Represent reference variables
4757         as 'class <NAME>&'.
4758         
4759         * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
4760
4761         * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
4762         
4763         * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
4764
4765         * gc-test.cs: New file with GC stack marking tests.
4766         
4767         * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
4768         negative numbers for vfp.
4769
4770         * basic-float.cs: Add a test.
4771         
4772 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
4773
4774         * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
4775
4776 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
4777
4778         * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
4779         part of tasklet/continuation support.
4780
4781 2009-04-05  Zoltan Varga  <vargaz@gmail.com>
4782
4783         * mini-llvm.c (mono_llvm_emit_method): Move the handling of
4784         amd64 opcodes inside an ifdef.
4785
4786         * dwarfwriter.c: Emit inheritance information for classes, emit fields
4787         of complex types.
4788         
4789         * dwarfwriter.c (emit_type): Emit the class info for classes.
4790
4791 2009-04-04  Zoltan Varga  <vargaz@gmail.com>
4792
4793         * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
4794
4795         * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
4796
4797         * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
4798
4799         * ssa.c (mono_ssa_compute): Fix some memory leaks.
4800
4801 2009-04-03  Zoltan Varga  <vargaz@gmail.com>
4802
4803         * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
4804
4805         * mini-llvm.c: Update comments.
4806
4807         * mini.h (COMPILE_LLVM): New macro.
4808
4809         * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
4810
4811         * ssa.c (mono_ssa_compute): Ditto.
4812         
4813         * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
4814         the unwind ops from a DWARF FDE.
4815
4816         * mini-llvm.c: Implement generation of unwind info for LLVM compiled
4817         methods by extracting the dwarf unwind ops from the unwind info generated
4818         by LLVM.
4819         
4820         * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
4821         calls.
4822
4823         * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
4824         addressing modes.
4825
4826 2009-04-02  Zoltan Varga  <vargaz@gmail.com>
4827
4828         * Makefile.am (llvm_sources): Enable this.
4829
4830         * mini.c (mini_method_compile): Add support for compiling with LLVM, 
4831         failing back to the JIT if something cannot be handled.
4832
4833         * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
4834         compiling with LLVM.
4835
4836         * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
4837         compiling with LLVM.
4838
4839         * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when 
4840         compiling with LLVM.
4841
4842         * mini-ops.h: Add a few opcodes needed by LLVM.
4843
4844         * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
4845         has no unwind info.
4846
4847         * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
4848         backend.
4849
4850         * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
4851
4852         * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
4853
4854 2009-04-01  Mark Probst  <mark.probst@gmail.com>
4855
4856         * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
4857         ridiculously large methods.
4858
4859 2009-03-31  Martin Baulig  <martin@ximian.com>
4860
4861         * debug-debugger.c (debugger_remove_breakpoint): Call
4862         mono_debugger_remove_class_init_callback ().
4863
4864 2009-03-31  Zoltan Varga  <vargaz@gmail.com>
4865
4866         * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
4867         right before emitting code, not at the start.
4868
4869         * mini.c (mono_postprocess_patches): Extract this into a separate function
4870         from mono_codegen ().
4871
4872         * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
4873         byref types correctly.
4874
4875 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
4876
4877         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
4878         by the last change.
4879
4880 2009-03-29  Zoltan Varga  <vargaz@gmail.com>
4881
4882         * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before 
4883         indirect calls, this avoids problems where get_vcall_slot () would get
4884         confused by the native code for the instruction preceeding the call.
4885         (mono_arch_get_vcall_slot): Simplify this.
4886         (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
4887
4888         * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
4889         register allocator now seems to depend on them instead of the data in
4890         cpu-<ARCH>.md.
4891
4892         * mini.c (mini_method_compile): Throw the correct type of exception if
4893         mono_method_get_header () fails because of a loading error.
4894
4895 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
4896
4897         * mini.c (mini_method_compile): Clear the loader error if the method
4898         header cannot be decoded.
4899
4900         * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual 
4901         interface methods on proxies correctly.
4902
4903         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
4904         this argument for vtype methods. Add precise liveness info for arguments.
4905
4906         * mini-codegen.c (mono_print_ins_index): Print the vreg of the
4907         LIVERANGE_START/END opcodes.
4908
4909         * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
4910         for arguments and values in registers.
4911
4912 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
4913
4914         * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
4915         return a valuetype. Fixes #487518.
4916
4917         * iltests.il: Add a test.
4918         
4919         * aot-compiler.c: Use mono_thread_create () to create helper threads.
4920
4921         * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
4922         closed over a null reference correctly.
4923
4924 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
4925
4926         * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
4927
4928 2009-03-25  Mark Probst  <mark.probst@gmail.com>
4929
4930         * mini-codegen.c (mono_local_regalloc): Don't let sregs get
4931         allocated to the same registers as fixed sregs.
4932
4933 2009-03-24  Mark Probst  <mark.probst@gmail.com>
4934
4935         * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
4936         ATOMIC_CAS_IMM ops.
4937
4938         * method-to-ir.c: Handle more cases for
4939         Interlocked.CompareExchange.
4940
4941         * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
4942         mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
4943         ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
4944
4945 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
4946
4947         * aot-runtime.c (decode_method_ref): Fix a warning.
4948
4949         * unwind.c (mono_unwind_frame): Ditto.  
4950
4951 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
4952
4953         * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
4954         (mono_compile_assembly): Enable the binary writer for full-aot as well.
4955
4956         * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
4957         fix the handling of large values in the ALU_PC_G0_NC relocation.
4958
4959 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
4960
4961         * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
4962
4963 2009-03-22  Mark Probst  <mark.probst@gmail.com>
4964
4965         * method-to-ir.c (mono_spill_global_vars): Support for ternary
4966         ops.
4967
4968 2009-03-22  Mark Probst  <mark.probst@gmail.com>
4969
4970         * method-to-ir.c: MINI_OP3 needs a comma.
4971
4972         * method-to-ir.c, mini.h, mini.c: Remove
4973         mono_init_op_sreg_counts ().
4974
4975 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
4976
4977         * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
4978         OP_JMP.
4979         
4980         * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
4981         assertion.
4982
4983         * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
4984
4985         * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
4986         code somewhat.
4987
4988 2009-03-21  Mark Probst  <mark.probst@gmail.com>
4989
4990         * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
4991         liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
4992         mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
4993         operations.
4994
4995 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
4996
4997         * driver.c: Change location of gc_wrapper.h.
4998
4999         * method-to-ir.c (mono_find_block_region): Handle try clauses nested
5000         inside finally clauses correctly. Fixes #485721.
5001
5002         * mini.c (mono_find_spvar_for_region): This needs to handle try regions
5003         after the change above.
5004
5005         * exceptions.cs: Add a test.
5006         
5007 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
5008
5009         * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
5010
5011         * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
5012         into cfg->used_int_regs, it is not needed with the dwarf unwinder.
5013         (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
5014
5015         * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
5016         the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
5017
5018 2009-03-19  Sebastien Pouliot  <sebastien@ximian.com>
5019
5020         * method-to-ir.c: Allow CoreCLR to throw FieldAccessException. 
5021         Simplify logic for ensure_method_is_allowed_to_call_method. 
5022         Handle wrappers on callers.
5023
5024 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
5025
5026         * Makefile.am (fullaotcheck): Don't run the generics tests, some of
5027         them don't run yet.
5028
5029         * basic-simd.cs: Fix the names of some test methods.
5030
5031 2009-03-18  Geoff Norton  <gnorton@novell.com>
5032
5033         * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
5034
5035 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
5036
5037         * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
5038
5039 2009-03-17  Jb Evain  <jbevain@novell.com>
5040
5041         * driver.c: remove now uneeded call to mono_gc_base_init before
5042         mono_profiler_load.
5043
5044 2009-03-17  Jb Evain  <jbevain@novell.com>
5045
5046         * dwarfwriter.c (token_handler): handle more cases.
5047
5048 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com> 
5049
5050         * method-to-ir.c: Remove more dead code (that was required only
5051         because of method_is_safe). Fix compiler warnings.
5052
5053 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
5054
5055         * method-to-ir.c: Remove unneeded/useless method_is_safe
5056         http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
5057
5058 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
5059
5060         * mini.c (mini_method_compile): Print the method been compiled with
5061         verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
5062         for people not familiar with the runtime.
5063
5064 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
5065
5066         * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
5067         a managed object which is later put into a GList. Return its class instead.
5068
5069         * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
5070         stack slots when using sgen.
5071
5072 2009-03-16  Zoltan Varga  <vargaz@gmail.com>
5073
5074         * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
5075
5076 2009-03-14  Zoltan Varga  <vargaz@gmail.com>
5077
5078         * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
5079         > so it works on the first vreg as well.
5080
5081 2009-03-13  Zoltan Varga  <vargaz@gmail.com>
5082
5083         * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
5084         trigger randomly.
5085
5086         * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
5087         
5088         * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
5089         implement GArray.
5090
5091 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
5092
5093         * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
5094         native->IL offset mapping.
5095
5096 2009-03-11  Zoltan Varga  <vargaz@gmail.com>
5097
5098         * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
5099
5100         * basic.cs: Add a test.
5101
5102 2009-03-11  Mark Probst  <mark.probst@gmail.com>
5103
5104         * mini-x86.c (mono_arch_output_basic_block): Use different
5105         registers in case the ones we want to overwrite are used by the
5106         other operand.  Fixes regression in #480807.
5107
5108 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
5109
5110         * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
5111
5112         * dwarfwriter.c (emit_line_number_info): The line number info for
5113         IL code was off by one. Fix that.
5114
5115         * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
5116         stack.
5117
5118 2009-03-09  Mark Probst  <mark.probst@gmail.com>
5119
5120         Contributed under the terms of the MIT/X11 license by Steven
5121         Munroe <munroesj@us.ibm.com>.
5122
5123         * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
5124         Fixes #483462.
5125
5126 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
5127
5128         * dwarfwriter.c (token_handler): Decode method references in non-wrappers
5129         as well.
5130
5131 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
5132
5133         * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
5134         the delegate ctor handling code. Fixes #482638.
5135         
5136         * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
5137         #481458.
5138
5139         * iltests.il.in: Add a test.
5140         
5141         * mini-darwin.c (mono_chain_signal): Remove this, it is already in
5142         mini-posix.c.
5143
5144 2009-03-05  Mark Probst  <mark.probst@gmail.com>
5145
5146         * mini-trampolines.c (mono_create_jump_trampoline): If the method
5147         is shared generic code, return the trampoline, even if the method
5148         has already been compiled.  Fixes #479763.
5149
5150         * mini.c, mini.h: New function
5151         mono_jit_find_compiled_method_with_jit_info() which is the same as
5152         mono_jit_find_compiled_method() but also returns the jit info.
5153
5154 2009-03-05  Mark Probst  <mark.probst@gmail.com>
5155
5156         * method-to-ir.c (mono_method_to_ir): Only force the vtable var
5157         for methods which actually have one.  For all other methods, make
5158         sure the this argument var is live the whole method.
5159
5160         * mini.c (mini_method_compile): Every shared method has a
5161         this/vtable/mrgctx info.  Fixes #480807.
5162
5163 2009-03-05  Mark Probst  <mark.probst@gmail.com>
5164
5165         * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
5166         generic/imt thunks where some entries branch through the vtable,
5167         while other entries branch directly.
5168
5169 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
5170
5171         * mini-darwin.c (mono_chain_signal): Define this to fix the build.
5172
5173         * mini-windows.c: Ditto.
5174         
5175         * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
5176         ctors.
5177
5178 2009-03-04  Zoltan Varga  <vargaz@gmail.com>
5179
5180         * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
5181         down an assert.
5182
5183 2009-03-04  Mark Probst  <mark.probst@gmail.com>
5184
5185         * method-to-ir.c: Don't inline methods that use JMP.  Fixes
5186         #481403.
5187
5188 2009-03-04  Mark Probst  <mark.probst@gmail.com>
5189
5190         * exceptions-x86.c: Include debug-mini.h - fixes build.
5191
5192 2009-03-04  Martin Baulig  <martin@ximian.com>
5193
5194         * debug-mini.c: Clean up the exception API and add documentation.
5195         (mono_debugger_handle_exception): New public method; this is
5196         called when throwing an exception or encountering an unhandled one.
5197         (mono_debugger_call_exception_handler): Formerly known as
5198         mono_debugger_handle_exception(); this is used to tell the
5199         debugger that we're about to invoke an exception handler.
5200
5201 2009-03-04  Martin Baulig  <martin@ximian.com>
5202
5203         * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
5204         ../metadata/mono-debug-debugger.c; save and reset exception state.
5205
5206 2009-03-02  Martin Baulig  <martin@ximian.com>
5207
5208         * debug-mini.c: Moved the debugger exception handling here from
5209         ../metadata/mono-debug-debugger.c.
5210
5211         * debug-mini.h
5212         (MonoDebuggerExceptionAction): New exception typedef.
5213
5214         * debug-mini.c
5215         (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
5216
5217         * exceptions-amd64.c
5218         (mono_amd64_throw_exception): Use the new debugger exception
5219         handling code.
5220
5221         * mini-exceptions.c
5222         (mono_handle_exception_internal): Don't call
5223         mono_debugger_unhandled_exception() here.
5224
5225 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
5226
5227         * mini.c aot-compiler.c: Update after the changes to 
5228         mono_marshal_get_runtime_invoke ().
5229
5230         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): 
5231         Virtual generic methods might not have method->slot set, work around
5232         that.
5233
5234         * generics.cs: Add a test.
5235
5236 2009-03-02  Geoff Norton  <gnorton@novell.com>
5237
5238         * mini.c:
5239         * driver.c: Allow signal chaining of SIGFPE as well.
5240
5241 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
5242
5243         * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
5244         this since it now receives the method not its generic context in the
5245         IMT reg.
5246
5247         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
5248         generic/imt thunks where some entries branch through the vtable, while
5249         other entries branch directly.
5250
5251         * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
5252
5253         * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call 
5254         support for interface methods as well.
5255
5256         * mini-trampolines.c: Add support for virtual generic methods in interfaces
5257         using the normal IMT thunks.
5258
5259         generics.cs: Add new tests.
5260         
5261         * method-to-ir.c (mono_method_to_ir): Pass the method instead of
5262         the generic inst to the generic imt thunks. This fixes AOT support, 
5263         improves consistency with the normal IMT thunks, and makes it easier to
5264         add support for interface generic virtual methods later.
5265
5266         * mini-trampolines.c (mono_magic_trampoline): Ditto.    
5267         
5268 2009-02-28  Zoltan Varga  <vargaz@gmail.com>
5269
5270         * driver.c (mono_set_signal_chaining): New public API function to enable
5271         signal chaining on POSIX platforms.
5272
5273         * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland 
5274         (si@lindenlab.com) to implement signal chaining. The original patch was
5275         contributed under the MIT X/11 license:
5276         https://bugzilla.novell.com/show_bug.cgi?id=318894
5277
5278 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
5279
5280         * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
5281         too until it can be made to run on amd64.
5282
5283 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
5284
5285         * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
5286         to  get_generic_context_from_code () + get_call_info () if possible.
5287
5288 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
5289
5290         * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
5291         suspend-on-sigsegv functionality.
5292
5293         * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
5294         to suspend when a native SIGSEGV is received. This is useful for debugging
5295         crashes which don't happen under gdb, since a live process contains more
5296         information than a core file.
5297
5298         * mini-exceptions.c (mono_print_thread_dump): Use 
5299         MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
5300
5301         * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
5302
5303         * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
5304         
5305         * basic-float.cs: Disable the tests which currently fail on amd64.
5306
5307         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null 
5308         value to mono_arch_patch_callsite () to fix crashes.
5309         
5310         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
5311
5312 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
5313
5314         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
5315         nop code by patching the call address to point to the nullified class init
5316         trampoline, as the former does not seem to be safe on SMP machines.
5317
5318 2009-02-23  Mark Probst  <mark.probst@gmail.com>
5319
5320         * mini-ops.h: Fix the argument types for a few x86 opcodes where
5321         they were wrong.
5322
5323 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
5324
5325         * basic-float.cs basic-calls.cs: Fix warnings.
5326
5327 2009-02-22  Mark Probst  <mark.probst@gmail.com>
5328
5329         * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
5330         correct frame pointer in the LMF.  Should fix #478394.
5331
5332 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
5333
5334         * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
5335
5336         * image-writer.c: Make the binary writer less verbose.
5337
5338 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
5339
5340         * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
5341         are called from runtime invoke wrappers.
5342
5343 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
5344
5345         * cpu-ppc.md (store_memindex): Increase the size of this.
5346
5347 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
5348
5349         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
5350
5351         * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
5352
5353         * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
5354         OP_LCONV_TO_R_UN.
5355
5356         Last fix for of #467201.
5357
5358
5359 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
5360
5361         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
5362
5363         * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
5364         and long_conv_to_r8_2:
5365
5366         Fixed part of #467201.
5367
5368 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
5369
5370         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
5371
5372         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
5373         conversion to 32 bits.
5374
5375         * cpu-x86.md: Increase the size of int_conv_to_r4.
5376
5377         * basic-float.cs: Add a test for this.
5378
5379         Fixed part of #467201.
5380
5381 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
5382
5383         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
5384
5385         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
5386         conversion to 64 bits.
5387
5388         * basic-float.cs: Add a test for this.
5389
5390         Fixed part of #467201.
5391
5392 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
5393
5394         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
5395
5396         * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
5397         This behavior is compatible with MS.
5398
5399         * iltest.il.in: Add a test for this.
5400
5401         Fixed part of #467201.
5402
5403 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
5404
5405         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
5406
5407         * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
5408         change the precision of the value.
5409
5410         * cpu-x86.md: Define len for float_conv_to_r4.
5411
5412         * basic-float.cs: Add a test for this.
5413
5414         Fixed part of #467201.
5415
5416 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
5417
5418         * mini.c: Adjust locking order to the new semantics where the loader lock
5419         comes first.
5420
5421 2009-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
5422
5423         * aot-runtime.c:
5424         * mini-amd64.c:
5425         * mini-arm.c:
5426         * mini-ia64.c:
5427         * mini-mips.c:
5428         * mini-ppc.c:
5429         * mini-sparc.c:
5430         * mini-trampolines.c:
5431         * mini-x86.c:
5432         * mini.c:
5433         * tramp-alpha.c:
5434         * tramp-amd64.c:
5435         * tramp-arm.c:
5436         * tramp-hppa.c:
5437         * tramp-ia64.c:
5438         * tramp-mips.c:
5439         * tramp-ppc.c:
5440         * tramp-s390.c:
5441         * tramp-s390x.c:
5442         * tramp-sparc.c:
5443         * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
5444
5445 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
5446
5447         * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
5448         as it is incorrect.
5449
5450 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
5451
5452         * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
5453         for cctors if needed.
5454
5455 2009-02-17  Mark Probst  <mark.probst@gmail.com>
5456
5457         * mini-ppc.c: Fix build on Darwin.
5458
5459 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
5460
5461         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
5462         version instead of 3 as valgrind doesn't like version 3.
5463
5464         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5465
5466         * aot-compiler.c (mono_aot_method_hash): New function to return a hash
5467         usable for hashing methods.
5468         (emit_extra_methods): Use the new hash to avoid putting every method in the
5469         same hash bucket.
5470
5471         * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
5472
5473         * aot-runtime.c (can_method_ref_match_method): New function to quickly check
5474         whenever a method ref could match a method.
5475         
5476         * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
5477         test to fail.
5478         
5479         * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded 
5480         methods refs.
5481
5482         * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
5483
5484         * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
5485         the encoding buffer.
5486
5487         * method-to-ir.c (mono_method_check_inlining): Avoid calling 
5488         mono_method_get_header () on inflated methods as an optimization.
5489
5490 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
5491
5492         * ssa.c (fold_ins): Fix another crash if the instruction following the
5493         switch was optimized away.
5494
5495 2009-02-16  Mark Probst  <mark.probst@gmail.com>
5496
5497         Contributed under the terms of the MIT/X11 license by Steven
5498         Munroe <munroesj@us.ibm.com>.
5499
5500         * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
5501
5502 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
5503
5504         * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
5505         around the mono_domain_alloc calls, it is now done by the functions
5506         themselves.
5507
5508         * aot-compiler.c (compile_method): Only add wrappers referenced by
5509         the method if compiling with full AOT.
5510         (mono_compile_assembly): Error out if --aot=full is specified on
5511         a platform where it is not supported.
5512
5513         * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
5514         on ARM too.
5515
5516         * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
5517         AOT support.
5518
5519         * aot-runtime.c (load_named_code): Handle 
5520         mono_arm_throw_exception_by_token.
5521
5522         * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
5523
5524         * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
5525         unaligned.
5526
5527         * Makefile.am (fullaotcheck): Exit if a test fails.
5528
5529         * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
5530         on ARM.
5531         (mono_compile_assembly): Handle the assembler failing.
5532
5533         * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
5534         accepting subsections of .bss.
5535
5536         * ssa.c (visit_inst): Fix a crash if the instruction following a switch
5537         was optimized away.
5538
5539         * aot-compiler.c: Remove some unused includes.
5540         
5541         * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
5542         now in MonoImageWriter.
5543
5544         * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
5545         code sequence which matches a non-virtual call. Fixes #472654.
5546
5547 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
5548
5549         * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
5550         xdebug code.
5551         
5552         * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
5553         use the image/dwarf writers directly.
5554
5555         * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
5556         field.
5557
5558         * aot-compiler.c (MonoAotCompile): Remove fields which are now in
5559         MonoDwarfWriter.
5560
5561         * image-writer.h: Fix some typos.
5562
5563         * dwarfwriter.h dwarfwriter.c: New files.
5564         
5565         * aot-compiler.c: Extract the DWARF info writing functionality into a 
5566         separate module.
5567
5568         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
5569         argument to return unwind info.
5570
5571         * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
5572
5573         * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
5574         
5575         * aot-runtime.c (decode_method_ref): Add a case for 
5576         MONO_AOT_METHODREF_WRAPPER_NAME.
5577
5578         * mini.h: Add constants for the magic numbers used in encode_method_ref ()
5579         for AOT.
5580
5581         * aot-compiler.c (encode_method_ref): Use the new constants.
5582
5583         * aot-runtime.c (decode_method_ref): Ditto.
5584
5585         * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
5586         be compiled, not the icall itself.
5587
5588 2009-02-14  Zoltan Varga  <vargaz@gmail.com>
5589
5590         * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
5591         using decode_method_ref ().
5592
5593         * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
5594         convert it to an in32. Fixes #475859.
5595
5596         * arrays.cs: Add a test.
5597
5598 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
5599
5600         * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
5601         OP_LCONV_TO_U2.
5602
5603         * basic-long.cs: Add a test.
5604
5605 2009-02-12  Mark Probst  <mark.probst@gmail.com>
5606
5607         * mini-x86.c, mini-x86.h: Very simple frame pointer removal.  We
5608         remove the frame pointer in leaf methods which don't receive any
5609         arguments, don't throw exceptions and don't do dynamic stack
5610         allocations.
5611
5612 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
5613
5614         * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
5615         the fail_tramp changes. Hopefully fixes #475132.
5616
5617 2009-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
5618
5619         * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
5620         instead of mono_metadata_signature_dup_full.
5621
5622 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
5623
5624         * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
5625         for processing jump tables. Fixes #473787.
5626
5627 2009-02-11  Mark Probst  <mark.probst@gmail.com>
5628
5629         * mini-generic-sharing.c: mini_method_get_context() just calls
5630         mono_method_get_context_general() now.
5631
5632         * mini.c, mini.h: Moved get_object_generic_inst(),
5633         construct_object_context_for_method() and
5634         mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
5635
5636 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
5637
5638         * branch-opts.c (mono_if_conversion): Handle the case where the merged 
5639         basic block fell through to its successor bblock without a branch. Fixes
5640         #474718.
5641
5642         * iltests.il.in: Add a test.
5643         
5644         * aot-compiler.c (encode_method_ref): Encode methods of array types.
5645         (can_encode_patch): We can now handle arrays of generic parameters and
5646         array methods.
5647
5648         * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
5649
5650         * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
5651         the AOT file to avoid some #ifdefs in aot-runtime.c
5652
5653         * mini.h: Bump AOT file format version.
5654
5655 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
5656
5657         * Makefile.am (fullaotcheck): Make this run the tests.
5658
5659         * aot-compiler.c: Make the printing of skipped methods runtime configurable.
5660
5661 2009-02-10  Mark Probst  <mark.probst@gmail.com>
5662
5663         * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
5664         individually.  Fixes #473482.
5665
5666 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
5667
5668         * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
5669
5670 2009-02-09  Jeffrey Stedfast  <fejj@novell.com>
5671
5672         * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
5673         (mono_compile_assembly): Hush compile warnings about
5674         uninitialized [tmp_]outfile_name variables in the !use_bin_writer
5675         code path.
5676
5677 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
5678
5679         * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
5680
5681         * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
5682
5683         * aot-compiler.c: Fix arm support.
5684
5685         * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
5686         img_writer_emit_unset_mode () function.
5687
5688         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
5689         (mono_unwind_get_dwarf_pc_reg): Ditto.
5690
5691         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
5692         Move almost all platform specific code to a set of arch_ functions, 
5693         and document them to ease porting.
5694         
5695         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
5696
5697         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
5698
5699         * aot-compiler.c: Extract the image writing functionality into a separate
5700         module to reduce the size of this file.
5701
5702 2009-02-09  Geoff Norton  <gnorton@novell.com>
5703
5704         * mini-s390.c: Fix the signature of emit_sig_cookie.
5705
5706 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
5707
5708         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
5709
5710         * aot-runtime.c (is_shared_got_patch): Ditto.
5711
5712         * aot-runtime.c (load_named_code): Cope with the fact that 
5713         decode_got_entry () won't decode the patch fully if its corresponding got
5714         entry is already filled.
5715         
5716         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
5717         Initialize *ji.
5718         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
5719
5720         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
5721         as the moving pointer instead of 'buf' for consistency with the rest of the
5722         codebase.
5723         (mono_arch_create_monitor_exit_trampoline): Ditto.
5724
5725         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
5726         generic_class_init trampolines.
5727         (add_generic_class): Extract some code from add_generic_instances () into a
5728         separate function so it can be called from other places too.
5729         (compile_method): Call add_generic_class () for the classes of inflated methods
5730         referenced by the method.
5731         (can_encode_patch): Allow references to generic parameters.
5732
5733         * aot-runtime.c: Add support the patches required by the new trampolines.
5734         
5735         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
5736         support.
5737
5738         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
5739         full-aot support.
5740
5741         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
5742         this from get_throw_pending_exception, make the signature full aot compatible.
5743
5744         * Makefile.am (fullaotcheck): New target to run full-aot tests.
5745
5746         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
5747
5748         * exceptions.cs: Add a test.
5749
5750 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
5751
5752         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
5753         use the DWARF_DATA_ALIGN constant instead.
5754
5755         * exception-<ARCH>.c: Update after the above change.
5756
5757         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
5758         dwarf unwinder.
5759
5760         * mini-arm.c: Enable the dwarf unwinder.
5761
5762         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
5763         instead of mono_class_setup_vtable ().
5764
5765 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
5766
5767         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
5768         dwarf unwinder.
5769
5770         * mini-x86.h: Enable the dwarf unwinder.
5771
5772 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
5773
5774         Fix mcs/tests/test-7.cs
5775         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
5776         2009-02-03.
5777
5778 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
5779
5780         * mini.c (print_jit_stats): Remove some unused statistics.
5781
5782 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
5783
5784         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
5785
5786 2009-02-05  Mark Probst  <mark.probst@gmail.com>
5787
5788         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
5789         the method we get from mono_object_get_virtual_method() because
5790         that function does it properly, now.
5791
5792 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
5793
5794         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
5795         opcodes. Fixes #472775.
5796
5797 2009-02-05  Mark Probst  <mark.probst@gmail.com>
5798
5799         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
5800         fact that mono_find_jit_info() sometimes returns the context
5801         corresponding to the jit info in new_ctx.  Fixes #472600.
5802
5803 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
5804
5805         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
5806         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
5807         klass->enum_basetype directly.
5808
5809         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
5810         enum subtypes.
5811
5812         * unwind.c: Avoid 0 sized arrays.
5813
5814 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
5815
5816         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
5817         size on systems with 64k pages. Fixes #471389.
5818
5819 2009-02-04  Mark Probst  <mark.probst@gmail.com>
5820
5821         Contributed under the terms of the MIT/X11 license by Steven
5822         Munroe <munroesj@us.ibm.com>.
5823
5824         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
5825         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
5826         necessary.
5827
5828 2009-02-04  Mark Probst  <mark.probst@gmail.com>
5829
5830         Contributed under the terms of the MIT/X11 license by Steven
5831         Munroe <munroesj@us.ibm.com>.
5832
5833         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
5834         comparison fix.
5835
5836         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
5837         The trampoline can be longer on PPC64.
5838
5839 2009-02-04  Mark Probst  <mark.probst@gmail.com>
5840
5841         Contributed under the terms of the MIT/X11 license by Steven
5842         Munroe <munroesj@us.ibm.com>.
5843
5844         * mini-ppc.c: Compiler warning fixes and trivial code
5845         simplifications.
5846
5847 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
5848
5849         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
5850         ins->dreg which could be a hardware register, not a vreg.
5851
5852         * aot-compiler.c (emit_method_dwarf_info): Ditto.
5853         
5854         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
5855         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
5856
5857         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
5858         
5859         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
5860         ->dreg, that is not the vreg we are looking for.
5861
5862         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
5863
5864         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
5865         LIVERANGE_END.
5866
5867         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
5868         strange crashes.
5869
5870 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
5871
5872         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
5873
5874         * aot-compiler.c (emit_line_number_info): Fix line number emission when
5875         the line diff is 0.
5876
5877         * aot-compiler.c: Add xdebug support on x86.
5878
5879         * unwind.c: Add x86 support.
5880         
5881         * aot-compiler.c (emit_exception_debug_info): Control the emission of
5882         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
5883
5884         * mini.c (mini_method_compile): Ditto.
5885         
5886         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
5887         the variable index.
5888
5889         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
5890         which mimic .push_section/.pop_section in GAS.
5891         
5892         * aot-compiler.c: Emit precise live range information for variables.
5893
5894         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
5895
5896         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
5897         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
5898         them.
5899
5900         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
5901         the live ranges of variables.
5902
5903         * mini.h (struct MonoMethodVar): Add two fields containing the live range
5904         of the variable in terms of native offsets.
5905
5906 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
5907
5908         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
5909         
5910 2009-02-02  Mark Probst  <mark.probst@gmail.com>
5911
5912         Contributed under the terms of the MIT/X11 license by Steven
5913         Munroe <munroesj@us.ibm.com>.
5914
5915         * exceptions-ppc.c (restore_regs_from_context): Correct operand
5916         order (offset then base reg) for ppc_load_multiple_regs.
5917         (emit_save_saved_regs) Correct operand order for
5918         ppc_store_multiple_regs.
5919         (mono_arch_get_call_filter): Correct operand order for
5920         ppc_load_multiple_regs.
5921
5922         * mini-ppc.c (emit_memcpy): Fix operand order for
5923         ppc_load_reg_update and ppc_store_reg_update.
5924         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
5925         (mono_arch_emit_epilog): Correct operand order for
5926         ppc_load_multiple_regs.
5927
5928         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
5929         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
5930
5931 2009-02-02  Mark Probst  <mark.probst@gmail.com>
5932
5933         * cpu-ppc64.md: Fixed storer4_memindex length.
5934
5935 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
5936
5937         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
5938         line number info.
5939         
5940         * aot-compiler.c (emit_line_number_info): Optimize this.
5941
5942 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
5943
5944         * aot-compiler.c: Disassemble tokens in the IL disassembly.
5945         
5946         * aot-compiler.c: Add debug info for methods without debug info by
5947         emitting an IL file and having the line number info referencing that file.
5948
5949         * aot-compiler.c: Optimize the size of the generated line number info.
5950
5951         * aot-compiler.c: Emit line number info in xdebug mode.
5952
5953         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
5954         million arguments.
5955
5956 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
5957
5958         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
5959
5960         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
5961         is used.
5962
5963 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
5964
5965         * basic-calls.cs: Test for the weird crash found on arm.
5966         
5967 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
5968
5969         * cpu-arm.md: Increase the size of storer8_membase_reg and
5970         loadr8_membase_reg to 24 bytes to accomodate the extra add.
5971
5972         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
5973         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
5974         reg to LR otherwise we'll be loading/storing from just the offset.
5975
5976 2009-01-30  Miguel de Icaza  <miguel@novell.com>
5977
5978         Question: if we are storing gint32's inside the "*native_offset",
5979         should we change the signature to "gint32 *native_offset" to
5980         ensure that we do not have type definition problems?
5981         
5982         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
5983         an int * as this is what the other function expects, causes
5984         problems with Freescale's compiler that defined int32_t to be a
5985         long and makes int incompatible 
5986
5987 2009-01-30  Miguel de Icaza  <miguel@novell.com>
5988
5989         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
5990         filename conflict with bjam.
5991
5992 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
5993
5994         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
5995         as it might use decomposed ops.
5996
5997 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
5998
5999         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
6000
6001         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
6002         is defined.
6003
6004         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
6005
6006         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
6007         offsets.
6008
6009         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
6010         way registers are stored in MonoContext on arm.
6011
6012         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
6013         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
6014
6015         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
6016
6017         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
6018
6019         * mini.c (mini_init): Register mono_isfinite.
6020
6021         * jit-icalls.c (mono_isfinite): New jit icall.
6022
6023         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
6024         
6025         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
6026         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
6027         the parent frame.
6028
6029 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6030
6031         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
6032         separate frame and stack pointers, so we must use FP to find the register
6033         spill area.
6034         The FP reg is retrieved from the MonoContext::regs array.
6035
6036 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6037
6038         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
6039         as FPA requires it.
6040
6041 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6042
6043         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
6044         return R4 and R8 when not running under softfloat.
6045
6046         Fixes basic-calls.exe
6047
6048 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6049
6050         * mini-arm.c: Implement some overflow opcodes.
6051
6052 2009-01-29  Miguel de Icaza  <miguel@novell.com>
6053
6054         * ssa.c: handle another alloca.h
6055
6056         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
6057         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
6058         MONO_ARCH_USE_SIGACTION. 
6059
6060         * aot-runtime.c, mini-exceptions.c: Replace platform define with
6061         capability defines.
6062
6063         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
6064
6065         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
6066         PPC targets as sigaction does not exist on all platforms, define
6067         this on a per-platform basis.
6068
6069         Instead of erroring out if the platform is not defined, include
6070         mini-ppc-os.h, and expect that the OS specific setting provides
6071         the required information.   
6072
6073 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6074
6075         * aot-compiler.c: Fix --enable-minimal=aot.
6076
6077 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6078
6079         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
6080         previous change.
6081
6082 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
6083
6084         * exceptions-arm.c: Fix warnings.
6085
6086         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
6087         ARM.
6088
6089         * mini-x86.c: Fix --enable-minimal=jit build.
6090
6091         * mini.c: Really fix --enable-minimal=jit build.
6092         
6093         * mini.c (construct_object_context_for_method): Move this outside
6094         the DISABLE_JIT block to fix the --enable-minimal=jit build.
6095
6096         "Backported" of r124984 from 2.0 branch.
6097         
6098         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
6099
6100         "Backport" of r124977 + r124978 from 2.0 branch.
6101         
6102         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
6103         to avoid calling mono_exception_from_token () from the throw trampoline.
6104         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
6105         for throwing corlib exceptions, this fixes full-aot support for corlib
6106         exceptions.
6107
6108         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
6109
6110 2009-01-29  Miguel de Icaza  <miguel@novell.com>
6111
6112         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
6113         part of the changes to split the code in mini into operating
6114         system specific files.
6115
6116         This patch was done by copying mini.c to the respective files to
6117         preserve SVN history.
6118
6119 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
6120
6121         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
6122
6123 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
6124
6125         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
6126         remoting-invoke-with-check wrappers of shared methods.
6127
6128         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
6129
6130 2009-01-27  Mark Probst  <mark.probst@gmail.com>
6131
6132         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
6133         optimization if the top of stack is the last instruction in the
6134         bblock.  Otherwise it might have been used after its definition.
6135         Fixes #469742.
6136
6137 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
6138
6139         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
6140         method as well when get_vcall_slot () fails to match a code sequence.
6141
6142         * mini-arm.c: Fix the android build, which doesn't have
6143         __aeabi_read_tp.
6144
6145 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
6146
6147         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
6148         the s390x build.
6149
6150 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
6151
6152         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
6153
6154 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
6155
6156         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
6157         and put its id into jinfo->used_regs. This is only used on amd64,
6158         which is currently the only platform generating unwind info.
6159
6160         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
6161         the dwarf unwinder. This is required to correctly handle async exceptions
6162         like thread abort and stack overflows, which can happen while a method
6163         is in the middle of its prolog or epilog.
6164         
6165         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
6166         the unwind info belonging to an AOTed method.
6167
6168         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
6169         into cfg->unwind_ops.
6170         
6171         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
6172
6173         * mini.c (mini_init): Call mono_unwind_init ().
6174         (mini_cleanup): Call mono_unwind_cleanup ().
6175
6176         * unwind.c: Add functions for managing a set of unwind info entries, allowing
6177         unwind info to be shared between methods.
6178
6179         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
6180         saved in the LMF.
6181
6182         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
6183         get_throw_pending_exception () to avoid initialization races.
6184
6185         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
6186         mono_arch_exceptions_init () function.
6187
6188         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
6189
6190 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
6191
6192         * mini.c (mono_get_domain_intrinsic): New helper function.
6193         (mono_get_thread_intrinsic): Ditto.
6194
6195         * mini-arm.c mini-ia64.c: Use the new helper functions.
6196         
6197         * method-to-ir.c (mono_method_to_ir): Fix the comment for
6198         the last constrained_call change, since it is needed in the non-AOT
6199         case as well.
6200
6201         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
6202         
6203         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
6204         mono_get_lmf_addr () on arm eabi linux.
6205
6206 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
6207
6208         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
6209         code sequence which matches a non-virtual call.
6210
6211 2009-01-23  Mark Probst  <mark.probst@gmail.com>
6212
6213         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
6214         stack pointer (r1).
6215
6216 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
6217
6218         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
6219         runtime-invoke wrappers, since they are also shared based on signature.
6220
6221 2009-01-22  Mark Probst  <mark.probst@gmail.com>
6222
6223         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
6224         info from the (correct) context.
6225
6226 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
6227
6228         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
6229         
6230         * unwind.c (mono_unwind_frame): New function to unwind through a frame
6231         using dwarf unwinding info. Not yet used.
6232
6233         * mini.c (mini_init): When using xdebug, disable freeing of domains.
6234
6235 2009-01-21  Mark Probst  <mark.probst@gmail.com>
6236
6237         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
6238         descriptors.
6239
6240         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
6241         special case and handle mono_arch_delegate_invoke_impl() returning
6242         function descriptors.
6243
6244         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
6245         trampolines return function descriptors, too.
6246
6247 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
6248
6249         * method-to-ir.c (handle_alloc): Avoid generic instances in the
6250         out_of_line optimization.
6251
6252 2009-01-21  Martin Baulig  <martin@ximian.com>
6253
6254         * mini.h
6255         (MonoCompile): Added `disable_deadce_vars' to disable removing
6256         unused variables.
6257
6258         * mini.c
6259         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
6260         inside the debugger.
6261
6262         * liveness.c (mono_analyze_liveness): Don't remove any unused
6263         variables if `cfg->disable_deadce_vars' is set.
6264
6265 2009-01-21  Mark Probst  <mark.probst@gmail.com>
6266
6267         * method-to-ir.c: Only apply exception constructor optimization if
6268         the the method actually belongs to an exception class.  Fixes
6269         #467456.
6270
6271 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
6272
6273         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
6274         change inside a #ifdef __mono_ppc64__.
6275
6276         * aot-compiler.c (compile_method): Remove the previous limitation.
6277
6278         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
6279         on type variables in AOTed code.
6280         
6281         * aot-compiler.c (compile_method): Skip generic methods having type 
6282         constraints on their generic parameters.
6283
6284         * aot-compiler.c (compile_method): Check for methods which cannot be
6285         encoded inside RGCTX_FETCH patches as well.
6286
6287         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
6288         build.
6289
6290 2009-01-20  Mark Probst  <mark.probst@gmail.com>
6291
6292         * method-to-ir.c: Force the vtable variable in shared generic code
6293         for the case that they might show up on a stack trace where they
6294         are needed.
6295
6296         * mini-exceptions.c: Save and use generic sharing info as well as
6297         IP in stack traces to resolve shared generic instantiations.
6298
6299 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
6300
6301         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
6302         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
6303
6304 2009-01-20  Mark Probst  <mark.probst@gmail.com>
6305
6306         * method-to-ir.c: Do generic sharing for array constructors.
6307
6308 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
6309
6310         * mini-exceptions.c (mono_print_thread_dump): Add information
6311         about the thread state using wapi_current_thread_desc.
6312
6313 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
6314
6315         * basic-simd.cs: Tests for the new constructors. 
6316
6317 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
6318
6319         * mini-ops.h: Added OP_EXPAND_*
6320
6321         * cpu-x86.md: Same.
6322
6323         * mini-x86.c (mono_arch_output_basic_block): Same.
6324         
6325         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
6326
6327 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
6328
6329         * iltests.il.in: Add a test for #467385.
6330
6331 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
6332
6333         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
6334         thread been cleaned up is not the same currently in execution.
6335
6336         Fixes appdomain-unload crashes on windows, osx and linux variants
6337         without the __thread keyword.
6338
6339 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
6340
6341         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
6342         (koush@koushikdutta.com). Implement this for android.
6343
6344         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
6345         begins with a digit.
6346
6347         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
6348         mono_marshal_get_write_barrier ().
6349
6350 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
6351
6352         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
6353         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
6354         that pass them on a register pair.
6355
6356         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
6357         test was crashing due to that.
6358
6359 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
6360
6361         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
6362         trampoline code. Include ucontext.h only if available.
6363
6364 2009-01-15  Mark Probst  <mark.probst@gmail.com>
6365
6366         * mini.c: mono_domain_lookup_shared_generic() takes an open method
6367         and doesn't check whether it's sharable, like it was before
6368         removing the shared generics hash.  This brings IronPython
6369         performance back to what it was before that change.
6370
6371 2009-01-14  Mark Probst  <mark.probst@gmail.com>
6372
6373         * method-to-ir.c: Handle delegate invocation optimization earlier,
6374         otherwise it would be handled (much more slowly) by the
6375         final/sealed optimization.
6376
6377 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
6378
6379         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
6380         domain is not set. Fixes #465864.
6381
6382 2009-01-12  Mark Probst  <mark.probst@gmail.com>
6383
6384         * method-to-ir.c: Don't stop sharing of generic methods with catch
6385         clauses - we already handle those.
6386
6387 2009-01-12  Mark Probst  <mark.probst@gmail.com>
6388
6389         * mini.c, mini.h: lookup_generic_method() is now
6390         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
6391         making the shared_generics_hash obsolete.
6392
6393 2009-01-12  Mark Probst  <mark.probst@gmail.com>
6394
6395         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
6396         use the red zone.  Make room on the stack first and then use it,
6397         not the other way around.
6398
6399 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
6400
6401         * mini.c (mini_init): Call mono_xdebug_init ().
6402
6403         * aot-compiler.c (mono_xdebug_init): Make this non-static.
6404
6405 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
6406
6407         * TestDriver.cs: Add an --iter argument to run tests multiple times.
6408
6409         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
6410         trampolines.
6411
6412         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
6413         debug+unwind info for trampolines.
6414
6415         * mini.c (mono_create_unwind_op): New helper function.
6416
6417         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
6418
6419 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
6420
6421         * aot-compiler.c: Fix the build.
6422
6423 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
6424
6425         * Makefile.am: Update dtrace-prelink.sh location.
6426
6427 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
6428
6429         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
6430         optimization. Fixes #464520.
6431
6432 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
6433
6434         * mini-amd64.c : Adding code to save/restore non-volatile registers
6435            on Winx64.
6436
6437         * exceptions-amd64.c : Adding code to save/restore non-volatile 
6438           registers on Winx64.
6439
6440         Contributed under MIT/X11 license.
6441
6442 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
6443
6444         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
6445         __GNUC_MINOR__ which can break when the major version changes.
6446
6447 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
6448
6449         * basic-simd.cs: Add tests for usage of the sizeof opcode.
6450
6451 2009-01-07  Geoff Norton  <gnorton@novell.com>
6452
6453         * helpers.c:  Allow mono -v -v -v to work on darwin.
6454
6455 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
6456
6457         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
6458           pattern. 
6459
6460         Contributed under MIT/X11 license.
6461
6462 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
6463
6464         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
6465         instead of directly accessing type->data.klass. Fixes #462016.
6466         (mono_allocate_stack_slots_full): Ditto.
6467
6468         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
6469         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
6470
6471         * aot-compiler.c (emit_plt): Fix ARM build.
6472
6473 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
6474
6475         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
6476         
6477         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
6478         change.
6479
6480         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
6481         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
6482         #463357.
6483
6484         * iltests.il.in: Add a regression test.
6485
6486 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
6487
6488         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
6489
6490 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
6491
6492         * basic-simd.cs: Add a regression test for #462457.
6493
6494 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
6495
6496         * mini-ops.h: Add a definition of XPHI.
6497
6498         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
6499
6500         * ssa.c (op_phi_to_move): Handle XPHI.
6501
6502         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
6503
6504         Fixes #462457
6505
6506 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
6507
6508         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
6509
6510 2008-12-31  Geoff Norton  <gnorton@novell.com>
6511
6512         * mini-ppc.c: The prolog size allocated can be too small for darwin
6513         ppc32 under certain circumstances.  Also fix a small logic bug.
6514
6515 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
6516
6517         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
6518         while loading AOT methods.
6519
6520         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
6521         since only the former is nulled out after a successful cast. This prevents
6522         crashes with rethrown exceptions when using --debug=casts.
6523
6524 2008-12-24  Mark Probst  <mark.probst@gmail.com>
6525
6526         * mini.h: New macro for checking whether a method is final,
6527         i.e. whether the method or its class is marked final.
6528
6529         * method-to-ir.c: Use the new macro for all final-checks
6530         consistently.  Fixes the crash in the System.ServiceModel tests.
6531
6532 2008-12-23  Mark Probst  <mark.probst@gmail.com>
6533
6534         * mini-exceptions.c (get_exception_catch_class): Corrected another
6535         overly strict assertion.
6536
6537 2008-12-23  Mark Probst  <mark.probst@gmail.com>
6538
6539         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
6540         Clobbering it is not allowed because the caller might use it as
6541         the vtable register in the interface call.
6542
6543 2008-12-19  Mark Probst  <mark.probst@gmail.com>
6544
6545         * mini-exceptions.c (get_exception_catch_class): Corrected an
6546         overly strict assertion.
6547
6548 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
6549         
6550         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
6551
6552         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
6553
6554         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
6555
6556         * cpu-mips.md: correct lengths for certain long_ opcodes.
6557
6558         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
6559
6560         * 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().
6561         
6562 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
6563
6564         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
6565         
6566 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
6567         
6568         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
6569         
6570 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
6571
6572         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
6573         next basic block.
6574         
6575 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
6576
6577         * 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
6578
6579         * 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)
6580         
6581 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
6582         
6583         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
6584         
6585 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
6586
6587         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
6588         gshared code. Fixes #458947.
6589
6590         * generics.cs: Add a test.
6591
6592 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
6593         
6594         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6595         
6596         * mini-mips.c: first pass n32 code generation.
6597
6598         * mini-mips.h: datatypes and defines for n32 support.
6599
6600         * exceptions-mips.c: first pass n32 code generation.
6601         
6602         * tramp-mips.c: first pass n32 code generation.
6603         
6604         * cpu-mips.md: add long_ opcodes.
6605         
6606 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
6607
6608         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6609
6610         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6611         
6612         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6613         
6614         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6615
6616         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6617
6618         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6619
6620         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6621
6622         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
6623
6624         * helpers.c: for mips/n32, don't pass -mips32 to objdump
6625
6626 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
6627
6628         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
6629
6630 2008-12-12  Andres G. Aragoneses  <aaragoneses@novell.com>
6631
6632         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
6633
6634 2008-12-12  Mark Probst  <mark.probst@gmail.com>
6635
6636         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
6637         descriptors for helper functions directly in front of the code.
6638
6639 2008-12-11  Mark Probst  <mark.probst@gmail.com>
6640
6641         * method-to-ir.c: Removed an unnecessary assertion.
6642
6643 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
6644
6645         * method-to-ir.c: Merge SGEN changes from the old JIT.
6646
6647 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
6648
6649         * driver.c (compile_all_methods_thread_main): Handle failure of
6650         mono_get_method ().
6651
6652 2008-12-10  Mark Probst  <mark.probst@gmail.com>
6653
6654         * mini-ppc.c: Merged with mini-ppc64.c.
6655
6656         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
6657
6658         * Makefile.am: Use the same sources for PPC and PPC64.
6659
6660         * mini-ppc64.c: Removed.
6661
6662 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
6663
6664         * branch-opts.c (remove_block_if_useless): Extract fall through detection
6665         code to mono_bb_is_fall_through.
6666         
6667         * branch-opts.c (mono_remove_critical_edges): Same.
6668
6669 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
6670
6671         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
6672         expect that an OP_BR_REG will be there.
6673
6674 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
6675
6676         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
6677         for the many branch ops. The original check miss OP_BR_REG.
6678
6679         Fixes #457574.
6680         
6681 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
6682
6683         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
6684
6685 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
6686
6687         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
6688         while holding the aot lock.
6689
6690 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
6691
6692         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
6693         
6694 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
6695
6696         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
6697           to release all runtime callable wrappers held by the runtime.
6698
6699         Contributed under MIT/X11 license.
6700
6701 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
6702
6703         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
6704           for Winx64.
6705
6706         Contributed under MIT/X11 license.
6707
6708 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
6709
6710         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
6711         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
6712
6713 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
6714
6715         * cpu-mips.md: fix ckfinite length
6716
6717         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
6718         (mono_arch_lowering_pass): cleanup, rearrange for clarity
6719         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
6720         
6721 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
6722
6723         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
6724         
6725 2008-12-08  Geoff Norton  <gnorton@novell.com>
6726
6727         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
6728         size by 8 bytes as well.
6729
6730 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6731
6732         * basic-simd.cs: Fix method names for Vector16b.
6733         
6734 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6735
6736         * basic-simd.cs: Fix method names for Vector16sb.
6737
6738 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6739
6740         * basic-simd.cs: Fix method names for Vector8us.
6741         
6742 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6743
6744         * basic-simd.cs: Fix method names for Vector8s.
6745         
6746 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6747
6748         * basic-simd.cs: Fix method names for Vector4ui.
6749
6750 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6751
6752         * basic-simd.cs: Fix method names for Vector2l.
6753
6754 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6755
6756         * basic-simd.cs: Fix method names for Vector2d.
6757
6758 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6759
6760         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
6761         that are extension methods.
6762
6763 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
6764
6765         * basic-simd.cs: Fix method names for Vector4f.
6766
6767 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
6768
6769         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
6770         as such. Fixes #456669.
6771
6772 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
6773
6774         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
6775         
6776 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
6777
6778         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
6779         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
6780         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
6781         (mips_adjust_stackframe): handle FP spills
6782                 
6783         * mini-ops.h: add mips_mtc1_s2
6784         
6785         * cpu-mips.md: add mips_mtc1_s2
6786         
6787 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
6788
6789         * unwind.c: New file, move the unwind info encoding functions here from
6790         aot-compiler.c, so they could be used at runtime too.
6791
6792 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
6793
6794         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
6795         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
6796         
6797 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
6798
6799         * mini-mips.c: cleanup warnings
6800         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
6801         (mips_adjust_stackframe): handle case of taking the address of stack locals
6802         
6803 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
6804
6805         * aot-compiler.c: Implement a few functions missing from the asm writer.
6806         (emit_method_code): Only write symbols for methods when using the bin
6807         writer, since the assembler can't deal with the characters in our method
6808         names.
6809
6810         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
6811
6812         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
6813         call.
6814
6815         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
6816         a bit to also restore %rax.
6817
6818 2008-12-05  Mark Probst  <mark.probst@gmail.com>
6819
6820         * mini-ppc.c: Some simple merges from mini-ppc64.c.
6821
6822 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
6823
6824         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
6825         arguments.
6826
6827 2008-12-05  Mark Probst  <mark.probst@gmail.com>
6828
6829         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
6830
6831         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
6832         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
6833
6834         * exceptions-ppc64.c: Removed.
6835
6836         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
6837
6838 2008-12-05  Mark Probst  <mark.probst@gmail.com>
6839
6840         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
6841         tramp-ppc64.c.
6842
6843         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
6844
6845         * tramp-ppc64.c: Removed.
6846
6847 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
6848
6849         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
6850         the TYPESPEC table.
6851
6852 2008-12-05  Mark Probst  <mark.probst@gmail.com>
6853
6854         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
6855
6856         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
6857         mini-ppc.h instead of mini-ppc64.h.
6858
6859         * mini-ppc64.h: Removed.
6860
6861 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
6862
6863         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
6864         
6865         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
6866         
6867 2008-12-05  Mark Probst  <mark.probst@gmail.com>
6868
6869         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
6870         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
6871         code easier.
6872
6873 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
6874
6875         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
6876
6877 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
6878
6879         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
6880
6881 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
6882
6883         * basic-simd.cs: Tests for operator == and != on Vector4f.
6884
6885 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
6886
6887         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
6888
6889         * simd-intrinsics.c: Kill useless enum.
6890
6891 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
6892
6893         * cpu-mips.md: add long_conv_to_ovf_i4_2
6894         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
6895
6896 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
6897
6898         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
6899         
6900         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
6901
6902 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
6903
6904         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
6905         
6906 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
6907
6908         * basic-simd.cs: Add tests for new methods.
6909
6910 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
6911
6912         * simd-intrinsics.c: Add support for operator == and !=
6913         on Vector4(u)i.
6914
6915         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
6916
6917 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
6918
6919         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
6920
6921 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
6922
6923         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
6924
6925         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
6926         MONO_PATCH_INFO_ICALL_ADDR.
6927
6928         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
6929
6930         * aot-compiler.c: Resurrect full-aot support.
6931
6932 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
6933
6934         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
6935         
6936 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
6937
6938         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
6939         
6940 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
6941
6942         * basic-simd.cs: Fix tests to work under ppc.
6943         Remove tests for methods that will be removed.
6944
6945 2008-12-03  Mark Probst  <mark.probst@gmail.com>
6946
6947         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
6948         generic type (via a typedef or typeref) correctly.
6949
6950 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
6951
6952         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
6953         diagnose an assertion failure.
6954
6955 2008-12-02  Mark Probst  <mark.probst@gmail.com>
6956
6957         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
6958         Fix trampoline size.
6959
6960         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
6961         conversion opcodes are implemented natively instead via emulation.
6962
6963 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
6964
6965         * cpu-mips.md: remove mips_xori
6966
6967         * mini-ops.h:  remove mips_xori
6968
6969         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
6970
6971         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
6972         
6973         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
6974         
6975 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
6976
6977         * cpu-mips.md: fix instruction lengths.
6978
6979         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
6980
6981         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
6982
6983         * mini-ops.h: fix slti / sltiu op profiles.
6984         
6985 2008-12-02  Martin Baulig  <martin@ximian.com>
6986
6987         * method-to-ir.c (mono_method_to_ir): Disable debugging
6988         information for the init locals block to make the debugger stop
6989         after all locals have been initalized.
6990
6991 2008-12-02  Martin Baulig  <martin@ximian.com>
6992
6993         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
6994         running inside the debugger.
6995
6996 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
6997
6998         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
6999         is enabled.
7000
7001         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
7002         alu->alu imm optimization which only shows if deadce is disabled.
7003
7004         * aot-compiler.c: Rename the function names for the binary and asm writers
7005         so they can coexist in the same process. Rework the xdebug code to use the
7006         asm writer. This avoids the need to call into the runtime to dump the
7007         debugging info. Add more debugging info for types.
7008
7009         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
7010
7011         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
7012         cpu description tables, they can't occur in cpu-<ARCH>.md.
7013
7014         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
7015         the stack in CEE_LDFLDA. Fixes #450542.
7016
7017         * generics.cs: Add a new test.
7018
7019 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
7020
7021         * mini-ops.h: updated MIPS opcodes
7022         * mini-mips.c: decompose long opts
7023         * mini-mips.h: decompose long opts
7024         
7025 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
7026
7027         * cpu-mips.md: fix length on int_rem_un
7028         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
7029         
7030 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
7031
7032         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
7033
7034         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
7035
7036 2008-11-29  Martin Baulig  <martin@ximian.com>
7037
7038         * mini-exceptions.c (mono_handle_native_sigsegv): Check
7039         mono_debug_using_mono_debugger() in addition to the
7040         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
7041
7042 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
7043
7044         * mini-ops.h: updated more MIPS opcodes
7045         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
7046         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
7047         
7048 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7049
7050         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
7051
7052 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
7053
7054         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
7055         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
7056         * mini-ops.h: correct selected mips opcode entries
7057         
7058 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7059
7060         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
7061         make them work.
7062
7063 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7064
7065         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
7066
7067 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
7068
7069         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
7070         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
7071         * mini-mips.h: disable IMT
7072         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
7073         
7074 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7075
7076         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
7077
7078 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7079
7080         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
7081
7082 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
7083
7084         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
7085         consistency.
7086
7087 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
7088
7089         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
7090         for Set/GetVector aligned versions.
7091
7092 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
7093
7094         * basic-simd.cs: Add tests for Get/SetVector.
7095
7096 2008-11-27  Mark Probst  <mark.probst@gmail.com>
7097
7098         * mini.c: Removed g_slist_append_mempool().  Now in
7099         metadata/mempool.c.
7100
7101 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
7102
7103         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
7104         size properly and make the bounds check optional.
7105
7106         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
7107         for SetVector and IsAligned.
7108
7109 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
7110
7111         * mini.c: Remove unused mono_normalize_opcodes () function.
7112
7113 2008-11-26  Mark Probst  <mark.probst@gmail.com>
7114
7115         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
7116         using the new atomic add ops now.
7117
7118         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
7119         add.
7120
7121 2008-11-26  Mark Probst  <mark.probst@gmail.com>
7122
7123         * mini-ppc64.c: Several fixes.
7124
7125 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7126
7127         * cpu-mips.md: added jump_table
7128         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
7129
7130 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7131
7132         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
7133
7134 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7135
7136         * mini-ops.h: corrected a handful of MIPS opcodes.
7137
7138 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7139
7140         * aot-compiler.c: MIPS to use ELF writer
7141
7142 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7143
7144         * mini-codegen.c: remove MIPS specific assert.
7145
7146 2008-11-25  Mark Probst  <mark.probst@gmail.com>
7147
7148         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
7149         fixes.  PPC64 now passes most of the runtime regressions.
7150
7151 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
7152
7153         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
7154         volatile intervals a bit.
7155
7156 2008-11-24  Mark Probst  <mark.probst@gmail.com>
7157
7158         * basic-long.cs: New test case.
7159
7160 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
7161
7162         * mini.c (mini_method_compile): Disable globalra for large methods for 
7163         now.
7164
7165         * regalloc2.c (order_moves): Add fp support.
7166
7167         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
7168         source bblock ends with an OP_BR_REG.
7169
7170         * ratests.cs: Add a new test.
7171
7172 2008-11-23  Mark Probst  <mark.probst@gmail.com>
7173
7174         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
7175         sharing.  PPC64 now passes generics.exe.
7176
7177 2008-11-23  Mark Probst  <mark.probst@gmail.com>
7178
7179         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
7180
7181 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
7182
7183         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
7184         memory when mono_jit_info_table_find () can't find the method in the
7185         LMF case.
7186
7187         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
7188         AOTed code too.
7189         
7190         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
7191         writer too.
7192
7193 2008-11-23  Mark Probst  <mark.probst@gmail.com>
7194
7195         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
7196         Several fixes.  PPC64 now runs exceptions.exe and
7197         devirtualization.exe.
7198
7199 2008-11-22  Mark Probst  <mark.probst@gmail.com>
7200
7201         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
7202         arrays.exe and basic-math.exe.
7203
7204 2008-11-22  Mark Probst  <mark.probst@gmail.com>
7205
7206         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
7207         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
7208
7209 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
7210
7211         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
7212
7213 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
7214
7215         * method-to-ir.c: Move bounds checking macros to ir-emit.h
7216
7217         * ir-emit.h: Move macros from method-to-ir.c to here.
7218
7219 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
7220
7221         * mini-ops.h: Correct the long simd ops to use LREG.
7222
7223 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
7224
7225         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
7226         
7227         * mini-ops.h: Correct the dreg type of a few long opcodes.
7228
7229         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
7230         Add netbsd support.
7231
7232 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
7233
7234         * mini-ppc.c: remove negative stack references in epilog
7235         for platforms that don't support the red zone.
7236
7237 2008-11-21  Mark Probst  <mark.probst@gmail.com>
7238
7239         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
7240         point regs.  Now PPC64 passes basic-calls.exe.
7241
7242 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7243
7244         * basic-simd.cs: Add tests for accessors of Vector2l.
7245
7246 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7247
7248         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
7249
7250         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
7251         
7252         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
7253
7254 2008-11-21  Mark Probst  <mark.probst@gmail.com>
7255
7256         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
7257         PPC64 passes basic-long.exe.
7258
7259 2008-11-20  Mark Probst  <mark.probst@gmail.com>
7260
7261         * decompose.c: Decompose carry and overflow add on PPC64 like on
7262         other 64 bit archs.  Don't decompose sub at all on PPC64.
7263
7264         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
7265         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
7266         basic-long.exe.
7267
7268 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7269
7270         * basic-simd.cs: Add tests for accessors of Vector2d.
7271
7272 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7273
7274         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
7275
7276         * cpu-x86.md: Same.
7277
7278         * mini-x86.c (mono_arch_output_basic_block): Same.
7279         
7280         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
7281
7282 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7283
7284         * basic-simd.cs: Add tests for accessors of Vector4f.
7285
7286 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7287
7288         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
7289
7290         * cpu-x86.md: Same.
7291
7292         * mini-x86.c (mono_arch_output_basic_block): Same.
7293         
7294         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
7295
7296 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7297
7298         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
7299
7300 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7301
7302         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
7303
7304         * cpu-x86.md: Same.
7305
7306         * mini-x86.c (mono_arch_output_basic_block): Same.
7307         
7308         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
7309
7310 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7311
7312         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
7313
7314 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7315
7316         * simd-intrinsics.c: Enable setters for Vector16sb.
7317
7318 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
7319
7320         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
7321
7322         * cpu-x86.md: Same.
7323
7324         * mini-x86.c (mono_arch_output_basic_block): Same.
7325         
7326         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
7327
7328 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
7329
7330         * simd-intrinsics.c: Implement setter for Vector8us.
7331
7332 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
7333
7334         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
7335         for dead variables.
7336
7337 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
7338
7339         * mini-ppc.c: remove references to the red zone in the prolog
7340         (for systems that don't support it).
7341
7342 2008-11-19  Mark Probst  <mark.probst@gmail.com>
7343
7344         * cpu-ppc64.md: Fixed a few instruction lengths.
7345
7346         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
7347         now.
7348
7349 2008-11-19  Mark Probst  <mark.probst@gmail.com>
7350
7351         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
7352         basic.exe now.
7353
7354 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
7355
7356         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
7357
7358 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
7359
7360         * mini-ops.h: Added OP_INSERT_I2.
7361
7362         * cpu-x86.md: Same.
7363
7364         * mini-x86.c (mono_arch_output_basic_block): Same.
7365         
7366         * simd-intrinsics.c: Implement setter for Vector8s.
7367
7368         * simd-methods.h: Add the names of get setters of Vector8s.
7369
7370 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
7371
7372         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
7373         
7374         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
7375         parameters.
7376
7377         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
7378
7379 2008-11-18  Mark Probst  <mark.probst@gmail.com>
7380
7381         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
7382         for PPC64.  An empty program runs now.
7383
7384 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
7385
7386         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
7387
7388         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
7389         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
7390         info for JITted code is emitted into a shared library, loadable into gdb.
7391
7392 2008-11-18  Mark Probst  <mark.probst@gmail.com>
7393
7394         * Makefile.am: Changes to build PPC64.
7395
7396         * mini-arch.h: Include mini-ppc64.h on PPC64.
7397
7398 2008-11-18  Mark Probst  <mark.probst@gmail.com>
7399
7400         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
7401         in PPC code up to r119147.
7402
7403 2008-11-18  Mark Probst  <mark.probst@gmail.com>
7404
7405         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
7406         cpu-ppc64.md: Changes for PPC64.
7407
7408         Based on code submitted by andreas.faerber@web.de at
7409         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
7410         X11/MIT license.
7411
7412 2008-11-18  Mark Probst  <mark.probst@gmail.com>
7413
7414         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
7415         cpu-ppc64.md: Copied from the corresponding PPC files from
7416         r118846.
7417
7418 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
7419
7420         * mini-ops.h: Added OP_ROUND.
7421
7422         * cpu-x86.md: Added round.
7423
7424         * mini-x86.c: Added support for intrinsicing Math.Round (double).
7425
7426         * basic-math.cs: Added test_0_round to test rounding.
7427
7428         Contributed under MIT/X11 license.
7429
7430 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
7431
7432         * aot-compiler.c : Fix the Winx64 build.
7433
7434         Contributed under MIT/X11 license.
7435
7436 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
7437
7438         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
7439         in OP_EXTRACT_R8 to avoid possible stack corruption.
7440
7441 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
7442
7443         * mini-ops.h: Added OP_EXTRACT_R8/I8.
7444
7445         * cpu-x86.md: Added extract_r8.
7446
7447         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
7448         
7449         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
7450         a couple of OP_EXTRACT_I4.
7451
7452         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
7453
7454         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
7455
7456 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
7457
7458         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
7459         and not 4.1. 
7460
7461 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
7462
7463         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
7464         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
7465
7466         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
7467         are not needed any more.
7468
7469         * mini.h: Remove the unused INS_LIST macros.
7470
7471         * mini.c (mini_method_compile): Remove a disable globalra case which is no
7472         longer needed.
7473
7474         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
7475         ir-emit.h.
7476
7477         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
7478         mono_alloc_ireg () instead.
7479
7480         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
7481         macros.
7482
7483         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
7484         on amd64.
7485
7486         * aot-runtime.c (load_aot_module): Disable AOT when running under
7487         CAS.
7488
7489         * mini-amd64.h: Change the monitor fastpath defines to check for
7490         !PLATFORM_WIN32 so they work on *bsd too.
7491
7492         * mini.h mini.c mini-hhpa.c: Remove more unused code.
7493
7494         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
7495
7496         * mini.h (MonoCompile): Remove new_ir flag.
7497
7498         * regalloc.h regalloc.c: Remove unused code.
7499
7500         * cpu-*.md: Remove more unused opcodes.
7501
7502         * simple-cee-ops.h simple-mini-ops.h: Removed.
7503
7504         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
7505         
7506 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
7507
7508         * aliasing.h: Removed.
7509
7510         * *.c: Remove references to aliasing.h and inssel.h.
7511
7512         * mini.c: Remove additional unused functions.
7513
7514         * mini-ops.h cpu-*.md: Remove unused opcodes.
7515
7516 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
7517
7518         Remove the old JIT code.
7519
7520         * inssel*.brg: Removed.
7521
7522         * ssa.c abcremoval.c aliasing.c: Removed.
7523
7524         * ssa2.c: Renamed to ssa.c.
7525
7526         * abcremoval2.c: Renamed to abcremoval.c.
7527
7528         * *.c: Removed all !cfg->new_ir code.
7529
7530         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
7531         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
7532
7533         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
7534         
7535 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
7536
7537         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
7538         to simplify the code and cut back on the number of global symbols in the AOT
7539         file.
7540         
7541         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
7542
7543 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
7544
7545         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
7546         with the got/got_info tables.
7547
7548         * mini.h: Bump AOT file format version.
7549         
7550         * unwind.h: New file, contains definitions for stack unwinding.
7551
7552         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
7553         to cfg->unwind_ops.
7554         
7555         * aot-compiler.c: Generalize the emitting of unwind information to use the
7556         information in cfg->unwind_ops.
7557
7558         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
7559
7560         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
7561         AOT method frames. Enable writing symbols for methods by default.
7562
7563 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
7564
7565         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
7566         and make it work with vectors of element sizes 1, 2 and 4.
7567
7568         * simd-intrinsics.c: Enable getter for all vectors with element size
7569         1, 2 or 4.
7570
7571         * simd-methods.h: Add the names of other getters.
7572
7573         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
7574
7575         * cpu-x86.md: Same.
7576
7577         * mini-x86.c: Same.
7578
7579 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
7580
7581         * mini-ppc.h: portability fix.
7582
7583 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
7584
7585         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
7586         buggy and will overwrite it.
7587
7588 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
7589
7590         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
7591         Use it to emit local symbols for all methods so AOTed methods show up with
7592         their full name in gdb/valgrind output.
7593
7594 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
7595
7596         * mini-ppc.c: portability fixes.
7597
7598 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
7599
7600         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
7601         entries out of the if (!generic_shared...) code so it is always done.
7602         (mono_class_init_trampoline): Do the patching when running under valgrind
7603         too, newer versions of valgrind have no problems with it.
7604
7605 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
7606
7607         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
7608         further sections.
7609
7610 2008-11-13  Mark Probst  <mark.probst@gmail.com>
7611
7612         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
7613         filters.
7614
7615 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
7616
7617         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
7618
7619 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
7620
7621         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
7622
7623         * cpu-x86.md: Same.
7624
7625         * mini-x86.c: Same.
7626
7627         * simd-intrinsics.c: Same.
7628
7629 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
7630
7631         * simd-intrinsics.c: Enable constructor intrinsics for all types.
7632
7633 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
7634
7635         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
7636         to work with more Vector types.
7637
7638 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
7639
7640         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
7641         store the elemens directly instead of using and intermediate.
7642
7643 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
7644
7645         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
7646
7647         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
7648         to preserve %eax for aot plt trampolines.
7649
7650         * aot-compiler.c (compile_method): Don't skip synchronized methods.
7651         (encode_method_ref): Flag synchronized methods so they won't go through
7652         the AOT trampoline.
7653
7654         * aot-compiler.c: Additional work to support AOTing synchronized methods/
7655         wrappers.
7656
7657         * cpu-ia64.md (jmp): Increase max length.
7658
7659 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
7660
7661         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
7662         open generic classes.
7663
7664         * aot-compiler.c: Enable the ELF writer on ELF platforms.
7665
7666         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
7667         box+brtrue optimization since it causes test failures on x86.
7668
7669 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
7670
7671         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
7672
7673         * cpu-x86.md: Same.
7674
7675         * mini-x86.c: Same.
7676
7677         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
7678         for simd ctor values. 
7679
7680         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
7681         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
7682
7683 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
7684
7685         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
7686         LogicalRightShift.
7687
7688         * simd-instrincs.c: Same.
7689
7690         * basic-simd.cs: Same.
7691
7692 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
7693
7694         * ratests.cs: Add more tests.
7695
7696         * regalloc2.c (add_spill_code): Handle more corner cases.
7697
7698 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
7699
7700         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
7701         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
7702         both the source an destination of an instruction.
7703
7704 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
7705
7706         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
7707         wapihandles.c: more portability changes.
7708
7709 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
7710
7711         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
7712         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
7713         safe to execute in a signal handler and the kernel provides better
7714         the info in /proc/self/smaps. Avoid the assert on sigaction during
7715         cleanup.
7716
7717 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
7718
7719         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
7720         do the bblock linking hack if it is actually needed.
7721
7722         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
7723         up linking.
7724
7725         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
7726         crash problem is fixed.
7727
7728         * branch-opts.c (mono_remove_critical_edges): Link up newly added
7729         bblocks.
7730
7731         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
7732         for catch clauses.
7733         (mini_method_compile): Set the starting value of next_vreg to 
7734         MAX_IREGS + MAX_FREGS when using globalra.
7735
7736         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
7737         filter clauses with BB_EXCEPTION_HANDLER.
7738
7739         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
7740
7741 2008-11-10  Mark Probst  <mark.probst@gmail.com>
7742
7743         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
7744         space for stdcall.  Fixes regressions on Win32.
7745
7746 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
7747
7748         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
7749         bblocks.
7750         (linear_scan): Remove an assert which doesn't seem to be needed.
7751
7752         * local-propagation.c (mono_local_deadce): Avoid a call to
7753         MONO_DELETE_INS which would screw up the instruction linking.
7754
7755         * mini.c (mono_decompose_op_imm): Make this work with globalra.
7756
7757         * regalloc2.c: Upgrade to work the current JIT code.
7758
7759 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
7760
7761         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
7762         case.
7763
7764         * aot-runtime.c: Remove some dead code.
7765
7766         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
7767         consistency.
7768         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
7769
7770         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
7771         trampolines using sscanf since atoi doesn't work on large unsigned values.
7772
7773         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
7774         Initialize code_size.
7775
7776 2008-11-08  Mark Probst  <mark.probst@gmail.com>
7777
7778         * method-to-ir.c (mini_emit_inst_for_method): Make
7779         Interlocked.CompareExchange work for Int arguments on 32 bit
7780         archs, as well.
7781
7782 2008-11-07  Mark Probst  <mark.probst@gmail.com>
7783
7784         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
7785
7786 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
7787
7788         * main.c Fix MSVC build.
7789
7790         Contributed under MIT/X11 license.
7791
7792 2008-11-06  Mark Probst  <mark.probst@gmail.com>
7793
7794         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
7795         alignment larger than 8 bytes are aligned correctly, too.
7796
7797         * mini.c: Honor the min_align field of MonoClass when laying out
7798         the stack.
7799
7800 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
7801
7802         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
7803
7804         * aot-compiler.c (emit_plt): Fix a warning.
7805         
7806         * aot-compiler.c: Implement ARM support in the binary writer.
7807
7808 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
7809
7810         * basic-simd.cs: Add test for getter with byref arg.
7811         Fix the naming of a few tests.
7812         Add missing checks to a test.
7813
7814 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
7815
7816         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
7817
7818         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
7819         most of the full-aot support for monitor enter/exit trampolines.
7820
7821         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
7822         enter/exit trampoline creation functions.
7823
7824         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
7825         make dist.
7826
7827 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
7828
7829         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
7830         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
7831         implement the needed functionality without adding crap to the runtime.
7832
7833 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
7834
7835         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
7836         non-x86 builds.
7837
7838         * mini.c (mono_build_date): New global version holding the build date in
7839         string format.
7840         
7841         * Makefile.am (buildver.c): Generate a file containing the build date.
7842
7843         * main.c: Set the build date from the generated file.
7844
7845         * mini.c (mono_get_runtime_build_info): New helper function returning build
7846         information in a string format.
7847         
7848         * driver.c (mono_main): Print the build date in --version.
7849
7850         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
7851         file when the bind-to-runtime-version option is used.
7852
7853 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
7854
7855         * simd-intrinsics.c: Fix bug when using getters and byref args. 
7856
7857 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
7858
7859         * simd-methods.h: Rename prefetch methods.
7860
7861         * simd-intrinsics.c: Same.      
7862
7863 2008-11-05  Mark Probst  <mark.probst@gmail.com>
7864
7865         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
7866         sizes.
7867
7868 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
7869
7870         * aot-compiler.c: Use the bundled elf header files instead of depending on
7871         the system one.
7872         
7873         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
7874         mempool.
7875
7876         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
7877         on every call.
7878
7879 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
7880
7881         * cpu-x86.md: Add store nta ops.
7882
7883         * mini-ops.h: Same.
7884
7885         * mini-x86.c: Same.
7886
7887         * mini.h: Add an enum for simd prefetch modes.
7888
7889         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
7890         of store. Use the changed code to support store nta.
7891
7892         * simd-intrinsics.c: Add prefetch ops for all vector types.
7893
7894 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
7895
7896         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
7897         threads.
7898         
7899         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
7900         names.
7901
7902         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
7903         trampolines.
7904
7905 2008-11-04  Mark Probst  <mark.probst@gmail.com>
7906
7907         * mini-x86.c: Fixed commit.
7908
7909 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
7910
7911         * aot-compiler.c (emit_plt): Align the plt section only on x86.
7912
7913 2008-11-04  Mark Probst  <mark.probst@gmail.com>
7914
7915         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
7916         and MONITOR_EXIT, for the ASM fastpaths.
7917
7918         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
7919         available.
7920
7921         * mini.c, patch-info.h: Signature and patch infos for
7922         Monitor.Enter/Exit trampolines.
7923
7924         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
7925
7926         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
7927         Monitor.Enter/Exit ASM fastpath for Linux.
7928
7929 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
7930
7931         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
7932
7933         * objects.cs: Add a new test.
7934         
7935         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
7936
7937         * aot-runtime.c (load_method): Run class initialization in the PLT case even
7938         if MONO_LOG_LEVEL is set.
7939
7940         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
7941
7942         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
7943
7944         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
7945         
7946         * aot-compiler.c: Change the relocation code to use virtual addresses instead
7947         of file offsets. Align the sections belonging to the data segment to 
7948         PAGESIZE.
7949
7950 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
7951
7952         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
7953         elf.h. Port it to amd64.
7954
7955 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
7956
7957         * driver.c: Enable SIMD by default.
7958
7959 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
7960
7961         * cpu-x86.md: Add prefetch op.
7962
7963         * mini-ops.h: Same.
7964
7965         * mini-x86.c: Same.
7966
7967         * mini.h: Add an enum for simd prefetch modes.
7968
7969         * simd-methods.h: Add prefetch function names.
7970
7971         * simd-intrinsics.c: Add prefetch ops for all vector types.
7972
7973 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
7974
7975         * aot-compiler.c (emit_bytes): Speed this up a little.
7976
7977 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
7978
7979         * aot-compiler.c: Add JIT time etc. statistics.
7980         
7981         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
7982
7983         * mini.h (MonoCompile): Add 'got_offset' field.
7984
7985         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
7986         method_got_offsets array.
7987
7988         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
7989         wrappers.
7990
7991         * aot-compiler.c (compile_method): Add generic method instances referenced
7992         by the method to the list of methods to be compiled, this is required so if
7993         A<T> references B<T>, and another assembly references A<int>, then it will
7994         also get a copy of B<int>.
7995
7996         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
7997         when checking for monitor enter/exit.
7998
7999 2008-10-30  Mark Probst  <mark.probst@gmail.com>
8000
8001         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
8002         for Monitor.Enter and Monitor.Exit if enabled.
8003
8004         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
8005         Solaris.
8006
8007 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
8008
8009         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
8010         of an OP_MOVE. Fixes #440046.
8011
8012         * basic-long.cs: Add a new test.
8013
8014 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
8015
8016         * mini.h: Add synchronization note for the managed counter-part.
8017
8018         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
8019         returns the simd caps of the current cpu.
8020
8021 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
8022
8023         * basic-simd.cs: Remove Console.WriteLine.
8024
8025 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8026
8027         * basic-simd.cs: New tests for Vector2ul.
8028
8029 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8030
8031         * simd-intrinsics.c: Add new vector type Vector2ul.
8032
8033 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8034
8035         * basic-simd.cs: New tests for Vector2l.
8036
8037 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8038
8039         * cpu-x86.md: Add long version of most packed int ops.
8040
8041         * mini-ops.h: Same.
8042
8043         * mini-x86.h: Same.
8044
8045         * simd-intrinsics.c: Add new vector type Vector2l.
8046
8047 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8048
8049         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
8050
8051         * simd-methods.h: Remove SN_op_BitwiseXor.
8052
8053 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
8054
8055         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
8056         alignment.
8057
8058 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
8059
8060         * basic-simd.cs: Test for Vector2d.
8061
8062         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
8063         value.
8064
8065 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
8066
8067         * cpu-x86.md: Add double version of all packed float ops.
8068
8069         * mini-ops.h: Same.
8070
8071         * mini-x86.h: Same.
8072
8073         * simd-intrinsics.c: Add new vector type Vector2d.
8074
8075         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
8076
8077         * simd-methods.h: Add Duplicate.
8078
8079 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
8080
8081         * basic-simd.cs: Test for packing with signed saturation.
8082
8083 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
8084
8085         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
8086         found in the TYPESPEC table.
8087
8088 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
8089
8090         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
8091         too.
8092
8093         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8094
8095         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
8096         instead of the RVA, since the RVA can be changed by tools like the cil 
8097         stripper.
8098
8099         * method-to-ir.c (mono_method_to_ir2): Ditto.
8100
8101         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
8102         (deserialize_variable): Ditto.
8103
8104 2008-10-25  Martin Baulig  <martin@ximian.com>
8105
8106         * debug-mini.c (write_variable): Use
8107         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
8108
8109 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8110
8111         * cpu-x86.md: Add unsigned variants of packd and packw.
8112
8113         * mini-ops.h: Same.
8114
8115         * mini-x86.h: Emit the right instruction for packd and packw.
8116         Add unsigned variants of packd and packw.
8117
8118         * simd-intrinsics.c: Packd and packw were used in place of their
8119         unsigned variants. Change that.
8120         Add intrinsics for (Signed)PackWithSignedSaturation.
8121
8122         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
8123
8124 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8125
8126         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
8127
8128 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8129
8130         * mini-ops.h: Remove dword packed add/sub with saturation ops.
8131
8132         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
8133
8134         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
8135         sse instructions.
8136
8137         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
8138
8139 2008-10-24  Mark Probst  <mark.probst@gmail.com>
8140
8141         * method-to-ir.c, mini.c: Special casing for the synchronized
8142         wrapper for the ldtoken+GetTypeFromHandle case.
8143
8144 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
8145
8146         * mini.c (mono_replace_ins): Move this to branch-opts.c.
8147
8148         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
8149         created/split bblocks.
8150
8151 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8152
8153         * mini-ops.h: Add packed signed mul high.
8154         
8155         * cpu-x86.md: Same.
8156
8157         * mini-x86.c (mono_arch_output_basic_block): Same.
8158
8159         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
8160
8161         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
8162
8163 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8164
8165         * basic-simd.cs: Tests for Vector16sb.
8166
8167 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
8168
8169         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
8170
8171 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
8172
8173         * mini-ops.h: Add packed signed min, max and compare greater.
8174         
8175         * cpu-x86.md: Same.
8176
8177         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
8178         saturation.
8179
8180         * simd-methods.h: Add CompareGreaterThan.
8181
8182         * simd-methods.h: Remove CompareEquals.
8183
8184         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
8185
8186         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
8187
8188         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
8189         CompareEqual.
8190
8191 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
8192
8193         * basic-simd.cs: Fix tests due to change in the API.
8194
8195 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
8196
8197         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
8198
8199 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
8200
8201         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
8202
8203         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
8204         inst_offset as this has invalid values for LDADDR.
8205
8206 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
8207
8208         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
8209
8210         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
8211
8212 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
8213
8214         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
8215         for accessing field->data.
8216
8217 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
8218
8219         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
8220
8221 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
8222
8223         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
8224
8225         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
8226
8227 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
8228
8229         * dominators.c (mono_compute_natural_loops): Allocate GList enties
8230         from the cfg mempool.
8231
8232 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
8233
8234         * basic-simd.cs: Tests for new methods in Vector8us.
8235
8236 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
8237
8238         * mini-ops.h: Add multiply and store high.
8239         
8240         * cpu-x86.md: Same.
8241
8242         * mini-x86.c (mono_arch_output_basic_block): Same.
8243
8244         * simd-methods.h: Same.
8245
8246         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
8247         and CompareEqual.
8248
8249 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
8250
8251         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
8252         mono_class_setup_vtable ().
8253
8254         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
8255         mono_class_get_vtable_entry () for accessing klass->vtable.
8256
8257         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
8258
8259         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
8260         found.
8261
8262         * method-to-ir.c (mono_save_token_info): Don't save references made from
8263         wrappers.
8264
8265         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
8266         of generic instances.
8267
8268         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
8269
8270 2008-10-19  Mark Probst  <mark.probst@gmail.com>
8271
8272         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
8273         OP_JMP depends on the method signature.  Calculate it properly.
8274
8275 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
8276         
8277         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
8278         called directly.
8279
8280         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
8281         instances.
8282         (emit_extra_methods): Add another table mapping method indexes to 
8283         offsets in the extra_method_info table.
8284
8285         * mini.h: Bump AOT file format version.
8286         
8287         * aot-runtime.c: Merge most of the code from mono_aot_get_method
8288         and mono_aot_get_method_from_token () into one function.
8289
8290 2008-10-19  Mark Probst  <mark.probst@gmail.com>
8291
8292         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
8293         separate counter.
8294
8295 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
8296
8297         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
8298         methods.
8299
8300         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
8301         disable_aot.
8302
8303         * mini.c (mono_patch_info_equal): Compare the generic context as well.
8304
8305         * mini.h: Bump aot file format version.
8306
8307         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
8308         AOT file can contain native code for methods which are not in the METHOD
8309         table. Generate code for non-sharable generic instances of generic methods
8310         found in the METHODSPEC table.
8311         
8312         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
8313         encoding generic type handles.
8314
8315         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
8316         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
8317
8318         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
8319         macros + MONO_ADD_INS.
8320
8321         * mini.c (mono_jump_info_token_new2): New function which takes a generic
8322         context as well.
8323
8324         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
8325
8326         * mini.h: Bump aot file format version.
8327
8328         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
8329
8330 2008-10-17  Mark Probst  <mark.probst@gmail.com>
8331
8332         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
8333         platforms, with definable stack alignment value.  Set to 16 now
8334         for all platforms.
8335
8336         * mini.c, mini.h, driver.c: Command line option for disabling
8337         stack alignment.
8338
8339 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
8340
8341         * basic-simd.cs: Tests for new methods in Vector4ui.
8342
8343 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
8344
8345         * mini-ops.h: Add packed int shuffle.
8346         
8347         * cpu-x86.md: Same.
8348
8349         * mini-x86.c (mono_arch_output_basic_block): Same.
8350
8351         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
8352         extract mask, max, min, shuffle.
8353
8354         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
8355
8356 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
8357
8358         * basic-simd.cs: Tests for new methods in Vector8us.
8359
8360 2008-10-17  Mark Probst  <mark.probst@gmail.com>
8361
8362         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
8363         RuntimeTypeHandle, not a TypedReference.
8364
8365 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
8366
8367         * simd-intrinsics.c: remove relocations.
8368
8369 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
8370
8371         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
8372         optimizations from the x86 backend.
8373
8374 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
8375
8376         * simd-methods.h, simd-intrinsics.c: debloat method names and
8377         prepare for no relocations.
8378
8379 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
8380
8381         * mini-ops.h: Add packed min/equal and sum of absolute differences.
8382         
8383         * cpu-x86.md: Same.
8384
8385         * mini-x86.c (mono_arch_output_basic_block): Same.
8386
8387         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
8388         extract mask, max, min and sum of absolute differences.
8389
8390         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
8391         method name.
8392
8393 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
8394
8395         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
8396         Renamed one test for consistency.
8397
8398 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
8399
8400         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
8401         fix to the code that deal with other blocks.
8402
8403 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
8404
8405         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
8406
8407 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
8408
8409         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
8410         that deals with vreg interference. Explicitly check for OP_LDADDR to be
8411         able to process the source reg.
8412
8413 2008-10-16  Martin Baulig  <martin@ximian.com>
8414
8415         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
8416
8417         * inssel.brg: Add `OP_HARD_NOP'.
8418
8419         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
8420
8421         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
8422         `OP_HARD_NOP' instruction when running inside the debugger.
8423
8424         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
8425         `OP_HARD_NOP' instruction when running inside the debugger.
8426
8427 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
8428
8429         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
8430         now works. The issue with the regalloc tripping up no longer
8431         happens.
8432
8433         * simd-intrinsics.c (load_simd_vreg): Same.
8434
8435 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
8436         
8437         * basic-simd.cs: Tests for new Vector8ui methods.
8438
8439 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
8440
8441         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
8442         only for type. This fixes crashes where MonoInst::klass is checked
8443         for ops of type != VTYPE or OBJ.
8444
8445         * simd-intrinsics.c (load_simd_vreg): Same.
8446
8447 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
8448
8449         * mini-ops.h: Add ops for packed shuffle/max/avg and
8450         extract mask.
8451         
8452         * cpu-x86.md: Same.
8453
8454         * mini-x86.c (mono_arch_output_basic_block): Same.
8455
8456         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
8457         extract mask.
8458
8459         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
8460         to emit extract mask op.
8461
8462         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
8463         to emit word shuffles.
8464
8465 2008-10-15  Mark Probst  <mark.probst@gmail.com>
8466
8467         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
8468         the largest alignment needed by a variable, but at least
8469         sizeof(gpointer).
8470
8471 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
8472
8473         * basic-simd.cs: Tests for the fixes in the last commit.
8474
8475 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
8476
8477         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
8478         no longer handles STACK_PTR input.
8479
8480         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
8481
8482         * simd-intrinsics.c (load_simd_vreg): New function that works like 
8483         get_simd_vreg   but handles STACK_PTR input.
8484
8485         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
8486         as the input can be an arbitrary pointer.
8487
8488         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
8489         LDADDR local optimization directly otherwise use a store op.
8490
8491 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
8492
8493         * basic-simd.cs: Tests for dup low and dup high.
8494
8495 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
8496
8497         * mini-ops.h: Add dup low and dup high ops.
8498         
8499         * cpu-x86.md: Same.
8500
8501         * mini-x86.c (mono_arch_output_basic_block): Same.
8502
8503         * simd-intrinsics.c (vector4f_intrinsics): Same.
8504
8505 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
8506
8507         * basic-simd.cs: Tests for recently added functionality.
8508
8509 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
8510
8511         * mini-ops.h: Add remaining sse1 fp ops.
8512         
8513         * cpu-x86.md: Add remaining sse1 fp ops.
8514
8515         * mini-x86.c (mono_arch_output_basic_block): Same.
8516
8517         * mini.h: Add enum for simd FP compare conditions.
8518
8519         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
8520
8521         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
8522         so the backed can generate the appropriate op.
8523
8524 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
8525         This patch squeese one more byte from the SimdIntrinsc struct.
8526
8527         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
8528         a a shift amount intead of simply or'ing it.
8529
8530         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
8531
8532         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
8533         byte so we can have an aditional flags field without increasing struct size.
8534
8535         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
8536         against the simd_supported_versions bitmask.
8537
8538         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
8539
8540 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
8541
8542         * mini.c: remove rawbuffer code (the only use here is unsafe because
8543         it takes locks during signal handling and the kernel now provides much
8544         better info in proc/pid/smaps these days).
8545
8546 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
8547
8548         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
8549         OP_X86_PUSH_OBJ. Fixes #434620.
8550
8551         * objects.cs: Add a test.
8552         
8553 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
8554
8555         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
8556         that the packuswb/packusdw don't work with unsigned numbers for what
8557         would be negative numbers in signed format.
8558
8559         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
8560         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
8561
8562         * mini-ops.h: Add doubleword forms of many ops and packing ones.
8563
8564         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
8565
8566         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
8567
8568         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
8569
8570         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
8571         add more ops.
8572
8573         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
8574         version as the enum in mini.h.
8575
8576         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
8577         for sse3 ops, check the simd_version field if present. This way the code
8578         works with all versions of sse.
8579
8580 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
8581
8582         * simd-intrinsics.c: Fixed intrinsic name typo.
8583
8584         * mini.h: Added missing simd exported function.
8585
8586         * basic-simd.cs: Added tests for Vector4ui.
8587         Fixed broken test for Vector16b.
8588
8589 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
8590
8591         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
8592         the max length to 64.
8593
8594 2008-10-10  Mark Probst  <mark.probst@gmail.com>
8595
8596         * method-to-ir.c: Only do the fast virtual generic method call for
8597         non-wrapper methods.
8598
8599         * mini.h, mini-trampolines.c: The new generic virtual remoting
8600         trampoline handles virtual method calls via the vtable (as done by
8601         the fast virtual generic method calls) to remoting proxies.
8602
8603         * mini.c (mono_jit_create_remoting_trampoline): For generic
8604         methods reate a generic virtual remoting trampoline.
8605
8606         * mini-amd64.h: Enable fast virtual generic method calls again.
8607
8608 2008-10-10  Mark Probst  <mark.probst@gmail.com>
8609
8610         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
8611         restore registers when doing tail calls.
8612
8613 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
8614
8615         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
8616         Vector4ui.
8617
8618 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
8619
8620         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
8621
8622 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
8623
8624         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
8625
8626 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
8627
8628         * basic-simd.cs: Retrofit for API changes.
8629
8630 2008-10-10  Mark Probst  <mark.probst@gmail.com>
8631
8632         * mini-ppc.c: Handle integer stack arguments for tail calls.
8633
8634 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
8635
8636         * optflags-def.h: Removed sse3 optimization.
8637
8638         * driver.c: Same.
8639
8640         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
8641         sse3.
8642
8643         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
8644
8645         * mini.h: Added enumeration with simd versions.
8646
8647         * simd-intrinsics.c (emit_intrinsics): Use the new static var
8648         for detecting SSE3.
8649
8650         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
8651
8652         * mini.c (mini_init): Call mono_simd_intrinsics_init.
8653
8654 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
8655
8656         * basic-simd.cs: Added tests for Vector8u and Vector16u.
8657
8658         * basic-simd.cs: Fixed test naming.
8659
8660 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
8661
8662         * mini-ops.h: Added ops for packed and saturated math, shifts
8663         and packing/unpacking.
8664
8665         * cpu-x86.md: Added descriptors for the above ops.
8666
8667         * mini-x86.c: Added code to emmit the above ops.
8668
8669         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
8670
8671 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
8672
8673         * aot-compiler.c (compile_method): Enable AOT for generic code.
8674
8675         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
8676
8677 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
8678
8679         * mini.c: add a workaround for a common screwup that ends up blamed
8680         to mono (other processes blocking signal delivery).
8681
8682 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
8683
8684         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
8685         in the LDFLD/STFLD opcodes. Fixes #432673.
8686
8687         * iltests.il.in: Add a new test.
8688
8689 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
8690
8691         * mini-arm.c: attach the thread in unmanaged->managed transitions
8692         using delegates (bug #433148).
8693
8694 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
8695
8696        * basic-simd.cs: Use new ShuffleSel constants.
8697
8698 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
8699
8700         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
8701
8702         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
8703         only disable simd intrinsics if no sse2 is detected.
8704
8705         * optflags-def.h: Added sse3.
8706
8707         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
8708         is disabled.
8709
8710 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
8711
8712         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
8713         when adding delegate-invoke wrappers.
8714
8715 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
8716
8717         * Makefile.am: Reenable the simd tests.
8718
8719 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
8720
8721         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
8722           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
8723           other vreg is allocated to that hreg.
8724
8725         Contributed under MIT/X11 license.
8726
8727 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
8728
8729         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
8730         yet checked in.
8731
8732 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
8733
8734         * basic-simd.cs: New test suite for SIMD intrinsics.
8735
8736         * Makefile.am: Added new tests.
8737
8738 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
8739
8740         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
8741
8742         * mini-ops.h: Same.
8743
8744         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
8745
8746         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
8747         using SSE2 aware opcodes.
8748
8749         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
8750         is enabled, this code path is only reachable if conversion ops are emmited after
8751         mono_method_to_ir.
8752
8753         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
8754
8755         This optimization saves 6 bytes per conversion against the old version.
8756
8757 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
8758
8759         * aot-compiler.c (compile_method): Don't skip methods referencing 
8760         generic methods without a corresponding entry in token_info_hash, since
8761         encode_method_ref () can handle all generic methods now.
8762
8763         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
8764         generic context is set.
8765         
8766         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
8767         generic sharing of LDTOKEN.
8768
8769 2008-10-06  Mark Probst  <mark.probst@gmail.com>
8770
8771         * mini-amd64.h: Temporarily disabled fast virtual generic method
8772         calls because it breaks the System.Runtime.Remoting tests.
8773
8774 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
8775
8776         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
8777
8778         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
8779         so inlining actually works.
8780         (check_inline_caller_method_name_limit): Ditto.
8781
8782 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
8783
8784         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
8785         64 bit safety (from Olaf Hering and Andreas Farber).
8786
8787 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
8788         
8789         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
8790         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
8791         unused virtual call support code.
8792
8793         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
8794         
8795         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
8796         which can't use aot trampolines.
8797         (decode_patch): Don't create aot trampolines for methods which can't use
8798         them.
8799
8800         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
8801         use aot trampolines.
8802
8803         * mini.h: Bump AOT image format version.
8804         
8805 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
8806
8807         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
8808         to save_token_info () since cmethod is inflated for constrained calls.
8809
8810         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
8811
8812 2008-10-04  Andreas Farber  <andreas.faerber@web.de>
8813
8814         * Makefile.am: Add build rules for ppc64.
8815         This avoids the build failing at pedump with unresolved symbols
8816         due to lack of arch_sources. Instead it will now fail earlier
8817         due to lack of cpu-ppc64.md.
8818
8819         Contributed under MIT/X11 license.
8820
8821 2008-10-04  Mark Probst  <mark.probst@gmail.com>
8822
8823         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
8824         tail calls.
8825
8826         * iltests.il.in: Add test case for tail call with many arguments.
8827
8828 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
8829
8830         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
8831         to the fast virtual generic method code until the aot case is fixed.
8832
8833 2008-10-03  Mark Probst  <mark.probst@gmail.com>
8834
8835         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
8836
8837 2008-10-03  Mark Probst  <mark.probst@gmail.com>
8838
8839         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
8840         thunks.
8841
8842 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
8843         
8844         * simd-intrinsics.c: Forgot to add this one.
8845
8846         * mini-codegen.c: Fix macro in case SIMD is not supported.
8847
8848 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
8849         
8850         This patch land initial JIT support for simd intrinsics.
8851
8852         * mini-x86.h: Added new define to make --enable_minimal work on x86.
8853
8854         * Makefile.am: Added simd-intrinsics.c
8855
8856         * simd-intrinsics.c: New file with simd instrinsic related
8857         code.
8858
8859         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
8860
8861         * cpu-x86.md: Add simd related instructions.
8862
8863         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
8864
8865         * driver.c: Added two new --regression variants.
8866
8867         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
8868
8869         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
8870
8871         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
8872         extract some complicated logic to helper functions.
8873
8874         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
8875
8876         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
8877
8878         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
8879         the specialized simplification pass.
8880
8881         * method-to-ir.c (mono_spill_global_vars): Use new macro.
8882
8883         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
8884
8885         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
8886         table.
8887
8888         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
8889         if MONO_ARCH_NEED_SIMD_BANK is defined.
8890
8891         * mini-ops.h: Added the new simd ops.
8892
8893         * mini-x86.c: Added mono_arch_xregname.
8894
8895         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
8896
8897         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
8898
8899         * mini-x86.h: Define simd related MONO_ARCH macros.
8900
8901         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
8902
8903         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
8904
8905         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
8906         MONO_CLASS_IS_SIMD to deal with simd related IR.
8907
8908         * mini.h (MonoInst): Added spill_var to the backend union.
8909
8910         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
8911
8912         * mini.h: Added forward declarations of the new simd fuctions.
8913
8914         * optflags-def.h: Added new optimization names SIMD.
8915
8916         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
8917
8918         * regalloc.h: Added support for working with 3 register banks.
8919
8920         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
8921
8922         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
8923
8924 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
8925
8926         * mini-exceptions.c: remove 64 bit related ifdef clutter.
8927
8928 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
8929
8930         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
8931         instead of one on 64 bit systems.
8932
8933         * method-to-ir.c: Remove unused includes.
8934
8935 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
8936
8937         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
8938         cfg->used_int_regs, since the two are different on arm.
8939
8940 2008-10-02  Mark Probst  <mark.probst@gmail.com>
8941
8942         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
8943         mono_method_get_vtable_index() to get the vtable index.
8944
8945 2008-10-02  Mark Probst  <mark.probst@gmail.com>
8946
8947         * method-to-ir.c (mono_method_to_ir2): Don't create native
8948         wrappers for array methods, because they're never called (and if
8949         they were called they wouldn't work).
8950
8951 2008-10-02  Mark Probst  <mark.probst@gmail.com>
8952
8953         * method-to-ir.c (mono_method_to_ir2): Array methods are
8954         special-cased and must not be invoked indirectly via the (M)RGCTX
8955         when generic sharing is turned on.  Fixes #431413.
8956
8957 2008-10-01  Mark Probst  <mark.probst@gmail.com>
8958
8959         * method-to-ir.c: When generic sharing is active, call
8960         non-interface virtual generic methods via the standard trampoline.
8961
8962         * mini-trampolines.c: Handle virtual generic shared methods.
8963
8964         * mini.h, mini-x86.c, mini-x86.h: New argument for
8965         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
8966         method thunks and which is the trampoline to call if the lookup
8967         fails.  Enable the virtual generic method thunk for x86.
8968
8969         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
8970         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
8971         argument but assert that it's NULL, because these archs don't yet
8972         implement the virtual generic method thunk.  Changes in the IMT
8973         thunk data structures.
8974
8975 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
8976
8977         * aot-compiler.c (emit_globals): Avoid invalid characters in
8978         the static linking symbol.
8979
8980         * objects.cs: Add a test for the range check optimization. Fix warnings.
8981
8982         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
8983         optimization from the current JIT.
8984
8985         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
8986         later in decompose_array_access_opts () to allow more optimizations.
8987
8988         * method-to-ir.c (mono_handle_soft_float): Rename this to 
8989         mono_decompose_soft_float () for consistency.
8990
8991         * mini-ops.h: Fix arguments of OP_STRLEN.
8992
8993         * method-to-ir.c (save_cast_details): Extract the cast details saving code
8994         into a separate function.
8995         (reset_cast_details): Ditto.
8996         (handle_unbox): Save cast details. Fixes #431254.
8997
8998         * method-to-ir.c: Remove some obsolete FIXMEs.
8999
9000 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9001
9002         * ir-emit.h (alloc_dreg): Write a warning before crashing.
9003
9004 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9005
9006         * mini-codegen.c: More work on macros to make them
9007         ready for multiple regbanks.
9008
9009 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9010
9011         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
9012
9013         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
9014
9015 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9016
9017         * mini-codegen.c (mono_spillvar_offset): Proper support for
9018         multiple regbanks.
9019
9020 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
9021
9022         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
9023         the stack overflow changes.
9024
9025 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9026
9027         * mini-codegen.c: Make all bank macros depend on reg_bank.
9028
9029         * mini-codegen.c (mono_local_regalloc): Make free mask
9030         initialization regbank aware.
9031
9032 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9033
9034         * mini-codegen.c (mono_local_regalloc): Extract callee
9035         mask selection to a function and make it regbank aware.
9036
9037 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9038
9039         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
9040         code to deal with many regbanks.
9041
9042 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
9043
9044         * mini-codegen.c: More fp->regbank changes.
9045
9046 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
9047
9048         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
9049         of a hardcoded constant.
9050
9051 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
9052
9053         * method-to-ir.c (type_from_stack_type): Fix typo.
9054
9055 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
9056
9057         * mini-ia64.c (emit_move_return_value): Convert float return values to
9058         double.
9059
9060         * objects.cs: Add a new test.
9061         
9062         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
9063         VARARG methods to fix an assert later.
9064
9065         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
9066         end so it at least compiles.
9067
9068 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
9069
9070         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
9071
9072 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
9073
9074         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
9075         optimization to a new function (emit_optimized_ldloca_ir) and enable
9076         it for both ldloca and ldloca_s.
9077
9078 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
9079
9080         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
9081         gshared CASTCLASS code.
9082
9083         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
9084         amd64, where the libc stack unwinder encounters stack frames referring to
9085         native code in unmapped memory.
9086
9087         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
9088         sharing.
9089
9090         * generics.cs: Add new test.
9091
9092 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
9093
9094         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
9095         add a check that one of the ARM_FPU_ constants is defined.
9096
9097         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
9098         
9099         * mini-exceptions.c: Fix build on non-altstack platforms.
9100
9101         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
9102         sharing of vtypes.
9103
9104         * ir-emit.h: Add a comment to NEW_PCONST.
9105
9106         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
9107
9108         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
9109
9110         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
9111         after the changes to MonoJitDomainInfo.
9112
9113 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9114
9115         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
9116
9117 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9118
9119         * mini-ppc.c: Compiler warning fixes.
9120
9121 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9122
9123         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
9124         for pinvokes.
9125
9126 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9127
9128         * exceptions-ppc.c, mini-ppc.h: Compile
9129         mono_arch_handle_altstack_exception() on Darwin, too.
9130
9131 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9132
9133         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
9134         work on archs which don't have generic sharing implemented, only
9135         without the vtable_arg.
9136
9137 2008-09-26  Mark Probst  <mark.probst@gmail.com>
9138
9139         * mini.c: Added comment explaining why delegate ctor icall
9140         wrappers are compiled.
9141
9142 2008-09-26  Mark Probst  <mark.probst@gmail.com>
9143
9144         * mini.c: Don't produce trampolines to delegate ctor icall
9145         wrappers but compile them upfront.
9146
9147 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
9148
9149         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
9150         runtime-set function when going back to managed code. Currently this
9151         is used to set back the protection on the soft ovf pages and/or to
9152         throw the stack overflow exception that happened in unmanaged code.
9153
9154 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
9155
9156         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
9157         runtime-set function when going back to managed code. Currently this
9158         is used to set back the protection on the soft ovf pages and/or to
9159         throw the stack overflow exception that happened in unmanaged code.
9160
9161 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
9162
9163         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
9164         the support code for restoring stack protection after stack overflows
9165         that happen in unmanaged code. Don't set the exec permission on the
9166         soft overflow area.
9167
9168 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
9169
9170         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
9171         delegate->method_ptr is set. Fixes #428054.
9172
9173 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
9174
9175         * tests.cs: Rename to ratests.cs.
9176
9177         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
9178         emit_get_rgctx_... functions.
9179
9180 2008-09-25  Mark Probst  <mark.probst@gmail.com>
9181
9182         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
9183
9184 2008-09-25  Mark Probst  <mark.probst@gmail.com>
9185
9186         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
9187         before asserting that method is sharable.
9188
9189 2008-09-25  Mark Probst  <mark.probst@gmail.com>
9190
9191         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
9192         whether method needs a static RGCTX wrapper used instead of
9193         complex conditions.
9194
9195         * generic-sharing.c, mini.h: A few functions moved to
9196         metadata/generic-sharing.c.
9197
9198 2008-09-25  Mark Probst  <mark.probst@gmail.com>
9199
9200         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
9201         Generic code sharing for value types, which essentially means
9202         treating value type methods like static methods.  The RGCTX is
9203         passed in the same way.
9204
9205 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
9206
9207         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
9208         opcode when creating multi-dimensional arrays of open types.
9209
9210         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
9211         open generic types.
9212
9213         * generics.cs: Add a test.
9214
9215         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
9216
9217 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
9218
9219         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
9220
9221         * mini.c (mini_method_compile): Set it when running under the debugger. 
9222
9223         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
9224         vreg optimization if the flag is set.
9225
9226         * driver.c (mono_main): Add --attach= option to pass options to
9227         the attach agent.
9228
9229         * mini.c (sigquit_signal_handler): Start the attach agent.
9230
9231         * ssapre.c: Disable this to save space since it is not yet ported to
9232         linear IR.
9233
9234         * regalloc2.c: Disable this to save space.
9235
9236         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
9237
9238 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
9239
9240         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
9241         the -v option useful again.
9242
9243 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
9244
9245         * mini-amd64.c (mono_arch_output_basic_block): Add support for
9246         --break-at-bb.
9247
9248         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
9249         arrays of arrays. Fixes #428406.
9250
9251         * method-to-ir.c (mini_emit_castclass): Ditto.
9252
9253         * objects.cs: Add new test.
9254         
9255 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
9256
9257         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
9258         was wrong at it choked against target_type_is_incompatible for byref types.
9259
9260 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
9261
9262         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
9263         places.
9264
9265 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
9266
9267         * mini-exceptions.c: update a few more exceptions-related counters.
9268
9269 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
9270
9271         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
9272         new functions to allocate from persistent mempools.
9273
9274 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
9275
9276         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
9277         multiple register banks in the future.
9278
9279         * mini-codegen.c (mono_local_regalloc): Fix a warning.
9280
9281 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
9282
9283         * mini.c (type_to_eval_stack_type): Remove duplicated function.
9284
9285         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
9286
9287         * mini.h: Export type_to_eval_stack_type.
9288
9289         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
9290         is only ins->klass of byref types.
9291
9292 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
9293
9294         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
9295         (mini_emit_memcpy2): Ditto.
9296
9297         * mini-amd64.c: Fix a warning.
9298
9299 2008-09-21  Mark Probst  <mark.probst@gmail.com>
9300
9301         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
9302         linking.
9303
9304 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
9305
9306         * method-to-ir.c: Extract stloc micro-optimization to a
9307         function and apply it to all cases.
9308
9309 2008-09-19  Mark Probst  <mark.probst@gmail.com>
9310
9311         * method-to-ir.c: Don't fail generic code sharing in cases we
9312         already support.
9313
9314 2008-09-18  Mark Probst  <mark.probst@gmail.com>
9315
9316         * mini-ppc.c: Handle structs in tailcalls on Darwin.
9317
9318 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
9319
9320         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
9321         implementation.
9322
9323 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
9324
9325         * trace.c: make tracing more useful and correct, with per-thread
9326         id and indent info.
9327
9328 2008-09-15  Mark Probst  <mark.probst@gmail.com>
9329
9330         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
9331         doing a method call and the argument is an R4.
9332
9333 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
9334
9335         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
9336         generic methods.
9337
9338 2008-09-13  Mark Probst  <mark.probst@gmail.com>
9339
9340         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
9341
9342 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
9343
9344         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
9345         (MONO_JUMP_TABLE_FROM_INS): Ditto.
9346
9347 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
9348
9349         * driver.c: Add a --agent argument (not supported yet) to load managed
9350         agent assemblies before loading the main assembly, similarly to how the
9351         Java VM handles agents.
9352
9353 2008-09-11  Mark Probst  <mark.probst@gmail.com>
9354
9355         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
9356         function to do stack layout of local variables.
9357
9358 2008-09-11  Mark Probst  <mark.probst@gmail.com>
9359
9360         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
9361         calculation.
9362
9363 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
9364
9365         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
9366         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
9367         JIT if DISABLE_JIT is defined.
9368
9369         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
9370         defined.
9371
9372 2008-09-10  Mark Probst  <mark.probst@gmail.com>
9373
9374         * iltests.il.in: Disable the fconv test on PPC (the result is
9375         undefined according to ECMA).
9376
9377 2008-09-10  Mark Probst  <mark.probst@gmail.com>
9378
9379         * iltests.il.in: Enable tail call tests for PPC.
9380
9381         * mini.h: Add variable for storing incoming valuetype argument
9382         addresses for tail calls.
9383
9384         * mini-ppc.c: Implement valuetype arguments and return values for
9385         tailcalls on Linux.
9386
9387 2008-09-09  Mark Probst  <mark.probst@gmail.com>
9388
9389         * mini-ppc.c: Partially implement tail calls (struct arguments and
9390         return values not supported).
9391
9392         * method-to-ir.c: Enable tail calls on PPC.
9393
9394 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
9395
9396         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
9397         runtime-invoke wrappers to work around the problem of them getting
9398         assigned to a random class.
9399
9400         * aot-runtime.c (mono_aot_get_method): Ditto.
9401         
9402 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
9403
9404         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
9405         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
9406
9407 2008-09-07  Mark Probst  <mark.probst@gmail.com>
9408
9409         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
9410         until they're implemented properly.
9411
9412         * exceptions-ppc.c: Use arch-independent exception-handling code
9413         instead of custom one.
9414
9415         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
9416         for Linear IR.
9417
9418         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
9419
9420         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
9421         applies when __powerpc__ is defined.
9422
9423 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
9424
9425         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
9426         methods to their code to avoid computing the full name of wrappers and
9427         doing a lookup in a string hash table.
9428
9429 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
9430
9431         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
9432         we identify bblocks before method_to_ir () is ran.
9433
9434         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
9435         Also avoid optimizing branches pointing to themselves.
9436
9437         * mini.c (mini_method_compile): Ditto. Fixes #422947.
9438
9439 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
9440
9441         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
9442
9443 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
9444
9445         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
9446         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
9447         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
9448         'buf'.
9449
9450         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
9451         jumped to the same entry in plt_jump_table.
9452
9453 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
9454
9455         * method-to-ir.c (initialize_array_data): Handle field with RVA from
9456         dynamic images.
9457
9458 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
9459
9460         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
9461         other assignment can be if converted. Saves 1.5% on corlib size and fixes
9462         #421807.
9463
9464 2008-08-29  Geoff Norton  <gnorton@novell.com>
9465
9466         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
9467         segment, and doesn't properly handle .space as .text.  Fixes
9468         AOT Mach/ARM
9469
9470 2008-08-29  Geoff Norton  <gnorton@novell.com>
9471
9472         * mini.c: Disable the mach exception handler when running on 
9473         ARM
9474
9475 2008-08-29  Geoff Norton  <gnorton@novell.com>
9476
9477         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
9478         globals on Darwin/ARM
9479
9480 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
9481
9482         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
9483         since too many things depend on it. Instead, call 
9484         mono_runtime_set_no_exec ().
9485         
9486         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
9487         the new JIT.
9488
9489         * aot-compiler.c: Add an 'asm-only' AOT option.
9490
9491         * mini.c: Avoid initializing the runtime when doing AOT compilation.
9492                 
9493         * aot-compiler.c (compile_method): Disable gshared support for now as it
9494         doesn't yet work.
9495
9496 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
9497
9498         * mini-amd64.h : Fix a compiler warning.
9499
9500         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
9501           Changed to use a callback function to retrieve the unwind info.
9502           This avoids problems observed when code blocks were removed by
9503           unloading an app domain.
9504
9505         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
9506           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
9507           to work properly.
9508
9509         Contributed under MIT/X11 license.
9510
9511 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
9512
9513         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
9514           case to keep the stack aligned to 8.
9515
9516         Contributed under MIT/X11 license.
9517
9518 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
9519
9520         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
9521         avoid repeated linear searches.
9522
9523 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
9524
9525         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
9526         methods it can't handle.
9527         
9528         * aot-compiler.c (add_method): Avoid adding a method twice.
9529         (add_wrappers): Add runtime invoke wrappers for all methods.
9530
9531         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
9532         function to create an aot-compatible version of this trampoline.
9533
9534         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
9535
9536 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
9537
9538         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
9539
9540         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
9541         with a generic sharing failure.
9542
9543         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
9544
9545         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
9546         CEE_RETHROW. Fixes #419634.
9547
9548         * mini.c (mono_method_to_ir): Ditto.
9549
9550         * exceptions.cs: Add a new test.
9551         
9552         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
9553         to mono_type_stack_size_internal () since some callers might not pass in
9554         an rgctx.
9555
9556         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
9557         instrument_prolog. Fixes #419878.
9558
9559         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
9560         doubles in soft float mode volatile.
9561
9562 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
9563
9564         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
9565
9566         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
9567         to handle soft float correctly.
9568
9569         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
9570         the fast path.
9571
9572         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
9573
9574         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
9575         to sp, since the generics catch code requires it.
9576
9577         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
9578         copying.
9579
9580         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
9581         mono_arch_emit_imt_argument ().
9582
9583         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
9584
9585         * mini-arm.c tramp-arm.c: Generic sharing updates.
9586
9587 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
9588
9589         * mini-arm.c: Fix the arm build.
9590
9591         * generic-sharing.c (mini_type_get_underlying_type): New helper function
9592         handling enums, generic instances and generic sharing.
9593         (mini_type_stack_size_full): Ditto.
9594
9595         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
9596         
9597         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
9598
9599         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
9600
9601         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
9602         trampolines.
9603
9604         * mini-arm.c: Various small generic sharing changes.
9605
9606         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
9607         this for x86.
9608         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
9609         custom code.
9610
9611         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
9612         helper function to return a generic class init trampoline.
9613
9614         * method-to-ir.c mini.c: Use it.
9615         
9616         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
9617         arch-specfic function to return a generic class init trampoline.
9618
9619         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
9620         the GENERIC_CLASS_INIT custom code.
9621
9622         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
9623         a fatal error, not a sharing failure.
9624
9625         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
9626         needed.
9627
9628         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
9629         trampoline argument from MONO_ARCH_VTABLE_REG.
9630
9631         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
9632         order of the arguments to the C trampoline: pass 'slot' as the trampoline
9633         argument, and pass the vtable in VTABLE_REG.
9634
9635         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
9636         order of the arguments to the C trampoline: pass 'slot' as the trampoline
9637         argument, and pass the vtable in VTABLE_REG.
9638         (mono_arch_create_trampoline_code_full): Remove some special casing for
9639         the rgctx fetch trampoline.
9640
9641         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
9642         Fixes #419273.
9643
9644         * iltests.il: Add a test for it.
9645
9646 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
9647
9648         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
9649
9650         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
9651         no longer needed.
9652
9653         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
9654         use mono_jit_info_table_find () to avoid recursion.
9655         (mono_delegate_trampoline): Add a sync wrapper here.
9656
9657         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
9658         here.
9659
9660         * mini.c (mono_method_to_ir): Ditto.
9661         
9662         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
9663         add_sync_wrapper argument. Don't add a sync wrapper here.
9664         (mono_create_jump_trampoline): Don't add a sync wrapper here.
9665
9666         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
9667         
9668 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
9669
9670         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
9671           of nonvolatile registers back from MonoContext to CONTEXT.
9672
9673         Contributed under MIT/X11 license.
9674
9675 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
9676
9677         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
9678           arguments on Winx64 there are only 4 argument registers.  For this
9679           logic to work the last argument must be pulled from the stack.  
9680
9681         Contributed under MIT/X11 license.
9682
9683 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
9684
9685         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
9686
9687         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
9688         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
9689         encode/decode_method_ref ().
9690
9691         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
9692
9693         * aot-runtime.c (decode_patch): Ditto.  
9694
9695         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
9696         MONO_PATCH_INFO_METHOD.
9697
9698         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
9699         MonoGenericJitInfo.
9700
9701         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
9702         MonoGenericJitInfo.
9703
9704         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
9705
9706         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
9707         one from the caller.
9708
9709         * aot-runtime.c (decode_generic_inst): New function to decode and
9710         return a interned generic inst.
9711         (decode_klass_ref): Use it.
9712         (decode_method_ref): Ditto.
9713
9714         * aot-compiler.c (emit_exception_debug_info): Save 
9715         jinfo->has_generic_jit_info too.
9716
9717 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
9718
9719         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
9720
9721         * iltests.il.in: Add a test for fconv_to_i.
9722
9723         * liveness.c: Disable the liveness2 pass for now to save space.
9724
9725         * regalloc2.c: Include mempool-internals.h to fix warnings.
9726
9727         * aot-compiler.c (encode_method_ref): Encode the context of generic
9728         instance methods.
9729
9730         * aot-runtime.c (decode_method_ref): Inflate generic methods using
9731         the context saved in the aot file.
9732
9733         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
9734
9735         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
9736
9737         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
9738         volatile so they won't be optimized away.
9739
9740 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
9741
9742         * ssa.c:
9743         * ssa2.c:
9744         * mini.c:
9745         * regalloc2.c:
9746         * dominators.c: Remove duplicated functions that now are in
9747         mempool-internals.h.
9748
9749 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
9750
9751         * aot-compiler.c: Fix warnings.
9752
9753         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
9754
9755         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
9756
9757         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
9758         as the patch type.
9759
9760         * mini.c (mono_resolve_patch_target): Ditto.
9761         
9762         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
9763         (encode_klass_ref): Add support for encoding VARs/MVARs.
9764
9765         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
9766
9767         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
9768         the handling of the got entries into a separate 'decode_got_entry' function.
9769         Add support for RGCTX_FETCH.
9770
9771         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
9772         clobbered by the trampoline code.
9773
9774         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
9775         not clobbered by the indirect calling code.
9776
9777 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
9778
9779         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
9780         to fix the build.
9781
9782 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
9783
9784         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
9785         signature using the compilation mempool otherwise we would leak it.
9786
9787 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
9788
9789         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
9790         mono_emit_abs_call ().
9791
9792         * patch-info.h: Add GENERIC_CLASS_INIT.
9793
9794         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
9795
9796         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
9797         as their target as a near call.
9798
9799         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
9800         ABS handling code.
9801         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
9802
9803         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
9804         call to a runtime function described by a patch.
9805
9806         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
9807         mono_emit_abs_call, this has the advantage that the ABS handling code in
9808         mono_codegen () can handle them both, and can handle other stuff in the
9809         future without additional code.
9810
9811         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
9812         entry.
9813         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
9814         abs addresses.
9815
9816         * mini.h: Add missing bblock related prototypes.
9817
9818         * mini.h (MonoCompile): Remove unused reverse_inst_list and
9819         reverse_inst_list_len fields.
9820
9821         * mini.c: Refactor this file a bit by moving branch optimizations to 
9822         branch-opts.c.
9823
9824         * method-to-ir.c: Merge generic sharing changes missed earlier.
9825
9826         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
9827
9828         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
9829         shared patches. Process METHODCONST as a shared patch.
9830
9831         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
9832         as it crashes on the 2.0 mscorlib.
9833
9834         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
9835         to cause crashes.
9836         
9837         * aot-compiler.c: Use is_plt_patch () in a few additional places.
9838         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
9839         by IMT.
9840
9841         * aot-compiler.c: Reorganize the got handling code to be a bit more
9842         understandable.
9843
9844 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
9845
9846         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
9847         mono_patch_info_equals/hash, and use it to massively simplify
9848         get_plt_index ().
9849
9850         * mini.c (mono_patch_info_hash): Simplify this and add support for
9851         more patch types.
9852
9853         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
9854
9855         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
9856         handling code, since an offset is not enough to identify a trampoline.
9857
9858         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
9859
9860 2008-08-17  Mark Probst  <mark.probst@gmail.com>
9861
9862         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
9863
9864         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
9865
9866         * mini-ops.h: Argument and result types for OVF_CARRY ops.
9867
9868         * decompose.c: PPC decompositions for various ops.
9869
9870         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
9871
9872 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
9873
9874         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
9875         call the generic trampoline code using a call, instead of a jump, to
9876         remove some special casing from the generic trampoline code.
9877
9878         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
9879         (mono_codegen): Ditto.
9880
9881         * aot-compiler.c aot-runtime.c: Ditto.
9882
9883         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
9884
9885         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
9886         helper function to find the offset corresponding to a lazy fetch trampoline.
9887
9888         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
9889         when doing generic sharing.
9890
9891         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
9892         places.
9893         
9894         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
9895         mini-trampolines.c to be with the other trampoline creation functions.
9896
9897         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
9898         as it is equal to method->signature in most cases, add a 
9899         mono_emit_method_call_full variant which takes a signature and an imt
9900         argument as well.
9901
9902 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
9903
9904         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
9905         to this function, since it could be computed easily from the method 
9906         argument.
9907         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
9908         more.
9909
9910         * method-to-ir.c mini.c: Remove references to 
9911         compile_generic_method_wo_context.
9912
9913         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
9914         generic method calls.
9915         
9916         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
9917         dimensional non-szarrays.
9918
9919         * mini.c (mini_init): Register mono_array_new_1.
9920
9921         * jit-icalls.c (mono_array_new_1): New jit icall.
9922
9923         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
9924         pointing to the method.
9925
9926         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
9927         method addresses belonging to METHOD_JUMP patches in the 
9928         jump_target_got_slot_hash.
9929         (mono_aot_load_method): Ditto.
9930
9931         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
9932         METHOD_JUMP patches.
9933
9934         * mini.c (mini_create_jit_domain_info): New helper function which 
9935         initializes/frees domain->runtime_info.
9936         (mini_free_jit_domain_info): Ditto.
9937         (mini_init): Install the domain hook functions with the runtime.
9938
9939         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
9940         information maintained by the JIT.
9941
9942         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
9943         insertion into jump_table_hash into mono_codegen (), also implement proper
9944         locking.
9945
9946         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
9947         tail calls, it is already done by the aot code.
9948         
9949         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
9950         mechanism on amd64.
9951
9952         * iltests.il.in: Make the jmp test a bit more complex.
9953
9954         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
9955         generic instances which doesn't have a token.
9956
9957         * aot-runtime.c (decode_method_ref): Ditto.
9958         
9959         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
9960         can handle this case now.
9961         (handle_box): Ditto.
9962
9963 2008-08-15  Geoff Norton  <gnorton@novell.com>
9964
9965         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
9966         debugging check.
9967
9968 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
9969
9970         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
9971         calling generic methods.
9972
9973         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
9974
9975         * aot-runtime.c (decode_patch_info): Ditto.
9976
9977         * mini.c (mono_resolve_patch_target): Ditto.
9978         
9979         * patch-info.h: Add METHOD_RGCTX.
9980
9981         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
9982
9983 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
9984
9985         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
9986         arguments in registers.
9987
9988         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
9989         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
9990
9991         * mini.c (mini_method_compile): Abort aot compilation for generic
9992         methods if generic sharing is disabled.
9993         
9994         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
9995         an mrgctx.
9996
9997         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
9998         requiring an mrgctx.
9999
10000         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
10001         store instructions when converting a vcall to a normal call.
10002
10003         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
10004         mono_arch_find_jit_info.
10005
10006 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
10007
10008         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
10009         avoid calling mono_method_full_name () for every method even if the
10010         env var is not set.
10011         (check_inline_caller_method_name_limit): Ditto.
10012
10013 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
10014
10015         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
10016         assemblies in one run.
10017
10018         * aot-compiler.c (mono_compile_assembly): Only print out a count of
10019         skipped methods if it is not 0.
10020
10021         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
10022
10023 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
10024
10025         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
10026           MONO_ARCH_HAVE_UNWIND_TABLE.
10027
10028         Contributed under MIT/X11 license.
10029
10030 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
10031
10032         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
10033           from default optimizaton list on Winx64.
10034
10035         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
10036
10037         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
10038           the LMF from the MonoJitTlsData structure.
10039
10040         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
10041
10042         Contributed under MIT/X11 license.
10043
10044 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
10045
10046         * mini.c (sigsegv_signal_handler): Fix the build.
10047
10048         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
10049         assembly->aot_module.
10050
10051         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
10052         hash table. This simplifies and speeds up a lot of code, and fixes support
10053         for .netmodules.
10054
10055         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
10056         with the runtime.
10057
10058         * mini-exceptions.c: Ditto.
10059         
10060         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
10061         'native_offset' argument, since these are computed in the 
10062         mono_find_jit_info () function.
10063
10064         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
10065         is used by exceptions-ppc.c.
10066
10067         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
10068         mono_arch_find_jit_info ().
10069         
10070         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
10071         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
10072         generic code in mini-exceptions.c.
10073
10074 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
10075
10076         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
10077
10078         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
10079         
10080         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
10081         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
10082         called while holding the loader lock. Fixes #415608.
10083         (mono_aot_get_method_from_token_inner): Ditto.
10084
10085 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
10086
10087         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
10088         to reduce differences between this and the generic implementation in
10089         mini-exceptions.c.
10090         (ves_icall_get_frame_info): Ditto.
10091
10092         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
10093
10094         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
10095         longer neccesarry.
10096
10097         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
10098         mono_arch_get_call_filter () and make it non-static, for consistency with the
10099         other architectures.
10100
10101 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
10102
10103         * mini.c:
10104         * local-propagation.c:
10105         * mini-x86.c: Correct the name of arch defines.
10106
10107 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
10108
10109         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
10110         NO_EMULATE_LONG_SHIFT_OPS define.
10111
10112 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
10113
10114         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
10115         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
10116
10117         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
10118         MACH fixes. Merged from the 2.0 branch.
10119
10120         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
10121
10122         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
10123         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
10124
10125         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
10126
10127         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
10128         mono_marshal_get_native_wrapper () signature changes.
10129
10130 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
10131
10132         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
10133         conversion bug under arm.
10134
10135 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
10136
10137         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
10138
10139         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
10140         with overflow checking.
10141
10142 2008-08-05  Marek Habersack  <mhabersack@novell.com>
10143
10144         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
10145         to the genmdesc.pl file
10146
10147 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
10148
10149         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
10150         arg_array in the soft-float versions of the LOAD/STORE macros.
10151
10152         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
10153         implementation.
10154
10155         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
10156
10157 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
10158
10159         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
10160         a float HFA. Fixes #413621.
10161
10162 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
10163
10164         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
10165         frame_size to args_size. Fixes build.
10166
10167 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
10168
10169         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
10170         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
10171
10172         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
10173         the stack are not unaligned. Fixes #413247.
10174         
10175 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
10176
10177         * mini.c: update jitted methods performance counters.
10178
10179 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
10180
10181         * mini-exceptions.c: increase the exceptions thrown performance
10182         counter in mono_handle_exception ().
10183
10184 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
10185
10186         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
10187         can work with netmodules.
10188
10189 2008-07-28  Geoff Norton  <gnorton@novell.com>
10190
10191         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
10192         regression tests.
10193
10194 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
10195
10196         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
10197         correct place.
10198
10199 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
10200
10201         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
10202           The float param registers and other param registers must be the 
10203           same index on Windows x64.
10204
10205         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
10206           ArgValuetypeAddrInIReg argument case.  Setting the argument
10207           op to OP_VTARG_ADDR (OP_REGOFFSET)).
10208
10209         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
10210           variable computed above as the copy length for arguments of storage
10211           type ArgValuetypeAddrInIReg.
10212
10213         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
10214           ArgValuetypeAddrInIReg argument case.  This case will rely on
10215           mono_arch_emit_outarg_vt to emit the correct code later in the process.
10216
10217         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
10218           a 32 byte stack allocation for all calls.  We will omit the adjustment for
10219           jump and tail call instructoins as they do not follow the typical call behavior.
10220
10221         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
10222           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
10223           local variable and pass the local variable by reference to the called method.
10224
10225         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
10226           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
10227           of a struct is passed in a register it must be saved with the other
10228           volatile argument on the stack.
10229
10230         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
10231           frame pointer the stack adjustment value must be saved to the unwind 
10232           info structure.
10233
10234         Contributed under MIT/X11 license.
10235
10236 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
10237
10238         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
10239         which got lost in the merge.
10240
10241 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
10242
10243         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
10244         build.
10245
10246         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
10247         
10248         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
10249         icalls, since they won't be patched.
10250
10251         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
10252         different code sequence when running under valgrind to prevent some valgrind
10253         errors.
10254
10255         * iltests.il.in: Add new regression test.
10256
10257         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
10258         end with a throw.
10259
10260         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
10261         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
10262
10263         * iltests.il.in: Add new test.
10264
10265         * aot-compiler.c: Fix some warnings.
10266
10267         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
10268         Fixes #412494.
10269
10270 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
10271
10272         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
10273         (mini_usage_jitdeveloper): Add a missing --wapi option.
10274
10275 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
10276
10277         * mini-codegen.c: Simplify the is_fp macros.
10278         (free_up_ireg): Remove, use free_up_reg instead.
10279         (free_up_reg): Fix the fp case.
10280
10281 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
10282
10283         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
10284         lowered earlier.
10285
10286         * exceptions-x86.c: Merge some changes which seemed to have got lost
10287         in the linear-ir merge.
10288
10289         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
10290
10291         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
10292         long vreg volatile even if the variable was already created.
10293
10294         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
10295         volatile variables.
10296
10297 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
10298
10299         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
10300
10301         * mini.c (mono_jit_compile_method_inner): Add support for 
10302         MONO_EXCEPTION_BAD_IMAGE.
10303
10304         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
10305         mini_method_get_context () returns NULL. Fixes #356531.
10306
10307         * mini.c (mono_method_to_ir): Ditto.
10308         
10309         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
10310         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
10311
10312 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
10313
10314         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
10315         in the LDFTN implementation.
10316
10317 2008-07-25  Mark Probst  <mark.probst@gmail.com>
10318
10319         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
10320         code, patch calls to icalls, too, even if they're not in the
10321         shared generic code hash.  Fixes #411962.
10322
10323 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
10324
10325         * cpu-x86.md: Increase the length of the fcall opcodes.
10326
10327         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
10328         calls returning floats.
10329
10330         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
10331         on NEWARR.
10332         
10333         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
10334         missed earlier.
10335
10336         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
10337         into the domain->method_code_hash.
10338
10339         * aot-compiler.c: Fix win32 build.
10340
10341         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
10342         
10343         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
10344         gshared NEWARR implementation.
10345
10346         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
10347
10348         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
10349         can be used outside of method_to_ir.
10350
10351         * mini.h (MonoCompile): Add arg_types field.
10352
10353         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
10354         
10355         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
10356         the values of the local arg_array and param_types array.
10357
10358 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
10359
10360         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
10361         got accesses might only get generated later when NEWOBJ is decomposed.
10362         
10363         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
10364         looking up the native code of the target method when a delegate is called
10365         for the first time.
10366
10367         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
10368         optimization.
10369
10370         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
10371
10372         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
10373         AOT work on platforms without a working dlsym implementation.
10374
10375         * mini.h: Bump AOT image format version.
10376         
10377 2008-07-24  Mark Probst  <mark.probst@gmail.com>
10378
10379         * mini-exceptions.c: Free a MonoType with
10380         mono_metadata_free_type() instead of g_free().
10381
10382         * aot-runtime.c: Free a MonoType.
10383
10384 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
10385
10386         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
10387         optimization.
10388
10389         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
10390         fp stack on x86.
10391
10392 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
10393         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
10394         profiler hook.
10395
10396 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
10397
10398         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
10399         NEWOBJ calls on valuetypes.
10400
10401         * iltests.il.in: Add new test.
10402
10403         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
10404
10405 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
10406
10407         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
10408         is no longer needed.
10409
10410         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
10411         non register sized integer arguments.
10412         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
10413         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
10414         emit_memcpy2 ().
10415
10416         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
10417         CEE_MONO_RETOBJ.
10418         
10419         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
10420         two a binop with different sized arguments is emitted.
10421
10422         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
10423         instruction in the ins==NULL case.
10424
10425 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
10426
10427         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
10428
10429         * mini-x86.c: Fix osx build.
10430
10431         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
10432         opcodes as well.
10433
10434         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
10435         instruction for non int sized variables.
10436
10437         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
10438         implementation.
10439
10440 2008-07-23  Robert Jordan  <robertj@gmx.net>
10441
10442         * method-to-ir.c: Fix MSVC build.
10443
10444 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
10445
10446         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
10447         a non int sized type, widen it to an int since newer versions of gcc seem to
10448         generate code which needs this.
10449
10450         * ssa2.c abcremoval2.c: Fix warnings.
10451
10452         * *: Merge the Linear IR branch.
10453
10454         The original branch is at trunk/branches/vargaz/mini-linear-il, and
10455         the ChangeLog file there describes all the changes done over the years. 
10456         Further documentation can be found at www.mono-project.com/Linear_IL.
10457
10458 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
10459
10460         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
10461           The float param registers and other param registers must be the 
10462           same index on Windows x64.
10463
10464         Contributed under MIT/X11 license.
10465
10466 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
10467
10468         * mini.c: Make the previous fix GC safe.
10469
10470 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
10471
10472         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
10473
10474 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
10475
10476         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
10477           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
10478           ArgValuetypeAddrInIReg instead.
10479
10480         Contributed under MIT/X11 license.
10481
10482 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
10483
10484         * mini-codegen.c (get_register_spilling): Fix a warning.
10485
10486 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
10487
10488         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
10489         for types which the initialization fails. Raises the provided exception
10490         at the right stop after cleanup.
10491
10492 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
10493
10494         * aot-compiler.c: Free most of the memory allocated during compilation.
10495
10496         * mini.c (mini_parse_debug_options): Fix a leak.
10497         
10498         * mini.c (mini_method_compile): Don't add the method to the jit info tables
10499         during aot compilation.
10500
10501 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
10502
10503         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
10504         it has too much register pressure.
10505
10506 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
10507
10508         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
10509
10510 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
10511
10512         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
10513         on x86.
10514
10515         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
10516         on amd64 similar to the way it is done on arm.
10517
10518         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
10519
10520         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
10521         consistency, normalize error messages, avoid loading aot-only modules in
10522         normal mode.
10523
10524         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
10525         for consistency.
10526
10527         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
10528
10529 2008-07-11  Martin Baulig  <martin@ximian.com>
10530
10531         * debug-debugger.h
10532         (MonoDebuggerInfo): Add `interruption_request'.
10533
10534 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
10535
10536         * aot-compiler.c (emit_plt): Remove some dead code.
10537
10538         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
10539
10540         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
10541         return the plt info offset belonging to a given plt entry.
10542
10543         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
10544         mono_aot_get_plt_info_offset.
10545         
10546         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
10547         similar to the amd64 code by makeing jumps through a separate jump table 
10548         instead of embedding the jump addresses into the code.
10549
10550 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
10551
10552         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
10553         method.
10554
10555 2008-07-10  Martin Baulig  <martin@ximian.com>
10556
10557         * mini.c (mini_method_compile): Disable generics sharing when
10558         running in the debugger.
10559
10560 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
10561
10562         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
10563
10564         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
10565         the local register allocator from running out of registers on x86 when 
10566         using aot.
10567
10568 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
10569
10570         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
10571         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
10572         C4146.
10573
10574         Contributed under MIT/X11 license.
10575
10576 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
10577
10578         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
10579         speed up the assembler.
10580
10581 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
10582
10583         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
10584         support.
10585
10586         * mini.c: Move the soft float handling macros a bit earlier, add 
10587         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
10588         place.
10589
10590         * mini.h: Add prototype for mono_arch_fixup_jinfo.
10591
10592         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
10593         read-only to help catch code allocation requests.
10594         
10595         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
10596         and turn it off when using --aot-only or when compiling with --aot=full.
10597
10598         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
10599         jump table for switches from the normal domain mempool, not the code
10600         manager.
10601
10602         * mini-trampolines.c (get_unbox_trampoline): New function to return an
10603         unbox trampoline which handles aot-only mode too.
10604
10605         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
10606         an AOTed unbox trampoline.
10607
10608         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
10609
10610 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
10611
10612         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
10613         ""
10614
10615         Contributed under MIT/X11 license.
10616
10617 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
10618
10619         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
10620           the unwind information for the method at the end of the allocated block.
10621           
10622         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
10623           MonoCompileArch to hold the unwind info for SEH on Winx64
10624         
10625         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
10626           frame pointer info for the method being compiled.
10627           
10628         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
10629           the call to mono_exception_from_token.
10630           
10631         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
10632           storing the method prolog information in a format that the Winx64 SEH can understand.  This
10633           information is stored a the end of the method block because it is all 32-bit offset based.
10634
10635         Contributed under MIT/X11 license.
10636
10637 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
10638
10639         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
10640
10641         * wapihandles.c: Fix warnings.
10642
10643         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
10644         mode.
10645
10646         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
10647         mono_jit_compile_method in aot-only mode since that calls the type 
10648         initializer.
10649         
10650         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
10651         get_delegate_invoke_impl in aot-only mode.
10652
10653         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
10654
10655 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
10656
10657         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
10658
10659         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
10660         is on by default.
10661
10662         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
10663
10664         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
10665         init trampoline from the AOT file as well.
10666
10667         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
10668         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
10669         code.
10670
10671         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
10672         mono_init.
10673
10674         * exceptions-amd64.c: Add _full variants for the remaining exception code
10675         creation functions as well, allow emission of relocatable code, remove
10676         caching since that is now done by the caller.
10677
10678         * mini-exceptions.c: Add _full variants for the remaining exception code
10679         creation functions as well, add aot-only support.
10680
10681         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
10682         if we can determine a proper token for them.
10683         (add_wrappers): Add a few more wrappers.
10684         (emit_method_code): Remove some dead code.
10685         (emit_trampolines): Emit exception code too.
10686
10687         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
10688
10689         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
10690         mono_array_new_va which avoids varargs.
10691
10692         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
10693
10694         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
10695         mono_arch_create_specific_trampoline () in all places.
10696
10697         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
10698         a bit so it can be used for other things as well.
10699         
10700         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
10701         on demand as well.
10702
10703         * exceptions-amd64.c: Rename the caching from the exception code creation
10704         functions, it is done by the caller instead.
10705         
10706         * exceptions-amd64.c: Change the signature of the exception code creation 
10707         functions to allow the creation of relocatable code later.
10708
10709         * mini-exceptions.c: Add a set of functions to query the various 
10710         runtime-generated exception functions.
10711
10712         * mini.c mini-exceptions.c: Use the newly added functions instead of the
10713         mono_arch_.. () functions.
10714         
10715 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
10716
10717         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
10718
10719         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
10720
10721         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
10722         (mini_get_vtable_trampoline): Ditto.
10723
10724         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
10725         code in the AOT case by returning the code size and a list of relocations to
10726         the caller.
10727
10728         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
10729
10730 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
10731
10732         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
10733           clean the stack.
10734
10735         Contributed under MIT/X11 license.
10736
10737 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
10738
10739         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
10740         so the buffer size can be computed correctly. Fixes #404735.
10741
10742         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
10743         normally as cfg->debug_info is already freed.
10744
10745 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
10746
10747         * mini-amd64.c: For calls returning vtypes in registers, don't store
10748         the return address on the stack, instead allocate a separate local for
10749         it. Fixes #404729.
10750
10751 2008-07-05  Mark Probst  <mark.probst@gmail.com>
10752
10753         * mini-trampolines.c, mini.h: Add an argument to
10754         mono_create_jit_trampoline_in_domain() for turning off the adding
10755         of the sync wrapper.
10756
10757         * mini.c: Use the JIT trampoline without sync instead of
10758         ldftn_nosync in static RGCTX invoke wrappers so that the call can
10759         be patched.
10760
10761 2008-07-04  Mark Probst  <mark.probst@gmail.com>
10762
10763         * driver.c: Turn on GSHARED optimization by default.
10764
10765 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
10766
10767         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
10768         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
10769
10770         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
10771         create a variant of the generic trampoline code callable from AOTed trampolines.
10772
10773         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
10774         trampoline code callable from AOTed trampolines.
10775
10776         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
10777
10778 2008-07-04  Mark Probst  <mark.probst@gmail.com>
10779
10780         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
10781         pass-through manner.
10782
10783         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
10784         and don't fail sharing for them anymore.
10785
10786         * mini-exceptions.c: Handle exceptions in shared generic methods.
10787
10788         * generic-sharing.c: When checking the context of a generic
10789         method, also check its class's context.  Don't treat wrappers as
10790         sharable.
10791
10792         * mini-trampolines.c: Some code factored out to
10793         metadata/generic-sharing.c.  Handle the MRGCTX case.
10794
10795         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
10796         we must deal with the method being of another instantiation of the
10797         class.  Add static rgctx invoke wrappers to generic methods.
10798
10799 2008-07-04  Mark Probst  <mark.probst@gmail.com>
10800
10801         * mini.c: Provide all jit infos of generic shared methods with a
10802         generic jit info.
10803
10804         * mini-exceptions.c: Handle the new situation that a generic info
10805         might be available, but not info about the this/vtable/mrgctx
10806         variable.
10807
10808 2008-07-03  Mark Probst  <mark.probst@gmail.com>
10809
10810         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
10811         generic methods.
10812
10813 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
10814
10815         * dominators.c (check_dominance_frontier): Fix a warning.
10816
10817         * mini.h: Add some missing prototypes.
10818
10819         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
10820
10821         * driver.c (mono_jit_init_version): Correct the comments since the first
10822         argument should be the name of the root domain, not a filename.
10823
10824         * aot-runtime.c (make_writable): Error out if this is called while running
10825         with --aot-only.
10826         (load_aot_module): Ditto.
10827
10828         * aot-compiler.c: Really fix the computation of method indexes.
10829
10830         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
10831         optimizations as this is no longer called frequently.
10832
10833         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
10834         method and the invoke impl code and pass it to the delegate trampoline instead of
10835         just the delegate class.
10836
10837 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
10838
10839         * aot-compiler.c: Fixup the computation of method indexes.
10840         (add_wrappers): Create the base methods of the runtime invoke wrappers using
10841         the method builder infrastructure.
10842
10843         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
10844         has no header.
10845
10846         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
10847         mode, load the method right away instead of creating a trampoline.
10848
10849         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
10850
10851         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
10852         some checks a bit.
10853
10854 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
10855
10856         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
10857         (mono_aot_load_method): Use method_index instead of method->token.
10858
10859         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
10860         can handle icalls etc. properly.
10861
10862         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
10863
10864         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
10865
10866         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
10867         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
10868         JIT_ICALL_ADDR patch type.
10869
10870         * patch-info.h: Add JIT_ICALL_ADDR patch type.
10871
10872         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
10873         request flag.
10874         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
10875
10876         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
10877
10878 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
10879
10880         * mini.c: Use domain->jit_code_hash_lock for controlling access to
10881         domain->jit_code_hash.
10882
10883 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
10884
10885         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
10886
10887 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
10888
10889         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
10890         get_this_arg_from_call, let it compute it when needed.
10891
10892         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
10893         gsctx from code only when needed.
10894
10895         * mini-trampolines.c (get_generic_context): Rename this to 
10896         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
10897         it can be called by the arch backends.
10898
10899         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
10900
10901 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
10902
10903         * driver.c (mono_main): Add experimental --aot-only command line option.
10904
10905         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
10906         set.
10907
10908 2008-06-26  Kornel Pal  <kornelpal@gmail.com>
10909
10910         * driver.c (DllMain): Remove mono_module_handle.
10911
10912         Contributed under MIT/X11 license.
10913
10914 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
10915
10916         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
10917         for emitting methods which are not in the source assembly. Detect and report
10918         failure of assembling+linking.
10919         
10920         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
10921
10922         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
10923
10924 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
10925
10926         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
10927
10928 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
10929
10930         * mini.h: Remove some obsolete prototypes.
10931
10932         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
10933
10934 2008-06-24  Mark Probst  <mark.probst@gmail.com>
10935
10936         * mini.c (get_object_generic_inst): Variable-sized arrays are not
10937         supported by Visual Studio, so use alloca().
10938
10939 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
10940
10941         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
10942         Fixes #402585.
10943
10944 2008-06-23  Mark Probst  <mark.probst@gmail.com>
10945
10946         * mini.c: Fail sharing of a generic method if it contains an open
10947         catch clause (because we don't pass MRGCTXs yet).
10948
10949 2008-06-23  Mark Probst  <mark.probst@gmail.com>
10950
10951         * mini.c: When compiling a method with generic sharing, insert the
10952         method instantiated with an all-Object generic context into the
10953         jit info table, instead of the context of the first instantiation
10954         of the method we happen to compile.
10955
10956 2008-06-18  Martin Baulig  <martin@ximian.com>
10957
10958         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
10959         `major_version' and `minor_version'.
10960
10961 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10962
10963         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
10964         mono_method_is_generic_sharable_impl() takes an additional
10965         argument specifying whether to treat type variables as reference
10966         types.
10967
10968 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10969
10970         * mini.h: Removed obsolete prototypes.
10971
10972 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10973
10974         * mini.c: Don't fail generic sharing for initobj and sizeof - we
10975         already handle them.
10976
10977 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10978
10979         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
10980         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
10981         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
10982         tramp-x86.c: Added a MonoGenericContext* argument to
10983         mono_arch_get_unbox_trampoline() so that it can call other
10984         functions which require it.
10985
10986 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10987
10988         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
10989         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
10990         mono_arch_get_this_arg_from_call() takes a
10991         MonoGenericSharingContext* as well.
10992
10993 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10994
10995         * mini.c: Factor out code for emitting unbox into emit_unbox() and
10996         implement generic sharing of unbox.
10997
10998 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10999
11000         * mini.c: Don't compute the vtable to determine whether a field is
11001         special static, because it might not work for open types.
11002
11003 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11004
11005         * mini.c: Removed the unused token_type and token_source arguments
11006         from get_runtime_generic_context_ptr().
11007
11008 2008-06-17  Marek Habersack  <mhabersack@novell.com>
11009
11010         * mini.c (ADD_BINOP): fix the build
11011
11012 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
11013
11014         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
11015         a widening op.
11016
11017 2008-06-16  Mark Probst  <mark.probst@gmail.com>
11018
11019         * mini.h: Removed class relations enum that's not used anymore.
11020
11021 2008-06-16  Mark Probst  <mark.probst@gmail.com>
11022
11023         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
11024
11025         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
11026         the lazy fetch trampoline access code.
11027
11028 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
11029
11030         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
11031
11032 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
11033
11034         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
11035
11036         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
11037
11038         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
11039
11040 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
11041
11042         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
11043         intrinsics.
11044
11045         * mini-ops.h: Add MIN/MAX_UN opcodes.
11046
11047         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
11048         intrinsics.
11049
11050         * basic-math.cs: Add more min/max tests.
11051
11052         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
11053
11054 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11055
11056         * mini.c: Small fix in the prologue of emit_castclass.
11057
11058 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
11059
11060         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
11061
11062         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
11063         do not work even for unsigned types. Fixes #400014.
11064
11065         * basic-math.cs: Add regression tests for unsigned Min/Max.
11066
11067 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11068
11069         * mini.c: Added additional context_used argument to several
11070         functions, which will be needed for sharing generic methods.  Use
11071         GET_RGCTX macro wherever appropriate.  Declare only one
11072         context_used in mono_method_to_ir().
11073
11074 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11075
11076         * mini.c, generic-sharing.c: Removed generic class relations.
11077
11078         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
11079         functions due to MRGCTX changes.
11080
11081 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11082
11083         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
11084         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
11085         with calculated IMT.
11086
11087         * mini.c: Generic sharing of calls via generic interfaces.
11088
11089         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
11090         generic method with non-constant MonoGenericContext*.  Instead,
11091         the context is taken out of the method itself.
11092
11093 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11094
11095         * mini.c: Generic sharing of ldvirtftn.
11096
11097 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11098
11099         * mini.c: Generic sharing of ldftn.
11100
11101 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11102
11103         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
11104
11105 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11106
11107         * mini.c: Generic sharing of the special case of ldtoken followed
11108         by a call to GetTypeFromHandle.
11109
11110 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11111
11112         * mini.c: Generic sharing of box for nullable types.
11113
11114 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
11115
11116         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
11117         are passed on the stack. Fixes #324807.
11118
11119 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
11120
11121         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
11122         for the ArgValuetypeAddrInIReg case.
11123
11124         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
11125         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
11126
11127         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
11128         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
11129         local variable and pass the local variable by reference to the called method.
11130           
11131         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
11132         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
11133
11134         Contributed under MIT/X11 license.
11135
11136 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
11137
11138         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
11139
11140         * debug-mini.c (mono_debug_print_vars): Release memory after printing
11141         everything.
11142
11143 2008-06-10  Martin Baulig  <martin@ximian.com>
11144
11145         * debug-mini.c
11146         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
11147
11148 2008-06-09  Kornel Pal  <kornelpal@gmail.com>
11149
11150         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
11151         possible error when no arguments are passed.
11152
11153         Contributed under MIT/X11 license.
11154
11155 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
11156
11157         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
11158         where the file name is NULL.
11159
11160 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
11161
11162         * mini.c: Fix s390 build.
11163
11164 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
11165
11166         * trace.c (mono_trace_parse_options): Fix warnings.
11167
11168         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
11169
11170 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
11171
11172         * mini.c (remove_block_if_useless): Avoid printing the method name.
11173         
11174         * mini.c: Remove needless setting of ins->cil_code which is now done by 
11175         MONO_INST_NEW.
11176
11177         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
11178         LMF. Not yet used.
11179
11180         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
11181         translated code after it has been patched.
11182
11183 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
11184
11185         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
11186         avoid problems during code patching on SMP systems.
11187         (emit_call): Avoid adding a patch info which is already added by 
11188         emit_call_body.
11189         (mono_arch_emit_exceptions): Ditto.
11190
11191 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
11192
11193         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
11194         MONO_TYPE_ISSTRUCT already checks for it.
11195
11196 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
11197
11198         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
11199           structs with floats on Winx64 the float registers are not used.  
11200           The integer registers are always used..
11201         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
11202           only one register will be used and only if the size of the struct 
11203           is 1,2,4, or 8 bytes.
11204
11205         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
11206           to work for Winx64.
11207
11208         Contributed under MIT/X11 license.
11209
11210 2008-06-05  Martin Baulig  <martin@ximian.com>
11211
11212         * debug-debugger.c (debugger_lookup_class): Also call
11213         mono_class_setup_methods() here; we're only called from RTI.
11214
11215 2008-06-05  Andreas Farber  <andreas.faerber@web.de>
11216
11217         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
11218         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
11219         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
11220         Post-process object files and add dtrace-generated object, if necessary.
11221
11222         Contributed under MIT/X11 license.
11223
11224 2008-06-04  Mark Probst  <mark.probst@gmail.com>
11225
11226         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
11227         element class.
11228
11229         * mini.c: Generic sharing for unbox.any and castclass.
11230
11231 2008-06-04  Mark Probst  <mark.probst@gmail.com>
11232
11233         * mini.c: Ignore tailcall prefix in shared generic code and when
11234         doing calls which require a vtable/rgctx argument.
11235
11236 2008-06-04  Mark Probst  <mark.probst@gmail.com>
11237
11238         * mini.c: Don't free the JIT info.
11239
11240         * driver.c: Changes in the JIT info table testing code.
11241
11242 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
11243
11244         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
11245         interruption. Fix some warnings.
11246
11247         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
11248         interruption_checkpoint.
11249
11250 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
11251
11252         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
11253         from embedding applications.
11254
11255 2008-06-02  William Holmes  <billholmes54@gmail.com>
11256
11257         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
11258           reserving 32 bytes on the stack when making calls. 
11259
11260         Contributed under MIT/X11 license.
11261
11262 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
11263
11264         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
11265         the linear IL branch.
11266
11267         * driver.c: Print out more information for --version on arm.
11268
11269 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
11270
11271         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
11272         bb_exit instead, since out of line bblocks might not actually be emitted
11273         out-of-line.
11274         
11275         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
11276         maximum epilog size for out of line bblocks if tracing is enabled.
11277
11278         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
11279
11280 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
11281
11282         * arrays.cs: Regression tests for allocating arrays with negative sizes.
11283
11284 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
11285
11286         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
11287         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
11288         opcodes.
11289
11290 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
11291
11292         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
11293         the 'value' to store is a constant.
11294
11295         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
11296
11297         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
11298         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
11299
11300 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
11301
11302         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
11303         for accessing method->generic_container.
11304
11305 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
11306
11307         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
11308         
11309         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
11310
11311         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
11312
11313         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
11314         fails.
11315
11316 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
11317
11318         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
11319
11320         * mini.c: Handle the case when mono_class_vtable () fails.
11321
11322 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
11323         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
11324         the stat profiler.
11325
11326 2008-05-22  Mark Probst  <mark.probst@gmail.com>
11327
11328         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
11329         together with domain sharing.
11330
11331 2008-05-22  Mark Probst  <mark.probst@gmail.com>
11332
11333         * mini.c: Treat callvirts to final methods like non-virtual calls
11334         when doing generic sharing, i.e. look them up in the runtime
11335         generic context.
11336
11337 2008-05-22  Mark Probst  <mark.probst@gmail.com>
11338
11339         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
11340         with computed types (for generic sharing).
11341
11342         * mini.c: Generic sharing for mkrefany and refanyval.
11343
11344 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
11345
11346         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
11347         possible.
11348
11349         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
11350         the generic sharing code.
11351         
11352         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
11353         when needed.
11354
11355 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
11356
11357         * mini.h: Remove the declaration of mono_aot_init_vtable ().
11358
11359 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
11360
11361         * driver.c: updated copyright date
11362
11363 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
11364
11365         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
11366         needed.
11367
11368 2008-05-19  Martin Baulig  <martin@ximian.com>
11369
11370         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
11371         pointing to the new `_mono_debug_using_mono_debugger' variable.
11372
11373         * driver.c
11374         (mono_main): Check mono_debug_using_mono_debugger() rather than
11375         the `MONO_INSIDE_MDB' environment variable to check whether we're
11376         inside the debugger.
11377
11378 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
11379
11380         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
11381         argument.
11382
11383 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
11384
11385         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
11386
11387         * mini.c: Added mini_assembly_can_skip_verification. This
11388         function checks if the assembly requested to skip verification. 
11389         Fixes part of #387274.
11390
11391 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
11392
11393         * mini.c (mini_get_method): Disable the check for open generic classes when
11394         using generic sharing.
11395
11396         * generics.cs: Add a test for #387034.
11397
11398         * mini.c (mini_get_method): Check whenever the method class is an open generic
11399         type, and return NULL in that case, causing a verification error. Fixes
11400         #384123.
11401
11402 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
11403
11404         * driver.c (mono_main): Revert r102623. The right
11405         thing to do is to enable the verifier under verifiable
11406         unless a --security flag was passed.
11407
11408         We need this non-trivial behavior for --verify-all otherwise
11409         mcs-compileall won't be able to use it. As it needs everything to
11410         be verified under validil.
11411
11412 2008-05-06  Martin Baulig  <martin@ximian.com>
11413
11414         Fix #383749.
11415
11416         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
11417         (mono_debugger_thread_cleanup): Likewise.
11418         (mono_debugger_extended_notification): Likewise.
11419
11420 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
11421
11422         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
11423         against both inflated and non-inflated methods. We need to check against the
11424         generic definition for cases where the instantiated method is not visible.
11425         We need to check against the inflated types for cases where the instantiation
11426         changes any super type. This fixes #382986.
11427
11428         Note that this doesn't need to be applied to other parts of mono_method_to_ir
11429         that check for visibiliy as generic params only appears as the type subject
11430         of tokens on call opcodes. Field manipulation and ldftn must always
11431         target an exact type.
11432
11433 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
11434
11435         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
11436         if no related --security flag is passed.
11437
11438 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
11439
11440         * mini-arch.h: Prepare support for ppc64.
11441
11442         Contributed under MIT/X11 license.
11443
11444 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
11445
11446         * aot-runtime.c: Prepare support for ppc64.
11447
11448         Contributed under MIT/X11 license.
11449
11450 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
11451
11452         * mini-ops.h: Prepare support for ppc64.
11453
11454         Contributed under MIT/X11 license.
11455
11456 2008-05-04  Andreas Farber  <andreas.faerber@web.de>
11457
11458         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
11459
11460         Contributed under MIT/X11 license.
11461
11462 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
11463
11464         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
11465         assemblies, since aot_name is not a full path, causing us to load MS.NET 
11466         assemblies on windows.
11467
11468 ?2008-04-28  Kornel Pal  <kornelpal@gmail.com>
11469
11470         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
11471         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
11472         * main.c: Use UTF-8 encoded command line instead of Windows default code
11473         page on Windows to support Unicode.
11474         * driver.c (DllMain): New function for mixed-mode assembly support.
11475         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
11476         export __stdcall functions without decoration.
11477
11478         Contributed under MIT/X11 license.
11479
11480 2008-04-28  Mark Probst  <mark.probst@gmail.com>
11481
11482         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
11483         saving it very early.
11484
11485 2008-04-28  Mark Probst  <mark.probst@gmail.com>
11486
11487         * mini.h, mini.c: Lots of code for accessing the old RGCTX
11488         deleted.  The only way to access the new RGCTX is via the
11489         trampline.
11490
11491         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
11492         vtable instead of the RGCTX to static methods.
11493
11494         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
11495         accessing the new RGCTX.
11496
11497         * generic-sharing.c: There is no separation between self, type
11498         arguments and other types in the RGCTX anymore.
11499
11500 2008-04-25  Jonathan Chambers <joncham@gmail.com>
11501
11502         * mini-amd64.c (add_general): Remove previous stack adjustment.
11503         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
11504         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
11505         for 32 bytes of stack space reserved for all calls.
11506         
11507         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
11508         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
11509         adjustment.
11510         
11511         Code contributed under MIT/X11 license.
11512
11513 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
11514
11515         * mini.c (mini_method_verify): Only verify non-inflated methods, check
11516         against the root definition, peeling out method and type instantiations.
11517         Cache verify success results, code that fails verification is still
11518         checked multiple times.
11519
11520 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
11521
11522         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
11523
11524 2008-04-23  Jonathan Chambers <joncham@gmail.com>
11525
11526         * mini-amd64.c (add_general): Always increment stack on Win64.
11527         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
11528         on Win64.
11529         
11530         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
11531         stack based argument handling on Win64.
11532         
11533         Code contributed under MIT/X11 license.
11534
11535 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
11536
11537         * Makefile.am (version.h): Add support for git-svn.
11538
11539 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
11540
11541         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
11542         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
11543         avoiding allocations and libc functions which might deadlock.
11544         
11545         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
11546         'no-gdb-backtrace' option is set.
11547
11548         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
11549
11550         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
11551
11552 2008-04-21  Martin Baulig  <martin@ximian.com>
11553
11554         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
11555         and `get_lmf_addr'; `notification_address' is no longer a pointer.
11556
11557 2008-04-21  Martin Baulig  <martin@ximian.com>
11558
11559         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
11560         `thread_vtable', `event_handler_ptr' and `event_handler'.
11561
11562 2008-04-21  Martin Baulig  <martin@ximian.com>
11563
11564         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
11565         allows delayed initialization of the `executable_code_buffer' when
11566         attaching.
11567
11568 2008-04-21  Martin Baulig  <martin@ximian.com>
11569
11570         * mini.h (mono_debugger_create_notification_function): Removed.
11571         * tramp-*.c (mono_debugger_create_notification_function): Removed.
11572
11573         * mdb-debug-info64.s
11574         (MONO_DEBUGGER__notification_function): Added this in the .text section.
11575
11576         * mdb-debug-info32.s
11577         (MONO_DEBUGGER__notification_function): Added this in the .text section.
11578
11579         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
11580         currently only works on x86 and x86_64, so don't create it on ppc.
11581
11582 2008-04-21  Martin Baulig  <martin@ximian.com>
11583
11584         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
11585
11586         * mini.c
11587         (mini_method_compile): In the fp elimination check, check
11588         `debug_options.mdb_optimizations' in addition to
11589         mono_debug_using_mono_debugger().       
11590
11591         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
11592         disable some JIT optimizations which are only disabled when
11593         running inside the debugger.
11594         Added `--help-debug' option to describe the debugging options.
11595         (parse_debug_options): New static function to parse the `--debug'
11596         options, so we can easily add more stuff in future.
11597
11598 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
11599
11600         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
11601         the method has no body.
11602
11603 2008-04-19  Jonathan Chambers <joncham@gmail.com>
11604
11605         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
11606         assembly is not allowed in MSVC 64-bit compiler. 
11607         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
11608         as we get floating point exceptions everywhere.
11609         
11610         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
11611         correctly align arguments for call to throw_exception.
11612         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
11613         
11614         Code contributed under MIT/X11 license.
11615
11616 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
11617
11618         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
11619
11620 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
11621
11622         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
11623
11624         * mini-amd64.c (NEW_INS): Set cil_code.
11625
11626         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
11627         from mini-amd64.c so all debugger related logic is in one place.
11628
11629         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
11630         later won't have a random ip assigned to them.
11631
11632 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
11633
11634         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
11635         the arch specific function initializes code_size.
11636         (mono_create_delegate_trampoline): Ditto.
11637
11638         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
11639         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
11640         platforms.
11641
11642         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
11643         running under the debugger.
11644
11645         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
11646         debugger.
11647
11648         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
11649         debugger. Also move the disabling of optimizations here from driver.c.
11650         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
11651         debugger.
11652
11653         * mini.h (MonoCompile): Add a few new flags.
11654
11655 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
11656
11657         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
11658         so the cil_code field of created MonoInst's is properly set.
11659         (mini_select_instructions): Ditto.
11660
11661         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
11662         (MONO_INST_NEW_CALL): Ditto.
11663
11664         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
11665         in many places so the ins->cil_code field is properly initialized.
11666
11667         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
11668         place.
11669
11670 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
11671
11672         * mini.c (mini_method_compile): Print a different message when compiling a 
11673         shared method.
11674         
11675         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
11676         > 1.
11677
11678 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
11679
11680         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
11681         SSE2 instructions.
11682
11683         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
11684         
11685 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
11686
11687         * mini.c (handle_stack_args): Make this return void since its return value was
11688         never used. Also set cfg->unverifiable for invalid IL instead of calling
11689         G_BREAKPOINT ().
11690
11691 2008-04-10  Mark Probst  <mark.probst@gmail.com>
11692
11693         * mini.c: Make sure "this" is live in catch clauses with type
11694         variables in shared generic code.
11695
11696 2008-04-08  Mark Probst  <mark.probst@gmail.com>
11697
11698         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
11699         generic_class_is_reference_type() to ensure the proper behaviour
11700         when sharing generic code and the type in question is a type
11701         argument.
11702
11703 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
11704
11705         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
11706         race conditions when printing thread dumps. Fixes #377738.
11707
11708 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
11709         
11710         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
11711         shows up when both MonoInst arguments can cause aliasig.
11712         There is likely no way in the current JIT to trigger this problem, but
11713         it showed up in the development of generics sharing, when in a new
11714         opcode both args of an OP_GROUP can be aliases (addresses of a local).
11715         When the generics sharing code will be committed, its tests will be
11716         valid also for this bug.
11717
11718 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
11719
11720         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
11721         PATCH_INFO_METHOD.
11722
11723         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
11724         NULL.
11725
11726 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
11727
11728         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
11729         use a more detailed exception message for InvalidCastException.
11730
11731         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
11732
11733         * driver.c (mono_main): Add --debug=casts option to turn on better 
11734         InvalidCastException message details.
11735
11736         * mini.c (mini_get_debug_options): New helper function to return the address of
11737         the debug_options variable.
11738
11739         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
11740         the jit_tls TLS variable.
11741
11742         * mini.c (mono_jit_tls): New TLS variable.
11743
11744         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
11745         option is used.
11746
11747 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
11748
11749         * mini.h: Removed verifer related stuff. This code was moved to verify.c
11750
11751         * mini.c: Removed verifer related stuff, code moved to verify.c.
11752
11753         * driver.c: Using code from verify.c instead of mini.c.
11754
11755 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
11756
11757         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
11758         longer valid.
11759
11760 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
11761
11762         * mini.c (check_for_method_verify): Enabling verification of
11763         corlib if mono_verify_all is set. Bugs in the verifier preventing that
11764         have been fixed.
11765
11766 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
11767
11768         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
11769         caller saved registers as well.
11770         
11771         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
11772         saved registers as well.
11773
11774 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
11775
11776         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
11777
11778         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
11779         code.
11780
11781 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
11782
11783         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
11784         to get_call_info.
11785         (get_call_info): Take a gsctx argument instead of 'cfg'.
11786
11787 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
11788
11789         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
11790         mono_verify_all is set.
11791
11792         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
11793
11794         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
11795
11796 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
11797
11798         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
11799         an exception.
11800
11801         * driver.c mini.c mini.h: Add a --verify-all development option to test the
11802         verifier and the code generated by the compiler.
11803
11804 2008-03-25  Mark Probst  <mark.probst@gmail.com>
11805
11806         * mini.c: Generic sharing of the non-nullable case of the box
11807         instruction.
11808
11809 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
11810
11811         * inssel.brg: Fix the build.
11812
11813         * iltests.il.in: Add a test for lconv.ovf.u8.un.
11814
11815 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
11816
11817         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
11818         Array:Address. Fixes #372410.
11819
11820         * iltests.il.in: New tests for readonly prefix.
11821
11822 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
11823
11824         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
11825         mini-trampolines.c.
11826
11827         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
11828         mini-exceptions.c.
11829
11830         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
11831         
11832         * mini.c (mono_decompose_op_imm): New helper function.
11833
11834         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
11835         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
11836         return value.
11837
11838         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
11839         mono_arch_output_basic_block. Fix warnings.
11840
11841         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
11842         for now.
11843
11844 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
11845
11846         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
11847         since the extra frame is now detected automatically inside the loop.
11848
11849         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
11850         opts which are now in mono_peephole_ins ().
11851         
11852         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
11853
11854         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
11855         frames and skip duplicate managed-to-native frames. Fixes #367665.
11856
11857         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
11858         opts which are now in mono_peephole_ins ().
11859         (mono_arch_peephole_pass_2): Ditto.
11860
11861         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
11862
11863         * mini-codegen.c (mono_peephole_ins): New helper function containing the
11864         arch independent peephole optimizations.
11865
11866         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
11867         opts which are now in mono_peephole_ins ().
11868
11869         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
11870         
11871         * mini-s390.c (mono_arch_output_basic_block): Fix build.
11872
11873         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
11874         pattern.
11875
11876         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
11877         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
11878         opcode. 
11879
11880 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
11881
11882         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
11883         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
11884         return value.
11885
11886         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
11887         mono_arch_output_basic_block. Fix warnings.
11888
11889 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
11890
11891         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
11892         conv.ovf.u.un.
11893
11894 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
11895
11896         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
11897         conv.ovf.u.un.
11898
11899         * iltests.il: Add new tests.
11900
11901 2008-03-20  Kornel Pal  <kornelpal@gmail.com>
11902
11903         * mini.c: Removed Windows version macros.
11904
11905 2008-03-20  Mark Probst  <mark.probst@gmail.com>
11906
11907         * generic-sharing.c: Put reflection types in the extensible part
11908         of the runtime generic context.
11909
11910         * mini.c: Generic sharing of the GetTypeHandle special case of the
11911         ldtoken instruction.
11912
11913 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
11914
11915         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
11916
11917         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
11918         
11919         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
11920         consistency with the other version on the linear IR branch.
11921
11922         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
11923
11924         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
11925
11926         * iltests.il.in: Add new tests.
11927
11928 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
11929
11930         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
11931
11932         * iltests.il.in: Add new tests.
11933
11934 2008-03-19  Mark Probst  <mark.probst@gmail.com>
11935
11936         * mini.c: Two variables with the same name were declared in
11937         nesting contexts and one wasn't initialized.  Fixed.
11938
11939 2008-03-19  Mark Probst  <mark.probst@gmail.com>
11940
11941         * mini.c: Generic sharing of the initobj instruction.
11942
11943 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
11944
11945         * mini.c: make the test to optimize ldtoken from typeof() more
11946         precise.
11947
11948 2008-03-18  Mark Probst  <mark.probst@gmail.com>
11949
11950         * mini.c: Generic sharing of the initobj instruction for reference
11951         types.
11952
11953 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
11954
11955         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
11956         the mono_breakpoint_clean_code() code to perform bound checks.
11957
11958 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
11959
11960         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
11961         mono_arch_patch_callsite() to include the start of the managed method
11962         to be able to perform bound checks.
11963
11964 2008-03-17  Mark Probst  <mark.probst@gmail.com>
11965
11966         * mini.c: Generic sharing for the isinst instruction.
11967
11968 2008-03-17  Mark Probst  <mark.probst@gmail.com>
11969
11970         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
11971         inssel-long32-mips.brg: Added opcodes for doing indirect calls
11972         with the runtime generic context argument.
11973
11974         * mini.c: Share calls to several types of unsharable methods by
11975         putting the address of the method code in the runtime generic
11976         context and doing an indirect call.
11977
11978         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
11979         to switches.
11980
11981 2008-03-16  Mark Probst  <mark.probst@gmail.com>
11982
11983         * generic-sharing.c: Change due to a change in the runtime genric
11984         context API.
11985
11986 2008-03-15  Martin Baulig  <martin@ximian.com>
11987
11988         * tramp-x86.c
11989         (mono_arch_nullify_class_init_trampoline): Add call to
11990         mono_breakpoint_clean_code() to make things work when running
11991         inside the debugger.
11992
11993         * tramp-amd64.c
11994         (mono_arch_nullify_class_init_trampoline): Add call to
11995         mono_breakpoint_clean_code() to make things work when running
11996         inside the debugger.
11997
11998 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
11999
12000         * inssel-long.brg (reg): Fix 64 bit build.
12001
12002 2008-03-14  Mark Probst  <mark.probst@gmail.com>
12003
12004         * mini.c, mini.h: Share static generic code by passing it an
12005         implicit argument pointing to the runtime generic context.
12006
12007         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
12008         inssel-long32-mips.brg: New opcodes for calling shared static,
12009         which need to be passed the runtime generic context.
12010
12011         * mini-amd64.c, mini-x86.c: Save the runtime generic context
12012         argument on the stack in the prologue if needed.  New function for
12013         finding the runtime generic context argument from the registers
12014         saved by the trampoline.
12015
12016         * mini-amd64.h, mini-x86.h: Specify which register to use for the
12017         runtime generic context argument.
12018
12019         * tramp-amd64.c: Also restore the register used for the runtime
12020         generic context argument.
12021
12022         * mini-trampoline.c: Resolve shared static calls by consulting the
12023         runtime generic context via the new argument.
12024
12025         * generic-sharing.c: Add an argument to sharability-checking
12026         functions that specifies whether type variables should be treated
12027         as sharable type arguments.
12028
12029         * inssel-x86.brg: Removed a superfluous, buggy rule.
12030
12031         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
12032         to switches.
12033
12034 2008-03-14  Martin Baulig  <martin@ximian.com>
12035
12036         * debug-debugger.c (main_thread_handler): Call
12037         mono_runtime_run_main() without sending any notifications.
12038
12039         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
12040
12041 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
12042
12043         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
12044
12045 2008-03-14  Mark Probst  <mark.probst@gmail.com>
12046
12047         * tramp-x86.c: Fixed register restore offsets in the trampoline
12048         code for ECX and EDX.
12049
12050 2008-03-12  Geoff Norton  <gnorton@novell.com>
12051
12052         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
12053         different ucontext_t implementations.
12054         * exceptions-arm.c: Use the above defines to get exceptions working on 
12055         iPhone (based on a patch by Luke Howard lukeh@padl.com)
12056         * mini-arm.c: Implement iPhone icache support (based on a patch by
12057         Luke Howard lukeh@padl.com)
12058
12059 2008-03-12  Mark Probst  <mark.probst@gmail.com>
12060
12061         * mini.c: Enable generic sharing of calls to non-static
12062         non-interface non-generic non-value-type methods.
12063
12064         * mini-trampolines.c: Resolve calls from shared generic code.
12065
12066 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
12067
12068         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
12069
12070         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
12071
12072 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
12073
12074         * mini.c: some fixes for the AOT compiler.
12075
12076 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
12077
12078         * cpu-amd64.md: Add clob:1 to some float opcodes.
12079
12080 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
12081
12082         * mini.h: Added MiniVerifierMode enumeration.
12083
12084         * mini.c: Added mini_verifier_set_mode to control
12085         the usage of the new verifier.
12086
12087         * mini.c (mono_method): Integrated the new verifier.
12088
12089         * driver.c: Extended --security option with validil and
12090         verifiable options to activate the new verifier.
12091
12092 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
12093
12094         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
12095         optimization to ctors taking 0 or 2 arguments too.
12096
12097         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
12098         a bit.
12099
12100         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
12101
12102         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
12103
12104 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
12105
12106         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
12107         non-aot case as well.
12108
12109         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
12110
12111         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
12112         changes.
12113
12114         * aot-compiler.c (encode_patch): Ditto.
12115
12116         * mini.h (G_MININT32): Fix the definition of this.
12117
12118 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
12119
12120         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
12121
12122         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
12123
12124 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
12125
12126         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
12127         methods returning vtypes in registers.
12128         (mono_arch_allocate_vars): Ditto.
12129
12130         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
12131
12132         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
12133
12134         * generics.cs: Add a test from the linear IR branch.
12135
12136         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
12137
12138         * mini.c (inline_method): Cache failed inline attempts.
12139
12140 2008-03-04  Mark Probst  <mark.probst@gmail.com>
12141
12142         * mini.c: For shared methods of generic classes put the location
12143         of "this" into the MonoGenericJitInfo.
12144
12145         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
12146         register out of a MonoContext by register number.  Add the generic
12147         sharing context as an argument to mono_arch_find_this_argument().
12148
12149         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
12150         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
12151         for new arch function.
12152
12153         * mini-exception.c: Handle open exception clauses in shared
12154         generic code.
12155
12156         * mini-trampolines.c: Supply additional argument to
12157         mono_arch_find_this_argument().
12158
12159 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
12160
12161         * Makefile.am (regtests): Run the bench.exe tests last.
12162
12163 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
12164
12165         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
12166         a bit.
12167
12168 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
12169
12170         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
12171         with MS.
12172
12173         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
12174         
12175         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
12176
12177         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
12178         whose class has no cctor.
12179
12180         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
12181
12182 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
12183
12184         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
12185         unverified.
12186
12187 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
12188
12189         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
12190         to be in sync with the code on the linear IR branch.
12191
12192         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
12193
12194         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
12195
12196 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
12197
12198         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
12199
12200         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
12201
12202         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
12203
12204         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
12205
12206         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
12207         
12208         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
12209         body.
12210
12211 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
12212
12213         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
12214         OP_LOADR4_MEMBASE emission.
12215
12216         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
12217         (mono_spillvar_offset_float): Ditto.
12218
12219         * mini-mips.c (mono_arch_emit_prolog): Ditto.
12220
12221         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
12222         emission.
12223
12224         * basic-long.cs: Add regression tests for them.
12225
12226         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
12227         use.
12228         (mono_arch_allocate_vars): Fix representation of single-precision float
12229         argument.
12230         (mono_arch_output_basic_block): Ditto.
12231
12232         * inssel-mips.brg: Ditto, remove duplicate items.
12233
12234         * mini-mips.c (emit_load_volatile_arguments): New function to handle
12235         arguments of tail calls as on other platforms.
12236         (mono_arch_output_basic_block): Handle tail calls.
12237
12238         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
12239         register.
12240
12241         * objects.cs (test_5_pass_static_struct): Add test for it.
12242
12243         Contributed under MIT/X11 license.
12244
12245 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
12246
12247         * Makefile.am: Use gmcs for compiling the regression tests.
12248
12249         * *.2.cs *.2.il: Rename to *.cs and *.il.
12250
12251 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
12252
12253         * regalloc.h: Make the vassign array smaller.
12254
12255         * mini.c (mini_method_compile): Remove an unused field in cfg.
12256
12257         * mini-codegen.c: Add a bunch of micro optimizations.
12258
12259 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
12260
12261         * regalloc.h: Remove some unused fields.
12262
12263 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
12264
12265         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
12266
12267         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
12268
12269 2008-02-22  Mark Probst  <mark.probst@gmail.com>
12270
12271         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
12272
12273         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
12274         trampoline: Fetch an entry from the runtime generic context.  If
12275         it's NULL, jump to the actual trampoline to fill the runtime
12276         generic context.  Otherwise, return it.
12277
12278         * mini.c: Call the lazy fetch trampoline to get entries out of the
12279         runtime generic context.
12280
12281         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
12282         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
12283         tramp-sparc.c: Stubs for the lazy fetch trampoline.
12284
12285 2008-02-21  Mark Probst  <mark.probst@gmail.com>
12286
12287         * mini.c: Fetch data out of the extensible part of the runtime
12288         generic context instead of calling a helper function.
12289
12290         * generic-sharing.c: Some functions moved into
12291         metadata/generic-sharing.c.  Helper function for fetching other
12292         types now checks and asserts against extensible rgctx (just for
12293         debugging purposes - the helper function isn't called anymore
12294         unless for debugging).
12295
12296 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
12297
12298         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
12299         for tail calls up to the point that the tests in iltests.exe run. Also add a
12300         dummy CKFINITE implementation.
12301         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
12302         needed for trampoline LMF frames.
12303
12304         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
12305         trampoline LMF frames.
12306
12307 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
12308
12309         * mini.c (inline_method): clean any pending loader error when inlining fail.
12310         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
12311
12312 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
12313
12314         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
12315
12316         * aot-runtime.c (decode_patch_info): Ditto.
12317
12318         * mini.c (mono_resolve_patch_target): Ditto.
12319         
12320         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
12321         icall wrappers.
12322
12323         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
12324         
12325         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
12326         if it references an icall address.
12327
12328 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
12329
12330         * cpu-s390x.md: Remove some more unused opcodes.
12331         
12332         * cpu-s390x.md: Remove some unused opcodes.
12333
12334         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
12335         mono_op_imm_to_op ().
12336
12337         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
12338         instead of a switch statement.
12339         
12340         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
12341         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
12342
12343         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
12344         
12345         * mini-codegen.c: Remove unused mono_regstate2_... functions.
12346
12347         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
12348         -1.
12349
12350 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
12351
12352         * driver.c (mono_main): Improve error reporting when an assembly cannot be
12353         opened. Fixes #362607.
12354
12355         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
12356
12357         * iltests.il.in: Add a test for static methods in interfaces.
12358
12359 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
12360
12361         * genmdesc.c (build_table): Fix a crash on older glib versions.
12362
12363         * cpu-sparc.md: Remove some unused opcodes.
12364         
12365         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
12366         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
12367
12368         * cpu-amd64.md: Remove some unused opcodes.
12369
12370         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
12371         like the other opcodes.
12372
12373 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
12374
12375         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
12376
12377         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
12378
12379         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
12380         variables 'cfg' instead of 'm' for consistency.
12381
12382         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
12383
12384         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
12385         argument holding the vtype return address, to avoid the ambigious use of
12386         cfg->ret for this purpose.
12387
12388         * mini.c (NEW_RETLOADA): Use vret_addr if set.
12389
12390         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
12391         
12392         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
12393         new mono_print_ins () function which only takes one argument.
12394
12395 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
12396
12397         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
12398         macro arguments.
12399
12400 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
12401
12402         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
12403
12404         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
12405
12406         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
12407         opcodes and other small changes.
12408
12409         * mini-ops.h: Add some new opcodes from the linear IR branch.
12410
12411         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
12412
12413         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
12414         opcodes, use the REG_MEMBASE opcodes instead.
12415         
12416         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
12417         opcodes, use the REG_MEMBASE opcodes instead.
12418         
12419         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
12420         linear IR branch.
12421
12422         * mini.c (mono_op_imm_to_op): New helper function.
12423
12424         * mini-ops.h: Add some opcodes from linear IR branch.
12425
12426 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
12427
12428         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
12429         <tsv@solvo.ru>.
12430
12431 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
12432
12433         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
12434         OP_ICONV_TO_R4/R8.
12435
12436         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
12437
12438 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
12439
12440         * aot-compiler.c (emit_method_code): Add an assert.
12441
12442         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
12443         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
12444         methods.
12445
12446 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
12447
12448         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
12449         some load/store opcodes so they are consistent. 
12450         (mono_arch_emit_prolog): Simplify some code.
12451
12452         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
12453
12454         * objects.cs: Add tests for large argument offsets on ARM.
12455
12456         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
12457         stack offsets. Fixes #359651.
12458
12459         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
12460
12461         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
12462
12463         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
12464
12465         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
12466
12467         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
12468
12469         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
12470         rid of CEE_CONV_R_UN.
12471
12472         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
12473
12474 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
12475
12476         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
12477
12478         * mini.c (mono_normalize_opcodes): Add some more opcodes.
12479
12480         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
12481
12482         * cpu-amd64.md: Remove some unused opcodes.
12483
12484         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
12485
12486         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
12487
12488         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
12489         arch specific functions for its parts. Call the peephole pass after local
12490         regalloc so the prolog can compute a more accurate max_offset.
12491         
12492         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
12493         the corresponding OP_I/OP_L opcodes.
12494
12495         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
12496
12497         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
12498
12499 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
12500
12501         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
12502         as they are handled in mini.c.
12503
12504         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
12505         
12506         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
12507         case since it is handled in mini.c.
12508
12509         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
12510
12511         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
12512
12513         * *.c: Use the new opcodes in the IR and back end code.
12514
12515         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
12516
12517         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
12518
12519 2008-02-06  Mark Probst  <mark.probst@gmail.com>
12520
12521         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
12522         an assert because it has a race condition.
12523
12524 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
12525
12526         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
12527
12528         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
12529
12530         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
12531
12532         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
12533         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
12534
12535 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
12536
12537         * cpu-amd64.md (move): Correct the maximum size of move.
12538
12539 2008-02-05  Mark Probst  <mark.probst@gmail.com>
12540
12541         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
12542         the generic class init trampoline to return quickly if the class
12543         is already inited.
12544
12545 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
12546
12547         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
12548         issues where an 32 bit callsite cannot be patched by a 64 bit address.
12549
12550 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
12551
12552         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
12553         branch.
12554
12555 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
12556
12557         * objects.cs: Add some soft-float tests.
12558
12559         * mini.c: Fix a couple more soft-float issues.
12560
12561         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
12562
12563         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
12564         avoid a REX prefix.
12565
12566 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
12567
12568         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
12569         exception happens while compiling a virtual method.
12570
12571 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
12572
12573         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
12574         
12575         * mini-sparc.c: Fix build.
12576
12577         * mini-sparc.c (get_call_info): Add support for generic sharing.
12578
12579         * mini-exceptions.c: Add a FIXME.
12580
12581 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
12582
12583         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
12584         altstack handling code.
12585
12586         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
12587         
12588         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
12589
12590         * mini-s390.c: Add support for generic sharing.
12591
12592         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
12593         Fix CAS on s390.
12594         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
12595
12596         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
12597
12598         * mini-s390x.c: Add support for generic sharing.
12599         
12600         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
12601         Fix CAS on ia64.
12602         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
12603
12604         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
12605         can be used since it takes a 16 bit signed immediate.
12606
12607         * inssel-s390x.brg: Fix OP_SETRET.
12608
12609         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
12610
12611         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
12612
12613         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
12614
12615         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
12616
12617         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
12618         in one place.
12619
12620         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
12621         stuff.
12622
12623         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
12624         of the unused mono_arch_patch_delegate_trampoline stuff.
12625
12626 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
12627
12628         * basic-long.cs: Move the fp related tests to basic-float.cs.
12629
12630         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
12631
12632         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
12633
12634         * basic-calls.cs: Add a test for proper float argument passing.
12635
12636         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
12637         if the context corresponds to an exception received through a signal.
12638
12639         * exceptions.cs: Add a test for nullref handling at the start of a try
12640         clause.
12641
12642         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
12643
12644         * jit-icalls.c (mono_break): New JIT icall.
12645
12646         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
12647
12648         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
12649
12650 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
12651
12652         * cpu-*.md: Get rid of unused opcodes.
12653
12654         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
12655
12656         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
12657         by all platforms.
12658
12659         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
12660         define.
12661
12662         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
12663         the arch independent trampoline code in mini-trampolines.c.
12664
12665         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
12666
12667         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
12668
12669         * mini-s390.h: Remove an unused define.
12670         
12671         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
12672         the arch independent trampoline code in mini-trampolines.c.
12673
12674         * mini-arm.c (mono_arch_emit_prolog): Fix build.
12675
12676 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
12677
12678         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
12679
12680         * mini-s390.c (mono_arch_emit_prolog): Fix build.
12681
12682         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
12683
12684         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
12685
12686         * cpu-amd64.md: Use smaller sizes for int opcodes.
12687
12688         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
12689
12690         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
12691         objects.cs.
12692
12693         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
12694         debugging.
12695
12696         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
12697         instead of though a pointer to save an indirection when accessing elements of
12698         the array.
12699
12700         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
12701         some typos.
12702         (NOT_IMPLEMENTED): New helper macro.
12703         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
12704         of a bb.
12705
12706         * *.c: Use the new helper macro.
12707
12708 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
12709
12710         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
12711
12712 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
12713
12714         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
12715         stack slots.
12716
12717 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
12718
12719         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
12720         profiling is enabled.
12721         
12722         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
12723         the end.
12724         (mono_arch_emit_prolog): Add more first bblock optimizations.
12725
12726         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
12727         in order if possible.
12728         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
12729         bblock, since the arguments are still in their original registers.
12730
12731         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
12732
12733 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
12734
12735         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
12736         as well.
12737
12738         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
12739         offset 0.
12740
12741         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
12742
12743         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
12744         process async exceptions received while in unmanaged code.
12745
12746         * mini.c (mini_init): Install a callback with the runtime which will be called
12747         when a thread receives an async exception while in unmanaged code.
12748
12749         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
12750
12751         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
12752
12753 2008-01-16  Wade Berrier  <wberrier@novell.com>
12754
12755         * cpu-g4.md:
12756         * cpu-arm.md:
12757         * cpu-s390x.md:
12758         fix build
12759
12760 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
12761
12762         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
12763         compilation with sun cc.
12764
12765         * cpu-*.md: Fix the build.
12766
12767         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
12768
12769         * mini-amd64.h: Add some comments to the MonoLMF structure.
12770
12771         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
12772         
12773         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
12774         in the LMF structure if possible. This saves two instructions in the
12775         managed->native wrappers.
12776
12777         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
12778
12779 2008-01-16  Mark Probst  <mark.probst@gmail.com>
12780
12781         * generic-sharing.c: New type argument lookup code which uses the
12782         runtime generic context template.
12783
12784 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
12785
12786         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
12787
12788         * mini-arm.c (add_general): Fix arm eabi parameter passing.
12789         (mono_arch_output_basic_block): Fix localloc implementation.
12790
12791         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
12792
12793         * mini-ia64.c (peephole_pass): Fix ia64 build.
12794
12795         * mini-amd64.c (peephole_pass): Fix a warning.
12796         
12797         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
12798         at a constant offset from sp/fp.
12799
12800         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
12801         instead of obtaining it from *lmf in the managed method case.
12802
12803 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
12804
12805         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
12806
12807 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
12808
12809         * mini.h (MonoInstList): New type.
12810         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
12811         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
12812         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
12813         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
12814         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
12815         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
12816         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
12817         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
12818         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
12819         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
12820         MONO_INST_LIST_FOR_EACH_ENTRY,
12821         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
12822         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
12823         mono_inst_list_first, mono_inst_list_last,
12824         mono_inst_list_next, mono_inst_list_prev): New instruction
12825         list handling interfaces.
12826         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
12827         list head 'ins_list'.
12828         (MonoInst): Replace next pointer with list head 'node'.
12829         (MonoCallInst): Make 'out_args' a MonoInstList.
12830         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
12831         (MonoCompile): Delete reverse_inst_list and
12832         reverse_inst_list_len.
12833         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
12834         mono_arch_lowering_pass, mono_arch_local_regalloc,
12835         mono_arch_output_basic_block, mono_arch_emit_prolog):
12836         Convert to new instruction lists.
12837         (insert_after_ins): Delete.
12838         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
12839         instruction lists.
12840         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
12841         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
12842         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
12843         mono_emulate_opcode, mono_emit_load_got_addr,
12844         inline_method, mono_method_to_ir, mono_print_bb_code,
12845         print_dfn, decompose_pass, nullify_basic_block,
12846         replace_out_block_in_code, remove_block_if_useless,
12847         merge_basic_blocks, move_basic_block_to_end,
12848         try_unsigned_compare, optimize_branches, mono_print_code,
12849         mini_select_instructions, remove_critical_edges): Likewise.
12850         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
12851         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
12852         mono_arch_output_basic_block, mono_arch_emit_prolog):
12853         Likewise.
12854         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
12855         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
12856         mono_arch_output_basic_block): Likewise.
12857         (inst_list_prepend, insert_after_ins): Delete.
12858         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
12859         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
12860         instruction lists.
12861         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
12862         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
12863         mono_arch_emit_prolog): Likewise.
12864         * cfold.c (mono_constant_fold): Likewise.
12865         * liveness.c (visit_bb, mono_analyze_liveness,
12866         optimize_initlocals): Likewise.
12867         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
12868         * graph.c (mono_draw_code_cfg): Likewise.
12869         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
12870         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
12871         mono_ssa_cprop): Likewise.
12872         * abcremoval (get_relations_from_previous_bb, process_block):
12873         Likewise.
12874         * local-propagation (mono_cprop_invalidate_values,
12875         mono_local_cprop_bb): Likewise.
12876         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
12877         peephole_pass, mono_arch_output_basic_block,
12878         mono_arch_emit_prolog): Likewise.
12879         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
12880         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
12881         mono_arch_emit_prolog): Likewise.
12882         (insert_after_ins): Delete.
12883         * aliasing.c (print_code_with_aliasing_information,
12884         mono_build_aliasing_information, mono_aliasing_deadce):
12885         Convert to new instruction lists.
12886         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
12887         peephole_pass, NEW_INS, mono_arch_lowering_pass,
12888         mono_arch_local_regalloc, mono_arch_output_basic_block):
12889         Likewise.
12890         (insert_after_ins): Delete.
12891         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
12892         peephole_pass, mono_arch_output_basic_block): Convert to
12893         new instruction lists.
12894         * mini-codegen (InstList, inst_list_prepend,
12895         insert_after_ins): Delete.
12896         (insert_before_ins, get_register_force_spilling,
12897         get_register_spilling, free_up_ireg, free_up_reg,
12898         create_copy_ins, create_spilled_store, alloc_int_reg,
12899         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
12900         to new instruction lists.
12901         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
12902         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
12903         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
12904         (insert_after_ins): Delete.
12905         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
12906         mono_arch_local_regalloc, mono_arch_output_basic_block,
12907         mono_arch_call_opcode): Convert to new instruction lists.
12908         (insert_after_ins): Delete.
12909         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
12910         peephole_pass, mono_arch_output_basic_block,
12911         mono_arch_emit_prolog): Convert to new instruction lists.
12912
12913 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
12914
12915         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
12916
12917         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
12918         Fixes #353182.
12919
12920         * Makefile.am (version.h): Make this work with non-bash shells.
12921
12922 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
12923
12924         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
12925
12926 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
12927
12928         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
12929         the InitializeArray optimization.
12930
12931 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
12932
12933         * mini.c driver.c: Don't include os/gc_wrapper.h.
12934
12935 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
12936
12937         * mini.c (print_jit_stats): Print GC statistics if available.
12938
12939 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
12940
12941         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
12942
12943 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
12944
12945         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
12946
12947 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
12948
12949         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
12950         
12951         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
12952
12953         * driver.c (mono_main): Ditto.
12954
12955 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
12956
12957         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
12958
12959         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
12960         in the vtable can't be encoded.
12961         (compile_method): Ditto.
12962
12963 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
12964
12965         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
12966         defined.
12967
12968         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
12969         lmf->rbp.
12970
12971         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
12972         the top LMF entry belongs to the current method.
12973
12974         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
12975
12976 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
12977
12978         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
12979         
12980         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
12981
12982         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
12983
12984         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
12985
12986         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
12987
12988         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
12989         implementation.
12990
12991         * basic-float.cs: Add an ulong->double cast test.
12992
12993 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
12994
12995         * mini.c (mono_method_to_ir): Fix a warning.
12996
12997 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
12998
12999         * mini-ops.h: Add OP_SWITCH.
13000
13001         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
13002         CEE_SWITCH in back-end code, use OP_SWITCH instead.
13003
13004 2007-12-11  Geoff Norton  <gnorton@novell.com>
13005
13006         * mini-s390x.c: Minor change to the MAX() define to allow
13007         it to compile with other gcc versions.
13008
13009 2007-12-11  Geoff Norton  <gnorton@novell.com>
13010
13011         * cpu-s390x.md:
13012         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
13013
13014 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
13015
13016         exceptions-arm.c (mono_arch_get_restore_context): Restore
13017         the frame pointer.
13018
13019         exceptions-arm.c (throw_exception): Save the frame pointer.
13020         This is a partial fix for #323747. Only the client side is
13021         fixed.
13022
13023 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
13024
13025         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
13026         was using an unrelated variable to log the class which
13027         needed the cctor to be called. This was crashing on arm.
13028
13029 2007-12-09  Robert Jordan  <robertj@gmx.net>
13030
13031         * mini-x86.c (mono_arch_emit_epilog):
13032         Consider all kinds of 64-bit types. Fixes #323114.
13033
13034 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
13035
13036         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
13037
13038 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
13039
13040         * mini-amd64.c (peephole_pass): Add a missing instruction check.
13041
13042 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13043
13044         * mini.c: run type ctor before allocating an object, not only
13045         when running it's constructor method (fixes at least part of bug #342507).
13046
13047 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
13048         
13049         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
13050         
13051         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
13052         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
13053         function.
13054
13055         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
13056         mono_generic_class_init_trampoline () the same as it is done with the other
13057         trampolines.
13058
13059         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
13060         aot-runtime.c aot-compiler.c: Implement AOT support.    
13061
13062 2007-12-07  Mark Probst  <mark.probst@gmail.com>
13063
13064         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
13065         build for archs which don't have the vtable trampoline defined
13066         yet.
13067
13068 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
13069
13070         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
13071
13072         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
13073
13074         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
13075
13076         * tramp-<ARCH>.c: Use the new helper function.
13077
13078 2007-12-07  Mark Probst  <mark.probst@gmail.com>
13079
13080         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
13081         trampoline call, which takes a vtable argument.
13082
13083         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
13084         OP_TRAMPCALL_VTABLEs like other calls.
13085
13086         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
13087         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
13088         call.  Implemented a support function which fetches the vtable
13089         from a register set.
13090
13091         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
13092         Implemented a generic class init trampoline, using the
13093         OP_TRAMPCALL_VTABLE opcode.
13094
13095         * mini.c: Implemented static field access when sharing generic
13096         code.  This implies initing the class using the new
13097         OP_TRAMPCALL_VTABLE call.
13098
13099 2007-12-07  Mark Probst  <mark.probst@gmail.com>
13100
13101         * mini.c: Don't compile methods with sharing enabled if their
13102         classes are disabled for sharing.
13103
13104 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
13105
13106         * inssel.brg: Add a missing sign extension to the GETCHR and array access
13107         opcodes. Fixes #346563.
13108
13109         * objects.cs: Add a new test.
13110
13111         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
13112
13113         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
13114         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
13115
13116 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
13117
13118         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
13119
13120 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
13121
13122         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
13123         code stream.
13124
13125 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
13126
13127         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
13128
13129         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
13130         optimization in the AOT case.
13131         
13132 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
13133
13134         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
13135         
13136         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
13137
13138         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
13139
13140         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
13141
13142         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
13143         is created by the inlined delegate ctor.
13144
13145         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
13146
13147         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
13148
13149 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
13150
13151         * cpu-x86.md: Fix the length of ckfinite.
13152
13153 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
13154
13155         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
13156         
13157         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
13158         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
13159
13160         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
13161
13162         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
13163         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
13164
13165 2007-11-28  Martin Baulig  <martin@ximian.com>
13166
13167         * mini-x86.c
13168         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
13169         after creating the trampoline.
13170
13171 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
13172
13173         * aot-runtime.c (load_aot_module): Check runtime version if needed.
13174
13175         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
13176         the same version.
13177
13178         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
13179         instead of the calling method to help AOT.
13180
13181         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
13182
13183 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
13184
13185         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
13186         is defined.
13187
13188 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
13189
13190         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
13191         
13192         * aot-compiler.c (compile_method): Correct check for generic method definitions.
13193         (encode_method_ref): No need to handle generic method definitions specially.
13194
13195         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
13196
13197         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
13198         decode_klass_info.
13199
13200         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
13201         encode_klass_info.
13202         (compile_method): Enable generic sharing.
13203
13204 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
13205
13206         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
13207         (mini_method_compile): Add preliminary support for AOTing shared generic code.
13208
13209         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
13210         generic code.
13211
13212         * mini-trampolines.c: Fix a warning.
13213
13214         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
13215         NEW_PCONST.
13216         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
13217         (generic_class_is_reference_type): Remove unused function.
13218
13219         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
13220         in the generic vtable trampoline case.
13221
13222         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
13223         
13224         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
13225         return an AOT method based on a vtable slot.
13226
13227         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
13228
13229         * mini.c (mini_get_vtable_trampoline): Export this.
13230
13231 2007-11-22  Martin Baulig  <martin@ximian.com>
13232
13233         * debug-debugger.h
13234         (MonoDebuggerInfo): Move `debugger_version' up.
13235
13236 2007-11-22  Martin Baulig  <martin@ximian.com>
13237
13238         * mini-amd64.c
13239         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
13240
13241         * mini-trampolines.c
13242         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
13243         after compiling the method.
13244
13245 2007-11-20  Martin Baulig  <martin@ximian.com>
13246
13247         * debug-mini.c
13248         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
13249         (mono_debugger_remove_breakpoint): Likewise.
13250         (mono_debugger_check_breakpoints): Likewise.
13251
13252         * debug-debugger.c: Implement the new breakpoint interface here.
13253
13254 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
13255
13256         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
13257         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
13258
13259         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
13260
13261 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
13262
13263         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
13264
13265         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
13266         mini.c.
13267
13268         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
13269         mini.c.
13270
13271         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
13272         returning a vtype in a register.
13273
13274         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
13275         here from the arch specific code.
13276
13277         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
13278         mini.c.
13279
13280         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
13281         (mono_arch_emit_prolog): Increment maximum prolog size.
13282
13283         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
13284         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
13285
13286         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
13287         MonoGenericSharingContext.
13288
13289         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
13290         MonoGenericSharingContext. Allocate memory from the cfg mempool.
13291
13292 2007-11-15  Mark Probst  <mark.probst@gmail.com>
13293
13294         * mini.c, mini.h, generic-sharing.c: Functions for producing code
13295         which extract fields out of the runtime generic context.  Full
13296         sharing of the NEWARR opcode.
13297
13298 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
13299
13300         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
13301         --enable-minimal=ssa.
13302
13303 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
13304
13305         * mini-trampolines.c (mono_delegate_trampoline): Update after 
13306         mono_marshal_get_delegate_invoke () signature change.
13307
13308 2007-11-13  Mark Probst  <mark.probst@gmail.com>
13309
13310         * mini.c: Removed the shared context in favor of the generic
13311         sharing context.  Allocate the MonoJitInfo structure with room for
13312         the generic sharing context if it's needed.
13313
13314         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
13315         domain-internals.h now.
13316
13317         * mini-x86.c: Pass the generic sharing context to get_call_info ().
13318
13319         * generic-sharing.c: Several changes for working without a shared
13320         context and instead operating on open types instead.
13321
13322 2007-11-12  David S. Miller  <davem@davemloft.net>
13323
13324        * inssel-sparc.brg: Fix double instruction emit.
13325
13326 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
13327
13328         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
13329         Get/Set/Address methods.
13330         
13331         * mini.c debug-debugger.c mini-trampolines.c: Update after 
13332         mono_marshal_get_delegate_invoke signature change.
13333
13334 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
13335
13336         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
13337         This can happens with dynamic methods. Fixes the other bug in #322722.
13338
13339 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
13340
13341         * tramp-arm.c (mono_arch_patch_callsite): Support patching
13342         BX call sequence.
13343
13344         * mini-arm.c (arm_patch): Implement patching of BX call
13345         sequence. Fixes one of the bugs in #322722.
13346
13347 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
13348
13349        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
13350        under Linux.  We only need to flush every 32-byte cache line.    
13351
13352 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
13353
13354         * mini.c:
13355         move_basic_block_to_end: Add branches when needed, eventually creating
13356         a new BB.
13357         optimize_branches: added a parameter that tells if it's ok to create
13358         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
13359         and avoid calling move_basic_block_to_end when it's not ok.
13360         Fixes bug 318677.
13361
13362 2007-11-07  Mark Probst  <mark.probst@gmail.com>
13363
13364         * mini.c: Abort inlining call to InitializeArray if something
13365         looks wrong.  Let the icall handle it, which now has proper safety
13366         checks.
13367
13368 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
13369
13370         * mini.c (mono_spill_call): add support for soft-float.
13371
13372         * mini.c (mono_method_to_ir): add support for soft-float
13373         to inlined functions that return float.
13374
13375         * mini.c (mono_method_to_ir): add support for soft-float
13376         to cee_stsfld opcode on float fields.
13377
13378 2007-11-05  Geoff Norton  <gnorton@novell.com>
13379
13380         * mini-x86.h: Fix the structure access for X86 Leopard.
13381
13382
13383 2007-11-05  Martin Baulig  <martin@ximian.com>
13384
13385         * mini-trampolines.c
13386         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
13387         after compiling the method to notify the debugger.
13388
13389 2007-11-05  Martin Baulig  <martin@ximian.com>
13390
13391         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
13392
13393 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
13394
13395         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
13396         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
13397
13398 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
13399
13400         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
13401         native-to-managed wrappers.
13402         
13403 2007-11-01  Geoff Norton  <gnorton@novell.com>
13404
13405         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
13406         members.
13407
13408 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
13409
13410         * mini.c, mini-x86.c: when getting back from unmanaged code
13411         to managed via a marshaled delegate we also need to set the
13412         right domain.
13413
13414 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
13415
13416         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
13417         for amd64.
13418
13419 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13420
13421         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
13422         let the debugger or other external agents to tell the JIT when
13423         a sw breakpoint has been inserted in the code that the JIT needs
13424         to be able to inspect.
13425
13426 2007-10-31  Martin Baulig  <martin@ximian.com>
13427
13428         * debug-debugger.h
13429         (MonoDebuggerInfo): Remove `runtime_class_init'.
13430
13431 2007-10-30  Martin Baulig  <martin@ximian.com>
13432
13433         * debug-mini.h
13434         (mono_debugger_thread_created): Added `MonoThread *' argument.
13435         (mono_debugger_extended_notification): New public method.
13436         (mono_debugger_trampoline_compiled): New public method.
13437
13438         * debug-mini.c
13439         (MonoDebuggerThreadInfo): Added `thread' and
13440         `extended_notifications' fields.
13441
13442         * debug-debugger.c
13443         (debugger_executable_code_buffer): New static variable.
13444
13445         * debug-debugger.h
13446         (MonoDebuggerInfo): Added `executable_code_buffer',
13447         `executable_code_buffer_size', `breakpoint_info_area',
13448         `breakpoint_table' and `breakpoint_table_size'.
13449
13450 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
13451
13452         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
13453         that IP  either is an unused value or the vtable pointer. IMT 
13454         calls use vtable + offset now. Reduced by almost half the size
13455         of IMT entries.
13456
13457 2007-10-26  Jonathan Chambers <joncham@gmail.com>
13458
13459         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
13460         defines to access param registers. Replace long usage with
13461         gsize as sizeof(long) != sizeof(void*) on Win64.
13462
13463         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
13464         on Win64. Fix intrinsic, use _AddressOfReturnAddress
13465         instead of non-existant _GetAddressOfReturnAddress.
13466
13467         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
13468         param registers. Save/restore %rdi and %rsi in MonoLMF.
13469
13470         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
13471         param registers. Modify (throw_exception) signature to take 
13472         %rdi and %rsi on Win64. 
13473
13474         Code is contributed under MIT/X11 license.
13475
13476 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
13477
13478         * helpers.c: unlink debugging output files.
13479
13480 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
13481
13482         * mini.c: Move mono_create_ftnptr () to object.c.
13483
13484 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
13485
13486         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
13487         optional. This function can now be used to disassemble code generated
13488         outside the JIT such as trampolines and IMT thunks.
13489
13490         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
13491
13492         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
13493         vtable pointer from a ldr instruction.
13494
13495         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
13496         new IMT call sequence.
13497
13498         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
13499         call sequence for interface invocations.
13500
13501         * mini-arm.c (mono_arch_emit_imt_argument): added, required
13502         for imt support. This function is empty since IMT on ARM requires no
13503         special handling on the IR side.
13504
13505         * mini-arm.c (mono_arch_find_imt_method): added, required for
13506         imt support.
13507
13508         * mini-arm.c (mono_arch_find_this_argument): added, required
13509         for imt support.
13510
13511         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
13512         a ldr instruction to load a value stored in the code stream.
13513
13514         * mini-arm.c (mono_arch_build_imt_thunk):added, required
13515         for imt support.
13516
13517
13518 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
13519
13520         * mini.c (mini_init): Install the jump trampoline callback.
13521
13522 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
13523
13524         * mini-trampolines.c: handle synchronized methods with the common
13525         vtable trampoline (bug #335601).
13526
13527 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
13528
13529         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
13530
13531         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
13532         64 bit platforms.
13533
13534         * mini-ia64.h mini-ia64.c: Add support for IMT.
13535
13536         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
13537         prolog. Fixes #331958.
13538
13539 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
13540
13541         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
13542
13543 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
13544
13545         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
13546         trampoline.
13547
13548 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
13549
13550         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
13551         trampoline.
13552
13553 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
13554
13555         * mini-x86.c, mini-x86.h: x86 support for the common vtable
13556         trampoline.
13557
13558 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
13559
13560         * mini-trampolines.c: changed the magic rampoline to understand
13561         the common vtable trampoline method: the method to invoke is
13562         determined by the vtable displacement of the call.
13563
13564 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
13565
13566         * mini.c, mini.h: register the common vtable trampoline if the
13567         architecture supports it.
13568
13569 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
13570
13571         * cpu-amd64.md: use the correct max length for tls_get.
13572
13573 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
13574
13575         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
13576         CEE_STELEM_ANY. Fixes #333696.
13577
13578 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
13579
13580         * exceptions-x86.c: provide more graceful handling of the case where
13581         we followed a bogus function pointer from managed code (bug #332866).
13582
13583 2007-10-11  Mark Probst  <mark.probst@gmail.com>
13584
13585         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
13586         replaces the generic_shared flag and will carry more information
13587         in the future.
13588
13589         * generic-sharing.c: Added mini_type_stack_size() which allows
13590         allows open types if given a generic sharing context.
13591         mini_get_basic_type_from_generic() takes a
13592         MonoGenericSharingContext* instead of a MonoCompile* now.
13593
13594         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
13595         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
13596         mini-sparc.c, mini-x86.c: Trivial changes required by the two
13597         changes above.  Just passing arguments through to the right
13598         places.
13599
13600 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
13601
13602         * mini-arm.c: unify the call emission to emit_code_seq().
13603
13604 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
13605
13606         * tramp-arm.c: reduced the trampoline size.
13607
13608 2007-10-10  Mark Probst  <mark.probst@gmail.com>
13609
13610         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
13611         variable handling out of arch-specific code.
13612
13613 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
13614
13615         * mini-arm.c: implemented fast delegate dispatch.
13616
13617 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
13618
13619         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
13620         that fp elimination is turned off if the space required by locals is too
13621         big. Fixes #331958.
13622
13623 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
13624
13625         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
13626         ARM to the new style trampoline.
13627
13628 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
13629
13630         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
13631
13632         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
13633
13634 2007-10-09  Martin Baulig  <martin@ximian.com>
13635
13636         * debug-debugger.h
13637         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
13638         `field_info_offset_offset'.     
13639
13640 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
13641
13642         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
13643         removed more internal usage of the r11 register and made it available
13644         to the register allocator.
13645
13646 2007-10-08  Mark Probst  <mark.probst@gmail.com>
13647
13648         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
13649         when sharing generics and treat type variables as references.
13650
13651 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
13652
13653         * mini-ppc.c: started removing the internal uses of register r11
13654         to eventually allow the register allocator to manage it as an
13655         additional available register.
13656
13657 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
13658
13659         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
13660
13661 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
13662
13663         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
13664         specific trampolines as they are not performance critical as a jump
13665         target (maybe align as before only for AOT code?). This saves about
13666         200 KB of native code on x86 for monodevelop startup.
13667
13668 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
13669
13670         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
13671         monodevelop startup.
13672
13673 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
13674
13675         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
13676
13677         * mini-sparc.h mini-sparc.c: Implement IMT support.
13678
13679         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
13680         its smaller and doesn't clobber sparc_g1.
13681
13682         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
13683
13684 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
13685
13686         * mini-ppc.c: optimized the size of the IMT thunks a bit.
13687
13688 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
13689
13690         * mini-ppc.c: implemented fast delegate invocation.
13691
13692 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
13693
13694         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
13695
13696 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
13697
13698         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
13699         code to the new style trampoline in preparation for IMT support.
13700
13701 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
13702
13703         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
13704         systems already. This also reduces the specific trampiline sizes and
13705         prepares for the use of r12 as the IMT identifier register.
13706
13707 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
13708
13709         * mini-mips.h: endianess fix (simplified from a patch by
13710         Thomas Kunze <thommy@tabao.de>, bug #323737).
13711
13712 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
13713
13714         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
13715         to access ucontext fields and enable netbsd support
13716         (partially from Magnus Henoch <mange@freemail.hu>).
13717
13718 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
13719
13720         * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
13721         use the preprocessor from the CPP env var if it is set.
13722
13723 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
13724
13725         * mini-trampolines.c: fixed an assertion and moved it earlier in the
13726         code, before interface_offset gets used.
13727
13728 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
13729
13730         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
13731         mono_class_setup_vtable () before accessing klass->vtable.
13732
13733 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
13734
13735         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
13736         hackish.
13737
13738 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
13739
13740         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
13741         IMT slots (this saves hundreds of KB of memory in programs like
13742         IronPython and Monodevelop).
13743
13744 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
13745
13746         * mini.c: print the delegate counter.
13747
13748 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
13749
13750         * mini-x86.c: make it easier to enable the debugging code for IMT
13751         slots.
13752
13753 2007-09-28  Martin Baulig  <martin@ximian.com>
13754
13755         * debug-debugger.h
13756         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
13757         `mono_method_klass_offset' and `mono_method_token_offset'.
13758
13759 2007-09-20  Mark Probst  <mark.probst@gmail.com>
13760
13761         * mini.c: First generics sharing implementation.  Can only share
13762         in very simple cases.  If sharing doesn't work it falls back to
13763         dedicated compilation.
13764
13765         * mini.h: Flag in MonoCompile to specify whether generic
13766         compilation is shared.  Flags enum for marking which generic inst
13767         of a context is used.  Prototypes for helper functions.
13768
13769         * generic-sharing.c: Helper functions for generic method sharing.
13770
13771         * optflags-def.h: Optimization flag (gshared) for enabling generic
13772         method sharing added.
13773
13774         * Makefile.am: generic-sharing.c added.
13775
13776 2007-09-19 Daniel Nauck <dna@mono-project.de>
13777
13778         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
13779
13780 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
13781         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
13782         fixes bug 325507.
13783
13784 2007-09-19  Martin Baulig  <martin@ximian.com>
13785
13786         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
13787         mono_debug_cleanup() is now part of mono_cleanup().
13788
13789 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
13790
13791         * driver.c (mono_main): Fix a warning.
13792
13793 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
13794
13795         * aot-compiler.c: Optimize various parts when processing large assemblies.
13796         Fixes ##325568.
13797
13798         * mini.c (mono_patch_info_hash): Improve hash function.
13799
13800 2007-09-14  Jonathan Chambers <joncham@gmail.com>
13801
13802         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
13803         
13804         Code is contributed under MIT/X11 license.
13805
13806 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
13807
13808         * mini.c (mini_init): Fix a leak.
13809
13810         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
13811
13812 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
13813
13814         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
13815
13816 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
13817
13818         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
13819
13820 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
13821
13822         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
13823         variance tests.
13824
13825         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
13826
13827         * mini.c (handle_alloc): Enable managed allocators in AOT code.
13828
13829         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
13830
13831         * aot-runtime.c (decode_patch_info): Ditto.
13832
13833 2007-09-12  Jonathan Chambers <joncham@gmail.com>
13834
13835         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
13836         static case. Cache delegates in architecture specific code, 
13837         based on number of parameters.
13838         
13839         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
13840         in architecture specific code, based on number of parameters.
13841         
13842         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
13843         caching happen in architecture specific code now.
13844         
13845         Code is contributed under MIT/X11 license.
13846
13847 2007-09-12  Jonathan Chambers <joncham@gmail.com>
13848
13849         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
13850         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
13851         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
13852
13853         Code is contributed under MIT/X11 license.
13854
13855 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
13856         * mini.c: (mono_thread_abort) Fixed bug #82416.
13857
13858 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
13859
13860         * mini.: hook the new managed GC allocation feature into the JIT.
13861
13862 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
13863
13864         * mini.c: implementation for the new runtime tls opcode.
13865
13866 2007-09-11  Martin Baulig  <martin@ximian.com>
13867
13868         * debug-debugger.h
13869         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
13870         `mono_method_inflated_offset'.
13871
13872 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
13873
13874         * driver.c mini.h mini.c: Add a new devel command line option for injecting
13875         async exceptions into a method.
13876
13877         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
13878         purpose of testing whenever the unwinder works at every instruction.
13879
13880 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
13881
13882         * mini.c: check accessibility of method used in ldftn (fixes
13883         bug #82635).
13884
13885 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
13886
13887         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
13888
13889         * inssel.brg: Fix a warning.
13890
13891 2007-09-03  Martin Baulig  <martin@ximian.com>
13892
13893         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
13894         now takes the `main_method' as argument.
13895
13896 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
13897
13898         * cpu-sparc.md (endfilter): Add missing src1:i argument.
13899
13900 2007-08-30  Jonathan Chambers <joncham@gmail.com>
13901
13902         * driver.c: include the cil-coff.h header on Windows.
13903         
13904         Code is contributed under MIT/X11 license.
13905
13906 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
13907
13908         * mini.c, driver.c: don't include the cil-coff.h header.
13909
13910 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
13911
13912         * mini.c: flag places that needs fixes fo soft-float support.
13913
13914 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
13915
13916         * mini.h, inssel-float.brg: fix soft-float constant loads on big
13917         endian systems (partially from Dean Jenkins, bug #81924).
13918
13919 2007-08-28  Mark Probst  <mark.probst@gmail.com>
13920
13921         * mini.c (check_linkdemand): Remove embedded reference object in
13922         call to LinkDemandSecurityException.
13923         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
13924         with an IntPtr instead of a reference object.
13925
13926 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
13927
13928         * mini.c (handle_initobj): Handle alignment properly.
13929
13930         * inssel.brg (mini_emit_memset): Ditto. 
13931
13932         * inssel.brg (mini_emit_memcpy): Ditto. 
13933
13934         * inssel-sparc.brg: Ditto.              
13935
13936         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
13937
13938 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
13939
13940         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
13941         exceptions raised in unmanaged code. Fixes part of #82594.
13942
13943 2007-08-24  Mark Probst  <mark.probst@gmail.com>
13944
13945         * mini.c (mono_method_to_ir), declsec.c
13946         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
13947
13948 2007-08-22  Martin Baulig  <martin@ximian.com>
13949
13950         * debug-mini.h
13951         (MonoDebuggerThreadInfo): New typedef.
13952         (mono_debugger_thread_table): New global variable.
13953         (mono_debugger_thread_created): New public function.
13954         (mono_debugger_thread_cleanup): New public function.
13955
13956         * debug-debugger.h
13957         (MonoDebuggerInfo):
13958         - removed `get_current_thread' and `lookup_assembly'.
13959         - removed `data_table'.
13960         - added `thread_table'.
13961
13962         * mini.c
13963         (mono_thread_start_cb): Call mono_debugger_thread_created().
13964         (mono_thread_attach_cb): Likewise.
13965         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
13966         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
13967         initial domain.
13968
13969         * driver.c (mono_main): Move mono_debug_init() up, before calling
13970         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
13971
13972 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
13973
13974         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
13975         together when passing several arguments of type double (gives a small
13976         speedup and saves a few bytes of generated code).
13977
13978 2007-08-20  Jb Evain  <jbevain@novell.com>
13979
13980         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
13981
13982 2007-08-20  Jb Evain  <jbevain@novell.com>
13983
13984         * mini.c (mono_method_to_ir): throw MethodAccessException
13985         and FieldAccessException instead of InvalidProgramException.
13986
13987 2007-08-20  Mark Probst  <mark.probst@gmail.com>
13988
13989         * mini.c: CoreCLR security checks.
13990
13991         * mini.h: Removed MonoSecurityMode (moved to
13992         metadata/security-manager.h) and mono_security_mode global var
13993         (replaced by set/get functions in security-manager.h).
13994
13995         * driver.c: Added "core-clr-test" security mode for testing.  Used
13996         set-function for setting security mode.
13997
13998 2007-08-17  Mark Probst  <mark.probst@gmail.com>
13999
14000         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
14001         the new jit_info_table.
14002
14003         * driver.c: Test code for the new jit_info_table (enabled by the
14004         define MONO_JIT_INFO_TABLE_TEST).
14005
14006 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
14007
14008         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
14009         detection of call <REG> instruction sequence. Fixes build on freebsd.
14010
14011 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
14012
14013         * mini-exceptions.c: Fix a warning.
14014
14015 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
14016
14017         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
14018         stack overflow handling code on amd64 too.
14019
14020         * mini-exceptions.c (mono_setup_altstack): Make this use 
14021         mono_thread_get_stack_bounds ().
14022
14023         * mini-x86.h: Disable sigaltstack on solaris x86.
14024
14025 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
14026
14027         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
14028
14029 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
14030
14031         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
14032
14033 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
14034
14035         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
14036
14037         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
14038
14039 2007-08-03  Neale Ferguson <neale@sinenomine.net>
14040
14041         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
14042         due to alignment.
14043
14044 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
14045
14046         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
14047         to be emitted (bug #82281).
14048
14049 2007-08-01  Martin Baulig  <martin@ximian.com>
14050
14051         Merged the `debugger-dublin' branch.
14052
14053         * debug-debugger.h (MonoDebuggerInfo):
14054         Removed the `old_*' compatibility entries.
14055         Added `debugger_version' and `data_table'.
14056         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
14057         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
14058
14059         * debug-mini.c
14060         (MiniDebugMethodBreakpointInfo): Add `address_list'.
14061         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
14062         instead of a `gconstpointer'.
14063         (mono_debugger_insert_method_breakpoint): Return a
14064         `MonoDebugMethodAddressList *'.
14065
14066 2007-06-28  Martin Baulig  <martin@ximian.com>
14067
14068         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
14069
14070 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
14071
14072         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
14073         __builtin_frame_address () since it is broken on older gcc versions.
14074
14075 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
14076
14077         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
14078         on the stack overflow handling and made the managed stack overflows
14079         catchable in most cases using soft guard pages.
14080         * exceptions-x86.c: added code to restore the protection in the soft
14081         guard pages at the end of exception handling.
14082
14083 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
14084
14085         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
14086
14087 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
14088
14089         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
14090         exception handling.
14091
14092 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
14093
14094         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
14095         signal handling support until it has been ported to the new mechanism.
14096         * mini.c: fixed stack overflow detection and use the new
14097         architecture code  to handle signals on the altstack.
14098
14099 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
14100
14101         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
14102         stack overflows on the alt stack.
14103
14104 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
14105
14106         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
14107         stack overflows on the alt stack.
14108
14109 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
14110
14111         * exceptions-ppc.c: cleanup preparing for altstack support.
14112
14113 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
14114
14115         * exceptions-arm.c: cleanup preparing for altstack support.
14116
14117 2007-07-27  Mark Probst  <mark.probst@gmail.com>
14118
14119         * mini.c (print_jit_stats): Output hazard pointer stats.
14120
14121 2007-07-26  Mark Probst  <mark.probst@gmail.com>
14122
14123         * driver.c, mini.c: Replaced security mode flags with a single
14124         enum variable.
14125
14126 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14127
14128         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
14129
14130 2007-07-25  Mark Probst  <mark.probst@gmail.com>
14131
14132         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
14133         (which doesn't do anything yet) for activating Core CLR
14134         (Silverlight) security.
14135
14136 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
14137
14138         * mini-codegen.c: work around a possible gcc bug on arm.
14139
14140 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
14141
14142         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
14143         message for platforms that don't support AOT compilation.
14144
14145 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
14146
14147         * mini.h, mini.c, driver.c: temporary smcs hack.
14148
14149 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
14150
14151         * mini-arm.h, mini-arm.c: arm EABI fixes.
14152
14153 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
14154
14155         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
14156         case.
14157
14158         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
14159         trampolines taking a method argument.
14160
14161         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
14162
14163         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
14164         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
14165
14166         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
14167         JIT compilation throws an exception. Fixes #82050.
14168
14169 2007-07-19  Mark Probst  <mark.probst@gmail.com>
14170
14171         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
14172         with the MONO_EXCEPTION_ defines.
14173
14174 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
14175
14176         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
14177         #82117.
14178         
14179         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
14180         the cause of an assertion.
14181
14182 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
14183
14184         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
14185         removed.
14186
14187 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
14188
14189         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
14190         assert. Should fix #82103.
14191
14192 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
14193
14194         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
14195         here too. Fixes #82095.
14196
14197         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
14198         addresses.
14199
14200         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
14201
14202         * mini-amd64.h: Enable IMT for amd64.
14203         
14204         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
14205
14206 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
14207
14208         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
14209
14210 2007-07-12  Mark Probst  <mark.probst@gmail.com>
14211
14212         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
14213         as soon as check_linkdemand sets an exception_type.
14214
14215 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
14216
14217         * mini-x86.c: fixed offsets for IMT call sequence.
14218         * mini-x86.h: enable IMT again.
14219
14220 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
14221
14222         * trace.c (mono_trace_enter_method): Decode MonoType too.
14223
14224         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
14225
14226         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
14227
14228         * mini-amd64.c: Add preliminary IMT implementation.
14229         
14230 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
14231
14232         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
14233         understand the new IMT-base interface invocation (thanks to
14234         Daniel Nauck for the report and the remote debugging session).
14235
14236 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
14237
14238         * mini-x86.c: size and speed optimizations for the IMT bsearch.
14239
14240 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
14241
14242         * Makefile.am (aotcheck): Make this actually use the AOTed code.
14243
14244 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
14245
14246         * mini-trampolines.c: implement AOT IMT support.
14247         * mini-x86.h: enable IMT support for wider testing.
14248
14249 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
14250
14251         * inssel.brg (emit_imt_argument): Add aot support here.
14252
14253         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
14254
14255 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
14256
14257         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
14258         of the IMT implementation, partially from massi, with my
14259         implementation of the bsearch sequence. Disabled by default until
14260         the AOT code is implemented.
14261
14262 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
14263
14264         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
14265
14266         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
14267
14268 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14269
14270         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
14271         arch-independent IMT JIT code from Massimiliano
14272         Mantione (massi@ximian.com) with small cleanups from me.
14273
14274 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
14275
14276         * Makefile.am: fix svn invocation to get the svn revision to be
14277         independent of the local language (build fix).
14278
14279 2007-07-09  Mark Probst  <mark.probst@gmail.com>
14280
14281         * mini.c (inline_method): Reset cfg->exception_type if the
14282         inlining is aborted.  Fixes: 82049.
14283
14284 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
14285
14286         * mini.c: remove assert from exception handling code when exception_ptr
14287         is not set.
14288
14289 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
14290
14291         * mini.c (mono_codegen): Add an assert.
14292
14293         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
14294         enter and leave code.
14295         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
14296
14297 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
14298
14299         * mini-ppc.c: fixed memory corruption for localloc(0)
14300         (bug #81852).
14301
14302 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
14303         
14304         * mini.c: Fix warnings.
14305
14306 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
14307
14308         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
14309         to emit better double->int conversions.
14310
14311 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
14312
14313         * mini.c: the provided Min/Max optimizations are valid for unisgned
14314         ints.
14315
14316 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
14317
14318         * 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
14319
14320 2007-06-28  Miguel de Icaza  <miguel@novell.com>
14321
14322         * mini.c (mono_running_on_valgrind): Add support for reporting the
14323         method and  its boundaries to valgrind.
14324
14325 2007-06-28  Martin Baulig  <martin@ximian.com>
14326
14327         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
14328
14329 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
14330
14331         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
14332
14333         * generic.2.cs: Add new test case.
14334
14335 2007-06-25  Martin Baulig  <martin@ximian.com>
14336
14337         Merged the `debugger-dublin' branch.
14338
14339         * debug-mini.c
14340         (mono_debugger_insert_method_breakpoint): New public method.
14341         (mono_debugger_remove_method_breakpoint): Likewise.
14342         (mono_debugger_check_breakpoints): New static method.
14343         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
14344
14345         * debug-debugger.h (MonoDebuggerInfo):
14346         Renamed (to keep backward compatibility in the vtable):
14347         `insert_breakpoint' -> `old_insert_breakpoint'.
14348         `remove_breakpoint' -> `old_remove_breakpoint'.
14349         `create_string' -> `old_create_string'.
14350         `lookup_class' -> `old_lookup_class'.
14351         `lookup_type' -> removed; changed into a dummy field.
14352         `lookup_assembly' -> `old_lookup_assembly'.
14353         Added (same functionality, but different signature):
14354         `create_string', `lookup_class', `lookup_assembly'
14355         Added new:
14356         `get_method_addr_or_bpt', `remove_method_breakpoint',
14357         `runtime_class_init'.
14358
14359         * debug-debugger.c: Merged the `debugger-dublin' branch.
14360
14361 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
14362
14363         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
14364         well.
14365         (peephole_pass): Likewise.
14366
14367 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
14368
14369         * driver.c: hopefully make setaffinity work also for ancient
14370         versions of linux.
14371
14372 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
14373
14374         * driver.c : win32 build fix.
14375
14376 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
14377
14378         * driver.c: check for the MONO_NO_SMP env var and bind to a single
14379         processor if it is set.
14380
14381 2007-06-21  Martin Baulig  <martin@ximian.com>
14382
14383         * debug-mini.h: New file.
14384
14385         * debug-mini.c
14386         (mono_debugger_insert_breakpoint_full): Moved here from
14387         ../metadata/mono-debug-debugger.c.
14388         (mono_debugger_remove_breakpoint): Likewise.
14389         (mono_debugger_breakpoint_callback): Likewise.
14390
14391 2007-06-15  Raja R Harinath  <rharinath@novell.com>
14392
14393         * jit-icalls.c (mono_helper_compile_generic_method): Update to
14394         changes in MonoGenericClass.
14395
14396 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
14397
14398         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
14399
14400 2007-06-14  Raja R Harinath  <rharinath@novell.com>
14401
14402         * jit-icalls.c (mono_helper_compile_generic_method): Update to
14403         removal of MonoGenericMethod.
14404
14405 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
14406
14407         * mini-exceptions.c: hooks for the exception events profiling API.
14408
14409 2007-06-14  Randolph Chung  <tausq@debian.org>
14410
14411         * Makefile.ma: Add hppa target.
14412         * mini-arch.h: Include mini-hppa.h
14413         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
14414         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
14415         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
14416
14417 2007-06-14  Randolph Chung  <tausq@debian.org>
14418
14419         * inssel.brg: Add rules for "chained" compare-branch operations so that
14420         a single compare op can affect multiple branches.  Adjust cost for
14421         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
14422         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
14423         cost for some rules so that they can more easily be overridden by
14424         per-arch rules (with fixes from lupus).
14425         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
14426
14427 2007-06-13  Randolph Chung  <tausq@debian.org>
14428
14429         * mini-ops.h: Reorder branch ops so that they match the order of the
14430         corresponding CEE_* ops.  The code expects them this way.
14431         Add new ops for HPPA target.
14432         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
14433
14434 2007-06-13  Randolph Chung  <tausq@debian.org>
14435
14436         * mini-exceptions.c: Handle cases where the stack grows towards
14437         larger addresses.
14438         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
14439
14440 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
14441
14442         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
14443         counter.
14444         * driver.c: explain where a non-matching corlib is found.
14445
14446 2007-06-13  Mark Probst  <mark.probst@gmail.com>
14447
14448         * mini.c (print_jit_stats): Output dynamic code allocation stats.
14449
14450 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
14451
14452         * mini-exceptions.c: Generate a method profile leave event during
14453         an exception to ensure that the profiler gets notified.
14454
14455 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
14456
14457         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
14458         branch.
14459
14460         * cpu-amd64.md: Add long_and/or/xor opcodes.
14461
14462 2007-06-06  Wade Berrier  <wberrier@novell.com>
14463
14464         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
14465         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
14466         length of instruction shr_imm (expected 8, got 10)
14467
14468 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
14469
14470         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
14471
14472 2007-06-06  Mark Probst  <mark.probst@gmail.com>
14473
14474         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
14475         MonoInternalHashTable again (fixed bug in the internal hash table
14476         code).
14477
14478 2007-06-06  Mark Probst  <mark.probst@gmail.com>
14479
14480         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
14481         Have to figure out what makes it crash the SWF regression.
14482
14483 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
14484
14485         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
14486
14487 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
14488
14489         * mini.c: optimize out the type check when storing null in a
14490         reference array.
14491
14492 2007-06-04  Mark Probst  <mark.probst@gmail.com>
14493
14494         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
14495         MonoInternalHashTable.
14496
14497 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
14498
14499         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
14500         signed integer methods.
14501
14502 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
14503
14504         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
14505         permanently since the current approach doesn't work.
14506
14507 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
14508
14509         * inssel.brg (stmt): Only call delegate->invoke_impl if 
14510         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
14511
14512 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
14513
14514         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
14515         the sreg2==rdx case.
14516         
14517         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
14518         account if it contains a rex prefix.
14519         (peephole_pass): Handle OP_FMOVE as well.
14520
14521 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
14522
14523         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
14524         as it causes regressions.
14525
14526 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
14527
14528         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
14529         static case as well.
14530
14531         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
14532
14533         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
14534         (mono_arch_get_this_arg_from_call): Ditto.
14535
14536         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
14537
14538         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
14539         invoke_impl field.
14540
14541         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
14542         (mono_arch_get_this_arg_from_call): Ditto.
14543
14544         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
14545         
14546         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
14547         try to create optimized invoke code and use that for further invocations. 
14548         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
14549
14550         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
14551
14552 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
14553
14554         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
14555         sealed classes or methods.
14556         *devirtualization.cs: tests for the new optimization
14557
14558 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
14559
14560         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
14561         by the update_volatile () function.
14562
14563 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
14564
14565         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
14566         require it.
14567
14568         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
14569
14570 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
14571
14572         * mini.c: Add configure checks for header files.
14573         * mini-x86.c: Add configure checks for header files.
14574         * trace.c: Add configure checks for header files.
14575         * aot-runtime.c: Add configure checks for header files.
14576         * aot-compiler.c: Add configure checks for header files.
14577         * driver.c: Add configure checks for header files.
14578         * mini-codegen.c: Add configure checks for header files.
14579         
14580         Code is contributed under MIT/X11 license.
14581
14582 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
14583
14584         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
14585         icompare_imm -128 + op_iclt. Fixes #81703.
14586
14587 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
14588
14589         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
14590
14591 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
14592
14593         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
14594         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
14595         so that all isinst checks now use "interface_bitmap".
14596
14597 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
14598
14599         * cpu-amd64.md (jmp): Fix a warning.
14600
14601         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
14602
14603         * basic.cs: Add new regression test.
14604
14605         * basic.cs: Remove test which is now in basic-long.cs.
14606
14607         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
14608
14609         * basic-long.cs: Add new test.
14610         
14611 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
14612
14613         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
14614
14615 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
14616
14617         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
14618
14619         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
14620         places.
14621         
14622         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
14623         throwing code a bit.
14624
14625         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
14626         the exception throwing code a bit.
14627
14628         * mini-x86.c (get_call_info): Allocate result from a mempool.
14629
14630 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
14631
14632         * aot-compiler.c (find_typespec_for_class): Fix the assert.
14633
14634         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
14635
14636         * mini.h (MonoCompile): Add 'token_info_hash' field.
14637
14638         * mini.c: Save token->method associations during compilation so the AOT 
14639         compiler can use it.
14640         
14641         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
14642         which reference generic classes and methods.
14643
14644 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
14645
14646         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
14647
14648         * aot-compiler.c (compile_method): Fix a typo in a comment.
14649
14650         * aot-runtime.c (decode_cached_class_info): Skip generic types.
14651
14652         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
14653         everything generic.
14654
14655         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
14656
14657 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
14658
14659         * mini.h (MonoCompile): Add 'args' field.
14660
14661         * mini.c (mono_compile_create_vars): Store variables representing the arguments
14662         into cfg->args.
14663
14664         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
14665
14666 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
14667
14668         * mini.c (mono_compile_get_interface_var): Remove this unused function.
14669
14670         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
14671
14672         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
14673         opcodes for some opcodes.
14674
14675         * mini.h *.brg *.c: Use the new opcodes.
14676
14677 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
14678
14679         * mini.h: Bumped aot revision.
14680
14681         * inssel.brg: modified code generation of type checks for interfaces
14682         to use the new "MonoClass.interface_bitmap" instead of the old
14683         "MonoClass.interface_offsets".
14684
14685 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
14686
14687         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
14688
14689 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
14690
14691         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
14692         64 bit platforms.
14693
14694 2007-04-27  Neale Ferguson <neale@sinenomine.net>
14695
14696         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
14697
14698 2007-04-27  Wade Berrier  <wberrier@novell.com>
14699
14700         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
14701         mini.h) to fix build.
14702
14703 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
14704
14705         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
14706         
14707         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
14708         causes the corlib unit tests to fail.
14709
14710 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
14711
14712         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
14713
14714         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
14715
14716         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
14717         opcodes to the comparison relations.
14718
14719         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
14720         opcodes to their types.
14721         
14722         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
14723
14724         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
14725         it in cfg->arch.cinfo.
14726
14727         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
14728
14729         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
14730         cfg->cil_offset_to_bb.
14731
14732 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
14733
14734         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
14735         created becase of initlocals.
14736
14737 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
14738
14739         * mini-alpha.c cpu-alpha.md: More alpha port work from 
14740         Sergey Tikhonov <tsv@solvo.ru>.
14741
14742 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
14743
14744         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
14745
14746 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
14747
14748         * cpu-s390.md (break): Correct the length of break instruction.
14749
14750 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
14751
14752         * mini.c: fix a couple of soft-float issues and comments.
14753
14754 2007-04-15  Miguel de Icaza  <miguel@novell.com>
14755
14756         * trace.c (is_filenamechar): - is also a filename char.
14757
14758 2007-04-15  Neale Ferguson <neale@sinenomine.net>
14759
14760         * mini-s390.c: Correct checking for enum type in return value processing.
14761
14762 2007-04-14  Raja R Harinath  <rharinath@novell.com>
14763
14764         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
14765         (version.h): Makefile is in the build directory.
14766
14767 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
14768
14769         * mini-amd64.h: fix for assertion failure on Solaris/amd64
14770
14771 2007-04-11  Martin Baulig  <martin@ximian.com>
14772
14773         * mini.c (can_access_member): Fix handling of generic classes;
14774         fixes #81259.
14775
14776 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
14777
14778         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
14779
14780 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
14781
14782         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
14783
14784 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
14785
14786         * mini-codegen.c: make sure the right spill amount is
14787         used for fp or integer registers (fixes the float_sub_spill() on ppc).
14788
14789 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
14790
14791         * mini-ppc.c: fixes for the fp_branch_nan test.
14792
14793 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
14794
14795         * basic.cs: Comment out new test which still fails on ia64.
14796
14797 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
14798
14799         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
14800
14801 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
14802
14803         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
14804
14805 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
14806
14807         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
14808         on 64 bit machines. Fixes part of #80738.
14809
14810         * basic.cs: Add regression test.
14811
14812 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
14813
14814         * inssel.brg basic.cs: Revert previous change to fix build.
14815
14816         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
14817         platforms.
14818         
14819         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
14820
14821         * basic.cs: Add new regression test.
14822
14823 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
14824
14825         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
14826         many arguments.
14827
14828 2007-03-16  Neale Ferguson <neale@sinenomine.net>
14829
14830         * cpu-s390x.md: Correct length of break instruction.
14831
14832 2007-03-16  Neale Ferguson <neale@sinenomine.net>
14833
14834         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
14835         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
14836
14837 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
14838
14839         * *.c: Begin WIN64 port.
14840         * mini.c:  Use correct register in profiler.
14841         * mini-amd64.c: No inline assembly on Win64.
14842         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
14843         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
14844         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
14845         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
14846         mono_arch_ip_from_context for Win64.
14847         
14848         Contributed under MIT/X11 license.
14849
14850 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
14851
14852         * exceptions-amd64.c (seh_handler): Ditto.
14853
14854         * exceptions-x86.c (seh_handler): Fix a memory leak.
14855
14856 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
14857
14858         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
14859         mini-s390x.c: fixed peephole optimizations to deal
14860         correctly with 1 and 2 byte reload avoidance.
14861
14862 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
14863
14864         * cpu-s390.md, cpu-s390x.md: update localloc length.
14865
14866 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
14867
14868         * cpu-g4.md: added missing descriptions.
14869
14870 2007-03-14  Miguel de Icaza  <miguel@novell.com>
14871
14872         *  Makefile.am: Add support so the tail tests are not executed on
14873         PowerPC as that is a known limitation of the PowerPC port.
14874
14875 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
14876
14877         * runmdesc.bat:  Move to msvc directory.
14878         
14879 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
14880
14881         * runmdesc.bat:  Run executable that was produced by the current
14882         target and sent via an argument.
14883         
14884 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
14885
14886         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
14887         #81102.
14888
14889         * generics.2.cs: Add regression test.
14890
14891 2007-03-09  Wade berrier  <wberrier@novell.com>
14892
14893         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
14894
14895 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
14896
14897         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
14898         AOT code depends on this.
14899
14900 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
14901
14902         * mini.c: more precise tracking of types in the eval stack
14903         (part of fix for bug #81044).
14904
14905 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
14906
14907         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
14908
14909         * aot-compiler.c (encode_patch): Remove an obsolete comment.
14910
14911 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
14912
14913         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
14914
14915         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
14916
14917 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
14918
14919         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
14920         a pointer on 64 bit systems. Fixes #80190.
14921
14922         * iltests.il: Add new regression test.
14923
14924 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
14925
14926         * mini.c: inline a constant for Environment.IsRunningOnWindows.
14927
14928 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
14929
14930         * trace.c: Remove an erroneous alignemnt check when tracing.
14931           Fixes --trace on OSX86.
14932
14933 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
14934
14935         * mini-$(arch).h: initialize SP in context for all the archs.
14936
14937 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
14938
14939         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
14940         regressions in the thread tests.
14941
14942 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
14943
14944         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
14945         - fixed implementation of LOCALLOC opcode
14946         - implemented non-un compare for floats
14947         - code cleanup
14948         - implementation of FDIV and CKFINITE opcodes
14949         - fixes for latest mono updates
14950         - additional arch opcodes
14951
14952 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
14953
14954         * Makefile.am: simplify and merge rules for cross-compilation.
14955
14956 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
14957
14958         * local-propagation.c: Actually *apply* the fix for bug 80591...
14959
14960 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
14961
14962         * mini-exceptions.c: backuot part of the last change
14963         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
14964
14965 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
14966         * inssel.brg: Fix bug 59286.
14967
14968
14969 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
14970
14971         * mini-exceptions.c: patch from Zoltan to correctly check for
14972         stack boundaries (using the stack register, not the frame register),
14973         fixes bugs #80724, #79717.
14974
14975 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
14976
14977         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
14978         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
14979
14980         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
14981         presence of frame pointer elimination.
14982
14983 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
14984         
14985         * mini-x86.h: NetBSD UCONTEX_REG defines.
14986
14987 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
14988
14989         * inssel-amd64.brg: Fix amd64 build.
14990
14991 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
14992
14993         * mini.h: remove extern to workaround what looks likes gcc bug 26905
14994         on amd64.
14995
14996 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
14997
14998         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
14999         ends.
15000
15001         * mini-<ARCH>.c: Use mono_is_regsize_var ().
15002
15003 2007-01-30 Mark Mason <mason@broadcom.com>
15004
15005            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
15006            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
15007            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
15008            beginning support for CEE_JMP [not quite working yet]
15009            * tramp-mips.c: LMF handling now works
15010         
15011 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
15012
15013         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
15014
15015         * mini.h (NULLIFY_INS): New macro.
15016
15017 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
15018
15019         * mini.c: statistical profiler fix for windows, patch
15020         from Tor Lillqvist (tml@novell.com).
15021
15022 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
15023         * local-propagation.c: Fix bug 80591.
15024
15025 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
15026
15027         * Makefile.am: put back the --export-dynamic option as with
15028         the previous gmodule flags (thanks to Robert Jordan).
15029
15030 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
15031
15032         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
15033
15034         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
15035         simplify and speed up the local register allocator. Also rename some fields
15036         like iassign->vassign.
15037         
15038         * regalloc.c: Remove some functions which are no longer used since their
15039         inlined version is in mini-codegen.c.
15040         
15041         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
15042
15043         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
15044
15045 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
15046
15047         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
15048         narrowing. Fixes #80622.
15049
15050         * iltests.il: Add new regresssion test. 
15051
15052 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
15053
15054         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
15055         debug-debugger.c, debug-debugger.h: warning fixes.
15056         * driver.c: updated copyright year and made it fit in one line.
15057
15058 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
15059
15060         * aot-runtime.c: updated to use mono-dl instead of gmodule.
15061
15062 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
15063
15064         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
15065
15066         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
15067
15068         * iltests.il: Add new test for bug #80507.
15069
15070 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
15071
15072         * mini-arm.h: use soft-float also on vfp for now.
15073
15074 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
15075
15076         * mini.c: fix some more soft-float issues.
15077
15078 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
15079
15080         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
15081
15082 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
15083         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
15084         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
15085         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
15086
15087 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
15088
15089         * mini-arm.c: typo fix.
15090
15091 2007-01-23  Neale Ferguson <neale@sinenomine.net>
15092
15093         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
15094
15095 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
15096
15097         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
15098         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
15099
15100         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
15101
15102         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
15103
15104         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
15105         
15106         * inssel.brg: Fix a warning.
15107
15108         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
15109
15110         * abcremoval.c ssa.c ssapre.c: Update after this change.
15111         
15112         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
15113
15114         * dominators.c (df_set): Use mono_bitset_union_fast.    
15115
15116 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
15117
15118         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
15119         mini-codegen.c: reduce relocations and memory usage for the cpu
15120         description.
15121
15122 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
15123
15124         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
15125
15126         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
15127         to reduce their size.
15128
15129 2007-01-19 Mark Mason <mason@broadcom.com>
15130
15131         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
15132         * mini-mips.c: more configuration macros, support long conditional branches, additional
15133         asserts, fix epilog instrumentation.
15134         * mini-mips.h: use standard stack walk
15135         * cpu-mips.md: increase size of div, rem and conditional branches
15136         
15137 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
15138
15139         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
15140         to cpu spec data.
15141
15142 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
15143
15144         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
15145         (compile_method): Ditto.
15146
15147         * aot-runtime.c (decode_klass_info): Ditto.
15148
15149         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
15150         needed by the code generated by inssel.brg. Also fix a warning.
15151
15152 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
15153
15154         * mini.c: deal with enums that become genericinsts by
15155         being nested in a generic class (bug #79956).
15156
15157 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
15158
15159         * mini.c: match the generic definition to check for
15160         private access with generic types (bug #78431).
15161
15162 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
15163
15164         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
15165         to make life easier for people cross-compiling that insist on not
15166         using scratchbox.
15167
15168 2007-01-17 Mark Mason <mason@broadcom.com>
15169
15170         * inssel-long.brg: patch to deal with mips missing flags
15171         * inssel-long32-mips.brg: implement overflow checks
15172         * insset-mips.brg: implement overflow checks
15173         * mini-mips.h: implement conditional exception handling
15174         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
15175           Remove unused code, minor cleanups.
15176         * exceptions-mips.c: minor cleanups
15177         * mini-ops.h: add mips conditional exception ops
15178         * cpu-mips.md: add mips conditional exception ops
15179
15180         
15181 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
15182
15183         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
15184         to deal with mips missing of flags.
15185
15186 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
15187
15188         * exceptions-ppc.c: execute fault handlers.
15189
15190 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
15191
15192         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
15193
15194 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
15195
15196         * mini.c: handle also floating point values in initialize_array.
15197
15198 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
15199
15200         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
15201         array initialization and make it conditional on the intrins option.
15202
15203 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
15204
15205         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
15206         relocations and put the patch info names close to the enum definition.
15207
15208 2007-01-15 Mark Mason <mason@broadcom.com>
15209
15210         * basic.cs, exceptions.cs: break up large tests to increase debugability.
15211
15212 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
15213
15214         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
15215
15216 2007-01-12  Raja R Harinath  <rharinath@novell.com>
15217
15218         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
15219
15220 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
15221
15222         * Makefile.am: distribute the mips sources.
15223
15224 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
15225
15226         * mini-codegen.h: handle bug #80489 here, by excluding ecx
15227         directly.
15228
15229 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
15230
15231         * cpu-x86.md: back out for now as this triggers other regressions.
15232
15233 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
15234
15235         * cpu-x86.md: force src1 and dest regpair for long shift instructions
15236         to eax:edx, so ecx can't get allocated to them (bug #80489).
15237
15238 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
15239
15240         * mini.c, mini-exceptions.c: enabled running fault handlers
15241         (bug #80469).
15242
15243 2007-01-03  Miguel de Icaza  <miguel@novell.com>
15244
15245         * driver.c: If nothing fail, do not use the string "failed",
15246         because it makes it very annoying to view test result logs on the
15247         web. 
15248
15249 2006-12-30  Miguel de Icaza  <miguel@novell.com>
15250
15251         * debug-debugger.c (mono_debugger_main): Rename "main" to
15252         "main_method" to prevent a warning.
15253
15254         Remove a warning for unused field.
15255
15256 2006-12-28  Martin Baulig  <martin@ximian.com>
15257
15258         * debug-debugger.c
15259         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
15260
15261 2006-12-22  Martin Baulig  <martin@ximian.com>
15262
15263         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
15264         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
15265         seperate `.mdb_debug_info' section, so we can access it from the
15266         debugger even if the binary is stripped.
15267
15268         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
15269         from the `.mdb_debug_info' here to prevent the linker from
15270         removing that section.
15271
15272         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
15273         mdb-debug-info64.s.
15274
15275 2006-12-19  Robert Jordan  <robertj@gmx.net>
15276
15277         * mini-x86: enable the code to return small structures in
15278         registers for FreeBSD as well. Fixes bug #80278.
15279         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
15280
15281 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
15282
15283         * mini-x86.c: align the stack when calling the profiler
15284         function instrumenting the prolog (on OSX).
15285
15286 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
15287
15288         * mini.c: emit a break opcode where Debugger.Break () is called.
15289
15290 2006-12-13  Miguel de Icaza  <miguel@novell.com>
15291
15292         * mini.c (mono_method_to_ir): Provide useful information on this
15293         assert, to prevent others from debugging like I did.
15294
15295 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
15296
15297         * mini.c: enable code which was incorrectly commented
15298         (bug #80235).
15299
15300 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
15301
15302         * mini-x86.c: enable on OSX, too, the code to return small
15303         structures in registers.
15304
15305 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
15306
15307         * mini-x86.c: remove the use of the dynamic code manager here, too.
15308
15309 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
15310
15311         * mini.h, debug-debugger.c, tramp-*.c: fixed 
15312         mono_debugger_create_notification_function() to use
15313         mono_global_codeman_reserve () instead of a dynamic code manager.
15314
15315 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
15316
15317         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
15318         ves_array_element_address() jit icall and use a generated
15319         managed method instead (which is about 4 times faster for a rank 3
15320         array access).
15321
15322 2006-11-29  Mark Mason  <mason@broadcom.com>
15323
15324         * basic-calls.cs: additional tests for passing
15325         structures as function arguments.
15326
15327 2006-11-29  Mark Mason  <mason@broadcom.com>
15328
15329         * mini-mips.h: disable custom exception handling
15330         * mini-mips.c: throw/rethrow should use jalr to call
15331         exception stubs.  Fixed bug with passing structures
15332         by value. More support for tracing floating point
15333         functions.
15334
15335 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
15336
15337         * mini.c: fixed typo in the soft-float ldind.r4 handling
15338         (bug #80086).
15339
15340 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
15341
15342         * mini.c, mini.h, driver.c: added --runtime command line
15343         option to select a different runtime than the autodetected one.
15344         * jit.h: added API for embedders to initialize with a specific
15345         runtime version.
15346
15347 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
15348
15349         * mini.c: handle also boxing of r4 values (bug #80024).
15350
15351 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
15352
15353         * mini-ppc.c: force indirect calls until we reserve
15354         enough address space for all the generated code.
15355
15356 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
15357
15358         * exceptions-arm.c: workaround bugs in the libc definition
15359         of struct ucontext.
15360
15361 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
15362
15363         * inssel.brg: fixes from me and Mark Mason.
15364
15365 2006-11-23  Dick Porter  <dick@ximian.com>
15366
15367         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
15368         semaphore display now we've fixed the initial value
15369
15370 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
15371
15372         * inssel.brg: partially revert the last change to fix the build.
15373
15374 2006-11-21  Mark Mason  <mason@broadcom.com>
15375
15376         * inssel.brg: Add and use compare-and-branch macros to support
15377         architectures that do not have condition code registers (ie. MIPS).
15378         * *-mips.{c,brg,md}: Fix copyright statements
15379
15380 2006-11-20  Mark Mason  <mason@broadcom.com>
15381
15382         * Makefile.am: remove mini-codegen.c from list of MIPS sources
15383         * mini.c: Allow GET_CONTEXT to be specified by the arch port
15384         * mini.h: Added declaration for mono_print_ins()
15385         * mini-codegen.c: added ins_spec initializer for MIPS
15386         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
15387         vreg to be virtual and hreg to be non-virtual.
15388         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
15389         is not yet working/implemented correctly.
15390         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
15391         non-static, fixup calls to print_ins() from other parts in the file.
15392
15393 2006-11-20  Mark Mason  <mason@broadcom.com>
15394
15395         * basic-calls.cs: added tests for passing structures as arguments
15396         to calls.
15397
15398 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
15399
15400         * inssel-long32.brg: optimize signed division by power of two.
15401
15402 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
15403
15404         * mini-arm.c: added support for interworking with thumb code
15405         (mono must be still be built using the ARM instruction encoding).
15406
15407 2006-11-19  Miguel de Icaza  <miguel@novell.com>
15408
15409         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
15410         verifier has different rules for it.   Fixes a few verifier issues
15411         in the test suite.
15412
15413         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
15414         at the end, so people know what happened.
15415
15416 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
15417
15418         * brach-opts.c: in optimize_exception_target() make sure we
15419         are in a catch clause (fixes bug #79871).
15420
15421 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
15422
15423         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
15424         more soft-float support fixes.
15425
15426 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
15427
15428         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
15429         that are passed half on the stack and half in registers.
15430
15431 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
15432
15433         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
15434         more mips integration work from Mark E Mason 
15435         <mark.e.mason@broadcom.com>.
15436
15437 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
15438
15439         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
15440         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
15441         tramp-mips.c: added sources for the mips port, not
15442         integrated in the build yet. Contributed by
15443         Mark E Mason <mark.e.mason@broadcom.com>.
15444
15445 2006-11-14  Neale Ferguson <neale@sinenomine.net>
15446
15447         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
15448
15449 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
15450
15451         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
15452         put the soft-float rules in its own file since it seems to
15453         break s390 compilation.
15454
15455 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
15456
15457         * mini-arm.c: fixed wrnings.
15458
15459 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
15460
15461         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
15462         inssel-arm.brg: ARM support for soft-float.
15463
15464 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
15465
15466         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
15467         loads and stores of 32 bit fp values.
15468
15469 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
15470
15471         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
15472
15473         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
15474         works. Fixes #79852 and #79463.
15475
15476 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
15477
15478         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
15479         more soft-float support WIP and fixes.
15480
15481 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
15482
15483         * mini-arm.c: some VFP updates.
15484
15485 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
15486
15487         * mini-exceptions.c: 0 is a valid local var offset in some
15488         architectures, don't assert (bug #78508).
15489
15490 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
15491
15492         * exceptions-arm.c: fixed off by one error in stack walk code.
15493
15494 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
15495
15496         * mini.h, mini.c: more precise tracking of type load exceptions.
15497
15498 2006-11-03  Robert Jordan  <robertj@gmx.net>
15499
15500         * Makefile.am: [WIN32] Add monow.exe target.
15501         * driver.c: [WIN32] Don't detach the console when debugging.
15502         Fixes bug #79797.
15503         
15504 2006-10-30  Miguel de Icaza  <miguel@novell.com>
15505
15506         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
15507
15508 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
15509
15510         * aot-compiler.c (emit_method_info): Add a case missed earlier.
15511
15512         * driver.c (mini_regression): Fix --regression with AOT.
15513
15514         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
15515
15516 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
15517
15518         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
15519
15520         * mini-sparc.h: Don't use sigaction on sparc/linux.
15521
15522         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
15523
15524         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
15525
15526         * mini-exceptions.c: Add proper include files for getpid ().
15527
15528 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
15529
15530         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
15531         address instead of a MonoJitInfo* to avoid decoding the exception info for the
15532         method.
15533
15534         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
15535         name cache to reduce its size.
15536
15537         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
15538
15539 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
15540
15541         * mini-x86.c: Save/restore the current LMF structure more efficiently using
15542         the mono_lmf TLS variable.
15543
15544         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
15545         trampoline lmf frames.  
15546
15547         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
15548
15549 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
15550
15551         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
15552         the mono_lmf TLS variable.
15553
15554         * mini-exceptions.c: Access the LMF structure through accessors.
15555
15556         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
15557         variable instead of in jit_tls->lmf.
15558
15559         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
15560         
15561         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
15562         trampoline lmf frames.
15563
15564         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
15565
15566 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
15567
15568        * mini.c trace.c mini-x86.c: Revert these too.
15569         
15570        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
15571        signature change.
15572
15573 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
15574
15575         * genmdesc.c: removed now dead code.
15576
15577 2006-10-09  Robert Jordan <robertj@gmx.net>
15578
15579         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
15580
15581 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
15582
15583         * mini.h: do not leave gaps in the opcode values.
15584
15585 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
15586
15587         * jit-icalls.h: flag functions as internal here, too.
15588
15589 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
15590
15591         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
15592         functions with the internal attribute.
15593
15594 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
15595
15596         * aot-compiler.c: fclose the file descriptor in the profile read loop.
15597
15598 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
15599
15600         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
15601         for soft-float.
15602
15603 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
15604
15605         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
15606         tail calls as on other platforms.
15607
15608         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
15609
15610         * iltests.il: Add a few tailcall tests.
15611
15612 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
15613
15614         * driver.c: fix loop for old compilers (bug #79521).
15615
15616 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
15617
15618         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
15619
15620         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
15621
15622         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
15623         metadata without any code.
15624
15625         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
15626         more precise debugging information using gdb.
15627
15628 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
15629
15630         * inssel-ia64.brg: Make the helper methods static.
15631
15632 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
15633
15634         * inssel-x86.brg: make the helper methods static.
15635
15636 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
15637
15638         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
15639
15640 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
15641
15642         * mini.c: updates for monoburg changes.
15643         * inssel.brg: make a few helper functions static as they should.
15644
15645 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
15646
15647         * Makefile.am: Move mini-codegen.c to common_sources.
15648
15649 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
15650
15651         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
15652         instructions.
15653         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
15654         mini-ppc.h: port to use the common local register allocator.
15655
15656 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
15657
15658         * mini.h: Remove the comment too then.
15659
15660 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
15661
15662         * mini.h: put back backend.data which is to be used shortly and
15663         doesn't increase the size of MonoInst. If any 64 bit arch aligned
15664         pointers on 4 byte boundaries it'd have much bigger issues running
15665         and you can ifdef it out anyway.
15666
15667 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
15668
15669         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
15670         MonoInst size by 4 bytes on 64 bit machines.
15671
15672 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
15673
15674         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
15675         replacement with more meaningful field names. Arch maintainers, please
15676         check the assigned names are good enough for your arch.
15677
15678 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
15679
15680         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
15681         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
15682
15683 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
15684
15685         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
15686         relocations and memory requirements, put the optimization flags
15687         definitions in their own file.
15688
15689 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
15690
15691         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
15692
15693         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
15694
15695 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
15696
15697         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
15698
15699 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
15700
15701         * inssel.brg: use the correct function to get the size of an item
15702         in an array, given an element class.
15703         * aot-compiler.c: do not access class->class_size directly.
15704
15705 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
15706
15707         * mini.h, debug-mini.c: added a debugging function to print
15708         info about local variables and arguments in a jitted method.
15709
15710 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
15711
15712         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
15713
15714         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
15715
15716 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
15717
15718         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
15719         inner and outer loops when passing vtypes.
15720
15721 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
15722
15723         * mini-ppc.c: take into account the cpu errata for cache flushing
15724         which caused some random errors (bug #79381).
15725
15726 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
15727
15728         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
15729         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
15730
15731 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
15732
15733         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
15734         loaded.
15735
15736         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
15737         freebsd ports tree.
15738
15739         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
15740         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
15741
15742         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
15743         displacement.
15744
15745 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
15746
15747         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
15748
15749 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
15750
15751         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
15752         macro does not have to be changed during debugging.
15753
15754         * 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>.
15755
15756         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
15757
15758         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
15759         
15760         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
15761         MONO_ARCH_NO_EMULATE_MUL is defined.
15762
15763         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
15764
15765         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
15766
15767         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
15768
15769         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
15770         
15771 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
15772
15773         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
15774         stuff to mini-exceptions.c where it is used.
15775
15776         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
15777         setup code, the real one is in mini-exceptions.c.
15778
15779         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
15780         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
15781         some changes from the freebsd ports tree.
15782
15783         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
15784         constants.
15785         
15786         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
15787
15788 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
15789
15790         * mini.c: on Linux, check for /proc to be mounted
15791         (bug# 79351, novell bug#201204).
15792
15793 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
15794
15795         * mini.c: handle cases where pthread_attr_getstack() behaves
15796         incorrectly (bug #78096).
15797
15798 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
15799
15800         * mini-arm.c: support larger stack frames (bug #79272).
15801
15802 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
15803
15804         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
15805
15806         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
15807         tokens.
15808
15809         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
15810         mono_class_from_name () to find a class from its name.
15811
15812         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
15813
15814 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
15815
15816         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
15817
15818 2006-09-05  Kornel Pal  <kornelpal@gmail.com>
15819
15820         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
15821
15822 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
15823
15824         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
15825         callinfo->trampoline.
15826
15827         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
15828         fixes #79271.
15829         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
15830         future.
15831
15832 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
15833
15834         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
15835
15836 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
15837
15838         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
15839         stats.method_trampolines, it is already done by the generic trampoline code.
15840
15841         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
15842         
15843 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
15844
15845         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
15846
15847         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
15848
15849         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
15850
15851         * mini.c (print_jit_stats): Print mscorlib mempool size too.
15852         
15853         * mini.c (print_jit_stats): Print new stats.
15854
15855         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
15856
15857 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
15858
15859         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
15860         Address on two dimensional arrays. Fixes #78729.
15861
15862         * mini.h (MonoCompile): Add a 'skip_visibility' field.
15863
15864         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
15865         a method.
15866
15867         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
15868
15869         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
15870         #79130.
15871         
15872         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
15873         a race condition.
15874         (mini_get_ldelema_ins): Ditto.
15875
15876 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
15877
15878         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
15879         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
15880         Fixes #79213.
15881
15882 2006-08-29 Neale Ferguson <neale@sinenomine.net>
15883
15884         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
15885         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
15886
15887         * exceptions-s390x.c: Cosmetic change.
15888
15889         * tramp-s390.c: Fix warning.
15890
15891         * cpu-s390.md: Correct length of mul_imm.
15892
15893 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
15894
15895         * aot-compiler.c: added binary writer with ELF backend
15896         implementation (only on Linux/x86 for now).
15897
15898 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
15899
15900         * Makefile.am: Don't run net 2.0 AOT tests.
15901
15902         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
15903         (mono_compile_assembly): Skip net 2.0 assemblies as well.
15904
15905         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
15906
15907 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
15908
15909         * aot-compiler.c: simplified and refactored the asm-writing code
15910         to allow different backends.
15911
15912 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
15913
15914         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
15915
15916         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
15917         little. Share patches of type TYPE_FROM_HANDLE as well.
15918
15919         * mini.c (mono_patch_info_equal): New helper function.
15920         (mono_patch_info_hash): Ditto.
15921
15922         * aot-compiler.c (emit_method_code): Fix s390 build.
15923
15924         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
15925         is not handled because it is stored as a flag and not as a type ctor. Fixes
15926         #79016.
15927
15928 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
15929
15930         * aot-compiler.c: Fix computation of GOT slot statistics.
15931         
15932         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
15933         Also remove support for not PIC AOT.
15934
15935         * mini.h: Bump AOT file format version.
15936
15937         * objects.cs: Add a test for #78990.
15938
15939         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
15940         (peter.dettman@iinet.net.au). Fixes #79087.
15941
15942         * basic-long.cs: Add a test for the above.
15943
15944 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
15945
15946         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
15947         
15948         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
15949         code somewhat.
15950
15951 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
15952
15953         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
15954         exceptions.
15955
15956 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
15957
15958         * mini.c: Don't verify COM proxy invoke calls
15959         
15960
15961 2006-08-10  Dick Porter  <dick@ximian.com>
15962
15963         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
15964         which process is holding semaphores locked.
15965
15966 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
15967
15968         * mini-ia64.c mini-amd64.c: Fix #79027.
15969
15970         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
15971
15972         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
15973
15974         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
15975         implicit arguments in a vararg call. Fixes #79027.
15976
15977 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
15978
15979         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
15980         (mono_get_array_new_va_signature): Ditto.
15981
15982 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
15983
15984         * aot-runtime.c: Call init_plt lazily.
15985
15986         * inssel-long.brg: Fix unsigned long->int conversion.
15987
15988         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
15989
15990         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
15991         that most data is now in the .rss/.data section.
15992
15993 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
15994
15995         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
15996
15997         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
15998
15999         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
16000
16001         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
16002
16003         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
16004         virtual call. Fixes #79010.
16005
16006         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
16007         and use the result as the this argument in the real call.
16008
16009         * generics.2.cs: Add a new test for #79010.
16010         
16011 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
16012
16013         * mini-x86.c: Fix a warning.
16014
16015         * aot-compiler.c: Add a bunch of statistics.
16016
16017         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
16018
16019 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
16020
16021         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
16022
16023 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
16024
16025         * 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>.
16026
16027 2006-07-13  Miguel de Icaza  <miguel@novell.com>
16028
16029         * mini.c (mono_method_to_ir): Obtain the original method in the
16030         CIL stream and use this to perform validation.
16031
16032         Fixed: #78816
16033
16034 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
16035
16036         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
16037         (mono_arch_call_opcode): Ditto.
16038
16039         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
16040         #78826.
16041
16042         * mini.c (mono_patch_info_dup_mp): New helper function.
16043         
16044         * aot-compiler.c (compile_method): Fix some of the memory allocated during
16045         compilation. Fixes #78827.
16046
16047 2006-07-18  Kornel Pal  <kornelpal@gmail.com>
16048
16049         * declsec.c: Use original security informations for
16050           MONO_WRAPPER_MANAGED_TO_MANAGED.
16051
16052 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
16053
16054         * mini.c: Allow Com Interop methods/classes and
16055         don't verify COM wrapper calls
16056         
16057
16058 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
16059
16060         * inssel-long32.brg: Fix long->i4 checked conversion.
16061
16062         * exceptions.cs: Add a test for the above.
16063
16064 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
16065
16066         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
16067
16068         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
16069         leaks.
16070
16071         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
16072         #78775.
16073
16074 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
16075
16076         * mini.c: Fix solaris/x86 exception handling.
16077
16078         * Makefile.am: Get rid of $(ICU_LIBS).
16079
16080 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
16081
16082         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
16083         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
16084         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
16085
16086         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
16087
16088         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
16089         this function causes a SIGSEGV.
16090
16091 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
16092
16093         * mini.c: Remove unused solaris/x86 includes.
16094
16095 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
16096
16097         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
16098
16099 2006-06-20  Jb Evain  <jbevain@gmail.com>
16100
16101         * cpu-g4.md: fix max length of start_handler instruction.
16102
16103 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
16104         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
16105
16106 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
16107         * ssa.c: Fixed bug 78653 for SSA based deadce.
16108         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
16109         MonoInst.flags, used in SSA based deadce.
16110         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
16111         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
16112
16113 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
16114
16115         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
16116         it can end up using non executable memory on ppc64 systems
16117         running ppc32 userspace (fix from Johannes Berg).
16118
16119 2006-06-14  Dick Porter  <dick@ximian.com>
16120
16121         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
16122         4.1.1
16123
16124 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
16125         * mini.c: Made so that inline is locally disabled if it would
16126         trigger a .cctor, because too many apps depend on this behavior
16127         (which seems to be also the one of the MS CLR).
16128
16129 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
16130
16131         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
16132         No idea why this worked before.
16133
16134         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
16135         which branch to outer exception clauses since they could skip the
16136         inner finally clauses. Fixes #78633.
16137
16138         * exceptions.cs: Add a test for the above.
16139
16140         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
16141         Fixes #78629.
16142
16143         * iltests.il: Add a test for the above.
16144
16145 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
16146
16147         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
16148         after the end of a try bblock, to prevent asserts in mini_method_compile ().
16149
16150         * iltests.il: Add a test for the above.
16151
16152 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
16153
16154         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
16155         
16156         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
16157         methods as instrinsics.
16158
16159 2006-06-09  Wade Berrier <wberrier@novell.com>
16160
16161         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
16162         (simple-cee-ops.h ssapre-mini-ops.h)
16163
16164 2006-06-09  Neale Ferguson <neale@sinenomine.net>
16165
16166         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
16167         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
16168         instruction).
16169         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
16170         * cpu-s390x.md: Fix max. length values for a couple of instructions.
16171
16172 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
16173
16174         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
16175
16176 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
16177
16178         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
16179         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
16180         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
16181         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
16182         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
16183         of opcodes, so that bug 78549 should not happen again.
16184         * ssapre.c: Updated to use the renamed files.
16185
16186 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
16187
16188         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
16189         in OP_ATOMIC_EXCHANGE_I4.
16190
16191 2006-06-07  Wade Berrier <wberrier@novell.com>
16192
16193         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
16194         in mono_debugger_create_notification_function)
16195
16196 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
16197
16198         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
16199         
16200         * mini.c (type_from_stack_type): Disable some changes which do not
16201         seem to work.
16202
16203         * driver.c: Reenable opts.
16204
16205         * mini.h (MonoStackSlot): New structure to keep track of the verification state
16206         of the evaluation stack.
16207         
16208         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
16209         evaluation stack trace at entry to the bblock.
16210
16211         * mini.c (merge_stacks): New function to perform verification of stack merges.
16212         Turned off by default.
16213
16214         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
16215         STACK_MP.
16216         
16217 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
16218
16219         * local-propagation.c: Fixed bug 78549.
16220
16221 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
16222
16223         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
16224
16225 2006-06-02  Miguel de Icaza  <miguel@novell.com>
16226
16227         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
16228         tramp-arm.c, tramp-ia64.c
16229         (mono_debugger_create_notification_function): Update signature to
16230         new signature and use new protocol for creating the notification
16231         function.  
16232
16233         Should fix the build.
16234
16235 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
16236
16237         * exceptions-ppc.c (mono_jit_walk_stack)
16238         (ves_icall_get_frame_info): Fix the build
16239
16240 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
16241
16242         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
16243
16244 2006-05-31  Raja R Harinath  <rharinath@novell.com>
16245
16246         * il2tests.2.il: New file for generics CIL tests.  Add test for
16247         #78019.
16248         * Makefile.am: Update.
16249
16250         Fix #78019
16251         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
16252         to nullable types.
16253
16254 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
16255
16256         * aliasing.c: Fixed bug 78311.
16257
16258 2006-05-29  Martin Baulig  <martin@ximian.com>
16259
16260         * mini-exceptions.c (mono_find_jit_info): When computing the
16261         native offset, check whether we're actually inside the method's
16262         code; call mono_debug_print_stack_frame() to format the frame.
16263         (ves_icall_System_Exception_get_trace): Call
16264         mono_debug_print_stack_frame() to format the stack frame.
16265         (ves_icall_get_trace): Update to the new debugging API.
16266         (mono_jit_walk_stack_from_ctx): Likewise.
16267         (ves_icall_get_frame_info): Likewise.
16268
16269         * mini.c (get_method_from_ip): Use the new debugging API.
16270         (mono_print_method_from_ip): Likewise.
16271
16272         * exceptions-ppc.c
16273         (mono_jit_walk_stack): Use the new debugging API.
16274         (ves_icall_get_frame_info): Likewise.   
16275
16276 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
16277
16278         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
16279
16280 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
16281
16282         * mini.c: Added "limitator" to inline for debugging.
16283
16284 2006-05-24  Martin Baulig  <martin@ximian.com>
16285
16286         * debug-debugger.c (mono_debugger_init): Create a private,
16287         malloc()-based code manager for the notification function and
16288         intentionally leak it on exit.  This fixes the crash-on-exit race
16289         condition.
16290
16291         * tramp-amd64.c
16292         (mono_debugger_create_notification_function): Added
16293         `MonoCodeManager *' argument.
16294
16295         * tramp-x86.c
16296         (mono_debugger_create_notification_function): Added
16297         `MonoCodeManager *' argument.
16298
16299 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
16300
16301         * aliasing.c: Fixed 64 bit issue.
16302         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
16303         default since all known bugs are fixed (one more time!).
16304
16305 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
16306
16307         * mini.c: write barrier support.
16308
16309 2006-05-23  Martin Baulig  <martin@ximian.com>
16310
16311         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
16312         check at the top of the file.
16313
16314 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
16315
16316         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
16317         reverting changes without reason and without changelog entries.
16318
16319 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
16320
16321         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
16322         to a few opcodes. Fixes #78439.
16323
16324         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
16325         consistency with other archs.
16326
16327         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
16328
16329 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
16330
16331         * debug-debugger.c: fix the build.
16332
16333 2006-05-17  Martin Baulig  <martin@ximian.com>
16334
16335         * debug-debugger.c
16336         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
16337         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
16338         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
16339         (debugger_attach): Call GC_mono_debugger_add_all_threads().
16340
16341 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
16342
16343         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
16344
16345 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
16346
16347         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
16348         MONO_TYPE_GENERICINST.
16349         
16350         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
16351         MONO_TYPE_GENERICINST.
16352
16353 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
16354
16355         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
16356         #78325.
16357
16358 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
16359
16360         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
16361         mempool.
16362         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
16363
16364 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
16365
16366         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
16367         mono_trace_cleanup ().
16368
16369         * iltests.il: Fix problem with the newly added test.
16370
16371         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
16372         due to register constraints, free up the previous hreg. Fixes #78314.
16373
16374         * iltests.il: Add new test for #78314.  
16375
16376         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
16377         Interlocked.Add. Fixes #78312.
16378
16379         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
16380         
16381 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
16382
16383         * inssel.brg (mini_emit_virtual_call): Fix a warning.
16384
16385 2006-05-05  Martin Baulig  <martin@ximian.com>
16386
16387         * debug-mini.c (mono_debug_open_block): New method.
16388
16389         * mini-amd64.c
16390         (mono_arch_output_basic_block): Call mono_debug_open_block() at
16391         the beginning of each basic block.
16392
16393         * mini-x86.c
16394         (mono_arch_output_basic_block): Call mono_debug_open_block() at
16395         the beginning of each basic block.
16396
16397 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
16398
16399         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
16400         default until I understand why they break the build on amd64.
16401
16402 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
16403
16404         * mini.c (mini_cleanup): Call mono_cleanup ().
16405
16406         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
16407         errors.
16408
16409 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
16410
16411         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
16412         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
16413         default since all known bugs are fixed, and I cannot reproduce bug
16414         77944... I'm asking Matt Hargett to test again after this commit.
16415
16416 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
16417
16418         * mini-codegen.c: Fixed typo that thrashed inline.
16419
16420 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
16421
16422         * dominators.c (compute_dominators): Avoid using a worklist since
16423         it is not correct in some cases. Instead, iterate over all bblocks as
16424         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
16425
16426 2006-04-28  Miguel de Icaza  <miguel@novell.com>
16427
16428         * mini.c (mono_jit_compile_method_inner): Use
16429         mono_prepare_exception_from_error that resets the value
16430         internally.
16431
16432 2006-04-27  Miguel de Icaza  <miguel@novell.com>
16433
16434         * mini.c: Move the mini_loader_error_to_exception to metadata. 
16435         
16436 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
16437
16438         * aliasing.c: Fixed bug 78210.
16439
16440 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
16441
16442         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
16443         default until all their problems (or the ones they trigger) are fixed.
16444
16445 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
16446
16447         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
16448         
16449         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
16450         as loaded only after resolving patches since that could invoke the same method.
16451
16452         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
16453
16454         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
16455         functions.
16456
16457         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
16458         AOT loader.
16459
16460         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
16461         stack.
16462
16463         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
16464         made from AOT code through the PLT table.
16465
16466         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
16467         holding the plt offset when a call is made to the aot plt trampoline.
16468         
16469 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
16470
16471         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
16472         amd64 AOT support.
16473
16474         * Makefile.am (common_sources): Fix build breakage.
16475
16476         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
16477         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
16478         intra-assembly calls if possible.
16479         
16480         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
16481
16482         * mini-trampolines.c: Handle PLT entries.
16483
16484         * mini.c: Avoid creating a GOT var for calls.
16485
16486         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
16487         from mscorlib code.
16488
16489         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
16490         from mscorlib code.
16491
16492         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
16493         AOT code.       
16494
16495         * mini.h: Bump AOT file format version.
16496         
16497         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
16498         covers more cases.
16499
16500 2006-04-25  Martin Baulig  <martin@ximian.com>
16501
16502         * driver.c: Disable copyprop, consprop and inline when running
16503         inside the debugger.
16504
16505 2006-04-25  Martin Baulig  <martin@ximian.com>
16506
16507         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
16508         with `get_current_thread' and added `detach'.
16509         (MonoDebuggerMetadataInfo): Added `thread_size',
16510         `thread_tid_offset', `thread_stack_ptr_offset' and
16511         `thread_end_stack_offset'.
16512
16513 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
16514
16515         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
16516         aot-runtime.c.
16517
16518         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
16519         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
16520
16521         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
16522
16523         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
16524
16525         * aot.c: Add support for ADJUSTED_IID.  
16526
16527 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
16528
16529         * aot.c (emit_method_order): Don't align method_order_end.
16530
16531         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
16532         the interface ID changes.
16533
16534 2006-04-21  Dick Porter  <dick@ximian.com>
16535
16536         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
16537         cleaning up a thread.  Fixes the new part of bug 77470.
16538
16539 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
16540
16541         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
16542         to managed wrapper.
16543                      
16544 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
16545
16546         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
16547         
16548         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
16549         SIGSEGV. Fixes #78072.
16550
16551         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
16552         unregister our SIGABRT handler.
16553
16554 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
16555
16556         * mini.c: Disabled inline where it can alter the call stack in a
16557         way visible from managed code.
16558         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
16559         default.
16560
16561 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
16562
16563         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
16564         on other platforms. Fixes #78089.
16565
16566 2006-04-13  Martin Baulig  <martin@ximian.com>
16567
16568         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
16569         determine whether we're inside the debugger.
16570
16571         * debug-debugger.h
16572         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
16573
16574 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
16575
16576         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
16577         handler clauses. Fixes #78024.
16578
16579         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
16580         in the CALL_MEMBASE opcodes. Fixes #78088.
16581         (mono_arch_get_vcall_slot_addr): Ditto.
16582
16583 2006-04-10  Martin Baulig  <martin@ximian.com>
16584
16585         * debug-debugger.c: The thread handling code has now been moved
16586         into ../metadata/threads.c.
16587
16588 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
16589
16590         * driver.c (mono_main): Fix --with-gc=none build.
16591
16592         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
16593         (mono_spillvar_offset_float): Ditto.
16594         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
16595         hreg, not when its !global, since on ia64, there is a third category: stacked
16596         registers.      
16597
16598 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
16599
16600         * mini.c: set MonoInst->klass for load field address and a few other
16601         places.
16602
16603 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
16604
16605         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
16606
16607 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
16608
16609         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
16610         the branch opt changes.
16611
16612 2006-04-06  Dick Porter  <dick@ximian.com>
16613
16614         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
16615         
16616         * wapihandles.c (mini_wapi_seminfo): 
16617         * driver.c (mono_main): Add semaphore info option
16618
16619 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
16620
16621         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
16622         branch optimization changes. Fixes #78009.
16623
16624 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
16625
16626         * mini.c: ignore accessibility of methods in managed->native wrappers.
16627
16628 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
16629
16630         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
16631         
16632         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
16633
16634 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
16635
16636         * mini.c: Modify the branch optimizations to preserve the invariant that
16637         the entries inside the in_bb and out_bb arrays are unique.
16638         (mono_unlink_bblock): Avoid creation of new arrays.
16639
16640 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
16641
16642         * mini.c (mono_unlink_bblock): Fix regression caused by previous
16643         change (#77992).
16644
16645 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
16646
16647         * mini.c (optimize_branches): Remove the "optimizations" in
16648         the cbranch1/cbranch2 -> branch cases which were causing several
16649         problems in the past. Fixes #77986.
16650
16651 2006-03-31  Chris Toshok  <toshok@ximian.com>
16652
16653         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
16654         default optimizations :(
16655
16656 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
16657
16658         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
16659         branch.
16660
16661 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
16662
16663         * local-propagation.c: Added comments to structs and removed
16664         "Mono" prefixes from local tree mover types.
16665
16666 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
16667
16668         * Makefile.am (arch_sources): Define this for each architecture so 
16669         libmono_la_SOURCES is defined in one place.
16670
16671 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
16672
16673         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
16674         from handles/.
16675
16676 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
16677
16678         * driver.c: print the GC name supplied by configure.
16679
16680 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
16681
16682         * local-propagation.c: Added tree mover, and moved here all the
16683         local propagation code from mini.c
16684         * mini.c: Added support for treeprop, and moved all the local
16685         propagation code to local-propagation.c
16686         * mini.h: Added support for treeprop
16687         * driver.c: Added support for treeprop, enabled consprop, copyprop,
16688         treeprop, inline and deadce by default
16689         * Makefile.am: Added local-propagation.c
16690
16691 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
16692
16693         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
16694
16695 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
16696
16697         * debug-debugger.c: make it compile without the Boehm GC.
16698
16699 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
16700
16701         * mini.c: fixed issue with mismatch when an icall is registered
16702         with multiple names but same address.
16703
16704 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
16705
16706         * declsec.c, mini-exceptions.c: use write barrier to set reference
16707         fields of managed objects.
16708
16709 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
16710
16711         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
16712         (can_access_internals): Fix a warning.
16713
16714         * mini.c (print_method_from_ip): Rename this to 
16715         mono_print_method_from_ip so it gets exported.
16716
16717         * trace.c: Deal with strings inside StringBuilder's containing garbage
16718         and fix memory leaks. Fixes #77848.
16719
16720 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
16721
16722         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
16723         fixes #77787.
16724
16725 2006-03-16 Neale Ferguson <neale@sinenomine.net>
16726         
16727         * mini-s390.c: Remove OP_X86_TEST_NULL.
16728
16729 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
16730
16731         * mini.c: use the correct GetHashCode() for the moving collector.
16732
16733 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
16734
16735         * liveness.c: Regalloc spill cost tuning.
16736
16737 2006-03-15 Neale Ferguson <neale@sinenomine.net>
16738         
16739         * mini-s390x.h: Correct S390_LONG macro.
16740
16741         * mini-s390x.c: Cleanup unused code.
16742
16743 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
16744
16745         * jit-icalls.h: New file.
16746
16747         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
16748         icalls and include that instead of including jit-icalls.c.
16749
16750         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
16751         OP_X86 opcodes.
16752
16753 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
16754
16755         * mini.c: when checking for member accessibility, also check for
16756         friend assemblies and for explicit interface implementations.
16757
16758 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
16759
16760         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
16761
16762         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
16763
16764         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
16765         common cases are done first.    
16766
16767         * mini-ops.h: Only define platform specific opcodes on the given platform.
16768
16769         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
16770         branch.
16771         
16772 2006-03-14  Martin Baulig  <martin@ximian.com>
16773
16774         Revert Paolo's change from r57348:
16775
16776         * mini.h: don't use gboolean for bitfields.
16777         * mini.c: verifier changes for fields and methods accessibility.
16778
16779 2006-03-13  Neale Ferguson <neale@sinenomine.net>
16780
16781         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
16782
16783         * mini-s390x.c: Fix conv_r_un.
16784
16785         * cpu-s390, cpu-s390x.md: Fix lengths.
16786
16787 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
16788
16789         * mini.c: nested types have access to all the nesting
16790         levels, not just the enclosing types.
16791
16792 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
16793
16794         * mini.c: added a few more verification checks.
16795
16796 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
16797
16798         * liveness.c: Merge optimizations from the linear-il branch.
16799
16800 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
16801
16802         * mini-ia64.c (emit_call): Add a comment.
16803
16804         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
16805
16806         * tramp-ia64.c: Fix some warnings.
16807
16808 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
16809
16810         * mini.h: don't use gboolean for bitfields.
16811         * mini.c: verifier changes for fields and methods accessibility.
16812
16813 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
16814
16815         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
16816         lazy icall wrapper changes.
16817
16818         * dominators.c: Replace all the dominator algorithms with faster
16819         ones from the linear-il branch.
16820
16821         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
16822         the mempool.
16823
16824         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
16825         common cases are done first.
16826
16827         * mini-amd64.c: Fix some warnings.
16828
16829         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
16830         from the mempool.
16831
16832         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
16833         added code.
16834
16835         * mini.h: Add a missing prototype.
16836
16837 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
16838
16839         * mini.c: Compile icall wrappers lazily.
16840
16841         * mini-codegen.c: Use printf instead of g_print since its much faster.
16842
16843         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
16844         function.
16845
16846         * mini.c (optimize_branches): Cache the negative result from 
16847         remove_block_if_useless ().
16848
16849         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
16850         Also fix some bblock linking issues.
16851
16852         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
16853         assembly files.
16854
16855         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
16856
16857         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
16858         accessed fields first, for better cache behavior.
16859         
16860 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
16861
16862         * mini.c: speedup IList<T> array accesses.
16863
16864 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
16865
16866         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
16867         inline_costs counter. Fixes #77190.
16868
16869 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
16870
16871         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
16872         trace messages. Fixes #77706.
16873
16874 2006-03-04  Martin Baulig  <martin@ximian.com>
16875
16876         * tramp-amd64.c, tramp-x86.c
16877         (mono_debugger_create_notification_function): Use
16878         mono_global_codeman_reserve() to allocate a buffer at runtime and
16879         return it.
16880
16881         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
16882
16883         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
16884         notification function at runtime and then call `initialize' in the
16885         `MONO_DEBUGGER__debugger_info' vtable.
16886
16887 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
16888
16889         * iltests.il: Fix a visibility problem.
16890
16891 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
16892
16893         * driver.c, mini.c: add hooks for the counters API.
16894
16895 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
16896
16897         * driver.c: show disabled options.
16898
16899 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
16900
16901         * linear-scan.c: always use cost-driven selection.
16902
16903 2006-02-28  Raja R Harinath  <rharinath@novell.com>
16904
16905         * jit-icalls.c (helper_compile_generic_method): Revert change from
16906         2006-02-24.
16907
16908 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
16909
16910         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
16911
16912 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
16913
16914         * inssel.brg: style fixes, mostly to force the updated monoburg
16915         to run for people using svn.
16916
16917 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
16918
16919         * mini.c: match monoburg changes.
16920
16921 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
16922
16923         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
16924         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
16925         declaration in the header file.
16926
16927 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
16928
16929         * helpers.c: reduce relocations and mem usage.
16930
16931 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
16932
16933         * mini.h, mini-codegen.c: disable logging features if
16934         requested by configure.
16935
16936 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
16937
16938         * mini.c: tiny verifier changes.
16939
16940 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
16941
16942         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
16943         cpu-pentium.md: stack alignment changes for osx/x86,
16944         partially from Geoff Norton <gnorton@customerdna.com>.
16945
16946 2006-02-24  Raja R Harinath  <harinath@gmail.com>
16947
16948         * jit-icalls.c (helper_compile_generic_method): Update to changes
16949         in metadata/class.c.
16950
16951 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
16952         
16953         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
16954         
16955         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
16956         interface calls with large offsets.
16957
16958 2006-02-23  Raja R Harinath  <rharinath@novell.com>
16959
16960         * jit-icalls.c (helper_compile_generic_method): Document the
16961         special-case we depend on so that we can inflate the method twice
16962         with the same context with no bad side-effects.
16963
16964 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
16965
16966         * mini-x86.c, mini-amd64.c: fix for case when xen support
16967         is disabled.
16968
16969 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
16970
16971         * mini-x86.c, mini-amd64.c: generate code to access tls items
16972         in a faster way for Xen systems.
16973
16974 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
16975
16976         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
16977         updates and compilation fixes for the OSX/x86 port, mostly from
16978         Geoff Norton <gnorton@customerdna.com>.
16979
16980 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
16981
16982         * inssel.brg: faster interface call implementation
16983         to sync with the interface_offsets MonoVTable changes.
16984
16985 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
16986
16987         * mini.c: more verification checks.
16988
16989 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
16990
16991         * mini.c: added a few more verification checks.
16992
16993 2006-02-17      Neale Ferguson <neale@sinenomine.net>
16994
16995         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
16996         facility on the processor and use it if available.
16997
16998 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
16999
17000         * driver.c, aot.c, mini.c: throw exception if the IL code is
17001         invalid or unverifiable.
17002
17003 2006-02-17  Raja R Harinath  <rharinath@novell.com>
17004
17005         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
17006         m.StructField.
17007
17008 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
17009
17010         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
17011
17012 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
17013
17014         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
17015         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
17016         handling of instantiated generic valuetypes.
17017
17018 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
17019
17020         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
17021         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
17022         instead.
17023
17024         * generics.2.cs: Revert the nullable reftypes tests.
17025
17026 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
17027
17028         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
17029         using __builtin_frame_address (1) as it doesn't work in the presence
17030         of optimizations. Hopefully fixes #77273.
17031
17032         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
17033         -> generics.cs change as it doesn't work with some automake versions.
17034
17035 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
17036
17037         * mini.c: handle systems that sue a different way to
17038         retrieve the stack address of the current thread.
17039
17040 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
17041
17042         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
17043         it specially in the makefile.
17044
17045         * generics.2.cs: Add tests for nullable reference types.
17046
17047 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
17048
17049         * mini.c: always handle the case when mono_jit_init()
17050         is called in a thread different from the main thread,
17051         confusing libgc (bug #77309).
17052
17053 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
17054
17055         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
17056
17057 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
17058
17059         * mini.c: change optimize_branches () to use a single loop
17060         and introduce a new optimization to simplify some range checks.
17061
17062 2006-02-03  Martin Baulig  <martin@ximian.com>
17063
17064         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
17065         and merged with debugger_thread_manager_add_thread().
17066         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
17067         inform the debugger about the main thread.
17068
17069 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
17070
17071         * basic.cs: Add test for div.un/rem.un constant folding.
17072
17073 2006-02-03  Neale Ferguson <neale@sinenomine.net>
17074
17075         * cpu-s390x.md: correct int_xor_imm length
17076
17077 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
17078
17079         * generics.2.cs: New test for #77442.
17080
17081         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
17082         #77442.
17083
17084 2006-02-02  Martin Baulig  <martin@ximian.com>
17085
17086         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
17087         <mono/metadata/mono-debug-debugger.h>   
17088
17089         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
17090
17091 2006-02-02  Martin Baulig  <martin@ximian.com>
17092
17093         * debug-debugger.h: New header file for debug-debugger.c.
17094
17095         * debug-debugger.c: Big API cleanup; don't run the managed Main()
17096         function is a separate thread anymore; add support for attaching.
17097
17098 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
17099
17100         * tramp-x86.c: Fix a warning.
17101
17102 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
17103
17104         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
17105         on very large methods.
17106
17107         * aot.c (load_patch_info): Fix a warning.
17108
17109 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
17110
17111         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
17112         mini-ops.h: alu membase optimizations.
17113
17114 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
17115
17116         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
17117         to speedup StringBuilder.
17118
17119 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
17120
17121         * dominators.c (mono_compute_natural_loops): Fix detection of
17122         loop body start blocks.
17123
17124         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
17125
17126 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
17127
17128         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
17129         #75145.
17130
17131 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
17132
17133         * aliasing.c: Fixed aliasing issue on 64 bit archs.
17134
17135 2006-01-25  Martin Baulig  <martin@ximian.com>
17136
17137         * debug-debugger.c: Moved the `MonoDebuggerManager' and
17138         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
17139         started to cleanup this file a little bit.
17140
17141 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
17142
17143         * mini.c: optimize a codepath frequently happening in generics code.
17144
17145 2006-01-23  Martin Baulig  <martin@ximian.com>
17146
17147         * Makefile.am: Only compile debug-debugger.c on supported platforms.
17148
17149         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
17150         functions directly.
17151
17152         * driver.c: debug-debugger.c is only available if
17153         `MONO_DEBUGGER_SUPPORTED' is defined.   
17154
17155 2006-01-23  Martin Baulig  <martin@ximian.com>
17156
17157         * debug-debugger.c: Only enable this on platforms where the Mono
17158         Debugger is working (x86 and x86_64).
17159
17160 2006-01-21  Martin Baulig  <martin@ximian.com>
17161
17162         The Mono Debugger is now using the normal `mono' instead of the
17163         `mono-debugger-mini-wrapper' when executing managed code.
17164
17165         * debug-debugger.c: New file; previously known as
17166         debugger/wrapper/wrapper.c.
17167
17168         * debug-mini.c (mono_init_debugger): Removed.
17169
17170         * driver.c (mono_main): Added new `--inside-mdb' command line
17171         argument which is used when running inside the debugger.
17172
17173 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
17174
17175         * liveness.c (mono_analyze_liveness): Remove some unused data
17176         structures.
17177
17178 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
17179
17180         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
17181
17182 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
17183
17184         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
17185         depends on implementation details of monobitset.
17186
17187         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
17188         Fixes #77271.
17189
17190 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
17191
17192         * liveness.c: Update after monobitset changes.
17193
17194 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
17195
17196         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
17197
17198 2006-01-11 Neale Ferguson <neale@sinenomine.net>
17199
17200         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
17201
17202         * mini-s390x.c: Remove warning messages.
17203
17204 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
17205
17206         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
17207
17208 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
17209
17210         * generics.2.cs: Add ldelem/stelem_any test.
17211
17212 2006-01-10 Neale Ferguson <neale@sinenomine.net>
17213
17214         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
17215
17216 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
17217
17218         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
17219         
17220 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
17221
17222         * generics.2.cs: Reenable vtype tests.
17223
17224         * inssel-x86.brg: Remove an icorrect valuetype rule.
17225
17226 2006-01-06 Neale Ferguson <neale@sinenomine.net>
17227
17228         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
17229         initial support for OP_ABS.
17230
17231 2006-01-05 Neale Ferguson <neale@sinenomine.net>
17232
17233         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
17234
17235 2006-01-05 Neale Ferguson <neale@sinenomine.net>
17236
17237         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
17238         conversion and implement LADD/LSUB.
17239
17240         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
17241         architectures.
17242
17243 2006-01-05 Neale Ferguson <neale@sinenomine.net>
17244
17245         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
17246
17247         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
17248         architectures.
17249
17250 2006-01-05 Neale Ferguson <neale@sinenomine.net>
17251
17252         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
17253         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
17254         (stack walk problem).
17255
17256 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
17257
17258         * aot.c (mono_aot_load_method): Fix a warning.
17259
17260 2006-01-03  Neale Ferguson <neale@sinenomine.net>
17261
17262         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
17263
17264 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
17265
17266         * iltests.il: Add test for #77148.
17267
17268         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
17269         #77148.
17270
17271 2006-01-03  Neale Ferguson <neale@sinenomine.net>
17272
17273         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
17274
17275 2006-01-03  Neale Ferguson <neale@sinenomine.net>
17276
17277         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
17278         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
17279
17280         * basic-long.cs: Add lconv-to-r4/r8 tests.
17281
17282 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
17283
17284         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
17285
17286         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
17287         here as on other archs.
17288
17289 2005-12-29 Neale Ferguson <neale@sinenomine.net>
17290
17291         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
17292
17293 2005-12-29 Neale Ferguson <neale@sinenomine.net>
17294
17295         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
17296         
17297         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
17298
17299         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
17300         instrument_prolog; Add memory_barrier instruction.
17301
17302 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
17303
17304         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
17305
17306 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
17307
17308         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
17309
17310         * aliasing.c inssel.brg: Fix warnings.
17311
17312         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
17313         could skip initialization of some parts of memory.
17314
17315         * mini.c mini-ia64.c: Fix warnings.
17316
17317         * inssel-sparc.brg: Add an implementation of lneg which actually works.
17318
17319 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
17320
17321         * aliasing.c (mono_build_aliasing_information): Add a workaround for
17322         a crash seen on sparc.
17323
17324         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
17325         
17326         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
17327
17328 2005-12-21 Neale Ferguson <neale@sinenomine.net>
17329
17330         * mini-ops.h: Add s390_backchain instruction
17331
17332         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
17333
17334         * cpu-s390.md: Add s390_backchain instruction
17335
17336         * mini-s390.c: Significant ABI changes
17337
17338         * mini-s390.h: Cater for zero length structures
17339
17340 2005-12-20 Neale Ferguson <neale@sinenomine.net>
17341
17342         * mini-s390.c: ABI fixes
17343
17344         * inssel-s390.brg: Remove debug statements
17345
17346         * cpu-s390.md: Fix length of ATOMIC_xx operations
17347
17348 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
17349
17350         * basic-float.cs: Add float<->long conversion tests.
17351
17352 2005-12-16 Neale Ferguson <neale@sinenomine.net>
17353
17354         * mini-s390.c: Fix LOCALLOC processing.
17355
17356         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
17357
17358 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
17359
17360         * iltests.il: Add tests for some opcodes not covered by the other
17361         tests.
17362
17363 2005-12-15 Neale Ferguson <neale@sinenomine.net>
17364
17365         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
17366         register loading for Tail processing; Correct trace output.
17367
17368         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
17369
17370         * cpu-s390.md: Correct size of jmp instruction. 
17371
17372 2005-12-13 Neale Ferguson <neale@sinenomine.net>
17373
17374         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
17375
17376 2005-12-13 Neale Ferguson <neale@sinenomine.net>
17377
17378         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
17379           Bring s390 up to current level.
17380
17381 2005-12-12  Zltan Varga  <vargaz@gmail.com>
17382
17383         * generics.2.cs: Disable the newly added tests as they do not work yet.
17384         
17385         * generics.2.cs: Add valuetype tests.
17386
17387 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
17388
17389         * basic-long.cs: Add i4->u8 test.
17390
17391         * objects.cs: Add tests for JIT intrinsic.
17392
17393         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
17394         optimizations lost by a mistake.
17395
17396 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
17397
17398         * basic-long.cs: Remove a test moved to objects.cs.
17399
17400         * arrays.cs: Add more array tests.
17401
17402 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
17403
17404         * arrays.cs: Add new tests for multi-dimensional arrays.
17405
17406 2005-12-06  Raja R Harinath  <rharinath@novell.com>
17407
17408         * Makefile.am (test_sources2): Add generics.2.cs.
17409         (EXTRA_DIST): Add test_sources2.
17410
17411 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
17412
17413         Support for boxing and unboxing nullable types as well as the
17414         isinst operation on nullables, per the CLI ammendment.
17415
17416         * inssel.brg (CEE_ISINST): Special case for nullable
17417
17418         * mini.c (handle_unbox_nullable): new method
17419         (handle_box): Special case for nullable types
17420         (mono_method_to_ir): Call handle_unbox_nullable in correct
17421         places.
17422
17423         * generics.2.cs: New test suite
17424
17425         * Makefile.am: Support for regression tests with generics.
17426
17427 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
17428
17429         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
17430         allocated to registers. Fixes #76800.
17431
17432 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
17433
17434         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
17435
17436 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
17437
17438         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
17439         of platforms.
17440
17441 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
17442
17443         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
17444         objects.cs.
17445
17446         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
17447         
17448         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
17449 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
17450
17451         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
17452         single precision before storing to a single precision location.
17453
17454 2005-11-28  Raja R Harinath  <rharinath@novell.com>
17455
17456         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
17457
17458 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
17459
17460         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
17461         correct files.
17462
17463         * basic.cs: Remove test_0_byte_compares test which was moved to
17464         objects.cs a long time ago.
17465
17466 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
17467
17468         * aliasing.c: Fixed aliasing issue on 64 bit archs.
17469
17470 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
17471
17472         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
17473         handlers are called.
17474
17475         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
17476         throwing code.
17477
17478          * mini-ia64.c: Add support for the throw->branch exception 
17479         optimization.   
17480
17481         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
17482
17483 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
17484
17485         * mini.c: Enabled "fastpath" deadce :-)
17486         
17487 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
17488
17489         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
17490         alias analysis pass to support it.
17491         * mini.h: Likewise.
17492         * ssa.c: Likewise.
17493         * liveness.c: Likewise (liveness computation can use aliasing
17494         information to be more accurate).
17495         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
17496         moreover made so that "--compile-all" uses the given optimization
17497         flags and not the default ones.
17498         * aliasing.c: Alias analysis (new file).
17499         * aliasing.h: Likewise.
17500         * Makefile.am: added "aliasing.c" and "aliasing.h".
17501         
17502 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
17503
17504         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
17505         OP_L opcodes.
17506
17507 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
17508
17509         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
17510         fp >= end_of_stack exit condition, as it is not needed, and it might
17511         become true for fp eliminated frames.
17512
17513 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
17514
17515         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
17516         coded offsets.
17517
17518 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
17519
17520         * mini-arm.c: fixed alignment of doubles/longs to match
17521         the C ABI (bug #76635).
17522
17523 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
17524
17525         * aot.c: fix compilation with --enable-minimal=aot.
17526
17527 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
17528
17529         * mini-arm.c: fixed compatibility with the new
17530         floating point emulator package for compares.
17531
17532 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
17533
17534         * mini.c : reverted sig->pinvoke changes (r51396-51397).
17535
17536 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
17537
17538         * mini-exceptions.c (print_stack_frame): Output to stderr.
17539         (mono_handle_native_sigsegv): Ditto.
17540
17541 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
17542
17543         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
17544         OP_LCONV_TO_OVF_I implementation.
17545
17546         * mini-amd64.c: Add support for the throw->branch exception 
17547         optimization.
17548
17549         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
17550         when the catch clause catches a more general exception, i.e. Object.
17551
17552 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
17553
17554         * cpu-ia64.md: Remove unused opcodes.
17555
17556         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
17557         specific defines for architectures defining USE_SIGACTION.
17558
17559         * mini-ia64.c: Fix some warnings.
17560
17561         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
17562         version seemed to skip a frame.
17563
17564 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
17565
17566         * mini.c: Clean up the usage of sig->pinvoke flag. Now
17567         only calls which are made to native code use this flag.
17568
17569 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
17570
17571         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
17572         varargs methods as well.
17573         
17574         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
17575         which have save_lmf set. Reorganize methods prologs a bit.
17576
17577         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
17578         debugger to the proper place.
17579
17580 2005-10-29  Martin Baulig  <martin@ximian.com>
17581
17582         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
17583         when running inside the debugger until the debugger has support
17584         for it.
17585
17586 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
17587
17588         * mini.h: Fix a warning.
17589
17590 2005-10-24  Miguel de Icaza  <miguel@novell.com>
17591
17592         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
17593         we expose publicly, this returns the string.
17594
17595 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
17596
17597         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
17598         with fp elimination.
17599
17600 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
17601
17602         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
17603         native stacktrace using the glibc 'backtrace' function if available.
17604
17605 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
17606
17607         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
17608
17609         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
17610         handle SIGSEGVs received while in native code.
17611
17612         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
17613         code, call mono_handle_native_sigsegv which will abort the runtime
17614         after printing some diagnostics, instead of converting it into a
17615         confusing NullReferenceException.
17616
17617 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
17618
17619         * cpu-pentium.md: Remove unused opcodes.
17620
17621 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
17622
17623         * mini-amd64.h (MonoLMF): Add rsp field.
17624
17625         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
17626         the lmf too.
17627
17628 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
17629
17630         * mini-codegen.c (get_register_spilling): Fix some warnings.
17631
17632 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
17633
17634         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
17635         elimination during exception handling. Enable fp elimination by
17636         default.
17637
17638         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
17639         elimination.
17640
17641 2005-10-16  Martin Baulig  <martin@ximian.com>
17642
17643         * mini-exceptions.c
17644         (mono_debugger_run_finally): New public method for the debugger.
17645
17646 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
17647
17648         * debug-mini.c (mono_debug_init_method): Fix warning.
17649
17650         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
17651         the 'exname' parameter const to fix some warnings.
17652
17653 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
17654
17655         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
17656         introduced by the previous patch.
17657
17658 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
17659
17660         * basic-float.cs: Add test for precision of float arithmetic.
17661
17662         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
17663         when loading/storing single values from/to memory.
17664
17665         * mini.c (mono_jit_compile_method_with_opt): Create the function
17666         pointers in the correct domain.
17667
17668 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
17669
17670         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
17671         introduced by previous patch.
17672         
17673         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
17674         when out_filter_idx is NULL.
17675
17676         * mini-exceptions.c: Don't run filter clauses twice during exception
17677         handling. Fixes #75755.
17678
17679 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
17680
17681         * aot.c: Add support for ldflda wrappers.
17682
17683         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
17684         #75902.
17685
17686 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
17687
17688         * mini.c, mini.h: do not consider exception handlers blocks when
17689         setting up interface variables.
17690
17691 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
17692
17693         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
17694
17695 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
17696
17697         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
17698         causes a regression.
17699
17700         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
17701
17702 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
17703
17704         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
17705         of the OP_P definitions.
17706
17707         * TODO: Add a proposal for dealing with the CEE/OP mess.
17708
17709         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
17710         optimizations from the x86 port.
17711
17712         * cpu-amd64.md: Ditto.
17713
17714         * basic.cs basic-long.cs: Add tests.
17715
17716 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
17717
17718         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
17719         Patrik Torstensson's implementation of my exception-handling
17720         optimization idea, when the exception object is not used
17721         (bug #62150).
17722
17723 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
17724
17725         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
17726         of the mul_imm optimizations from the old jit.
17727
17728 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
17729
17730         * mini.c, liveness.c: patch by Patrik Torstensson and
17731         Zoltan Varga to improve performance in methods with
17732         exception clauses.
17733
17734 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
17735
17736         * driver.c: Remove 'Globalization' entry from --version.
17737
17738 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
17739
17740         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
17741         there is a profiler interested in JIT events.
17742
17743         * aot.c: Load profile files produced by the AOT profiling module, and
17744         reorder methods based on the profiling info. Add a 'method_order' table
17745         to the AOT file to make mono_aot_find_jit_info work with the reordered
17746         methods.
17747
17748         * mini.h: Bump AOT file version info.
17749
17750 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
17751
17752         * mini-arm.h: work around what looks like a gcc bug when optimizations
17753         are enabled.
17754
17755 2005-09-28  Raja R Harinath  <rharinath@novell.com>
17756
17757         * Makefile.am (AM_CFLAGS): Don't use += to append inside
17758         conditionals.  Use ...
17759         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
17760
17761 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
17762
17763         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
17764         to determine the amount of memory to copy when passing valuetypes.
17765
17766         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
17767         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
17768
17769 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
17770
17771         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
17772         information about aot.
17773
17774 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
17775
17776         * *.c: Replace the use of {Enter,Leave}CriticalSection with
17777         macros. This will allow a deadlock debugger to easily be plugged
17778         in.
17779
17780 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
17781
17782         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
17783
17784 2005-09-27  Raja R Harinath  <rharinath@novell.com>
17785
17786         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
17787         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
17788         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
17789         ($(arch_built)) [CROSS_COMPILING]: Error out.
17790
17791 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
17792
17793         * aot.c: Add support for the no_special_static flag for classes.
17794
17795 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
17796
17797         * Reapply reverted patches.
17798
17799         * *: Revert r50174 as well.
17800
17801         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
17802
17803 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
17804
17805         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
17806
17807 2005-09-23  Miguel de Icaza  <miguel@novell.com>
17808
17809         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
17810         part of the SIG_HANDLER_SIGNATURE.  
17811
17812 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
17813
17814         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
17815         statistics.
17816
17817         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
17818         introduced by previous patch.
17819
17820 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
17821
17822         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
17823         saved registers too.
17824
17825         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
17826         upon the information returned by get_call_info ().
17827         
17828         * mini-x86.c (add_float): Fix stack size calculation.
17829         (mono_arch_call_opcode): Rewrite this so it works based up the
17830         information returned by get_call_info ().
17831         (mono_arch_get_this_vret_args): Ditto.
17832
17833 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
17834
17835         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
17836         in cinfo to determine the registers which need to be used.
17837
17838 2005-09-20  Miguel de Icaza  <miguel@novell.com>
17839
17840         * driver.c (mono_main): Add --server and --desktop flags. 
17841
17842 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
17843
17844         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
17845         registers as global registers.
17846
17847         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
17848         longer needed with the new register allocator.
17849
17850         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
17851
17852         * cpu-ia64.md: Remove unused opcodes.
17853         
17854         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
17855         
17856 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
17857
17858         * cpu-amd64.md: Remove unused opcodes.
17859
17860         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
17861         needed with the new register allocator.
17862
17863         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
17864         reg-reg moves.
17865
17866 2005-09-16  Raja R Harinath  <rharinath@novell.com>
17867
17868         * Makefile.am (check-local): Don't invoke semdel-wrapper.
17869
17870 2005-09-16  Martin Baulig  <martin@ximian.com>
17871
17872         * exceptions-amd64.c
17873         (throw_exception): Don't call mono_debugger_throw_exception() if
17874         we're a rethrow - see the FIXME in the code.
17875
17876 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
17877
17878         * mini.c (mono_init_exceptions): This only works on some architectures.
17879         
17880 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
17881
17882         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
17883         on ia64.
17884
17885         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
17886
17887         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
17888         now in mini-exceptions.c.
17889
17890 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
17891
17892         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
17893         now in mini-exceptions.c.
17894
17895 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
17896
17897         * exceptions-x86.c: Applied patch from Patrik Torstensson 
17898         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
17899
17900         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
17901         code into mini-exceptions.c. Add some assertions to it.
17902
17903 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
17904
17905         * aot.c (emit_section_change): Applied patch from "The Software Team" 
17906         (<software@solmersa.com>). Fix as errors on windows.
17907
17908 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
17909
17910         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
17911         method info into the LMF.
17912
17913 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
17914         
17915         * mini-ia64.c: Add proper unwind info for method epilogs.
17916
17917         * exceptions-ia64.c: Add some code to help debugging.
17918         
17919         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
17920
17921         * mini-exceptions.c: Fix warning.
17922
17923 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
17924
17925         * mini.c: Really fix build.
17926
17927         * mini-x86.c mini-amd64.c: Fix build.
17928
17929 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
17930
17931         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
17932
17933         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
17934         some Interlocked methods as intrinsics.
17935
17936         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
17937         for Thread methods as well.
17938
17939         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
17940
17941         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
17942
17943         * mini-ia64.c mini-x86.c mini-amd64.c 
17944         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
17945         OP_MEMORY_BARRIER.
17946         
17947         * mini.c (mono_init_exceptions): Fix build breakage.
17948
17949 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
17950
17951         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
17952         of instructions. Use the new ia64_unw_op macros for emitting unwind
17953         info.
17954
17955         * mini.c (mono_init_exceptions): Initialize exception handling
17956         related trampolines at startup.
17957
17958 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
17959
17960         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
17961
17962 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
17963
17964         * mini.c: Handle type loading errors gracefully during compilation and
17965         throw the appropriate exception.
17966
17967 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
17968
17969         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
17970         for the mono binary.
17971
17972 2005-09-09  Martin Baulig  <martin@ximian.com>
17973
17974         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
17975         the release.
17976
17977 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
17978
17979         * mini-arm.h: use emulation for conv.r.un for the release.
17980
17981 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
17982
17983         * mini-arm.c, objects.cs: more fixes and tests for them.
17984
17985 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
17986
17987         * mini-arm.c: align structures to at least 4 bytes to be able
17988         to keep our current optimized memcpy.
17989
17990 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
17991
17992         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
17993
17994 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17995
17996         * mini.c: ignore SIGPIPE.
17997
17998 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
17999
18000         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
18001
18002         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
18003
18004 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
18005
18006         * mini.h: Add prototype for mono_allocate_stack_slots_full.
18007
18008 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
18009
18010         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
18011         exception handling support.
18012         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
18013         patch by Brian Koropoff <briank@marakicorp.com>).
18014
18015 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
18016
18017         * mini.c: revert another 'optimization' which breaks when
18018         items on the eval stack need to be saved at a basic block end
18019         (bug #75940).
18020
18021 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
18022
18023         * jit-icalls.c: for arrays, ensure we always provide
18024         lower bounds.
18025
18026 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
18027
18028         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
18029         
18030         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
18031
18032 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
18033
18034         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
18035         arguments in their original register.
18036
18037 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
18038
18039         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
18040         memset/memcpy.
18041
18042         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
18043         when ssapre is enabled.
18044
18045         * inssel-long.brg: Fix bug in previous patch.
18046
18047         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
18048         multiplication by a constant.
18049
18050 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
18051
18052         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
18053         icc.
18054
18055         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
18056         saving registers.
18057
18058 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
18059
18060         * inssel-arm.brg: apply changes tested by Brian Koropoff
18061         <briank@marakicorp.com>.
18062
18063 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
18064
18065         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
18066         
18067 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
18068
18069         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
18070         to the same register if dreg is just a base register.
18071         (print_ins): Improve printing of membase opcodes.
18072
18073         * inssel-x86.brg: Add optimized ldind(reg) rules.
18074
18075         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
18076
18077 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
18078
18079         * mini.c: when running under valgrind, set the stack bottom for
18080         the GC at the actual approximate stack for the app (fixes running
18081         mono with valgrind).
18082
18083 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
18084
18085         * mini.c: do no break at the first valuetype to init found
18086         (fixes bug #75791).
18087
18088 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
18089
18090         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
18091
18092 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
18093
18094         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
18095
18096 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
18097
18098         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
18099
18100 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
18101
18102         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
18103
18104         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
18105         code.
18106
18107         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
18108         code.
18109
18110         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
18111         methods.
18112
18113 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
18114
18115         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
18116
18117 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
18118
18119         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
18120         in the tail recursion optimization.
18121
18122         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
18123         debug info into the assembly file.
18124
18125         * iltests.il: Add test for filter regions.
18126
18127         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
18128         initial stack of filter regions. Fixes #75755.
18129
18130 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
18131
18132         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
18133         stack requirements.
18134
18135 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
18136
18137         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
18138         the check for an already compiled method on non-ia64 platforms.
18139         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
18140         proper domain.
18141
18142         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
18143
18144         * inssel-x86.brg: Add some optimized call rules.
18145
18146 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
18147
18148         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
18149         method here.
18150
18151         * mini.h mini-trampolines.c: Pass the trampoline argument to 
18152         mono_arch_patch_delegate_trampoline.
18153
18154         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
18155
18156         * mini-trampolines.c: Fix build.
18157
18158         * mini-amd64.h: Add delegate trampolines.
18159
18160         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
18161
18162         * inssel-amd64.brg: Add optimized call rules.
18163         
18164         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
18165
18166         * inssel-ia64.brg: Add optimized ldind(reg) rules.
18167
18168 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
18169
18170         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
18171         change.
18172
18173         * mini-ia64.c: Remove LMF fixmes.
18174
18175         * mini-ia64.h: Remove most fields from LMF.
18176
18177         * inssel-ia64.brg (stmt): Fix unaligned access errors.
18178
18179         * mini-trampolines.c: Add support for IA64 function descriptors.
18180
18181         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
18182         for IA64 function descriptors.
18183
18184 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
18185
18186         * tramp-arm.c: patch the vtable for virtual calls. Added
18187         support code to register/unregister the LMF.
18188         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
18189         more LMF work.
18190
18191 2005-08-19  Dick Porter  <dick@ximian.com>
18192
18193         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
18194         bit value if needed.
18195
18196 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
18197
18198         * mini.c (mini_get_method): Move handling of wrapper data here.
18199
18200         * mini.c (mono_method_to_ir): Add support for dynamic methods.
18201
18202         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
18203         virtual.
18204
18205         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
18206         bblock->code does not remain empty.
18207
18208 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
18209
18210         * arrays.cs: Add regression test for #75832.
18211
18212         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
18213         rules. Fixes #75832.
18214
18215         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
18216         instruction scheduling.
18217
18218 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
18219
18220         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
18221
18222 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
18223
18224         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
18225
18226         * mini-codegen.c: Fix VC build.
18227
18228         * cpu-pentium.md: Increase length of atomic_exhange_i4.
18229
18230 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18231
18232         * mini.h: fix signature for mono_register_opcode_emulation.
18233
18234 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
18235
18236         * mini.c: Get rid of most of the helper_sig_... constants using
18237         mono_create_icall_signature ().
18238
18239 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
18240
18241         * jit-icalls.c (helper_ldstr): New helper function.
18242
18243         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
18244
18245         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
18246         throw, load the string using a helper call instead of creating a string object.
18247
18248         * aot.c: Update after LDSTR changes.
18249
18250         * mini.h: Bump AOT file version.
18251         
18252         * aot.c: Save class size info into the AOT file. Print more statistics during
18253         compilation.
18254
18255         * mini.h: Bump AOT file version.
18256
18257         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
18258         ordering of disasm cases. Fixes #74957.
18259
18260 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
18261
18262         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
18263         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
18264         the generic code needed for the ARM port.
18265
18266 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
18267
18268         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
18269         inssel-arm.brg: more ARM features and fixes.
18270
18271 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
18272
18273         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
18274         ARM port work in progress.
18275
18276 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
18277
18278         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
18279
18280         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
18281
18282         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
18283
18284         * inssel.brg (mini_emit_memset): Add support for unaligned access.
18285
18286         * *-ia64.*: Ongoing IA64 work.
18287         
18288         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
18289
18290 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
18291
18292         * TODO: Remove out-of-data todo stuff.
18293
18294         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
18295         dead code.
18296
18297         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
18298
18299         * mini.h: Bump corlib version.
18300
18301 2005-07-27  Martin Baulig  <martin@ximian.com>
18302
18303         * mini-codegen.c
18304         (create_copy_ins): Added `const unsigned char *ip' argument; set
18305         `copy->cil_code' from it.
18306
18307 2005-07-27  Martin Baulig  <martin@ximian.com>
18308
18309         * mini-exceptions.c (mono_handle_exception): Don't call
18310         mono_debugger_handle_exception() for filters.
18311
18312 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
18313
18314         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
18315         as well.
18316
18317 2005-07-26  Martin Baulig  <martin@ximian.com>
18318
18319         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
18320
18321         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
18322         helper_compile_generic_method() if the method is actually virtual
18323         and non-final.
18324
18325 2005-07-26  Martin Baulig  <martin@ximian.com>
18326
18327         * mini.c
18328         (trampoline_code): Renamed to `mono_trampoline_code' and made it
18329         public; this is now accessed directly by the debugger.
18330         (mono_generic_trampoline_code): Removed.
18331
18332         * debug-mini.c
18333         (mono_debug_init_method): Also add interncalls and wrappers.
18334
18335 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
18336
18337         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
18338
18339 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
18340
18341         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
18342
18343 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
18344
18345         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
18346
18347 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
18348
18349         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
18350         getting TLS offsets on AMD64 too.
18351
18352 2005-07-20  Kornel Pal <kornelpal@hotmail.com>
18353
18354         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
18355
18356 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
18357
18358         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
18359         inssel-arm.brg, mini-arm.h: ARM port work in progress.
18360
18361 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
18362
18363         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
18364
18365         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
18366         to mini.c.
18367
18368         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
18369         mono_sparc_is_virtual_call ().
18370         
18371         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
18372
18373         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
18374         trampoline parameters.
18375
18376         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
18377         
18378         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
18379         to mono_arch_get_vcall_slot_addr.
18380
18381         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
18382         trampoline code.
18383
18384         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
18385
18386 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
18387
18388         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
18389
18390 2005-07-19  Martin Baulig  <martin@ximian.com>
18391
18392         * exceptions-amd64.c (throw_exception): Call
18393         mono_debugger_throw_exception() here like we're doing it on i386.
18394
18395 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
18396
18397         * mini-ia64.c: Add optimized TLS access support.
18398
18399 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
18400
18401         * mini-exceptions.c: Ongoing IA64 work.
18402
18403         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
18404
18405         * mini.c: Use the default optimization set when embedding. Fixes
18406         #75194.
18407
18408 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
18409
18410         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
18411         of trampolines to a separate file.
18412
18413         * mini-trampolines.c: New file.
18414
18415         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
18416         separate file.
18417         
18418         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
18419         amd64/ia64 code.
18420
18421         * mini-codegen.c: Fix cygwin build.
18422
18423 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
18424
18425         * mini.c: Add some minor changes needed by the IA64 port.
18426
18427         * *-ia64.*: Ongoing IA64 work.
18428
18429 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
18430
18431         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
18432         trampolines into arch-independent and arch-dependent parts.
18433
18434         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
18435
18436 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
18437
18438         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
18439
18440         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
18441         the xp-regalloc-branch for amd64.
18442
18443         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
18444         xp-regalloc-branch for x86.
18445
18446 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
18447
18448         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
18449
18450 2005-07-06  Martin Baulig  <martin@ximian.com>
18451
18452         * mini.c
18453         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
18454         (mono_jit_runtime_invoke): Likewise.
18455
18456 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
18457
18458         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
18459         on x86 too.
18460         
18461         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
18462         without loading their metadata. Reorganize the file format so exception handling+
18463         debug info is kept separate from normal method info. Create MonoJitInfo 
18464         structures for methods lazily.
18465
18466         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
18467         loading metadata.
18468         (x86_class_init_trampoline): Patch AOT class init trampolines too.
18469
18470         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
18471
18472         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
18473         in AOT code.
18474
18475         * mini.h: Bump AOT file version.
18476
18477 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
18478
18479         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
18480
18481 2005-07-01  Raja R Harinath  <rharinath@novell.com>
18482
18483         * Makefile.am (check-local): Call semdel-wrapper.
18484
18485 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
18486
18487         * mini-x86.c: Revert the last change as it seems to break the build..
18488
18489 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
18490
18491         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
18492         
18493         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
18494
18495 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
18496
18497         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
18498         outside of the macro, so strange stuff doesn't happen with gcc4
18499         (NEW_AOTCONST_TOKEN): Likewise.
18500
18501 2005-06-28  Martin Baulig  <martin@ximian.com>
18502
18503         * mini.c (mini_class_is_system_array): New static method; use this
18504         instead of `klass->parent == mono_defaults.array_class' everywhere
18505         since this also works for the new generic array class.
18506
18507 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
18508
18509         * inssel.brg: Remove warnings.
18510
18511 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
18512
18513         * mini-ia64.c: Ongoing IA64 work.
18514
18515         * basic-float.cs: Add float->i1 conversion test.
18516
18517         * iltests.il: Add conv.u4 test.
18518
18519 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
18520
18521         * inssel-long.brg: Fix bug caused by last change.
18522
18523 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
18524
18525         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
18526         BSDs.  Allows the x86 JIT to work on OSX86
18527
18528 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
18529
18530         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
18531         u4->i8 conversion.
18532
18533         * mini-ia64.c: Ongoing IA64 work.
18534
18535 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
18536
18537         * mini-ia64.c: Ongoing IA64 work.
18538
18539         * driver.c: Clean up jit_code_hash as well when using --regression.
18540
18541         * inssel-long.brg: Fix long->i4/u4 conversion rules.
18542
18543         * basic-long.cs: Add tests for long->u4 conversion.
18544
18545 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
18546
18547         * mini.c: Take mono_get_domainvar out of macros. This makes sure
18548         that we do not depend on undefined C behavior: the order stuff
18549         gets evaluated within an expression. Fixes mono when compiled on
18550         GCC 4.
18551
18552 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
18553
18554         * *-ia64.*: Ongoing IA64 work.
18555
18556         * aot.c: Lower memory usage while loading AOT methods.
18557
18558         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
18559
18560         * mini.h: Bump AOT file format version.
18561
18562 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
18563
18564         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
18565
18566 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
18567
18568         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
18569         not on callee assembly). Fixed some comments.
18570
18571 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
18572
18573         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
18574         it gets proper disassembly.
18575         (emit_method_info): Remove some dead code.
18576
18577         * mini.c (mini_method_compile): Allways allocate the GOT var in
18578         mono_method_to_ir for emulating opcodes.
18579
18580 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
18581
18582         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
18583         before freeing the code memory. Fixes #74990.
18584
18585         * objects.cs: Add regression test for #74992.
18586
18587         * liveness.c: Extend live ranges of arguments to the beginning of the
18588         method. Fixes #74992.
18589
18590         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
18591         so it points into the faulting instruction.
18592
18593 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
18594
18595         * jit-icalls.c (mono_imul_ovf): Add exception handling.
18596
18597         * *-ia64.*: Ongoing IA64 work.
18598
18599         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
18600
18601 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
18602
18603         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
18604
18605         * *-ia64.*: Ongoing IA64 work.
18606
18607 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
18608
18609         * basic-long.cs: Add tests for add/sub.ovf.
18610
18611         * basic.cs: Add tests for sub.ovf.
18612
18613         * *-ia64.*: Ongoing IA64 work.
18614
18615 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
18616
18617         * *-ia64.*: Ongoing IA64 work.
18618
18619         * basic.cs: Add conv.ovf.i4.un test.
18620
18621 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
18622
18623         * mini.c: (remove_block_if_useless) Fixed bug 75061.
18624         
18625 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18626
18627         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
18628
18629 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
18630
18631         * *-ia64.*: Ongoing IA64 work.
18632
18633 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18634
18635         * trace.[ch]:
18636         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
18637
18638 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
18639
18640         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
18641
18642 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
18643
18644         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
18645
18646         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
18647         of a call is callable by a near call.
18648
18649 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
18650
18651         * mini-ia64.c: Ongoing IA64 work.
18652
18653 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
18654
18655         * genmdesc.c: Make the generated array non-static.
18656
18657         * inssel-long.brg: Fix LSHR_IMM rule.
18658
18659         * *-ia64.*: Ongoing IA64 work.
18660
18661         * *-ia64.*: Ongoing IA64 work.
18662
18663 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
18664
18665         * *-ia64.*: Ongoing IA64 work.
18666
18667         * *-ia64.*: Ongoing IA64 work.
18668         
18669         * mini-ia64.c: Ongoing IA64 work.
18670
18671         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
18672
18673 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
18674
18675         * objects.cs basic-calls.cs: Move some tests to objects.cs.
18676         
18677         * objects.cs basic-long.cs: Move some tests to objects.cs.
18678
18679 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
18680
18681         * *-ia64.*: Ongoing IA64 work.
18682
18683         * iltests.il: Add a new test.
18684
18685         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
18686         newobj. Fixes #75042.
18687
18688 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
18689
18690         * *-ia64.*: Ongoing IA64 work.
18691         
18692         * *-ia64.*: Ongoing IA64 work.
18693         
18694         * *-ia64.*: Ongoing IA64 work.
18695
18696         * basic.cs objects.cs: Move tests accessing static variables as well.
18697
18698         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
18699
18700 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
18701
18702         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
18703
18704         * driver.c: Always print failed tests.
18705
18706         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
18707         frame pointer.
18708
18709         * *ia64*: Ongoing IA64 work.
18710
18711 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
18712
18713         * basic.cs: Add tests for add.ovf. Fix warnings.
18714
18715 2005-05-18  Miguel de Icaza  <miguel@novell.com>
18716
18717         * driver.c (mono_main): Avoid crash if no argument is passed to
18718         --break;  Do not use g_error, but f_printf.   And fix all other
18719         ocurrences of the same crash.
18720
18721 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
18722
18723         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
18724         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
18725         Fixes #74742.
18726
18727 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
18728
18729         * *-ia64.*: Add beginnings of IA64 backend.
18730
18731         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
18732
18733 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
18734
18735         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
18736         Fixes #74925.
18737
18738         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
18739
18740         * mini-amd64.c: Fix a warning.
18741
18742 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
18743
18744         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
18745         in float_neg. Fixes #74897.
18746
18747         * mini-amd64.c (emit_call): Fix another near call bug.
18748
18749 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
18750
18751         * declsec.c: Keep the appdomain information in the structure. Added a 
18752         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
18753         value gets overwritten).
18754         * declsec.h: Set the default MonoArray for the the stack to 6. Added
18755         an MonoAppDomain member to MonoSecurityFrame.
18756         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
18757         used in the stack walk. Now use a MonoArray which grow (double) when
18758         it gets full.
18759
18760 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
18761
18762         * mini.c: Re-enabled runtime cleanup, since running threads should
18763         now properly stop when exiting.
18764
18765 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
18766
18767         * mini-codegen.c: New file contaning the arch-independent local
18768         register allocator. Not used by any architectures yet.
18769
18770         * mini.h linear-scan.c: Merge some changes from the 
18771         mini-xp-local-regalloc branch.
18772
18773 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
18774
18775         * mini-amd64.c (emit_call): Fix calls to native functions when the
18776         runtime is compiled as a shared library. Fixes #74756.
18777
18778         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
18779         on a literal field. Fixes #74751.
18780
18781 2005-04-25  Raja R Harinath  <rharinath@novell.com>
18782
18783         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
18784
18785 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
18786
18787         * objects.cs: Add missing null casting test.
18788
18789 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
18790
18791         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
18792         in wrapper methods. Also rename 'address' variable to 'offset'.
18793
18794 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
18795
18796         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
18797         warnings.
18798         
18799         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
18800
18801         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
18802         work on windows.
18803
18804 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
18805
18806         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
18807
18808 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
18809
18810         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
18811         just the last bytes.
18812
18813 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
18814
18815         * aot.c (mono_compile_assembly): Fix warning.
18816
18817         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
18818         by the _MSC_VER stuff.
18819
18820 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
18821
18822         * inssel-long.brg: Fix #74588.
18823
18824         * cpu-amd64.md: Fix #74591.
18825
18826         * iltests.il: Add new regression tests.
18827
18828 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
18829
18830         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
18831         valuetype.
18832
18833 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
18834
18835         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
18836
18837         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
18838         from Bill Middleton <flashdict@gmail.com>.
18839
18840 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
18841
18842         * arrays.cs: Add new regression test. Fix warnings.
18843
18844 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
18845
18846         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
18847         and leakage in CKFINITE.
18848
18849         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
18850         this to a null op since it is called on amd64 too.
18851
18852         * exceptions-amd64.c (get_throw_trampoline): Align stack.
18853
18854         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
18855         body since this is not used on amd64.
18856         
18857         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
18858
18859         * mini-amd64.c: Remove obsolete fixmes.
18860
18861         * mini.c (print_method_from_ip): Fix debugging support.
18862
18863 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
18864
18865         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
18866         so that expressions that don't give much gain are not reduced.
18867         * ssapre.h: Likewise.
18868
18869 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
18870
18871         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
18872
18873         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
18874
18875         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
18876
18877 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
18878
18879         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
18880
18881         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
18882
18883 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
18884
18885         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
18886         stack touching.
18887
18888         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
18889
18890         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
18891
18892         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
18893
18894         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
18895         MONO_ARCH_USE_SIGACTION. Fixes #74252.
18896
18897         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
18898
18899         * mini-x86.c: Fix up stack overflow handling.   
18900
18901         * exceptions.cs: Add new regression test.
18902
18903 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
18904
18905         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
18906         mono_jit_thread_attach.
18907
18908         * mini.c (mono_method_to_ir): Verify called method is not abstract.
18909
18910 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
18911
18912         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
18913         avoid calling constructors using callvirt.
18914
18915         * inssel.brg: Fix #74073.
18916
18917 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
18918
18919         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
18920         compilation with non-GCC compilers.
18921         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
18922         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
18923
18924 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
18925
18926         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
18927         klass->interface_offsets (will likely fix bug#74073).
18928
18929 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
18930
18931         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
18932
18933 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
18934
18935         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
18936         to amd64_div_reg_size ().
18937         
18938         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
18939
18940 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
18941
18942         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
18943
18944 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
18945
18946         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
18947
18948 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
18949
18950         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
18951         
18952         * mini.c (mono_precompile_assembly): Load and precompile referenced
18953         assemblies as well. Fixes #74015.
18954
18955 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
18956
18957         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
18958
18959 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
18960
18961         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
18962         a lot of checks and (anyway) permissions cannot work until corlib is 
18963         loaded.
18964
18965 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
18966
18967         * mini-ppc.c: fixed ABI issue on sysv/ppc.
18968
18969 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
18970
18971         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
18972         calls (fixes bug#72824).
18973
18974 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
18975
18976         * mini.c: fix tail recursion elimination (see test in bug#73936).
18977
18978 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
18979
18980         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
18981         some fp functions in sse2 mode.
18982
18983 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
18984
18985         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
18986
18987 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
18988
18989         * mini.h mini.c: Add mono_get_jit_tls_key ().
18990
18991         * mini-x86.c: Enable fast TLS support on windows.
18992
18993 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
18994
18995         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
18996         * mini.c: Check for p/invoke method when generating code. If a
18997         p/invoke method, or it's class, isn't decorated with [Suppress
18998         UnmanagedCodeSecurity] then generate code to call System.Security.
18999         UnmanagedDemand (only if the security manager is active).
19000
19001 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
19002
19003         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
19004         last change as it seems to cause strange crashes.
19005         
19006 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
19007
19008         * *.c: handle unsafe function pointers where needed.
19009
19010 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
19011
19012         * mini.c (mono_jit_free_method): Remove the fixme too.
19013
19014 2005-03-15  Miguel de Icaza  <miguel@novell.com>
19015
19016         * mini.c: As discussed, make the code actually free the delegate
19017         thunk now, to enable the debugging of delegate problems, use
19018         MONO_DEBUG=1 when running Mono. 
19019
19020         This takes also care of parts of the leaks as seen by Joe.
19021
19022 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
19023
19024         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
19025         thread_tls_offset calculation.
19026
19027 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
19028
19029         * declsec.c: Reworked linkdemand checks for icall. The previous code
19030         was using the declaration code (untrusted) and didn't work as expected
19031         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
19032         specific case.
19033
19034 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
19035
19036         * iltests.il: Add new localloc test.
19037
19038         * mini-amd64.c: Handle large stack allocations the same way as on
19039         windows if stack overflow handling is working.
19040         
19041         * mini-amd64.c: Allocate the signal stack using mmap.
19042
19043         * mini.c (sigsegv_signal_handler): Fix reading of context.
19044
19045         * mini-exceptions.c: Fix up stack overflow handling.
19046
19047         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
19048
19049         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
19050
19051         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
19052
19053         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
19054
19055         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
19056         tramp_init functions as they are no longer needed.
19057
19058 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
19059
19060         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
19061         
19062         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
19063
19064         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
19065         
19066         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
19067         support that now.
19068
19069         * mini-ops.h: Add OP_LMUL_IMM.
19070
19071         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
19072         long mul/div opcodes as intrinsic.
19073
19074         * mini-amd64.c (emit_call): Handle the case when the callee might be
19075         an AOT method.
19076
19077 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
19078
19079         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
19080         extra safe.
19081         
19082         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
19083
19084         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
19085
19086 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
19087
19088         * mini.c (mono_codegen): Don't leak here, to help people running
19089         monogrind.
19090
19091 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
19092
19093         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
19094         conversions in sse2 mode.
19095
19096         * basic-float.cs: Add regression test.
19097         
19098         * mini-amd64.c: Reenable sse2.
19099
19100 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
19101
19102         * mini-amd64.c: Disable sse2 until some regressions are fixed.
19103
19104 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
19105
19106         * driver.c: Copyright text should include 2005.
19107         
19108 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
19109
19110         * cpu-amd64.md (load_membase): Fix more max lengths.
19111
19112 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
19113
19114         * cpu-amd64.md (load_membase): Fix max length.
19115
19116         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
19117
19118         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
19119
19120         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
19121         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
19122
19123         * basic-float.cs: Add rounding regression test.
19124
19125         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
19126
19127 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
19128
19129         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
19130         structures in registers for pinvoke wrappers.
19131
19132 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
19133
19134         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
19135
19136 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
19137
19138         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
19139         wrapper to mono_jit_thread_attach.
19140
19141         * mini.c (mini_jit_thread_attach): New jit icall.
19142
19143         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
19144         native->managed wrappers.
19145
19146         * exceptions.cs: Add new regression test.
19147
19148         * mini.c (optimize_branches): Check regions in the cbranch to throw
19149         block case as well. Fixes #73242.
19150
19151 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
19152
19153         * mini.c: thread safety fixes.
19154
19155 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
19156
19157         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
19158         patching stuff, since delegates use jump trampolines so there is
19159         no caller.
19160
19161         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
19162         jump trampolines.
19163         
19164         * tramp-amd64.c: Fix build.
19165
19166         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
19167         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
19168
19169         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
19170         Rename this to mono_arch....
19171         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
19172
19173         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
19174
19175         * mini-amd64.c (emit_call): If both the caller and the callee is
19176         guaranteed to have 32 bit addresses, emit a normal call.
19177
19178         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
19179
19180         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
19181         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
19182         method_ptr inside delegates.
19183
19184 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
19185
19186         * mini.c (mono_jit_free_method): Free the method info even if the native code is
19187         invalidated. Fixes #73001.
19188
19189         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
19190
19191         * mini-x86.c: Only use stdcall for pinvokes on windows.
19192
19193 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
19194
19195         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
19196         * mini-x86.c: remove unreliable __thread var offset detection,
19197         use the correct accessors and enable by default.
19198
19199 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
19200
19201         * mini.c (mono_jit_free_method): Fix memory leak.
19202
19203 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
19204
19205         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
19206
19207 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
19208
19209         * cpu-amd64.md: Fix lengths of atomic opcodes.
19210
19211 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
19212
19213         * driver.c: try to not imply using ICU is any good.
19214
19215 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
19216
19217         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
19218         functions as inline ops.
19219
19220         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
19221         some Interlocked functions as inline ops.
19222
19223         * mini.c (move_basic_block_to_end): Fix bug in last patch.
19224
19225         * mini.h (MonoBasicBlock): Reorganize fields a bit.
19226
19227         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
19228
19229         * mini.c: Add support for OP_NOT_TAKEN.
19230
19231         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
19232         structures in registers for pinvoke wrappers.
19233
19234         * mini-amd64.c: Fix warnings.
19235
19236 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
19237
19238         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
19239
19240         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
19241
19242         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
19243         address instead of loading the address from it.
19244
19245         * mini-x86.c: Add support for returning small structs in registers
19246         on Win32. Fixes part of #70864.
19247         
19248 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
19249
19250         * trace.c (get_token): Improve error checking.
19251
19252 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
19253
19254         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
19255
19256 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
19257  
19258         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
19259         it can be reused for MonoClass.
19260         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
19261         _LINKDEMAND.
19262
19263 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
19264
19265         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
19266         instead of a MonoReflectionMethod. The method information wasn't used
19267         when displaying SecurityException details (but will be now).
19268
19269 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
19270
19271         * Makefile.am : windows build fix.
19272
19273 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
19274
19275         * iltests.il: Add new regression test.
19276
19277         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
19278         #72522.
19279
19280 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
19281  
19282         * mini.c: Moved linkdemand check into helper function check_linkdemand
19283         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
19284         LDFTN, LDVIRTFTN).
19285
19286 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
19287
19288         * declsec.c: Added statistics counter for different kinds of 
19289         LinkDemands.
19290         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
19291         (and commented) declaration.
19292         * mini.c: Added statistics counter for security Demand code 
19293         generation. Added display of security statistics.
19294
19295 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
19296
19297         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
19298         Fix compilation errors under gcc-2.95.
19299
19300 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
19301
19302         * mini.c, driver.c: Use the new jit trampoline hashtable
19303
19304 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
19305
19306         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
19307
19308 2005-02-11  Martin Baulig  <martin@ximian.com>
19309
19310         * debug-mini.c (mono_debug_close_method): Free the line number array.
19311
19312 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
19313
19314         * aot.c: Break up large methods into smaller ones. Share GOT slots for
19315         icalls.
19316
19317         * mini.h: Bump AOT file format version. 
19318
19319 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
19320
19321         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
19322         APTC and P/Invoke.
19323         * declsec.h: Added macros to get/set lazyly initialized security 
19324         informations about assemblies. Added new enum for different type of
19325         possible LinkDemand violation. Added function to check LinkDemands.
19326         * mini.h: Added a field to MonoCompile to hold any security violation
19327         detected when JITting a method (so it can be thrown later).
19328         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
19329         and CEE_CALLVIRT. Added code to throw exception at the end of
19330         mini_method_compile (note: the exception is unhandled right now).
19331
19332 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
19333
19334         * mini.c, jit-icalls.c: use the managed implementation of
19335         memset for initobj and memset, to avoid managed <-> unmanaged
19336         transitions.
19337
19338 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
19339
19340         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
19341         optimization if it would need a GOT var.
19342
19343         * basic.cs: Add tests for constant propagation and switch statements.
19344
19345         * ssa.c: Fix out-of-range constant propagation and switch statements.
19346
19347 2005-02-09    <vargaz@freemail.hu>
19348
19349         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
19350
19351 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
19352
19353         * cpu-amd64.md (load_membase): Fix max length of load_membase.
19354
19355 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
19356
19357         * mini.c: update to new signature of mono_class_get_allocation_ftn().
19358
19359 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
19360
19361         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
19362         arithmetic operations.
19363
19364 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
19365
19366         * mini-ppc.c: add a workaround for broken user code that
19367         DllImports vararg functions with non-vararg signatures.
19368
19369 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
19370
19371         * mini.c (mono_jit_compile_method_inner): Add detection and a 
19372         meaningfull error message for assemblies written in Managed C++.
19373
19374         * tramp-amd64.c mini-amd64.h: Add support for 
19375         create_trampoline_from_token ().
19376
19377         * aot.c mini-x86.c abcremoval.c: Applied patch from
19378         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
19379
19380 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
19381
19382         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
19383         which takes a MonoImage/token as parameter instead of a MonoMethod.
19384
19385         * aot.c: Use the new trampoline for initializing vtables.
19386
19387         * aot.c: Add support for ldfld/stfld_remote wrappers.
19388
19389         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
19390         rules for compare <MEM>, IMM.
19391
19392         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
19393
19394         * aot.c: Handle inherited finalizers correctly.
19395
19396 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
19397
19398         * inssel.brg (stmt): Add a missing _setup_... ().
19399
19400         * aot.c: Save some parts of the class state to the AOT file and use it
19401         to recompute that state when a class is initialized.
19402
19403         * mini.c: Install AOT hooks into the runtime.
19404
19405         * mini.h: Bump AOT file format version.
19406         
19407         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
19408         Fixes #72148.
19409
19410         * iltests.il: Add new test.
19411
19412 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19413
19414         * mini.c: fix typo.
19415
19416 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
19417
19418         * mini.c: setup the statistical profiler in the thread attach
19419         callback to cope with the new single thread code.
19420
19421 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
19422
19423         * mini-ppc.c: ensure we have enough room for the profiler
19424         calls (fixed bug#72084).
19425
19426 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
19427
19428         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
19429         it.
19430
19431 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
19432
19433         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
19434
19435 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
19436
19437         * ssapre.c: Fixed an issue with down safety (this allows IronPython
19438         to succesfully execute parrotbench).
19439         * ssapre.h: Likewise.
19440
19441 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
19442
19443         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
19444         variable for stores to method arguments (fixes a SSAPRE issue).
19445
19446 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
19447
19448         * mini.c: handle value types in dup, fixes gen-112.cs.
19449
19450 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
19451
19452         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
19453         sequence for calls in dynamic methods to avoid thunks.
19454
19455 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19456
19457         * mini.c: correctly remove dynamic methods from the hashtable.
19458
19459 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
19460
19461         * driver.c: Disabled SSAPRE until fix the bug that appears
19462         in IronPython's parrotbench.
19463
19464 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
19465
19466         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
19467
19468         * mini.c (mono_method_to_ir): Revert the previous change.
19469         
19470         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
19471         when AOT compiling.
19472
19473         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
19474         mono_jit_info_table_find () etc. when running under valgrind.
19475
19476         * inssel.brg: Fix warnings.
19477
19478         * mini-exceptions.c: Fix warnings.
19479
19480 2005-01-31  Martin Baulig  <martin@ximian.com>
19481
19482         * driver.c (compile_all_methods_thread_main): Don't try to compile
19483         generic methods or anything which has type parameters.
19484
19485 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
19486
19487         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
19488
19489         * TestDriver.cs: Add --verbose flags.
19490
19491         * graph.c ssa.c: Fix 64 bit warnings.
19492         
19493         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
19494         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
19495         Fix 64 bit warnings.
19496
19497         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
19498         variable not spotted by gcc.
19499         
19500         * mini-amd64.c inssel-amd64.brg: Applied patch from  
19501         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
19502         X86_COMPARE_MEMBASE opcodes.
19503
19504         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
19505
19506 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
19507
19508         * *: MonoMethod->signature might be NULL now. You *MUST* use
19509         mono_method_signature.
19510
19511 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
19512
19513         * driver.c (compile_all_methods_thread_main): Compile the methods
19514         without invoking cctors.
19515
19516 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
19517
19518         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
19519         * basic-calls.cs: test for the above.
19520
19521 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
19522
19523         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
19524         MonoJitInfo changes.
19525
19526 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
19527
19528         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
19529         eagerly if it contains dynamic methods.
19530         
19531         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
19532
19533         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
19534         trace, it is now computed by an icall from trace_ips.
19535         
19536         * mini-exceptions.c: Fix a warning.
19537
19538 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
19539
19540         * mini-exceptions.c: don't bother getting stack trace info if
19541         it's not going to be used.
19542
19543 2005-01-27  Raja R Harinath  <rharinath@novell.com>
19544
19545         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
19546         ssapre-mini-ops.h.
19547
19548 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
19549
19550         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
19551
19552         * aot.c: Avoid calling mono_method_get_header () if not needed.
19553
19554         * mini.h: Bump AOT file format version.
19555         
19556         * mini.c (mono_emit_native_call): Allocate a GOT var here.
19557
19558         * mini.c (mono_print_tree): Print more info for calls.
19559
19560 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
19561
19562         * declsec.h: Remove warning by adding missing include for marshal.h
19563
19564 2005-01-26  Martin Baulig  <martin@ximian.com>
19565
19566         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
19567         `ip' twice.
19568
19569 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
19570
19571         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
19572         flags.
19573
19574         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
19575
19576         * aot.c (mono_compile_assembly): Fix a warning.
19577
19578 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
19579
19580         * declsec.c: Look for security attributes on the original MonoMethod 
19581         (and not the wrapped one). This fix permissions on icalls.
19582
19583 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
19584
19585         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
19586
19587         * mini.c (mono_allocate_stack_slots): Add a fixme.
19588
19589         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
19590
19591 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
19592
19593         * inssel.brg: optimize casts of sealed types (more
19594         optimizations waiting for fixes in remoting).
19595
19596 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
19597
19598         * inssel.brg (stmt): Add another dummy rule.
19599
19600         * driver.c: Fix warnings.
19601
19602         * driver.c (mono_main): If running under valgrind, instruct glib to use
19603         the system allocation functions so valgrind can track the memory
19604         allocated by the g_... functions.
19605
19606         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
19607
19608         * mini-ops.h: Add OP_DUMMY_STORE opcode.
19609
19610         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
19611
19612         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
19613         variables in try regions.
19614
19615         * mini.c (mini_method_compile): Don't disable optimizations on large
19616         methods when AOT compiling.
19617
19618         * mini.c (mono_allocate_stack_slots): New arch independent method to 
19619         allocate stack slots. Not yet used.
19620
19621 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
19622
19623         * debug-mini.c (mono_debug_close_method): Plug some leaks.
19624
19625 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
19626
19627         * mini-ppc.c: make the branch info relative as the code
19628         buffer can be reallocated.
19629
19630 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
19631
19632         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
19633         * driver.c: Removed the AOT/security restriction. Now initialize the
19634         security manager (in metadata) if --security is used.
19635         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
19636         rather than the pointer to declarative security, when AOT is used.
19637
19638 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
19639
19640         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
19641         basic blocks, reduced intrinsic exception throwing code size.
19642
19643 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
19644
19645         * driver.c (mini_usage): Reorder the usage screen.
19646
19647 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
19648
19649         * mini.c (mono_resolve_patch_target): Fix warning.
19650
19651 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
19652
19653         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
19654         previous patch.
19655
19656         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
19657
19658         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
19659         breaks the amd64 build.
19660
19661         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
19662         register allocation. Fixes #71454.
19663
19664         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
19665
19666         * arrays.cs: Add new regression test.   
19667
19668 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
19669
19670         * ssapre.c: Turned usage of snprintf to GString.
19671         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
19672         (I left it on by mistake in my previous commit).
19673
19674 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
19675
19676         * mini.c, cfold.c, basic-calls.cs: preserve side effects
19677         on cond branch optimization (fixes bug# 71515).
19678
19679 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
19680
19681         * abcremoval.c: Fixed bug 71062.
19682         * abcremoval.h: Likewise.
19683
19684 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
19685
19686         * mini.c: Added a new functionality to optimize_branches, the removal
19687         of useless basic blocks, and fixed some problem in the removal of
19688         critical edges; some utility functions added for both purposes.
19689         * ssapre.c: Added complex expression support, and fixed bug 70637.
19690         * ssapre.h: Likewise.
19691         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
19692         enabled in SSAPRE.
19693         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
19694         * driver.c: Re-enabled SSAPRE.
19695
19696 2005-01-19  Martin Baulig  <martin@ximian.com>
19697
19698         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
19699         the result of mono_get_method_constrained().
19700
19701 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
19702
19703         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
19704         manager.
19705
19706 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
19707
19708         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
19709         be detected.  Fixes #59296.
19710
19711 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
19712
19713         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
19714         which can happen. Fixes #71361.
19715
19716 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
19717
19718         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
19719         manager.
19720
19721 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
19722
19723         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
19724         appdomain-unload.exe to fail.
19725         
19726         * mini.c: Fix some memory leaks.
19727
19728 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
19729
19730         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
19731         Fixed bug and sped up some codepaths.
19732
19733 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
19734
19735         * mini.c: Fix some memory leaks.
19736
19737         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
19738         conversion.
19739
19740         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
19741
19742         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
19743         #71320.
19744
19745         * iltests.il: Add regression test for #71320.
19746
19747 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
19748
19749         * mini.c (mono_codegen): Fix installation of profiler hooks.
19750
19751         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
19752
19753 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
19754
19755         * mini.h, mini.c, cfold.c: optimize access to enum
19756         readonly fields, too. Eval conditional branches if possible
19757         to perform unreachable code removal in more cases.
19758
19759 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
19760
19761         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
19762
19763         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
19764         code manager.
19765
19766         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
19767         WinXP DEP. Fixes #71244.
19768
19769 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
19770
19771         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
19772
19773 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
19774
19775         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
19776
19777 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
19778
19779         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
19780         changes.
19781
19782         * mini.h: Bump AOT version.
19783
19784         * mini.h (MonoCompile): Change exvar to a hash table.
19785
19786         * mini.c: Allocate a separate exvar for each handler block.
19787
19788         * mini.c: Get rid of the computation of filter_lengths, its not needed.
19789
19790         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
19791         ex var with the pending exception and only throw if the two are equal.
19792         Fixes #68552.
19793         
19794         * exceptions.cs: Add tests for rethrow and nested catch clauses.
19795
19796         * mini-x86.c: Fix warnings.
19797
19798         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
19799         used by all the ports now.
19800
19801         * aot.c: Add write-symbols and save-temps options.
19802
19803 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
19804
19805         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
19806
19807 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
19808
19809         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
19810         operations.
19811
19812         * tramp-s390.c: Check vtable slot belongs to the domain.
19813
19814         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
19815         as per other platforms.
19816
19817         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
19818
19819 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
19820
19821         * driver.c: we don't run the Main() code in a subthread anymore.
19822
19823 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
19824
19825         * mini.c: added experimental rtc support in the statistical
19826         profiler: if the user has the permission, more accurate statistics
19827         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
19828         The MONO_RTC value must be restricted to what the linux rtc allows:
19829         power of two from 64 to 8192 Hz.
19830
19831 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
19832
19833         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
19834
19835 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
19836
19837         * mini-ppc.c: better icache flush for smp.
19838
19839 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
19840
19841         * mini-amd64.c (emit_move_return_value): Fix memory leak.
19842
19843         * mini-x86.c (get_call_info): Add the get_call_info () code from the
19844         amd64 port, not yet used.
19845
19846 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
19847
19848         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
19849         a struct type.
19850
19851 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
19852
19853         * driver.c: Added --security option to activate the security manager.
19854         Right now this will allow code generation for declarative demands and
19855         is disabled when AOT is specified.
19856         * mini.c: Add code generation for declarative security demands.
19857         * mini.h: Add mono_use_security_manager as an extern gboolean.
19858
19859 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
19860
19861         * aot.c (mono_compile_assembly): Speed up compilation a bit by
19862         emitting more dense assembly code.
19863
19864         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
19865         exception throwing stuff.
19866
19867 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
19868
19869         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
19870         dead code.
19871
19872         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
19873         left in by mistake.
19874
19875         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
19876         fixed.
19877
19878         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
19879
19880         * tramp-*.c: Only patch vtable slots if the object is in the current
19881         domain. Fixes appdomain-unload.exe.
19882
19883         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
19884         
19885         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
19886         x86 branch.
19887
19888 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
19889
19890         * mini.c (reverse_branch_op): New helper function.
19891
19892         * mini.c (optimize_branches): Run the new optimization only on 
19893         platforms which support it. Also reverse all kinds of branches.
19894
19895         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
19896
19897         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
19898         a throw statement.
19899
19900         * mini.c (optimize_branches): Reverse not-equals branches if the false
19901         bblock is a throw. This happens a lot of time with argument checking in
19902         corlib.
19903
19904         * mini.c (mono_codegen): Add support for placing basic blocks after
19905         the function epilogue.
19906
19907         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
19908         function epilogue.
19909         
19910 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
19911
19912         * mini.c (setup_stat_profiler): Only set this up if the platform
19913         supports ITIMER_PROF.
19914
19915 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
19916
19917         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
19918         previous patch.
19919
19920         * inssel.brg: Fix a warning.
19921
19922 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
19923
19924         * mini.c: added support for statistical profiler 
19925         (run with: --profile=default:stat).
19926
19927 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
19928
19929         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
19930
19931         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
19932
19933         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
19934         related to global registers from the amd64 port.
19935
19936 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
19937
19938         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
19939
19940         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
19941         with global registers.
19942         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
19943
19944         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
19945
19946 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
19947
19948         * debug-mini.c (encode_value): Fix off-by-one.
19949
19950         * aot.c (encode_value): Likewise.
19951
19952         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
19953
19954 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
19955
19956         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
19957         AOT.
19958
19959         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
19960         
19961         * aot.c (emit_method_info): Increase size of temp buffer.
19962
19963         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
19964         the AOT case.
19965
19966 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
19967
19968         * aot.c (emit_method_info): Fix build.
19969         
19970         * aot.c: Further rework of the AOT file format to reduce the size of
19971         the method info data.
19972
19973         * mini.h: Bump AOT file format version.
19974
19975 2004-12-27  Martin Baulig  <martin@ximian.com>
19976
19977         * mini.c (mini_get_method): New static method; call
19978         mono_get_method_full() and mono_get_inflated_method().
19979         (mono_method_to_ir): Use mini_get_method() instead of
19980         mono_get_method_full(). 
19981
19982 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
19983
19984         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
19985
19986 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
19987
19988         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
19989
19990         * inssel-amd64.brg: Add some optimization rules.
19991
19992 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
19993
19994         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
19995         standard not GC'd stuff is fine.
19996
19997 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
19998
19999         * aot.c: Rework the AOT file format to get rid of most of the global
20000         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
20001
20002         * mini.h: Bump AOT file format version.
20003         
20004 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
20005
20006         * mini.h: Bump AOT file format version.
20007
20008         * aot.c (mono_aot_is_got_entry): New function to determine if an 
20009         address is inside a GOT.
20010
20011         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
20012
20013         * cpu-pentium.md: Increase the maximum size of some instructions which
20014         might involve a got access.
20015         
20016         * mini.c (get_method_from_ip): Another debug helper function.
20017
20018         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
20019         when got var accesses are created during the decompose phase.
20020
20021         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
20022
20023         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
20024         argument mini_compile_method and to MonoCompile, and use this to
20025         determine whenever a given method is compiled for AOT. This allows the
20026         other methods compiled during AOT compilation to be free of AOT stuff,
20027         so the backends does not need to add special support for them by
20028         creating a fake GOT etc.
20029
20030         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
20031         longer needed.
20032
20033 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
20034
20035         * mini.c (mono_method_to_ir): It turns out that some of the
20036         x-appdomain wrappers are lax with types, so just ignore this for
20037         all wrappers.
20038
20039         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
20040         at the vtable->klass. If it is non-shared code we can just use the
20041         vtable.
20042
20043 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
20044
20045         * mini-ppc.c: access MonoDomain from tls, too.
20046
20047 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
20048
20049         * declsec.c: Removed unused variable (and related warning ;-)
20050
20051 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
20052
20053         * iltests.il: New test for LDELEMA on an array of ref types.
20054
20055         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
20056         all ldelema's on reftypes.
20057         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
20058         it was the wrong place to put it.
20059
20060         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
20061         register to pop to make this cleaner, at the request of Paolo.
20062
20063 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
20064
20065         * mini-ops.h (OP_GETHASHCODE): New op.
20066
20067         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
20068
20069         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
20070         operation.
20071
20072         For a microbenchmark, this reduces the cost of Hashtable.get_Item
20073         by 25%.
20074         
20075         * mini-x86.c (mono_arch_output_basic_block): Rather than
20076
20077         add ebp, 4
20078
20079         Emit
20080
20081         pop edx
20082
20083         The first is 3 bytes while the second is 1. This saves 36 kb on
20084         mscorlib, quite a big saving. When bootstraping mcs, I was able to
20085         see a small boost because of icache locality.
20086
20087         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
20088
20089 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
20090
20091         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
20092         started code sharing with the generic code.
20093
20094 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
20095
20096         * mini-ppc.c, cpu-g4.md: added code for direct access to
20097         tls data slots.
20098
20099 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
20100
20101         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
20102          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
20103         to OP_TLS_GET.
20104
20105 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
20106
20107         * declsec.c|h: Added functions to cache the declarative stack modifiers
20108         in MonoJitInfo and to create a security frame from a MonoJitInfo 
20109         structure.
20110         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
20111         created. Register internal calls for System.Security.SecurityFrame::
20112         _GetSecurityFrame and _GetSecurityStack.
20113         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
20114         the definitions for the new stack walk/callback mechanism.
20115         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
20116         first security frame for LinkDemands and InheritanceDemands) and
20117         GetSecurityStack for Demands. Both use the new mono_walk_stack code
20118         from lupus.
20119         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
20120         walk initialization (lupus).
20121
20122 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
20123
20124         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
20125         idiom.
20126         (handle_loaded_temps): Do not create a temporary variable for
20127         things that we know are temps. They will never be modified.
20128         (mono_spill_call): Set MONO_INST_IS_TEMP
20129         (mono_emulate_opcode): ditto
20130         (emit_tree): ditto
20131         (mono_method_to_ir.CEE_DUP): ditto
20132
20133 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
20134
20135         * mini.c (type_to_eval_stack_type): Make this handle the void type
20136         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
20137         (emit_tree): use ip_in_bb to special case some common idioms
20138         Update all callers to pass in the IP.
20139         (mono_method_to_ir): Make CEE_CALL* do the above as well.
20140
20141         This gives us a nice 2% speedup in mcs bootstrap.
20142
20143         * mini-x86.c (peephole_pass): Peephole pass to make
20144         mov  [foo], eax
20145         push [foo]
20146
20147         into
20148
20149         mov [foo], eax
20150         push eax
20151
20152         * mini.c (ip_in_bb): new method.
20153         (mono_method_to_ir): use this method rather than doing the hash
20154         lookup ourselves.
20155
20156         * linear-scan.c (mono_linear_scan): When expiring actives, you
20157         don't need to keep around variables that expire on this
20158         instruction. This makes it so that:
20159              a = b + 1
20160         will turn into:
20161              store (ebx add (ebx, 1))
20162         which will become
20163              add ebx, 1
20164
20165 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
20166
20167         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
20168         combination to avoid doing two copies. Fix up problems with previous
20169         patch.
20170
20171         * mini.c: Fix 64 bit warnings.
20172
20173         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
20174
20175 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
20176
20177         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
20178         changes from the x86 code.
20179
20180         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
20181
20182 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
20183
20184         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
20185         throwing code to reduce its size, unify the AOT and non-aot code and 
20186         get rid of relocations in the AOT case.
20187
20188         * mini-x86.h mini.c exceptions-x86.c 
20189         (mono_arch_get_throw_corlib_exception): New arch specific function to 
20190         raise corlib exceptions which doesn't require relocations in the 
20191         caller.
20192
20193         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
20194
20195 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
20196
20197         * mini.c (mono_emit_method_call): Only allocate the got var when it is
20198         needed.
20199
20200         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
20201         in the AOT case.
20202
20203 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
20204
20205         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
20206         with add function when used from Inc/dec atomic 
20207         functions. Re-enabled optimization on x86.
20208         * mini-ops.h: renamed atomic_add functions to
20209         allow _add to match the Interlocked::Add and
20210         _add_next to match Interlocked::Inc/Dec.
20211
20212 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
20213
20214         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
20215         linking of BBs to the end BB, and enabled SSAPRE also with
20216         consprop and copyprop (which was prevented by that bug).
20217
20218 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
20219
20220         * mini-x86.c: disabling the Interlocked optimizing code. 
20221
20222 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
20223
20224         * aot.c (load_aot_module): Move reading of got_addr after the AOT
20225         file version check.
20226         
20227 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
20228
20229         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
20230         interlocked optimization due lack of support on x86, rewrote 
20231         exchange to take into account that base may be in eax.
20232         
20233         xsp works again; activated Interlocked optimizing code.
20234         
20235 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
20236
20237         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
20238
20239 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
20240
20241         * mini-ops.h: Add new opcodes.
20242
20243         * mini.h: Add new patch types. Add got_var to MonoCompile.
20244
20245         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
20246         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
20247         make it work with all kinds of patchable code.
20248
20249         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
20250         address of the GOT, and referencing entries in the GOT.
20251
20252         * mini.c: Add code to load the GOT address if needed by an opcode.
20253
20254         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
20255         independent AOT code on the x86 using an elf-style Global Offset Table.
20256
20257 2004-12-14  Raja R Harinath  <rharinath@novell.com>
20258
20259         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
20260
20261 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20262
20263         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
20264         when running xsp.
20265
20266 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
20267
20268         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
20269         of Interlocked:Increment/Decrement/Add as inline ops.
20270         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
20271
20272 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
20273
20274         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
20275         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
20276
20277 2004-12-12  Duncan Mak  <duncan@ximian.com>
20278
20279         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
20280         again. `patch_info->table_size' is no longer valid after Zoltan's
20281         commit #37636.
20282
20283 2004-12-12  Martin Baulig  <martin@ximian.com>
20284
20285         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
20286         if we are the "real" method, ie. not an inlined method inside it.
20287
20288 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
20289
20290         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
20291         before we look in the special fields table. This fixes
20292         ../tests/thread-static-init.cs.
20293
20294 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20295
20296         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
20297         for Array get_Rank and get_Length. Fixes bug #70465.
20298
20299 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
20300
20301         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
20302         separate structure to reduce the size of MonoJumpInfo.
20303
20304 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
20305
20306         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
20307
20308 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
20309
20310         * mini.c (mini_get_inst_for_method): Changed to allow ports
20311         to return a MonoInst instead of opcode 
20312         (renamed mini_get_opcode_for_method to better reflect the new functionality)
20313         
20314         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
20315         Allow ports to return a created MonoInst instead of op-code, will enable
20316         new optimizations.
20317         (renamed mini_get_opcode_for_method to better reflected the functionality)
20318
20319 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
20320
20321         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
20322
20323 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
20324
20325         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
20326         Fixes #69985.
20327
20328 2004-12-08  Martin Baulig  <martin@ximian.com>
20329
20330         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
20331         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
20332
20333 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
20334
20335         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
20336         correctly.
20337
20338         * exceptions.cs: Disable some tests which depend on properties of x86 fp
20339         arithmetic.
20340
20341 2004-12-08  Raja R Harinath  <rharinath@novell.com>
20342
20343         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
20344
20345 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
20346
20347         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
20348         bug introduced by the previous patch.
20349
20350 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
20351
20352         * mini-ppc.c, objectc.cs: handle large structs passed by value
20353         (fixes bug #69972).
20354
20355 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
20356
20357         * mini-ppc.c: OP_ARGLIST implementation from
20358         Geoff Norton  <gnorton@customerdna.com>.
20359
20360 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
20361
20362         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
20363         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
20364
20365 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
20366
20367         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
20368
20369 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20370
20371         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
20372         support.
20373
20374 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
20375
20376         * mini-sparc.c: Zero out localled-ed memory.
20377
20378         * iltests.il: Add tests for zeroing out localloc-ed memory.
20379
20380 2004-12-04  Martin Baulig  <martin@ximian.com>
20381
20382         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
20383         mono_method_get_signature_full().       
20384
20385 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
20386
20387         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
20388         and some utility functions (always for SSAPRE), integrated SSAPRE.
20389         * mini.h: Likewise.
20390         * driver.c: Added ssapre option.
20391         * ssa.c: Small fix on OP_ARG handling.
20392         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
20393         * Makefile.am: Likewise.
20394
20395 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
20396
20397         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
20398         now in the xp code.
20399
20400         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
20401         icall.
20402
20403 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20404
20405         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
20406         
20407         * cpu-s390.md : Increase instruction length of oparglist.
20408
20409         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
20410
20411 2004-11-30  Martin Baulig  <martin@ximian.com>
20412
20413         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
20414         virtual generic methods.  We call a special helper_compile_generic_method()
20415         icall to retrieve the method from the vtable, inflate and compile
20416         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
20417
20418         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
20419
20420 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
20421
20422         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
20423
20424 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
20425
20426         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
20427         Fixes #69929.
20428
20429 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
20430
20431         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
20432         platforms with PIC aot.
20433
20434 2004-11-28  Martin Baulig  <martin@ximian.com>
20435
20436         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
20437         Fixes gen-112.cs.
20438
20439 2004-11-28  Martin Baulig  <martin@ximian.com>
20440
20441         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
20442         the result of mono_type_get_underlying_type() to check whether
20443         we're byref.
20444
20445 2004-11-26  Martin Baulig  <martin@ximian.com>
20446
20447         * mini.c
20448         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
20449         in the g_assert().
20450
20451 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
20452
20453         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
20454         the same way as the other arguments so they won't get clobbered.
20455
20456         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
20457         calls through R11 since it is clobbered by the trampoline code.
20458
20459 2004-11-26  Raja R Harinath  <rharinath@novell.com>
20460
20461         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
20462         pick up in-tree mscorlib.dll.
20463
20464 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
20465
20466         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
20467
20468         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
20469         runtime data/code are now stored in a table similar to the GOT in ELF. 
20470         This allows the code itself to be position independent.
20471
20472         * aot.c: Fix loading of referenced assemblies after the lazy assembly
20473         loading changes.
20474
20475         * aot.c: Attach ELF type (object/function) directives to all global
20476         symbols.
20477
20478         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
20479
20480         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
20481
20482         * mini-amd64.h: Turn on PIC AOT code.
20483
20484         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
20485         returning the offset within an OP_AOTCONST instruction where the GOT
20486         offset needs to be added.
20487
20488         * mini.h: Bump AOT file format version.
20489
20490 2004-11-25  Martin Baulig  <martin@ximian.com>
20491
20492         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
20493         uninflated generic methods.
20494
20495 2004-11-25  Martin Baulig  <martin@ximian.com>
20496
20497         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
20498
20499 2004-11-24  Martin Baulig  <martin@ximian.com>
20500
20501         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
20502         original klass (this only applies for generic instances).
20503
20504 2004-11-24  Martin Baulig  <martin@ximian.com>
20505
20506         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
20507         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
20508         that array).
20509
20510 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
20511
20512         * mini.c (mono_method_to_ir): Disable inlining for methods containing
20513         localloc. Fixes #69678.
20514
20515         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
20516         
20517 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
20518
20519         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
20520         used SSE registers on pinvoke calls. Fixes #69774.
20521
20522 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
20523
20524         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
20525         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
20526
20527 2004-11-23  Raja R Harinath  <rharinath@novell.com>
20528
20529         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
20530         Refer directly to the mcs/ tree.
20531
20532 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20533
20534         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
20535         Check if a trampoline for a synchronized method is required. 
20536
20537 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
20538
20539         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
20540         with localloc if needed. Throe arithmetric exception in
20541         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
20542         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
20543
20544 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
20545
20546         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
20547         types before switching on type.  Fixes #69622.
20548
20549 2004-11-19  Raja R Harinath  <rharinath@novell.com>
20550
20551         * Makefile.am (check-local): New.  Integrate into 'make check'.
20552         (MCS,RUNTIME): Define using in-tree mono and mcs.
20553         (ILASM): New.
20554         (%.exe): Use $(ILASM).
20555
20556 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
20557
20558         * mini-ppc.c: adjust initial prolog size (bug #69691).
20559
20560 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
20561
20562         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
20563         #69664.
20564
20565 2004-11-17  Raja R Harinath  <rharinath@novell.com>
20566
20567         * Makefile.am (clean-local): Rename from 'clean'.
20568
20569 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20570
20571         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
20572         to mono_arch_is_int_overflow. 
20573         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
20574         SIGFPE events.
20575
20576 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
20577
20578         * declsec.c|h: New files to support declarative security attributes.
20579         Added function to check if a method has (applicable) security.
20580         * mini.c|h: Add check for declarative security attributes in
20581         mono_method_check_inlining.
20582         * Makefile.am: Added declsec.c and declsec.h to the build.
20583
20584 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
20585
20586         * mini.c, mini.h: update to keep dynamic code info per-domain.
20587
20588 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
20589
20590         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
20591         (mini_init): Get rid of it from here too.
20592
20593 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
20594
20595         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
20596         implemented OP_RETHROW (patch by Geoff Norton
20597         <gnorton@customerdna.com>).
20598
20599 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
20600
20601         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
20602         between appdomains.  Fixes appdomain-unload on PPC.
20603
20604 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
20605
20606         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
20607         mini-exceptions.c: handle the new wrapper types.
20608         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
20609         token value as a MonoClass* when compiling a wrapper.
20610         mono_jit_create_remoting_trampoline now takes an additional
20611         MonoRemotingTarget parameter.
20612         
20613 2004-11-10  Martin Baulig  <martin@localhost>
20614
20615         * mini.c (mono_method_to_ir): Use `generic_container->context'
20616         rather than creating a new one.
20617
20618 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20619
20620         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
20621
20622         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
20623
20624 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
20625
20626         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
20627         the experimental aot cache stuff.
20628
20629 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
20630
20631         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
20632         mini-exceptions.c: update to exception clause structure changes.
20633
20634 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
20635
20636         * exceptions-x86.c (throw_exception): Fix warnings.
20637
20638         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
20639         for OP_RETHROW.
20640
20641 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
20642
20643         * exceptions-sparc.c (get_throw_exception): Really fix this.
20644
20645 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
20646
20647         * tramp-*.c: we no longer support icalls without wrappers, so
20648         a bit of code can be removed here
20649
20650 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
20651
20652         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
20653         patch.
20654
20655         * cpu-sparc.md: Add op_rethrow.
20656
20657         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
20658
20659         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
20660
20661         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
20662         * mini-ops.h: Add OP_RETHROW.
20663
20664         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
20665
20666         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
20667
20668 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
20669         
20670         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
20671         Makes the output much easier to read
20672
20673 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
20674
20675         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
20676         prevents another huge leak when compiling with ssa. Secondly, the
20677         performance of doing this rather than freeing the lists is much
20678         better. GList does a lock every time you allocate a list link,
20679         so that it can use a memory pool. So, it is better to just use
20680         a memory pool of our own.
20681         
20682         * ssa.c, linear-scan.c: replace g_list_remove_link with
20683         g_list_delete.  The remove one does not free the GList, so we were
20684         leaking memory. On -O=all --compile-all with corlib, this cut down
20685         3 MB of allocations.
20686
20687 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
20688
20689         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
20690
20691         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
20692
20693         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
20694         into a new function mono_create_jit_trampoline ().
20695
20696 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
20697
20698         * trace.c (get_spec): Allow tracing of classes without a namespace.
20699
20700 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
20701
20702         * mini.c: Fix pointer overwrite in mini_method_compile.
20703
20704 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
20705
20706         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
20707         The darwin ABI needs some special handling for 1 and 2 byte structs
20708         Lets use lbz/lhz instead of lwz everywhere.
20709         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
20710         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
20711         Use stb/sth for the former, and put the latter always on stack instead of in
20712         argument registers.
20713
20714 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
20715
20716         * trace.c (is_filenamechar): Add '_'.
20717
20718 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
20719
20720         * mini-s390.c: Fix prolog length to allow for large trace requirements.
20721
20722         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
20723
20724 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
20725
20726         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
20727         depends on libmonogc. Fixes #68805.
20728
20729 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
20730
20731         * mini.c (mono_jit_free_method): Provide extra information for
20732         this error.  Currently this leaks, but will be turned into a
20733         developer option in the future.
20734
20735 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
20736
20737         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
20738
20739 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
20740
20741         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
20742         boundary. Fixes reading of PATCH_INFO_R4 and R8.
20743         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
20744
20745 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
20746
20747         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
20748         trampolines for AOT code.
20749
20750 2004-10-22    <vargaz@freemail.hu>
20751
20752         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
20753         constructed types. Fixes #68136.
20754
20755 2004-10-21  Martin Baulig  <martin@ximian.com>
20756
20757         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
20758         if it returns true, unwind the stack to the call instruction.
20759
20760 2004-10-21    <vargaz@freemail.hu>
20761
20762         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
20763
20764         * mini.h: Bump AOT version number.
20765
20766         * objects.cs: Add another test for unbox trampolines.
20767
20768         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
20769         valuetype methods.
20770
20771 2004-10-20    <vargaz@freemail.hu>
20772
20773         * driver.c: Add SHARED to the set of optimizations tested.
20774
20775         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
20776
20777         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
20778         used by CEE_NEWARR.
20779
20780         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
20781
20782 2004-10-20  Martin Baulig  <martin@ximian.com>
20783
20784         * mini-exceptions.c (mono_handle_exception): Call
20785         mono_debugger_handle_exception() to tell the debugger about
20786         catch/finally clauses.
20787
20788 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
20789
20790         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
20791
20792         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
20793         #68447.
20794
20795 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
20796
20797         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
20798         methods as their native size, fixed bug #57543, #57545.
20799         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
20800         This saves a temporary register and mullw call down into 1 (minor perf
20801         increase for cases like sum = sum * 5;  This use to translate into:
20802             li r11,5
20803             mullw r28,r28,r11
20804         It now translates to
20805             mulli r28,r28,5
20806
20807 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
20808
20809         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
20810         #68388.
20811
20812 2004-10-11  Martin Baulig  <martin@ximian.com>
20813
20814         * mini.c (mono_method_to_ir): If we're a generic method, get the
20815         MonoGenericContainer from our MonoMethodNormal and create a
20816         MonoGenericContext from it.
20817
20818 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
20819
20820         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
20821
20822         * basic-long.cs: Add test for checked i8->i2 cast.
20823
20824 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20825
20826         * inssel-ppc.brg: added a couple of speedup rules.
20827
20828 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
20829
20830         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
20831         to speed up rebuilds.
20832
20833 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20834
20835         * mini-s390.c: Minor fix to OP_OR_IMM.
20836
20837 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
20838
20839         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
20840         better. Fixes appdomain-unload.exe on sparc.
20841
20842 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
20843
20844         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
20845         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
20846         see bug 67324.
20847
20848 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
20849
20850         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
20851
20852 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
20853
20854         * mini.c: Always generate a field read/write wrapper for members
20855         of the class MarshalByRefObject since the actual instance could
20856         be a CBO.
20857
20858 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
20859
20860         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
20861
20862 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
20863
20864         * driver.c mini.h trace.c: Move the setting of the main assembly into
20865         a separate function called mono_trace_set_assembly () and call it after
20866         actually loading the main assembly. Fixes #66872.
20867
20868 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
20869
20870         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
20871         using the code manager.
20872
20873 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
20874
20875         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
20876
20877 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
20878
20879         * cpu-amd64.md: Fix bug in previous patch.
20880         
20881         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
20882         #66650.
20883
20884 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
20885
20886         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
20887         mini-exceptions.c: updates for changed stack walk interface.
20888
20889 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20890
20891         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
20892
20893 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
20894
20895         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
20896
20897 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
20898
20899         * driver.c (mini_regression_list): Do not call mono_assembly_close 
20900         since assemblies can't be unloaded.
20901         
20902 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
20903
20904         * cpu-amd64.md: Fix more instruction lengths.
20905
20906         * cpu-amd64.md: Fix lengths of some instructions.
20907
20908 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20909
20910         * inssel.brg: Make the array ldelema check aot friendly.
20911
20912 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
20913
20914         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
20915
20916         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
20917
20918 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
20919
20920         * mini-x86.c: Fix build.
20921
20922         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
20923         mono_type_get_underlying_type () helper function to simplify code.
20924         
20925 2004-09-09  Martin Baulig  <martin@ximian.com>
20926
20927         * mini-amd64.c: Don't access `type->data.klass' directly, call
20928         mono_class_from_mono_type() instead since the type may be a
20929         generic instance.
20930
20931 2004-09-09  Martin Baulig  <martin@ximian.com>
20932
20933         * mini-amd64.c (get_call_info): Fix support for generic instances.
20934         (add_valuetype): Use mono_class_from_mono_type() to get the class
20935         since we can be a generic instance.
20936
20937 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
20938
20939         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
20940
20941 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
20942
20943         * liveness.c: reset spill costs on each scan: bug 62107
20944
20945 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
20946
20947         * exceptions-sparc.c (mono_arch_find_jit_info): remove
20948         unnecessary line that doesn't compile
20949
20950 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
20951
20952         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
20953         trampolines, make them call an error function so people can fix their
20954         code.
20955
20956 2004-09-06  Martin Baulig  <martin@ximian.com>
20957
20958         * mini.c (mono_method_to_ir): When initializing locals, handle a
20959         generic instances like a valuetype if it's a valuetype and like a
20960         class if it's a class.
20961
20962 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
20963
20964         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
20965         stack. Fixes #64674.
20966
20967         * exceptions.cs: Add test for unwinding of call arguments.
20968
20969 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
20970
20971         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
20972         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
20973         set the carry/borrow flag). The sparc and s390 implementations
20974         can now use optimized versions (and simplify the code). ppc bugfixes.
20975
20976 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
20977
20978         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
20979
20980 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
20981
20982         * inssel-amd64.brg: Remove leftover 32 bit rule.
20983
20984         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
20985
20986 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
20987
20988         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
20989         mono_arch_find_jit_info functions into a new function. Fix a memory
20990         leak.
20991
20992         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
20993         refactored code.
20994         
20995 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
20996
20997         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
20998         as well.
20999         
21000         * exceptions.cs: Add array size tests.
21001
21002         * mini.c: Allocate a separate icall wrapper for each arity of 
21003         mono_array_new_va. Fixes #59509.
21004
21005         * exceptions.cs: Add testcase for 64578.
21006
21007         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
21008
21009         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
21010         
21011 2004-09-02  Martin Baulig  <martin@ximian.com>
21012
21013         * mini.c (mono_method_to_ir): When initializing the locals, call
21014         handle_initobj() on the generic instance itself, not its
21015         underlying type.
21016
21017 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
21018
21019         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
21020         MonoJitInfo for dynamic methods.
21021
21022         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
21023
21024         * mini.c: Add support for freeing JIT data for dynamic methods.
21025         
21026 2004-09-01  Martin Baulig  <martin@ximian.com>
21027
21028         * mini-x86.c (is_regsize_var): Added support for generic
21029         instances.
21030         (mono_arch_emit_prolog): Make this compile again, use
21031         `x86_push_imm_template (code)'.
21032
21033 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
21034
21035         * mini-x86.c: make all push_imm instructions that get
21036         patched always emit the long form
21037
21038 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
21039
21040         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
21041         in a per-domain hash.
21042
21043         * mini-amd64.c (merge_argument_class_from_type): Handle generic
21044         types.
21045
21046 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
21047
21048         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
21049         work.
21050         
21051         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
21052         work.
21053
21054         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
21055         Beginnings of SSE2 support.
21056
21057         * exceptions.cs: Add more tests for checked int<->uint casts.
21058
21059 2004-08-28  Martin Baulig  <martin@ximian.com>
21060
21061         * mini-x86.c (mono_arch_instrument_epilog): Added support for
21062         generic instances.
21063
21064         * mini.c
21065         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
21066         Handle generic instances recursively.
21067
21068 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
21069
21070         * iltests.il: test for conv.u8 on a constant
21071
21072 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
21073
21074         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
21075         LCONV_x4 (shrun_32 (membase)).
21076
21077 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
21078
21079         * inssel-x86.brg: c&p rules for push/setret of long
21080
21081 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
21082
21083         * inssel-x86.brg: c&p rules for compare (base, regvar) and
21084         compare (regvar, base)
21085
21086         * inssel-x86.brg: more burg love
21087
21088         * inssel.brg: more cleanup
21089
21090         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
21091
21092 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
21093
21094         * basic-long.cs, basic-calls.cs: new tests for optimization.
21095
21096 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
21097
21098         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
21099         patch.
21100
21101 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
21102
21103         * mini-amd64.c (read_tls_offset_from_method): Add another case.
21104         
21105 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
21106
21107         * inssel.brg (mini_emit_memcpy): use 
21108         NO_UNALIGNED_ACCESS to disable memcpy optimization
21109
21110 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
21111
21112         * mini-amd64.c: Handle generic types in various places.
21113
21114         * mini.c (mono_method_to_ir): Handle generic types in init locals.
21115
21116 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
21117
21118         * mini.c (handle_box): Fix warning.
21119
21120         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
21121
21122         * mini-amd64.h: Enable the emit_state optimization.
21123
21124         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
21125
21126         * mini-amd64.c: Add some new 64 bit peephole opts.
21127
21128         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
21129
21130         * cpu-amd64.md: sreg1 of div instructions must be %rax.
21131
21132         * mini-amd64.c: Register allocator fixes.
21133
21134         * mini.c: Add an optimization to emit_state to avoid allocation of new
21135         registers on some platforms.
21136
21137 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
21138
21139         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
21140
21141         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
21142         allocation. Fixes #63085.
21143
21144         * basic-long.cs: Add new regression test.
21145
21146         * mini-amd64.c: Register allocator improvements.
21147
21148 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
21149
21150         * mini-amd64.c (read_tls_offset_from_method): Add another code
21151         sequence.
21152
21153         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
21154         instruction sequence for nullifying class init trampolines.
21155
21156         * objects.cs: Add new regalloc test.
21157
21158         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
21159
21160 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
21161
21162         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
21163         
21164         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
21165         arguments.
21166
21167         * driver.c: Fix profiling after TLS changes.
21168         
21169         * driver.c (mono_main): Set mono_stats.enabled if needed.
21170
21171         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
21172         CEE_BOX.
21173
21174 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
21175
21176         * mini-x86.c: use a 1 op rather than a 2 op tls access
21177         instruction -> faster.
21178
21179 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
21180
21181         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
21182         x86 backend.
21183
21184 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
21185
21186         * exceptions-sparc.c (throw_exception): fix typo
21187
21188 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
21189
21190         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
21191         set tree->dreg correctly with tls. Allow any
21192         register to be used.
21193
21194         * mini-x86.c (read_tls_offset_from_method): add new code
21195         generation pattern seen with GCC.
21196
21197
21198 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
21199
21200         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
21201         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
21202         exceptions-sparc.c: fix some performance issues in exception
21203         handling and setting of the stack trace for exceptions that were
21204         already thrown.
21205
21206 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
21207
21208         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
21209         x86 backend.
21210         
21211         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
21212         registers.
21213
21214 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
21215
21216         This patch inlines tls access, when possible.
21217         
21218         * mini.h: new arch functions for TLS intrinsics.
21219         All platforms updated with a stub.
21220
21221         * mini.c: use the new intrinsics
21222
21223         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
21224         arch specific intrinsic for tls variables
21225
21226 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
21227
21228         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
21229         under windows.
21230
21231 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
21232
21233         * mini.c: thread local allocation
21234
21235 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
21236
21237         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
21238
21239         * Makefile.am: Link against the static version of libmonogc.
21240         
21241         * Makefile.am: Link the static versions of the convenience libraries
21242         into the mono executable.
21243
21244         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
21245
21246 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
21247
21248         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
21249         on integer overflow.
21250
21251         * mini-amd64.c: Reorganize function call code.
21252
21253         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
21254
21255 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
21256
21257         * inssel-x86.brg: use xor eax,eax.
21258         
21259         * basic.cs: new tests
21260
21261 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
21262
21263         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
21264         in exception throwing code.
21265         
21266 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
21267
21268         * inssel-x86.brg: use xor esi,esi.
21269
21270 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
21271
21272         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
21273         can trace methods compiled during mini_init () too.
21274
21275         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
21276         CEE_CONV_U4.
21277
21278 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
21279
21280         * Makefile.am: static link on x86 (r=zoltan)
21281
21282 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
21283
21284         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
21285         code since it causes some programs to fail.
21286
21287 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
21288
21289         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
21290
21291 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
21292
21293         * mini.c: ovfops_op_map - add STACK_OBJ case for
21294         CONV_I 
21295         * basic.cs: add test_0_pin_string as test
21296         case for above.
21297
21298 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
21299
21300         * Makefile.am: build C# if srcdir != builddir
21301
21302 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
21303
21304         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
21305         fall-through blocks.
21306
21307 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
21308
21309         * driver.c: enable loop by default again and include abcrem in -O=all.
21310
21311 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
21312
21313         * iltests.il: Add some localloc tests.
21314
21315         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
21316
21317         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
21318         Fixes #62574.
21319
21320         * inssel-amd64.brg: Add some optimizations.
21321
21322         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
21323         for gcc-3.4.
21324
21325         * Makefile.am: Statically link mono against libmono on AMD64.
21326         
21327         * mini-amd64.c inssel-amd64.brg: Optimizations.
21328
21329 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
21330
21331         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
21332
21333         * tramp-amd64.c: Patch calling code in trampolines.
21334
21335 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
21336
21337         * mini-amd64.c: pinvoke struct passing fixes.
21338
21339 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
21340
21341         * mini-sparc.c: redo change, make mono_arch_cpu_init call
21342         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
21343
21344 2004-08-05  Duncan Mak  <duncan@ximian.com>
21345
21346         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
21347         CEE_LDELEM_ANY.
21348
21349 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
21350
21351         * mini-amd64.c (emit_move_return_value): Move return value for normal
21352         calls too.
21353
21354 2004-08-05  Martin Baulig  <martin@ximian.com>
21355
21356         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
21357         `type->type'; just modify `type' itself when dealing with enums
21358         and generic instances.
21359         (check_call_signature): Make `simple_type' a `MonoType *'.
21360
21361 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
21362
21363         * mini.c: Use OP_PADD to add offsets to addresses.
21364
21365         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
21366
21367 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
21368
21369         * mini-sparc.c (mono_arch_emit_epilog): fix check
21370         for folding last op into restore instruction
21371
21372 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
21373
21374         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
21375         helper methods using the code manager.
21376         
21377         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
21378
21379         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
21380
21381 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21382         
21383         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
21384           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
21385
21386         * mini-s390.c: fix tail processing
21387
21388 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
21389
21390         * mini-ppc.c: mul.ovf.un exception name fix.
21391
21392 2004-08-03  Martin Baulig  <martin@ximian.com>
21393
21394         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
21395         instances; before jumping to `handle_enum', also modify `ptype'.
21396
21397 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
21398
21399         * cpu-sparc.md: fcall maximal length too small.
21400
21401 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
21402
21403         * mini-amd64.c mini.h: Add initial support for passing/returning 
21404         structures to/from pinvoked methods.
21405
21406 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
21407
21408         * mini-ppc.c: reg allocator fix.
21409
21410 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
21411
21412         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
21413
21414         * inssel.brg: Optimize memset on 64 bit machines.
21415
21416         * mini-amd64.c: Fix some vararg cases.
21417
21418 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21419
21420         * mini-s390.c: Corrected macro in emit_float_to_int
21421
21422         * s390-abi.cs: Tests to exercise the s390 ABI
21423
21424 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
21425
21426         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
21427         caller saved regs.
21428
21429         * basic.cs: Add a test for add.ovf.un.
21430
21431 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
21432
21433         * mini-sparc.c: add case for OP_IDIV_UN
21434
21435 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
21436
21437         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
21438         
21439         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
21440
21441 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
21442
21443         * basic.cs: regression tests.
21444
21445         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
21446         regressions.
21447
21448 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
21449
21450         * basic.cs: Add a new test.
21451
21452         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
21453         and AOT. Various fixes and optimizations.
21454
21455         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
21456
21457 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
21458
21459         * mini-ppc.c: make sure temp regs are not used for global reg
21460         allocation.
21461
21462 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
21463
21464         * cpu-sparc.md: conv_i8 fix for 64bits
21465
21466         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
21467
21468 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
21469         
21470         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
21471         add opcode for cmp BYTE PTR [eax], imm.
21472
21473         * inssel.brg: Make memcpy and memset takes bases.
21474
21475 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
21476
21477         * *-amd64.*: More AMD64 work.
21478         
21479 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
21480
21481         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
21482         add a compare-not-equal opcode.
21483         
21484 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
21485
21486         * mini.c: Use mono_init_from_assembly instead of mono_init.
21487         
21488 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
21489
21490         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
21491
21492         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
21493
21494         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
21495
21496         * inssel.brg: 64 bit fixes.
21497
21498         * mini.h (MonoCallInst): Add some AMD64 specific data.
21499
21500         * mini.h: Add some OP_P opcodes.
21501
21502 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
21503
21504         * basic.cs: tests for 61797 and 61740
21505
21506 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
21507
21508         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
21509         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
21510
21511 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
21512
21513         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
21514
21515         * *-amd64*.*: Ongoing AMD64 work.
21516
21517 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
21518
21519         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
21520
21521         * *-amd64*: Ongoing AMD64 work.
21522
21523         * mini-arch.h: Add AMD64 support.
21524
21525         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
21526
21527         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
21528
21529         * mini-ops.h: Add new opcodes.
21530
21531         * Makefile.am: Add AMD64 support.
21532
21533         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
21534         rules into the inssel-long*.brg files.
21535
21536         * *-amd64.*: Add beginnings of AMD64 backend.
21537
21538 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
21539
21540         * mini.c (print_dfn): commenting out the code that prints
21541         the cil. With -O=deadce, this makes -v -v crash.
21542         
21543         * cpu-pentium.md: make checkthis have a length of 2
21544
21545 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
21546
21547         * mini-sparc.h: fix implementations of __builtin
21548         functions for Sun compiler for V9.
21549
21550 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
21551
21552         * mini.c: use the new stelem.ref wrapper
21553         * exceptions.cs, arrays.cs: new stelem.ref tests
21554
21555 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
21556
21557         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
21558         new XSP should work with these changes).
21559
21560 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
21561         
21562         * inssel-{long32,x86,}.brg: trivial optimizations.
21563         
21564 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
21565
21566         * mini.c: load value when emitting box operation in
21567         constrained calls.
21568
21569 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
21570
21571         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
21572         is one byte shorter than cmp DWORD PTR [eax], 0.
21573
21574 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
21575
21576         * inssel-ppc.brg: arguments on the stack are always
21577         relative to the stack pointer (spotted by Neale Ferguson).
21578
21579 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21580
21581         * exceptions-x86.c: delay appending the method name to the trace until
21582         after mono_jit_info_table_find is called, as this gets the real
21583         MonoMethod.
21584
21585 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
21586
21587         * aot.c: register roots
21588
21589 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
21590
21591         * aot.c : I could just use PLATFORM_WIN32 flag.
21592
21593 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
21594
21595         * aot.c : Reverting the previous fix. This time it broke linux build.
21596
21597 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
21598
21599         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
21600
21601 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
21602
21603         * mini.c (handle_stack_args): Remove some more debugging code.
21604         
21605         * mini.c (handle_stack_args): Remove debug output left in by mistake.
21606
21607         * driver.c mini.h aot.c: Allow additional options to be specified with
21608         --aot and pass them to mono_compile_assembly.
21609
21610         * aot.c: Add experimental code to AOT compile all loaded assemblies
21611         on demand and save the code into a cache in the filesystem.
21612
21613         * aot.c: Add support for more wrapper methods.
21614         
21615         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
21616         58863.
21617
21618         * cpu-*.md: Remove removed opcodes.
21619
21620         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
21621         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
21622         related icalls to marshal.c.
21623
21624 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
21625
21626         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
21627
21628         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
21629
21630         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
21631
21632 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
21633         * liveness.c: If liveness is recomputated we need to reset the information
21634         for each variable. This way, if the liveness range has been narrowed
21635         by optimizations that happened after the last computation, we can return
21636         a smaller range.
21637         
21638         For example, if you have
21639         
21640         {
21641                 int i = 0;
21642                 
21643                 // Tons of code that does not affect i
21644                 
21645                 i = foo ();
21646                 ...
21647         }
21648         
21649         i = 0 is dead code and will be removed by SSA. However, when
21650         linear scan gets to the code, i will still appear to be live
21651         throughout the entire block. This prevents good register allocation.
21652
21653 2004-07-06  Martin Baulig  <martin@ximian.com>
21654
21655         * debug-mini.c (mono_debug_init_method): Allow
21656         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
21657         (mono_debug_add_icall_wrapper): New method.
21658
21659         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
21660
21661 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
21662
21663         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
21664         optimization.
21665
21666 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
21667
21668         * aot.c (mono_aot_load_method): Fix loading of debug info.
21669
21670 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
21671
21672         * aot.c: Add logging support.
21673
21674 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
21675
21676         * mini.h: Add prototype for mono_print_method_from_ip.
21677
21678         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
21679
21680         * inssel.brg: 64 bit fixes.
21681
21682         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
21683         inssel-long32.brg.
21684
21685         * Makefile.am: Add SPARC64 support.
21686
21687 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
21688
21689         * aot.c: Fix alignment problems on 32 bit platforms.
21690
21691 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
21692
21693         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
21694         SPARC64.
21695
21696         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
21697         problems.
21698
21699         * mini.h: Bump AOT file version. Some 64 bit fixes.
21700
21701 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
21702
21703         * inssel-sparc.brg: Add new rule to avoid register moves.
21704
21705         * inssel.brg: Add ldind_to_load_membase helper function.
21706
21707 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
21708
21709         * mini.c: OffsetToStringData intrinsic.
21710         
21711 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
21712
21713         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
21714
21715         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
21716         regression tests.
21717
21718         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
21719 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
21720
21721         * mini.c: reinstated mono_compile_get_interface_var()
21722         on x86, too, since the change breaks the Gtk# build there as well.
21723
21724 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
21725
21726         * driver.c: remove loop from the default optimizations: it seems to
21727         interact badly with some of the other options (see bug #60613).
21728
21729 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
21730
21731         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
21732         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
21733
21734 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
21735
21736         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
21737         vararg-using methods.
21738
21739 2004-06-21  Martin Baulig  <martin@ximian.com>
21740
21741         * mini/mini-exceptions.c
21742         (mono_handle_exception): Added `gpointer original_ip' argument.
21743         After calling mono_unhandled_exception(), call
21744         mono_debugger_unhandled_exception() and if that returns true,
21745         restore the context and return.
21746
21747 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
21748
21749         * mini-ppc.c: prefer the use of relative branches so
21750         they won't need to be patched in aot code (patch from Patrick Beard).
21751
21752 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
21753
21754         * aot.c: patch from Patrick Beard to make the output assembly
21755         more correct for the MacOSX assembler. Small tweak to
21756         generate sane images on Linux/PPC, too.
21757
21758 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
21759
21760         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
21761         case until bug #59509 is fixed (shows up in #60332).
21762
21763 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
21764
21765         * mini.c: make sure the needed wrappers are compiled, too, with
21766         precomp.
21767
21768 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
21769
21770         * driver.c: remove NPTL reference in --version output.
21771
21772 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
21773
21774         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
21775         generate valid assembly for the Mach-O assembler.
21776
21777 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
21778
21779         * driver.c: don't include abcrem in the all optimization specifier
21780         since it slows down jit compilation too much for now.
21781
21782 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
21783
21784         * mini.c: use BIGMUL only if both operands have the same signage.
21785         * iltests.il: Test for bug 60056. (errors related to signage in
21786         BIGMUL).
21787
21788         r=lupus.
21789
21790 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
21791
21792         * mini.c, aot.c: memory leak fixes.
21793
21794 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
21795
21796         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
21797
21798 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
21799
21800         * Makefile.am: remove the -static hack completely, it links in
21801         statically glib as well.
21802
21803 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
21804
21805         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
21806         * exceptions.cs: make it compile with new mcs/csc.
21807
21808 2004-06-03 Massimiliano Mantione <massi@ximian.com>
21809         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
21810         and added relevant test case.
21811
21812 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
21813
21814         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
21815         regressions in gtk-sharp.
21816
21817 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
21818
21819         * exceptions.cs: New regression tests.
21820
21821         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
21822
21823 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
21824
21825         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
21826
21827 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
21828
21829         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
21830
21831         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
21832
21833 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
21834
21835         * mini.c (mono_jit_runtime_invoke): Init class in this
21836         method instead of trusting mono_jit_compile_method to
21837         do the work (because wrappers can be in object class)
21838
21839 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
21840
21841         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
21842
21843         * basic-long.cs: New regression test.
21844
21845 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
21846
21847         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
21848         and div/rem checks.
21849
21850 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
21851
21852         * Makefile.am: fix miguel's change to build mono statically against
21853         libmono (track build dependencies).
21854
21855 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
21856
21857         * cfold.c: Some glib versions do not have G_MININT32.
21858
21859 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
21860
21861         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
21862         with precision of tan, atan, sin and cos, and implemented related
21863         regressions tests (fixes bug 54467, but one new problem appeared and
21864         is not fixed yet).
21865
21866 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
21867
21868         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
21869
21870         * exceptions.cs: Add test for constant folding && division by zero.
21871
21872         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
21873         since driver.c is in libmono too, so the optimization was useless.
21874
21875         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
21876         variable to driver.c so the compiler can emit more efficient code to
21877         access them.
21878
21879 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21880
21881         * Makefile.am: don't distribute generated inssel.[ch] files.
21882
21883 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
21884
21885         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
21886         into the default appdomain. Fixes #58707.
21887
21888         * jit-icalls.c: Remove the broken approximation for truncl, doing
21889         no conversion is better.
21890
21891         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
21892         Fixes #58863.
21893
21894 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
21895
21896         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
21897         of the mcrxr instruction which is not available on some processors
21898         even if it's documented to be. Implement add and sub overflow correctly
21899         (still not complete for long unsigned). Speed up icalls a bit.
21900
21901 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
21902
21903         * mini.c (mono_jit_compile_method_with_opt): Make sure that
21904         we run .cctor in the current domain instead of target_domain.
21905         
21906         Fixes bug #58558, .cctor not being called in -O=shared.
21907
21908 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
21909
21910         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
21911
21912 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
21913
21914         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
21915         which can be done with an imm8, do it that way.
21916         (mono_arch_output_basic_block): ditto for a jmp
21917         (mono_arch_emit_prolog): Computate maximum offset of a label.
21918
21919 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
21920
21921         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
21922         now tries to allocate prefered physical reg's for virtual
21923         regs. This reduces the number of emited spills/loads with
21924         20-30% on our core assemblies.
21925
21926 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
21927
21928         * jit-icalls.c: truncl() is not needed and trunc() is
21929         the correct thing to do anyway (bug #58287).
21930
21931 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
21932
21933         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
21934         if available.
21935
21936 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
21937
21938         * driver.c: enable loop optimizations by default.
21939
21940 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
21941
21942         * mini-x86.c: fix calc of max loop size when aligning loops start.
21943
21944 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
21945
21946         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
21947         the stack.
21948
21949 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
21950
21951         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
21952         should set carry.
21953
21954         * basic-long.cs: Add tests for add/subtract of immediates with carry.
21955
21956         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
21957         
21958         * mini.c (inline_method): Allways inline some wrappers even if the cost
21959         is too large. Fixes #58785.
21960
21961         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
21962         
21963 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
21964
21965         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
21966         (crichton@gimp.org). Beginning of support for sparc/linux.
21967
21968         * mini-sparc.c: Optimize retrieval of LMF address.
21969
21970 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
21971
21972         * exceptions-ppc.c:  handle alloca in methods with clauses.
21973
21974 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
21975
21976         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
21977
21978 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
21979
21980         * mini.c: Delegate most of the abort signal work to 
21981           mono_thread_request_interruption, which also handles Stop and Suspend
21982           states.
21983
21984 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
21985
21986         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
21987         supports the save/restore lmf opcodes.
21988
21989 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
21990
21991         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
21992         by gcc-3.4 as well.
21993
21994         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
21995
21996 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
21997
21998         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
21999         methods which contain array accesses.
22000
22001         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
22002         boundaries. Fixes #58537.
22003
22004         * iltests.il: Add regression test for #58537.
22005
22006 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
22007
22008         * mini-x86.c (mono_arch_local_regalloc): Last part of
22009         fix for bug #58633 (releasing register to early).
22010
22011 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
22012
22013         * basic-long.cs: Add new regression test.
22014
22015 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
22016
22017         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
22018         register too early on the chain.
22019
22020 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
22021
22022         * mini.c (create_helper_signature): Use a helper function to reduce
22023         the code which needs to be written. Also set the calling convention of
22024         icalls on windows. Fixes #57840.
22025
22026 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
22027
22028         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
22029         exceptions-ppc.c: added helper function to get the instruction address
22030         from a signal handler context.
22031
22032 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
22033
22034         * helpers.c: use g_get_tmp_dir. Invokes happyness 
22035         from gonzalo.
22036
22037 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
22038
22039         * helpers.c: Add new env variable to pass args to objdump.
22040         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
22041
22042 2004-05-17  Radek Doulik  <rodo@ximian.com>
22043
22044         * Makefile.am (common_sources): added abcremoval.h so it get
22045         disted and daily mono packages on go-mono.com will build again
22046
22047 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
22048
22049         * abcremoval.c: Fixed coding style, added copyright header.
22050
22051         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
22052
22053         * mini.h: Added prototype for abc removal main function.
22054
22055         * build_relations_propagation_table.pl: Added copyright header.
22056
22057 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
22058
22059         * basic-long.cs: reg test for complex ceq_long bug.
22060
22061 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
22062
22063         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
22064         reg in long and clob case (bug #58343). Fixed/added comments.
22065
22066 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
22067
22068         * mini.c (mono_jit_runtime_invoke): Follow new convention
22069         of calling the invoke method with an function pointer.
22070
22071 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
22072
22073         * ChangeLog: Fix author of memory leak patch.
22074
22075 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
22076
22077         * Makefile.am: fix make dist as well...
22078
22079
22080 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
22081
22082         * cfold.c: Made so that conversions from pointer to int4 are no-ops
22083         on archs where pointers are 4 bytes long.
22084
22085         * Makefile.am: Added abcremoval.c source file.
22086
22087         * abcremoval.c: Added abcremoval.c.
22088
22089         * abcremoval.h: Added abcremoval.h.
22090
22091         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
22092
22093         * inssel.brg: Enabled bounds check removal.
22094
22095         * mini.c: Added support for abcrem optimization.
22096
22097         * mini.h: Added abcrem optimization label.
22098
22099         * driver.c: Added support for abcrem optimization.
22100
22101         * propagated_relations_table.def: Added propagated_relations_table.def.
22102
22103 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
22104
22105         * mini.c, cfold.c: fix style.
22106
22107 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
22108
22109         * mini.c: handle issue with the low-level implementation of
22110         some long opcodes (bug #54209).
22111
22112 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
22113
22114         * basic.cs: test for my new cmov stuff.
22115
22116 2004-05-13      Patrik Torstensson
22117
22118         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
22119         opt and added peephole documentation.
22120
22121 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
22122
22123         * tramp-ppc.c: rewrote the generic trampoline code.
22124
22125 2004-05-11      Patrik Torstensson
22126
22127         * mini-x86.c: optimize long shl/shr asm code (one less branch)
22128
22129 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
22130
22131         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
22132
22133         * mini.h mini.c dominators.c: Applied patch from Derek Woo
22134         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
22135
22136         * mini.c: Add new icalls for AsAny marshalling.
22137
22138 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
22139
22140         * tramp-ppc.c, mini-ppc.c: more cleanups.
22141
22142 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22143
22144         * mini.c: no warnings.
22145
22146 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22147
22148         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
22149
22150 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
22151
22152         * mini.c: In the thread abort signal handler, if the thread is in the
22153         process of being stoped, don't throw the Abort exception, just stop the
22154         thread.
22155
22156 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
22157
22158         * tramp-ppc.c: removed old code.
22159
22160 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22161
22162         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
22163         do some simple speed optimizations on ppc.
22164
22165 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
22166
22167         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
22168         and large offsets in load/store.
22169
22170 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
22171
22172         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
22173         it causes regressions.
22174
22175 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
22176
22177         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
22178         support.
22179
22180 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
22181
22182         * jit-icalls.c: remove warnings.
22183         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
22184         speedups for unsafe code.
22185
22186 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
22187
22188         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
22189
22190 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
22191
22192         * basic-calls.cs: Add new regression test.
22193
22194         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
22195         more portable.
22196
22197         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
22198
22199         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
22200         is no longer used.
22201
22202 2004-05-06      Patrik Torstensson
22203
22204         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
22205         long reg allocation in any reg (not only eax:edx) and implemented 
22206         long shl/shr ops in asm instead of helpers.
22207
22208 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
22209
22210         * mini-sparc.h: Fix warnings.
22211
22212         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
22213         stack.
22214
22215         * mini-exceptions.c (mono_handle_exception): Call the filter in a
22216         separate statement for clarity.
22217
22218         * mini-sparc.c: Update status.
22219
22220 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
22221
22222         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
22223         here.
22224
22225 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
22226
22227         * inssel-ppc.brg: another small pre-release workaround:
22228         we don't do overflow detection for long_sub_un.
22229
22230 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
22231
22232         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
22233         (also works around a weird ppc bug: 57957).
22234
22235 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
22236
22237         * tramp-ppc.c: trampoline fixes.
22238
22239 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
22240
22241         * mini-ppc.c: fixed typos.
22242
22243 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
22244
22245         * mini-ppc.c, exceptions-ppc.c: more code saves registers
22246         at the top of the stack. Fixed typos. Use a frame registers
22247         for all the methods with exception clauses.
22248
22249 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
22250
22251         * exceptions-ppc.c: restore fp registers.
22252
22253 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
22254
22255         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
22256         order from the stack top (moved the stack room to save the
22257         return value for trace after the param area). Fixed corruption
22258         in restoring registers on unwind.
22259
22260 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
22261
22262         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
22263
22264 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
22265
22266         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
22267         and prolog/epilog for methods that use it. Allow
22268         enough param area room for varargs methods. Fix miguel's
22269         breakage in exception handling.
22270
22271 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
22272
22273         * Makefile.am: run genmdesc only on current arch.
22274
22275 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22276
22277         * exceptions-x86.c:
22278         * mini-x86.h: fix the build on windows.
22279
22280 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
22281
22282         * 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.
22283
22284         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
22285
22286         * mini-exceptions.c: New file.
22287         
22288         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
22289         Move some parts of the x86 exception handling code to an 
22290         arch-independent file so it can be shared with other ports.
22291
22292 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
22293
22294         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
22295
22296 2004-04-26  David Waite  <mass@akuma.org>
22297
22298         * driver.c: remove comma from end of enumeration declaration
22299
22300 2004-04-26  Jackson Harper  <jackson@ximian.com>
22301
22302         * driver.c: parse config file before loading first assembly. This
22303         allows the user gac to be enabled/disabled. 
22304         
22305 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
22306
22307         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
22308         simpler mechanism: we do not care what is encoded initially
22309         (branch absolute or relative), we care about the code and its
22310         target.  I kept the old code for reference for now.
22311
22312         The new code tries first to determine if the jump is anywhere in
22313         the -/+32 absolute meg range, if it succeeds, it encodes using the
22314         absolute branch;  If not, it tried to find something in the
22315         relative range, if not, it uses the handle_thunk code. 
22316
22317 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
22318
22319         * exceptions-ppc.c: use the correct ip register on macosx.
22320
22321 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
22322
22323         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
22324
22325 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
22326
22327         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
22328         Raise exception on integer divide by zero by hand since the hw
22329         doesn't support it. Handle NaNs in FP compares.
22330
22331 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
22332
22333         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
22334         code reducing duplication between the platforms and enabled
22335         signal exception handling (on linux for now).
22336
22337 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
22338
22339         * exceptions-ppc.c: more macosx support.
22340
22341 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22342
22343         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
22344
22345 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
22346
22347         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
22348
22349 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
22350
22351         * iltests.il: more tests.
22352
22353 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
22354
22355         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
22356         vars as well.
22357
22358 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
22359
22360         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
22361
22362 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
22363
22364         * liveness.c: Mark variables as volatile in all basic blocks reachable
22365         from exception clauses.
22366
22367 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
22368
22369         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
22370         inlining.
22371
22372 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
22373
22374         * iltests.il, basic.cs: more tests for regalloc.
22375
22376 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
22377
22378         * iltests.il: Some tests for register allocation modifications
22379         I have locally.
22380
22381 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
22382
22383         * exceptions.cs: Add regression test for bug #56782.
22384
22385         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
22386         original stack trace if an exception is rethrown. Fixes #56782. Oh,
22387         the beauty of fixing the same thing in 5 different files...
22388
22389 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
22390
22391         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
22392         methods.
22393
22394 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
22395
22396         * mini.c: Add support for STRWLPARRAY marshalling convention.
22397
22398 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
22399
22400         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
22401         to init the context to setup the regs pointer).
22402
22403 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
22404
22405         * exceptions-ppc.c: more exceptions work.
22406
22407 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
22408
22409         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
22410         not allowed.
22411
22412 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
22413
22414         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
22415         can use the memory directly.
22416
22417         * cpu-pentium.md: Update documentation from a post from Zoltan. 
22418
22419         add x86_add_membase, x86_sub_membase, x86_mul_membase
22420
22421 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
22422
22423         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
22424         GENERAL_REGS they were also hardcoded for all PPC ports.
22425
22426         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
22427
22428         Remove hard-coded limit for floating point registers, use
22429         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
22430
22431         Notice that in MacOS X calling conventions you can fit a lot more
22432         floating point values in registers, so I should update the PInvoke
22433         test to excercise the passing of floating point values on the
22434         stack (currently broken).
22435         
22436 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
22437
22438         * tramp-ppc.c (create_trampoline_code): Added
22439         JUMP_TRAMPOLINE_SIZE. 
22440         (ppc_magic_trampoline): Follow the pattern from
22441         x86_magic_trampoline: if code is set to zero, return. 
22442         (create_trampoline_code): Always pass MonoMethod to the jump
22443         trampoline, before it was passing a null.
22444         (mono_arch_create_jump_trampoline): Implement the jump stub, could
22445         share the code with mono_arch_create_jit_trampoline. 
22446
22447         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
22448         implemented.
22449         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
22450         implemented.  
22451
22452         * cpu-g4.md: Added length for jmp instruction, the worst case
22453         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
22454         for save_lmf).
22455
22456 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
22457
22458         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
22459
22460 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
22461
22462         * mini.c: Only set bblock->real_offset when adding a new bblock, and
22463         before each IL instruction.
22464
22465         * mini.c (CEE_BOX): Fix warnings.
22466
22467 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22468
22469         * mini.c: removed a few unused vars and extra whitespace.
22470
22471 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
22472
22473         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
22474         checks.
22475         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
22476         index.
22477         (OP_GETCHR): use the above
22478         (CEE_LDELEMA): use the above.
22479
22480         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
22481         version of the generic impl.
22482         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
22483         (CEE_LDELEMA): use the above.
22484
22485 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
22486
22487         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
22488         Fixes #56317.
22489
22490         * iltests.il: Added new regression test for #56317.
22491
22492 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
22493
22494         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
22495         under NetBSD. Fixes #56450.
22496
22497         * liveness.c (update_gen_kill_set): Fix previous patch.
22498
22499 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22500
22501         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
22502
22503 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
22504
22505         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
22506         ldsfld and ldsflda.
22507
22508         * inssel-sparc.brg: Add more optimizations.
22509
22510         * mini-sparc.c: Replace multiply/divide with shifts if possible.
22511
22512 2004-04-01  Martin Baulig  <martin@ximian.com>
22513
22514         * mini.c (handle_box): New static function; moved the
22515         implementation of CEE_BOX here.
22516         (mono_method_to_ir): Added `constrained_call' variable.
22517         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
22518         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
22519         mono_method_get_constrained() to get the method.
22520
22521 2004-04-01  Martin Baulig  <martin@ximian.com>
22522
22523         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
22524         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
22525         (mono_method_to_ir): We don't need these macros anymore since
22526         mono_class_get_full() already takes care of it. 
22527
22528 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22529
22530         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
22531         use @function (as doesn't accept #function here) and check the return
22532         value of system and stop if fails.
22533
22534 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22535
22536         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
22537
22538 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
22539
22540         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
22541
22542         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
22543
22544         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
22545         #56223.
22546
22547         * basic-long.cs: Add test for negation of Int64.MinValue.
22548
22549 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
22550
22551         * mini-sparc.c: Update status.
22552
22553         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
22554
22555         * exceptions-sparc.c: Fix return value in filters.
22556
22557         * inssel-sparc.brg: Fix register allocation in some rules.
22558
22559 2004-03-28  Martin Baulig  <martin@ximian.com>
22560
22561         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
22562         if neccessary.  
22563
22564 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
22565
22566         * mini-x86.c (mono_arch_patch_code): Fix warnings.
22567         
22568         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
22569         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
22570         remove unused conv_u4 opcode.
22571
22572         * mini-x86.c: Remove valgrind workaround since it slows down things
22573         even when mono is not run under valgrind.
22574
22575 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
22576
22577         * mini-sparc.c: Update status.
22578
22579         * inssel-sparc.brg: Add some optimizations.
22580
22581         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
22582         future delay slot filling. Add support for varargs, tail calls and JMP.
22583
22584         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
22585         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
22586
22587         * inssel.brg: Fix register allocation in OP_ARGLIST.
22588
22589         * inssel.brg: Fix warnings.
22590
22591 2004-03-25  Martin Baulig  <martin@ximian.com>
22592
22593         * mini.c (inflate_generic_field): Removed.
22594         (mini_get_method): Removed, use mono_get_method_full(),
22595         (mini_get_class): Removed, use mono_class_get_full().
22596         (mono_method_to_ir): Pass our generic context to
22597         mono_field_from_token().        
22598
22599 2004-03-25  Martin Baulig  <martin@ximian.com>
22600
22601         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
22602         of a `MonoMethod *'.
22603         (mini_get_method): Take a `MonoGenericContext *' instead
22604         of a `MonoMethod *'.
22605         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
22606         a new local variable called `generic_context' which holds the
22607         current `MonoGenericContext *'; use it to lookup things.
22608
22609 2004-03-24  Martin Baulig  <martin@ximian.com>
22610
22611         * mini.c (mini_get_class): New static method; if we're inside a
22612         generic instance, inflate the class if neccessary.
22613         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
22614
22615 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
22616
22617         * iltests.il: New regression test for #55976.
22618
22619         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
22620         #55976.
22621
22622 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
22623
22624         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
22625         output.
22626
22627 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
22628
22629         * liveness.c: Consider SSA stores as well as loads when making vars
22630         volatile.
22631
22632         * exceptions.cs: New regression tests for register allocation.
22633         
22634 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
22635
22636         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
22637         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
22638           domain lock only to protect puntual access to data structures.
22639           Added access lock for sighash, jit_icall_hash_name, 
22640           jit_icall_hash_addr and domain->code_mp.
22641
22642 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
22643
22644         * driver.c: Print SIGSEGV handling method.
22645
22646         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
22647
22648         * mini.c (setup_jit_tls_data): Handle case when this is called
22649         multiple times for a thread.
22650
22651         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
22652         is different from fbxx_un. Fixes #54303. Also use constants instead of
22653         magic numbers in a lot of places.
22654
22655 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
22656
22657         * exceptions.cs: Fix cctor test when --regression is used.
22658
22659 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
22660
22661         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
22662         for Linux/ppc.
22663
22664 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
22665
22666         * inssel-ppc.brg: fixed register assignments for some rules.
22667
22668 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
22669
22670         * exceptions.cs: Add test for exceptions in static constructors.
22671
22672         * mini.c (mono_jit_compile_method_with_out): Move the calling of
22673         static constructors outside the domain lock. Fixes #55720.
22674
22675 2004-03-17  Martin Baulig  <martin@ximian.com>
22676
22677         * mini.c (get_generic_field_inst): Removed, this'll never happen.
22678         (inflate_generic_field): Take the `MonoMethod *' instead of the
22679         `MonoClass *' and added support for generic method.
22680         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
22681         have a `field->parent->gen_params', only inflate the field if it's
22682         an open constructed type.
22683
22684 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
22685
22686         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
22687         exception object instead of the preconstructed ones.
22688
22689 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22690
22691         * mini.c: reverted changed to sigsegv_signal_handler commited
22692         accidentally in the previous patch.
22693
22694 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22695
22696         * mini.c:
22697         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
22698         running --aot with an old assembly.
22699
22700 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
22701
22702         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
22703         point values.
22704
22705         * mini-sparc.c: Add support for v9 branches with prediction.
22706
22707 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
22708
22709         * mini.c (mini_init): #warning is GNUC only
22710
22711         * mini-sparc.h: implement __builtin_frame_address
22712         and __builtin_return_address for Sun C compiler
22713
22714 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
22715
22716         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
22717
22718 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
22719
22720         * basic-calls.cs: Add test for unaligned byref long argument passing.
22721
22722         * mini-ops.h: Add sparcv9 compare and branch instructions.
22723
22724         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
22725         v9 instructions if we have a v9 cpu.
22726
22727         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
22728         registers for global allocation.
22729
22730         * exceptions-sparc.c: Fixes.
22731         
22732 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
22733
22734         * liveness.c (mono_analyze_liveness): Optimized version.
22735
22736         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
22737
22738         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
22739         sparc work.
22740
22741         * basic-float.cs basic-calls.cs: New regression tests.
22742
22743 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
22744
22745         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
22746         sigaltstack implementation.
22747
22748         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
22749         
22750         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
22751         stuff if SIGSEGV_ON_ALTSTACK is not defined.
22752
22753 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
22754
22755         * mini.c: Fix warnings.
22756         
22757         * mini.c (mono_resolve_patch_target): New function which contains the
22758         arch independent part of the patching process.
22759
22760         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
22761         patching code to a separate function.
22762
22763 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
22764
22765         * mini.c (add_signal_handler): ifdef out on Windows
22766
22767 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
22768
22769         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
22770         cpu-sparc.md: Add exception handling support + other fixes.
22771
22772         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
22773         typed GC detection in --version.
22774
22775         * basic.cs exceptions.cs: New regression tests.
22776
22777         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
22778         the arch specific code can store data during a compilation.
22779
22780         * mini-ops.h: Add OP_SETFRET.
22781
22782         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
22783         function, register a separate icall for each arity, so the icalls can
22784         get a wrapper.
22785         
22786         * mini.c (mono_print_tree): Print negative offsets in a more readable
22787         form.
22788         
22789         * mini.c: Make signal handling work on sparc.
22790         
22791         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
22792
22793         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
22794
22795         * jit-icalls.c: Emulate truncl by aintl on solaris.
22796
22797         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
22798
22799 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
22800
22801         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
22802
22803 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
22804
22805         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
22806         a MarshalByRef type, inline a method that performs the check, taking into
22807         account that the object can be a proxy. Also implemented tow new opcodes:
22808         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
22809         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
22810         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
22811
22812 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
22813
22814         * mini-ppc.c: if a relative branch displacement is too big
22815         but it points to and area reachable with an absolute branch, 
22816         avoid the thunks.
22817
22818 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
22819
22820         * mini.c: optimize small copies in cpblk.
22821
22822 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
22823
22824         * basic-calls.cs basic-float.cs: New regression tests.
22825
22826         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
22827         negative offsets from %fp. Implement localloc. Fix local register 
22828         allocation. Fix the case when the this argument needs to be saved to
22829         the stack. Implement some missing opcodes.
22830
22831 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
22832
22833         * mini.c (mini_method_compile): Reenable global regalloc in methods
22834         with exception handlers.
22835
22836         * linear-scan.c (mono_varlist_sort): Fix warning.
22837
22838         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
22839
22840         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
22841         regalloc costs.
22842
22843         * liveness.c: Make all variables uses in exception clauses volatile, to
22844         prevent them from being allocated to registers. Fixes #42136.
22845
22846 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
22847
22848         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
22849         causes regressions.
22850
22851         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
22852         argument to mono_arch_regalloc_cost.
22853
22854         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
22855         precisely.
22856
22857 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
22858
22859         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
22860         Make the cost of allocating a variable to a register arch dependent.
22861
22862         * basic-calls.cs: Fix compilation of tests.
22863         
22864         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
22865         helper function to cut back on the number of #ifdefs needed.
22866
22867         * mini-ppc.c: Fix compilation.
22868
22869         * basic-calls.cs: New regression tests.
22870
22871         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
22872
22873         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
22874         of l0 since that is callee saved.
22875
22876         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
22877         to virtual calls.
22878
22879         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
22880         of delay instruction.
22881
22882         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
22883
22884         * mini.h (MonoCallInst): Add 'virtual' flag.
22885
22886         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
22887
22888 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
22889
22890         * *.cs: New regression tests.
22891
22892         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
22893         work.
22894
22895         * mini.c (mono_runtime_install_handlers): Fix build.
22896
22897         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
22898         'signal_stack_size' members.
22899
22900         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
22901         alternate signal stack.
22902
22903         * exceptions-x86.c: Add stack overflow handling.
22904
22905         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
22906         functions to arch independent code.
22907
22908         * mini.c (mono_print_tree): Print more detailed info for load_membase
22909         opcodes.
22910         
22911 2004-02-23  Martin Baulig  <martin@ximian.com>
22912
22913         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
22914
22915 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
22916
22917         * mini-x86.c: fixed reg allocation for div/rem.
22918
22919 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
22920
22921         * driver.c (mono_main): Report some configuratio options on --version.
22922
22923 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
22924
22925         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
22926         low in the address space. Correctly flush memory in thunks where we
22927         output native code.
22928
22929 2004-02-20  Martin Baulig  <martin@ximian.com>
22930
22931         * mini.c (mini_get_method): New static method; inflate all generic
22932         methods and methods in open generic instances.
22933         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
22934         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
22935
22936 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
22937
22938         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
22939
22940         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
22941
22942 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
22943
22944         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
22945
22946         * mini-sparc.c (flushi mono_arch_output_basic_block): make
22947         it compile using Sun's compiler.
22948
22949 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
22950
22951         * 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.
22952
22953         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
22954
22955 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
22956
22957         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
22958         code.
22959         * mini-ppc.c: handle calls outside of the allowed range with thunks
22960         allocated using the code manager.
22961         * tramp-ppc.c: use the code manager to hold generated native code.
22962         Fixed the magic trampoline to just patch vtable entries.
22963
22964 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
22965
22966         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
22967         independent file.
22968
22969 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
22970
22971         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
22972         PPC.
22973
22974         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
22975         if we have a working __thread implementation.
22976
22977         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
22978         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
22979
22980 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
22981
22982         * mini-x86.c: Fix compilation under gcc 2.
22983         
22984 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
22985
22986         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
22987         contains a call to the wrapped function.
22988
22989         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
22990         OP_<CALL>_IMM opcodes, and use them under X86.
22991         
22992         * mini.c (mono_jit_find_compiled_method): Fix warning.
22993
22994         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
22995
22996         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
22997
22998         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
22999         functionality to mini.c.
23000
23001         * mini.c (mono_create_jump_trampoline): New function to create a jump
23002         trampoline. Return a compiled method instead of a trampoline if it
23003         exists. Add a cache for jump trampolines.
23004
23005         * mini.c (mono_jit_find_compiled_method): New function to return a
23006         compiled method if it exists.
23007
23008         * mini-x86.c: Call mono_create_jump_trampoline instead of 
23009         mono_arch_create_jit_trampoline.
23010
23011         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
23012         a jump trampoline. Fixes #52092.
23013         
23014 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
23015
23016         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
23017         which is not up-to-date. Add check_corlib_version () instead.
23018
23019         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
23020         have to call it.
23021         
23022         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
23023         since newer valgrind versions do not need it.
23024
23025         * mini.c (mono_jit_compile_method_with_opt): New helper function to
23026         compile a method with a given set of optimizations.
23027
23028         * mini.c: Compile icall wrappers on-demand instead of at startup.
23029
23030         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
23031         wrapper for an icall.
23032
23033 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
23034
23035         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
23036         #54063.
23037
23038         * iltests.il: Add test for non-empty stack before switch instruction.
23039
23040 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
23041
23042         * mini.c: Add support for new stringbuilder marshalling conventions.
23043
23044         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
23045
23046 2004-02-01  Martin Baulig  <martin@ximian.com>
23047
23048         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
23049         in `ginst->mtype_argv'.
23050
23051 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
23052
23053         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
23054         facilitate grepping.
23055
23056 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
23057
23058         * mini.c: fixed buglet in initobj generic implementation for references.
23059
23060 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
23061
23062         * Makefile.am: make the version script conditional.
23063         * jit-icalls.c: handle missing truncl().
23064
23065 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
23066
23067         * exceptions.cs: Add more tests for double->int conversion.
23068
23069         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
23070         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
23071
23072 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
23073
23074         * driver.c: make --verbose --version emit an error
23075         if the loaded corlib doesn't match the runtime version.
23076
23077 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
23078
23079         * mini-ppc.h: export ppc_patch().
23080         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
23081         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
23082         on par or better than on MacOSX.
23083
23084 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
23085
23086         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
23087         mono_lookup_pinvoke_call.
23088
23089         * mini-x86.c: Under windows, the default pinvoke calling convention is
23090         stdcall. Fixes #52834.
23091
23092         * mini.c (optimize_branches): Add an upper bound to the number of
23093         iterations to prevent infinite loops on strange loops. Fixes #53003.
23094
23095 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
23096
23097         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
23098         and ISINST. Fixes #52093.
23099
23100         * objects.cs (test_0_vector_array_cast): New tests.
23101         
23102 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
23103
23104         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
23105         checking in Array.Set ().
23106
23107         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
23108         #52590.
23109
23110         * object.cs (test_0_multi_array_cast): New regression test.
23111
23112 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
23113
23114         * exceptions-ppc.c: fix build on Linux/PPC.
23115
23116 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
23117
23118         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
23119         running under valgrind.
23120         (x86_magic_trampoline): Fix build bustage.
23121
23122         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
23123         negative values as well. This is needed for the encoding of the line number
23124         info, since sometimes the line numbers are not in increasing order.
23125
23126 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
23127
23128         * cpu-pentium.md (localloc): Increase the size of the localloc 
23129         instruction since it is a loop under Win32.
23130
23131         * debug-mini.c (record_line_number): Get rid of unneccesary memory
23132         allocation.
23133
23134 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
23135
23136         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
23137         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
23138         Max Horn (max@quendi.de). Fix file names in comments.
23139
23140 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
23141
23142         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
23143         avoid stack overflow.
23144         (replace_usage): Avoid uninitialized variable warnings.
23145
23146         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
23147         and taking the address of valuetype variables.
23148
23149 2004-01-03  Patrik Torstensson
23150
23151         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
23152         for other purposes than FP later on.
23153
23154 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
23155
23156         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
23157         of tail calls.
23158
23159 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
23160
23161         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
23162
23163 2003-12-30  Patrik Torstensson <p@rxc.se>
23164
23165         * mini-x86.h: Decreased number of availiable fp regs.
23166         Solves corner cases with FP spilling.
23167
23168 2003-12-23  Patrik Torstensson <p@rxc.se>
23169
23170         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
23171         for floating point stack tracking / spilling on x86. 
23172         Fixes bug #49012.
23173         
23174         * basic-float.cs: added float mul overflow test.
23175
23176 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
23177
23178         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
23179
23180 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23181
23182         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
23183         supports for cond branches that overflow the immediate
23184         overflow offset. mcs can compile simple programs.
23185
23186 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23187
23188         * exceptions-ppc.c: exception handling support wip:
23189         finally handlers get run on exception.
23190
23191 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
23192
23193         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
23194         profiling.
23195
23196 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
23197
23198         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
23199         initial support for stack walking and unwinding.
23200
23201 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
23202
23203         * driver.c (mono_main): Make corlib-out-of-sync message more 
23204         descriptive. Also remove verify_corlib call.
23205
23206 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
23207
23208         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
23209         not overlap with other call's arguments, too.
23210
23211 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
23212
23213         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
23214         move to arch-specific code the choice of arch-specific
23215         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
23216         * mini.c: ensure emulation calls will not interleave
23217         with other calls.
23218
23219 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
23220
23221         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
23222         the magic trampoline stack frame is dropped before executing
23223         the new method.
23224
23225 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
23226
23227         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
23228         and integer to fp conversions. Added support for overflowing
23229         arguments on the stack. Reserve a couple more registers as temps.
23230         Added support for aot compilation (as output still needs to be
23231         tweaked, though).
23232
23233 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
23234
23235         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
23236         Don't overwrite return register in some corner cases.
23237
23238 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
23239
23240         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
23241         static constructors when AOT compiling.
23242
23243         * driver.c (mono_main): Call mono_check_corlib_version.
23244
23245 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
23246
23247         * cpu-g4.md, basic.cs: fixed div target register.
23248
23249 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
23250
23251         * mini-ppc.c, basic.cs: shl_imm fix with test.
23252
23253 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
23254
23255         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
23256         structures by value. Misc fixes.
23257         * objects.cs: more tests.
23258
23259 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
23260
23261         * mini-ppc.c: lconv.ovf.i implemented.
23262
23263 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23264
23265         * mini.c:
23266         (mini_init): don't error out if someone already called g_thread_init.
23267
23268 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
23269
23270         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
23271         to be any type per the spec. Fix abnormal memory usage when
23272         the same object is repeatedly thrown.
23273
23274 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
23275
23276         * mini.c: check for overruns in IL code.
23277
23278 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
23279
23280         * TODO: Add/remove some todo entries.
23281
23282 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
23283
23284         * driver.c (mono_main): Call mono_verify_corlib.
23285
23286 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
23287
23288         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
23289         This has been moved to mini.c
23290         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
23291         type being casted is marshalbyref it could be a proxy, so instead of
23292         emitting the type check code, emit a call to a runtime method that will
23293         perform the check by calling CanCastTo if needed.
23294
23295 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
23296
23297         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
23298         methods with large stack frames under Win32.
23299
23300 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
23301
23302         * Makefile.am: Distribute regression tests.
23303
23304         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
23305         at the end instead of inserting each variable into the sorted list.
23306
23307         * linear-scan.c (mono_varlist_sort): New helper function.
23308         
23309 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
23310
23311         * mini.c: ensure arguments and locals are within bounds.
23312
23313 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
23314
23315         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
23316         related fixes.
23317
23318 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
23319
23320         * mini.c (mono_cprop_copy_values): Fix crash.
23321
23322         * aot.c: Set verbosity back to 0.
23323         
23324 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
23325
23326         * regalloc.c: complete memory leak fix by Laurent Morichetti
23327         (l_m@pacbell.net).
23328
23329 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
23330
23331         * driver.c (main_thread_handler): Revert the previous patch.
23332
23333         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
23334         under valgrind.
23335
23336         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
23337         memory from the memory pool.
23338
23339         * driver.c (main_thread_handler): Turn on all optimizations when
23340         --aot is used.
23341
23342         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
23343         an array for better performance.
23344
23345         * regalloc.c (mono_regstate_assign): Fix memory leak.
23346
23347         * debug-mini.c (mono_debug_serialize_debug_info): New function to
23348         serialize the debug info.
23349
23350         * debug-mini.c (mono_debug_add_aot_method): New function to load the
23351         debug info from the serialized representation.
23352
23353         * aot.c: Save debug info into the generated file and load it when 
23354         loading a method.
23355
23356         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
23357
23358 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
23359
23360         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
23361         More FP-related fixes.
23362
23363 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
23364
23365         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
23366         and register allocation buglet. Hello world now runs.
23367
23368 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
23369
23370         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
23371         * tramp-ppc.c: fixed class init trampoline.
23372         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
23373
23374 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
23375
23376         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
23377         mini.c: more ppc changes/fixes.
23378
23379 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
23380
23381         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
23382         Also optimize the case when the arguments are the same in the caller 
23383         and in the callee.
23384
23385         * iltests.il: Add tests for tail calls with valuetype arguments.
23386
23387 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
23388
23389         * mini-ppc.c: fixes for struct return type.
23390
23391 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
23392
23393         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
23394         mono_spillvar_offset() to arch-specific code.
23395
23396 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
23397
23398         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
23399
23400 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
23401
23402         * exceptions-x86.c: Fix stack space leaks.
23403         
23404         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
23405         registers from the lmf if the method has save_lmf set.
23406
23407 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
23408
23409         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
23410         of icall wrappers into InvokeInDomain, since these are now per-domain.
23411
23412 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
23413
23414         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
23415         make some opcode emulation and intrinsic ops enabled/disabled 
23416         according to the architecture. More fixes.
23417
23418 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
23419
23420         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
23421
23422 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
23423
23424         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
23425         arch-specific handling for 'this' and struct return type to
23426         arch-specific code.
23427
23428 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23429
23430         * aot.c: prevent divide by zero error when reporting (it happened with
23431         Accessibility.dll).
23432
23433 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
23434
23435         * mini.h (inst_switch): Remove unused macro.
23436
23437 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23438
23439         * aot.c:
23440         (load_aot_module): free 'info->methods' and 'info' properly. No more
23441         "free(): invalid pointer blah" messages when you have an old aot
23442         compiled assembly.
23443
23444 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
23445
23446         * jit-icalls.c, mini.c: Added support for context static fields.
23447
23448 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
23449
23450         * mini.c (mono_method_blittable): Methods which set LastError are not 
23451         blittable either. Fixes #51108.
23452         
23453 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
23454
23455         * mini.c: flush icache.
23456         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
23457
23458 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
23459
23460         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
23461
23462 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
23463
23464         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
23465         safe on IA32.
23466
23467         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
23468         vararg calls.
23469
23470         * inssel.brg (CEE_MKREFANY): Fix AOT case.
23471
23472 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
23473
23474         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
23475         instruction when the result is discarded.
23476
23477         * iltests.il (test_0_div_regalloc): New regression test.
23478
23479         * arrays.cs: Fix compilation error.
23480
23481 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
23482
23483         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
23484         float rules to inssel-x86.brg: sane architectures with FP registers
23485         don't need to implement these rules.
23486
23487 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
23488
23489         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
23490
23491 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
23492
23493         * mini.h, inssel-long32.brg: fixed endianess issues in int64
23494         implementation of 32 bit systems.
23495
23496 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
23497
23498         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
23499         (Jeroen Zwartepoorte).
23500
23501 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
23502
23503         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
23504         the caller and the callee matches.
23505         
23506         * mini.c (mono_method_to_ir): Add comment.
23507
23508         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
23509         signbit is missing on some platforms.
23510
23511 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
23512
23513         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
23514
23515         * mini.c (setup_jit_tls_data): Call the new function.
23516         
23517         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
23518
23519         * mini-x86.c: Add experimental support for fast access to the lmf
23520         structure under NPTL/Linux 2.6.x.
23521
23522 2003-11-06  Martin Baulig  <martin@ximian.com>
23523
23524         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
23525         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
23526         the debugger.
23527
23528 2003-11-02  Martin Baulig  <martin@ximian.com>
23529
23530         * mini.c (inflate_generic_field): New static method.
23531         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
23532         generic instance and the field is declared in a generic type, call
23533         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
23534
23535 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
23536
23537         * mini.h mini.c (mono_method_same_domain): New function to return
23538         whenever the caller and the callee are in the same domain.
23539
23540         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
23541
23542 2003-10-30  Martin Baulig  <martin@ximian.com>
23543
23544         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
23545         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
23546         method parameters.
23547         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
23548         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
23549
23550 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
23551
23552         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
23553         propagation.
23554
23555         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
23556         object here, so it is in the correct appdomain etc.
23557
23558 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
23559
23560         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
23561         already done.
23562         (mono_method_to_ir): Avoid freeing the type created returned from
23563         mono_type_create_from_typespec, since it is put into an internal cache
23564         by the function. Fixes pointer.exe.
23565
23566         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
23567         trampolines for icalls and pinvokes as well. Fixes #33569.
23568
23569 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
23570
23571         * mini.c: Update after appdomain changes.
23572
23573         * mini.c (mono_jit_compile_method_inner): Allways compile native
23574         method wrappers in the root domain, since there can only be one
23575         instance of them, whose address is stored in method->info.
23576
23577 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
23578
23579         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
23580         environment variable. Instead detect automatically whenever running
23581         under valgrind using the magic macro RUNNING_ON_VALGRIND from
23582         valgrind.h.
23583
23584 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
23585
23586         * trace.c, trace.h: New files that implement the new trace option
23587         parsing. 
23588
23589         * driver.c: Document new --trace options.
23590
23591         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
23592         mini-x86.c: Apply:
23593
23594         -       if (mono_jit_trace_calls)
23595         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
23596
23597         * mini.h: prototypes.
23598         
23599 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
23600
23601         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
23602
23603         * mini.c inssel.brg: Implement typedefbyref opcodes.
23604
23605         * mini.c (mono_jit_compile_method): Remove unused local variable.
23606
23607         * mini.c (mono_jit_compile_method_inner): Ditto.
23608         
23609 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
23610
23611         * tramp-x86.c (x86_class_init_trampoline): Fix build.
23612         
23613         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
23614
23615 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
23616
23617         * mini.c (mono_no_aot): Remove unused global variable.
23618
23619         * mini.c: Thread safety fixes.
23620
23621 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
23622
23623         * mini.c (mono_create_class_init_trampoline): Add a lock around
23624         class_init_hash_addr.
23625
23626         * arrays.cs (test_0_newarr_emulation): Add new regression test for
23627         #30073.
23628
23629         * mini.c: Decompose the NEWARR instruction before decomposing its
23630         arguments. Fixes #30073.
23631
23632 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
23633
23634         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
23635         convention.
23636
23637 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
23638
23639         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
23640
23641         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
23642
23643         * driver.c: Add support for compiling icall wrappers to --compile.
23644
23645 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
23646
23647         * inssel.brg: The empty value in class->interface_offsets is -1, not
23648         0. Fixes #49287.
23649
23650 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
23651
23652         * objects.cs: New test for 'is' operator on an array of interfaces.
23653
23654 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
23655
23656         * tramp-ppc.c: update trampoline code to support jumps
23657         and class initialization.
23658
23659 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
23660
23661         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
23662
23663         * inssel.brg (OP_UNBOXCAST): Fix #46027.
23664
23665         * inssel.brg (OP_UNBOX): Remove unused rule.
23666
23667         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
23668         region instead of one for each method. Fixes #47813.
23669
23670 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
23671
23672         * exceptions.cs (test_0_nested_finally): New regression test for
23673         nested exception handlers.
23674
23675         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
23676
23677         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
23678
23679         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
23680         inlining.
23681
23682         * mini.c (mono_method_check_inlining): Make the inlining limit 
23683         configurable by an environment variable.
23684         
23685         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
23686
23687         * mini.h: Bump AOT file version.
23688
23689         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
23690         token, store the image along with the token, since the token might not 
23691         refer to the same image as the method containing the relocation, 
23692         because of inlining.
23693
23694 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
23695
23696         * mini.c (mono_precompile_assemblies): New function to compile
23697         all methods in all loaded assemblies.
23698
23699         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
23700
23701         * regalloc.h regalloc.c (MonoRegState): Change the type of 
23702         iassign and fassign to int*, since they can contain large negative
23703         values if the register is spilled. Also added some comments. Fixes
23704         #45817.
23705
23706         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
23707         under Win32. Fixes #42964.
23708
23709 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
23710
23711         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
23712
23713         * aot.c: Added support for AOT compiling methods which contain calls
23714         to wrappers. Currently, only remoting-invoke-with-check wrappers are
23715         handled.
23716         
23717         * driver.c (compile_all_methods): Run the compilation in a thread
23718         managed by mono. Fixes #44023.
23719
23720         * mini.c (mono_codegen): Print full method name in verbose output.
23721
23722         * mini-x86.c (mono_arch_patch_code): Fix warning.
23723         
23724         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
23725         jumps, since the method we are jumping to might be domain-specific.
23726
23727         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
23728
23729 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
23730
23731         * inssel.brg: string chars are unsigned.
23732
23733 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
23734
23735         * TODO: New todo item.
23736
23737         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
23738         which calls mono_runtime_class_init and patches the call site to
23739         avoid further calls.
23740         (mono_arch_create_class_init_trampoline): New arch specific function 
23741         to create a class init trampoline.
23742         (create_trampoline_code): Generalized so it can create
23743         class init trampolines as well.
23744
23745         * mini.c (helper_sig_class_init_trampoline): New helper variable.
23746         (mono_create_class_init_trampoline): New function to create and cache
23747         class init trampolines.
23748         (mono_find_class_init_trampoline_by_addr): New function to lookup the
23749         vtable given the address of a class init trampoline. Used by the
23750         patching process.
23751         (mono_codegen): Generate a call to a trampoline instead of
23752         mono_runtime_class_init in LDSFLD[A].
23753         (mono_codegen): Add relocations for the new trampoline.
23754         
23755         * mini.h mini-x86.c aot.c: Added a new relocation type: 
23756         MONO_PATCH_INFO_CLASS_INIT.
23757
23758         * mini.h: Bump AOT version number.
23759
23760         * aot.c: Create a copy of the loaded code instead of using the original
23761         so methods which call each other will be close in memory, improving
23762         cache behaviour.
23763         
23764         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
23765         patch since it breaks the regression tests.
23766         
23767         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
23768         for the register saving instruction sequence since the 
23769         frame_state_for function in glibc 2.3.2 don't seem to detect it.
23770
23771 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
23772
23773         * TODO: Fix todo item && remove another.
23774
23775 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
23776
23777         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
23778         previous checkin.
23779
23780         * aot.c: Moved the check for MONO_LASTAOT into the initialization
23781         function of the module.
23782
23783         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
23784         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
23785         --no-aot command line option.
23786
23787 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
23788
23789         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
23790         by Bernie Solomon (bernard@ugsolutions.com).
23791
23792         * inssel.brg: Refactor the interface offset table related code into
23793         its separate functions and add support for the AOT case.
23794
23795 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
23796
23797         * aot.c (mono_aot_get_method_inner): Fix memory leak.
23798         
23799         * aot.c: Added mono_aot_verbose variable and made all debugging
23800         output depend on the value of this variable.
23801
23802         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
23803         method_label and info_label.
23804
23805         * mini.h mini-x86.c aot.c: Added a new relocation type 
23806         MONO_PATCH_INFO_IID for klass->interface_id.
23807
23808         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
23809         the MonoJitInfo structure.
23810
23811         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
23812         a non-root appdomain in shared mode.
23813
23814 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
23815
23816         * aot.c: make aot loader less verbose. Remove free of unused variable.
23817
23818 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
23819
23820         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
23821
23822         * .cvsignore: Added *.dll.
23823
23824         * mini.c (mono_print_tree_nl): New function callable while debugging.
23825
23826         * mini.c (mono_print_code): Export this.
23827
23828         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
23829         patched code.
23830
23831 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
23832
23833         * mini.h (MonoCompile): Added 'jit_info' field.
23834
23835         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
23836         the cfg structure, since it is needed by the AOT compiler.
23837
23838         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
23839
23840         * aot.c: A major rewrite. Changes include:
23841         - save exception tables for methods which have them.
23842         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
23843         to g_module_symbol.
23844         - reworked the file format so it is now much smaller and needs
23845         fewer relocation entries.
23846         
23847 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
23848
23849         * aot.c (load_aot_module): Fix build bustage on platforms without
23850         Boehm GC.
23851
23852 2003-09-04  Martin Baulig  <martin@ximian.com>
23853
23854         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
23855
23856 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
23857
23858         * TODO: Some new optimization ideas.
23859
23860         * aot.c: Move AOT module loading logic here from mono_assembly_open.
23861
23862         * aot.c: Save the optimization flags used to compile the code into
23863         the AOT module.
23864
23865         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
23866         support emitting domain specific code.
23867         
23868         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
23869         no longer domain neutral. It can be made domain neutral by compiling 
23870         with --optimize=shared.
23871
23872         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
23873         between appdomains.
23874
23875         * driver.c mini.h mini.c: New --no-aot debugging option which disables
23876         loading of AOT code.
23877
23878         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
23879         
23880         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
23881         if there is no domain neutrality information.
23882
23883 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
23884
23885         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
23886         format version into the generated library.
23887
23888         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
23889         callee method into the caller since one of them could be shared.
23890
23891         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
23892         system exceptions from AOT code now works.
23893
23894         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
23895         method if it is domain neutral and the callee is not.
23896
23897         * graph.c (cfg_emit_one_loop_level): Fix warning.
23898
23899 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
23900
23901         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
23902         last checkin.
23903
23904 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
23905
23906         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
23907         is needed  by code which is executed before mono_runtime_init ().
23908         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
23909         
23910         * mini.c (mono_thread_abort): Fix warning.
23911         (mono_jit_compile_method): Call static constructor in the AOT case too.
23912
23913         * aot.c (mono_compile_assembly): Fix warning.
23914
23915 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23916
23917         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
23918
23919 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
23920
23921         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
23922
23923         * cpu-pentium.md: Fix the length of call opcodes so they include the
23924         ESP restoring instruction. Fixes #47968.
23925
23926 2003-08-28  Martin Baulig  <martin@ximian.com>
23927
23928         * mini-x86.c (mono_arch_call_opcode): Added support for
23929         MONO_TYPE_GENERICINST.
23930
23931         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
23932
23933 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
23934
23935         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
23936         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
23937
23938         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
23939         metadata_section.
23940
23941 2003-08-26  Martin Baulig  <martin@ximian.com>
23942
23943         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
23944         when reporting an error, set this to the actual error location.
23945         (mono_method_to_ir): Report the correct error location if
23946         get_basic_blocks() returned an error.
23947
23948 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
23949
23950         * mini.c (mono_type_blittable): OBJECT is not blittable.
23951         (mono_method_blittable): Methods which have marshalling descriptors
23952         are not blittable either. Fixes #47842.
23953
23954 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
23955
23956         * driver.c mini.c: Use an environment variable instead of a global 
23957         variable. Also fix the build.
23958
23959         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
23960         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
23961         reporting this. 
23962
23963         * driver.c mini.c: Added --with-valgrind option to turn off some
23964         code which prevents mono from running under valgrind.
23965
23966         * mini.c (mono_emit_call_args): Fixed warning.
23967
23968         * mini.c (mono_emulate_opcode): Fixed warning.
23969
23970 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
23971
23972         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
23973         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
23974         regalloc.c, regalloc.h: specify available registers in arch-specific
23975         code and support floats in the regallocator (patch by Laurent Morichetti 
23976         <l_m@pacbell.net>)
23977
23978 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
23979
23980         * mini.c: mono_thread_current() can be called only after
23981         mono_runtime_init(): rearrange code to not call it early on.
23982
23983 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
23984
23985         * mini.c: allocate jump tables in the code mempools.
23986
23987 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
23988
23989         * mini.c, mini.h: make sure per-thread data allocated by the jit is
23990         freed.
23991
23992 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
23993
23994         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
23995         12 to 16.  This fixes bug #47453.
23996
23997
23998 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
23999
24000         * mini-ppc.c: fixed indexed load and unsigned compares.
24001
24002 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
24003
24004         * mini.c: reenabled installation of handler for
24005           thread abort signal.
24006
24007 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24008
24009         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
24010         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
24011         until it's fixed and actually useful.
24012
24013 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
24014
24015         * inssel-long32.brg: couple more opcodes implemented.
24016
24017 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
24018         
24019         * mini-sparc.c: Even more opcodes implemeted.
24020
24021 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
24022
24023         * mini-sparc.c: More opcodes implemented.
24024
24025 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
24026
24027         * mini-sparc.c: More opcodes implemented.
24028
24029 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
24030
24031         * inssel-sparc.brg: Add some needed rules.  Direct
24032         copy from PPC.
24033         * Makefile.am: Use inssel-sparc.brg
24034         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
24035         an assert happy for now.
24036
24037 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
24038
24039         * mini-sparc.c: Fixed compile errors.
24040         * exceptions-sparc.c: Same.  We now produce a mono binary 
24041         on sparc-linux.  Yea.
24042
24043 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
24044
24045         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
24046         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
24047         They compile, but do not work.
24048
24049 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24050
24051         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
24052         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
24053         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
24054         (ct@gentoo.org).
24055
24056 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24057
24058         * mini.c: more opcodes implemented and better support for generics.
24059
24060 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
24061
24062         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
24063         * mini.c, mini.h: first cut at generics support: some new instructions 
24064         added and changed the behaviour of some of the existing ones.
24065
24066 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
24067
24068         * mini.c: Removed definition of metadata_shared mutex here.
24069
24070 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
24071
24072         * mini-x86.c: make vararg calls work for instance methods.
24073
24074 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24075
24076         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
24077         returns the arguments in a separte list, now.
24078
24079 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
24080
24081         * aot.c, mini.c: updates for array type representation changes.
24082
24083 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
24084
24085         * mini.c: register function to perform jit shutdown.
24086
24087 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24088
24089         * mini.c: use a faster allocator if possible.
24090
24091 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
24092
24093         * aot.c: some cleanups and portability changes.
24094
24095 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24096
24097         * mini.c: use faster allocation for CEE_BOX if possible.
24098
24099 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
24100
24101         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
24102         Moved inlined mempcy code to its own function so that is can be
24103         reused. Added an inline memset function as well (optimized initobj).
24104         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
24105
24106 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24107
24108         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
24109
24110 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
24111
24112         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
24113         arch code can setup the cpu for CLR execution, if needed.
24114         We use it on x86 to set the precision of FP operations.
24115
24116 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24117
24118         * mini.c: disable some optimizations if we can guess they'll cost too
24119         much for a given method.
24120
24121 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
24122
24123         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
24124         
24125 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
24126         * mini.h mini.c mini-x86.c: Added instruction level coverage 
24127         info collection support.
24128
24129 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
24130
24131         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
24132         is now implemented in the profiling API. Get rid of a couple of
24133         unnecessary global variables.
24134
24135 2003-06-15  Nick Drochak <ndrochak@gol.com>
24136
24137         * basic-long.cs: tests for negative values for bigmul, and unsigned.
24138         * cpu-g4.md: add op_bigmul and op_bigmul_un
24139         * cpu_pentium.md: add op_bigmul_un
24140         * inssel-long32.brg: add rule for unsigned bigmul
24141         * mini-ops.h: define OP_BIGMUL_UN
24142         * mini-x86.c: THE BUG: handle (un)signed properly
24143         * mini.c: choose unsigned opcode if needed.
24144         This set of patches fixes bug #44291
24145
24146 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
24147
24148         * mini.c (optimize_branches): improved to handle all kinds of
24149         conditional branches.
24150
24151 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
24152
24153         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
24154         don't raise exceptions.
24155
24156 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
24157
24158         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
24159         to arch-specific files.
24160
24161 2003-06-09  Martin Baulig  <martin@ximian.com>
24162
24163         * Makefile.am (libs): Added $(LIBGC_LIBS).
24164
24165 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
24166
24167         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
24168         and OP_ATAN (fixes bug#44293).
24169
24170 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
24171
24172         * Makefile.am, mini-x86.c: rename cpu description array to
24173         pentium_desc, since some compilers define the 'pentium' preprocessor
24174         symbol.
24175
24176 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
24177
24178         * mini.c (mini_select_instructions): add explicit branch if the
24179         following block is not the false target of a conditional branch -
24180         we need this with any optimization that reorder or remove bblocks
24181
24182         * mini.c (optimize_branches): bug fixes
24183
24184 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
24185
24186         * mini.c (mono_method_to_ir): inline static readonly fields
24187
24188         * ssa.c (fold_tree): start cfold support for long (very simple
24189         cases only)
24190
24191         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
24192
24193 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
24194
24195         * inssel.brg: fixed memcpy (bug #44219).
24196
24197 2003-06-05  Dick Porter  <dick@ximian.com>
24198
24199         * driver.c: Set the glib log levels to not abort if g_message
24200         recurses.
24201
24202         g_set_prgname() has to happen before mini_init() so that the
24203         process handle gets the info.
24204         
24205 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
24206
24207         * driver.c: add intrins to the default optimizations to get wider
24208         exposure.
24209
24210 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
24211
24212         * mini.h: some large basic blocks will overflow a 16-bit
24213         integers for symbolic registers.
24214
24215 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
24216
24217         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
24218         (mono_arch_output_basic_block): fix bug 43499 
24219
24220 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
24221
24222         * mini.c: kill duplicated definition of mono_debug_format.
24223
24224 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
24225
24226         * mini-x86.c, arrays.cs: fixed register allocation bug.
24227
24228 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
24229
24230         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
24231
24232         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
24233
24234 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24235
24236         * mini.c:
24237         (print_method_from_ip): also print source location information if
24238         available.
24239
24240 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
24241
24242         * mini.c (mono_find_block_region): bug fix in region code
24243         (mini_method_compile): enable removing unreachable code again, but
24244         only in methods without exception clauses.
24245
24246 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
24247
24248         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
24249         Implemented arglist opcode and handling of TypedReference type.
24250         Fixed x86 call convention when a structure is returned.
24251         Minimal support for calling static vararg methods.
24252
24253 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
24254
24255         * mini.c (mini_method_compile):  always remove unreachable code,
24256         because the code in them may be inconsistent  (access to dead
24257         variables for example).
24258
24259 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
24260
24261         * driver.c, debug-mini.c: warning fixes.
24262
24263 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
24264
24265         * Makefile.am, jit.h, mini.h: install header for embedding mono.
24266
24267 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
24268
24269         * mini.c: thread-static fields are registered in mono_class_vtable(),
24270         so ensure the function is called before checking for them.
24271
24272 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
24273
24274         * mini.c (optimize_branches): fix for bug 43586
24275
24276         * jit-icalls.c (mono_llmult_ovf): added an additional check for
24277         overflow (fixes Bug #43639)
24278
24279 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24280
24281         * mini.c, objects.cs: allow the use of stobj for primitive types.
24282
24283 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24284
24285         * mini.c: be less strict about argument checking until we support
24286         running the verifier.
24287
24288 2003-05-27  Nick Drochak <ndrochak@gol.com>
24289
24290         * basic-long.cs: tests for (ulong)int * (ulong)int also
24291         * mini.c: use the same trick for (ulong)int * (ulong)int
24292
24293 2003-05-27  Nick Drochak <ndrochak@gol.com>
24294
24295         * basic-long.cs: add regression test for (long)int * (long)int
24296         * cpu-pentium.md: add op_bigmul specification
24297         * inssel-long32.brg: add OP_BIGMUL rule
24298         * mini-ops.h: add OP_BIGMUL
24299         * mini-x86.c: register allocator: handle case where src1 needs to be
24300         in EAX.
24301         * mini.c: substitute special BIGMUL opcode in the tree for 
24302         (long)int * (long)int
24303
24304 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
24305
24306         * jit-icalls.c: call the type ctor on field access if needed.
24307
24308 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
24309
24310         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
24311         to a method (including results of ldelema, bug#43207).
24312
24313 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
24314
24315         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
24316         colors to show exception handler blocks.
24317
24318         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
24319         (fix for pinvoke7.cs).
24320
24321 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24322
24323         * mini.h, mini.c: ensure correct initialization order for types that
24324         require it. Prepare for lazy compilation of jit icall wrappers.
24325         Provide a name for opcode emulation to reduce unneeded mallocing.
24326
24327 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
24328
24329         * mini-x86.c: better register restoring code and profiling
24330         support for tail calls.
24331
24332 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24333
24334         * mini.h, driver.c: prepare for leaf methods optimization.
24335
24336 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
24337
24338         * mini.c: get targets of branches before converting a method.
24339
24340 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
24341
24342         * mini.c (optimize_branches): added some experimental code (disbaled) 
24343
24344 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
24345
24346         * mini.c (optimize_branches): fix branch to branch optimization 
24347
24348         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
24349
24350         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
24351
24352         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
24353
24354         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
24355         if needed.
24356
24357 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
24358
24359         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
24360         enable use of interface variables again.
24361
24362         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
24363         I1 to registers because there is no simply way to sign extend 8bit
24364         quantities in caller saved registers on x86.
24365
24366         * inssel-float.brg: set costs of some rules to 2 so
24367         that monobure always select the arch. specific ones if supplied,
24368         regardless of the order we pass the files to monoburg.
24369
24370 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
24371
24372         * mini.c, mini-x86.c: since the magic trampoline for jumps
24373         can't patch the code directly, we do it as soon as the
24374         method gets compiled.
24375
24376 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
24377
24378         * mini-x86.c, mini.h: introduce a new patching method
24379         to support CEE_JMP and tail calls.
24380         * mini.c: obey tail.call. Don't precompile methods target
24381         of CEE_JMP.
24382         * tramp-x86.c: new trampoline code to handle methods
24383         reached through a jump.
24384
24385 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
24386
24387         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
24388         bit values to registers
24389
24390 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
24391
24392         * mini.c (mono_compile_get_interface_var): share interface
24393         variables if possible.
24394
24395 2003-05-16  Martin Baulig  <martin@ximian.com>
24396
24397         * debug-mini.c (mono_init_debugger): New function to initialize
24398         the debugger.  This is not in the debugger since it needs to
24399         access some of mini's internals.
24400
24401 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
24402
24403         * mini.c (mono_method_to_ir): inlining fixes/cleanups
24404
24405 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
24406
24407         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
24408         for value type handling.
24409
24410 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
24411
24412         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
24413         (mono_method_check_inlining): enable inlining of all kinds of wrappers
24414
24415 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
24416
24417         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
24418           the constructor through a proxy.
24419
24420 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
24421
24422         * jit-icalls.c, inssel.brg: fixes to array element address
24423         calculations.
24424
24425 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
24426
24427         * mini-x86.c (is_regsize_var): allocate pointer to registers
24428
24429 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
24430
24431         * driver.c: fixed typo, added intrins to the set of optimizations
24432         tested with regressions.
24433
24434 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
24435
24436         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
24437         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
24438         test case.
24439
24440 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
24441
24442         * inssel.brg: remove some common pop instructions without side effects
24443
24444 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
24445
24446         * inssel-x86.brg: fixed thinko in int to double conversions.
24447
24448 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
24449
24450         * mini.c, jit-icalls.c: added runtime thread-static variable support.
24451
24452 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
24453
24454         * inssel-long32.brg: two more missing instructions.
24455
24456 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
24457
24458         * mini.c (mono_emit_call_args): set the cil_code for all arguments
24459         if not already set.
24460
24461 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
24462
24463         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
24464         correctly.
24465
24466         * basic-float.cs: Added tests for negative zero.
24467
24468 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
24469
24470         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
24471         a couple of missing operations for long casts, with test cases.
24472
24473 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24474
24475         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
24476
24477 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
24478
24479         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
24480         code size estimation.
24481
24482 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
24483
24484         * mini.c (mono_jit_create_remoting_trampoline): make it work with
24485         abstract methods (fix bug 42542)
24486
24487         * aot.c: add ability to handle array types
24488         
24489 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
24490
24491         * mini.c: Call the _specific versions of the object allocation
24492         functions if possible.
24493
24494 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
24495
24496         * driver.c: call setlocale ().
24497
24498 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
24499
24500         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
24501         windows build.
24502
24503 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
24504
24505         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
24506
24507         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
24508         wrappers (fix bug 42122)
24509
24510 2003-05-04  Martin Baulig  <martin@ximian.com>
24511
24512         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
24513
24514         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
24515         s/mini_set_defaults/mono_set_defaults/g.
24516
24517 2003-05-04  Martin Baulig  <martin@ximian.com>
24518
24519         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
24520
24521 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24522
24523         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
24524         (reported by Don Roberts).
24525
24526 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
24527
24528         * mini.c: temporarily work around two bugs for this release.
24529
24530 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
24531
24532         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
24533         that contains -export-dynamic and it makes using the ld script
24534         useless.
24535         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
24536
24537 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
24538
24539         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
24540         specific cpu.
24541
24542 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
24543
24544         * mini.c: make sure leave calls all the needed finally blocks,
24545         even when the target jumps out of multiple exception clauses.
24546
24547 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
24548
24549         * ldscript, Makefile.am: add linker script to reduce the number of
24550         exported symbols (should also fix the issues with libwine defining
24551         some of the same symbols in io-layer).
24552
24553 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
24554
24555         * driver.c (mini_main): Avoid assertion when no file name is given on 
24556         the command line.
24557
24558 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
24559
24560         * driver.c: added --version/-V command line option.
24561         Added the inline optimization in the regression tests.
24562
24563 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
24564
24565         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
24566         to the type in the method signature (fixes bug#42134).
24567
24568 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
24569
24570         * mini.c: when inlining, check this is not null only when needed (bug #42135).
24571
24572 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
24573
24574         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
24575
24576 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24577
24578         * driver.c: fixed bug #42100.
24579
24580 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
24581
24582         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
24583
24584 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
24585
24586         * mini.c: moved most of the code required to do inlining to its own
24587         function so it can be reused. Inline also ctors if appropriate.
24588
24589 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
24590
24591         * Makefile.am: Link with -export-dynamic so shared libs loaded by
24592         the runtime can call mono API functions.
24593
24594 2003-04-27  Martin Baulig  <martin@ximian.com>
24595
24596         * debug-mini.c (mono_debug_init_method): Added
24597         `guint32 breakpoint_id' argument; if the method has a breakpoint,
24598         send a notification to the debugger.
24599
24600         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
24601         running in the Mono Debugger, just pass the breakpoint number to
24602         mono_debug_init_method().
24603
24604         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
24605
24606 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
24607
24608         * mini.c: allow some more unsafe compares.
24609
24610 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24611
24612         * mini-x86.c, Makefile.am: make distcheck works (partially from
24613         a patch by Richard Lee <r.h.lee@attbi.com>).
24614         * regset.c, regset.h: removed, they are unused.
24615
24616 2003-04-25  Dick Porter  <dick@ximian.com>
24617
24618         * driver.c: Usage reports the name as 'mono' not 'mini'
24619         * exceptions-x86.c: Build and run on freebsd
24620
24621 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
24622
24623         * Makefile.am: install the program with the 'mono' name and
24624         the library as libmono instead of mini and libmini.
24625
24626 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
24627
24628         * driver.c: provide the APIs for the embedding interface of the old jit.
24629
24630 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
24631
24632         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
24633
24634 2003-04-23  Martin Baulig  <martin@ximian.com>
24635
24636         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
24637
24638         * driver.c: Added `--debug' command line argument to enable
24639         debugging support.
24640
24641 2003-04-23  Martin Baulig  <martin@ximian.com>
24642
24643         * debug.[ch]: Removed.  The code is now in
24644         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
24645
24646         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
24647         last six months.
24648
24649 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
24650
24651         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
24652
24653 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24654
24655         * mini.c:
24656         (mini_cleanup): moved mono_runtime_cleanup call after the call to
24657         mono_domain_finalize.
24658         (mini_method_compile): use mono_method_profile* if the the option is
24659         enabled.
24660
24661 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
24662
24663         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
24664         methods with their wrapper.
24665
24666         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
24667         methods with their wrapper.
24668
24669         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
24670         their wrapper.
24671
24672         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
24673         wrapper.
24674
24675         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
24676         methods.
24677
24678 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
24679
24680         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
24681
24682 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
24683
24684         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
24685         of the mempool. This is slightly faster and uses less memory
24686
24687 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24688
24689         * mini.c: avoid O(n) allocation for variables.
24690
24691 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24692
24693         * mini.c: handle items on the stack after inlining methods.
24694
24695 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
24696
24697         * mini.c: make the method->opcode optimization dependent
24698         on MONO_OPT_INSTRINS and do it lazily.
24699
24700 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
24701
24702         * driver.c: print overall results at the end of regression run.
24703
24704 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
24705
24706         * inssel.brg: don't overwrite symbolic registers.
24707
24708 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
24709
24710         * inssel-x86.brg: fix conversion from long to float.
24711
24712 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
24713
24714         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
24715
24716 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
24717
24718         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
24719
24720         * driver.c: Added --print-vtable option as in the old JIT.
24721
24722 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
24723
24724         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
24725
24726 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
24727
24728         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
24729
24730 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
24731
24732         * mini.c regalloc.c regalloc.h: Fix memory leak.
24733
24734 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
24735
24736         * aot.c (mono_aot_get_method): register all used strings
24737
24738 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
24739
24740         * mini.c: always intern strings references with ldstr at compile time.
24741
24742 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
24743
24744         * Makefile.am: add BUILT_SOURCES.
24745
24746 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
24747
24748         * driver.c: give a better error message when the assembly to execute
24749         doesn't have an entry point.
24750
24751 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
24752
24753         * Makefile.am: added hack for automake
24754
24755         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
24756         correct sematics.
24757
24758         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
24759
24760 22003-04-07  Martin Baulig  <martin@ximian.com>
24761
24762         * Makefile.am: Added Makefile.am.
24763
24764         * debugger-main.c: Removed, this is now in the debugger where it
24765         belongs.
24766
24767         * mini.pc.in: Call this package `mini' for the moment.
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782