82e4c3c825e13cae92162a1c016c8fd4731ff76e
[mono.git] / mono / mini / ChangeLog
1 2009-12-09  Zoltan Varga  <vargaz@gmail.com>
2
3         * debugger-agent.c (start_runtime_invoke): Fix a crash if this is called
4         on the debugger thread.
5
6 2009-12-08  Zoltan Varga  <vargaz@gmail.com>
7
8         * mini-llvm.c (mono_llvm_emit_method): Add more SIMD opcodes.
9
10         * mini.c (mono_print_method_from_ip): Fix the lookup of trampolines.
11
12         * mini-codegen.c (mono_local_regalloc): Allow non-call opcodes with cloc:c.
13
14         * cpu-<ARCH>.md: Make call_handler clob:c.
15
16         * mini.c: Reenable SSA for methods with clauses.
17
18         * mini.c (mini_method_compile): Disable SSA for now for methods with clauses,
19         as it causes failures on x86.
20
21 2009-12-08  Sebastien Pouliot  <sebastien@ximian.com>
22
23         * driver.c: Fail gracefully with --compile-all if mono_method_signature
24         returns NULL (e.g. a bad assembly).
25
26 2009-12-08  Geoff Norton  <gnorton@novell.com>
27
28         * debugger-agent.c:  Refactor the mono_runtime_invoke guarding against
29         stepping out into native code.  There were issues with nested invokes
30         like .cctors.
31
32 2009-12-07  Zoltan Varga  <vargaz@gmail.com>
33
34         * mini.c (mini_method_compile): Do the disable_llvm checks early
35         and avoid the LLVM compile pass if the checks fail.
36
37         * mini.c ssa.c abcremoval.c: Enable SSA for methods with exception clauses.
38
39         * mini-llvm.c: Put our methods/globals into the 'llvm.used' array, so the
40         LLVM optimizations don't try to remove them.
41
42         * aot-compiler.c (emit_llvm_file): Save the result of opt into a
43         different file so the original remains.
44
45 2009-12-06  Zoltan Varga  <vargaz@gmail.com>
46
47         * mini-llvm.c mini.c: Fix alignment issues with SIMD vars.
48
49         * aot-runtime.c (decode_arm_exidx): Handle most descriptors created by gas.
50
51         * aot-runtime.c (decode_arm_exidx): Refactor this into two functions, add
52         support for non-inline unwind descriptors.
53
54 2009-12-07  Geoff Norton  <gnorton@novell.com>
55
56         * debugger-agent.c:  Darwin can colesce signals, so we need to handle
57         the interrupt_count slightly differently.  Native threads were never
58         marked as resumed.
59
60 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
61
62         * aot-runtime.c (decode_arm_exidx): New function to initialize a MonoJitInfo
63         based on the contents of the ARM .exidx section. Not yet used since llvm doesn't
64         yet generate this info.
65
66         * mini-llvm.c: Fix the conversion of call results if they are unsigned.
67
68         * debugger-agent.c (buffer_add_value): Treat I/U as a valuetype, so the
69         client can distinguish between intptrs and longs.
70
71 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
72
73         * aot-compiler.c (emit_trampoline): Emit the trampoline info into the global
74         blob.
75
76         * aot-runtime.c (load_function): Update after the change above.
77
78         * mini.h: Bump AOT file format version.
79
80         * method-to-ir.c (mono_method_to_ir): Disallow the delegate optimization
81         if the delegate class is dynamic.
82
83         * method-to-ir.c (handle_delegate_ctor): Allow the method_code optimization
84         in gshared code too using the new rgctx info type
85         MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
86
87 2009-12-04  Geoff Norton  <gnorton@novell.com>
88
89         * debugger-agent.c: When doing a func-eval invoke on a suspended runtime,
90         we need to track the original suspend count so the thread properly
91         wakes up in resume_thread.
92
93 2009-12-04  Zoltan Varga  <vargaz@gmail.com>
94
95         * method-to-ir.c (handle_delegate_ctor): Add support for using this from gshared
96         code.
97
98         * generics.cs: Add a test.
99
100         * method-to-ir.c (emit_get_rgctx_method): Make this work even if context_used
101         is 0. Simplify a lot of code using this.
102
103         * mini-trampolines.c (mono_delegate_trampoline): Call
104         mono_create_static_rgctx_trampoline () before saving the final address in
105         delegate->method_code, to avoid calling it each time a delegate is first called.
106
107         * method-to-ir.c (mono_method_to_ir): Allow fast delegate creation for methods
108         which need static rgctx trampolines.
109
110         * mini-trampolines.c (mono_create_static_rgctx_trampoline): Use a cache
111         keyed on the method+addr pair, since addr could be either the method addr or
112         an unbox trampoline in the AOT case. Fixes #560246.
113
114 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
115
116         * mini.c (mini_method_compile): Call handle_exception_clauses () in the same
117         place it was called before too.
118
119 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
120
121         * mini.c (mono_jit_runtime_invoke): Avoid the call to mono_class_setup_vtable ()
122         if no security manager is present, to speed up the AOT case. Call
123         mono_class_vtable () full with raise_on_error == TRUE instead.
124
125 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
126
127         * mini.c (mini_method_compile): Call handle_exception_clauses earlier so
128         the local optimization passes can take its result into account. Fixes
129         #559876.
130
131         * exceptions.cs: Add a test.
132
133 2009-01-24  Steven Munroe  <munroesj@us.ibm.com>
134
135         This patch is contributed under the terms of the MIT/X11 license
136
137         * cpu-ppc64.md (load_memindex): Add loadi8_memindex.
138
139 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
140
141         * mini.h (MonoInst): Remove unused 'ssa_op' field.
142
143         * debugger-agent.c: Rework the handling of stack traces of running threads to
144         avoid crashes if compute_frames () tries to walk the stack of running thread.
145
146         * mini.c (mono_print_method_from_ip): Use mini_jit_info_table_find.
147
148         * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): Set frame->lmf.
149
150         * mini.h (StackFrameInfo): Add an 'lmf' field.
151
152 2009-12-02  Zoltan Varga  <vargaz@gmail.com>
153
154         * debugger-agent.c (suspend_current): Always set really_suspended.
155
156         * debugger-agent.c (clear_event_request): Clear method entry/exit requests too.
157
158         * exceptions-x86.c (mono_arch_get_restore_context): Restore EAX too.
159
160 2009-12-01  Zoltan Varga  <vargaz@gmail.com>
161
162         * debugger-agent.c (vm_commands): Don't allow invokes on threads which are not
163         really suspended.
164
165 2009-12-01  Zoltan Varga  <vargaz@gmail.com>
166
167         * cpu-ppc64.md (store_memindex): Add storei8_memindex.
168
169 2009-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
170
171         * mini-trampolines.c: Fix MSVC build.
172
173 2009-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
174
175         * mini-trampolines.c: Check for mono_method_get_vtable_slot failures.
176
177 2009-11-30  Zoltan Varga  <vargaz@gmail.com>
178
179         * mini-arm.c (mono_arch_lowering_pass): Fix an assert which is hit when
180         the instruction following an OP_FCOMPARE is optimized away.
181
182 2009-11-30  Zoltan Varga  <vargaz@gmail.com>
183
184         * aot-compiler.c (arch_emit_autoreg): Extract the auto-registration code from
185         emit_autoreg () into this arch-specific function.
186
187         * aot-compiler.c (emit_exception_debug_info): Don't emit the length of the
188         code, it is no longer needed.
189
190         * aot-runtime.c (decode_exception_debug_info): Don't read the code length.
191
192         * mini.h: Bump AOT file format version.
193
194         * aot-runtime.c (mono_aot_find_jit_info): Compute the length of the method
195         using the sorted_code_offsets array, instead of reading it from the
196         exception debug info.
197         (load_method): Call mono_aot_find_jit_info instead of
198         decode_exception_debug_info ().
199
200         * aot-compiler.c (emit_exception_debug_info): Emit whenever the method was
201         LLVM compiled as a flag.
202
203 2009-11-29  Zoltan Varga  <vargaz@gmail.com>
204
205         * debugger-agent.c (resume_thread): Fix a warning.
206
207         * aot-compiler.c: Add an option to set the number of static rgctx trampolines
208         generated.
209
210 2009-11-28  Zoltan Varga  <vargaz@gmail.com>
211
212         * aot-compiler.c aot-runtime.c: Get rid of a few global symbols, move their
213         contents to MonoAotFileInfo.
214
215 2009-11-27  Zoltan Varga  <vargaz@gmail.com>
216
217         * aot-compiler.c aot-runtime.c: Reorganize the AOT file format once again.
218         Put all binary data into a giant blob, similarly to the way .net assemblies
219         store binary data. Emit offset tables in a compact form to reduce their size.
220
221         * mini.h: Bump AOT file format version.
222
223         * aot-compiler.c (emit_globals_table): Use temp_prefix instead of .L in a few
224         places.
225
226         * aot-compiler.c (emit_globals_table): Emit a hash table for the globals, to
227         avoid linear searches at runtime.
228
229         * aot-runtime.c (find_symbol): Update this to use the hash.
230
231         * mini.h: Bump AOT file format version.
232
233 2009-11-26  Zoltan Varga  <vargaz@gmail.com>
234
235         * aot-compiler.c (emit_klass_info): Save whenever the class has a generic
236         container.
237
238         * aot-runtime.c (decode_cached_class_info): Set the is_generic_container field
239         too.
240
241         * aot-compiler.c (mono_compile_assembly): Add a 'stats' option to print out
242         the distribution of got slot types.
243
244         * mini.h (MonoDebugOptions): Add 'explicit_null_checks' option.
245
246         * method-to-ir.c: Add support for generating explicit null checks.
247
248 2009-11-25  Zoltan Varga  <vargaz@gmail.com>
249
250         * debugger-agent.c (vm_commands): Implement EXIT by invoking Environment.Exit ()
251         on a random thread if possible.
252
253         * aot-runtime.c (mono_aot_plt_resolve): Clean up the handling of function
254         descriptors a bit, add comments, handle RGCTX_FETCH/GENERIC_CLASS_INIT_TRAMPOLINE
255         correctly.
256
257         * exceptions-ppc.c (mono_arch_find_jit_info_ext): Use mgreg_t as the type of
258         regs. Pass the real size of the regs array to mono_unwind_frame ().
259
260         * unwind.c (mono_unwind_frame): Remove an incorrect assert, add more correct
261         ones instead.
262
263 2009-11-24  Geoff Norton  <gnorton@novell.com>
264
265         * mini-darwin.c: Work around apple bug rdar://7209349  See
266         http://openradar.appspot.com/7209349 for details.  Synopsis,
267         CoreFoundation SIGTRAP's if you dlopen it off the main thread if its
268         never been initialized before.
269
270 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
271
272         * tramp-arm.c: Use blx instead of mov pc, reg to improve support for thumb.
273
274         * mini-arm.c (mono_arm_thumb_supported): New helper function.
275
276 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
277
278         * cfold.c (mono_constant_fold_ins): Fix a problem in the previous change,
279         OP_SHL_IMM is not 32 bit.
280
281 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
282
283         * aot-compiler.c (encode_patch): Fix the encoding of R8 on big-endian systems.
284
285 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
286
287         * aot-compiler.c: Avoid infinite recursion when generic virtual recursion is
288         encountered.
289
290         * debugger-agent.c (resume_vm): Signal the suspend_cond even if suspend_count
291         > 0 since some threads can resume if their resume_count is > 0.
292         (invoke_method): Avoid reading freed memory.
293
294         * debugger-agent.c (process_suspend): Extract the suspend code from
295         process_single_step_inner () to a separate function. Rework the code to prevent
296         races between this function and thread interrupts.
297
298         * debugger-agent.c (suspend_current): Check the resume_count field instead
299         of resume_one so suspends+resumes during single threaded invokes work
300         correctly.
301
302 2009-11-23  Zoltan Varga  <vargaz@gmail.com>
303
304         * aot-compiler.c (emit_llvm_file): Enable some llvm optimizations which seem
305         to make the generated code smaller.
306
307         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Add a code
308         sequence generated by recent LLVM versions.
309
310         * mini-llvm.c: Add support for a few simple cases which weren't supported
311         before.
312
313         * mini-trampolines.c (mono_magic_trampoline): Don't call
314         mono_arch_get_vcall_slot () when llvm is enabled.
315
316         * aot-compiler.c (emit_llvm_file): Add code to run the 'opt' llvm tool.
317
318         * mini-trampolines.c (mono_magic_trampoline): Extract the bulk of this function
319         into a new function called common_call_trampoline () which is used by the
320         llvm vcall trampoline as well.
321
322         * debugger-agent.c: Implement single threaded invokes.
323
324         * debugger-agent.c: Revert change which broke the agent on linux.
325
326         * method-to-ir.c (inline_method): Prevent infinite recursion. Fixes
327         #557606.
328
329         * generics.cs: Add a test.
330
331 2009-11-22  Zoltan Varga  <vargaz@gmail.com>
332
333         * debugger-agent.c: Fix the cygwin build.
334
335 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
336
337         * cprop.c: Remove this unused file.
338
339 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
340
341         * cfold.c (mono_constant_fold_ins): Fix constant folding of shr_imm. Fixes
342         #557262.
343
344         * basic.cs: Add a test.
345
346 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
347
348         * method-to-ir.c (mono_method_to_ir): Use mono_use_llvm instead of ENABLE_LLVM
349         in one more place.
350
351 2009-11-20  Zoltan Varga  <vargaz@gmail.com>
352
353         * mini.c mini-trampolines.c driver.c: Add a 'mono_use_llvm' flag to control
354         whenever the runtime uses LLVM code. Add a '--llvm' command line option to set
355         it. Use this flag to control llvm related code paths instead of #ifdef
356         ENABLE_LLVM, so a runtime configured without --enable-llvm can use LLVM compiled
357         AOT code.
358
359         * aot-runtime.c aot-compiler.c: Add a 'flag' field to MonoAotFileInfo.
360
361         * mini.h: Bump AOT file format version.
362
363         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline_full): These
364         receive their argument in MONO_ARCH_VTABLE_REG, not in the first argument reg.
365
366         * debugger-agent.c (create_event_list): Fix a crash if an empty assembly list
367         was used as an assembly filter.
368
369 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
370
371         * unwind.c: Fix support for ppc.
372
373         * exceptions-ppc.c (mono_arch_find_jit_info): Change this to use dwarf frame
374         unwind info. Change to the mono_arch_find_jit_info_ext () interface.
375
376 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
377
378         * mini-ppc.c (mono_arch_emit_prolog): Fix a copy-paste error to fix the ppc64
379         port.
380         (mono_arch_cpu_init): Don't set cpu_hw_flags to 0 at the end, this was somehow
381         added by the ps3 changes.
382
383 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
384
385         * mini-gc.c: Resurrect this, so at least it compiles.
386
387         * debugger-agent.c (assembly_commands): Implement GET_NAME command.
388
389 2009-11-18  Zoltan Varga  <vargaz@gmail.com>
390
391         * debugger-agent.c (mono_debugger_agent_handle_exception): Pass a MonoJitInfo to
392         create_event_list () so assembly filters can be used.
393
394         * exceptions-ppc.c (mono_arch_find_jit_info): Fix the restoration of registers
395         from the LMF.
396
397 2009-11-17  Zoltan Varga  <vargaz@gmail.com>
398
399         * debugger-agent.c (mono_debugger_agent_breakpoint_hit): Fix a warning.
400         (mono_debugger_agent_thread_interrupt): Make this return FALSE if the agent
401         is disabled.
402
403         * aot-compiler.c (add_generic_instances): Emit instances of common generic
404         classes for char/bool too.
405
406         * debugger-agent.c (DebuggerTlsData): Honor the DISABLE_SOFT_DEBUG option.
407
408         * debugger-agent.c (DebuggerTlsData): Add a 'really_suspended' flag, not yet
409         used.
410
411         * debugger-agent.c: Add some definitions to make backporting to 2.6 easier.
412         Fix warnings.
413
414 2009-11-15  Andreas Faerber  <andreas.faerber@web.de>
415
416         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Signature fix.
417         
418         Code contributed under MIT/X11 license.
419
420 2009-11-14  Zoltan Varga  <vargaz@gmail.com>
421
422         (mono_debugger_agent_thread_interrupt): Save the context so stacktraces for
423         threads in native code work.
424
425         * debugger-agent.c: Pass the 'flags' argument to VM_INVOKE_METHOD earlier in
426         the parameter list, so it can be acted upon by vm_commands (). Bump protocol
427         version.
428
429 2009-11-13 Jonathan Chambers <joncham@gmail.com>
430
431         * debugger-agent.c: Implementation for Windows platform.
432
433         * mini-x86.c: Add support for Windows. Use mono-* synchronization
434         primitives. Use SEH to implement breakpoints and single stepping.
435
436         * mini-x86.h: Enable soft debugger on Windows.
437
438         Code contributed under MIT/X11 license.
439
440 2009-11-13  Zoltan Varga  <vargaz@gmail.com>
441
442         * mini-amd64.c (emit_call_body): Disable usage of near calls when running
443         under XEN. Fixes #522894.
444
445         * patch-info.h: Add LLVM_IMT_TRAMPOLINE.
446
447         * mini-llvm.c aot-compiler.c aot-runtime.c mini.c: Add support for making
448         interface calls in LLVM AOT code.
449
450         * aot-compiler.c mini-llvm.c: Abort llvm compilation if a non-encodable patch
451         is found.
452
453         * mini-llvm.c: Add support for OP_VPHI.
454
455         * objects.cs: Add a test.
456
457 2009-11-13  Zoltan Varga  <vargaz@gmail.com>
458
459         * debugger-agent.c (mono_debugger_agent_single_step_event): Avoid a crash if
460         this is called on the debugger thread.
461
462 2009-11-12  Zoltan Varga  <vargaz@gmail.com>
463
464         * mini-llvm.c: Add soft-float support.
465
466         * method-to-ir.c (mono_decompose_soft_float): Restart after decomposing an
467         FCALL which returns an R4.
468
469         * driver.c (mono_main): Add a missing '\n'.
470
471         * mini-trampolines.c (mono_create_llvm_imt_trampoline): Fix the build on
472         platforms which doesn't support the LLVM IMT trampoline.
473
474 2009-11-11  Zoltan Varga  <vargaz@gmail.com>
475
476         * mini-llvm.c (mono_llvm_emit_method): Fix LOCALLOC.
477
478         * mini-llvm-cpp.cpp: Update to latest LLVM SVN.
479
480         * mini-llvm.c (mono_llvm_emit_method): Avoid creating plt entries for
481         virtual calls.
482
483         * aot-runtime.c: Don't define HAVE_DL_ITERATE_PHDR, configure now does that.
484
485 2009-11-10  Zoltan Varga  <vargaz@gmail.com>
486
487         * aot-compiler.c aot-runtime.c: Change how mono_arch_find_jit_info () works.
488         Instead of emitting a method_order table, sort the contents of the code_offsets
489         table and do a binary search in the sorted table. The previous approach doesn't
490         work with LLVM which emits methods in a arbitrary order.
491
492         * aot-runtime.c: Add support for creating MonoJitInfo structures by searching
493         in the .eh_frame section in ELF files.
494
495         * mini.h: Bump corlib file format version.
496
497         * mini-llvm.c aot-compiler.c: Add support for AOT to the LLVM back end.
498
499         * exceptions-arm.c (mono_arch_get_call_filter_full): Update after the
500         LDMIA->LDM macro name change.
501
502 2009-11-09  Zoltan Varga  <vargaz@gmail.com>
503
504         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Fix and enable this for
505         x86.
506
507         * mini-llvm-cpp.cpp (JITMemoryManager): Fix compilation with LLVM 2.7
508         SVN.
509
510         * aot-compiler.c: Ditto.
511
512         * mini-arm.c (mono_arch_allocate_vars): Fix the previous change by passing
513         &align to mini_type_stack_size_full ().
514
515         * mini-arm.c (mono_arch_emit_prolog): Implement support for varargs.
516
517         * mini-ops.h: Add documentation for the OP_ARGLIST opcode.
518
519 2009-11-08  Zoltan Varga  <vargaz@gmail.com>
520
521         * mini-arm.c: Compute the stack space used by arguments using
522         mini_type_stack_size_full ().
523
524 2009-11-08  Zoltan Varga  <vargaz@gmail.com>
525
526         * optflags-def.h: Remove dead TREEPROP optimization.
527
528 2009-11-08  Rodrigo Kumpera  <rkumpera@novell.com>
529
530         * mini-ppc.h: Make mono compiler under FreeBSD/ppc64. 
531
532         Patch by Justin Hibbits <chmeeedalf@gmail.com>.
533
534 2009-11-07  Zoltan Varga  <vargaz@gmail.com>
535
536         * driver.c (mono_jit_parse_options): New public API function to parse options
537         as done by the runtime executable.
538
539         * debugger-agent.c (buffer_add_cattrs): Fix reading an uninitialized variable
540         when handling named arguments.
541
542 2009-11-07  Zoltan Varga  <vargaz@gmail.com>
543
544         * mini-arm.c: Implement support for returning vtypes in registers, fix support
545         for passing small vtypes in registers, make the CallInfo structures more
546         similar to the code on the other platforms.
547
548         * mini-arm.c (mono_arch_allocate_vars): Align small vtypes to 4 bytes too since
549         the code in the prolog requires it.
550
551 2009-11-06  Zoltan Varga  <vargaz@gmail.com>
552
553         * mini-arm.c debugger-agent.c: Android changes from Koushik K. Dutta
554         (koush@koushikdutta.com).
555
556         * mini-arm.c (handle_thunk): Add a domain argument to control the domain
557         where the thunk memory should be allocated from. Fixes appdomain unloading
558         on arm.
559
560 2009-11-06  Zoltan Varga  <vargaz@gmail.com>
561
562         * mini-arm.c exceptions-arm.c: Make ctx->regs map directly to the 16 hardware
563         registers, instead of r4..r11,ip,lr. Make restore_context () restore r0..r3 too.
564
565 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
566
567         * mini-amd64.c (mono_arch_output_basic_block): Don't allow OP_SEQ_POINT in
568         AOT, as it is not implemented yet.
569
570         * mini-x86.c (mono_arch_output_basic_block): Ditto.
571
572 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
573
574         * debugger-agent.c: Fix windows build.
575
576 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
577
578         * debugger-agent.c (debugger_thread): Call mono_set_is_debugger_attached ()
579         after the client connects/disconnects.
580
581         * debugger-agent.c: Add an 'onthrow' option to start the debugger agent
582         when an exception of a given type is thrown.
583
584         * debugger-agent.c: Add a 'onuncaught' option to start the debugger agent
585         only on an uncaught exception.
586
587         * mini-exceptions.c: Notify the debugger agent on an uncaught exception.
588
589         * debugger-agent.c: Add a 'launch' option.
590
591 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
592
593         * debugger-agent.c: Add a 'timeout' option.
594
595 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
596
597         * debugger-agent.c: Implement the 'server' and 'suspend' options supported by
598         the JDWP agent.
599
600 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
601
602         * debugger-agent.c (set_breakpoint): Emit a log message.
603
604 2009-11-04  Zoltan Varga  <vargaz@gmail.com>
605
606         * mini-arm.c: Fix the arm build.
607
608 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
609
610         * aot-compiler.c: don't leak the value returned from
611         mono_type_full_name().
612
613 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
614
615         * debugger-agent.c: defer including mono-mutex.h until we know the
616         agent is supported.
617
618 2009-11-04 Jonathan Chambers <joncham@gmail.com>
619
620         * debugger-agent.c: Changes to build on windows. Use mono-mutex instead
621         of pthreads directly.
622
623         * mini.c (mono_sigfpe_signal_handler): Changed signature of Windows
624         exception handlers. Pass info argument.
625
626         * mini.h: Adjust signatures of soft debugger functions to pass void*
627         instead of siginfo_t. Adjust SIG_HANDLER_SIGNATURE on Windows.
628
629         * mini-amd64.c (mono_arch_is_single_step_event): Adjust signature to pass void*
630         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
631         (mono_arch_is_breakpoint_event): Adjust signature to pass void*
632         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
633
634         * mini-amd64.h: Adjust MonoW32ExceptionHandler signature.
635
636         * mini-x86.c (mono_arch_is_single_step_event): Adjust signature to pass void*
637         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
638         (mono_arch_is_breakpoint_event): Adjust signature to pass void*
639         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
640
641         * mini-x86.h: Adjust MonoW32ExceptionHandler signature.
642
643         * exceptions-x86.c: Adjust W32_SEH_HANDLE_EX for new signature.
644
645         * exceptions-amd64.c: Adjust W32_SEH_HANDLE_EX for new signature.
646
647         * mono-semaphore.h: Skeleton implementation for Windows.
648
649         Code contributed under MIT/X11 license.
650
651 2009-11-04 Jonathan Chambers <joncham@gmail.com>
652
653         * simd-intrinsics.c (simd_intrinsic_emit_setter): Unfix my fix.
654
655         Code contributed under MIT/X11 license.
656
657 2009-11-04 Jonathan Chambers <joncham@gmail.com>
658
659         * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix windows build.
660
661         Code contributed under MIT/X11 license.
662
663 2009-11-04  Zoltan Varga  <vargaz@gmail.com>
664
665         * aot-compiler.c (mono_save_xdebug_info): Bump the threshold for flushing
666         debug info to 100 because 10 still slows down gdb too much.
667
668         * method-to-ir.c (mono_method_to_ir): Avoid rethrowing thread abort exceptions
669         inside runtime invoke wrappers. This avoids the need to call ResetAbort () on
670         them in the wrappers.
671
672 2009-11-03  Zoltan Varga  <vargaz@gmail.com>
673
674         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
675
676         * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix a warning.
677
678         * aot-runtime.c (mono_aot_get_method): Refactor some code into a new helper
679         function mono_aot_get_array_helper_from_wrapper ().
680
681         * aot-compiler.c (add_generic_class): Refactor the code a bit, really emit
682         array helper methods.
683
684 2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
685
686         * simd-intrinsics.c (load_simd_vreg): Add extra argument to signal if
687         the value was loaded from memory.
688
689         * simd-intrinsics.c (simd_intrinsic_emit_setter): Store back to memory if
690         the value was loader from there.
691
692         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Fail correctly for Shuffle
693         without constant swizzle.
694
695 2009-11-02 Jonathan Chambers <joncham@gmail.com>
696
697         * mini-amd64.c: Put soft debugger functions behind a
698         #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
699
700         * mini-amd64.h: disable the soft debugger in windows.
701
702         Code contributed under MIT/X11 license.
703
704 2009-11-02 Jonathan Chambers <joncham@gmail.com>
705
706         * mini-x86.c: Put soft debugger functions behind a
707         #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
708
709         Code contributed under MIT/X11 license.
710
711 2009-11-02 Jonathan Chambers <joncham@gmail.com>
712
713         * exceptions-x86.c (win32_handle_stack_overflow): Fix parameters
714         to mono_arch_find_jit_info_ext.
715
716         Code contributed under MIT/X11 license.
717
718 2009-11-03  Zoltan Varga  <vargaz@gmail.com>
719
720         * debugger-agent.c: Include netinet/in.h to fix the bsd build.
721
722         * debugger-agent.c: Add support for filtering events by assemblies.
723
724         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Return false if
725         the agent is not enabled.
726
727 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
728
729         * exceptions-x86.c: hopefully last change to fix the windows build.
730         This one courtesy of Jonathan Chambers.
731
732 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
733
734         * debugger-agent.c: remove unused function.
735
736 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
737
738         * debugger-agent.c: add #ifdefs for a few header files.
739         * mini-x86.h: disable the soft debugger in windows.
740         Step 1 of 2 to make this compile on windows with gcc.
741
742 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
743
744         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Comment this out for now
745         as it breaks the build.
746
747 2009-07-01  Zoltan Varga  <vargaz@gmail.com>
748
749         Merge the soft debugger branch.
750
751         * debugger-agent.h debugger-agent.c: New files containing the soft
752         mode debugger module.
753
754         * method-to-ir.c (mono_method_to_ir): Generate OP_SEQ_POINT opcodes
755         at the appropriate locations.
756
757         * mini-<ARCH>.c (mono_arch_output_basic_block): Handle OP_SEQ_POINT
758         opcode.
759
760         * mini-<ARCH>.c: Add new arch-specific functions to set/clear breakpoints,
761         enable/disable single stepping.
762
763         * exceptions-<ARCH>.c (mono_arch_find_jit_info_ext): New stack unwinding api
764         which returns all information in a StackFrameInfo structure, and can handle the
765         LMF frames added by the debugger.
766
767         * mini-<ARCH>.h (MonoLMFExt): New structure containing additional information
768         about an LMF frame.
769
770         * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): New stack
771         walker function which works on a specific thread and passes a StackFrameInfo
772         structure to its callback.
773
774         * mini.c (mini_init): Initialize the debugger agent.
775
776         * aot-compiler.c aot-runtime.c: Add soft-debug support.
777
778         * mini-ops.h: Add OP_SEQ_POINT opcode.
779
780         * driver.c (mono_main): Add new '--debugger-agent' option for passing
781         arguments to the debugger agent.
782
783 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
784
785         * mini.c (mini_method_compile): Disable llvm for methods with an lmf here to
786         speed things up.
787
788         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOCALLOC.
789
790         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Implement this for x86.
791
792         * mini.c (mini_init): Avoid using the IMT trampoline in the LLVM case.
793
794         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add a static rgctx trampoline
795         if needed.
796         (mono_create_llvm_imt_trampoline): New function to create a trampoline which
797         sets the IMT argument and makes a virtual call.
798
799         * mini-llvm.c: Enable interface calls using the llvm imt trampoline.
800
801 2009-11-01  Zoltan Varga  <vargaz@gmail.com>
802
803         * Makefile.am (llvm_sources): Enable the llvm option since it no longer breaks
804         the windows build.
805
806 2009-10-30  Zoltan Varga  <vargaz@gmail.com>
807
808         * mini.c (mini_cleanup): Call profiler shutdown before shutting down the
809         runtime. Fixes #551228.
810
811 2009-10-29  Zoltan Varga  <vargaz@gmail.com>
812
813         * mini-x86.c (mono_arch_output_basic_block): Fix % 1. Fixes #550970.
814
815         * basic.cs: Add a test.
816
817         * method-to-ir.c (mono_method_to_ir): Use EMIT_NEW_LOAD_MEMBASE_TYPE to
818         load vtypes instead if OP_LOADV_MEMBASE in the implementation of
819         CONSTRAINED. Fixes #550964.
820
821         * generics.cs: Add a test.
822
823 2009-10-28  Mark Probst  <mark.probst@gmail.com>
824
825         * mini-posix.c (add_signal_handler): Use
826         mono_gc_get_suspend_signal() instead of GC_get_suspend_signal().
827
828 2009-10-28 Jerry Maine <crashfourit@gmail.com>
829
830         Contributed under the terms of the MIT/X11 license by
831         Jerry Maine <crashfourit@gail.com>.
832
833         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
834         sse4a for simd intrinsics.
835
836         * mini-amd64.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
837         sse4a for simd intrinsics.
838
839 2009-10-27  Zoltan Varga  <vargaz@gmail.com>
840
841         * ir-emit.h method-to-ir.c: Change a few _IMM macros to assign to inst_imm
842         instead of inst_p1 which is not the same on ILP32 platforms.
843
844 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
845
846         * mini-ppc.c (mono_arch_emit_prolog): Load the current got address,
847         not the mscorlib one before calling mono_get_lmf_addr.
848
849         * tramp-ppc.c (mono_arch_create_trampoline_code_full): Fix the storing
850         of the ip to the LMF.
851
852         * method-to-ir.c (mono_method_to_ir): Fix the handling of the
853         immediate in the op->op_imm optimization.
854
855         * mini-ppc.c: Add a 'vtregs' field to ArgInfo to make the code easier to
856         understand. VTypes now work, but are not abi compliant, as they are
857         split into 4 byte parts instead of 8.
858         (emit_memcpy): Fix the unrolled case to work on the PS3.
859
860         * mini-ppc.c (get_delegate_invoke_impl): Fix this for the PS3.
861
862         * aot-compiler.c (mono_compile_assembly): Make the autoreg option
863         the default when static linking.
864
865         * mini-ppc.c (mono_arch_emit_prolog): Fix handling of I8 arguments.
866
867         * aot-compiler.c: Add an autoreg option to automatically register
868         statically linked aot modules using ELF .ctors.
869
870         * genmdesc.pl: Add __ppc64__ to allowed defines.
871
872 2009-10-25  Zoltan Varga  <vargaz@gmail.com>
873
874         * mini-posix.c (add_signal_handler): Delay the GC suspend signal while
875         executing a SIGSEGV handler on an altstack, since libgc can't handle that.
876
877 2009-10-24  Mark Probst  <mark.probst@gmail.com>
878
879         * exceptions-x86.c (mono_arch_find_jit_info): Fix build.
880
881 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
882
883         * mini-exceptions.c (mini_jit_info_table_find): Add an 'out_domain' argument
884         which will contain the domain where the method was found.
885
886         * exceptions-<ARCH>.c mini-exceptions.c: Update callers of
887         mini_jit_info_table_find ().
888
889         * aot-compiler.c (xdebug_end_emit): Remove so stray debug code.
890
891         * branch-opts.c (mono_if_conversion): Avoid running deadce if it is disabled.
892
893 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
894
895         * mini-x86.c (mono_arch_emit_prolog): Disable aot for methods with save_lmf
896         set, its not supported yet.
897
898 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
899
900         * aot-runtime.c (mono_aot_get_method): Avoid asserting if a array generic
901         iface wrapper is not found.
902         (mono_aot_get_method): Ditto for GetGenericValueImpl.
903
904 2009-10-21  Zoltan Varga  <vargaz@gmail.com>
905
906         * aot-runtime.c (mono_aot_get_method): Fix support for the IList<T> wrappers,
907         which have a different name.
908
909         * aot-runtime.c (mono_aot_get_method): Special case the array generic iface
910         wrappers and Array.GetGenericValueImpl ().
911
912         * aot-compiler.c: Avoid emitting some wrappers which are not needed anymore
913         because of the change above.
914
915         * generics.cs: Add a test for full aot + generic array ifaces.
916
917 2009-10-19  Sebastien Pouliot  <sebastien@ximian.com>
918
919         * aot-compiler.c (emit_plt): Remove duplicate 'debug_sym' variable 
920         that hides the previous one.
921
922 2009-10-18  Zoltan Varga  <vargaz@gmail.com>
923
924         * aot-compiler.c (can_marshal_struct): Allow some System.dll structs to be
925         marshalled. Fixes #541623.
926
927 2009-10-16  Zoltan Varga  <vargaz@gmail.com>
928
929         * aot-compiler.c (emit_extra_methods): Remove some asserts which are not needed.
930
931 2009-10-15  Zoltan Varga  <vargaz@gmail.com>
932
933         * mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.
934
935 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
936
937         * mini-posix.c (sigprof_signal_handler):
938         Implemented support for building stat call chans in different ways.
939
940 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
941
942         * mini-exceptions.c (mono_find_jit_info):
943         Also check that a jit info has been found (fixes a profiler crash).
944
945 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
946
947         * mini.c (mono_codegen):
948         Call mono_profiler_code_buffer_new with correct code address.
949
950 2009-10-14  Zoltan Varga  <vargaz@gmail.com>
951
952         * driver.c (mono_main): Change the date in the copyright.
953
954 2009-10-14  Mark Probst  <mark.probst@gmail.com>
955
956         * method-to-ir.c (mono_method_to_ir): Don't use a managed array
957         allocator in shared generic code for open classes, because we
958         can't get those classes' vtables.  We need to make managed
959         allocators not depend on the vtable at compile-time to solve this.
960
961 2009-10-13  Martin Baulig  <martin@ximian.com>
962
963         * debug-mini.c (mono_debugger_trampoline_compiled): Add
964         `const guint8 *trampoline' argument; send both the old and the new
965         notification.
966
967 2009-09-30  Zoltan Varga  <vargaz@gmail.com>
968
969         * aot-compiler.c (add_wrappers): Add a runtime invoke wrapper which is used by
970         mono_runtime_capture_context () without calling mono_runtime_invoke ().
971         (can_marshal_struct): Skip structures with auto layout.
972
973         * tramp-arm.c (GEN_TRAMP_SIZE): Increase this by 4.
974
975 2009-10-02  Zoltan Varga  <vargaz@gmail.com>
976
977         * mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
978         (mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
979         a variable to hold the stack slot used by the int<->float conversion opcodes.
980
981         * mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.
982
983 2009-10-04  Zoltan Varga  <vargaz@gmail.com>
984
985         * aot-compiler.c (add_generic_class): Only add GetGenericValueImpl wrappers
986         when using full-aot.
987
988 2009-10-06  Zoltan Varga  <vargaz@gmail.com>
989
990         * aot-compiler.c (add_generic_class): Add an instance of GenericComparer<T> for
991         each instance of Comparer<T>.
992
993         * generics.cs: Add a new test.
994
995 2009-10-09  Zoltan Varga  <vargaz@gmail.com>
996
997         * driver.c (parse_debug_options): Add a 'gdb' option.
998
999         * mini.c (mini_parse_debug_options): Add a 'gdb' option.
1000
1001         * image-writer.c: Add support for emitting the image into a memory buffer.
1002
1003         * dwarfwriter.c: Add support for sharing one IL file between multiple images.
1004
1005         * aot-compiler.c: Add support for registering debug info with GDB using the
1006         new JIT debugging interface in GDB 7.0. It can be turned on by setting
1007         MONO_XDEBUG to 'gdb'.
1008
1009 2009-10-10  Zoltan Varga  <vargaz@gmail.com>
1010
1011         * aot-compiler.c (mono_save_trampoline_xdebug_info): Implement this for the
1012         gdb mode.
1013
1014 2009-10-11  Zoltan Varga  <vargaz@gmail.com>
1015
1016         * aot-compiler.c (mono_save_xdebug_info): Emit a symbol for the method which
1017         can be used to set breakpoints in gdb.
1018
1019         * image-writer.c (bin_writer_emit_writeout): Add support for setting the text
1020         segment to an absolute address.
1021
1022 2009-10-13  Mark Probst  <mark.probst@gmail.com>
1023
1024         * method-to-ir.c: Use the managed array allocator method if
1025         available.
1026
1027 2009-10-13  Bill Holmes  <billholmes54@gmail.com>
1028
1029         * aot-compiler.c : Fix the MSVC builds
1030
1031         Code is contributed under MIT/X11 license.
1032
1033 2009-10-13  Zoltan Varga  <vargaz@gmail.com>
1034
1035         * aot-compiler.c (mono_save_xdebug_info): Group methods into groups of 10 to
1036         avoid registering 1 symbol file per method with gdb.
1037
1038 2009-09-29  Zoltan Varga  <vargaz@gmail.com>
1039
1040         * mini-sparc.c: Fix the handling of enums with base type long.
1041
1042         * mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.
1043
1044         * mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
1045         instead of using type->data.klass as the later doesn't work with generics.
1046
1047 2009-09-25  Mark Probst  <mark.probst@gmail.com>
1048
1049         * method-to-ir.c, mini.h, mini-alpha.c, mini-amd64.c, mini-arm.c,
1050         mini-hppa.c, mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c,
1051         mini-s390x.c, mini-sparc.c, mini-x86.c: Thread.get_CurrentThread
1052         works differently now and we don't handle it in the JIT anymore.
1053
1054         * mini.c, mini-exceptions.c, mini-posix.c, debug-debugger.c,
1055         debug-mini.c, tramp-amd64.c, tramp-x86.c: Changes resulting from
1056         the Thread class split.
1057
1058 2009-09-25  Zoltan Varga  <vargaz@gmail.com>
1059
1060         * driver.c: Don't run tests with the obsolete treeprop optimization.
1061
1062         * mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
1063         variable volatile. Fixes #541577.
1064
1065         * basic-calls.cs: Add a new test.
1066
1067         * basic-long.cs: Remove tests which are now in basic-calls.cs.
1068
1069 2009-09-24  Zoltan Varga  <vargaz@gmail.com>
1070
1071         * dwarfwriter.c (emit_debug_info_end): Disable this as it doesn't seem to
1072         work/required with recent iphone sdk versions.
1073
1074         * aot-compiler.c (add_wrappers): Generate PtrToStructure wrappers for more
1075         structures.
1076
1077         * decompose.c (mono_decompose_vtype_opts): Avoid reading uninitialized memory
1078         in the VCALL decomposition code.
1079
1080 2009-09-22  Zoltan Varga  <vargaz@gmail.com>
1081
1082         * mini-ia64.c (mono_arch_output_basic_block): Fix ISHR/ISHR_IMM.
1083
1084         * basic.cs: Add a test.
1085
1086         * mini-ia64.c (mono_arch_build_imt_thunk): Implement support the virtual
1087         generic invokes.
1088
1089         * mini-exceptions.c (mini_jit_info_table_find): New helper function which
1090         searches all the domains of the current thread.
1091
1092         * exceptions-<ARCH>.c: Use it. Fixes #539394.
1093
1094 2009-09-21  Zoltan Varga  <vargaz@gmail.com>
1095
1096         * exceptions-arm.c (mono_arm_throw_exception): Set ctx->ebp to fp instead of sp
1097         so catching exceptions thrown in the same method works. Fixes exception17.exe.
1098
1099         * tramp-arm.c (mono_arch_create_trampoline_code_full): Store NULL into lmf->method
1100         for non-jit trampolines.
1101
1102         * mini.c (mono_jit_runtime_invoke): Allow string ctors with dyn runtime invoke.
1103
1104         * aot-compiler.c (add_wrappers): Ditto.
1105
1106         * mini-arm.c: Implement support for passing vtypes and floats, and increase
1107         the size of the param area used by dyn_call to 6 which covers the majority of
1108         methods.
1109
1110         * mini.c aot-compiler.c: Allow dyn_call for string methods except ctors.
1111
1112         * mini-arm.c: Implement support for passing/receiving
1113         longs and receiving floats in the dyn_call code.
1114
1115         * mini-amd64.c: Implement support for receiving vtypes in registers in
1116         the dyn_call code.
1117
1118         * mini.c mini-amd64.c: Implement partial support for passing vtypes in
1119         the dyn_call code.
1120
1121 2009-09-20  Zoltan Varga  <vargaz@gmail.com>
1122
1123         * mini-arm.c (get_call_info): Return more precise information in
1124         ArgInfo->regtype.
1125         (dyn_call_supported): Use the information in CallInfo.
1126
1127         * mini-arm.c: Enable support for returning vtypes in the dyn_call code.
1128
1129         * mini.c mini-amd64.c: Enable support for returning vtypes in the dyn_call
1130         code.
1131
1132         * mini-arm.c: Update after the dyn_call api changes.
1133
1134         * mini.c (mini_create_jit_domain_info): Register a destructor function
1135         for the runtime_invoke_hash.
1136
1137         * mini-amd64.c (mono_arch_get_dyn_call_args): Rename this to
1138         'mono_arch_dyn_call_start'. Pass the pointer to the return value buffer to
1139         this function.
1140         (mono_arch_get_dyn_call_ret): Rename this to 'mono_arch_dyn_call_finish'.
1141         (dyn_call_supported): Simplify this by using get_call_info ().
1142         (mono_arch_dyn_call_free): New destructor function.
1143
1144         * generics.cs: Remove a printf.
1145
1146         * method-to-ir.c (mono_method_to_ir): Allocate some param area for DYN_CALL.
1147
1148         * mini-arm.c: Add support for enum return values and passing a few arguments
1149         on the stack.
1150         
1151         * mini.c (mono_jit_runtime_invoke): Add support for enum return values to
1152         dyn invoke.
1153
1154         * mini-amd64.c (mono_arch_get_dyn_call_ret): Ditto.
1155
1156         * aot-compiler.c (add_wrappers): Add a few restrictions for the use of
1157         the dynamic invoke wrappers.
1158
1159         * mini-arm.c: Implement OP_DYN_CALL for arm.
1160
1161         * aot-compiler.c (add_wrappers): Avoid aot-ing runtime invoke wrappers
1162         supported by the dynamic runtime invoke wrapper.
1163
1164         * aot-compiler.c aot-runtime.c: Add support for encoding the dynamic
1165         runtime invoke wrapper.
1166
1167         * mini.c (mono_jit_runtime_invoke): Use the dynamic runtime invoke wrappers
1168         if possible when running with full-aot.
1169
1170         * mini-ops.h: Add OP_DYN_CALL opcode.
1171
1172         * mini-amd64.c method-to-ir.c: Add infrastructure for making method calls
1173         with dynamic arguments lists similar to libffi.
1174
1175 2009-09-19  Zoltan Varga  <vargaz@gmail.com>
1176
1177         * method-to-ir.c: Fix the previous change on 64 bit platforms.
1178         
1179         * method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
1180         to NEWARR.
1181
1182         * iltests.il.in: Add a new test.
1183         
1184 2009-09-18  Zoltan Varga  <vargaz@gmail.com>
1185
1186         * aot-compiler.c (add_generic_instances): Add more instances of
1187         GenericEqualityComparer.
1188
1189 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
1190
1191         * mini.c: Add asserts for mono_class_vtable calls that are not meant to fail.
1192
1193 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
1194
1195         * method-to-ir.c: Handle failures from mono_class_vtable. Added some
1196         comments on some functions that now can fail.
1197
1198 2009-09-17  Andrew Jorgensen  <ajorgensen@novell.com>
1199
1200         * Makefile.am: Add Info.plist to EXTRA_DIST
1201
1202 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
1203
1204         * method-to-ir.c (mono_method_to_ir): Allow AOT for CEE_LDTOKEN in
1205         static synchronized wrappers. Fixes #539500.
1206
1207 2009-09-14  Rodrigo Kumpera  <rkumpera@novell.com>
1208
1209         * jit-icalls.c (mono_class_static_field_address): handle vtable failure
1210         properly.
1211
1212 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
1213
1214         * mini-exceptions.c (mono_handle_exception_internal): Store the computed
1215         lmf before calling filter clauses as well. Fixes #539550.
1216
1217         * exceptions.cs: Add a test.
1218         
1219 2009-09-14  Zoltan Varga  <vargaz@gmail.com>
1220
1221         * aot-compiler.c (add_generic_class): Add instances of
1222         Array.GetGenericValueImpl as well.
1223
1224         * Makefile.am (fullaotcheck): Copy and aot more assemblies so linq
1225         can be tested too.
1226
1227         * generics.cs: Add a fullaot linq test.
1228
1229 2009-09-10  Zoltan Varga  <vargaz@gmail.com>
1230
1231         * aot-compiler.c (arch_emit_static_rgctx_trampoline): Don't clobber argument
1232         reg r1 on arm.
1233
1234 2009-09-10  Bill Holmes  <billholmes54@gmail.com>
1235
1236         * mini-trampolines.c (mono_delegate_trampoline) : Call
1237           mono_cominterop_get_invoke if the delegate target object
1238           is a COM object.
1239
1240         Code is contributed under MIT/X11 license.
1241
1242 2009-09-09  Sebastien Pouliot  <sebastien@ximian.com>
1243
1244         * method-to-ir.c: For CoreCLR throw a SecurityException if an 
1245         internal call is defined outside platform code. Reduce code 
1246         duplication with existing [Method|Field]AccessException
1247
1248 2009-09-08  Rodrigo Kumpera  <rkumpera@novell.com>
1249
1250         * mini-x86.c (mono_arch_emit_call): Don't reduce stack usage by 4
1251         if the return value is a small struct passed on regs.
1252
1253 2009-09-09  Zoltan Varga  <vargaz@gmail.com>
1254
1255         * cpu-arm.md mini-arm.c: Remove unused opcodes.
1256
1257         * mini-codegen.c: Enable the cpu description validation for arm.
1258
1259 2009-09-08  Zoltan Varga  <vargaz@gmail.com>
1260
1261         * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
1262         test which depends on structs to objects.cs.
1263         
1264         * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
1265         require object model related stuff working.
1266
1267         * cpu-x86.md mini-x86.c: Remove more unused opcodes.
1268
1269         * mini-ops.h: Fix OP_BIGMUL instruction descriptions.
1270
1271         * mini-codegen.c (mono_local_regalloc): Validate the cpu description 
1272         against the instruction metadata in mini-ops.h. amd64 only for now.
1273
1274         * mini-ops.h: Fix some instruction descriptions.
1275
1276         * mini-ops.h mini-x86.c mini-amd64.c cpu-<ARCH>.md: Remove some
1277         unused instructions.
1278
1279 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
1280
1281         * exceptions.cs: Add a new test.
1282
1283 2009-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
1284
1285         * mini-x86.c (needs_stack_frame): OSX requires full frames to keep proper alignment.
1286
1287 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
1288
1289         * mini-llvm.c (mono_llvm_emit_method): Add a few more missing casts,
1290         skip empty phi opcodes.
1291         
1292         * mini-llvm.c (mono_llvm_emit_method): Handle unsigned volatile variables
1293         correctly by zero extending after loads. Skip methods containing calls
1294         to the monitor enter/exit trampolines.
1295
1296         * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
1297         when calling mono_thread_force_interruption_checkpoint ().
1298
1299         * mini.c (mini_method_compile): Disable llvm when AOT compiling.
1300
1301         * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
1302         64 bit thunks.
1303         (mono_arch_nullify_class_init_trampoline): Read 'buf' instead of 'code'.
1304
1305         * mini-llvm.c (mono_llvm_emit_method): Add a few missing conversions so a 
1306         bootstrap could run.
1307
1308 2009-09-04  Zoltan Varga  <vargaz@gmail.com>
1309
1310         * mini.c (mini_init): Set callbacks.get_runtime_build_info ().
1311
1312 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
1313
1314         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass the start
1315         of the method to
1316         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
1317         LLVM might be very short.
1318
1319         * mini-x86.c (mono_arch_output_basic_block): Maintain stack alignment
1320         in OP_THROW/RETHROW.
1321
1322         * exceptions-x86.c: Rewrite the throw trampolines so they maintain stack
1323         alignment on osx.
1324
1325 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
1326
1327         * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
1328         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
1329         LLVM might be very short.
1330
1331 2009-09-01  Zoltan Varga  <vargaz@gmail.com>
1332
1333         * exceptions-x86.c (throw_exception): Fix the previous change by substracting
1334         the alignment for the value of sp.
1335
1336 2009-09-01  Geoff Norton  <gnorton@novell.com>
1337
1338         * mini.c (mono_get_lmf_addr): Fix jit_thread_attach for native to 
1339         managed wrappers in full aot.
1340
1341 2009-08-31  Zoltan Varga  <vargaz@gmail.com>
1342
1343         * exceptions-x86.c (get_throw_exception): Align the stack on osx.
1344
1345 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
1346
1347         * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
1348
1349 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
1350
1351         * aot-compiler.c (emit_exception_debug_info): Emit ei->flags too.
1352
1353         * aot-runtime.c (decode_exception_debug_info): Decode ei->flags from the
1354         saved info.
1355
1356         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1357
1358         * aot-runtime.c aot-compiler.c: Emit exception causes fully so we don't
1359         depend on the info MonoMethodHeader which could be missing in IL stripped
1360         assemblies.
1361
1362 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
1363
1364         * mini-arm.c (add_general): Fix the passing of 64 bit values on darwin, where
1365         they are only 4 byte aligned.
1366
1367 2009-08-21  Zoltan Varga  <vargaz@gmail.com>
1368
1369         * mini-arm.c (mono_arch_allocate_vars): Use FP as the frame pointer as
1370         was done previously, since using SP causes too many problems.
1371
1372         * exceptions-arm.c: Fix the handling of sp/fp so unwinding through
1373         frames without a frame pointer works.
1374
1375         * mini-arm.c (mono_arch_get_global_int_regs): Avoid using V5 as a
1376         global register in methods with calls, since the calls can go through
1377         a static rgctx trampoline which doesn't save it.
1378
1379 2009-08-19  Zoltan Varga  <vargaz@gmail.com>
1380
1381         * mini-arm.c (mono_arch_context_get_int_reg): Handle SP as well.
1382
1383 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
1384
1385         * aot-compiler.c (add_generic_instances): Fix the net 1.1 build.
1386
1387 2009-08-18  Christian Hergert  <chris@dronelabs.com>
1388
1389         * method-to-ir.c: Fix warnings for uninitialized variables.
1390
1391 2009-08-18  Christian Hergert  <chris@dronelabs.com>
1392
1393         * mini-exceptions.c:
1394         * aot-compiler.c: Fix printf warnings.
1395
1396 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
1397
1398         * aot-compiler.c (add_generic_instances): Add string[] wrapper methods.
1399         Add GetGenericValueImpl<string>.
1400         
1401         * aot-compiler.c (add_generic_instances): Add instances of
1402         GenericEqualityComparer<T> for primitive types. Only emit the array
1403         wrappers into the mscorlib image.
1404
1405 2009-08-15  Zoltan Varga  <vargaz@gmail.com>
1406
1407         * aot-runtime.c (load_method): Rename 'aot_module' -> 'amodule'. Allocate
1408         the methods_loaded array using amodule->info->nmethods.
1409
1410         * mini.h (MonoAotFileInfo): Add an 'nmethods' field.
1411         (MONO_AOT_FILE_VERSION): Bump this.
1412
1413         * aot-compiler.c: Emit more generic instances allowing some parts of linq
1414         to work.
1415
1416         * aot-runtime.c (mono_aot_get_unwind_info): Handle the case when the
1417         MonoJitInfo doesn't belong to its methods aot image.
1418
1419 2009-08-14  Zoltan Varga  <vargaz@gmail.com>
1420
1421         * mini-arm.c (mono_arch_allocate_vars): Use SP as the default frame reg.
1422
1423         * mini-arm.c: Fix warnings.
1424         
1425         * mini-arm.c (mono_arm_emit_load_imm): Only emit a movt if needed.
1426
1427         * mini-arm.c (mono_arm_emit_load_imm): Use movt/movw if the cpu
1428         supports it.
1429
1430 2009-08-12  Zoltan Varga  <vargaz@gmail.com>
1431
1432         * aot-compiler.c (arch_emit_imt_thunk): Rework the arm code to
1433         avoid clobbering IP.
1434
1435         * mini-trampolines.c (mono_magic_trampoline): Allocate a local to
1436         hold the trampoline argument, so its initial value is available during
1437         debugging.
1438
1439 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1440
1441         * exceptions-arm.c:
1442         * exceptions-hppa.c:
1443         * mini.c:
1444         * exceptions-s390x.c:
1445         * exceptions-mips.c:
1446         * exceptions-ppc.c:
1447         * exceptions-sparc.c:
1448         * exceptions-alpha.c:
1449         * aot-runtime.c:
1450         * mini-trampolines.c:
1451         * exceptions-x86.c:
1452         * exceptions-s390.c: add and use #define's instead of sizeof()
1453         for MonoJitInfo and MonoJitInfoTable.
1454
1455 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
1456
1457         * tramp-arm.c:
1458         * tramp-amd64.c:
1459         * tramp-ppc.c:
1460         * tramp-x86.c: use a #define instead of sizeof() for a few
1461         structures that use a zero-length array.
1462
1463 2009-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
1464
1465         * method-to-ir.c (mono_method_to_ir/CEE_CONSTRAINED_): Handle the
1466         case when the method is dynamic. Fixes #529238.
1467
1468 2009-08-06  Zoltan Varga  <vargaz@gmail.com>
1469
1470         * mini.c (mono_jit_compile_method_inner): Throw an exception instead
1471         of asserting when a method is JIT compiled in full-aot mode.
1472
1473 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
1474         
1475         Contributed under the terms of the MIT/X11 license by
1476         Jerry Maine <crashfourit@gail.com>.
1477         
1478         * fixed wrong dates in changelog.
1479
1480 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
1481         
1482         Contributed under the terms of the MIT/X11 license by
1483         Jerry Maine <crashfourit@gail.com>.
1484
1485         * basic-simd.cs: added test for packed double square root.
1486         * cpu-amd64.md: added opcode info for packed double square root.
1487         * cpu-x86.md: added opcode info for packed double square root.
1488         * mini-ops.h: added IR opcode for packed double square root.
1489         * mini-x86.c: added IR to native translation code for packed double square root.
1490         * mini-amd64.c: removed todo for packed double square root.
1491         * simd-intrinsics.c: added method to IR opcode converstion for
1492         packed double square root.
1493
1494 2009-08-03 Jerry Maine <crashfourit@gmail.com>
1495
1496         Contributed under the terms of the MIT/X11 license by
1497         Jerry Maine <crashfourit@gail.com>.
1498
1499         * mini-amd64.c: Added a change to help tell the difference as 
1500         to what perpose the xmm register is being used--mainly to help
1501         with debuging.
1502         * mini-amd64.h: Changed callee regs to use 15 out of 16 
1503         (one used for special cases) xmm registers for both fp
1504         and simd ops. Added define to turn on new feature in the regalloc
1505         that allows fp and simd ops to share the xmm regs happily.
1506         * codegen.c: Added code to detect for which perpose an xmm reg is
1507         being used (fp or simd) and to translate back and forth to the
1508         correct logical reg bank (fp or simd) for 'spill load's.
1509
1510 2009-08-03 Jerry Maine <crashfourit@gmail.com>
1511
1512         Contributed under the terms of the MIT/X11 license by
1513         Jerry Maine <crashfourit@gail.com>.
1514
1515         * basic-simd.cs: Added tests for stressing the regalloc when running with
1516         16 simd regs and when simd and fp ops share the same reg bank.
1517
1518 2009-08-01  Mark Probst  <mark.probst@gmail.com>
1519
1520         * method-to-ir.c (mini_emit_stobj): If we call mono_value_copy()
1521         in shared generic code, we might have to look up the class in the
1522         RGCTX.  If we use the class directly, compute its GC descriptor.
1523
1524 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
1525
1526         * mini.c (mono_jit_runtime_invoke): Fix a warning.
1527
1528 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
1529
1530         * mini.c (mono_jit_runtime_invoke): Initialize the class and
1531         check for errors. Fixed the case when the class with the Main
1532         method is broken.
1533
1534 2009-07-31 Jerry Maine <crashfourit@gmail.com>
1535
1536         Contributed under the terms of the MIT/X11 license by
1537         Jerry Maine <crashfourit@gail.com>.
1538
1539         * cpu-amd64.md: Fixed simple bug in machine discrition file.
1540
1541 2009-07-31  Zoltan Varga  <vargaz@gmail.com>
1542
1543         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.
1544
1545 2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
1546
1547         * method-to-ir.c: Fix naming of stelem and ldelem.
1548
1549 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
1550
1551         * driver.c (main_thread_handler): Check that the assembly loaded
1552         matches the filename when doing AOT.
1553
1554 2009-07-30  Mark Probst  <mark.probst@gmail.com>
1555
1556         * mini.c: get_ip_from_sigctx installer has been removed, so don't
1557         call it anymore.
1558
1559         * mini-x86.h, mini-amd64.h, mini-ppc.h: UCONTEXT macros moved (to
1560         utils/mono-sigcontext.h).
1561
1562         * exceptions-amd64.c: Use the UCONTEXT_GREGS macro instead of an
1563         #ifdef.
1564
1565 2009-07-29  Massimiliano Mantione  <massi@ximian.com>
1566
1567         * mini.c (mono_codegen):
1568         Call profiler hook to keep track of method code buffers.
1569
1570 2009-07-27  Mark Probst  <mark.probst@gmail.com>
1571
1572         * method-to-ir.c: Invoke write barriers for the
1573         Interlocked.(Compare)Exchange JIT intrinsics.
1574
1575 2009-07-26  Raja R Harinath  <harinath@hurrynot.org>
1576
1577         * Makefile.am (version.h): Fix issues when built out of tree.
1578         Remove some redundant 'grep's piped through 'sed's.
1579
1580 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
1581
1582         This patch is contributed under the terms of the MIT/X11 license
1583
1584         * mini-ppc.c (mono_arch_output_basic_block):
1585         (OP_STOREI1_MEMBASE_REG): Handle 32-bit offsets combining addis
1586         for bits 32-47 with signed load/store diplacements for bits
1587         48-63.  Use prefered base/offset order for indexed form.
1588         (OP_STOREI2_MEMBASE_REG, OP_STORE_MEMBASE_REG): Same.
1589         (OP_LOAD_MEMBASE, OP_LOADI4_MEMBASE, OP_LOADU4_MEMBASE,
1590         OP_LOADI1_MEMBASE, OP_LOADU1_MEMBASE, OP_LOADU2_MEMBASE,
1591         OP_LOADI2_MEMBASE): Same.
1592         (OP_STORER8_MEMBASE_REG, OP_LOADR8_MEMBASE,
1593         OP_STORER4_MEMBASE_REG, OP_LOADR4_MEMBASE): Same.
1594         (OP_STOREI1_MEMINDEX): Use prefered base/offset order for
1595         indexed form.
1596         (OP_STOREI2_MEMINDEX, OP_STORE_MEMINDEX): Same.
1597         (OP_LOAD_MEMINDEX, OP_LOADI4_MEMINDEX, OP_LOADU4_MEMINDEX,
1598         OP_LOADU2_MEMINDEX, OP_LOADI2_MEMINDEX, OP_LOADU1_MEMINDEX,
1599         OP_LOADI1_MEMINDEX): Same
1600         (OP_LOADR4_MEMINDEX, OP_LOADR8_MEMINDEX, OP_STORER4_MEMINDEX,
1601         OP_STORER8_MEMINDEX): Same
1602         (OP_JMP): Use addis/addi sequence for int cfg->stack_usage
1603         computations.
1604         (mono_arch_emit_prolog): Handle 32-bit offsets combining addis
1605         for bits 32-47 with signed load/store diplacements for bits
1606         48-63.  Use prefered base/offset order for indexed form.
1607
1608 Fri Jul 24 16:57:12 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
1609
1610 This patch is contributed under the terms of the MIT/X11 license
1611
1612         * mini-ppc.c: Define PPC_MOVE_FPR_GPR and PPC_ISA_64.
1613         (mono_arch_get_vcall_slot): Fx pointer to int cast warning.
1614         (mono_arch_decompose_opts): Make OP_ICONV_TO_R4 and
1615         OP_ICONV_TO_R8 decompose conditional on !PPC_ISA_64.
1616         (mono_arch_output_basic_block) [OP_JMP]: Use ppc_load32 for
1617         cfg->stack_usage to avoid size warnings.
1618         (mono_arch_output_basic_block) [__mono_ppc64__]: Replace
1619         store/load sequence with mffgpr if PPC_MOVE_FPR_GPR is true.
1620         (mono_arch_output_basic_block) [!__mono_ppc64__]: For
1621         OP_ICONV_TO_R4 or OP_ICONV_TO_R8 and PPC_ISA_64 use fcfid
1622         to convert.
1623         (mono_arch_emit_prolog): Move mono_emit_unwind_op_def_cfa 
1624         after code varible is initialized.
1625         Add g_assert ppc_is_imm16 for ainfo->offset. Handle
1626         ainfo->size == 8 when ainfo->offset !ppc_is_imm16.
1627         (mono_arch_emit_epilog): 
1628         Move Use ppc_load32 for cfg->stack_usage to avoid size
1629         warnings.
1630
1631 2009-07-24  Mark Probst  <mark.probst@gmail.com>
1632
1633         * method-to-ir.c: The write barrier doesn't do the store anymore,
1634         so we have always to emit it.  Also, emit the wbarrier after the
1635         store.
1636
1637 2009-07-24  Zoltan Varga  <vargaz@gmail.com>
1638
1639         * mini-arm.c (mono_arch_get_delegate_invoke_impls): Add a trampoline
1640         for argument count 3 too.
1641
1642 2009-07-23  Zoltan Varga  <vargaz@gmail.com>
1643
1644         * mini.c (mono_jit_compile_method_with_opt): Add an 'ex' argument to let
1645         the caller handle the exceptions.
1646         (mono_jit_runtime_invoke): Handle exceptions thrown while compiling the
1647         method. Fixes #524498.
1648
1649 2009-07-22  Geoff Norton  <gnorton@novell.com>
1650
1651         * mini-exceptions.c: Fix build on ia64.
1652
1653 2009-07-22  Mark Probst  <mark.probst@gmail.com>
1654
1655         * mini-exceptions.c (ves_icall_get_frame_info): Use write
1656         barriers.
1657
1658 2009-07-21  Zoltan Varga  <vargaz@gmail.com>
1659
1660         * mini-arm.c (mono_arch_emit_prolog): Fix thread attaching in aot
1661         code.
1662
1663 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
1664
1665         * basic-simd.cs (Main): Pass args to the test driver.
1666
1667 2009-07-20  Geoff Norton  <gnorton@novell.com>
1668
1669         * mini-x86.h: Fix the x86 version guards to use Apple's
1670         properly defined macros.
1671
1672 2009-07-20  Geoff Norton  <gnorton@novell.com>
1673
1674         * mini-x86.c: Fix --trace on darwin-x86 and other systems which require
1675         aligned access.
1676
1677 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
1678
1679         * mini.c (mono_jit_runtime_invoke): Speed this up by adding a hash to
1680         MonoJitDomainInfo which maps MonoMethod's to a structure containing all
1681         the information which is needed for invokes, so only one locking+hash table
1682         lookup is needed.
1683
1684         * aot-compiler.c: Add a 'tool-prefix' option to be used when cross-compiling.
1685         
1686         * aot-compiler.c (add_generic_instances): Emit instances of 
1687         GenericComparer<T> for primitive types.
1688
1689 2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>
1690
1691         * mini-posix.c: Fix linux build.
1692
1693 2009-07-19  Geoff Norton  <gnorton@novell.com>
1694
1695         * mini.h: Add prototypes for mono_runtime_syscall_fork and
1696         mono_gdb_render_native_backtraces
1697         * mini-darwin.c: Apple's syscall(SYS_fork) is very weird on x86,
1698         so we implement the sane semantics to the runtime here
1699         (mono_gdb_render_native_backtraces).  Apple also uses an ancient gdb
1700         so we need to call it differently (mono_gdb_render_native_backtraces)
1701         * mini-posix.c: Move the old semantics from mini.c to the prototypes
1702         here for default implementations.
1703         * mini.c: Refactor mono_handle_native_sigsegv so that we can properly
1704         support Apple's weird syscall (SYS_fork) implementation and not busy
1705         loop in abort() on native crashes on OSX anymore.
1706
1707 2009-07-18  Zoltan Varga  <vargaz@gmail.com>
1708
1709         * aot-runtime.c (load_method): Change the handling of the
1710         MONO_LASTAOT env variable so MONO_LASTAOT=0 means that no aot methods
1711         are used.
1712
1713         * mini.c (mono_patch_info_equal): Really fix the handling of RGCTX_FETCH.
1714
1715 2009-07-17  Zoltan Varga  <vargaz@gmail.com>
1716
1717         * mini.c (mono_patch_info_equal): Revert the last change for now as it
1718         seems to break the aot tests.
1719         
1720         * mini.c (mono_patch_info_equal): Fix the handling of 
1721         MONO_PATCH_INFO_RGCTX_FETCH.
1722
1723 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
1724
1725         * unwind.c: Use TARGET_AMD64 instead of __x86_64__.
1726
1727         * mini.c (mono_patch_info_hash): Fix the handling of 
1728         MONO_PATCH_INFO_INTERNAL_METHOD.
1729         (mono_patch_info_equal): Ditto.
1730
1731 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
1732
1733         * mini-llvm.c (mono_llvm_emit_method): Use module instead of ctx->module
1734         in a few places.
1735         
1736         * mini-llvm.c: Add some infrastructure for AOT support.
1737
1738 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
1739
1740         * mini-llvm-cpp.c: Update to the latest llvm api.
1741         
1742         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Set the EnablePrettyStackTrace
1743         option to false to prevent llvm from installing signal handlers which
1744         trip up the gc.
1745         
1746 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
1747
1748         * cpu-x86.md:
1749         * cpu-amd64.md: Revert previous change as those instructions
1750         take 2 separate arguments. Remember to read the arch docs more
1751         carefully next time.
1752
1753 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
1754
1755         * mini-llvm-cpp.cpp (mono_llvm_build_alloca): Update to latest llvm api.
1756
1757 Wed Jul 15 17:20:27 CEST 2009 Paolo Molaro <lupus@ximian.com>
1758
1759         * mini-ppc.c: exploit multiple load/store units if available (rest of
1760         the change from Steven Munroe (<munroesj@us.ibm.com>) first patch at 
1761         http://bugzilla.novell.com/show_bug.cgi?id=487846).
1762
1763 Wed Jul 15 16:24:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
1764
1765         * mini-ppc.c: integrate most of Steven Munroe (<munroesj@us.ibm.com>)
1766         first patch at http://bugzilla.novell.com/show_bug.cgi?id=487846.
1767
1768 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
1769
1770         * cpu-x86.md: Fix missing clobbering from trancendental simd
1771         ops.
1772
1773         * cpu-amd64.md: Same.
1774
1775 2009-07-14 Jerry Maine <crashfourit@gmail.com>
1776
1777         Contributed under the terms of the MIT/X11 license by
1778         Jerry Maine <crashfourit@gail.com>.
1779
1780         * basic-simd.cs: Added tests for single and doulble indexers.
1781
1782         * cpu-amd64.md: Added simd opcode information.
1783
1784         * mini-amd64.c: Added IR to native simd generation code.
1785         Added simd register names and function that returns them.
1786
1787         * mini-amd64.h: Added marcos to turn on simd code compilation in
1788         amd64. Added max simd register count marco. Added caller/callee
1789         register mask marcos. Added marcos to use simd register bank.
1790
1791         * mini.h: Added helper marco for shufling dwords and simple
1792         floats.
1793
1794 2009-07-14  Zoltan Varga  <vargaz@gmail.com>
1795
1796         * mini-llvm-cpp.cpp: Update to latest llvm SVN api.
1797
1798         * Makefile.am (mono_LDADD): Pass LLVM_LDFLAGS to the linked.
1799
1800         * unwind.c (mono_unwind_get_ops_from_fde): Make this return
1801         the length of the native code as well.
1802
1803         * basic-simd.cs: Add a test for #521662.
1804
1805 Mon Jul 13 17:58:50 CEST 2009 Paolo Molaro <lupus@ximian.com>
1806
1807         * mini-ppc.c: fixed bug introduced by Steven's TLS changes.
1808
1809 2009-07-13  Mark Probst  <mark.probst@gmail.com>
1810
1811         * mini.c: Register function for getting the IP from a signal
1812         context with metadata.
1813
1814 2009-07-13  Zoltan Varga  <vargaz@gmail.com>
1815
1816         * method-to-ir.c (mono_method_to_ir): When calling a gshared method,
1817         call a generic class init trampoline if needed. Fixes #519336.
1818
1819         * generics.cs: Add a test.
1820         
1821 2009-07-09  Mark Probst  <mark.probst@gmail.com>
1822
1823         * method-to-ir.c: When doing a call which might be remote from
1824         shared generic code to other shared code with open type arguments,
1825         get the remoting invoke wrapper from the RGCTX and do an indirect
1826         call to it.
1827
1828 2009-07-03  Zoltan Varga  <vargaz@gmail.com>
1829
1830         * mini-trampolines.c (get_unbox_trampoline): Add an rgctx trampoline
1831         after the unbox trampoline in the full-aot case.
1832
1833 2009-07-02  jonas echterhoff <jonas@unity3d.com>
1834         
1835         * mini.c: Move initialization of jit_mutex before debugger initialization
1836         
1837         to avoid crashes.
1838         
1839         
1840         * Info.plist: added Info.plist and link flag to enable the mono executable
1841         to access other processes. Requires codesigning of the executable to work.
1842         
1843         * mdb-debug-info32-darwin.s: The same as mdb-debug-info32.s, changed to 
1844         
1845         compile on OS X.
1846         
1847
1848 2009-06-30  Zoltan Varga  <vargaz@gmail.com>
1849
1850         * driver.c (mini_regression): Handle loading errors. Fixes #508869.
1851
1852 2009-06-29  Zoltan Varga  <vargaz@gmail.com>
1853
1854         * mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
1855         when the generic instance is an instantiation of a subclass of the
1856         methods class. Fixes #517166.
1857
1858 2009-06-26  Zoltan Varga  <vargaz@gmail.com>
1859
1860         * mini-amd64.c (mono_arch_emit_prolog): Fix thread attaching in AOTed
1861         code.
1862
1863         * mini.c (mono_jit_thread_attach): Allow domain to be NULL for calls from
1864         AOTed code.
1865
1866         * CMakeLists.txt: Add minimal support for installation.
1867
1868 2009-06-25  Zoltan Varga  <vargaz@gmail.com>
1869
1870         * aot-compiler.c (emit_and_reloc_code): Factor out the code to
1871         determine whenever a method is directly callable to a separate function.
1872
1873         * mini-<ARCH>.c tramp-<ARCH>.c: Remove needless casts and add new
1874         needed ones as a result of the previous change.
1875
1876         * mini-<ARCH>.c tramp-<ARCH>.c: Use mgreg_t* as the
1877         type of register arrays.
1878
1879         * mini-trampolines.c tramp-<ARCH>.c aot-runtime.c: Use mgreg_t* as the
1880         type of register arrays.
1881
1882 2009-06-24  Jerry Maine  <crashfourit@gmail.com>
1883         
1884         Contributed under the terms of the MIT/X11 license by
1885         Jerry Maine <crashfourit@gail.com>.
1886
1887         * mini-amd64.c: Added code to convert simd IR to native amd64 sse.
1888
1889 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
1890
1891         * aot-compiler.c (emit_plt): Define debug labels for most plt entries.
1892
1893 2009-06-24  Neale Ferguson <neale@sinenomine.net>
1894
1895         * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
1896         dump of structure return value. Fix some formatting.
1897         * cpu-s390x.md: Fix lengths of instruction sequences.
1898         * mini-s390.c: Minor formatting changes.
1899
1900 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
1901
1902         * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
1903         Use sigaction on freebsd as well.
1904
1905 2009-06-23  Zoltan Varga  <vargaz@gmail.com>
1906
1907         * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
1908         uses #ifdef on it.
1909         
1910         * mini.c (mini_init): Revert a change which breaks cross-compilation.
1911
1912 2009-06-22  Mark Probst  <mark.probst@gmail.com>
1913
1914         * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
1915
1916 2009-06-22  Mark Probst  <mark.probst@gmail.com>
1917
1918         * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
1919
1920 2009-06-20  Martin Baulig  <martin@ximian.com>
1921
1922         * debug-mini.c
1923         (MonoDebuggerThreadFlags): New enum typedef.
1924         (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
1925         (mono_debugger_thread_created): Added `gpointer func' argument;
1926         initialize the new `thread_flags' field.
1927
1928 2009-06-18  Martin Baulig  <martin@ximian.com>
1929
1930         * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
1931         (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
1932
1933         * debug-debugger.c
1934         (mini_debugger_set_attach_ok): New function; sets the attach-ok
1935         flag in `MONO_DEBUGGER__info.runtime_info'.
1936
1937         * driver.c
1938         (mono_main): Call mini_debugger_set_attach_ok() if generics
1939         sharing is disabled.
1940
1941 2009-06-22  Zoltan Varga  <vargaz@gmail.com>
1942
1943         * aot-compiler.c (add_wrappers): Fix a warning.
1944
1945         * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
1946         the ppc load/store macro changes.
1947
1948 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
1949
1950         * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
1951
1952         * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
1953         not just the got symbol.
1954
1955         * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
1956         on ppc.
1957
1958         * aot-compiler.c unwind.c: Add infrastructure for unwind support on
1959         ppc.
1960         
1961         * aot-compiler.c: Remove some fixmes.
1962
1963         * driver.c (mono_main): Print a helpful message when cross-compiling.
1964
1965         * mini.c (mini_init): Disable signal handlers when cross-compiling.
1966
1967         * method-to-ir.c (initialize_array_data): Do the optimization if the
1968         target byte order is little endian, instead of the host byte order.
1969
1970         * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
1971         wrappers into the mscorlib image, Emit a unique plt symbol for each
1972         image, emit symbols for plt entries.
1973
1974         * image-writer.c (img_writer_emit_symbol_size): New function to emit
1975         a .size directive.
1976         
1977 2009-06-20  Zoltan Varga  <vargaz@gmail.com>
1978
1979         * aot-compiler.c (add_wrappers): Avoid calling 
1980         mono_marshal_get_type_info () since it can assert for some types.
1981
1982         * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of 
1983         ldtoken are used inside wrappers.
1984
1985         * helpers.c: Add support for prefixing tools with the arch name.
1986
1987         * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
1988         quantities when using ilp32.
1989
1990         * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
1991         spill slots. Use sizeof(mgreg_t) for the spill slot size.
1992
1993         * image-writer.c: Use .long on ilp32.
1994
1995         * aot-compiler.c: Use 32 bit loads on ilp32.
1996         
1997 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
1998
1999         * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
2000
2001         * mini-ops.h: Use TARGET_POWERPC define for consistency.
2002
2003         * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
2004
2005         * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the 
2006         second got slot of every aot image.
2007         
2008         * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
2009         aot on platforms with function pointers.
2010
2011         * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
2012         support for aot/full aot on ppc/ppc64.
2013         
2014         * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
2015         arguments which are needed on ppc.
2016
2017         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
2018         argument.
2019
2020         * mini-trampolines.c aot-runtime.c: Update after the above changes.
2021         
2022         * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
2023
2024         * regalloc2.c (BITS_PER_CHUNK): Ditto.  
2025
2026         * aot-compiler.c (emit_got_info): Fix reading unused memory.
2027
2028         * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
2029
2030 2009-06-17  Geoff Norton  <gnorton@novell.com>
2031
2032         * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
2033
2034 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
2035
2036         * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
2037         to control whenever the dwarf writer is in xdebug or aot mode.
2038         (emit_class_dwarf_info): Use a separate abbrev for structures without
2039         children.
2040
2041         * aot-compiler.c: Pass the appending parameter to 
2042         mono_dwarf_writer_create ().
2043
2044         * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
2045         falls through to its next bblock. Fixes #513931.
2046
2047         * iltests.il: Add a test.
2048
2049         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
2050         infor even if emit_line is FALSE, as the apple linker seems to require it.
2051
2052         * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
2053
2054         * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
2055         gcc does.
2056         (emit_fde): Ditto.
2057
2058 2009-06-15  Zoltan Varga  <vargaz@gmail.com>
2059
2060         * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
2061         mips build.
2062
2063 2009-06-13  Zoltan Varga  <vargaz@gmail.com>
2064
2065         * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and 
2066         'has_call_handler' fields.
2067
2068         * method-to-ir.c (mono_method_to_ir): Set them if needed.
2069
2070         * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
2071         first bblock if not needed. Fixes #512790.
2072         
2073 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
2074
2075         * aot-compiler.c (mono_compile_assembly): Fix a warning.
2076         
2077         * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
2078         wrappers.
2079
2080         * aot-runtime.c (mono_aot_get_method): Use the original method's code for
2081         remoting-invoke-with-check wrappers, which are not needed when running with
2082         full-aot, since it doesn't support remoting.
2083         
2084 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
2085
2086         * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
2087
2088         * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
2089         method info, it is not used anymore.
2090
2091         * mini.h: Bump AOT file format version.
2092         
2093         * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
2094         word smaller.
2095
2096         * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
2097         change above.
2098         
2099         * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
2100
2101         * mini.h: Bump AOT file format version.
2102         
2103 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
2104
2105         * image-writer.c (asm_writer_emit_symbol_diff): Disable the 
2106         TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
2107         iphone.
2108
2109         * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
2110         of CKFINITE and FBGE for VFP.
2111
2112 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
2113
2114         * aot-compiler.c: Don't align code to 16 bytes on arm.
2115         
2116         * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
2117         before the methods they belong to.
2118
2119         * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
2120         the full-aot case if possible, since the trampoline will be called right 
2121         away.
2122
2123         * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
2124         trampolines to 1024 after the change above.
2125
2126         * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
2127         trampoline to save 8 bytes per trampoline.
2128
2129         * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
2130         change above.
2131
2132 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
2133
2134         * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
2135
2136 2009-06-08  Martin Baulig  <martin@ximian.com>
2137
2138         * debug-mini.c
2139         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
2140         (_mono_debugger_throw_exception): Don't make this static.
2141         (_mono_debugger_unhandled_exception): Likewise.
2142         (mono_debugger_handle_exception): Moved to mini-exceptions.c
2143
2144         * debug-mini.c
2145         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
2146         (_mono_debugger_throw_exception): Add function prototype.
2147         (_mono_debugger_unhandled_exception): Likewise.
2148
2149         * mini-exceptions.c
2150         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
2151         arg; return the first exception handler if the exception is caught
2152         and we're running inside the debugger.
2153         (mono_debugger_handle_exception): Moved here from debug-mini.c;
2154         improve exception handle inside runtime-invoke, check whether the
2155         exception is actually caught in the method being invoked and not
2156         by the runtime-invoke-wrapper.
2157
2158 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
2159
2160         * image-writer.c: Improve support for the osx assembler.
2161
2162         * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
2163         support them.
2164
2165 2009-06-08  Martin Baulig  <martin@ximian.com>
2166
2167         * debug-mini.c
2168         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
2169         (_mono_debugger_throw_exception): Don't make this static.
2170         (_mono_debugger_unhandled_exception): Likewise.
2171         (mono_debugger_handle_exception): Moved to mini-exceptions.c
2172
2173         * debug-mini.c
2174         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
2175         (_mono_debugger_throw_exception): Add function prototype.
2176         (_mono_debugger_unhandled_exception): Likewise.
2177
2178         * mini-exceptions.c
2179         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
2180         arg; return the first exception handler if the exception is caught
2181         and we're running inside the debugger.
2182         (mono_debugger_handle_exception): Moved here from debug-mini.c;
2183         improve exception handle inside runtime-invoke, check whether the
2184         exception is actually caught in the method being invoked and not
2185         by the runtime-invoke-wrapper.
2186
2187 2009-06-07  Zoltan Varga  <vargaz@gmail.com>
2188
2189         * image-writer.c (append_subsection): Don't align subsections of the
2190         debug_line section as a workaround.
2191
2192         * dwarfwriter.c: Emit line number info in the AOT case as well.
2193
2194 2009-06-06  Steven Munroe  <munroesj@us.ibm.com>
2195
2196         This patch is contributed under the terms of the MIT/X11 license
2197
2198        * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
2199        code_len <= code_size
2200
2201 2009-06-06  Zoltan Varga  <vargaz@gmail.com>
2202
2203         * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
2204
2205 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
2206
2207         * aot-compiler.c aot-runtime.c: Delete references to static rgctx
2208         invoke wrappers, we now use trampolines instead.
2209
2210 2009-06-04  Mark Probst  <mark.probst@gmail.com>
2211
2212         * mini-darwin.c: The exception thread must not be registered with
2213         the GC.
2214
2215 2009-06-04  Mark Probst  <mark.probst@gmail.com>
2216
2217         * mini-gc.c: Disable the code because it makes SGen crash.
2218
2219 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
2220
2221         * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
2222         instead of asserting.
2223
2224 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
2225
2226         * aot-compiler.c (mono_compile_assembly): Move the creation of the
2227         output file after the code has been compiled.
2228
2229 2009-05-30  Zoltan Varga  <vargaz@gmail.com>
2230
2231         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
2232
2233 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
2234
2235         * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
2236         entries distinction to simplify the code.
2237
2238         * mini.h: Bump AOT file format version.
2239         
2240 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
2241
2242         * objects.cs: Fix the signature of one of the tests.
2243
2244         * mini.c (mini_create_ftnptr): New helper function, moved here from
2245         object.c.
2246         (mini_get_addr_from_ftnptr): Ditto.
2247         (mini_init): Install the new helpers.
2248
2249 2009-05-28  Martin Baulig  <martin@ximian.com>
2250
2251         Correctly initialize the debugger when embedding Mono.
2252
2253         * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
2254         `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
2255         see documentation in mini_debug_running_inside_mdb().
2256
2257         * debug-debugger.c
2258         (mini_debug_running_inside_mdb): New function to check whether
2259         we're running inside mdb.
2260
2261         * mini.c (mini_init): Call mini_debugger_init() if we're running
2262         inside the debugger.
2263
2264         * driver.c (mono_main): Moved the call to mini_debugger_init()
2265         into mini_init() to make this work when embedding Mono.
2266
2267         * debug-debugger.c (mini_debugger_init): Warn about duplicate
2268         calls to mini_debugger_init().
2269
2270         * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
2271         mono_debugger_main() -> mini_debugger_main() and put them inside a
2272         `MONO_DEBUGGER_SUPPORTED' conditional.
2273
2274 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
2275
2276         * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
2277         this is no longer in use.
2278         * mini.h: Same.
2279
2280 2009-05-26  Zoltan Varga  <vargaz@gmail.com>
2281
2282         * mini-sparc.c (add_outarg_load): Fix the sparc build.
2283
2284         * aot-compiler.c (emit_method_code): Always write out C style symbols for
2285         methods.
2286
2287 2009-05-27  Martin Baulig  <martin@ximian.com>
2288
2289 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
2290
2291         * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
2292         long_conv_to_r_un to 64 bits.
2293
2294         * cpu-x86.md: Increase the instruction size due to the changes.
2295
2296         * iltests.il.in: Add regression test.
2297
2298         Fixes #467201.
2299
2300 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
2301
2302         * objects.cs: Move the previous test from basic.cs to here.
2303
2304 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
2305
2306         * basic.cs: Add regression test for #506915.
2307
2308 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
2309
2310         * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
2311         optimization we must check the bb of the first byte of stobj as
2312         it's the only one set in cil_offset_to_bb.
2313
2314         Fixes #506915.  
2315
2316 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
2317
2318         * image-writer.c: Fix pointer directive on ppc64.
2319
2320 2009-05-24  Zoltan Varga  <vargaz@gmail.com>
2321
2322         * image-writer.c (asm_writer_emit_section_change): Avoid using
2323         .bss subsections on ppc too.
2324
2325 2009-05-23  Zoltan Varga  <vargaz@gmail.com>
2326
2327         * image-writer.c: Fix the definition of TARGET_ASM_....
2328         
2329         * image-writer.c: Fix the emission of assembler directives in the last
2330         change.
2331
2332         * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
2333         exception throwing code to accomodate ppc64.
2334
2335         * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
2336         size to work on ppc64 too.
2337
2338         * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
2339         too.
2340
2341         * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
2342         the assembler dialect instead of using platform specific defines.
2343
2344 2009-05-22  Geoff Norton  <gnorton@novell.com>
2345
2346         * mini-arm.c (get_call_info): If a structure is split between the stack
2347         and argument registers, we should not advance the stack pointer by the entire
2348         native size, but just by the amount that spilled.
2349
2350 2009-05-22  Zoltan Varga  <vargaz@gmail.com>
2351
2352         * mini-arm.c (get_call_info): Handle structures with alignment requirements
2353         correctly.
2354
2355 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
2356
2357         * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
2358         wrappers normally.
2359         
2360         * aot-compiler.c (add_extra_method): Fix up the collection of extra
2361         methods so wrapper don't get added twice.
2362         (add_generic_instances): Don't add methods of arrays.
2363
2364         * generics.cs: Mark one test as !FULLAOT.
2365
2366 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
2367
2368         * mini-x86.c (emit_move_return_value): Remove unused vars.
2369
2370 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
2371
2372         * mini-x86.c (mono_arch_emit_call): The decompose code now supports
2373         decomposing 8 bytes structs into a LCALL.
2374
2375         * mini-x86.c (emit_move_return_value): We no longer push the vtype
2376         pointer for where to store the returned regs.
2377
2378         * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
2379         state the concern.
2380
2381         Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
2382
2383 2009-05-20  Miguel de Icaza  <miguel@novell.com>
2384
2385         * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
2386         without getenv.
2387
2388 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
2389
2390         * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
2391
2392         * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
2393         generics.
2394
2395 2009-05-20 Rodrigo Kumpera  <rkumpera@novell.com>
2396
2397         * local-propagation.c (mono_local_cprop): Avoid local propagation
2398         across paired add/sub if the first instruction dest reg is it's
2399         source reg. For example:
2400
2401         int_add_imm R12 <- R12 [1] clobbers: 1
2402         int_sub_imm R42 <- R12 [1] clobbers: 1
2403
2404         The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
2405         maintain the math identify.
2406
2407         Fixes #505375.
2408
2409 2009-05-20  Andreia Gaita  <avidigal@novell.com>
2410
2411         * Makefile.am: avoid going on the network just to get the revision,
2412         use git log instead
2413
2414 2009-05-19  Massimiliano Mantione  <massi@ximian.com>
2415
2416         Fixed estimate for short branches on amd64 (they were off mark, and
2417         enabling call prolog-epilog instrumentations caused assertions).
2418         * mini.h (struct MonoBasicBlock): added max_length field to hold the
2419         estimate for the maximum length of this basic block.
2420         * mini-amd64.c:
2421         - mono_arch_emit_prolog: compute max_length for each basic block
2422           (instead of max_offset), and inflate size estimate also for entry bb
2423           in case of code instrumentation.
2424         - mono_arch_output_basic_block: get rid of "cpos" (the current
2425           estimated "position" in the code), and always use "offset" instead,
2426           which is accurate; at the beginning of the function quickly recompute
2427           max_offset for all the remaining blocks, starting from the current
2428           cfg->code_len (which is correct, and not estimated) and using the
2429           estimated block lengths computed previously.
2430
2431 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
2432
2433         * exceptions-ppc.c: Remove the caching from the trampoline creation 
2434         functions, it is already done in the caller.
2435
2436         * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
2437
2438         * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add 
2439         MONO_ARCH_GSHARED_SUPPORTED define.
2440
2441         * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
2442
2443         * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
2444         function.
2445
2446 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
2447
2448         * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the 
2449         call to mono_marshal_get_rgctx_invoke ().
2450
2451         * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
2452         mono_marshal_get_static_rgctx_invoke (), all platforms which support
2453         gshared use the static rgctx trampolines now.
2454         
2455         * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
2456         platform supports it.
2457
2458 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
2459
2460         * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
2461
2462         * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
2463
2464 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
2465
2466         * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
2467
2468         * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
2469         for ppc.
2470
2471 2009-05-15  Massimiliano Mantione  <massi@ximian.com>
2472
2473         Made it possible for mono_arch_instrument_epilog to preserve
2474         argument registers, otherwise instrumenting the "epilogue" before
2475         a tail call would clobber them.
2476         * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
2477         if like mono_arch_instrument_epilog but with an additional parameter
2478         that states if argument registers must be preserved.
2479         * mini.c: implemented mono_arch_instrument_epilog as a call to
2480         mono_arch_instrument_epilog_full without asking to preserve argument
2481         registers (this makes the existing code work as usual).
2482         * mini-amd64.c:
2483         - mono_arch_instrument_epilog: add parameter to transform it into
2484         mono_arch_instrument_epilog_full, and preserve argument registers
2485         when required.
2486         - mono_arch_output_basic_block, OP_TAILCALL case: call
2487         mono_arch_instrument_epilog_full.
2488         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
2489         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
2490         only transformed mono_arch_instrument_epilog into
2491         mono_arch_instrument_epilog_full.
2492
2493 2009-05-15  Geoff Norton  <gnorton@novell.com>
2494
2495         * mini-darwin.c: This works on arm now.
2496
2497 2009-05-14  Geoff Norton  <gnorton@novell.com>
2498
2499         * jit.h, driver.c: Allow full-aot to be decided programatically by the
2500         embedding api.
2501
2502 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
2503
2504         * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
2505         label names.
2506
2507         * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
2508         wrappers during full aot mode correctly.
2509
2510         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
2511         methods correctly.
2512
2513         * aot-compiler.c (mono_aot_method_hash): Use our internal version of
2514         mono_metadata_type_hash ().
2515
2516 2009-05-14  Massimiliano Mantione  <massi@ximian.com>
2517
2518         * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
2519         mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
2520         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
2521         Removed MONO_INST_BRLABEL from the instruction flags, and the
2522         remaining code that used it, because we do not support branches inside
2523         basic blocks (and branch target labels) anymore.
2524         * Makefile.am: As part of the above cleanup, remove reference to
2525         BURG files which don't exist anymore.
2526
2527 2009-05-14  Zoltan Varga  <vargaz@gmail.com>
2528
2529         * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
2530         osx.
2531
2532         * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
2533         to use mono_arch_throw_corlib_exception.
2534
2535         * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use 
2536         mono_arch_throw_corlib_exception for throwing corlib exceptions.
2537
2538         * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
2539         domain mempool.
2540
2541         * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
2542
2543         * aot-compiler.c: Emit a local symbol prefixed with the assembly name 
2544         for the got to make debugging easier and to avoid confusing it with the
2545         system got.
2546         
2547         * aot-compiler.c (emit_method_code): Emit a C style symbol for each
2548         method so a breakpoint can be set when using gdb.
2549
2550 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
2551
2552         * aot-compiler.c (mono_aot_method_hash): Implement this properly based
2553         on mono_method_get_imt_slot ().
2554
2555         * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
2556         num_decodes variables.
2557
2558         * aot-compiler.c (mono_aot_method_hash): Revert part of the last
2559         change as it doesn't seem to work.
2560         
2561         * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
2562         wrappers.
2563
2564 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
2565
2566         * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill 
2567         MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
2568
2569         * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
2570         builder when using full aot.
2571
2572         * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
2573         here, it is already handled.
2574         
2575         * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
2576         correctly for IMT.
2577
2578         * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
2579
2580         * mini-arm.h: Enable IMT for full aot.
2581         
2582         * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
2583         arch doesn't support it.
2584
2585         * mini.c (mini_init): Don't disable IMT for full aot if the
2586         architecture supports it.
2587
2588         * mini.h (MonoAotTrampoline): New enum containing the different types
2589         of 'numerous' trampolines.
2590         (MONO_AOT_FILE_VERSION): Bump this.
2591
2592         * aot-compiler.c aot-runtime.c: Unify the handling of specific and
2593         static rgctx trampolines. Add support for full-aot IMT thunks.
2594
2595         * mini-amd64.h: Enable IMT for full aot.
2596
2597         * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
2598         to exclude tests belonging to a category.
2599
2600         * generics.cs: Mark some tests with a !FULLAOT category.
2601
2602         * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
2603         generics tests.
2604
2605 2009-05-11  Zoltan Varga  <vargaz@gmail.com>
2606
2607         * aot-compiler.c (emit_and_reloc_code): Move the implementation of
2608         MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
2609         (emit_plt): Fix a warning.
2610
2611 2009-05-10  Zoltan Varga  <vargaz@gmail.com>
2612
2613         * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
2614         back into aot-compiler.c to a place where the other functions shared by
2615         the runtime and aot compiler are.
2616         
2617         * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
2618         as done previously, instead of in MonoAotFileInfo, since pointers might have
2619         alignment requirements.
2620
2621         * mini.h: Bump AOT file format version.
2622
2623 2009-05-10  Miguel de Icaza  <miguel@novell.com>
2624
2625         * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
2626         that is used at runtime from the aot-compiler.c, this makes it
2627         work on setups that remove the AOT compiler from the output
2628         image. 
2629
2630 2009-05-09  Zoltan Varga  <vargaz@gmail.com>
2631
2632         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
2633         PPC.
2634
2635         * mini-ppc.h: Enable static rgctx trampolines for ppc.
2636
2637         * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
2638
2639         * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific 
2640         stuff to mono_arch_decompose_long_opts ().
2641         (mono_decompose_opcode): Remove some dead code.
2642
2643 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
2644
2645         * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
2646         cmethod can be null for quite a some reasons.
2647
2648 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
2649
2650         * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
2651
2652 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
2653
2654         * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
2655
2656 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
2657
2658         * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
2659         (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
2660         whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
2661         calls returning structures by addr on amd64.
2662
2663         * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
2664
2665         * iltests.il.in: Restructure the tail call tests a bit.
2666         
2667 2009-05-07  Zoltan Varga  <vargaz@gmail.com>
2668
2669         * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
2670         for virtual methods too.
2671
2672 2009-05-06  Raja R Harinath  <harinath@hurrynot.org>
2673
2674         * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
2675         due to regression in verifying System.dll.
2676
2677 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
2678
2679         * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
2680         in dynamic methods.
2681
2682         * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
2683         instances.
2684
2685         * aot-compiler.c aot-runtime.c: Use our own hash function instead of
2686         g_str_hash () which can change.
2687
2688         * driver.c (mini_regression): Disable optimizations not supported by
2689         the cpu. Fixes #500019.
2690
2691         * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
2692         build.
2693
2694 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
2695
2696         * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
2697         to the latest LLVM code.
2698
2699 2009-05-05  Zoltan Varga  <vargaz@gmail.com>
2700
2701         * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
2702
2703 2009-05-04  Zoltan Varga  <vargaz@gmail.com>
2704
2705         * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on 
2706         x86/amd64.
2707
2708         * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
2709         no longer saving offsets, so just save the patch types along with the other
2710         info.
2711         * aot-runtime.c (load_patch_info): Update after the changes to 
2712         encode_patch_list ().
2713         (decode_got_entry): Removed, merged into load_patch_info ().
2714         (is_shared_got_patch): Removed, call the same function from
2715         aot-compiler.c.
2716
2717         * mini.h: Bump aot file format version.
2718         
2719         * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
2720         half-finished no-dlsym code.
2721
2722         * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
2723         option.
2724
2725         * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the 
2726         MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
2727
2728 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
2729
2730         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
2731         buffer length to work with AOT code.
2732
2733         * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
2734         ldfld/stfld opcodes.
2735
2736         * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
2737         as it is not used.
2738
2739         * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
2740
2741         * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
2742
2743         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
2744         LLVM API.
2745
2746         * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
2747         if needed. Don't decompose long operations when using llvm.
2748
2749 2009-05-01  Zoltan Varga  <vargaz@gmail.com>
2750
2751         * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
2752         PAGESIZE constant.
2753
2754         * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
2755
2756 2009-05-03  Martin Baulig  <martin@ximian.com>
2757
2758         * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
2759         mono_debugger_insert_method_breakpoint() since the class init
2760         handler we're inserting at the top of the method already gives us
2761         a notification.
2762
2763 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
2764
2765         * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
2766         to mono_arch_decompose_long_opts () for x86 and arm.
2767
2768 2009-04-29  Zoltan Varga  <vargaz@gmail.com>
2769
2770         * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
2771         TARGET_AMD64 here.
2772
2773 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
2774
2775         * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
2776         JIT code.
2777
2778 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
2779
2780         * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
2781         number of trampolines used in full-aot mode.
2782
2783         * aot-compiler.c: Add an ntrampolines option to set the number of 
2784         trampolines emitted in full-aot mode.
2785
2786 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
2787
2788         * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
2789         a volatile load. Get rid of get_tempname (), llvm assigns names
2790         automatically.
2791
2792         * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
2793         builder function.
2794
2795         * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
2796         a value.
2797
2798         * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
2799         level 1.
2800
2801         * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
2802         to the same register as a fixed sreg2. Fixes #497271.
2803
2804         * iltests.il.in: Add a new test.
2805
2806 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
2807
2808         * mini-amd64.c: Use moves instead of pushes for passing arguments on the
2809         stack, since pushes complicate exception handling.
2810
2811         * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
2812         the stack if they are passed using moves.
2813
2814         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
2815
2816         * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
2817         when using llvm.
2818
2819         * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the 
2820         icalls themselves. Convert arguments of FCOMPARE. Convert the destination
2821         of FMOVE if it is an R4.
2822
2823 2009-04-25  Zoltan Varga  <vargaz@gmail.com>
2824
2825         * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
2826
2827         * mini.h (LLVMCallInfo): New structure to store calling convention 
2828         information for the LLVM back end similar to the CallInfo structures in 
2829         the back-ends.
2830
2831         * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
2832         call information in a format usable by LLVM.
2833         (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
2834
2835         * method-to-ir.c (mono_emit_call_args): Emit calls using 
2836         mono_llvm_emit_call () when compiling using LLVM.
2837
2838         * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
2839         comments to all functions. Fix memory leaks. Add a public init/cleanup
2840         function.
2841
2842         * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
2843
2844         * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
2845         mono_array_new_va () jit icall.
2846         
2847 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
2848
2849         * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
2850         multiple machine description files to be specified.
2851         * mini-ops.h: fixes for cross-compilation.
2852
2853 2009-04-22  Miguel de Icaza  <miguel@novell.com>
2854
2855         * aot-runtime.c (make_writable): Use mono_mprotect to simplify
2856         some porting work.
2857
2858 2009-04-22  Zoltan Varga  <vargaz@gmail.com>
2859
2860         * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
2861         to prevent asserts in various passes. Fixes #497220.
2862
2863 2009-04-21  Zoltan Varga  <vargaz@gmail.com>
2864
2865         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
2866         a racy assert.
2867
2868         * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
2869         table to avoid duplicates.
2870
2871         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2872         
2873         * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
2874         option is used.
2875
2876 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
2877
2878         * mini.c (mini_method_verify): Fail fulltrust code if the exception
2879         is for method or field access.
2880
2881 2009-04-20  Zoltan Varga  <vargaz@gmail.com>
2882
2883         * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
2884         a Value to stdout.
2885
2886         * mini-llvm.c (mono_llvm_emit_method): Use it.
2887         
2888         * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
2889         (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
2890         on volatile values.
2891
2892         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for 
2893         synchronized methods.
2894
2895         * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
2896
2897         * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
2898
2899         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
2900         OP_LOADI8_MEM.
2901
2902         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
2903         allowing some options to be set dynamically.
2904
2905 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
2906
2907         * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
2908         unconditional branch.
2909
2910         * mini.h (MonoTrampolineType): Add new trampoline type 
2911         'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
2912         compiled code.
2913
2914         * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline 
2915         function.
2916
2917         * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
2918         creation function.
2919
2920         * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
2921         is enabled. Instead, use the llvm vcall trampoline.
2922         
2923         * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
2924
2925         * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
2926         
2927         * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
2928         functions.
2929
2930         * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of 
2931         MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
2932
2933         * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
2934         OP_IA64_CSET opcode.
2935
2936         * mini.c: Fix a warning.
2937
2938         * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
2939         THROW to the appropriate llvm type.
2940
2941 2009-04-18  Zoltan Varga  <vargaz@gmail.com>
2942
2943         * mini.c (mini_method_compile): Add statistics for methods JITted
2944         with/without LLVM.
2945
2946 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
2947
2948         * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
2949         OP_IA64_CMP_<cond>_IMM opcodes.
2950
2951 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
2952
2953         * mini-llvm.c (emit_cond_system_exception): Implement throwing of
2954         corlib exceptions.
2955
2956         * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
2957         correctly.
2958
2959         * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
2960         GENERICINST.
2961
2962 2009-04-17  Atsushi Enomoto  <atsushi@ximian.com>
2963
2964         * mini-exceptions.c : add thread id to EXCEPTION trace message.
2965
2966 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
2967
2968         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
2969         support.
2970
2971         * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
2972         rgctx invoke trampolines for x86.
2973
2974         * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
2975         indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
2976         (mono_arch_get_vcall_slot): Simplify this.
2977
2978 2009-04-16  Zoltan Varga  <vargaz@gmail.com>
2979
2980         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
2981         mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
2982
2983 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
2984
2985         * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx 
2986         trampolines for ARM. Add full-aot support for delegate invokes for ARM.
2987
2988         * mini-trampolines.c (mono_magic_trampoline): Fix the build.
2989
2990         * liveness.c (visit_bb): Remove a needless assert.
2991
2992 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
2993
2994         * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
2995         full aot support to the arch specific code.
2996
2997         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
2998
2999         * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
3000
3001         * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
3002         
3003         * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
3004         collect information about the delegate invoke impl trampolines.
3005
3006         * mini.h (MonoAotTrampInfo): New structure collecting the information needed
3007         to save trampolines during full-aot mode.
3008
3009         * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
3010         creation function which returns a trampoline which sets the rgctx
3011         argument.
3012         (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
3013         wrapper if possible.
3014         (mono_delegate_trampoline): Ditto.
3015
3016         * mini.c (mono_jit_runtime_invoke): Ditto.
3017
3018         * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
3019         
3020         * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
3021
3022         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3023         
3024 2009-04-12  Zoltan Varga  <vargaz@gmail.com>
3025
3026         * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
3027         just setting the opcode to OP_NOP.
3028
3029 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
3030
3031         * mini.c (mini_method_compile): Put the last change inside an 
3032         #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
3033         
3034         * mini.c (mini_method_compile): Disable sharing of stack slots/registers
3035         and extend live ranges to cover the whole method when using xdb.
3036
3037         * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
3038         do it in the trampolines.
3039
3040         * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
3041         needed.
3042
3043         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
3044         
3045         * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
3046         call code in full-aot mode since IMT is disabled there.
3047         (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
3048         new JIT no longer has that restriction.
3049
3050         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3051
3052         * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
3053         a more compact format.
3054         (mono_aot_wrapper_name): New function to return a unique name for a
3055         wrapper method, also used by the AOT runtime.
3056
3057         * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
3058         aot-compiler.c.
3059
3060         * aot-compiler.c (add_generic_class): Add the helper methods from T[]
3061         when a ICollection<T> etc is encountered.
3062         (add_generic_instances): Process method arguments/locals too.
3063         (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
3064         trampoline names.
3065
3066         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
3067         
3068 2009-04-10  Zoltan Varga  <vargaz@gmail.com>
3069
3070         * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
3071
3072         * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
3073
3074         * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
3075         representing the result of the decomposition. Nullify instructions
3076         instead of setting them to OP_NOP since nops can't have registers
3077         set.
3078
3079 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
3080
3081         * aot-compiler.c (mono_compile_assembly): Split this huge function into
3082         smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
3083         info. Strip 'mapping symbols' on ARM.
3084
3085         * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
3086         
3087         * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
3088         this with the native genmdesc.
3089
3090 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
3091
3092         * aot-runtime.c:  Fixing the MSVC build.
3093
3094         Code is contributed under MIT/X11 license.
3095
3096 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
3097
3098         * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since 
3099         JITted code depends on it.
3100
3101 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
3102
3103         * aot-compiler.c: Use new MonoGenericParam accessors.
3104
3105 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
3106
3107         Reduce memory usage and improve correctness wrt MonoGenericParam
3108         * aot-runtime.c (decode_klass_ref): Simplify generic parameter
3109         handing.  Avoid allocating MonoGenericParams, but use the ones in
3110         the container itself.
3111
3112 2009-04-07  Miguel de Icaza  <miguel@novell.com>
3113
3114         * tasklets.c: Return exceptions in the out argument.
3115
3116 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
3117
3118         * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
3119         opcode. Use pointer types in more places instead of casting them to 
3120         integers.
3121
3122         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
3123         optimizations.
3124         (mono_llvm_optimize_method): New helper function to optimize a method.
3125
3126         * method-to-ir.c (mono_emit_widen_call_res): Extract the call result 
3127         widening code so it could be called from more places.
3128         (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
3129         code paths in the call opcodes.
3130
3131 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
3132
3133         * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
3134
3135 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
3136
3137         * dwarfwriter.c: Use _ to separate class name 
3138         components as gdb can't handle '.'. Represent reference variables
3139         as 'class <NAME>&'.
3140         
3141         * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
3142
3143         * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
3144         
3145         * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
3146
3147         * gc-test.cs: New file with GC stack marking tests.
3148         
3149         * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
3150         negative numbers for vfp.
3151
3152         * basic-float.cs: Add a test.
3153         
3154 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
3155
3156         * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
3157
3158 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
3159
3160         * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
3161         part of tasklet/continuation support.
3162
3163 2009-04-05  Zoltan Varga  <vargaz@gmail.com>
3164
3165         * mini-llvm.c (mono_llvm_emit_method): Move the handling of
3166         amd64 opcodes inside an ifdef.
3167
3168         * dwarfwriter.c: Emit inheritance information for classes, emit fields
3169         of complex types.
3170         
3171         * dwarfwriter.c (emit_type): Emit the class info for classes.
3172
3173 2009-04-04  Zoltan Varga  <vargaz@gmail.com>
3174
3175         * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
3176
3177         * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
3178
3179         * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
3180
3181         * ssa.c (mono_ssa_compute): Fix some memory leaks.
3182
3183 2009-04-03  Zoltan Varga  <vargaz@gmail.com>
3184
3185         * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
3186
3187         * mini-llvm.c: Update comments.
3188
3189         * mini.h (COMPILE_LLVM): New macro.
3190
3191         * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
3192
3193         * ssa.c (mono_ssa_compute): Ditto.
3194         
3195         * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
3196         the unwind ops from a DWARF FDE.
3197
3198         * mini-llvm.c: Implement generation of unwind info for LLVM compiled
3199         methods by extracting the dwarf unwind ops from the unwind info generated
3200         by LLVM.
3201         
3202         * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
3203         calls.
3204
3205         * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
3206         addressing modes.
3207
3208 2009-04-02  Zoltan Varga  <vargaz@gmail.com>
3209
3210         * Makefile.am (llvm_sources): Enable this.
3211
3212         * mini.c (mini_method_compile): Add support for compiling with LLVM, 
3213         failing back to the JIT if something cannot be handled.
3214
3215         * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
3216         compiling with LLVM.
3217
3218         * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
3219         compiling with LLVM.
3220
3221         * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when 
3222         compiling with LLVM.
3223
3224         * mini-ops.h: Add a few opcodes needed by LLVM.
3225
3226         * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
3227         has no unwind info.
3228
3229         * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
3230         backend.
3231
3232         * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
3233
3234         * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
3235
3236 2009-04-01  Mark Probst  <mark.probst@gmail.com>
3237
3238         * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
3239         ridiculously large methods.
3240
3241 2009-03-31  Martin Baulig  <martin@ximian.com>
3242
3243         * debug-debugger.c (debugger_remove_breakpoint): Call
3244         mono_debugger_remove_class_init_callback ().
3245
3246 2009-03-31  Zoltan Varga  <vargaz@gmail.com>
3247
3248         * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
3249         right before emitting code, not at the start.
3250
3251         * mini.c (mono_postprocess_patches): Extract this into a separate function
3252         from mono_codegen ().
3253
3254         * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
3255         byref types correctly.
3256
3257 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
3258
3259         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
3260         by the last change.
3261
3262 2009-03-29  Zoltan Varga  <vargaz@gmail.com>
3263
3264         * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before 
3265         indirect calls, this avoids problems where get_vcall_slot () would get
3266         confused by the native code for the instruction preceeding the call.
3267         (mono_arch_get_vcall_slot): Simplify this.
3268         (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
3269
3270         * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
3271         register allocator now seems to depend on them instead of the data in
3272         cpu-<ARCH>.md.
3273
3274         * mini.c (mini_method_compile): Throw the correct type of exception if
3275         mono_method_get_header () fails because of a loading error.
3276
3277 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
3278
3279         * mini.c (mini_method_compile): Clear the loader error if the method
3280         header cannot be decoded.
3281
3282         * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual 
3283         interface methods on proxies correctly.
3284
3285         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
3286         this argument for vtype methods. Add precise liveness info for arguments.
3287
3288         * mini-codegen.c (mono_print_ins_index): Print the vreg of the
3289         LIVERANGE_START/END opcodes.
3290
3291         * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
3292         for arguments and values in registers.
3293
3294 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
3295
3296         * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
3297         return a valuetype. Fixes #487518.
3298
3299         * iltests.il: Add a test.
3300         
3301         * aot-compiler.c: Use mono_thread_create () to create helper threads.
3302
3303         * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
3304         closed over a null reference correctly.
3305
3306 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
3307
3308         * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
3309
3310 2009-03-25  Mark Probst  <mark.probst@gmail.com>
3311
3312         * mini-codegen.c (mono_local_regalloc): Don't let sregs get
3313         allocated to the same registers as fixed sregs.
3314
3315 2009-03-24  Mark Probst  <mark.probst@gmail.com>
3316
3317         * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
3318         ATOMIC_CAS_IMM ops.
3319
3320         * method-to-ir.c: Handle more cases for
3321         Interlocked.CompareExchange.
3322
3323         * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
3324         mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
3325         ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
3326
3327 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
3328
3329         * aot-runtime.c (decode_method_ref): Fix a warning.
3330
3331         * unwind.c (mono_unwind_frame): Ditto.  
3332
3333 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
3334
3335         * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
3336         (mono_compile_assembly): Enable the binary writer for full-aot as well.
3337
3338         * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
3339         fix the handling of large values in the ALU_PC_G0_NC relocation.
3340
3341 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
3342
3343         * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
3344
3345 2009-03-22  Mark Probst  <mark.probst@gmail.com>
3346
3347         * method-to-ir.c (mono_spill_global_vars): Support for ternary
3348         ops.
3349
3350 2009-03-22  Mark Probst  <mark.probst@gmail.com>
3351
3352         * method-to-ir.c: MINI_OP3 needs a comma.
3353
3354         * method-to-ir.c, mini.h, mini.c: Remove
3355         mono_init_op_sreg_counts ().
3356
3357 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
3358
3359         * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
3360         OP_JMP.
3361         
3362         * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
3363         assertion.
3364
3365         * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
3366
3367         * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
3368         code somewhat.
3369
3370 2009-03-21  Mark Probst  <mark.probst@gmail.com>
3371
3372         * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
3373         liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
3374         mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
3375         operations.
3376
3377 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
3378
3379         * driver.c: Change location of gc_wrapper.h.
3380
3381         * method-to-ir.c (mono_find_block_region): Handle try clauses nested
3382         inside finally clauses correctly. Fixes #485721.
3383
3384         * mini.c (mono_find_spvar_for_region): This needs to handle try regions
3385         after the change above.
3386
3387         * exceptions.cs: Add a test.
3388         
3389 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
3390
3391         * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
3392
3393         * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
3394         into cfg->used_int_regs, it is not needed with the dwarf unwinder.
3395         (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
3396
3397         * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
3398         the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
3399
3400 2009-03-19  Sebastien Pouliot  <sebastien@ximian.com>
3401
3402         * method-to-ir.c: Allow CoreCLR to throw FieldAccessException. 
3403         Simplify logic for ensure_method_is_allowed_to_call_method. 
3404         Handle wrappers on callers.
3405
3406 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
3407
3408         * Makefile.am (fullaotcheck): Don't run the generics tests, some of
3409         them don't run yet.
3410
3411         * basic-simd.cs: Fix the names of some test methods.
3412
3413 2009-03-18  Geoff Norton  <gnorton@novell.com>
3414
3415         * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
3416
3417 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
3418
3419         * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
3420
3421 2009-03-17  Jb Evain  <jbevain@novell.com>
3422
3423         * driver.c: remove now uneeded call to mono_gc_base_init before
3424         mono_profiler_load.
3425
3426 2009-03-17  Jb Evain  <jbevain@novell.com>
3427
3428         * dwarfwriter.c (token_handler): handle more cases.
3429
3430 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com> 
3431
3432         * method-to-ir.c: Remove more dead code (that was required only
3433         because of method_is_safe). Fix compiler warnings.
3434
3435 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
3436
3437         * method-to-ir.c: Remove unneeded/useless method_is_safe
3438         http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
3439
3440 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
3441
3442         * mini.c (mini_method_compile): Print the method been compiled with
3443         verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
3444         for people not familiar with the runtime.
3445
3446 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
3447
3448         * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
3449         a managed object which is later put into a GList. Return its class instead.
3450
3451         * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
3452         stack slots when using sgen.
3453
3454 2009-03-16  Zoltan Varga  <vargaz@gmail.com>
3455
3456         * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
3457
3458 2009-03-14  Zoltan Varga  <vargaz@gmail.com>
3459
3460         * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
3461         > so it works on the first vreg as well.
3462
3463 2009-03-13  Zoltan Varga  <vargaz@gmail.com>
3464
3465         * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
3466         trigger randomly.
3467
3468         * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
3469         
3470         * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
3471         implement GArray.
3472
3473 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
3474
3475         * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
3476         native->IL offset mapping.
3477
3478 2009-03-11  Zoltan Varga  <vargaz@gmail.com>
3479
3480         * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
3481
3482         * basic.cs: Add a test.
3483
3484 2009-03-11  Mark Probst  <mark.probst@gmail.com>
3485
3486         * mini-x86.c (mono_arch_output_basic_block): Use different
3487         registers in case the ones we want to overwrite are used by the
3488         other operand.  Fixes regression in #480807.
3489
3490 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
3491
3492         * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
3493
3494         * dwarfwriter.c (emit_line_number_info): The line number info for
3495         IL code was off by one. Fix that.
3496
3497         * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
3498         stack.
3499
3500 2009-03-09  Mark Probst  <mark.probst@gmail.com>
3501
3502         Contributed under the terms of the MIT/X11 license by Steven
3503         Munroe <munroesj@us.ibm.com>.
3504
3505         * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
3506         Fixes #483462.
3507
3508 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
3509
3510         * dwarfwriter.c (token_handler): Decode method references in non-wrappers
3511         as well.
3512
3513 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
3514
3515         * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
3516         the delegate ctor handling code. Fixes #482638.
3517         
3518         * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
3519         #481458.
3520
3521         * iltests.il.in: Add a test.
3522         
3523         * mini-darwin.c (mono_chain_signal): Remove this, it is already in
3524         mini-posix.c.
3525
3526 2009-03-05  Mark Probst  <mark.probst@gmail.com>
3527
3528         * mini-trampolines.c (mono_create_jump_trampoline): If the method
3529         is shared generic code, return the trampoline, even if the method
3530         has already been compiled.  Fixes #479763.
3531
3532         * mini.c, mini.h: New function
3533         mono_jit_find_compiled_method_with_jit_info() which is the same as
3534         mono_jit_find_compiled_method() but also returns the jit info.
3535
3536 2009-03-05  Mark Probst  <mark.probst@gmail.com>
3537
3538         * method-to-ir.c (mono_method_to_ir): Only force the vtable var
3539         for methods which actually have one.  For all other methods, make
3540         sure the this argument var is live the whole method.
3541
3542         * mini.c (mini_method_compile): Every shared method has a
3543         this/vtable/mrgctx info.  Fixes #480807.
3544
3545 2009-03-05  Mark Probst  <mark.probst@gmail.com>
3546
3547         * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
3548         generic/imt thunks where some entries branch through the vtable,
3549         while other entries branch directly.
3550
3551 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
3552
3553         * mini-darwin.c (mono_chain_signal): Define this to fix the build.
3554
3555         * mini-windows.c: Ditto.
3556         
3557         * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
3558         ctors.
3559
3560 2009-03-04  Zoltan Varga  <vargaz@gmail.com>
3561
3562         * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
3563         down an assert.
3564
3565 2009-03-04  Mark Probst  <mark.probst@gmail.com>
3566
3567         * method-to-ir.c: Don't inline methods that use JMP.  Fixes
3568         #481403.
3569
3570 2009-03-04  Mark Probst  <mark.probst@gmail.com>
3571
3572         * exceptions-x86.c: Include debug-mini.h - fixes build.
3573
3574 2009-03-04  Martin Baulig  <martin@ximian.com>
3575
3576         * debug-mini.c: Clean up the exception API and add documentation.
3577         (mono_debugger_handle_exception): New public method; this is
3578         called when throwing an exception or encountering an unhandled one.
3579         (mono_debugger_call_exception_handler): Formerly known as
3580         mono_debugger_handle_exception(); this is used to tell the
3581         debugger that we're about to invoke an exception handler.
3582
3583 2009-03-04  Martin Baulig  <martin@ximian.com>
3584
3585         * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
3586         ../metadata/mono-debug-debugger.c; save and reset exception state.
3587
3588 2009-03-02  Martin Baulig  <martin@ximian.com>
3589
3590         * debug-mini.c: Moved the debugger exception handling here from
3591         ../metadata/mono-debug-debugger.c.
3592
3593         * debug-mini.h
3594         (MonoDebuggerExceptionAction): New exception typedef.
3595
3596         * debug-mini.c
3597         (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
3598
3599         * exceptions-amd64.c
3600         (mono_amd64_throw_exception): Use the new debugger exception
3601         handling code.
3602
3603         * mini-exceptions.c
3604         (mono_handle_exception_internal): Don't call
3605         mono_debugger_unhandled_exception() here.
3606
3607 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
3608
3609         * mini.c aot-compiler.c: Update after the changes to 
3610         mono_marshal_get_runtime_invoke ().
3611
3612         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): 
3613         Virtual generic methods might not have method->slot set, work around
3614         that.
3615
3616         * generics.cs: Add a test.
3617
3618 2009-03-02  Geoff Norton  <gnorton@novell.com>
3619
3620         * mini.c:
3621         * driver.c: Allow signal chaining of SIGFPE as well.
3622
3623 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
3624
3625         * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
3626         this since it now receives the method not its generic context in the
3627         IMT reg.
3628
3629         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
3630         generic/imt thunks where some entries branch through the vtable, while
3631         other entries branch directly.
3632
3633         * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
3634
3635         * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call 
3636         support for interface methods as well.
3637
3638         * mini-trampolines.c: Add support for virtual generic methods in interfaces
3639         using the normal IMT thunks.
3640
3641         generics.cs: Add new tests.
3642         
3643         * method-to-ir.c (mono_method_to_ir): Pass the method instead of
3644         the generic inst to the generic imt thunks. This fixes AOT support, 
3645         improves consistency with the normal IMT thunks, and makes it easier to
3646         add support for interface generic virtual methods later.
3647
3648         * mini-trampolines.c (mono_magic_trampoline): Ditto.    
3649         
3650 2009-02-28  Zoltan Varga  <vargaz@gmail.com>
3651
3652         * driver.c (mono_set_signal_chaining): New public API function to enable
3653         signal chaining on POSIX platforms.
3654
3655         * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland 
3656         (si@lindenlab.com) to implement signal chaining. The original patch was
3657         contributed under the MIT X/11 license:
3658         https://bugzilla.novell.com/show_bug.cgi?id=318894
3659
3660 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
3661
3662         * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
3663         too until it can be made to run on amd64.
3664
3665 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
3666
3667         * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
3668         to  get_generic_context_from_code () + get_call_info () if possible.
3669
3670 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
3671
3672         * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
3673         suspend-on-sigsegv functionality.
3674
3675         * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
3676         to suspend when a native SIGSEGV is received. This is useful for debugging
3677         crashes which don't happen under gdb, since a live process contains more
3678         information than a core file.
3679
3680         * mini-exceptions.c (mono_print_thread_dump): Use 
3681         MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
3682
3683         * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
3684
3685         * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
3686         
3687         * basic-float.cs: Disable the tests which currently fail on amd64.
3688
3689         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null 
3690         value to mono_arch_patch_callsite () to fix crashes.
3691         
3692         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
3693
3694 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
3695
3696         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
3697         nop code by patching the call address to point to the nullified class init
3698         trampoline, as the former does not seem to be safe on SMP machines.
3699
3700 2009-02-23  Mark Probst  <mark.probst@gmail.com>
3701
3702         * mini-ops.h: Fix the argument types for a few x86 opcodes where
3703         they were wrong.
3704
3705 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
3706
3707         * basic-float.cs basic-calls.cs: Fix warnings.
3708
3709 2009-02-22  Mark Probst  <mark.probst@gmail.com>
3710
3711         * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
3712         correct frame pointer in the LMF.  Should fix #478394.
3713
3714 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
3715
3716         * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
3717
3718         * image-writer.c: Make the binary writer less verbose.
3719
3720 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
3721
3722         * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
3723         are called from runtime invoke wrappers.
3724
3725 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
3726
3727         * cpu-ppc.md (store_memindex): Increase the size of this.
3728
3729 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
3730
3731         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3732
3733         * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
3734
3735         * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
3736         OP_LCONV_TO_R_UN.
3737
3738         Last fix for of #467201.
3739
3740
3741 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
3742
3743         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3744
3745         * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
3746         and long_conv_to_r8_2:
3747
3748         Fixed part of #467201.
3749
3750 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
3751
3752         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3753
3754         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
3755         conversion to 32 bits.
3756
3757         * cpu-x86.md: Increase the size of int_conv_to_r4.
3758
3759         * basic-float.cs: Add a test for this.
3760
3761         Fixed part of #467201.
3762
3763 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
3764
3765         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3766
3767         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
3768         conversion to 64 bits.
3769
3770         * basic-float.cs: Add a test for this.
3771
3772         Fixed part of #467201.
3773
3774 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
3775
3776         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3777
3778         * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
3779         This behavior is compatible with MS.
3780
3781         * iltest.il.in: Add a test for this.
3782
3783         Fixed part of #467201.
3784
3785 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
3786
3787         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3788
3789         * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
3790         change the precision of the value.
3791
3792         * cpu-x86.md: Define len for float_conv_to_r4.
3793
3794         * basic-float.cs: Add a test for this.
3795
3796         Fixed part of #467201.
3797
3798 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
3799
3800         * mini.c: Adjust locking order to the new semantics where the loader lock
3801         comes first.
3802
3803 2009-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
3804
3805         * aot-runtime.c:
3806         * mini-amd64.c:
3807         * mini-arm.c:
3808         * mini-ia64.c:
3809         * mini-mips.c:
3810         * mini-ppc.c:
3811         * mini-sparc.c:
3812         * mini-trampolines.c:
3813         * mini-x86.c:
3814         * mini.c:
3815         * tramp-alpha.c:
3816         * tramp-amd64.c:
3817         * tramp-arm.c:
3818         * tramp-hppa.c:
3819         * tramp-ia64.c:
3820         * tramp-mips.c:
3821         * tramp-ppc.c:
3822         * tramp-s390.c:
3823         * tramp-s390x.c:
3824         * tramp-sparc.c:
3825         * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
3826
3827 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
3828
3829         * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
3830         as it is incorrect.
3831
3832 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
3833
3834         * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
3835         for cctors if needed.
3836
3837 2009-02-17  Mark Probst  <mark.probst@gmail.com>
3838
3839         * mini-ppc.c: Fix build on Darwin.
3840
3841 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
3842
3843         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
3844         version instead of 3 as valgrind doesn't like version 3.
3845
3846         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3847
3848         * aot-compiler.c (mono_aot_method_hash): New function to return a hash
3849         usable for hashing methods.
3850         (emit_extra_methods): Use the new hash to avoid putting every method in the
3851         same hash bucket.
3852
3853         * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
3854
3855         * aot-runtime.c (can_method_ref_match_method): New function to quickly check
3856         whenever a method ref could match a method.
3857         
3858         * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
3859         test to fail.
3860         
3861         * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded 
3862         methods refs.
3863
3864         * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
3865
3866         * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
3867         the encoding buffer.
3868
3869         * method-to-ir.c (mono_method_check_inlining): Avoid calling 
3870         mono_method_get_header () on inflated methods as an optimization.
3871
3872 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
3873
3874         * ssa.c (fold_ins): Fix another crash if the instruction following the
3875         switch was optimized away.
3876
3877 2009-02-16  Mark Probst  <mark.probst@gmail.com>
3878
3879         Contributed under the terms of the MIT/X11 license by Steven
3880         Munroe <munroesj@us.ibm.com>.
3881
3882         * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
3883
3884 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
3885
3886         * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
3887         around the mono_domain_alloc calls, it is now done by the functions
3888         themselves.
3889
3890         * aot-compiler.c (compile_method): Only add wrappers referenced by
3891         the method if compiling with full AOT.
3892         (mono_compile_assembly): Error out if --aot=full is specified on
3893         a platform where it is not supported.
3894
3895         * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
3896         on ARM too.
3897
3898         * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
3899         AOT support.
3900
3901         * aot-runtime.c (load_named_code): Handle 
3902         mono_arm_throw_exception_by_token.
3903
3904         * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
3905
3906         * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
3907         unaligned.
3908
3909         * Makefile.am (fullaotcheck): Exit if a test fails.
3910
3911         * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
3912         on ARM.
3913         (mono_compile_assembly): Handle the assembler failing.
3914
3915         * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
3916         accepting subsections of .bss.
3917
3918         * ssa.c (visit_inst): Fix a crash if the instruction following a switch
3919         was optimized away.
3920
3921         * aot-compiler.c: Remove some unused includes.
3922         
3923         * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
3924         now in MonoImageWriter.
3925
3926         * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
3927         code sequence which matches a non-virtual call. Fixes #472654.
3928
3929 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
3930
3931         * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
3932         xdebug code.
3933         
3934         * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
3935         use the image/dwarf writers directly.
3936
3937         * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
3938         field.
3939
3940         * aot-compiler.c (MonoAotCompile): Remove fields which are now in
3941         MonoDwarfWriter.
3942
3943         * image-writer.h: Fix some typos.
3944
3945         * dwarfwriter.h dwarfwriter.c: New files.
3946         
3947         * aot-compiler.c: Extract the DWARF info writing functionality into a 
3948         separate module.
3949
3950         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
3951         argument to return unwind info.
3952
3953         * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
3954
3955         * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
3956         
3957         * aot-runtime.c (decode_method_ref): Add a case for 
3958         MONO_AOT_METHODREF_WRAPPER_NAME.
3959
3960         * mini.h: Add constants for the magic numbers used in encode_method_ref ()
3961         for AOT.
3962
3963         * aot-compiler.c (encode_method_ref): Use the new constants.
3964
3965         * aot-runtime.c (decode_method_ref): Ditto.
3966
3967         * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
3968         be compiled, not the icall itself.
3969
3970 2009-02-14  Zoltan Varga  <vargaz@gmail.com>
3971
3972         * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
3973         using decode_method_ref ().
3974
3975         * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
3976         convert it to an in32. Fixes #475859.
3977
3978         * arrays.cs: Add a test.
3979
3980 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
3981
3982         * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
3983         OP_LCONV_TO_U2.
3984
3985         * basic-long.cs: Add a test.
3986
3987 2009-02-12  Mark Probst  <mark.probst@gmail.com>
3988
3989         * mini-x86.c, mini-x86.h: Very simple frame pointer removal.  We
3990         remove the frame pointer in leaf methods which don't receive any
3991         arguments, don't throw exceptions and don't do dynamic stack
3992         allocations.
3993
3994 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
3995
3996         * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
3997         the fail_tramp changes. Hopefully fixes #475132.
3998
3999 2009-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
4000
4001         * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
4002         instead of mono_metadata_signature_dup_full.
4003
4004 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
4005
4006         * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
4007         for processing jump tables. Fixes #473787.
4008
4009 2009-02-11  Mark Probst  <mark.probst@gmail.com>
4010
4011         * mini-generic-sharing.c: mini_method_get_context() just calls
4012         mono_method_get_context_general() now.
4013
4014         * mini.c, mini.h: Moved get_object_generic_inst(),
4015         construct_object_context_for_method() and
4016         mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
4017
4018 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
4019
4020         * branch-opts.c (mono_if_conversion): Handle the case where the merged 
4021         basic block fell through to its successor bblock without a branch. Fixes
4022         #474718.
4023
4024         * iltests.il.in: Add a test.
4025         
4026         * aot-compiler.c (encode_method_ref): Encode methods of array types.
4027         (can_encode_patch): We can now handle arrays of generic parameters and
4028         array methods.
4029
4030         * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
4031
4032         * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
4033         the AOT file to avoid some #ifdefs in aot-runtime.c
4034
4035         * mini.h: Bump AOT file format version.
4036
4037 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
4038
4039         * Makefile.am (fullaotcheck): Make this run the tests.
4040
4041         * aot-compiler.c: Make the printing of skipped methods runtime configurable.
4042
4043 2009-02-10  Mark Probst  <mark.probst@gmail.com>
4044
4045         * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
4046         individually.  Fixes #473482.
4047
4048 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
4049
4050         * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
4051
4052 2009-02-09  Jeffrey Stedfast  <fejj@novell.com>
4053
4054         * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
4055         (mono_compile_assembly): Hush compile warnings about
4056         uninitialized [tmp_]outfile_name variables in the !use_bin_writer
4057         code path.
4058
4059 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
4060
4061         * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
4062
4063         * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
4064
4065         * aot-compiler.c: Fix arm support.
4066
4067         * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
4068         img_writer_emit_unset_mode () function.
4069
4070         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
4071         (mono_unwind_get_dwarf_pc_reg): Ditto.
4072
4073         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
4074         Move almost all platform specific code to a set of arch_ functions, 
4075         and document them to ease porting.
4076         
4077         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
4078
4079         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
4080
4081         * aot-compiler.c: Extract the image writing functionality into a separate
4082         module to reduce the size of this file.
4083
4084 2009-02-09  Geoff Norton  <gnorton@novell.com>
4085
4086         * mini-s390.c: Fix the signature of emit_sig_cookie.
4087
4088 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
4089
4090         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
4091
4092         * aot-runtime.c (is_shared_got_patch): Ditto.
4093
4094         * aot-runtime.c (load_named_code): Cope with the fact that 
4095         decode_got_entry () won't decode the patch fully if its corresponding got
4096         entry is already filled.
4097         
4098         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
4099         Initialize *ji.
4100         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
4101
4102         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
4103         as the moving pointer instead of 'buf' for consistency with the rest of the
4104         codebase.
4105         (mono_arch_create_monitor_exit_trampoline): Ditto.
4106
4107         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
4108         generic_class_init trampolines.
4109         (add_generic_class): Extract some code from add_generic_instances () into a
4110         separate function so it can be called from other places too.
4111         (compile_method): Call add_generic_class () for the classes of inflated methods
4112         referenced by the method.
4113         (can_encode_patch): Allow references to generic parameters.
4114
4115         * aot-runtime.c: Add support the patches required by the new trampolines.
4116         
4117         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
4118         support.
4119
4120         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
4121         full-aot support.
4122
4123         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
4124         this from get_throw_pending_exception, make the signature full aot compatible.
4125
4126         * Makefile.am (fullaotcheck): New target to run full-aot tests.
4127
4128         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
4129
4130         * exceptions.cs: Add a test.
4131
4132 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
4133
4134         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
4135         use the DWARF_DATA_ALIGN constant instead.
4136
4137         * exception-<ARCH>.c: Update after the above change.
4138
4139         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
4140         dwarf unwinder.
4141
4142         * mini-arm.c: Enable the dwarf unwinder.
4143
4144         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
4145         instead of mono_class_setup_vtable ().
4146
4147 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
4148
4149         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
4150         dwarf unwinder.
4151
4152         * mini-x86.h: Enable the dwarf unwinder.
4153
4154 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
4155
4156         Fix mcs/tests/test-7.cs
4157         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
4158         2009-02-03.
4159
4160 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
4161
4162         * mini.c (print_jit_stats): Remove some unused statistics.
4163
4164 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
4165
4166         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
4167
4168 2009-02-05  Mark Probst  <mark.probst@gmail.com>
4169
4170         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
4171         the method we get from mono_object_get_virtual_method() because
4172         that function does it properly, now.
4173
4174 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
4175
4176         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
4177         opcodes. Fixes #472775.
4178
4179 2009-02-05  Mark Probst  <mark.probst@gmail.com>
4180
4181         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
4182         fact that mono_find_jit_info() sometimes returns the context
4183         corresponding to the jit info in new_ctx.  Fixes #472600.
4184
4185 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
4186
4187         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
4188         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
4189         klass->enum_basetype directly.
4190
4191         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
4192         enum subtypes.
4193
4194         * unwind.c: Avoid 0 sized arrays.
4195
4196 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
4197
4198         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
4199         size on systems with 64k pages. Fixes #471389.
4200
4201 2009-02-04  Mark Probst  <mark.probst@gmail.com>
4202
4203         Contributed under the terms of the MIT/X11 license by Steven
4204         Munroe <munroesj@us.ibm.com>.
4205
4206         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
4207         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
4208         necessary.
4209
4210 2009-02-04  Mark Probst  <mark.probst@gmail.com>
4211
4212         Contributed under the terms of the MIT/X11 license by Steven
4213         Munroe <munroesj@us.ibm.com>.
4214
4215         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
4216         comparison fix.
4217
4218         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
4219         The trampoline can be longer on PPC64.
4220
4221 2009-02-04  Mark Probst  <mark.probst@gmail.com>
4222
4223         Contributed under the terms of the MIT/X11 license by Steven
4224         Munroe <munroesj@us.ibm.com>.
4225
4226         * mini-ppc.c: Compiler warning fixes and trivial code
4227         simplifications.
4228
4229 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
4230
4231         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
4232         ins->dreg which could be a hardware register, not a vreg.
4233
4234         * aot-compiler.c (emit_method_dwarf_info): Ditto.
4235         
4236         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
4237         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
4238
4239         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
4240         
4241         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
4242         ->dreg, that is not the vreg we are looking for.
4243
4244         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
4245
4246         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
4247         LIVERANGE_END.
4248
4249         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
4250         strange crashes.
4251
4252 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
4253
4254         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
4255
4256         * aot-compiler.c (emit_line_number_info): Fix line number emission when
4257         the line diff is 0.
4258
4259         * aot-compiler.c: Add xdebug support on x86.
4260
4261         * unwind.c: Add x86 support.
4262         
4263         * aot-compiler.c (emit_exception_debug_info): Control the emission of
4264         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
4265
4266         * mini.c (mini_method_compile): Ditto.
4267         
4268         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
4269         the variable index.
4270
4271         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
4272         which mimic .push_section/.pop_section in GAS.
4273         
4274         * aot-compiler.c: Emit precise live range information for variables.
4275
4276         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
4277
4278         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
4279         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
4280         them.
4281
4282         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
4283         the live ranges of variables.
4284
4285         * mini.h (struct MonoMethodVar): Add two fields containing the live range
4286         of the variable in terms of native offsets.
4287
4288 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
4289
4290         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
4291         
4292 2009-02-02  Mark Probst  <mark.probst@gmail.com>
4293
4294         Contributed under the terms of the MIT/X11 license by Steven
4295         Munroe <munroesj@us.ibm.com>.
4296
4297         * exceptions-ppc.c (restore_regs_from_context): Correct operand
4298         order (offset then base reg) for ppc_load_multiple_regs.
4299         (emit_save_saved_regs) Correct operand order for
4300         ppc_store_multiple_regs.
4301         (mono_arch_get_call_filter): Correct operand order for
4302         ppc_load_multiple_regs.
4303
4304         * mini-ppc.c (emit_memcpy): Fix operand order for
4305         ppc_load_reg_update and ppc_store_reg_update.
4306         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
4307         (mono_arch_emit_epilog): Correct operand order for
4308         ppc_load_multiple_regs.
4309
4310         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
4311         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
4312
4313 2009-02-02  Mark Probst  <mark.probst@gmail.com>
4314
4315         * cpu-ppc64.md: Fixed storer4_memindex length.
4316
4317 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
4318
4319         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
4320         line number info.
4321         
4322         * aot-compiler.c (emit_line_number_info): Optimize this.
4323
4324 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
4325
4326         * aot-compiler.c: Disassemble tokens in the IL disassembly.
4327         
4328         * aot-compiler.c: Add debug info for methods without debug info by
4329         emitting an IL file and having the line number info referencing that file.
4330
4331         * aot-compiler.c: Optimize the size of the generated line number info.
4332
4333         * aot-compiler.c: Emit line number info in xdebug mode.
4334
4335         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
4336         million arguments.
4337
4338 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
4339
4340         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
4341
4342         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
4343         is used.
4344
4345 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
4346
4347         * basic-calls.cs: Test for the weird crash found on arm.
4348         
4349 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
4350
4351         * cpu-arm.md: Increase the size of storer8_membase_reg and
4352         loadr8_membase_reg to 24 bytes to accomodate the extra add.
4353
4354         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
4355         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
4356         reg to LR otherwise we'll be loading/storing from just the offset.
4357
4358 2009-01-30  Miguel de Icaza  <miguel@novell.com>
4359
4360         Question: if we are storing gint32's inside the "*native_offset",
4361         should we change the signature to "gint32 *native_offset" to
4362         ensure that we do not have type definition problems?
4363         
4364         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
4365         an int * as this is what the other function expects, causes
4366         problems with Freescale's compiler that defined int32_t to be a
4367         long and makes int incompatible 
4368
4369 2009-01-30  Miguel de Icaza  <miguel@novell.com>
4370
4371         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
4372         filename conflict with bjam.
4373
4374 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
4375
4376         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
4377         as it might use decomposed ops.
4378
4379 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
4380
4381         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
4382
4383         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
4384         is defined.
4385
4386         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
4387
4388         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
4389         offsets.
4390
4391         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
4392         way registers are stored in MonoContext on arm.
4393
4394         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
4395         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
4396
4397         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
4398
4399         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
4400
4401         * mini.c (mini_init): Register mono_isfinite.
4402
4403         * jit-icalls.c (mono_isfinite): New jit icall.
4404
4405         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
4406         
4407         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
4408         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
4409         the parent frame.
4410
4411 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
4412
4413         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
4414         separate frame and stack pointers, so we must use FP to find the register
4415         spill area.
4416         The FP reg is retrieved from the MonoContext::regs array.
4417
4418 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
4419
4420         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
4421         as FPA requires it.
4422
4423 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
4424
4425         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
4426         return R4 and R8 when not running under softfloat.
4427
4428         Fixes basic-calls.exe
4429
4430 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
4431
4432         * mini-arm.c: Implement some overflow opcodes.
4433
4434 2009-01-29  Miguel de Icaza  <miguel@novell.com>
4435
4436         * ssa.c: handle another alloca.h
4437
4438         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
4439         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
4440         MONO_ARCH_USE_SIGACTION. 
4441
4442         * aot-runtime.c, mini-exceptions.c: Replace platform define with
4443         capability defines.
4444
4445         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
4446
4447         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
4448         PPC targets as sigaction does not exist on all platforms, define
4449         this on a per-platform basis.
4450
4451         Instead of erroring out if the platform is not defined, include
4452         mini-ppc-os.h, and expect that the OS specific setting provides
4453         the required information.   
4454
4455 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
4456
4457         * aot-compiler.c: Fix --enable-minimal=aot.
4458
4459 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
4460
4461         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
4462         previous change.
4463
4464 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
4465
4466         * exceptions-arm.c: Fix warnings.
4467
4468         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
4469         ARM.
4470
4471         * mini-x86.c: Fix --enable-minimal=jit build.
4472
4473         * mini.c: Really fix --enable-minimal=jit build.
4474         
4475         * mini.c (construct_object_context_for_method): Move this outside
4476         the DISABLE_JIT block to fix the --enable-minimal=jit build.
4477
4478         "Backported" of r124984 from 2.0 branch.
4479         
4480         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
4481
4482         "Backport" of r124977 + r124978 from 2.0 branch.
4483         
4484         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
4485         to avoid calling mono_exception_from_token () from the throw trampoline.
4486         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
4487         for throwing corlib exceptions, this fixes full-aot support for corlib
4488         exceptions.
4489
4490         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
4491
4492 2009-01-29  Miguel de Icaza  <miguel@novell.com>
4493
4494         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
4495         part of the changes to split the code in mini into operating
4496         system specific files.
4497
4498         This patch was done by copying mini.c to the respective files to
4499         preserve SVN history.
4500
4501 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
4502
4503         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
4504
4505 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
4506
4507         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
4508         remoting-invoke-with-check wrappers of shared methods.
4509
4510         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
4511
4512 2009-01-27  Mark Probst  <mark.probst@gmail.com>
4513
4514         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
4515         optimization if the top of stack is the last instruction in the
4516         bblock.  Otherwise it might have been used after its definition.
4517         Fixes #469742.
4518
4519 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
4520
4521         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
4522         method as well when get_vcall_slot () fails to match a code sequence.
4523
4524         * mini-arm.c: Fix the android build, which doesn't have
4525         __aeabi_read_tp.
4526
4527 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
4528
4529         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
4530         the s390x build.
4531
4532 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
4533
4534         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
4535
4536 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
4537
4538         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
4539         and put its id into jinfo->used_regs. This is only used on amd64,
4540         which is currently the only platform generating unwind info.
4541
4542         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
4543         the dwarf unwinder. This is required to correctly handle async exceptions
4544         like thread abort and stack overflows, which can happen while a method
4545         is in the middle of its prolog or epilog.
4546         
4547         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
4548         the unwind info belonging to an AOTed method.
4549
4550         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
4551         into cfg->unwind_ops.
4552         
4553         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
4554
4555         * mini.c (mini_init): Call mono_unwind_init ().
4556         (mini_cleanup): Call mono_unwind_cleanup ().
4557
4558         * unwind.c: Add functions for managing a set of unwind info entries, allowing
4559         unwind info to be shared between methods.
4560
4561         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
4562         saved in the LMF.
4563
4564         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
4565         get_throw_pending_exception () to avoid initialization races.
4566
4567         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
4568         mono_arch_exceptions_init () function.
4569
4570         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
4571
4572 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
4573
4574         * mini.c (mono_get_domain_intrinsic): New helper function.
4575         (mono_get_thread_intrinsic): Ditto.
4576
4577         * mini-arm.c mini-ia64.c: Use the new helper functions.
4578         
4579         * method-to-ir.c (mono_method_to_ir): Fix the comment for
4580         the last constrained_call change, since it is needed in the non-AOT
4581         case as well.
4582
4583         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
4584         
4585         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
4586         mono_get_lmf_addr () on arm eabi linux.
4587
4588 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
4589
4590         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
4591         code sequence which matches a non-virtual call.
4592
4593 2009-01-23  Mark Probst  <mark.probst@gmail.com>
4594
4595         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
4596         stack pointer (r1).
4597
4598 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
4599
4600         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
4601         runtime-invoke wrappers, since they are also shared based on signature.
4602
4603 2009-01-22  Mark Probst  <mark.probst@gmail.com>
4604
4605         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
4606         info from the (correct) context.
4607
4608 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
4609
4610         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
4611         
4612         * unwind.c (mono_unwind_frame): New function to unwind through a frame
4613         using dwarf unwinding info. Not yet used.
4614
4615         * mini.c (mini_init): When using xdebug, disable freeing of domains.
4616
4617 2009-01-21  Mark Probst  <mark.probst@gmail.com>
4618
4619         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
4620         descriptors.
4621
4622         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
4623         special case and handle mono_arch_delegate_invoke_impl() returning
4624         function descriptors.
4625
4626         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
4627         trampolines return function descriptors, too.
4628
4629 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
4630
4631         * method-to-ir.c (handle_alloc): Avoid generic instances in the
4632         out_of_line optimization.
4633
4634 2009-01-21  Martin Baulig  <martin@ximian.com>
4635
4636         * mini.h
4637         (MonoCompile): Added `disable_deadce_vars' to disable removing
4638         unused variables.
4639
4640         * mini.c
4641         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
4642         inside the debugger.
4643
4644         * liveness.c (mono_analyze_liveness): Don't remove any unused
4645         variables if `cfg->disable_deadce_vars' is set.
4646
4647 2009-01-21  Mark Probst  <mark.probst@gmail.com>
4648
4649         * method-to-ir.c: Only apply exception constructor optimization if
4650         the the method actually belongs to an exception class.  Fixes
4651         #467456.
4652
4653 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
4654
4655         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
4656         change inside a #ifdef __mono_ppc64__.
4657
4658         * aot-compiler.c (compile_method): Remove the previous limitation.
4659
4660         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
4661         on type variables in AOTed code.
4662         
4663         * aot-compiler.c (compile_method): Skip generic methods having type 
4664         constraints on their generic parameters.
4665
4666         * aot-compiler.c (compile_method): Check for methods which cannot be
4667         encoded inside RGCTX_FETCH patches as well.
4668
4669         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
4670         build.
4671
4672 2009-01-20  Mark Probst  <mark.probst@gmail.com>
4673
4674         * method-to-ir.c: Force the vtable variable in shared generic code
4675         for the case that they might show up on a stack trace where they
4676         are needed.
4677
4678         * mini-exceptions.c: Save and use generic sharing info as well as
4679         IP in stack traces to resolve shared generic instantiations.
4680
4681 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
4682
4683         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
4684         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
4685
4686 2009-01-20  Mark Probst  <mark.probst@gmail.com>
4687
4688         * method-to-ir.c: Do generic sharing for array constructors.
4689
4690 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
4691
4692         * mini-exceptions.c (mono_print_thread_dump): Add information
4693         about the thread state using wapi_current_thread_desc.
4694
4695 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
4696
4697         * basic-simd.cs: Tests for the new constructors. 
4698
4699 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
4700
4701         * mini-ops.h: Added OP_EXPAND_*
4702
4703         * cpu-x86.md: Same.
4704
4705         * mini-x86.c (mono_arch_output_basic_block): Same.
4706         
4707         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
4708
4709 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
4710
4711         * iltests.il.in: Add a test for #467385.
4712
4713 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
4714
4715         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
4716         thread been cleaned up is not the same currently in execution.
4717
4718         Fixes appdomain-unload crashes on windows, osx and linux variants
4719         without the __thread keyword.
4720
4721 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
4722
4723         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
4724         (koush@koushikdutta.com). Implement this for android.
4725
4726         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
4727         begins with a digit.
4728
4729         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
4730         mono_marshal_get_write_barrier ().
4731
4732 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
4733
4734         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
4735         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
4736         that pass them on a register pair.
4737
4738         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
4739         test was crashing due to that.
4740
4741 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
4742
4743         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
4744         trampoline code. Include ucontext.h only if available.
4745
4746 2009-01-15  Mark Probst  <mark.probst@gmail.com>
4747
4748         * mini.c: mono_domain_lookup_shared_generic() takes an open method
4749         and doesn't check whether it's sharable, like it was before
4750         removing the shared generics hash.  This brings IronPython
4751         performance back to what it was before that change.
4752
4753 2009-01-14  Mark Probst  <mark.probst@gmail.com>
4754
4755         * method-to-ir.c: Handle delegate invocation optimization earlier,
4756         otherwise it would be handled (much more slowly) by the
4757         final/sealed optimization.
4758
4759 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
4760
4761         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
4762         domain is not set. Fixes #465864.
4763
4764 2009-01-12  Mark Probst  <mark.probst@gmail.com>
4765
4766         * method-to-ir.c: Don't stop sharing of generic methods with catch
4767         clauses - we already handle those.
4768
4769 2009-01-12  Mark Probst  <mark.probst@gmail.com>
4770
4771         * mini.c, mini.h: lookup_generic_method() is now
4772         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
4773         making the shared_generics_hash obsolete.
4774
4775 2009-01-12  Mark Probst  <mark.probst@gmail.com>
4776
4777         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
4778         use the red zone.  Make room on the stack first and then use it,
4779         not the other way around.
4780
4781 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
4782
4783         * mini.c (mini_init): Call mono_xdebug_init ().
4784
4785         * aot-compiler.c (mono_xdebug_init): Make this non-static.
4786
4787 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
4788
4789         * TestDriver.cs: Add an --iter argument to run tests multiple times.
4790
4791         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
4792         trampolines.
4793
4794         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
4795         debug+unwind info for trampolines.
4796
4797         * mini.c (mono_create_unwind_op): New helper function.
4798
4799         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
4800
4801 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
4802
4803         * aot-compiler.c: Fix the build.
4804
4805 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
4806
4807         * Makefile.am: Update dtrace-prelink.sh location.
4808
4809 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
4810
4811         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
4812         optimization. Fixes #464520.
4813
4814 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
4815
4816         * mini-amd64.c : Adding code to save/restore non-volatile registers
4817            on Winx64.
4818
4819         * exceptions-amd64.c : Adding code to save/restore non-volatile 
4820           registers on Winx64.
4821
4822         Contributed under MIT/X11 license.
4823
4824 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
4825
4826         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
4827         __GNUC_MINOR__ which can break when the major version changes.
4828
4829 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
4830
4831         * basic-simd.cs: Add tests for usage of the sizeof opcode.
4832
4833 2009-01-07  Geoff Norton  <gnorton@novell.com>
4834
4835         * helpers.c:  Allow mono -v -v -v to work on darwin.
4836
4837 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
4838
4839         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
4840           pattern. 
4841
4842         Contributed under MIT/X11 license.
4843
4844 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
4845
4846         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
4847         instead of directly accessing type->data.klass. Fixes #462016.
4848         (mono_allocate_stack_slots_full): Ditto.
4849
4850         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
4851         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
4852
4853         * aot-compiler.c (emit_plt): Fix ARM build.
4854
4855 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
4856
4857         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
4858         
4859         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
4860         change.
4861
4862         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
4863         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
4864         #463357.
4865
4866         * iltests.il.in: Add a regression test.
4867
4868 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
4869
4870         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
4871
4872 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
4873
4874         * basic-simd.cs: Add a regression test for #462457.
4875
4876 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
4877
4878         * mini-ops.h: Add a definition of XPHI.
4879
4880         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
4881
4882         * ssa.c (op_phi_to_move): Handle XPHI.
4883
4884         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
4885
4886         Fixes #462457
4887
4888 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
4889
4890         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
4891
4892 2008-12-31  Geoff Norton  <gnorton@novell.com>
4893
4894         * mini-ppc.c: The prolog size allocated can be too small for darwin
4895         ppc32 under certain circumstances.  Also fix a small logic bug.
4896
4897 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
4898
4899         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
4900         while loading AOT methods.
4901
4902         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
4903         since only the former is nulled out after a successful cast. This prevents
4904         crashes with rethrown exceptions when using --debug=casts.
4905
4906 2008-12-24  Mark Probst  <mark.probst@gmail.com>
4907
4908         * mini.h: New macro for checking whether a method is final,
4909         i.e. whether the method or its class is marked final.
4910
4911         * method-to-ir.c: Use the new macro for all final-checks
4912         consistently.  Fixes the crash in the System.ServiceModel tests.
4913
4914 2008-12-23  Mark Probst  <mark.probst@gmail.com>
4915
4916         * mini-exceptions.c (get_exception_catch_class): Corrected another
4917         overly strict assertion.
4918
4919 2008-12-23  Mark Probst  <mark.probst@gmail.com>
4920
4921         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
4922         Clobbering it is not allowed because the caller might use it as
4923         the vtable register in the interface call.
4924
4925 2008-12-19  Mark Probst  <mark.probst@gmail.com>
4926
4927         * mini-exceptions.c (get_exception_catch_class): Corrected an
4928         overly strict assertion.
4929
4930 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
4931         
4932         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
4933
4934         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
4935
4936         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
4937
4938         * cpu-mips.md: correct lengths for certain long_ opcodes.
4939
4940         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
4941
4942         * 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().
4943         
4944 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
4945
4946         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
4947         
4948 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
4949         
4950         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
4951         
4952 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
4953
4954         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
4955         next basic block.
4956         
4957 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
4958
4959         * 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
4960
4961         * 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)
4962         
4963 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
4964         
4965         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
4966         
4967 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
4968
4969         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
4970         gshared code. Fixes #458947.
4971
4972         * generics.cs: Add a test.
4973
4974 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
4975         
4976         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4977         
4978         * mini-mips.c: first pass n32 code generation.
4979
4980         * mini-mips.h: datatypes and defines for n32 support.
4981
4982         * exceptions-mips.c: first pass n32 code generation.
4983         
4984         * tramp-mips.c: first pass n32 code generation.
4985         
4986         * cpu-mips.md: add long_ opcodes.
4987         
4988 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
4989
4990         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4991
4992         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4993         
4994         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4995         
4996         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4997
4998         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4999
5000         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5001
5002         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5003
5004         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5005
5006         * helpers.c: for mips/n32, don't pass -mips32 to objdump
5007
5008 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
5009
5010         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
5011
5012 2008-12-12  Andres G. Aragoneses  <aaragoneses@novell.com>
5013
5014         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
5015
5016 2008-12-12  Mark Probst  <mark.probst@gmail.com>
5017
5018         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
5019         descriptors for helper functions directly in front of the code.
5020
5021 2008-12-11  Mark Probst  <mark.probst@gmail.com>
5022
5023         * method-to-ir.c: Removed an unnecessary assertion.
5024
5025 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
5026
5027         * method-to-ir.c: Merge SGEN changes from the old JIT.
5028
5029 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
5030
5031         * driver.c (compile_all_methods_thread_main): Handle failure of
5032         mono_get_method ().
5033
5034 2008-12-10  Mark Probst  <mark.probst@gmail.com>
5035
5036         * mini-ppc.c: Merged with mini-ppc64.c.
5037
5038         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
5039
5040         * Makefile.am: Use the same sources for PPC and PPC64.
5041
5042         * mini-ppc64.c: Removed.
5043
5044 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
5045
5046         * branch-opts.c (remove_block_if_useless): Extract fall through detection
5047         code to mono_bb_is_fall_through.
5048         
5049         * branch-opts.c (mono_remove_critical_edges): Same.
5050
5051 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
5052
5053         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
5054         expect that an OP_BR_REG will be there.
5055
5056 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
5057
5058         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
5059         for the many branch ops. The original check miss OP_BR_REG.
5060
5061         Fixes #457574.
5062         
5063 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
5064
5065         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
5066
5067 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
5068
5069         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
5070         while holding the aot lock.
5071
5072 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
5073
5074         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
5075         
5076 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
5077
5078         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
5079           to release all runtime callable wrappers held by the runtime.
5080
5081         Contributed under MIT/X11 license.
5082
5083 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
5084
5085         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
5086           for Winx64.
5087
5088         Contributed under MIT/X11 license.
5089
5090 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
5091
5092         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
5093         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
5094
5095 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
5096
5097         * cpu-mips.md: fix ckfinite length
5098
5099         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
5100         (mono_arch_lowering_pass): cleanup, rearrange for clarity
5101         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
5102         
5103 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
5104
5105         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
5106         
5107 2008-12-08  Geoff Norton  <gnorton@novell.com>
5108
5109         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
5110         size by 8 bytes as well.
5111
5112 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5113
5114         * basic-simd.cs: Fix method names for Vector16b.
5115         
5116 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5117
5118         * basic-simd.cs: Fix method names for Vector16sb.
5119
5120 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5121
5122         * basic-simd.cs: Fix method names for Vector8us.
5123         
5124 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5125
5126         * basic-simd.cs: Fix method names for Vector8s.
5127         
5128 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5129
5130         * basic-simd.cs: Fix method names for Vector4ui.
5131
5132 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5133
5134         * basic-simd.cs: Fix method names for Vector2l.
5135
5136 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5137
5138         * basic-simd.cs: Fix method names for Vector2d.
5139
5140 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5141
5142         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
5143         that are extension methods.
5144
5145 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5146
5147         * basic-simd.cs: Fix method names for Vector4f.
5148
5149 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
5150
5151         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
5152         as such. Fixes #456669.
5153
5154 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
5155
5156         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
5157         
5158 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
5159
5160         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
5161         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
5162         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
5163         (mips_adjust_stackframe): handle FP spills
5164                 
5165         * mini-ops.h: add mips_mtc1_s2
5166         
5167         * cpu-mips.md: add mips_mtc1_s2
5168         
5169 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
5170
5171         * unwind.c: New file, move the unwind info encoding functions here from
5172         aot-compiler.c, so they could be used at runtime too.
5173
5174 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
5175
5176         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
5177         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
5178         
5179 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
5180
5181         * mini-mips.c: cleanup warnings
5182         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
5183         (mips_adjust_stackframe): handle case of taking the address of stack locals
5184         
5185 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
5186
5187         * aot-compiler.c: Implement a few functions missing from the asm writer.
5188         (emit_method_code): Only write symbols for methods when using the bin
5189         writer, since the assembler can't deal with the characters in our method
5190         names.
5191
5192         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
5193
5194         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
5195         call.
5196
5197         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
5198         a bit to also restore %rax.
5199
5200 2008-12-05  Mark Probst  <mark.probst@gmail.com>
5201
5202         * mini-ppc.c: Some simple merges from mini-ppc64.c.
5203
5204 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
5205
5206         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
5207         arguments.
5208
5209 2008-12-05  Mark Probst  <mark.probst@gmail.com>
5210
5211         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
5212
5213         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
5214         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
5215
5216         * exceptions-ppc64.c: Removed.
5217
5218         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
5219
5220 2008-12-05  Mark Probst  <mark.probst@gmail.com>
5221
5222         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
5223         tramp-ppc64.c.
5224
5225         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
5226
5227         * tramp-ppc64.c: Removed.
5228
5229 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
5230
5231         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
5232         the TYPESPEC table.
5233
5234 2008-12-05  Mark Probst  <mark.probst@gmail.com>
5235
5236         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
5237
5238         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
5239         mini-ppc.h instead of mini-ppc64.h.
5240
5241         * mini-ppc64.h: Removed.
5242
5243 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
5244
5245         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
5246         
5247         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
5248         
5249 2008-12-05  Mark Probst  <mark.probst@gmail.com>
5250
5251         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
5252         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
5253         code easier.
5254
5255 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
5256
5257         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
5258
5259 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
5260
5261         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
5262
5263 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
5264
5265         * basic-simd.cs: Tests for operator == and != on Vector4f.
5266
5267 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
5268
5269         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
5270
5271         * simd-intrinsics.c: Kill useless enum.
5272
5273 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
5274
5275         * cpu-mips.md: add long_conv_to_ovf_i4_2
5276         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
5277
5278 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
5279
5280         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
5281         
5282         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
5283
5284 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
5285
5286         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
5287         
5288 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
5289
5290         * basic-simd.cs: Add tests for new methods.
5291
5292 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
5293
5294         * simd-intrinsics.c: Add support for operator == and !=
5295         on Vector4(u)i.
5296
5297         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
5298
5299 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
5300
5301         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
5302
5303 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
5304
5305         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
5306
5307         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
5308         MONO_PATCH_INFO_ICALL_ADDR.
5309
5310         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
5311
5312         * aot-compiler.c: Resurrect full-aot support.
5313
5314 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
5315
5316         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
5317         
5318 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
5319
5320         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
5321         
5322 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
5323
5324         * basic-simd.cs: Fix tests to work under ppc.
5325         Remove tests for methods that will be removed.
5326
5327 2008-12-03  Mark Probst  <mark.probst@gmail.com>
5328
5329         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
5330         generic type (via a typedef or typeref) correctly.
5331
5332 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
5333
5334         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
5335         diagnose an assertion failure.
5336
5337 2008-12-02  Mark Probst  <mark.probst@gmail.com>
5338
5339         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
5340         Fix trampoline size.
5341
5342         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
5343         conversion opcodes are implemented natively instead via emulation.
5344
5345 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
5346
5347         * cpu-mips.md: remove mips_xori
5348
5349         * mini-ops.h:  remove mips_xori
5350
5351         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
5352
5353         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
5354         
5355         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
5356         
5357 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
5358
5359         * cpu-mips.md: fix instruction lengths.
5360
5361         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
5362
5363         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
5364
5365         * mini-ops.h: fix slti / sltiu op profiles.
5366         
5367 2008-12-02  Martin Baulig  <martin@ximian.com>
5368
5369         * method-to-ir.c (mono_method_to_ir): Disable debugging
5370         information for the init locals block to make the debugger stop
5371         after all locals have been initalized.
5372
5373 2008-12-02  Martin Baulig  <martin@ximian.com>
5374
5375         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
5376         running inside the debugger.
5377
5378 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
5379
5380         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
5381         is enabled.
5382
5383         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
5384         alu->alu imm optimization which only shows if deadce is disabled.
5385
5386         * aot-compiler.c: Rename the function names for the binary and asm writers
5387         so they can coexist in the same process. Rework the xdebug code to use the
5388         asm writer. This avoids the need to call into the runtime to dump the
5389         debugging info. Add more debugging info for types.
5390
5391         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
5392
5393         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
5394         cpu description tables, they can't occur in cpu-<ARCH>.md.
5395
5396         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
5397         the stack in CEE_LDFLDA. Fixes #450542.
5398
5399         * generics.cs: Add a new test.
5400
5401 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
5402
5403         * mini-ops.h: updated MIPS opcodes
5404         * mini-mips.c: decompose long opts
5405         * mini-mips.h: decompose long opts
5406         
5407 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
5408
5409         * cpu-mips.md: fix length on int_rem_un
5410         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
5411         
5412 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
5413
5414         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
5415
5416         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
5417
5418 2008-11-29  Martin Baulig  <martin@ximian.com>
5419
5420         * mini-exceptions.c (mono_handle_native_sigsegv): Check
5421         mono_debug_using_mono_debugger() in addition to the
5422         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
5423
5424 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
5425
5426         * mini-ops.h: updated more MIPS opcodes
5427         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
5428         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
5429         
5430 2008-11-28  Mark Probst  <mark.probst@gmail.com>
5431
5432         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
5433
5434 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
5435
5436         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
5437         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
5438         * mini-ops.h: correct selected mips opcode entries
5439         
5440 2008-11-28  Mark Probst  <mark.probst@gmail.com>
5441
5442         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
5443         make them work.
5444
5445 2008-11-28  Mark Probst  <mark.probst@gmail.com>
5446
5447         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
5448
5449 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
5450
5451         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
5452         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
5453         * mini-mips.h: disable IMT
5454         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
5455         
5456 2008-11-28  Mark Probst  <mark.probst@gmail.com>
5457
5458         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
5459
5460 2008-11-28  Mark Probst  <mark.probst@gmail.com>
5461
5462         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
5463
5464 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
5465
5466         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
5467         consistency.
5468
5469 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
5470
5471         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
5472         for Set/GetVector aligned versions.
5473
5474 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
5475
5476         * basic-simd.cs: Add tests for Get/SetVector.
5477
5478 2008-11-27  Mark Probst  <mark.probst@gmail.com>
5479
5480         * mini.c: Removed g_slist_append_mempool().  Now in
5481         metadata/mempool.c.
5482
5483 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
5484
5485         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
5486         size properly and make the bounds check optional.
5487
5488         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
5489         for SetVector and IsAligned.
5490
5491 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
5492
5493         * mini.c: Remove unused mono_normalize_opcodes () function.
5494
5495 2008-11-26  Mark Probst  <mark.probst@gmail.com>
5496
5497         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
5498         using the new atomic add ops now.
5499
5500         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
5501         add.
5502
5503 2008-11-26  Mark Probst  <mark.probst@gmail.com>
5504
5505         * mini-ppc64.c: Several fixes.
5506
5507 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
5508
5509         * cpu-mips.md: added jump_table
5510         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
5511
5512 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
5513
5514         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
5515
5516 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
5517
5518         * mini-ops.h: corrected a handful of MIPS opcodes.
5519
5520 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
5521
5522         * aot-compiler.c: MIPS to use ELF writer
5523
5524 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
5525
5526         * mini-codegen.c: remove MIPS specific assert.
5527
5528 2008-11-25  Mark Probst  <mark.probst@gmail.com>
5529
5530         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
5531         fixes.  PPC64 now passes most of the runtime regressions.
5532
5533 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
5534
5535         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
5536         volatile intervals a bit.
5537
5538 2008-11-24  Mark Probst  <mark.probst@gmail.com>
5539
5540         * basic-long.cs: New test case.
5541
5542 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
5543
5544         * mini.c (mini_method_compile): Disable globalra for large methods for 
5545         now.
5546
5547         * regalloc2.c (order_moves): Add fp support.
5548
5549         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
5550         source bblock ends with an OP_BR_REG.
5551
5552         * ratests.cs: Add a new test.
5553
5554 2008-11-23  Mark Probst  <mark.probst@gmail.com>
5555
5556         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
5557         sharing.  PPC64 now passes generics.exe.
5558
5559 2008-11-23  Mark Probst  <mark.probst@gmail.com>
5560
5561         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
5562
5563 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
5564
5565         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
5566         memory when mono_jit_info_table_find () can't find the method in the
5567         LMF case.
5568
5569         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
5570         AOTed code too.
5571         
5572         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
5573         writer too.
5574
5575 2008-11-23  Mark Probst  <mark.probst@gmail.com>
5576
5577         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
5578         Several fixes.  PPC64 now runs exceptions.exe and
5579         devirtualization.exe.
5580
5581 2008-11-22  Mark Probst  <mark.probst@gmail.com>
5582
5583         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
5584         arrays.exe and basic-math.exe.
5585
5586 2008-11-22  Mark Probst  <mark.probst@gmail.com>
5587
5588         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
5589         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
5590
5591 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
5592
5593         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
5594
5595 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
5596
5597         * method-to-ir.c: Move bounds checking macros to ir-emit.h
5598
5599         * ir-emit.h: Move macros from method-to-ir.c to here.
5600
5601 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
5602
5603         * mini-ops.h: Correct the long simd ops to use LREG.
5604
5605 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
5606
5607         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
5608         
5609         * mini-ops.h: Correct the dreg type of a few long opcodes.
5610
5611         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
5612         Add netbsd support.
5613
5614 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
5615
5616         * mini-ppc.c: remove negative stack references in epilog
5617         for platforms that don't support the red zone.
5618
5619 2008-11-21  Mark Probst  <mark.probst@gmail.com>
5620
5621         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
5622         point regs.  Now PPC64 passes basic-calls.exe.
5623
5624 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
5625
5626         * basic-simd.cs: Add tests for accessors of Vector2l.
5627
5628 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
5629
5630         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
5631
5632         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
5633         
5634         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
5635
5636 2008-11-21  Mark Probst  <mark.probst@gmail.com>
5637
5638         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
5639         PPC64 passes basic-long.exe.
5640
5641 2008-11-20  Mark Probst  <mark.probst@gmail.com>
5642
5643         * decompose.c: Decompose carry and overflow add on PPC64 like on
5644         other 64 bit archs.  Don't decompose sub at all on PPC64.
5645
5646         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
5647         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
5648         basic-long.exe.
5649
5650 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
5651
5652         * basic-simd.cs: Add tests for accessors of Vector2d.
5653
5654 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
5655
5656         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
5657
5658         * cpu-x86.md: Same.
5659
5660         * mini-x86.c (mono_arch_output_basic_block): Same.
5661         
5662         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
5663
5664 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
5665
5666         * basic-simd.cs: Add tests for accessors of Vector4f.
5667
5668 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
5669
5670         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
5671
5672         * cpu-x86.md: Same.
5673
5674         * mini-x86.c (mono_arch_output_basic_block): Same.
5675         
5676         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
5677
5678 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
5679
5680         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
5681
5682 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
5683
5684         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
5685
5686         * cpu-x86.md: Same.
5687
5688         * mini-x86.c (mono_arch_output_basic_block): Same.
5689         
5690         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
5691
5692 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
5693
5694         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
5695
5696 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
5697
5698         * simd-intrinsics.c: Enable setters for Vector16sb.
5699
5700 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
5701
5702         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
5703
5704         * cpu-x86.md: Same.
5705
5706         * mini-x86.c (mono_arch_output_basic_block): Same.
5707         
5708         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
5709
5710 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
5711
5712         * simd-intrinsics.c: Implement setter for Vector8us.
5713
5714 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
5715
5716         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
5717         for dead variables.
5718
5719 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
5720
5721         * mini-ppc.c: remove references to the red zone in the prolog
5722         (for systems that don't support it).
5723
5724 2008-11-19  Mark Probst  <mark.probst@gmail.com>
5725
5726         * cpu-ppc64.md: Fixed a few instruction lengths.
5727
5728         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
5729         now.
5730
5731 2008-11-19  Mark Probst  <mark.probst@gmail.com>
5732
5733         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
5734         basic.exe now.
5735
5736 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
5737
5738         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
5739
5740 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
5741
5742         * mini-ops.h: Added OP_INSERT_I2.
5743
5744         * cpu-x86.md: Same.
5745
5746         * mini-x86.c (mono_arch_output_basic_block): Same.
5747         
5748         * simd-intrinsics.c: Implement setter for Vector8s.
5749
5750         * simd-methods.h: Add the names of get setters of Vector8s.
5751
5752 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
5753
5754         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
5755         
5756         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
5757         parameters.
5758
5759         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
5760
5761 2008-11-18  Mark Probst  <mark.probst@gmail.com>
5762
5763         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
5764         for PPC64.  An empty program runs now.
5765
5766 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
5767
5768         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
5769
5770         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
5771         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
5772         info for JITted code is emitted into a shared library, loadable into gdb.
5773
5774 2008-11-18  Mark Probst  <mark.probst@gmail.com>
5775
5776         * Makefile.am: Changes to build PPC64.
5777
5778         * mini-arch.h: Include mini-ppc64.h on PPC64.
5779
5780 2008-11-18  Mark Probst  <mark.probst@gmail.com>
5781
5782         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
5783         in PPC code up to r119147.
5784
5785 2008-11-18  Mark Probst  <mark.probst@gmail.com>
5786
5787         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
5788         cpu-ppc64.md: Changes for PPC64.
5789
5790         Based on code submitted by andreas.faerber@web.de at
5791         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
5792         X11/MIT license.
5793
5794 2008-11-18  Mark Probst  <mark.probst@gmail.com>
5795
5796         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
5797         cpu-ppc64.md: Copied from the corresponding PPC files from
5798         r118846.
5799
5800 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
5801
5802         * mini-ops.h: Added OP_ROUND.
5803
5804         * cpu-x86.md: Added round.
5805
5806         * mini-x86.c: Added support for intrinsicing Math.Round (double).
5807
5808         * basic-math.cs: Added test_0_round to test rounding.
5809
5810         Contributed under MIT/X11 license.
5811
5812 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
5813
5814         * aot-compiler.c : Fix the Winx64 build.
5815
5816         Contributed under MIT/X11 license.
5817
5818 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
5819
5820         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
5821         in OP_EXTRACT_R8 to avoid possible stack corruption.
5822
5823 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
5824
5825         * mini-ops.h: Added OP_EXTRACT_R8/I8.
5826
5827         * cpu-x86.md: Added extract_r8.
5828
5829         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
5830         
5831         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
5832         a couple of OP_EXTRACT_I4.
5833
5834         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
5835
5836         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
5837
5838 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
5839
5840         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
5841         and not 4.1. 
5842
5843 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
5844
5845         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
5846         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
5847
5848         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
5849         are not needed any more.
5850
5851         * mini.h: Remove the unused INS_LIST macros.
5852
5853         * mini.c (mini_method_compile): Remove a disable globalra case which is no
5854         longer needed.
5855
5856         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
5857         ir-emit.h.
5858
5859         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
5860         mono_alloc_ireg () instead.
5861
5862         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
5863         macros.
5864
5865         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
5866         on amd64.
5867
5868         * aot-runtime.c (load_aot_module): Disable AOT when running under
5869         CAS.
5870
5871         * mini-amd64.h: Change the monitor fastpath defines to check for
5872         !PLATFORM_WIN32 so they work on *bsd too.
5873
5874         * mini.h mini.c mini-hhpa.c: Remove more unused code.
5875
5876         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
5877
5878         * mini.h (MonoCompile): Remove new_ir flag.
5879
5880         * regalloc.h regalloc.c: Remove unused code.
5881
5882         * cpu-*.md: Remove more unused opcodes.
5883
5884         * simple-cee-ops.h simple-mini-ops.h: Removed.
5885
5886         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
5887         
5888 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
5889
5890         * aliasing.h: Removed.
5891
5892         * *.c: Remove references to aliasing.h and inssel.h.
5893
5894         * mini.c: Remove additional unused functions.
5895
5896         * mini-ops.h cpu-*.md: Remove unused opcodes.
5897
5898 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
5899
5900         Remove the old JIT code.
5901
5902         * inssel*.brg: Removed.
5903
5904         * ssa.c abcremoval.c aliasing.c: Removed.
5905
5906         * ssa2.c: Renamed to ssa.c.
5907
5908         * abcremoval2.c: Renamed to abcremoval.c.
5909
5910         * *.c: Removed all !cfg->new_ir code.
5911
5912         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
5913         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
5914
5915         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
5916         
5917 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
5918
5919         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
5920         to simplify the code and cut back on the number of global symbols in the AOT
5921         file.
5922         
5923         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
5924
5925 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
5926
5927         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
5928         with the got/got_info tables.
5929
5930         * mini.h: Bump AOT file format version.
5931         
5932         * unwind.h: New file, contains definitions for stack unwinding.
5933
5934         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
5935         to cfg->unwind_ops.
5936         
5937         * aot-compiler.c: Generalize the emitting of unwind information to use the
5938         information in cfg->unwind_ops.
5939
5940         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
5941
5942         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
5943         AOT method frames. Enable writing symbols for methods by default.
5944
5945 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
5946
5947         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
5948         and make it work with vectors of element sizes 1, 2 and 4.
5949
5950         * simd-intrinsics.c: Enable getter for all vectors with element size
5951         1, 2 or 4.
5952
5953         * simd-methods.h: Add the names of other getters.
5954
5955         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
5956
5957         * cpu-x86.md: Same.
5958
5959         * mini-x86.c: Same.
5960
5961 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
5962
5963         * mini-ppc.h: portability fix.
5964
5965 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
5966
5967         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
5968         buggy and will overwrite it.
5969
5970 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
5971
5972         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
5973         Use it to emit local symbols for all methods so AOTed methods show up with
5974         their full name in gdb/valgrind output.
5975
5976 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
5977
5978         * mini-ppc.c: portability fixes.
5979
5980 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
5981
5982         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
5983         entries out of the if (!generic_shared...) code so it is always done.
5984         (mono_class_init_trampoline): Do the patching when running under valgrind
5985         too, newer versions of valgrind have no problems with it.
5986
5987 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
5988
5989         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
5990         further sections.
5991
5992 2008-11-13  Mark Probst  <mark.probst@gmail.com>
5993
5994         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
5995         filters.
5996
5997 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5998
5999         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
6000
6001 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
6002
6003         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
6004
6005         * cpu-x86.md: Same.
6006
6007         * mini-x86.c: Same.
6008
6009         * simd-intrinsics.c: Same.
6010
6011 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
6012
6013         * simd-intrinsics.c: Enable constructor intrinsics for all types.
6014
6015 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
6016
6017         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
6018         to work with more Vector types.
6019
6020 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
6021
6022         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
6023         store the elemens directly instead of using and intermediate.
6024
6025 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
6026
6027         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
6028
6029         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
6030         to preserve %eax for aot plt trampolines.
6031
6032         * aot-compiler.c (compile_method): Don't skip synchronized methods.
6033         (encode_method_ref): Flag synchronized methods so they won't go through
6034         the AOT trampoline.
6035
6036         * aot-compiler.c: Additional work to support AOTing synchronized methods/
6037         wrappers.
6038
6039         * cpu-ia64.md (jmp): Increase max length.
6040
6041 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
6042
6043         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
6044         open generic classes.
6045
6046         * aot-compiler.c: Enable the ELF writer on ELF platforms.
6047
6048         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
6049         box+brtrue optimization since it causes test failures on x86.
6050
6051 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
6052
6053         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
6054
6055         * cpu-x86.md: Same.
6056
6057         * mini-x86.c: Same.
6058
6059         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
6060         for simd ctor values. 
6061
6062         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
6063         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
6064
6065 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
6066
6067         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
6068         LogicalRightShift.
6069
6070         * simd-instrincs.c: Same.
6071
6072         * basic-simd.cs: Same.
6073
6074 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
6075
6076         * ratests.cs: Add more tests.
6077
6078         * regalloc2.c (add_spill_code): Handle more corner cases.
6079
6080 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
6081
6082         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
6083         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
6084         both the source an destination of an instruction.
6085
6086 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
6087
6088         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
6089         wapihandles.c: more portability changes.
6090
6091 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
6092
6093         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
6094         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
6095         safe to execute in a signal handler and the kernel provides better
6096         the info in /proc/self/smaps. Avoid the assert on sigaction during
6097         cleanup.
6098
6099 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
6100
6101         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
6102         do the bblock linking hack if it is actually needed.
6103
6104         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
6105         up linking.
6106
6107         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
6108         crash problem is fixed.
6109
6110         * branch-opts.c (mono_remove_critical_edges): Link up newly added
6111         bblocks.
6112
6113         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
6114         for catch clauses.
6115         (mini_method_compile): Set the starting value of next_vreg to 
6116         MAX_IREGS + MAX_FREGS when using globalra.
6117
6118         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
6119         filter clauses with BB_EXCEPTION_HANDLER.
6120
6121         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
6122
6123 2008-11-10  Mark Probst  <mark.probst@gmail.com>
6124
6125         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
6126         space for stdcall.  Fixes regressions on Win32.
6127
6128 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
6129
6130         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
6131         bblocks.
6132         (linear_scan): Remove an assert which doesn't seem to be needed.
6133
6134         * local-propagation.c (mono_local_deadce): Avoid a call to
6135         MONO_DELETE_INS which would screw up the instruction linking.
6136
6137         * mini.c (mono_decompose_op_imm): Make this work with globalra.
6138
6139         * regalloc2.c: Upgrade to work the current JIT code.
6140
6141 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
6142
6143         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
6144         case.
6145
6146         * aot-runtime.c: Remove some dead code.
6147
6148         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
6149         consistency.
6150         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
6151
6152         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
6153         trampolines using sscanf since atoi doesn't work on large unsigned values.
6154
6155         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
6156         Initialize code_size.
6157
6158 2008-11-08  Mark Probst  <mark.probst@gmail.com>
6159
6160         * method-to-ir.c (mini_emit_inst_for_method): Make
6161         Interlocked.CompareExchange work for Int arguments on 32 bit
6162         archs, as well.
6163
6164 2008-11-07  Mark Probst  <mark.probst@gmail.com>
6165
6166         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
6167
6168 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
6169
6170         * main.c Fix MSVC build.
6171
6172         Contributed under MIT/X11 license.
6173
6174 2008-11-06  Mark Probst  <mark.probst@gmail.com>
6175
6176         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
6177         alignment larger than 8 bytes are aligned correctly, too.
6178
6179         * mini.c: Honor the min_align field of MonoClass when laying out
6180         the stack.
6181
6182 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
6183
6184         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
6185
6186         * aot-compiler.c (emit_plt): Fix a warning.
6187         
6188         * aot-compiler.c: Implement ARM support in the binary writer.
6189
6190 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
6191
6192         * basic-simd.cs: Add test for getter with byref arg.
6193         Fix the naming of a few tests.
6194         Add missing checks to a test.
6195
6196 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
6197
6198         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
6199
6200         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
6201         most of the full-aot support for monitor enter/exit trampolines.
6202
6203         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
6204         enter/exit trampoline creation functions.
6205
6206         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
6207         make dist.
6208
6209 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
6210
6211         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
6212         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
6213         implement the needed functionality without adding crap to the runtime.
6214
6215 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
6216
6217         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
6218         non-x86 builds.
6219
6220         * mini.c (mono_build_date): New global version holding the build date in
6221         string format.
6222         
6223         * Makefile.am (buildver.c): Generate a file containing the build date.
6224
6225         * main.c: Set the build date from the generated file.
6226
6227         * mini.c (mono_get_runtime_build_info): New helper function returning build
6228         information in a string format.
6229         
6230         * driver.c (mono_main): Print the build date in --version.
6231
6232         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
6233         file when the bind-to-runtime-version option is used.
6234
6235 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
6236
6237         * simd-intrinsics.c: Fix bug when using getters and byref args. 
6238
6239 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
6240
6241         * simd-methods.h: Rename prefetch methods.
6242
6243         * simd-intrinsics.c: Same.      
6244
6245 2008-11-05  Mark Probst  <mark.probst@gmail.com>
6246
6247         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
6248         sizes.
6249
6250 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
6251
6252         * aot-compiler.c: Use the bundled elf header files instead of depending on
6253         the system one.
6254         
6255         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
6256         mempool.
6257
6258         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
6259         on every call.
6260
6261 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
6262
6263         * cpu-x86.md: Add store nta ops.
6264
6265         * mini-ops.h: Same.
6266
6267         * mini-x86.c: Same.
6268
6269         * mini.h: Add an enum for simd prefetch modes.
6270
6271         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
6272         of store. Use the changed code to support store nta.
6273
6274         * simd-intrinsics.c: Add prefetch ops for all vector types.
6275
6276 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
6277
6278         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
6279         threads.
6280         
6281         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
6282         names.
6283
6284         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
6285         trampolines.
6286
6287 2008-11-04  Mark Probst  <mark.probst@gmail.com>
6288
6289         * mini-x86.c: Fixed commit.
6290
6291 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
6292
6293         * aot-compiler.c (emit_plt): Align the plt section only on x86.
6294
6295 2008-11-04  Mark Probst  <mark.probst@gmail.com>
6296
6297         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
6298         and MONITOR_EXIT, for the ASM fastpaths.
6299
6300         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
6301         available.
6302
6303         * mini.c, patch-info.h: Signature and patch infos for
6304         Monitor.Enter/Exit trampolines.
6305
6306         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
6307
6308         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
6309         Monitor.Enter/Exit ASM fastpath for Linux.
6310
6311 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
6312
6313         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
6314
6315         * objects.cs: Add a new test.
6316         
6317         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
6318
6319         * aot-runtime.c (load_method): Run class initialization in the PLT case even
6320         if MONO_LOG_LEVEL is set.
6321
6322         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
6323
6324         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
6325
6326         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
6327         
6328         * aot-compiler.c: Change the relocation code to use virtual addresses instead
6329         of file offsets. Align the sections belonging to the data segment to 
6330         PAGESIZE.
6331
6332 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
6333
6334         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
6335         elf.h. Port it to amd64.
6336
6337 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
6338
6339         * driver.c: Enable SIMD by default.
6340
6341 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
6342
6343         * cpu-x86.md: Add prefetch op.
6344
6345         * mini-ops.h: Same.
6346
6347         * mini-x86.c: Same.
6348
6349         * mini.h: Add an enum for simd prefetch modes.
6350
6351         * simd-methods.h: Add prefetch function names.
6352
6353         * simd-intrinsics.c: Add prefetch ops for all vector types.
6354
6355 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
6356
6357         * aot-compiler.c (emit_bytes): Speed this up a little.
6358
6359 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
6360
6361         * aot-compiler.c: Add JIT time etc. statistics.
6362         
6363         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
6364
6365         * mini.h (MonoCompile): Add 'got_offset' field.
6366
6367         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
6368         method_got_offsets array.
6369
6370         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
6371         wrappers.
6372
6373         * aot-compiler.c (compile_method): Add generic method instances referenced
6374         by the method to the list of methods to be compiled, this is required so if
6375         A<T> references B<T>, and another assembly references A<int>, then it will
6376         also get a copy of B<int>.
6377
6378         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
6379         when checking for monitor enter/exit.
6380
6381 2008-10-30  Mark Probst  <mark.probst@gmail.com>
6382
6383         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
6384         for Monitor.Enter and Monitor.Exit if enabled.
6385
6386         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
6387         Solaris.
6388
6389 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
6390
6391         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
6392         of an OP_MOVE. Fixes #440046.
6393
6394         * basic-long.cs: Add a new test.
6395
6396 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
6397
6398         * mini.h: Add synchronization note for the managed counter-part.
6399
6400         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
6401         returns the simd caps of the current cpu.
6402
6403 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
6404
6405         * basic-simd.cs: Remove Console.WriteLine.
6406
6407 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
6408
6409         * basic-simd.cs: New tests for Vector2ul.
6410
6411 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
6412
6413         * simd-intrinsics.c: Add new vector type Vector2ul.
6414
6415 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
6416
6417         * basic-simd.cs: New tests for Vector2l.
6418
6419 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
6420
6421         * cpu-x86.md: Add long version of most packed int ops.
6422
6423         * mini-ops.h: Same.
6424
6425         * mini-x86.h: Same.
6426
6427         * simd-intrinsics.c: Add new vector type Vector2l.
6428
6429 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
6430
6431         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
6432
6433         * simd-methods.h: Remove SN_op_BitwiseXor.
6434
6435 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
6436
6437         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
6438         alignment.
6439
6440 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
6441
6442         * basic-simd.cs: Test for Vector2d.
6443
6444         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
6445         value.
6446
6447 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
6448
6449         * cpu-x86.md: Add double version of all packed float ops.
6450
6451         * mini-ops.h: Same.
6452
6453         * mini-x86.h: Same.
6454
6455         * simd-intrinsics.c: Add new vector type Vector2d.
6456
6457         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
6458
6459         * simd-methods.h: Add Duplicate.
6460
6461 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
6462
6463         * basic-simd.cs: Test for packing with signed saturation.
6464
6465 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
6466
6467         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
6468         found in the TYPESPEC table.
6469
6470 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
6471
6472         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
6473         too.
6474
6475         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6476
6477         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
6478         instead of the RVA, since the RVA can be changed by tools like the cil 
6479         stripper.
6480
6481         * method-to-ir.c (mono_method_to_ir2): Ditto.
6482
6483         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
6484         (deserialize_variable): Ditto.
6485
6486 2008-10-25  Martin Baulig  <martin@ximian.com>
6487
6488         * debug-mini.c (write_variable): Use
6489         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
6490
6491 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
6492
6493         * cpu-x86.md: Add unsigned variants of packd and packw.
6494
6495         * mini-ops.h: Same.
6496
6497         * mini-x86.h: Emit the right instruction for packd and packw.
6498         Add unsigned variants of packd and packw.
6499
6500         * simd-intrinsics.c: Packd and packw were used in place of their
6501         unsigned variants. Change that.
6502         Add intrinsics for (Signed)PackWithSignedSaturation.
6503
6504         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
6505
6506 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
6507
6508         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
6509
6510 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
6511
6512         * mini-ops.h: Remove dword packed add/sub with saturation ops.
6513
6514         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
6515
6516         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
6517         sse instructions.
6518
6519         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
6520
6521 2008-10-24  Mark Probst  <mark.probst@gmail.com>
6522
6523         * method-to-ir.c, mini.c: Special casing for the synchronized
6524         wrapper for the ldtoken+GetTypeFromHandle case.
6525
6526 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
6527
6528         * mini.c (mono_replace_ins): Move this to branch-opts.c.
6529
6530         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
6531         created/split bblocks.
6532
6533 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
6534
6535         * mini-ops.h: Add packed signed mul high.
6536         
6537         * cpu-x86.md: Same.
6538
6539         * mini-x86.c (mono_arch_output_basic_block): Same.
6540
6541         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
6542
6543         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
6544
6545 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
6546
6547         * basic-simd.cs: Tests for Vector16sb.
6548
6549 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
6550
6551         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
6552
6553 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
6554
6555         * mini-ops.h: Add packed signed min, max and compare greater.
6556         
6557         * cpu-x86.md: Same.
6558
6559         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
6560         saturation.
6561
6562         * simd-methods.h: Add CompareGreaterThan.
6563
6564         * simd-methods.h: Remove CompareEquals.
6565
6566         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
6567
6568         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
6569
6570         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
6571         CompareEqual.
6572
6573 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
6574
6575         * basic-simd.cs: Fix tests due to change in the API.
6576
6577 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
6578
6579         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
6580
6581 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
6582
6583         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
6584
6585         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
6586         inst_offset as this has invalid values for LDADDR.
6587
6588 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
6589
6590         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
6591
6592         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
6593
6594 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
6595
6596         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
6597         for accessing field->data.
6598
6599 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
6600
6601         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
6602
6603 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
6604
6605         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
6606
6607         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
6608
6609 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
6610
6611         * dominators.c (mono_compute_natural_loops): Allocate GList enties
6612         from the cfg mempool.
6613
6614 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
6615
6616         * basic-simd.cs: Tests for new methods in Vector8us.
6617
6618 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
6619
6620         * mini-ops.h: Add multiply and store high.
6621         
6622         * cpu-x86.md: Same.
6623
6624         * mini-x86.c (mono_arch_output_basic_block): Same.
6625
6626         * simd-methods.h: Same.
6627
6628         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
6629         and CompareEqual.
6630
6631 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
6632
6633         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
6634         mono_class_setup_vtable ().
6635
6636         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
6637         mono_class_get_vtable_entry () for accessing klass->vtable.
6638
6639         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
6640
6641         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
6642         found.
6643
6644         * method-to-ir.c (mono_save_token_info): Don't save references made from
6645         wrappers.
6646
6647         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
6648         of generic instances.
6649
6650         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
6651
6652 2008-10-19  Mark Probst  <mark.probst@gmail.com>
6653
6654         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
6655         OP_JMP depends on the method signature.  Calculate it properly.
6656
6657 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
6658         
6659         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
6660         called directly.
6661
6662         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
6663         instances.
6664         (emit_extra_methods): Add another table mapping method indexes to 
6665         offsets in the extra_method_info table.
6666
6667         * mini.h: Bump AOT file format version.
6668         
6669         * aot-runtime.c: Merge most of the code from mono_aot_get_method
6670         and mono_aot_get_method_from_token () into one function.
6671
6672 2008-10-19  Mark Probst  <mark.probst@gmail.com>
6673
6674         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
6675         separate counter.
6676
6677 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
6678
6679         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
6680         methods.
6681
6682         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
6683         disable_aot.
6684
6685         * mini.c (mono_patch_info_equal): Compare the generic context as well.
6686
6687         * mini.h: Bump aot file format version.
6688
6689         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
6690         AOT file can contain native code for methods which are not in the METHOD
6691         table. Generate code for non-sharable generic instances of generic methods
6692         found in the METHODSPEC table.
6693         
6694         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
6695         encoding generic type handles.
6696
6697         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
6698         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
6699
6700         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
6701         macros + MONO_ADD_INS.
6702
6703         * mini.c (mono_jump_info_token_new2): New function which takes a generic
6704         context as well.
6705
6706         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
6707
6708         * mini.h: Bump aot file format version.
6709
6710         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
6711
6712 2008-10-17  Mark Probst  <mark.probst@gmail.com>
6713
6714         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
6715         platforms, with definable stack alignment value.  Set to 16 now
6716         for all platforms.
6717
6718         * mini.c, mini.h, driver.c: Command line option for disabling
6719         stack alignment.
6720
6721 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
6722
6723         * basic-simd.cs: Tests for new methods in Vector4ui.
6724
6725 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
6726
6727         * mini-ops.h: Add packed int shuffle.
6728         
6729         * cpu-x86.md: Same.
6730
6731         * mini-x86.c (mono_arch_output_basic_block): Same.
6732
6733         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
6734         extract mask, max, min, shuffle.
6735
6736         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
6737
6738 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
6739
6740         * basic-simd.cs: Tests for new methods in Vector8us.
6741
6742 2008-10-17  Mark Probst  <mark.probst@gmail.com>
6743
6744         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
6745         RuntimeTypeHandle, not a TypedReference.
6746
6747 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
6748
6749         * simd-intrinsics.c: remove relocations.
6750
6751 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
6752
6753         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
6754         optimizations from the x86 backend.
6755
6756 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
6757
6758         * simd-methods.h, simd-intrinsics.c: debloat method names and
6759         prepare for no relocations.
6760
6761 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
6762
6763         * mini-ops.h: Add packed min/equal and sum of absolute differences.
6764         
6765         * cpu-x86.md: Same.
6766
6767         * mini-x86.c (mono_arch_output_basic_block): Same.
6768
6769         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
6770         extract mask, max, min and sum of absolute differences.
6771
6772         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
6773         method name.
6774
6775 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
6776
6777         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
6778         Renamed one test for consistency.
6779
6780 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
6781
6782         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
6783         fix to the code that deal with other blocks.
6784
6785 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
6786
6787         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
6788
6789 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
6790
6791         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
6792         that deals with vreg interference. Explicitly check for OP_LDADDR to be
6793         able to process the source reg.
6794
6795 2008-10-16  Martin Baulig  <martin@ximian.com>
6796
6797         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
6798
6799         * inssel.brg: Add `OP_HARD_NOP'.
6800
6801         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
6802
6803         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
6804         `OP_HARD_NOP' instruction when running inside the debugger.
6805
6806         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
6807         `OP_HARD_NOP' instruction when running inside the debugger.
6808
6809 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
6810
6811         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
6812         now works. The issue with the regalloc tripping up no longer
6813         happens.
6814
6815         * simd-intrinsics.c (load_simd_vreg): Same.
6816
6817 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
6818         
6819         * basic-simd.cs: Tests for new Vector8ui methods.
6820
6821 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
6822
6823         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
6824         only for type. This fixes crashes where MonoInst::klass is checked
6825         for ops of type != VTYPE or OBJ.
6826
6827         * simd-intrinsics.c (load_simd_vreg): Same.
6828
6829 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
6830
6831         * mini-ops.h: Add ops for packed shuffle/max/avg and
6832         extract mask.
6833         
6834         * cpu-x86.md: Same.
6835
6836         * mini-x86.c (mono_arch_output_basic_block): Same.
6837
6838         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
6839         extract mask.
6840
6841         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
6842         to emit extract mask op.
6843
6844         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
6845         to emit word shuffles.
6846
6847 2008-10-15  Mark Probst  <mark.probst@gmail.com>
6848
6849         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
6850         the largest alignment needed by a variable, but at least
6851         sizeof(gpointer).
6852
6853 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
6854
6855         * basic-simd.cs: Tests for the fixes in the last commit.
6856
6857 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
6858
6859         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
6860         no longer handles STACK_PTR input.
6861
6862         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
6863
6864         * simd-intrinsics.c (load_simd_vreg): New function that works like 
6865         get_simd_vreg   but handles STACK_PTR input.
6866
6867         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
6868         as the input can be an arbitrary pointer.
6869
6870         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
6871         LDADDR local optimization directly otherwise use a store op.
6872
6873 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
6874
6875         * basic-simd.cs: Tests for dup low and dup high.
6876
6877 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
6878
6879         * mini-ops.h: Add dup low and dup high ops.
6880         
6881         * cpu-x86.md: Same.
6882
6883         * mini-x86.c (mono_arch_output_basic_block): Same.
6884
6885         * simd-intrinsics.c (vector4f_intrinsics): Same.
6886
6887 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
6888
6889         * basic-simd.cs: Tests for recently added functionality.
6890
6891 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
6892
6893         * mini-ops.h: Add remaining sse1 fp ops.
6894         
6895         * cpu-x86.md: Add remaining sse1 fp ops.
6896
6897         * mini-x86.c (mono_arch_output_basic_block): Same.
6898
6899         * mini.h: Add enum for simd FP compare conditions.
6900
6901         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
6902
6903         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
6904         so the backed can generate the appropriate op.
6905
6906 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
6907         This patch squeese one more byte from the SimdIntrinsc struct.
6908
6909         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
6910         a a shift amount intead of simply or'ing it.
6911
6912         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
6913
6914         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
6915         byte so we can have an aditional flags field without increasing struct size.
6916
6917         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
6918         against the simd_supported_versions bitmask.
6919
6920         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
6921
6922 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
6923
6924         * mini.c: remove rawbuffer code (the only use here is unsafe because
6925         it takes locks during signal handling and the kernel now provides much
6926         better info in proc/pid/smaps these days).
6927
6928 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
6929
6930         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
6931         OP_X86_PUSH_OBJ. Fixes #434620.
6932
6933         * objects.cs: Add a test.
6934         
6935 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
6936
6937         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
6938         that the packuswb/packusdw don't work with unsigned numbers for what
6939         would be negative numbers in signed format.
6940
6941         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
6942         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
6943
6944         * mini-ops.h: Add doubleword forms of many ops and packing ones.
6945
6946         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
6947
6948         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
6949
6950         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
6951
6952         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
6953         add more ops.
6954
6955         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
6956         version as the enum in mini.h.
6957
6958         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
6959         for sse3 ops, check the simd_version field if present. This way the code
6960         works with all versions of sse.
6961
6962 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6963
6964         * simd-intrinsics.c: Fixed intrinsic name typo.
6965
6966         * mini.h: Added missing simd exported function.
6967
6968         * basic-simd.cs: Added tests for Vector4ui.
6969         Fixed broken test for Vector16b.
6970
6971 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
6972
6973         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
6974         the max length to 64.
6975
6976 2008-10-10  Mark Probst  <mark.probst@gmail.com>
6977
6978         * method-to-ir.c: Only do the fast virtual generic method call for
6979         non-wrapper methods.
6980
6981         * mini.h, mini-trampolines.c: The new generic virtual remoting
6982         trampoline handles virtual method calls via the vtable (as done by
6983         the fast virtual generic method calls) to remoting proxies.
6984
6985         * mini.c (mono_jit_create_remoting_trampoline): For generic
6986         methods reate a generic virtual remoting trampoline.
6987
6988         * mini-amd64.h: Enable fast virtual generic method calls again.
6989
6990 2008-10-10  Mark Probst  <mark.probst@gmail.com>
6991
6992         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
6993         restore registers when doing tail calls.
6994
6995 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6996
6997         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
6998         Vector4ui.
6999
7000 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
7001
7002         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
7003
7004 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
7005
7006         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
7007
7008 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
7009
7010         * basic-simd.cs: Retrofit for API changes.
7011
7012 2008-10-10  Mark Probst  <mark.probst@gmail.com>
7013
7014         * mini-ppc.c: Handle integer stack arguments for tail calls.
7015
7016 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
7017
7018         * optflags-def.h: Removed sse3 optimization.
7019
7020         * driver.c: Same.
7021
7022         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
7023         sse3.
7024
7025         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
7026
7027         * mini.h: Added enumeration with simd versions.
7028
7029         * simd-intrinsics.c (emit_intrinsics): Use the new static var
7030         for detecting SSE3.
7031
7032         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
7033
7034         * mini.c (mini_init): Call mono_simd_intrinsics_init.
7035
7036 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
7037
7038         * basic-simd.cs: Added tests for Vector8u and Vector16u.
7039
7040         * basic-simd.cs: Fixed test naming.
7041
7042 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
7043
7044         * mini-ops.h: Added ops for packed and saturated math, shifts
7045         and packing/unpacking.
7046
7047         * cpu-x86.md: Added descriptors for the above ops.
7048
7049         * mini-x86.c: Added code to emmit the above ops.
7050
7051         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
7052
7053 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
7054
7055         * aot-compiler.c (compile_method): Enable AOT for generic code.
7056
7057         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
7058
7059 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
7060
7061         * mini.c: add a workaround for a common screwup that ends up blamed
7062         to mono (other processes blocking signal delivery).
7063
7064 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
7065
7066         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
7067         in the LDFLD/STFLD opcodes. Fixes #432673.
7068
7069         * iltests.il.in: Add a new test.
7070
7071 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
7072
7073         * mini-arm.c: attach the thread in unmanaged->managed transitions
7074         using delegates (bug #433148).
7075
7076 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
7077
7078        * basic-simd.cs: Use new ShuffleSel constants.
7079
7080 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
7081
7082         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
7083
7084         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
7085         only disable simd intrinsics if no sse2 is detected.
7086
7087         * optflags-def.h: Added sse3.
7088
7089         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
7090         is disabled.
7091
7092 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
7093
7094         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
7095         when adding delegate-invoke wrappers.
7096
7097 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
7098
7099         * Makefile.am: Reenable the simd tests.
7100
7101 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
7102
7103         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
7104           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
7105           other vreg is allocated to that hreg.
7106
7107         Contributed under MIT/X11 license.
7108
7109 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
7110
7111         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
7112         yet checked in.
7113
7114 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
7115
7116         * basic-simd.cs: New test suite for SIMD intrinsics.
7117
7118         * Makefile.am: Added new tests.
7119
7120 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
7121
7122         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
7123
7124         * mini-ops.h: Same.
7125
7126         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
7127
7128         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
7129         using SSE2 aware opcodes.
7130
7131         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
7132         is enabled, this code path is only reachable if conversion ops are emmited after
7133         mono_method_to_ir.
7134
7135         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
7136
7137         This optimization saves 6 bytes per conversion against the old version.
7138
7139 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
7140
7141         * aot-compiler.c (compile_method): Don't skip methods referencing 
7142         generic methods without a corresponding entry in token_info_hash, since
7143         encode_method_ref () can handle all generic methods now.
7144
7145         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
7146         generic context is set.
7147         
7148         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
7149         generic sharing of LDTOKEN.
7150
7151 2008-10-06  Mark Probst  <mark.probst@gmail.com>
7152
7153         * mini-amd64.h: Temporarily disabled fast virtual generic method
7154         calls because it breaks the System.Runtime.Remoting tests.
7155
7156 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
7157
7158         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
7159
7160         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
7161         so inlining actually works.
7162         (check_inline_caller_method_name_limit): Ditto.
7163
7164 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
7165
7166         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
7167         64 bit safety (from Olaf Hering and Andreas Farber).
7168
7169 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
7170         
7171         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
7172         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
7173         unused virtual call support code.
7174
7175         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
7176         
7177         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
7178         which can't use aot trampolines.
7179         (decode_patch): Don't create aot trampolines for methods which can't use
7180         them.
7181
7182         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
7183         use aot trampolines.
7184
7185         * mini.h: Bump AOT image format version.
7186         
7187 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
7188
7189         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
7190         to save_token_info () since cmethod is inflated for constrained calls.
7191
7192         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
7193
7194 2008-10-04  Andreas Farber  <andreas.faerber@web.de>
7195
7196         * Makefile.am: Add build rules for ppc64.
7197         This avoids the build failing at pedump with unresolved symbols
7198         due to lack of arch_sources. Instead it will now fail earlier
7199         due to lack of cpu-ppc64.md.
7200
7201         Contributed under MIT/X11 license.
7202
7203 2008-10-04  Mark Probst  <mark.probst@gmail.com>
7204
7205         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
7206         tail calls.
7207
7208         * iltests.il.in: Add test case for tail call with many arguments.
7209
7210 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
7211
7212         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
7213         to the fast virtual generic method code until the aot case is fixed.
7214
7215 2008-10-03  Mark Probst  <mark.probst@gmail.com>
7216
7217         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
7218
7219 2008-10-03  Mark Probst  <mark.probst@gmail.com>
7220
7221         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
7222         thunks.
7223
7224 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
7225         
7226         * simd-intrinsics.c: Forgot to add this one.
7227
7228         * mini-codegen.c: Fix macro in case SIMD is not supported.
7229
7230 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
7231         
7232         This patch land initial JIT support for simd intrinsics.
7233
7234         * mini-x86.h: Added new define to make --enable_minimal work on x86.
7235
7236         * Makefile.am: Added simd-intrinsics.c
7237
7238         * simd-intrinsics.c: New file with simd instrinsic related
7239         code.
7240
7241         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
7242
7243         * cpu-x86.md: Add simd related instructions.
7244
7245         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
7246
7247         * driver.c: Added two new --regression variants.
7248
7249         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
7250
7251         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
7252
7253         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
7254         extract some complicated logic to helper functions.
7255
7256         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
7257
7258         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
7259
7260         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
7261         the specialized simplification pass.
7262
7263         * method-to-ir.c (mono_spill_global_vars): Use new macro.
7264
7265         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
7266
7267         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
7268         table.
7269
7270         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
7271         if MONO_ARCH_NEED_SIMD_BANK is defined.
7272
7273         * mini-ops.h: Added the new simd ops.
7274
7275         * mini-x86.c: Added mono_arch_xregname.
7276
7277         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
7278
7279         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
7280
7281         * mini-x86.h: Define simd related MONO_ARCH macros.
7282
7283         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
7284
7285         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
7286
7287         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
7288         MONO_CLASS_IS_SIMD to deal with simd related IR.
7289
7290         * mini.h (MonoInst): Added spill_var to the backend union.
7291
7292         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
7293
7294         * mini.h: Added forward declarations of the new simd fuctions.
7295
7296         * optflags-def.h: Added new optimization names SIMD.
7297
7298         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
7299
7300         * regalloc.h: Added support for working with 3 register banks.
7301
7302         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
7303
7304         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
7305
7306 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
7307
7308         * mini-exceptions.c: remove 64 bit related ifdef clutter.
7309
7310 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
7311
7312         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
7313         instead of one on 64 bit systems.
7314
7315         * method-to-ir.c: Remove unused includes.
7316
7317 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
7318
7319         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
7320         cfg->used_int_regs, since the two are different on arm.
7321
7322 2008-10-02  Mark Probst  <mark.probst@gmail.com>
7323
7324         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
7325         mono_method_get_vtable_index() to get the vtable index.
7326
7327 2008-10-02  Mark Probst  <mark.probst@gmail.com>
7328
7329         * method-to-ir.c (mono_method_to_ir2): Don't create native
7330         wrappers for array methods, because they're never called (and if
7331         they were called they wouldn't work).
7332
7333 2008-10-02  Mark Probst  <mark.probst@gmail.com>
7334
7335         * method-to-ir.c (mono_method_to_ir2): Array methods are
7336         special-cased and must not be invoked indirectly via the (M)RGCTX
7337         when generic sharing is turned on.  Fixes #431413.
7338
7339 2008-10-01  Mark Probst  <mark.probst@gmail.com>
7340
7341         * method-to-ir.c: When generic sharing is active, call
7342         non-interface virtual generic methods via the standard trampoline.
7343
7344         * mini-trampolines.c: Handle virtual generic shared methods.
7345
7346         * mini.h, mini-x86.c, mini-x86.h: New argument for
7347         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
7348         method thunks and which is the trampoline to call if the lookup
7349         fails.  Enable the virtual generic method thunk for x86.
7350
7351         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
7352         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
7353         argument but assert that it's NULL, because these archs don't yet
7354         implement the virtual generic method thunk.  Changes in the IMT
7355         thunk data structures.
7356
7357 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
7358
7359         * aot-compiler.c (emit_globals): Avoid invalid characters in
7360         the static linking symbol.
7361
7362         * objects.cs: Add a test for the range check optimization. Fix warnings.
7363
7364         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
7365         optimization from the current JIT.
7366
7367         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
7368         later in decompose_array_access_opts () to allow more optimizations.
7369
7370         * method-to-ir.c (mono_handle_soft_float): Rename this to 
7371         mono_decompose_soft_float () for consistency.
7372
7373         * mini-ops.h: Fix arguments of OP_STRLEN.
7374
7375         * method-to-ir.c (save_cast_details): Extract the cast details saving code
7376         into a separate function.
7377         (reset_cast_details): Ditto.
7378         (handle_unbox): Save cast details. Fixes #431254.
7379
7380         * method-to-ir.c: Remove some obsolete FIXMEs.
7381
7382 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
7383
7384         * ir-emit.h (alloc_dreg): Write a warning before crashing.
7385
7386 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
7387
7388         * mini-codegen.c: More work on macros to make them
7389         ready for multiple regbanks.
7390
7391 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
7392
7393         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
7394
7395         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
7396
7397 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
7398
7399         * mini-codegen.c (mono_spillvar_offset): Proper support for
7400         multiple regbanks.
7401
7402 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
7403
7404         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
7405         the stack overflow changes.
7406
7407 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
7408
7409         * mini-codegen.c: Make all bank macros depend on reg_bank.
7410
7411         * mini-codegen.c (mono_local_regalloc): Make free mask
7412         initialization regbank aware.
7413
7414 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
7415
7416         * mini-codegen.c (mono_local_regalloc): Extract callee
7417         mask selection to a function and make it regbank aware.
7418
7419 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
7420
7421         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
7422         code to deal with many regbanks.
7423
7424 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
7425
7426         * mini-codegen.c: More fp->regbank changes.
7427
7428 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
7429
7430         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
7431         of a hardcoded constant.
7432
7433 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
7434
7435         * method-to-ir.c (type_from_stack_type): Fix typo.
7436
7437 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
7438
7439         * mini-ia64.c (emit_move_return_value): Convert float return values to
7440         double.
7441
7442         * objects.cs: Add a new test.
7443         
7444         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
7445         VARARG methods to fix an assert later.
7446
7447         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
7448         end so it at least compiles.
7449
7450 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
7451
7452         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
7453
7454 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
7455
7456         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
7457         optimization to a new function (emit_optimized_ldloca_ir) and enable
7458         it for both ldloca and ldloca_s.
7459
7460 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
7461
7462         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
7463         gshared CASTCLASS code.
7464
7465         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
7466         amd64, where the libc stack unwinder encounters stack frames referring to
7467         native code in unmapped memory.
7468
7469         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
7470         sharing.
7471
7472         * generics.cs: Add new test.
7473
7474 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
7475
7476         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
7477         add a check that one of the ARM_FPU_ constants is defined.
7478
7479         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
7480         
7481         * mini-exceptions.c: Fix build on non-altstack platforms.
7482
7483         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
7484         sharing of vtypes.
7485
7486         * ir-emit.h: Add a comment to NEW_PCONST.
7487
7488         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
7489
7490         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
7491
7492         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
7493         after the changes to MonoJitDomainInfo.
7494
7495 2008-09-27  Mark Probst  <mark.probst@gmail.com>
7496
7497         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
7498
7499 2008-09-27  Mark Probst  <mark.probst@gmail.com>
7500
7501         * mini-ppc.c: Compiler warning fixes.
7502
7503 2008-09-27  Mark Probst  <mark.probst@gmail.com>
7504
7505         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
7506         for pinvokes.
7507
7508 2008-09-27  Mark Probst  <mark.probst@gmail.com>
7509
7510         * exceptions-ppc.c, mini-ppc.h: Compile
7511         mono_arch_handle_altstack_exception() on Darwin, too.
7512
7513 2008-09-27  Mark Probst  <mark.probst@gmail.com>
7514
7515         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
7516         work on archs which don't have generic sharing implemented, only
7517         without the vtable_arg.
7518
7519 2008-09-26  Mark Probst  <mark.probst@gmail.com>
7520
7521         * mini.c: Added comment explaining why delegate ctor icall
7522         wrappers are compiled.
7523
7524 2008-09-26  Mark Probst  <mark.probst@gmail.com>
7525
7526         * mini.c: Don't produce trampolines to delegate ctor icall
7527         wrappers but compile them upfront.
7528
7529 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
7530
7531         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
7532         runtime-set function when going back to managed code. Currently this
7533         is used to set back the protection on the soft ovf pages and/or to
7534         throw the stack overflow exception that happened in unmanaged code.
7535
7536 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
7537
7538         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
7539         runtime-set function when going back to managed code. Currently this
7540         is used to set back the protection on the soft ovf pages and/or to
7541         throw the stack overflow exception that happened in unmanaged code.
7542
7543 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
7544
7545         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
7546         the support code for restoring stack protection after stack overflows
7547         that happen in unmanaged code. Don't set the exec permission on the
7548         soft overflow area.
7549
7550 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
7551
7552         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
7553         delegate->method_ptr is set. Fixes #428054.
7554
7555 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
7556
7557         * tests.cs: Rename to ratests.cs.
7558
7559         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
7560         emit_get_rgctx_... functions.
7561
7562 2008-09-25  Mark Probst  <mark.probst@gmail.com>
7563
7564         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
7565
7566 2008-09-25  Mark Probst  <mark.probst@gmail.com>
7567
7568         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
7569         before asserting that method is sharable.
7570
7571 2008-09-25  Mark Probst  <mark.probst@gmail.com>
7572
7573         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
7574         whether method needs a static RGCTX wrapper used instead of
7575         complex conditions.
7576
7577         * generic-sharing.c, mini.h: A few functions moved to
7578         metadata/generic-sharing.c.
7579
7580 2008-09-25  Mark Probst  <mark.probst@gmail.com>
7581
7582         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
7583         Generic code sharing for value types, which essentially means
7584         treating value type methods like static methods.  The RGCTX is
7585         passed in the same way.
7586
7587 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
7588
7589         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
7590         opcode when creating multi-dimensional arrays of open types.
7591
7592         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
7593         open generic types.
7594
7595         * generics.cs: Add a test.
7596
7597         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
7598
7599 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
7600
7601         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
7602
7603         * mini.c (mini_method_compile): Set it when running under the debugger. 
7604
7605         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
7606         vreg optimization if the flag is set.
7607
7608         * driver.c (mono_main): Add --attach= option to pass options to
7609         the attach agent.
7610
7611         * mini.c (sigquit_signal_handler): Start the attach agent.
7612
7613         * ssapre.c: Disable this to save space since it is not yet ported to
7614         linear IR.
7615
7616         * regalloc2.c: Disable this to save space.
7617
7618         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
7619
7620 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
7621
7622         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
7623         the -v option useful again.
7624
7625 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
7626
7627         * mini-amd64.c (mono_arch_output_basic_block): Add support for
7628         --break-at-bb.
7629
7630         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
7631         arrays of arrays. Fixes #428406.
7632
7633         * method-to-ir.c (mini_emit_castclass): Ditto.
7634
7635         * objects.cs: Add new test.
7636         
7637 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
7638
7639         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
7640         was wrong at it choked against target_type_is_incompatible for byref types.
7641
7642 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
7643
7644         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
7645         places.
7646
7647 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
7648
7649         * mini-exceptions.c: update a few more exceptions-related counters.
7650
7651 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
7652
7653         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
7654         new functions to allocate from persistent mempools.
7655
7656 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
7657
7658         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
7659         multiple register banks in the future.
7660
7661         * mini-codegen.c (mono_local_regalloc): Fix a warning.
7662
7663 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
7664
7665         * mini.c (type_to_eval_stack_type): Remove duplicated function.
7666
7667         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
7668
7669         * mini.h: Export type_to_eval_stack_type.
7670
7671         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
7672         is only ins->klass of byref types.
7673
7674 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
7675
7676         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
7677         (mini_emit_memcpy2): Ditto.
7678
7679         * mini-amd64.c: Fix a warning.
7680
7681 2008-09-21  Mark Probst  <mark.probst@gmail.com>
7682
7683         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
7684         linking.
7685
7686 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
7687
7688         * method-to-ir.c: Extract stloc micro-optimization to a
7689         function and apply it to all cases.
7690
7691 2008-09-19  Mark Probst  <mark.probst@gmail.com>
7692
7693         * method-to-ir.c: Don't fail generic code sharing in cases we
7694         already support.
7695
7696 2008-09-18  Mark Probst  <mark.probst@gmail.com>
7697
7698         * mini-ppc.c: Handle structs in tailcalls on Darwin.
7699
7700 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
7701
7702         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
7703         implementation.
7704
7705 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
7706
7707         * trace.c: make tracing more useful and correct, with per-thread
7708         id and indent info.
7709
7710 2008-09-15  Mark Probst  <mark.probst@gmail.com>
7711
7712         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
7713         doing a method call and the argument is an R4.
7714
7715 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
7716
7717         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
7718         generic methods.
7719
7720 2008-09-13  Mark Probst  <mark.probst@gmail.com>
7721
7722         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
7723
7724 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
7725
7726         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
7727         (MONO_JUMP_TABLE_FROM_INS): Ditto.
7728
7729 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
7730
7731         * driver.c: Add a --agent argument (not supported yet) to load managed
7732         agent assemblies before loading the main assembly, similarly to how the
7733         Java VM handles agents.
7734
7735 2008-09-11  Mark Probst  <mark.probst@gmail.com>
7736
7737         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
7738         function to do stack layout of local variables.
7739
7740 2008-09-11  Mark Probst  <mark.probst@gmail.com>
7741
7742         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
7743         calculation.
7744
7745 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
7746
7747         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
7748         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
7749         JIT if DISABLE_JIT is defined.
7750
7751         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
7752         defined.
7753
7754 2008-09-10  Mark Probst  <mark.probst@gmail.com>
7755
7756         * iltests.il.in: Disable the fconv test on PPC (the result is
7757         undefined according to ECMA).
7758
7759 2008-09-10  Mark Probst  <mark.probst@gmail.com>
7760
7761         * iltests.il.in: Enable tail call tests for PPC.
7762
7763         * mini.h: Add variable for storing incoming valuetype argument
7764         addresses for tail calls.
7765
7766         * mini-ppc.c: Implement valuetype arguments and return values for
7767         tailcalls on Linux.
7768
7769 2008-09-09  Mark Probst  <mark.probst@gmail.com>
7770
7771         * mini-ppc.c: Partially implement tail calls (struct arguments and
7772         return values not supported).
7773
7774         * method-to-ir.c: Enable tail calls on PPC.
7775
7776 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
7777
7778         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
7779         runtime-invoke wrappers to work around the problem of them getting
7780         assigned to a random class.
7781
7782         * aot-runtime.c (mono_aot_get_method): Ditto.
7783         
7784 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
7785
7786         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
7787         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
7788
7789 2008-09-07  Mark Probst  <mark.probst@gmail.com>
7790
7791         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
7792         until they're implemented properly.
7793
7794         * exceptions-ppc.c: Use arch-independent exception-handling code
7795         instead of custom one.
7796
7797         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
7798         for Linear IR.
7799
7800         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
7801
7802         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
7803         applies when __powerpc__ is defined.
7804
7805 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
7806
7807         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
7808         methods to their code to avoid computing the full name of wrappers and
7809         doing a lookup in a string hash table.
7810
7811 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
7812
7813         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
7814         we identify bblocks before method_to_ir () is ran.
7815
7816         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
7817         Also avoid optimizing branches pointing to themselves.
7818
7819         * mini.c (mini_method_compile): Ditto. Fixes #422947.
7820
7821 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
7822
7823         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
7824
7825 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
7826
7827         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
7828         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
7829         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
7830         'buf'.
7831
7832         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
7833         jumped to the same entry in plt_jump_table.
7834
7835 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
7836
7837         * method-to-ir.c (initialize_array_data): Handle field with RVA from
7838         dynamic images.
7839
7840 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
7841
7842         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
7843         other assignment can be if converted. Saves 1.5% on corlib size and fixes
7844         #421807.
7845
7846 2008-08-29  Geoff Norton  <gnorton@novell.com>
7847
7848         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
7849         segment, and doesn't properly handle .space as .text.  Fixes
7850         AOT Mach/ARM
7851
7852 2008-08-29  Geoff Norton  <gnorton@novell.com>
7853
7854         * mini.c: Disable the mach exception handler when running on 
7855         ARM
7856
7857 2008-08-29  Geoff Norton  <gnorton@novell.com>
7858
7859         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
7860         globals on Darwin/ARM
7861
7862 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
7863
7864         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
7865         since too many things depend on it. Instead, call 
7866         mono_runtime_set_no_exec ().
7867         
7868         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
7869         the new JIT.
7870
7871         * aot-compiler.c: Add an 'asm-only' AOT option.
7872
7873         * mini.c: Avoid initializing the runtime when doing AOT compilation.
7874                 
7875         * aot-compiler.c (compile_method): Disable gshared support for now as it
7876         doesn't yet work.
7877
7878 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
7879
7880         * mini-amd64.h : Fix a compiler warning.
7881
7882         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
7883           Changed to use a callback function to retrieve the unwind info.
7884           This avoids problems observed when code blocks were removed by
7885           unloading an app domain.
7886
7887         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
7888           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
7889           to work properly.
7890
7891         Contributed under MIT/X11 license.
7892
7893 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
7894
7895         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
7896           case to keep the stack aligned to 8.
7897
7898         Contributed under MIT/X11 license.
7899
7900 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
7901
7902         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
7903         avoid repeated linear searches.
7904
7905 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
7906
7907         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
7908         methods it can't handle.
7909         
7910         * aot-compiler.c (add_method): Avoid adding a method twice.
7911         (add_wrappers): Add runtime invoke wrappers for all methods.
7912
7913         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
7914         function to create an aot-compatible version of this trampoline.
7915
7916         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
7917
7918 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
7919
7920         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
7921
7922         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
7923         with a generic sharing failure.
7924
7925         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
7926
7927         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
7928         CEE_RETHROW. Fixes #419634.
7929
7930         * mini.c (mono_method_to_ir): Ditto.
7931
7932         * exceptions.cs: Add a new test.
7933         
7934         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
7935         to mono_type_stack_size_internal () since some callers might not pass in
7936         an rgctx.
7937
7938         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
7939         instrument_prolog. Fixes #419878.
7940
7941         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
7942         doubles in soft float mode volatile.
7943
7944 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
7945
7946         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
7947
7948         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
7949         to handle soft float correctly.
7950
7951         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
7952         the fast path.
7953
7954         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
7955
7956         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
7957         to sp, since the generics catch code requires it.
7958
7959         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
7960         copying.
7961
7962         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
7963         mono_arch_emit_imt_argument ().
7964
7965         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
7966
7967         * mini-arm.c tramp-arm.c: Generic sharing updates.
7968
7969 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
7970
7971         * mini-arm.c: Fix the arm build.
7972
7973         * generic-sharing.c (mini_type_get_underlying_type): New helper function
7974         handling enums, generic instances and generic sharing.
7975         (mini_type_stack_size_full): Ditto.
7976
7977         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
7978         
7979         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
7980
7981         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
7982
7983         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
7984         trampolines.
7985
7986         * mini-arm.c: Various small generic sharing changes.
7987
7988         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
7989         this for x86.
7990         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
7991         custom code.
7992
7993         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
7994         helper function to return a generic class init trampoline.
7995
7996         * method-to-ir.c mini.c: Use it.
7997         
7998         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
7999         arch-specfic function to return a generic class init trampoline.
8000
8001         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
8002         the GENERIC_CLASS_INIT custom code.
8003
8004         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
8005         a fatal error, not a sharing failure.
8006
8007         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
8008         needed.
8009
8010         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
8011         trampoline argument from MONO_ARCH_VTABLE_REG.
8012
8013         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
8014         order of the arguments to the C trampoline: pass 'slot' as the trampoline
8015         argument, and pass the vtable in VTABLE_REG.
8016
8017         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
8018         order of the arguments to the C trampoline: pass 'slot' as the trampoline
8019         argument, and pass the vtable in VTABLE_REG.
8020         (mono_arch_create_trampoline_code_full): Remove some special casing for
8021         the rgctx fetch trampoline.
8022
8023         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
8024         Fixes #419273.
8025
8026         * iltests.il: Add a test for it.
8027
8028 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
8029
8030         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
8031
8032         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
8033         no longer needed.
8034
8035         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
8036         use mono_jit_info_table_find () to avoid recursion.
8037         (mono_delegate_trampoline): Add a sync wrapper here.
8038
8039         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
8040         here.
8041
8042         * mini.c (mono_method_to_ir): Ditto.
8043         
8044         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
8045         add_sync_wrapper argument. Don't add a sync wrapper here.
8046         (mono_create_jump_trampoline): Don't add a sync wrapper here.
8047
8048         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
8049         
8050 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
8051
8052         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
8053           of nonvolatile registers back from MonoContext to CONTEXT.
8054
8055         Contributed under MIT/X11 license.
8056
8057 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
8058
8059         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
8060           arguments on Winx64 there are only 4 argument registers.  For this
8061           logic to work the last argument must be pulled from the stack.  
8062
8063         Contributed under MIT/X11 license.
8064
8065 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
8066
8067         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
8068
8069         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
8070         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
8071         encode/decode_method_ref ().
8072
8073         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
8074
8075         * aot-runtime.c (decode_patch): Ditto.  
8076
8077         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
8078         MONO_PATCH_INFO_METHOD.
8079
8080         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
8081         MonoGenericJitInfo.
8082
8083         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
8084         MonoGenericJitInfo.
8085
8086         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
8087
8088         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
8089         one from the caller.
8090
8091         * aot-runtime.c (decode_generic_inst): New function to decode and
8092         return a interned generic inst.
8093         (decode_klass_ref): Use it.
8094         (decode_method_ref): Ditto.
8095
8096         * aot-compiler.c (emit_exception_debug_info): Save 
8097         jinfo->has_generic_jit_info too.
8098
8099 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
8100
8101         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
8102
8103         * iltests.il.in: Add a test for fconv_to_i.
8104
8105         * liveness.c: Disable the liveness2 pass for now to save space.
8106
8107         * regalloc2.c: Include mempool-internals.h to fix warnings.
8108
8109         * aot-compiler.c (encode_method_ref): Encode the context of generic
8110         instance methods.
8111
8112         * aot-runtime.c (decode_method_ref): Inflate generic methods using
8113         the context saved in the aot file.
8114
8115         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
8116
8117         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
8118
8119         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
8120         volatile so they won't be optimized away.
8121
8122 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
8123
8124         * ssa.c:
8125         * ssa2.c:
8126         * mini.c:
8127         * regalloc2.c:
8128         * dominators.c: Remove duplicated functions that now are in
8129         mempool-internals.h.
8130
8131 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
8132
8133         * aot-compiler.c: Fix warnings.
8134
8135         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
8136
8137         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
8138
8139         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
8140         as the patch type.
8141
8142         * mini.c (mono_resolve_patch_target): Ditto.
8143         
8144         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
8145         (encode_klass_ref): Add support for encoding VARs/MVARs.
8146
8147         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
8148
8149         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
8150         the handling of the got entries into a separate 'decode_got_entry' function.
8151         Add support for RGCTX_FETCH.
8152
8153         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
8154         clobbered by the trampoline code.
8155
8156         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
8157         not clobbered by the indirect calling code.
8158
8159 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
8160
8161         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
8162         to fix the build.
8163
8164 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
8165
8166         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
8167         signature using the compilation mempool otherwise we would leak it.
8168
8169 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
8170
8171         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
8172         mono_emit_abs_call ().
8173
8174         * patch-info.h: Add GENERIC_CLASS_INIT.
8175
8176         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
8177
8178         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
8179         as their target as a near call.
8180
8181         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
8182         ABS handling code.
8183         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
8184
8185         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
8186         call to a runtime function described by a patch.
8187
8188         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
8189         mono_emit_abs_call, this has the advantage that the ABS handling code in
8190         mono_codegen () can handle them both, and can handle other stuff in the
8191         future without additional code.
8192
8193         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
8194         entry.
8195         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
8196         abs addresses.
8197
8198         * mini.h: Add missing bblock related prototypes.
8199
8200         * mini.h (MonoCompile): Remove unused reverse_inst_list and
8201         reverse_inst_list_len fields.
8202
8203         * mini.c: Refactor this file a bit by moving branch optimizations to 
8204         branch-opts.c.
8205
8206         * method-to-ir.c: Merge generic sharing changes missed earlier.
8207
8208         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
8209
8210         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
8211         shared patches. Process METHODCONST as a shared patch.
8212
8213         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
8214         as it crashes on the 2.0 mscorlib.
8215
8216         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
8217         to cause crashes.
8218         
8219         * aot-compiler.c: Use is_plt_patch () in a few additional places.
8220         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
8221         by IMT.
8222
8223         * aot-compiler.c: Reorganize the got handling code to be a bit more
8224         understandable.
8225
8226 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
8227
8228         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
8229         mono_patch_info_equals/hash, and use it to massively simplify
8230         get_plt_index ().
8231
8232         * mini.c (mono_patch_info_hash): Simplify this and add support for
8233         more patch types.
8234
8235         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
8236
8237         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
8238         handling code, since an offset is not enough to identify a trampoline.
8239
8240         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
8241
8242 2008-08-17  Mark Probst  <mark.probst@gmail.com>
8243
8244         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
8245
8246         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
8247
8248         * mini-ops.h: Argument and result types for OVF_CARRY ops.
8249
8250         * decompose.c: PPC decompositions for various ops.
8251
8252         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
8253
8254 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
8255
8256         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
8257         call the generic trampoline code using a call, instead of a jump, to
8258         remove some special casing from the generic trampoline code.
8259
8260         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
8261         (mono_codegen): Ditto.
8262
8263         * aot-compiler.c aot-runtime.c: Ditto.
8264
8265         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
8266
8267         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
8268         helper function to find the offset corresponding to a lazy fetch trampoline.
8269
8270         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
8271         when doing generic sharing.
8272
8273         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
8274         places.
8275         
8276         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
8277         mini-trampolines.c to be with the other trampoline creation functions.
8278
8279         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
8280         as it is equal to method->signature in most cases, add a 
8281         mono_emit_method_call_full variant which takes a signature and an imt
8282         argument as well.
8283
8284 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
8285
8286         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
8287         to this function, since it could be computed easily from the method 
8288         argument.
8289         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
8290         more.
8291
8292         * method-to-ir.c mini.c: Remove references to 
8293         compile_generic_method_wo_context.
8294
8295         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
8296         generic method calls.
8297         
8298         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
8299         dimensional non-szarrays.
8300
8301         * mini.c (mini_init): Register mono_array_new_1.
8302
8303         * jit-icalls.c (mono_array_new_1): New jit icall.
8304
8305         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
8306         pointing to the method.
8307
8308         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
8309         method addresses belonging to METHOD_JUMP patches in the 
8310         jump_target_got_slot_hash.
8311         (mono_aot_load_method): Ditto.
8312
8313         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
8314         METHOD_JUMP patches.
8315
8316         * mini.c (mini_create_jit_domain_info): New helper function which 
8317         initializes/frees domain->runtime_info.
8318         (mini_free_jit_domain_info): Ditto.
8319         (mini_init): Install the domain hook functions with the runtime.
8320
8321         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
8322         information maintained by the JIT.
8323
8324         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
8325         insertion into jump_table_hash into mono_codegen (), also implement proper
8326         locking.
8327
8328         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
8329         tail calls, it is already done by the aot code.
8330         
8331         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
8332         mechanism on amd64.
8333
8334         * iltests.il.in: Make the jmp test a bit more complex.
8335
8336         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
8337         generic instances which doesn't have a token.
8338
8339         * aot-runtime.c (decode_method_ref): Ditto.
8340         
8341         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
8342         can handle this case now.
8343         (handle_box): Ditto.
8344
8345 2008-08-15  Geoff Norton  <gnorton@novell.com>
8346
8347         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
8348         debugging check.
8349
8350 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
8351
8352         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
8353         calling generic methods.
8354
8355         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
8356
8357         * aot-runtime.c (decode_patch_info): Ditto.
8358
8359         * mini.c (mono_resolve_patch_target): Ditto.
8360         
8361         * patch-info.h: Add METHOD_RGCTX.
8362
8363         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
8364
8365 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
8366
8367         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
8368         arguments in registers.
8369
8370         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
8371         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
8372
8373         * mini.c (mini_method_compile): Abort aot compilation for generic
8374         methods if generic sharing is disabled.
8375         
8376         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
8377         an mrgctx.
8378
8379         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
8380         requiring an mrgctx.
8381
8382         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
8383         store instructions when converting a vcall to a normal call.
8384
8385         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
8386         mono_arch_find_jit_info.
8387
8388 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
8389
8390         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
8391         avoid calling mono_method_full_name () for every method even if the
8392         env var is not set.
8393         (check_inline_caller_method_name_limit): Ditto.
8394
8395 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
8396
8397         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
8398         assemblies in one run.
8399
8400         * aot-compiler.c (mono_compile_assembly): Only print out a count of
8401         skipped methods if it is not 0.
8402
8403         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
8404
8405 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
8406
8407         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
8408           MONO_ARCH_HAVE_UNWIND_TABLE.
8409
8410         Contributed under MIT/X11 license.
8411
8412 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
8413
8414         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
8415           from default optimizaton list on Winx64.
8416
8417         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
8418
8419         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
8420           the LMF from the MonoJitTlsData structure.
8421
8422         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
8423
8424         Contributed under MIT/X11 license.
8425
8426 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
8427
8428         * mini.c (sigsegv_signal_handler): Fix the build.
8429
8430         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
8431         assembly->aot_module.
8432
8433         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
8434         hash table. This simplifies and speeds up a lot of code, and fixes support
8435         for .netmodules.
8436
8437         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
8438         with the runtime.
8439
8440         * mini-exceptions.c: Ditto.
8441         
8442         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
8443         'native_offset' argument, since these are computed in the 
8444         mono_find_jit_info () function.
8445
8446         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
8447         is used by exceptions-ppc.c.
8448
8449         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
8450         mono_arch_find_jit_info ().
8451         
8452         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
8453         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
8454         generic code in mini-exceptions.c.
8455
8456 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
8457
8458         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
8459
8460         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
8461         
8462         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
8463         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
8464         called while holding the loader lock. Fixes #415608.
8465         (mono_aot_get_method_from_token_inner): Ditto.
8466
8467 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
8468
8469         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
8470         to reduce differences between this and the generic implementation in
8471         mini-exceptions.c.
8472         (ves_icall_get_frame_info): Ditto.
8473
8474         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
8475
8476         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
8477         longer neccesarry.
8478
8479         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
8480         mono_arch_get_call_filter () and make it non-static, for consistency with the
8481         other architectures.
8482
8483 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
8484
8485         * mini.c:
8486         * local-propagation.c:
8487         * mini-x86.c: Correct the name of arch defines.
8488
8489 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
8490
8491         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
8492         NO_EMULATE_LONG_SHIFT_OPS define.
8493
8494 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
8495
8496         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
8497         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
8498
8499         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
8500         MACH fixes. Merged from the 2.0 branch.
8501
8502         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
8503
8504         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
8505         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
8506
8507         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
8508
8509         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
8510         mono_marshal_get_native_wrapper () signature changes.
8511
8512 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
8513
8514         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
8515         conversion bug under arm.
8516
8517 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
8518
8519         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
8520
8521         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
8522         with overflow checking.
8523
8524 2008-08-05  Marek Habersack  <mhabersack@novell.com>
8525
8526         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
8527         to the genmdesc.pl file
8528
8529 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
8530
8531         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
8532         arg_array in the soft-float versions of the LOAD/STORE macros.
8533
8534         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
8535         implementation.
8536
8537         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
8538
8539 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
8540
8541         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
8542         a float HFA. Fixes #413621.
8543
8544 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
8545
8546         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
8547         frame_size to args_size. Fixes build.
8548
8549 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
8550
8551         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
8552         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
8553
8554         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
8555         the stack are not unaligned. Fixes #413247.
8556         
8557 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
8558
8559         * mini.c: update jitted methods performance counters.
8560
8561 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
8562
8563         * mini-exceptions.c: increase the exceptions thrown performance
8564         counter in mono_handle_exception ().
8565
8566 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
8567
8568         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
8569         can work with netmodules.
8570
8571 2008-07-28  Geoff Norton  <gnorton@novell.com>
8572
8573         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
8574         regression tests.
8575
8576 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
8577
8578         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
8579         correct place.
8580
8581 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
8582
8583         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
8584           The float param registers and other param registers must be the 
8585           same index on Windows x64.
8586
8587         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
8588           ArgValuetypeAddrInIReg argument case.  Setting the argument
8589           op to OP_VTARG_ADDR (OP_REGOFFSET)).
8590
8591         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
8592           variable computed above as the copy length for arguments of storage
8593           type ArgValuetypeAddrInIReg.
8594
8595         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
8596           ArgValuetypeAddrInIReg argument case.  This case will rely on
8597           mono_arch_emit_outarg_vt to emit the correct code later in the process.
8598
8599         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
8600           a 32 byte stack allocation for all calls.  We will omit the adjustment for
8601           jump and tail call instructoins as they do not follow the typical call behavior.
8602
8603         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
8604           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
8605           local variable and pass the local variable by reference to the called method.
8606
8607         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
8608           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
8609           of a struct is passed in a register it must be saved with the other
8610           volatile argument on the stack.
8611
8612         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
8613           frame pointer the stack adjustment value must be saved to the unwind 
8614           info structure.
8615
8616         Contributed under MIT/X11 license.
8617
8618 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
8619
8620         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
8621         which got lost in the merge.
8622
8623 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
8624
8625         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
8626         build.
8627
8628         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
8629         
8630         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
8631         icalls, since they won't be patched.
8632
8633         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
8634         different code sequence when running under valgrind to prevent some valgrind
8635         errors.
8636
8637         * iltests.il.in: Add new regression test.
8638
8639         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
8640         end with a throw.
8641
8642         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
8643         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
8644
8645         * iltests.il.in: Add new test.
8646
8647         * aot-compiler.c: Fix some warnings.
8648
8649         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
8650         Fixes #412494.
8651
8652 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
8653
8654         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
8655         (mini_usage_jitdeveloper): Add a missing --wapi option.
8656
8657 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
8658
8659         * mini-codegen.c: Simplify the is_fp macros.
8660         (free_up_ireg): Remove, use free_up_reg instead.
8661         (free_up_reg): Fix the fp case.
8662
8663 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
8664
8665         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
8666         lowered earlier.
8667
8668         * exceptions-x86.c: Merge some changes which seemed to have got lost
8669         in the linear-ir merge.
8670
8671         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
8672
8673         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
8674         long vreg volatile even if the variable was already created.
8675
8676         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
8677         volatile variables.
8678
8679 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
8680
8681         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
8682
8683         * mini.c (mono_jit_compile_method_inner): Add support for 
8684         MONO_EXCEPTION_BAD_IMAGE.
8685
8686         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
8687         mini_method_get_context () returns NULL. Fixes #356531.
8688
8689         * mini.c (mono_method_to_ir): Ditto.
8690         
8691         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
8692         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
8693
8694 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
8695
8696         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
8697         in the LDFTN implementation.
8698
8699 2008-07-25  Mark Probst  <mark.probst@gmail.com>
8700
8701         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
8702         code, patch calls to icalls, too, even if they're not in the
8703         shared generic code hash.  Fixes #411962.
8704
8705 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
8706
8707         * cpu-x86.md: Increase the length of the fcall opcodes.
8708
8709         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
8710         calls returning floats.
8711
8712         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
8713         on NEWARR.
8714         
8715         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
8716         missed earlier.
8717
8718         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
8719         into the domain->method_code_hash.
8720
8721         * aot-compiler.c: Fix win32 build.
8722
8723         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
8724         
8725         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
8726         gshared NEWARR implementation.
8727
8728         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
8729
8730         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
8731         can be used outside of method_to_ir.
8732
8733         * mini.h (MonoCompile): Add arg_types field.
8734
8735         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
8736         
8737         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
8738         the values of the local arg_array and param_types array.
8739
8740 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
8741
8742         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
8743         got accesses might only get generated later when NEWOBJ is decomposed.
8744         
8745         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
8746         looking up the native code of the target method when a delegate is called
8747         for the first time.
8748
8749         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
8750         optimization.
8751
8752         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
8753
8754         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
8755         AOT work on platforms without a working dlsym implementation.
8756
8757         * mini.h: Bump AOT image format version.
8758         
8759 2008-07-24  Mark Probst  <mark.probst@gmail.com>
8760
8761         * mini-exceptions.c: Free a MonoType with
8762         mono_metadata_free_type() instead of g_free().
8763
8764         * aot-runtime.c: Free a MonoType.
8765
8766 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
8767
8768         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
8769         optimization.
8770
8771         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
8772         fp stack on x86.
8773
8774 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
8775         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
8776         profiler hook.
8777
8778 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
8779
8780         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
8781         NEWOBJ calls on valuetypes.
8782
8783         * iltests.il.in: Add new test.
8784
8785         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
8786
8787 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
8788
8789         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
8790         is no longer needed.
8791
8792         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
8793         non register sized integer arguments.
8794         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
8795         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
8796         emit_memcpy2 ().
8797
8798         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
8799         CEE_MONO_RETOBJ.
8800         
8801         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
8802         two a binop with different sized arguments is emitted.
8803
8804         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
8805         instruction in the ins==NULL case.
8806
8807 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
8808
8809         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
8810
8811         * mini-x86.c: Fix osx build.
8812
8813         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
8814         opcodes as well.
8815
8816         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
8817         instruction for non int sized variables.
8818
8819         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
8820         implementation.
8821
8822 2008-07-23  Robert Jordan  <robertj@gmx.net>
8823
8824         * method-to-ir.c: Fix MSVC build.
8825
8826 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
8827
8828         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
8829         a non int sized type, widen it to an int since newer versions of gcc seem to
8830         generate code which needs this.
8831
8832         * ssa2.c abcremoval2.c: Fix warnings.
8833
8834         * *: Merge the Linear IR branch.
8835
8836         The original branch is at trunk/branches/vargaz/mini-linear-il, and
8837         the ChangeLog file there describes all the changes done over the years. 
8838         Further documentation can be found at www.mono-project.com/Linear_IL.
8839
8840 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
8841
8842         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
8843           The float param registers and other param registers must be the 
8844           same index on Windows x64.
8845
8846         Contributed under MIT/X11 license.
8847
8848 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
8849
8850         * mini.c: Make the previous fix GC safe.
8851
8852 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
8853
8854         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
8855
8856 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
8857
8858         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
8859           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
8860           ArgValuetypeAddrInIReg instead.
8861
8862         Contributed under MIT/X11 license.
8863
8864 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
8865
8866         * mini-codegen.c (get_register_spilling): Fix a warning.
8867
8868 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
8869
8870         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
8871         for types which the initialization fails. Raises the provided exception
8872         at the right stop after cleanup.
8873
8874 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
8875
8876         * aot-compiler.c: Free most of the memory allocated during compilation.
8877
8878         * mini.c (mini_parse_debug_options): Fix a leak.
8879         
8880         * mini.c (mini_method_compile): Don't add the method to the jit info tables
8881         during aot compilation.
8882
8883 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
8884
8885         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
8886         it has too much register pressure.
8887
8888 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
8889
8890         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
8891
8892 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
8893
8894         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
8895         on x86.
8896
8897         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
8898         on amd64 similar to the way it is done on arm.
8899
8900         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8901
8902         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
8903         consistency, normalize error messages, avoid loading aot-only modules in
8904         normal mode.
8905
8906         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
8907         for consistency.
8908
8909         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
8910
8911 2008-07-11  Martin Baulig  <martin@ximian.com>
8912
8913         * debug-debugger.h
8914         (MonoDebuggerInfo): Add `interruption_request'.
8915
8916 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
8917
8918         * aot-compiler.c (emit_plt): Remove some dead code.
8919
8920         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
8921
8922         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
8923         return the plt info offset belonging to a given plt entry.
8924
8925         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
8926         mono_aot_get_plt_info_offset.
8927         
8928         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
8929         similar to the amd64 code by makeing jumps through a separate jump table 
8930         instead of embedding the jump addresses into the code.
8931
8932 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
8933
8934         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
8935         method.
8936
8937 2008-07-10  Martin Baulig  <martin@ximian.com>
8938
8939         * mini.c (mini_method_compile): Disable generics sharing when
8940         running in the debugger.
8941
8942 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
8943
8944         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
8945
8946         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
8947         the local register allocator from running out of registers on x86 when 
8948         using aot.
8949
8950 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
8951
8952         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
8953         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
8954         C4146.
8955
8956         Contributed under MIT/X11 license.
8957
8958 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
8959
8960         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
8961         speed up the assembler.
8962
8963 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
8964
8965         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
8966         support.
8967
8968         * mini.c: Move the soft float handling macros a bit earlier, add 
8969         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
8970         place.
8971
8972         * mini.h: Add prototype for mono_arch_fixup_jinfo.
8973
8974         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
8975         read-only to help catch code allocation requests.
8976         
8977         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
8978         and turn it off when using --aot-only or when compiling with --aot=full.
8979
8980         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
8981         jump table for switches from the normal domain mempool, not the code
8982         manager.
8983
8984         * mini-trampolines.c (get_unbox_trampoline): New function to return an
8985         unbox trampoline which handles aot-only mode too.
8986
8987         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
8988         an AOTed unbox trampoline.
8989
8990         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
8991
8992 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
8993
8994         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
8995         ""
8996
8997         Contributed under MIT/X11 license.
8998
8999 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
9000
9001         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
9002           the unwind information for the method at the end of the allocated block.
9003           
9004         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
9005           MonoCompileArch to hold the unwind info for SEH on Winx64
9006         
9007         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
9008           frame pointer info for the method being compiled.
9009           
9010         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
9011           the call to mono_exception_from_token.
9012           
9013         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
9014           storing the method prolog information in a format that the Winx64 SEH can understand.  This
9015           information is stored a the end of the method block because it is all 32-bit offset based.
9016
9017         Contributed under MIT/X11 license.
9018
9019 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
9020
9021         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
9022
9023         * wapihandles.c: Fix warnings.
9024
9025         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
9026         mode.
9027
9028         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
9029         mono_jit_compile_method in aot-only mode since that calls the type 
9030         initializer.
9031         
9032         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
9033         get_delegate_invoke_impl in aot-only mode.
9034
9035         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
9036
9037 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
9038
9039         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
9040
9041         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
9042         is on by default.
9043
9044         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
9045
9046         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
9047         init trampoline from the AOT file as well.
9048
9049         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
9050         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
9051         code.
9052
9053         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
9054         mono_init.
9055
9056         * exceptions-amd64.c: Add _full variants for the remaining exception code
9057         creation functions as well, allow emission of relocatable code, remove
9058         caching since that is now done by the caller.
9059
9060         * mini-exceptions.c: Add _full variants for the remaining exception code
9061         creation functions as well, add aot-only support.
9062
9063         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
9064         if we can determine a proper token for them.
9065         (add_wrappers): Add a few more wrappers.
9066         (emit_method_code): Remove some dead code.
9067         (emit_trampolines): Emit exception code too.
9068
9069         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
9070
9071         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
9072         mono_array_new_va which avoids varargs.
9073
9074         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
9075
9076         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
9077         mono_arch_create_specific_trampoline () in all places.
9078
9079         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
9080         a bit so it can be used for other things as well.
9081         
9082         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
9083         on demand as well.
9084
9085         * exceptions-amd64.c: Rename the caching from the exception code creation
9086         functions, it is done by the caller instead.
9087         
9088         * exceptions-amd64.c: Change the signature of the exception code creation 
9089         functions to allow the creation of relocatable code later.
9090
9091         * mini-exceptions.c: Add a set of functions to query the various 
9092         runtime-generated exception functions.
9093
9094         * mini.c mini-exceptions.c: Use the newly added functions instead of the
9095         mono_arch_.. () functions.
9096         
9097 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
9098
9099         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
9100
9101         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
9102
9103         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
9104         (mini_get_vtable_trampoline): Ditto.
9105
9106         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
9107         code in the AOT case by returning the code size and a list of relocations to
9108         the caller.
9109
9110         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
9111
9112 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
9113
9114         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
9115           clean the stack.
9116
9117         Contributed under MIT/X11 license.
9118
9119 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
9120
9121         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
9122         so the buffer size can be computed correctly. Fixes #404735.
9123
9124         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
9125         normally as cfg->debug_info is already freed.
9126
9127 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
9128
9129         * mini-amd64.c: For calls returning vtypes in registers, don't store
9130         the return address on the stack, instead allocate a separate local for
9131         it. Fixes #404729.
9132
9133 2008-07-05  Mark Probst  <mark.probst@gmail.com>
9134
9135         * mini-trampolines.c, mini.h: Add an argument to
9136         mono_create_jit_trampoline_in_domain() for turning off the adding
9137         of the sync wrapper.
9138
9139         * mini.c: Use the JIT trampoline without sync instead of
9140         ldftn_nosync in static RGCTX invoke wrappers so that the call can
9141         be patched.
9142
9143 2008-07-04  Mark Probst  <mark.probst@gmail.com>
9144
9145         * driver.c: Turn on GSHARED optimization by default.
9146
9147 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
9148
9149         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
9150         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
9151
9152         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
9153         create a variant of the generic trampoline code callable from AOTed trampolines.
9154
9155         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
9156         trampoline code callable from AOTed trampolines.
9157
9158         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
9159
9160 2008-07-04  Mark Probst  <mark.probst@gmail.com>
9161
9162         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
9163         pass-through manner.
9164
9165         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
9166         and don't fail sharing for them anymore.
9167
9168         * mini-exceptions.c: Handle exceptions in shared generic methods.
9169
9170         * generic-sharing.c: When checking the context of a generic
9171         method, also check its class's context.  Don't treat wrappers as
9172         sharable.
9173
9174         * mini-trampolines.c: Some code factored out to
9175         metadata/generic-sharing.c.  Handle the MRGCTX case.
9176
9177         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
9178         we must deal with the method being of another instantiation of the
9179         class.  Add static rgctx invoke wrappers to generic methods.
9180
9181 2008-07-04  Mark Probst  <mark.probst@gmail.com>
9182
9183         * mini.c: Provide all jit infos of generic shared methods with a
9184         generic jit info.
9185
9186         * mini-exceptions.c: Handle the new situation that a generic info
9187         might be available, but not info about the this/vtable/mrgctx
9188         variable.
9189
9190 2008-07-03  Mark Probst  <mark.probst@gmail.com>
9191
9192         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
9193         generic methods.
9194
9195 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
9196
9197         * dominators.c (check_dominance_frontier): Fix a warning.
9198
9199         * mini.h: Add some missing prototypes.
9200
9201         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
9202
9203         * driver.c (mono_jit_init_version): Correct the comments since the first
9204         argument should be the name of the root domain, not a filename.
9205
9206         * aot-runtime.c (make_writable): Error out if this is called while running
9207         with --aot-only.
9208         (load_aot_module): Ditto.
9209
9210         * aot-compiler.c: Really fix the computation of method indexes.
9211
9212         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
9213         optimizations as this is no longer called frequently.
9214
9215         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
9216         method and the invoke impl code and pass it to the delegate trampoline instead of
9217         just the delegate class.
9218
9219 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
9220
9221         * aot-compiler.c: Fixup the computation of method indexes.
9222         (add_wrappers): Create the base methods of the runtime invoke wrappers using
9223         the method builder infrastructure.
9224
9225         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
9226         has no header.
9227
9228         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
9229         mode, load the method right away instead of creating a trampoline.
9230
9231         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
9232
9233         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
9234         some checks a bit.
9235
9236 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
9237
9238         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
9239         (mono_aot_load_method): Use method_index instead of method->token.
9240
9241         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
9242         can handle icalls etc. properly.
9243
9244         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
9245
9246         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
9247
9248         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
9249         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
9250         JIT_ICALL_ADDR patch type.
9251
9252         * patch-info.h: Add JIT_ICALL_ADDR patch type.
9253
9254         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
9255         request flag.
9256         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
9257
9258         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
9259
9260 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
9261
9262         * mini.c: Use domain->jit_code_hash_lock for controlling access to
9263         domain->jit_code_hash.
9264
9265 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
9266
9267         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
9268
9269 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
9270
9271         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
9272         get_this_arg_from_call, let it compute it when needed.
9273
9274         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
9275         gsctx from code only when needed.
9276
9277         * mini-trampolines.c (get_generic_context): Rename this to 
9278         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
9279         it can be called by the arch backends.
9280
9281         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
9282
9283 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
9284
9285         * driver.c (mono_main): Add experimental --aot-only command line option.
9286
9287         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
9288         set.
9289
9290 2008-06-26  Kornel Pal  <kornelpal@gmail.com>
9291
9292         * driver.c (DllMain): Remove mono_module_handle.
9293
9294         Contributed under MIT/X11 license.
9295
9296 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
9297
9298         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
9299         for emitting methods which are not in the source assembly. Detect and report
9300         failure of assembling+linking.
9301         
9302         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
9303
9304         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
9305
9306 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
9307
9308         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
9309
9310 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
9311
9312         * mini.h: Remove some obsolete prototypes.
9313
9314         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
9315
9316 2008-06-24  Mark Probst  <mark.probst@gmail.com>
9317
9318         * mini.c (get_object_generic_inst): Variable-sized arrays are not
9319         supported by Visual Studio, so use alloca().
9320
9321 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
9322
9323         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
9324         Fixes #402585.
9325
9326 2008-06-23  Mark Probst  <mark.probst@gmail.com>
9327
9328         * mini.c: Fail sharing of a generic method if it contains an open
9329         catch clause (because we don't pass MRGCTXs yet).
9330
9331 2008-06-23  Mark Probst  <mark.probst@gmail.com>
9332
9333         * mini.c: When compiling a method with generic sharing, insert the
9334         method instantiated with an all-Object generic context into the
9335         jit info table, instead of the context of the first instantiation
9336         of the method we happen to compile.
9337
9338 2008-06-18  Martin Baulig  <martin@ximian.com>
9339
9340         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
9341         `major_version' and `minor_version'.
9342
9343 2008-06-17  Mark Probst  <mark.probst@gmail.com>
9344
9345         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
9346         mono_method_is_generic_sharable_impl() takes an additional
9347         argument specifying whether to treat type variables as reference
9348         types.
9349
9350 2008-06-17  Mark Probst  <mark.probst@gmail.com>
9351
9352         * mini.h: Removed obsolete prototypes.
9353
9354 2008-06-17  Mark Probst  <mark.probst@gmail.com>
9355
9356         * mini.c: Don't fail generic sharing for initobj and sizeof - we
9357         already handle them.
9358
9359 2008-06-17  Mark Probst  <mark.probst@gmail.com>
9360
9361         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
9362         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
9363         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
9364         tramp-x86.c: Added a MonoGenericContext* argument to
9365         mono_arch_get_unbox_trampoline() so that it can call other
9366         functions which require it.
9367
9368 2008-06-17  Mark Probst  <mark.probst@gmail.com>
9369
9370         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
9371         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
9372         mono_arch_get_this_arg_from_call() takes a
9373         MonoGenericSharingContext* as well.
9374
9375 2008-06-17  Mark Probst  <mark.probst@gmail.com>
9376
9377         * mini.c: Factor out code for emitting unbox into emit_unbox() and
9378         implement generic sharing of unbox.
9379
9380 2008-06-17  Mark Probst  <mark.probst@gmail.com>
9381
9382         * mini.c: Don't compute the vtable to determine whether a field is
9383         special static, because it might not work for open types.
9384
9385 2008-06-17  Mark Probst  <mark.probst@gmail.com>
9386
9387         * mini.c: Removed the unused token_type and token_source arguments
9388         from get_runtime_generic_context_ptr().
9389
9390 2008-06-17  Marek Habersack  <mhabersack@novell.com>
9391
9392         * mini.c (ADD_BINOP): fix the build
9393
9394 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
9395
9396         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
9397         a widening op.
9398
9399 2008-06-16  Mark Probst  <mark.probst@gmail.com>
9400
9401         * mini.h: Removed class relations enum that's not used anymore.
9402
9403 2008-06-16  Mark Probst  <mark.probst@gmail.com>
9404
9405         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
9406
9407         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
9408         the lazy fetch trampoline access code.
9409
9410 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
9411
9412         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
9413
9414 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
9415
9416         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
9417
9418         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
9419
9420         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
9421
9422 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
9423
9424         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
9425         intrinsics.
9426
9427         * mini-ops.h: Add MIN/MAX_UN opcodes.
9428
9429         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
9430         intrinsics.
9431
9432         * basic-math.cs: Add more min/max tests.
9433
9434         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
9435
9436 2008-06-13  Mark Probst  <mark.probst@gmail.com>
9437
9438         * mini.c: Small fix in the prologue of emit_castclass.
9439
9440 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
9441
9442         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
9443
9444         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
9445         do not work even for unsigned types. Fixes #400014.
9446
9447         * basic-math.cs: Add regression tests for unsigned Min/Max.
9448
9449 2008-06-13  Mark Probst  <mark.probst@gmail.com>
9450
9451         * mini.c: Added additional context_used argument to several
9452         functions, which will be needed for sharing generic methods.  Use
9453         GET_RGCTX macro wherever appropriate.  Declare only one
9454         context_used in mono_method_to_ir().
9455
9456 2008-06-13  Mark Probst  <mark.probst@gmail.com>
9457
9458         * mini.c, generic-sharing.c: Removed generic class relations.
9459
9460         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
9461         functions due to MRGCTX changes.
9462
9463 2008-06-13  Mark Probst  <mark.probst@gmail.com>
9464
9465         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
9466         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
9467         with calculated IMT.
9468
9469         * mini.c: Generic sharing of calls via generic interfaces.
9470
9471         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
9472         generic method with non-constant MonoGenericContext*.  Instead,
9473         the context is taken out of the method itself.
9474
9475 2008-06-13  Mark Probst  <mark.probst@gmail.com>
9476
9477         * mini.c: Generic sharing of ldvirtftn.
9478
9479 2008-06-13  Mark Probst  <mark.probst@gmail.com>
9480
9481         * mini.c: Generic sharing of ldftn.
9482
9483 2008-06-13  Mark Probst  <mark.probst@gmail.com>
9484
9485         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
9486
9487 2008-06-13  Mark Probst  <mark.probst@gmail.com>
9488
9489         * mini.c: Generic sharing of the special case of ldtoken followed
9490         by a call to GetTypeFromHandle.
9491
9492 2008-06-13  Mark Probst  <mark.probst@gmail.com>
9493
9494         * mini.c: Generic sharing of box for nullable types.
9495
9496 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
9497
9498         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
9499         are passed on the stack. Fixes #324807.
9500
9501 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
9502
9503         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
9504         for the ArgValuetypeAddrInIReg case.
9505
9506         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
9507         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
9508
9509         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
9510         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
9511         local variable and pass the local variable by reference to the called method.
9512           
9513         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
9514         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
9515
9516         Contributed under MIT/X11 license.
9517
9518 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
9519
9520         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
9521
9522         * debug-mini.c (mono_debug_print_vars): Release memory after printing
9523         everything.
9524
9525 2008-06-10  Martin Baulig  <martin@ximian.com>
9526
9527         * debug-mini.c
9528         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
9529
9530 2008-06-09  Kornel Pal  <kornelpal@gmail.com>
9531
9532         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
9533         possible error when no arguments are passed.
9534
9535         Contributed under MIT/X11 license.
9536
9537 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
9538
9539         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
9540         where the file name is NULL.
9541
9542 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
9543
9544         * mini.c: Fix s390 build.
9545
9546 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
9547
9548         * trace.c (mono_trace_parse_options): Fix warnings.
9549
9550         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
9551
9552 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
9553
9554         * mini.c (remove_block_if_useless): Avoid printing the method name.
9555         
9556         * mini.c: Remove needless setting of ins->cil_code which is now done by 
9557         MONO_INST_NEW.
9558
9559         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
9560         LMF. Not yet used.
9561
9562         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
9563         translated code after it has been patched.
9564
9565 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
9566
9567         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
9568         avoid problems during code patching on SMP systems.
9569         (emit_call): Avoid adding a patch info which is already added by 
9570         emit_call_body.
9571         (mono_arch_emit_exceptions): Ditto.
9572
9573 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
9574
9575         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
9576         MONO_TYPE_ISSTRUCT already checks for it.
9577
9578 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
9579
9580         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
9581           structs with floats on Winx64 the float registers are not used.  
9582           The integer registers are always used..
9583         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
9584           only one register will be used and only if the size of the struct 
9585           is 1,2,4, or 8 bytes.
9586
9587         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
9588           to work for Winx64.
9589
9590         Contributed under MIT/X11 license.
9591
9592 2008-06-05  Martin Baulig  <martin@ximian.com>
9593
9594         * debug-debugger.c (debugger_lookup_class): Also call
9595         mono_class_setup_methods() here; we're only called from RTI.
9596
9597 2008-06-05  Andreas Farber  <andreas.faerber@web.de>
9598
9599         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
9600         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
9601         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
9602         Post-process object files and add dtrace-generated object, if necessary.
9603
9604         Contributed under MIT/X11 license.
9605
9606 2008-06-04  Mark Probst  <mark.probst@gmail.com>
9607
9608         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
9609         element class.
9610
9611         * mini.c: Generic sharing for unbox.any and castclass.
9612
9613 2008-06-04  Mark Probst  <mark.probst@gmail.com>
9614
9615         * mini.c: Ignore tailcall prefix in shared generic code and when
9616         doing calls which require a vtable/rgctx argument.
9617
9618 2008-06-04  Mark Probst  <mark.probst@gmail.com>
9619
9620         * mini.c: Don't free the JIT info.
9621
9622         * driver.c: Changes in the JIT info table testing code.
9623
9624 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
9625
9626         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
9627         interruption. Fix some warnings.
9628
9629         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
9630         interruption_checkpoint.
9631
9632 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
9633
9634         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
9635         from embedding applications.
9636
9637 2008-06-02  William Holmes  <billholmes54@gmail.com>
9638
9639         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
9640           reserving 32 bytes on the stack when making calls. 
9641
9642         Contributed under MIT/X11 license.
9643
9644 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
9645
9646         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
9647         the linear IL branch.
9648
9649         * driver.c: Print out more information for --version on arm.
9650
9651 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
9652
9653         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
9654         bb_exit instead, since out of line bblocks might not actually be emitted
9655         out-of-line.
9656         
9657         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
9658         maximum epilog size for out of line bblocks if tracing is enabled.
9659
9660         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
9661
9662 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
9663
9664         * arrays.cs: Regression tests for allocating arrays with negative sizes.
9665
9666 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
9667
9668         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
9669         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
9670         opcodes.
9671
9672 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
9673
9674         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
9675         the 'value' to store is a constant.
9676
9677         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
9678
9679         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
9680         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
9681
9682 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
9683
9684         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
9685         for accessing method->generic_container.
9686
9687 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
9688
9689         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
9690         
9691         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
9692
9693         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
9694
9695         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
9696         fails.
9697
9698 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
9699
9700         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
9701
9702         * mini.c: Handle the case when mono_class_vtable () fails.
9703
9704 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
9705         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
9706         the stat profiler.
9707
9708 2008-05-22  Mark Probst  <mark.probst@gmail.com>
9709
9710         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
9711         together with domain sharing.
9712
9713 2008-05-22  Mark Probst  <mark.probst@gmail.com>
9714
9715         * mini.c: Treat callvirts to final methods like non-virtual calls
9716         when doing generic sharing, i.e. look them up in the runtime
9717         generic context.
9718
9719 2008-05-22  Mark Probst  <mark.probst@gmail.com>
9720
9721         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
9722         with computed types (for generic sharing).
9723
9724         * mini.c: Generic sharing for mkrefany and refanyval.
9725
9726 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
9727
9728         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
9729         possible.
9730
9731         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
9732         the generic sharing code.
9733         
9734         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
9735         when needed.
9736
9737 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
9738
9739         * mini.h: Remove the declaration of mono_aot_init_vtable ().
9740
9741 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
9742
9743         * driver.c: updated copyright date
9744
9745 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
9746
9747         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
9748         needed.
9749
9750 2008-05-19  Martin Baulig  <martin@ximian.com>
9751
9752         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
9753         pointing to the new `_mono_debug_using_mono_debugger' variable.
9754
9755         * driver.c
9756         (mono_main): Check mono_debug_using_mono_debugger() rather than
9757         the `MONO_INSIDE_MDB' environment variable to check whether we're
9758         inside the debugger.
9759
9760 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
9761
9762         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
9763         argument.
9764
9765 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
9766
9767         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
9768
9769         * mini.c: Added mini_assembly_can_skip_verification. This
9770         function checks if the assembly requested to skip verification. 
9771         Fixes part of #387274.
9772
9773 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
9774
9775         * mini.c (mini_get_method): Disable the check for open generic classes when
9776         using generic sharing.
9777
9778         * generics.cs: Add a test for #387034.
9779
9780         * mini.c (mini_get_method): Check whenever the method class is an open generic
9781         type, and return NULL in that case, causing a verification error. Fixes
9782         #384123.
9783
9784 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
9785
9786         * driver.c (mono_main): Revert r102623. The right
9787         thing to do is to enable the verifier under verifiable
9788         unless a --security flag was passed.
9789
9790         We need this non-trivial behavior for --verify-all otherwise
9791         mcs-compileall won't be able to use it. As it needs everything to
9792         be verified under validil.
9793
9794 2008-05-06  Martin Baulig  <martin@ximian.com>
9795
9796         Fix #383749.
9797
9798         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
9799         (mono_debugger_thread_cleanup): Likewise.
9800         (mono_debugger_extended_notification): Likewise.
9801
9802 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
9803
9804         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
9805         against both inflated and non-inflated methods. We need to check against the
9806         generic definition for cases where the instantiated method is not visible.
9807         We need to check against the inflated types for cases where the instantiation
9808         changes any super type. This fixes #382986.
9809
9810         Note that this doesn't need to be applied to other parts of mono_method_to_ir
9811         that check for visibiliy as generic params only appears as the type subject
9812         of tokens on call opcodes. Field manipulation and ldftn must always
9813         target an exact type.
9814
9815 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
9816
9817         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
9818         if no related --security flag is passed.
9819
9820 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
9821
9822         * mini-arch.h: Prepare support for ppc64.
9823
9824         Contributed under MIT/X11 license.
9825
9826 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
9827
9828         * aot-runtime.c: Prepare support for ppc64.
9829
9830         Contributed under MIT/X11 license.
9831
9832 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
9833
9834         * mini-ops.h: Prepare support for ppc64.
9835
9836         Contributed under MIT/X11 license.
9837
9838 2008-05-04  Andreas Farber  <andreas.faerber@web.de>
9839
9840         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
9841
9842         Contributed under MIT/X11 license.
9843
9844 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
9845
9846         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
9847         assemblies, since aot_name is not a full path, causing us to load MS.NET 
9848         assemblies on windows.
9849
9850 ?2008-04-28  Kornel Pal  <kornelpal@gmail.com>
9851
9852         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
9853         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
9854         * main.c: Use UTF-8 encoded command line instead of Windows default code
9855         page on Windows to support Unicode.
9856         * driver.c (DllMain): New function for mixed-mode assembly support.
9857         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
9858         export __stdcall functions without decoration.
9859
9860         Contributed under MIT/X11 license.
9861
9862 2008-04-28  Mark Probst  <mark.probst@gmail.com>
9863
9864         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
9865         saving it very early.
9866
9867 2008-04-28  Mark Probst  <mark.probst@gmail.com>
9868
9869         * mini.h, mini.c: Lots of code for accessing the old RGCTX
9870         deleted.  The only way to access the new RGCTX is via the
9871         trampline.
9872
9873         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
9874         vtable instead of the RGCTX to static methods.
9875
9876         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
9877         accessing the new RGCTX.
9878
9879         * generic-sharing.c: There is no separation between self, type
9880         arguments and other types in the RGCTX anymore.
9881
9882 2008-04-25  Jonathan Chambers <joncham@gmail.com>
9883
9884         * mini-amd64.c (add_general): Remove previous stack adjustment.
9885         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
9886         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
9887         for 32 bytes of stack space reserved for all calls.
9888         
9889         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
9890         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
9891         adjustment.
9892         
9893         Code contributed under MIT/X11 license.
9894
9895 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
9896
9897         * mini.c (mini_method_verify): Only verify non-inflated methods, check
9898         against the root definition, peeling out method and type instantiations.
9899         Cache verify success results, code that fails verification is still
9900         checked multiple times.
9901
9902 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
9903
9904         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
9905
9906 2008-04-23  Jonathan Chambers <joncham@gmail.com>
9907
9908         * mini-amd64.c (add_general): Always increment stack on Win64.
9909         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
9910         on Win64.
9911         
9912         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
9913         stack based argument handling on Win64.
9914         
9915         Code contributed under MIT/X11 license.
9916
9917 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
9918
9919         * Makefile.am (version.h): Add support for git-svn.
9920
9921 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
9922
9923         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
9924         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
9925         avoiding allocations and libc functions which might deadlock.
9926         
9927         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
9928         'no-gdb-backtrace' option is set.
9929
9930         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
9931
9932         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
9933
9934 2008-04-21  Martin Baulig  <martin@ximian.com>
9935
9936         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
9937         and `get_lmf_addr'; `notification_address' is no longer a pointer.
9938
9939 2008-04-21  Martin Baulig  <martin@ximian.com>
9940
9941         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
9942         `thread_vtable', `event_handler_ptr' and `event_handler'.
9943
9944 2008-04-21  Martin Baulig  <martin@ximian.com>
9945
9946         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
9947         allows delayed initialization of the `executable_code_buffer' when
9948         attaching.
9949
9950 2008-04-21  Martin Baulig  <martin@ximian.com>
9951
9952         * mini.h (mono_debugger_create_notification_function): Removed.
9953         * tramp-*.c (mono_debugger_create_notification_function): Removed.
9954
9955         * mdb-debug-info64.s
9956         (MONO_DEBUGGER__notification_function): Added this in the .text section.
9957
9958         * mdb-debug-info32.s
9959         (MONO_DEBUGGER__notification_function): Added this in the .text section.
9960
9961         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
9962         currently only works on x86 and x86_64, so don't create it on ppc.
9963
9964 2008-04-21  Martin Baulig  <martin@ximian.com>
9965
9966         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
9967
9968         * mini.c
9969         (mini_method_compile): In the fp elimination check, check
9970         `debug_options.mdb_optimizations' in addition to
9971         mono_debug_using_mono_debugger().       
9972
9973         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
9974         disable some JIT optimizations which are only disabled when
9975         running inside the debugger.
9976         Added `--help-debug' option to describe the debugging options.
9977         (parse_debug_options): New static function to parse the `--debug'
9978         options, so we can easily add more stuff in future.
9979
9980 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
9981
9982         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
9983         the method has no body.
9984
9985 2008-04-19  Jonathan Chambers <joncham@gmail.com>
9986
9987         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
9988         assembly is not allowed in MSVC 64-bit compiler. 
9989         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
9990         as we get floating point exceptions everywhere.
9991         
9992         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
9993         correctly align arguments for call to throw_exception.
9994         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
9995         
9996         Code contributed under MIT/X11 license.
9997
9998 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
9999
10000         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
10001
10002 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
10003
10004         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
10005
10006         * mini-amd64.c (NEW_INS): Set cil_code.
10007
10008         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
10009         from mini-amd64.c so all debugger related logic is in one place.
10010
10011         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
10012         later won't have a random ip assigned to them.
10013
10014 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
10015
10016         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
10017         the arch specific function initializes code_size.
10018         (mono_create_delegate_trampoline): Ditto.
10019
10020         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
10021         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
10022         platforms.
10023
10024         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
10025         running under the debugger.
10026
10027         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
10028         debugger.
10029
10030         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
10031         debugger. Also move the disabling of optimizations here from driver.c.
10032         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
10033         debugger.
10034
10035         * mini.h (MonoCompile): Add a few new flags.
10036
10037 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
10038
10039         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
10040         so the cil_code field of created MonoInst's is properly set.
10041         (mini_select_instructions): Ditto.
10042
10043         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
10044         (MONO_INST_NEW_CALL): Ditto.
10045
10046         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
10047         in many places so the ins->cil_code field is properly initialized.
10048
10049         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
10050         place.
10051
10052 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
10053
10054         * mini.c (mini_method_compile): Print a different message when compiling a 
10055         shared method.
10056         
10057         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
10058         > 1.
10059
10060 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
10061
10062         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
10063         SSE2 instructions.
10064
10065         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
10066         
10067 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
10068
10069         * mini.c (handle_stack_args): Make this return void since its return value was
10070         never used. Also set cfg->unverifiable for invalid IL instead of calling
10071         G_BREAKPOINT ().
10072
10073 2008-04-10  Mark Probst  <mark.probst@gmail.com>
10074
10075         * mini.c: Make sure "this" is live in catch clauses with type
10076         variables in shared generic code.
10077
10078 2008-04-08  Mark Probst  <mark.probst@gmail.com>
10079
10080         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
10081         generic_class_is_reference_type() to ensure the proper behaviour
10082         when sharing generic code and the type in question is a type
10083         argument.
10084
10085 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
10086
10087         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
10088         race conditions when printing thread dumps. Fixes #377738.
10089
10090 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
10091         
10092         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
10093         shows up when both MonoInst arguments can cause aliasig.
10094         There is likely no way in the current JIT to trigger this problem, but
10095         it showed up in the development of generics sharing, when in a new
10096         opcode both args of an OP_GROUP can be aliases (addresses of a local).
10097         When the generics sharing code will be committed, its tests will be
10098         valid also for this bug.
10099
10100 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
10101
10102         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
10103         PATCH_INFO_METHOD.
10104
10105         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
10106         NULL.
10107
10108 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
10109
10110         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
10111         use a more detailed exception message for InvalidCastException.
10112
10113         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
10114
10115         * driver.c (mono_main): Add --debug=casts option to turn on better 
10116         InvalidCastException message details.
10117
10118         * mini.c (mini_get_debug_options): New helper function to return the address of
10119         the debug_options variable.
10120
10121         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
10122         the jit_tls TLS variable.
10123
10124         * mini.c (mono_jit_tls): New TLS variable.
10125
10126         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
10127         option is used.
10128
10129 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
10130
10131         * mini.h: Removed verifer related stuff. This code was moved to verify.c
10132
10133         * mini.c: Removed verifer related stuff, code moved to verify.c.
10134
10135         * driver.c: Using code from verify.c instead of mini.c.
10136
10137 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
10138
10139         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
10140         longer valid.
10141
10142 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
10143
10144         * mini.c (check_for_method_verify): Enabling verification of
10145         corlib if mono_verify_all is set. Bugs in the verifier preventing that
10146         have been fixed.
10147
10148 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
10149
10150         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
10151         caller saved registers as well.
10152         
10153         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
10154         saved registers as well.
10155
10156 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
10157
10158         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
10159
10160         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
10161         code.
10162
10163 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
10164
10165         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
10166         to get_call_info.
10167         (get_call_info): Take a gsctx argument instead of 'cfg'.
10168
10169 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
10170
10171         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
10172         mono_verify_all is set.
10173
10174         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
10175
10176         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
10177
10178 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
10179
10180         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
10181         an exception.
10182
10183         * driver.c mini.c mini.h: Add a --verify-all development option to test the
10184         verifier and the code generated by the compiler.
10185
10186 2008-03-25  Mark Probst  <mark.probst@gmail.com>
10187
10188         * mini.c: Generic sharing of the non-nullable case of the box
10189         instruction.
10190
10191 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
10192
10193         * inssel.brg: Fix the build.
10194
10195         * iltests.il.in: Add a test for lconv.ovf.u8.un.
10196
10197 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
10198
10199         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
10200         Array:Address. Fixes #372410.
10201
10202         * iltests.il.in: New tests for readonly prefix.
10203
10204 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
10205
10206         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
10207         mini-trampolines.c.
10208
10209         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
10210         mini-exceptions.c.
10211
10212         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
10213         
10214         * mini.c (mono_decompose_op_imm): New helper function.
10215
10216         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
10217         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
10218         return value.
10219
10220         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
10221         mono_arch_output_basic_block. Fix warnings.
10222
10223         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
10224         for now.
10225
10226 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
10227
10228         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
10229         since the extra frame is now detected automatically inside the loop.
10230
10231         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
10232         opts which are now in mono_peephole_ins ().
10233         
10234         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
10235
10236         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
10237         frames and skip duplicate managed-to-native frames. Fixes #367665.
10238
10239         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
10240         opts which are now in mono_peephole_ins ().
10241         (mono_arch_peephole_pass_2): Ditto.
10242
10243         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
10244
10245         * mini-codegen.c (mono_peephole_ins): New helper function containing the
10246         arch independent peephole optimizations.
10247
10248         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
10249         opts which are now in mono_peephole_ins ().
10250
10251         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
10252         
10253         * mini-s390.c (mono_arch_output_basic_block): Fix build.
10254
10255         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
10256         pattern.
10257
10258         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
10259         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
10260         opcode. 
10261
10262 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
10263
10264         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
10265         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
10266         return value.
10267
10268         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
10269         mono_arch_output_basic_block. Fix warnings.
10270
10271 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
10272
10273         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
10274         conv.ovf.u.un.
10275
10276 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
10277
10278         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
10279         conv.ovf.u.un.
10280
10281         * iltests.il: Add new tests.
10282
10283 2008-03-20  Kornel Pal  <kornelpal@gmail.com>
10284
10285         * mini.c: Removed Windows version macros.
10286
10287 2008-03-20  Mark Probst  <mark.probst@gmail.com>
10288
10289         * generic-sharing.c: Put reflection types in the extensible part
10290         of the runtime generic context.
10291
10292         * mini.c: Generic sharing of the GetTypeHandle special case of the
10293         ldtoken instruction.
10294
10295 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
10296
10297         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
10298
10299         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
10300         
10301         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
10302         consistency with the other version on the linear IR branch.
10303
10304         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
10305
10306         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
10307
10308         * iltests.il.in: Add new tests.
10309
10310 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
10311
10312         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
10313
10314         * iltests.il.in: Add new tests.
10315
10316 2008-03-19  Mark Probst  <mark.probst@gmail.com>
10317
10318         * mini.c: Two variables with the same name were declared in
10319         nesting contexts and one wasn't initialized.  Fixed.
10320
10321 2008-03-19  Mark Probst  <mark.probst@gmail.com>
10322
10323         * mini.c: Generic sharing of the initobj instruction.
10324
10325 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
10326
10327         * mini.c: make the test to optimize ldtoken from typeof() more
10328         precise.
10329
10330 2008-03-18  Mark Probst  <mark.probst@gmail.com>
10331
10332         * mini.c: Generic sharing of the initobj instruction for reference
10333         types.
10334
10335 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
10336
10337         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
10338         the mono_breakpoint_clean_code() code to perform bound checks.
10339
10340 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
10341
10342         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
10343         mono_arch_patch_callsite() to include the start of the managed method
10344         to be able to perform bound checks.
10345
10346 2008-03-17  Mark Probst  <mark.probst@gmail.com>
10347
10348         * mini.c: Generic sharing for the isinst instruction.
10349
10350 2008-03-17  Mark Probst  <mark.probst@gmail.com>
10351
10352         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
10353         inssel-long32-mips.brg: Added opcodes for doing indirect calls
10354         with the runtime generic context argument.
10355
10356         * mini.c: Share calls to several types of unsharable methods by
10357         putting the address of the method code in the runtime generic
10358         context and doing an indirect call.
10359
10360         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
10361         to switches.
10362
10363 2008-03-16  Mark Probst  <mark.probst@gmail.com>
10364
10365         * generic-sharing.c: Change due to a change in the runtime genric
10366         context API.
10367
10368 2008-03-15  Martin Baulig  <martin@ximian.com>
10369
10370         * tramp-x86.c
10371         (mono_arch_nullify_class_init_trampoline): Add call to
10372         mono_breakpoint_clean_code() to make things work when running
10373         inside the debugger.
10374
10375         * tramp-amd64.c
10376         (mono_arch_nullify_class_init_trampoline): Add call to
10377         mono_breakpoint_clean_code() to make things work when running
10378         inside the debugger.
10379
10380 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
10381
10382         * inssel-long.brg (reg): Fix 64 bit build.
10383
10384 2008-03-14  Mark Probst  <mark.probst@gmail.com>
10385
10386         * mini.c, mini.h: Share static generic code by passing it an
10387         implicit argument pointing to the runtime generic context.
10388
10389         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
10390         inssel-long32-mips.brg: New opcodes for calling shared static,
10391         which need to be passed the runtime generic context.
10392
10393         * mini-amd64.c, mini-x86.c: Save the runtime generic context
10394         argument on the stack in the prologue if needed.  New function for
10395         finding the runtime generic context argument from the registers
10396         saved by the trampoline.
10397
10398         * mini-amd64.h, mini-x86.h: Specify which register to use for the
10399         runtime generic context argument.
10400
10401         * tramp-amd64.c: Also restore the register used for the runtime
10402         generic context argument.
10403
10404         * mini-trampoline.c: Resolve shared static calls by consulting the
10405         runtime generic context via the new argument.
10406
10407         * generic-sharing.c: Add an argument to sharability-checking
10408         functions that specifies whether type variables should be treated
10409         as sharable type arguments.
10410
10411         * inssel-x86.brg: Removed a superfluous, buggy rule.
10412
10413         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
10414         to switches.
10415
10416 2008-03-14  Martin Baulig  <martin@ximian.com>
10417
10418         * debug-debugger.c (main_thread_handler): Call
10419         mono_runtime_run_main() without sending any notifications.
10420
10421         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
10422
10423 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
10424
10425         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
10426
10427 2008-03-14  Mark Probst  <mark.probst@gmail.com>
10428
10429         * tramp-x86.c: Fixed register restore offsets in the trampoline
10430         code for ECX and EDX.
10431
10432 2008-03-12  Geoff Norton  <gnorton@novell.com>
10433
10434         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
10435         different ucontext_t implementations.
10436         * exceptions-arm.c: Use the above defines to get exceptions working on 
10437         iPhone (based on a patch by Luke Howard lukeh@padl.com)
10438         * mini-arm.c: Implement iPhone icache support (based on a patch by
10439         Luke Howard lukeh@padl.com)
10440
10441 2008-03-12  Mark Probst  <mark.probst@gmail.com>
10442
10443         * mini.c: Enable generic sharing of calls to non-static
10444         non-interface non-generic non-value-type methods.
10445
10446         * mini-trampolines.c: Resolve calls from shared generic code.
10447
10448 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
10449
10450         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
10451
10452         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
10453
10454 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
10455
10456         * mini.c: some fixes for the AOT compiler.
10457
10458 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
10459
10460         * cpu-amd64.md: Add clob:1 to some float opcodes.
10461
10462 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
10463
10464         * mini.h: Added MiniVerifierMode enumeration.
10465
10466         * mini.c: Added mini_verifier_set_mode to control
10467         the usage of the new verifier.
10468
10469         * mini.c (mono_method): Integrated the new verifier.
10470
10471         * driver.c: Extended --security option with validil and
10472         verifiable options to activate the new verifier.
10473
10474 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
10475
10476         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
10477         optimization to ctors taking 0 or 2 arguments too.
10478
10479         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
10480         a bit.
10481
10482         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
10483
10484         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
10485
10486 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
10487
10488         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
10489         non-aot case as well.
10490
10491         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
10492
10493         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
10494         changes.
10495
10496         * aot-compiler.c (encode_patch): Ditto.
10497
10498         * mini.h (G_MININT32): Fix the definition of this.
10499
10500 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
10501
10502         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
10503
10504         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
10505
10506 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
10507
10508         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
10509         methods returning vtypes in registers.
10510         (mono_arch_allocate_vars): Ditto.
10511
10512         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
10513
10514         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
10515
10516         * generics.cs: Add a test from the linear IR branch.
10517
10518         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
10519
10520         * mini.c (inline_method): Cache failed inline attempts.
10521
10522 2008-03-04  Mark Probst  <mark.probst@gmail.com>
10523
10524         * mini.c: For shared methods of generic classes put the location
10525         of "this" into the MonoGenericJitInfo.
10526
10527         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
10528         register out of a MonoContext by register number.  Add the generic
10529         sharing context as an argument to mono_arch_find_this_argument().
10530
10531         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
10532         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
10533         for new arch function.
10534
10535         * mini-exception.c: Handle open exception clauses in shared
10536         generic code.
10537
10538         * mini-trampolines.c: Supply additional argument to
10539         mono_arch_find_this_argument().
10540
10541 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
10542
10543         * Makefile.am (regtests): Run the bench.exe tests last.
10544
10545 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
10546
10547         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
10548         a bit.
10549
10550 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
10551
10552         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
10553         with MS.
10554
10555         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
10556         
10557         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
10558
10559         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
10560         whose class has no cctor.
10561
10562         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
10563
10564 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
10565
10566         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
10567         unverified.
10568
10569 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
10570
10571         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
10572         to be in sync with the code on the linear IR branch.
10573
10574         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
10575
10576         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
10577
10578 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
10579
10580         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
10581
10582         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
10583
10584         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
10585
10586         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
10587
10588         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
10589         
10590         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
10591         body.
10592
10593 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
10594
10595         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
10596         OP_LOADR4_MEMBASE emission.
10597
10598         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
10599         (mono_spillvar_offset_float): Ditto.
10600
10601         * mini-mips.c (mono_arch_emit_prolog): Ditto.
10602
10603         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
10604         emission.
10605
10606         * basic-long.cs: Add regression tests for them.
10607
10608         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
10609         use.
10610         (mono_arch_allocate_vars): Fix representation of single-precision float
10611         argument.
10612         (mono_arch_output_basic_block): Ditto.
10613
10614         * inssel-mips.brg: Ditto, remove duplicate items.
10615
10616         * mini-mips.c (emit_load_volatile_arguments): New function to handle
10617         arguments of tail calls as on other platforms.
10618         (mono_arch_output_basic_block): Handle tail calls.
10619
10620         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
10621         register.
10622
10623         * objects.cs (test_5_pass_static_struct): Add test for it.
10624
10625         Contributed under MIT/X11 license.
10626
10627 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
10628
10629         * Makefile.am: Use gmcs for compiling the regression tests.
10630
10631         * *.2.cs *.2.il: Rename to *.cs and *.il.
10632
10633 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
10634
10635         * regalloc.h: Make the vassign array smaller.
10636
10637         * mini.c (mini_method_compile): Remove an unused field in cfg.
10638
10639         * mini-codegen.c: Add a bunch of micro optimizations.
10640
10641 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
10642
10643         * regalloc.h: Remove some unused fields.
10644
10645 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
10646
10647         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
10648
10649         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
10650
10651 2008-02-22  Mark Probst  <mark.probst@gmail.com>
10652
10653         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
10654
10655         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
10656         trampoline: Fetch an entry from the runtime generic context.  If
10657         it's NULL, jump to the actual trampoline to fill the runtime
10658         generic context.  Otherwise, return it.
10659
10660         * mini.c: Call the lazy fetch trampoline to get entries out of the
10661         runtime generic context.
10662
10663         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
10664         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
10665         tramp-sparc.c: Stubs for the lazy fetch trampoline.
10666
10667 2008-02-21  Mark Probst  <mark.probst@gmail.com>
10668
10669         * mini.c: Fetch data out of the extensible part of the runtime
10670         generic context instead of calling a helper function.
10671
10672         * generic-sharing.c: Some functions moved into
10673         metadata/generic-sharing.c.  Helper function for fetching other
10674         types now checks and asserts against extensible rgctx (just for
10675         debugging purposes - the helper function isn't called anymore
10676         unless for debugging).
10677
10678 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
10679
10680         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
10681         for tail calls up to the point that the tests in iltests.exe run. Also add a
10682         dummy CKFINITE implementation.
10683         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
10684         needed for trampoline LMF frames.
10685
10686         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
10687         trampoline LMF frames.
10688
10689 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
10690
10691         * mini.c (inline_method): clean any pending loader error when inlining fail.
10692         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
10693
10694 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
10695
10696         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
10697
10698         * aot-runtime.c (decode_patch_info): Ditto.
10699
10700         * mini.c (mono_resolve_patch_target): Ditto.
10701         
10702         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
10703         icall wrappers.
10704
10705         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
10706         
10707         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
10708         if it references an icall address.
10709
10710 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
10711
10712         * cpu-s390x.md: Remove some more unused opcodes.
10713         
10714         * cpu-s390x.md: Remove some unused opcodes.
10715
10716         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
10717         mono_op_imm_to_op ().
10718
10719         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
10720         instead of a switch statement.
10721         
10722         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
10723         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
10724
10725         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
10726         
10727         * mini-codegen.c: Remove unused mono_regstate2_... functions.
10728
10729         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
10730         -1.
10731
10732 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
10733
10734         * driver.c (mono_main): Improve error reporting when an assembly cannot be
10735         opened. Fixes #362607.
10736
10737         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
10738
10739         * iltests.il.in: Add a test for static methods in interfaces.
10740
10741 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
10742
10743         * genmdesc.c (build_table): Fix a crash on older glib versions.
10744
10745         * cpu-sparc.md: Remove some unused opcodes.
10746         
10747         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
10748         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
10749
10750         * cpu-amd64.md: Remove some unused opcodes.
10751
10752         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
10753         like the other opcodes.
10754
10755 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
10756
10757         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
10758
10759         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
10760
10761         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
10762         variables 'cfg' instead of 'm' for consistency.
10763
10764         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
10765
10766         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
10767         argument holding the vtype return address, to avoid the ambigious use of
10768         cfg->ret for this purpose.
10769
10770         * mini.c (NEW_RETLOADA): Use vret_addr if set.
10771
10772         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
10773         
10774         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
10775         new mono_print_ins () function which only takes one argument.
10776
10777 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
10778
10779         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
10780         macro arguments.
10781
10782 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
10783
10784         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
10785
10786         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
10787
10788         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
10789         opcodes and other small changes.
10790
10791         * mini-ops.h: Add some new opcodes from the linear IR branch.
10792
10793         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
10794
10795         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
10796         opcodes, use the REG_MEMBASE opcodes instead.
10797         
10798         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
10799         opcodes, use the REG_MEMBASE opcodes instead.
10800         
10801         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
10802         linear IR branch.
10803
10804         * mini.c (mono_op_imm_to_op): New helper function.
10805
10806         * mini-ops.h: Add some opcodes from linear IR branch.
10807
10808 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
10809
10810         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
10811         <tsv@solvo.ru>.
10812
10813 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
10814
10815         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
10816         OP_ICONV_TO_R4/R8.
10817
10818         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
10819
10820 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
10821
10822         * aot-compiler.c (emit_method_code): Add an assert.
10823
10824         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
10825         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
10826         methods.
10827
10828 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
10829
10830         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
10831         some load/store opcodes so they are consistent. 
10832         (mono_arch_emit_prolog): Simplify some code.
10833
10834         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
10835
10836         * objects.cs: Add tests for large argument offsets on ARM.
10837
10838         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
10839         stack offsets. Fixes #359651.
10840
10841         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
10842
10843         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
10844
10845         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
10846
10847         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
10848
10849         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
10850
10851         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
10852         rid of CEE_CONV_R_UN.
10853
10854         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
10855
10856 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
10857
10858         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
10859
10860         * mini.c (mono_normalize_opcodes): Add some more opcodes.
10861
10862         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
10863
10864         * cpu-amd64.md: Remove some unused opcodes.
10865
10866         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
10867
10868         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
10869
10870         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
10871         arch specific functions for its parts. Call the peephole pass after local
10872         regalloc so the prolog can compute a more accurate max_offset.
10873         
10874         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
10875         the corresponding OP_I/OP_L opcodes.
10876
10877         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
10878
10879         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
10880
10881 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
10882
10883         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
10884         as they are handled in mini.c.
10885
10886         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
10887         
10888         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
10889         case since it is handled in mini.c.
10890
10891         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
10892
10893         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
10894
10895         * *.c: Use the new opcodes in the IR and back end code.
10896
10897         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
10898
10899         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
10900
10901 2008-02-06  Mark Probst  <mark.probst@gmail.com>
10902
10903         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
10904         an assert because it has a race condition.
10905
10906 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
10907
10908         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
10909
10910         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
10911
10912         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
10913
10914         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
10915         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
10916
10917 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
10918
10919         * cpu-amd64.md (move): Correct the maximum size of move.
10920
10921 2008-02-05  Mark Probst  <mark.probst@gmail.com>
10922
10923         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
10924         the generic class init trampoline to return quickly if the class
10925         is already inited.
10926
10927 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
10928
10929         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
10930         issues where an 32 bit callsite cannot be patched by a 64 bit address.
10931
10932 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
10933
10934         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
10935         branch.
10936
10937 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
10938
10939         * objects.cs: Add some soft-float tests.
10940
10941         * mini.c: Fix a couple more soft-float issues.
10942
10943         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
10944
10945         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
10946         avoid a REX prefix.
10947
10948 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
10949
10950         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
10951         exception happens while compiling a virtual method.
10952
10953 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
10954
10955         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
10956         
10957         * mini-sparc.c: Fix build.
10958
10959         * mini-sparc.c (get_call_info): Add support for generic sharing.
10960
10961         * mini-exceptions.c: Add a FIXME.
10962
10963 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
10964
10965         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
10966         altstack handling code.
10967
10968         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
10969         
10970         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
10971
10972         * mini-s390.c: Add support for generic sharing.
10973
10974         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
10975         Fix CAS on s390.
10976         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
10977
10978         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
10979
10980         * mini-s390x.c: Add support for generic sharing.
10981         
10982         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
10983         Fix CAS on ia64.
10984         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
10985
10986         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
10987         can be used since it takes a 16 bit signed immediate.
10988
10989         * inssel-s390x.brg: Fix OP_SETRET.
10990
10991         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
10992
10993         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
10994
10995         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
10996
10997         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
10998
10999         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
11000         in one place.
11001
11002         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
11003         stuff.
11004
11005         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
11006         of the unused mono_arch_patch_delegate_trampoline stuff.
11007
11008 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
11009
11010         * basic-long.cs: Move the fp related tests to basic-float.cs.
11011
11012         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
11013
11014         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
11015
11016         * basic-calls.cs: Add a test for proper float argument passing.
11017
11018         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
11019         if the context corresponds to an exception received through a signal.
11020
11021         * exceptions.cs: Add a test for nullref handling at the start of a try
11022         clause.
11023
11024         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
11025
11026         * jit-icalls.c (mono_break): New JIT icall.
11027
11028         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
11029
11030         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
11031
11032 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
11033
11034         * cpu-*.md: Get rid of unused opcodes.
11035
11036         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
11037
11038         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
11039         by all platforms.
11040
11041         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
11042         define.
11043
11044         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
11045         the arch independent trampoline code in mini-trampolines.c.
11046
11047         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
11048
11049         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
11050
11051         * mini-s390.h: Remove an unused define.
11052         
11053         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
11054         the arch independent trampoline code in mini-trampolines.c.
11055
11056         * mini-arm.c (mono_arch_emit_prolog): Fix build.
11057
11058 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
11059
11060         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
11061
11062         * mini-s390.c (mono_arch_emit_prolog): Fix build.
11063
11064         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
11065
11066         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
11067
11068         * cpu-amd64.md: Use smaller sizes for int opcodes.
11069
11070         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
11071
11072         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
11073         objects.cs.
11074
11075         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
11076         debugging.
11077
11078         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
11079         instead of though a pointer to save an indirection when accessing elements of
11080         the array.
11081
11082         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
11083         some typos.
11084         (NOT_IMPLEMENTED): New helper macro.
11085         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
11086         of a bb.
11087
11088         * *.c: Use the new helper macro.
11089
11090 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
11091
11092         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
11093
11094 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
11095
11096         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
11097         stack slots.
11098
11099 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
11100
11101         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
11102         profiling is enabled.
11103         
11104         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
11105         the end.
11106         (mono_arch_emit_prolog): Add more first bblock optimizations.
11107
11108         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
11109         in order if possible.
11110         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
11111         bblock, since the arguments are still in their original registers.
11112
11113         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
11114
11115 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
11116
11117         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
11118         as well.
11119
11120         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
11121         offset 0.
11122
11123         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
11124
11125         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
11126         process async exceptions received while in unmanaged code.
11127
11128         * mini.c (mini_init): Install a callback with the runtime which will be called
11129         when a thread receives an async exception while in unmanaged code.
11130
11131         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
11132
11133         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
11134
11135 2008-01-16  Wade Berrier  <wberrier@novell.com>
11136
11137         * cpu-g4.md:
11138         * cpu-arm.md:
11139         * cpu-s390x.md:
11140         fix build
11141
11142 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
11143
11144         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
11145         compilation with sun cc.
11146
11147         * cpu-*.md: Fix the build.
11148
11149         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
11150
11151         * mini-amd64.h: Add some comments to the MonoLMF structure.
11152
11153         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
11154         
11155         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
11156         in the LMF structure if possible. This saves two instructions in the
11157         managed->native wrappers.
11158
11159         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
11160
11161 2008-01-16  Mark Probst  <mark.probst@gmail.com>
11162
11163         * generic-sharing.c: New type argument lookup code which uses the
11164         runtime generic context template.
11165
11166 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
11167
11168         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
11169
11170         * mini-arm.c (add_general): Fix arm eabi parameter passing.
11171         (mono_arch_output_basic_block): Fix localloc implementation.
11172
11173         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
11174
11175         * mini-ia64.c (peephole_pass): Fix ia64 build.
11176
11177         * mini-amd64.c (peephole_pass): Fix a warning.
11178         
11179         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
11180         at a constant offset from sp/fp.
11181
11182         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
11183         instead of obtaining it from *lmf in the managed method case.
11184
11185 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
11186
11187         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
11188
11189 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
11190
11191         * mini.h (MonoInstList): New type.
11192         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
11193         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
11194         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
11195         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
11196         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
11197         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
11198         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
11199         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
11200         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
11201         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
11202         MONO_INST_LIST_FOR_EACH_ENTRY,
11203         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
11204         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
11205         mono_inst_list_first, mono_inst_list_last,
11206         mono_inst_list_next, mono_inst_list_prev): New instruction
11207         list handling interfaces.
11208         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
11209         list head 'ins_list'.
11210         (MonoInst): Replace next pointer with list head 'node'.
11211         (MonoCallInst): Make 'out_args' a MonoInstList.
11212         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
11213         (MonoCompile): Delete reverse_inst_list and
11214         reverse_inst_list_len.
11215         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
11216         mono_arch_lowering_pass, mono_arch_local_regalloc,
11217         mono_arch_output_basic_block, mono_arch_emit_prolog):
11218         Convert to new instruction lists.
11219         (insert_after_ins): Delete.
11220         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
11221         instruction lists.
11222         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
11223         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
11224         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
11225         mono_emulate_opcode, mono_emit_load_got_addr,
11226         inline_method, mono_method_to_ir, mono_print_bb_code,
11227         print_dfn, decompose_pass, nullify_basic_block,
11228         replace_out_block_in_code, remove_block_if_useless,
11229         merge_basic_blocks, move_basic_block_to_end,
11230         try_unsigned_compare, optimize_branches, mono_print_code,
11231         mini_select_instructions, remove_critical_edges): Likewise.
11232         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
11233         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
11234         mono_arch_output_basic_block, mono_arch_emit_prolog):
11235         Likewise.
11236         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
11237         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
11238         mono_arch_output_basic_block): Likewise.
11239         (inst_list_prepend, insert_after_ins): Delete.
11240         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
11241         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
11242         instruction lists.
11243         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
11244         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
11245         mono_arch_emit_prolog): Likewise.
11246         * cfold.c (mono_constant_fold): Likewise.
11247         * liveness.c (visit_bb, mono_analyze_liveness,
11248         optimize_initlocals): Likewise.
11249         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
11250         * graph.c (mono_draw_code_cfg): Likewise.
11251         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
11252         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
11253         mono_ssa_cprop): Likewise.
11254         * abcremoval (get_relations_from_previous_bb, process_block):
11255         Likewise.
11256         * local-propagation (mono_cprop_invalidate_values,
11257         mono_local_cprop_bb): Likewise.
11258         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
11259         peephole_pass, mono_arch_output_basic_block,
11260         mono_arch_emit_prolog): Likewise.
11261         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
11262         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
11263         mono_arch_emit_prolog): Likewise.
11264         (insert_after_ins): Delete.
11265         * aliasing.c (print_code_with_aliasing_information,
11266         mono_build_aliasing_information, mono_aliasing_deadce):
11267         Convert to new instruction lists.
11268         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
11269         peephole_pass, NEW_INS, mono_arch_lowering_pass,
11270         mono_arch_local_regalloc, mono_arch_output_basic_block):
11271         Likewise.
11272         (insert_after_ins): Delete.
11273         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
11274         peephole_pass, mono_arch_output_basic_block): Convert to
11275         new instruction lists.
11276         * mini-codegen (InstList, inst_list_prepend,
11277         insert_after_ins): Delete.
11278         (insert_before_ins, get_register_force_spilling,
11279         get_register_spilling, free_up_ireg, free_up_reg,
11280         create_copy_ins, create_spilled_store, alloc_int_reg,
11281         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
11282         to new instruction lists.
11283         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
11284         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
11285         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
11286         (insert_after_ins): Delete.
11287         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
11288         mono_arch_local_regalloc, mono_arch_output_basic_block,
11289         mono_arch_call_opcode): Convert to new instruction lists.
11290         (insert_after_ins): Delete.
11291         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
11292         peephole_pass, mono_arch_output_basic_block,
11293         mono_arch_emit_prolog): Convert to new instruction lists.
11294
11295 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
11296
11297         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
11298
11299         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
11300         Fixes #353182.
11301
11302         * Makefile.am (version.h): Make this work with non-bash shells.
11303
11304 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
11305
11306         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
11307
11308 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
11309
11310         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
11311         the InitializeArray optimization.
11312
11313 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
11314
11315         * mini.c driver.c: Don't include os/gc_wrapper.h.
11316
11317 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
11318
11319         * mini.c (print_jit_stats): Print GC statistics if available.
11320
11321 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
11322
11323         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
11324
11325 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
11326
11327         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
11328
11329 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
11330
11331         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
11332         
11333         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
11334
11335         * driver.c (mono_main): Ditto.
11336
11337 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
11338
11339         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
11340
11341         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
11342         in the vtable can't be encoded.
11343         (compile_method): Ditto.
11344
11345 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
11346
11347         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
11348         defined.
11349
11350         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
11351         lmf->rbp.
11352
11353         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
11354         the top LMF entry belongs to the current method.
11355
11356         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
11357
11358 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
11359
11360         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
11361         
11362         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
11363
11364         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
11365
11366         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
11367
11368         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
11369
11370         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
11371         implementation.
11372
11373         * basic-float.cs: Add an ulong->double cast test.
11374
11375 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
11376
11377         * mini.c (mono_method_to_ir): Fix a warning.
11378
11379 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
11380
11381         * mini-ops.h: Add OP_SWITCH.
11382
11383         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
11384         CEE_SWITCH in back-end code, use OP_SWITCH instead.
11385
11386 2007-12-11  Geoff Norton  <gnorton@novell.com>
11387
11388         * mini-s390x.c: Minor change to the MAX() define to allow
11389         it to compile with other gcc versions.
11390
11391 2007-12-11  Geoff Norton  <gnorton@novell.com>
11392
11393         * cpu-s390x.md:
11394         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
11395
11396 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
11397
11398         exceptions-arm.c (mono_arch_get_restore_context): Restore
11399         the frame pointer.
11400
11401         exceptions-arm.c (throw_exception): Save the frame pointer.
11402         This is a partial fix for #323747. Only the client side is
11403         fixed.
11404
11405 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
11406
11407         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
11408         was using an unrelated variable to log the class which
11409         needed the cctor to be called. This was crashing on arm.
11410
11411 2007-12-09  Robert Jordan  <robertj@gmx.net>
11412
11413         * mini-x86.c (mono_arch_emit_epilog):
11414         Consider all kinds of 64-bit types. Fixes #323114.
11415
11416 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
11417
11418         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
11419
11420 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
11421
11422         * mini-amd64.c (peephole_pass): Add a missing instruction check.
11423
11424 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
11425
11426         * mini.c: run type ctor before allocating an object, not only
11427         when running it's constructor method (fixes at least part of bug #342507).
11428
11429 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
11430         
11431         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
11432         
11433         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
11434         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
11435         function.
11436
11437         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
11438         mono_generic_class_init_trampoline () the same as it is done with the other
11439         trampolines.
11440
11441         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
11442         aot-runtime.c aot-compiler.c: Implement AOT support.    
11443
11444 2007-12-07  Mark Probst  <mark.probst@gmail.com>
11445
11446         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
11447         build for archs which don't have the vtable trampoline defined
11448         yet.
11449
11450 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
11451
11452         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
11453
11454         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
11455
11456         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
11457
11458         * tramp-<ARCH>.c: Use the new helper function.
11459
11460 2007-12-07  Mark Probst  <mark.probst@gmail.com>
11461
11462         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
11463         trampoline call, which takes a vtable argument.
11464
11465         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
11466         OP_TRAMPCALL_VTABLEs like other calls.
11467
11468         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
11469         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
11470         call.  Implemented a support function which fetches the vtable
11471         from a register set.
11472
11473         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
11474         Implemented a generic class init trampoline, using the
11475         OP_TRAMPCALL_VTABLE opcode.
11476
11477         * mini.c: Implemented static field access when sharing generic
11478         code.  This implies initing the class using the new
11479         OP_TRAMPCALL_VTABLE call.
11480
11481 2007-12-07  Mark Probst  <mark.probst@gmail.com>
11482
11483         * mini.c: Don't compile methods with sharing enabled if their
11484         classes are disabled for sharing.
11485
11486 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
11487
11488         * inssel.brg: Add a missing sign extension to the GETCHR and array access
11489         opcodes. Fixes #346563.
11490
11491         * objects.cs: Add a new test.
11492
11493         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
11494
11495         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
11496         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
11497
11498 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
11499
11500         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
11501
11502 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
11503
11504         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
11505         code stream.
11506
11507 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
11508
11509         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
11510
11511         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
11512         optimization in the AOT case.
11513         
11514 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
11515
11516         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
11517         
11518         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
11519
11520         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
11521
11522         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
11523
11524         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
11525         is created by the inlined delegate ctor.
11526
11527         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
11528
11529         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
11530
11531 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
11532
11533         * cpu-x86.md: Fix the length of ckfinite.
11534
11535 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
11536
11537         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
11538         
11539         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
11540         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
11541
11542         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
11543
11544         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
11545         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
11546
11547 2007-11-28  Martin Baulig  <martin@ximian.com>
11548
11549         * mini-x86.c
11550         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
11551         after creating the trampoline.
11552
11553 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
11554
11555         * aot-runtime.c (load_aot_module): Check runtime version if needed.
11556
11557         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
11558         the same version.
11559
11560         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
11561         instead of the calling method to help AOT.
11562
11563         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
11564
11565 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
11566
11567         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
11568         is defined.
11569
11570 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
11571
11572         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
11573         
11574         * aot-compiler.c (compile_method): Correct check for generic method definitions.
11575         (encode_method_ref): No need to handle generic method definitions specially.
11576
11577         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
11578
11579         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
11580         decode_klass_info.
11581
11582         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
11583         encode_klass_info.
11584         (compile_method): Enable generic sharing.
11585
11586 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
11587
11588         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
11589         (mini_method_compile): Add preliminary support for AOTing shared generic code.
11590
11591         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
11592         generic code.
11593
11594         * mini-trampolines.c: Fix a warning.
11595
11596         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
11597         NEW_PCONST.
11598         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
11599         (generic_class_is_reference_type): Remove unused function.
11600
11601         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
11602         in the generic vtable trampoline case.
11603
11604         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
11605         
11606         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
11607         return an AOT method based on a vtable slot.
11608
11609         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
11610
11611         * mini.c (mini_get_vtable_trampoline): Export this.
11612
11613 2007-11-22  Martin Baulig  <martin@ximian.com>
11614
11615         * debug-debugger.h
11616         (MonoDebuggerInfo): Move `debugger_version' up.
11617
11618 2007-11-22  Martin Baulig  <martin@ximian.com>
11619
11620         * mini-amd64.c
11621         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
11622
11623         * mini-trampolines.c
11624         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
11625         after compiling the method.
11626
11627 2007-11-20  Martin Baulig  <martin@ximian.com>
11628
11629         * debug-mini.c
11630         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
11631         (mono_debugger_remove_breakpoint): Likewise.
11632         (mono_debugger_check_breakpoints): Likewise.
11633
11634         * debug-debugger.c: Implement the new breakpoint interface here.
11635
11636 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
11637
11638         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
11639         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
11640
11641         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
11642
11643 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
11644
11645         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
11646
11647         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
11648         mini.c.
11649
11650         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
11651         mini.c.
11652
11653         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
11654         returning a vtype in a register.
11655
11656         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
11657         here from the arch specific code.
11658
11659         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
11660         mini.c.
11661
11662         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
11663         (mono_arch_emit_prolog): Increment maximum prolog size.
11664
11665         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
11666         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
11667
11668         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
11669         MonoGenericSharingContext.
11670
11671         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
11672         MonoGenericSharingContext. Allocate memory from the cfg mempool.
11673
11674 2007-11-15  Mark Probst  <mark.probst@gmail.com>
11675
11676         * mini.c, mini.h, generic-sharing.c: Functions for producing code
11677         which extract fields out of the runtime generic context.  Full
11678         sharing of the NEWARR opcode.
11679
11680 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
11681
11682         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
11683         --enable-minimal=ssa.
11684
11685 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
11686
11687         * mini-trampolines.c (mono_delegate_trampoline): Update after 
11688         mono_marshal_get_delegate_invoke () signature change.
11689
11690 2007-11-13  Mark Probst  <mark.probst@gmail.com>
11691
11692         * mini.c: Removed the shared context in favor of the generic
11693         sharing context.  Allocate the MonoJitInfo structure with room for
11694         the generic sharing context if it's needed.
11695
11696         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
11697         domain-internals.h now.
11698
11699         * mini-x86.c: Pass the generic sharing context to get_call_info ().
11700
11701         * generic-sharing.c: Several changes for working without a shared
11702         context and instead operating on open types instead.
11703
11704 2007-11-12  David S. Miller  <davem@davemloft.net>
11705
11706        * inssel-sparc.brg: Fix double instruction emit.
11707
11708 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
11709
11710         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
11711         Get/Set/Address methods.
11712         
11713         * mini.c debug-debugger.c mini-trampolines.c: Update after 
11714         mono_marshal_get_delegate_invoke signature change.
11715
11716 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
11717
11718         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
11719         This can happens with dynamic methods. Fixes the other bug in #322722.
11720
11721 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
11722
11723         * tramp-arm.c (mono_arch_patch_callsite): Support patching
11724         BX call sequence.
11725
11726         * mini-arm.c (arm_patch): Implement patching of BX call
11727         sequence. Fixes one of the bugs in #322722.
11728
11729 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
11730
11731        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
11732        under Linux.  We only need to flush every 32-byte cache line.    
11733
11734 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
11735
11736         * mini.c:
11737         move_basic_block_to_end: Add branches when needed, eventually creating
11738         a new BB.
11739         optimize_branches: added a parameter that tells if it's ok to create
11740         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
11741         and avoid calling move_basic_block_to_end when it's not ok.
11742         Fixes bug 318677.
11743
11744 2007-11-07  Mark Probst  <mark.probst@gmail.com>
11745
11746         * mini.c: Abort inlining call to InitializeArray if something
11747         looks wrong.  Let the icall handle it, which now has proper safety
11748         checks.
11749
11750 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
11751
11752         * mini.c (mono_spill_call): add support for soft-float.
11753
11754         * mini.c (mono_method_to_ir): add support for soft-float
11755         to inlined functions that return float.
11756
11757         * mini.c (mono_method_to_ir): add support for soft-float
11758         to cee_stsfld opcode on float fields.
11759
11760 2007-11-05  Geoff Norton  <gnorton@novell.com>
11761
11762         * mini-x86.h: Fix the structure access for X86 Leopard.
11763
11764
11765 2007-11-05  Martin Baulig  <martin@ximian.com>
11766
11767         * mini-trampolines.c
11768         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
11769         after compiling the method to notify the debugger.
11770
11771 2007-11-05  Martin Baulig  <martin@ximian.com>
11772
11773         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
11774
11775 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
11776
11777         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
11778         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
11779
11780 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
11781
11782         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
11783         native-to-managed wrappers.
11784         
11785 2007-11-01  Geoff Norton  <gnorton@novell.com>
11786
11787         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
11788         members.
11789
11790 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
11791
11792         * mini.c, mini-x86.c: when getting back from unmanaged code
11793         to managed via a marshaled delegate we also need to set the
11794         right domain.
11795
11796 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
11797
11798         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
11799         for amd64.
11800
11801 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
11802
11803         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
11804         let the debugger or other external agents to tell the JIT when
11805         a sw breakpoint has been inserted in the code that the JIT needs
11806         to be able to inspect.
11807
11808 2007-10-31  Martin Baulig  <martin@ximian.com>
11809
11810         * debug-debugger.h
11811         (MonoDebuggerInfo): Remove `runtime_class_init'.
11812
11813 2007-10-30  Martin Baulig  <martin@ximian.com>
11814
11815         * debug-mini.h
11816         (mono_debugger_thread_created): Added `MonoThread *' argument.
11817         (mono_debugger_extended_notification): New public method.
11818         (mono_debugger_trampoline_compiled): New public method.
11819
11820         * debug-mini.c
11821         (MonoDebuggerThreadInfo): Added `thread' and
11822         `extended_notifications' fields.
11823
11824         * debug-debugger.c
11825         (debugger_executable_code_buffer): New static variable.
11826
11827         * debug-debugger.h
11828         (MonoDebuggerInfo): Added `executable_code_buffer',
11829         `executable_code_buffer_size', `breakpoint_info_area',
11830         `breakpoint_table' and `breakpoint_table_size'.
11831
11832 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
11833
11834         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
11835         that IP  either is an unused value or the vtable pointer. IMT 
11836         calls use vtable + offset now. Reduced by almost half the size
11837         of IMT entries.
11838
11839 2007-10-26  Jonathan Chambers <joncham@gmail.com>
11840
11841         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
11842         defines to access param registers. Replace long usage with
11843         gsize as sizeof(long) != sizeof(void*) on Win64.
11844
11845         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
11846         on Win64. Fix intrinsic, use _AddressOfReturnAddress
11847         instead of non-existant _GetAddressOfReturnAddress.
11848
11849         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
11850         param registers. Save/restore %rdi and %rsi in MonoLMF.
11851
11852         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
11853         param registers. Modify (throw_exception) signature to take 
11854         %rdi and %rsi on Win64. 
11855
11856         Code is contributed under MIT/X11 license.
11857
11858 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11859
11860         * helpers.c: unlink debugging output files.
11861
11862 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
11863
11864         * mini.c: Move mono_create_ftnptr () to object.c.
11865
11866 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
11867
11868         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
11869         optional. This function can now be used to disassemble code generated
11870         outside the JIT such as trampolines and IMT thunks.
11871
11872         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
11873
11874         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
11875         vtable pointer from a ldr instruction.
11876
11877         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
11878         new IMT call sequence.
11879
11880         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
11881         call sequence for interface invocations.
11882
11883         * mini-arm.c (mono_arch_emit_imt_argument): added, required
11884         for imt support. This function is empty since IMT on ARM requires no
11885         special handling on the IR side.
11886
11887         * mini-arm.c (mono_arch_find_imt_method): added, required for
11888         imt support.
11889
11890         * mini-arm.c (mono_arch_find_this_argument): added, required
11891         for imt support.
11892
11893         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
11894         a ldr instruction to load a value stored in the code stream.
11895
11896         * mini-arm.c (mono_arch_build_imt_thunk):added, required
11897         for imt support.
11898
11899
11900 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
11901
11902         * mini.c (mini_init): Install the jump trampoline callback.
11903
11904 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11905
11906         * mini-trampolines.c: handle synchronized methods with the common
11907         vtable trampoline (bug #335601).
11908
11909 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
11910
11911         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
11912
11913         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
11914         64 bit platforms.
11915
11916         * mini-ia64.h mini-ia64.c: Add support for IMT.
11917
11918         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
11919         prolog. Fixes #331958.
11920
11921 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
11922
11923         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
11924
11925 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11926
11927         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
11928         trampoline.
11929
11930 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11931
11932         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
11933         trampoline.
11934
11935 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
11936
11937         * mini-x86.c, mini-x86.h: x86 support for the common vtable
11938         trampoline.
11939
11940 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
11941
11942         * mini-trampolines.c: changed the magic rampoline to understand
11943         the common vtable trampoline method: the method to invoke is
11944         determined by the vtable displacement of the call.
11945
11946 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11947
11948         * mini.c, mini.h: register the common vtable trampoline if the
11949         architecture supports it.
11950
11951 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11952
11953         * cpu-amd64.md: use the correct max length for tls_get.
11954
11955 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
11956
11957         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
11958         CEE_STELEM_ANY. Fixes #333696.
11959
11960 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
11961
11962         * exceptions-x86.c: provide more graceful handling of the case where
11963         we followed a bogus function pointer from managed code (bug #332866).
11964
11965 2007-10-11  Mark Probst  <mark.probst@gmail.com>
11966
11967         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
11968         replaces the generic_shared flag and will carry more information
11969         in the future.
11970
11971         * generic-sharing.c: Added mini_type_stack_size() which allows
11972         allows open types if given a generic sharing context.
11973         mini_get_basic_type_from_generic() takes a
11974         MonoGenericSharingContext* instead of a MonoCompile* now.
11975
11976         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
11977         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
11978         mini-sparc.c, mini-x86.c: Trivial changes required by the two
11979         changes above.  Just passing arguments through to the right
11980         places.
11981
11982 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11983
11984         * mini-arm.c: unify the call emission to emit_code_seq().
11985
11986 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
11987
11988         * tramp-arm.c: reduced the trampoline size.
11989
11990 2007-10-10  Mark Probst  <mark.probst@gmail.com>
11991
11992         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
11993         variable handling out of arch-specific code.
11994
11995 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
11996
11997         * mini-arm.c: implemented fast delegate dispatch.
11998
11999 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
12000
12001         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
12002         that fp elimination is turned off if the space required by locals is too
12003         big. Fixes #331958.
12004
12005 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
12006
12007         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
12008         ARM to the new style trampoline.
12009
12010 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
12011
12012         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
12013
12014         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
12015
12016 2007-10-09  Martin Baulig  <martin@ximian.com>
12017
12018         * debug-debugger.h
12019         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
12020         `field_info_offset_offset'.     
12021
12022 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
12023
12024         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
12025         removed more internal usage of the r11 register and made it available
12026         to the register allocator.
12027
12028 2007-10-08  Mark Probst  <mark.probst@gmail.com>
12029
12030         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
12031         when sharing generics and treat type variables as references.
12032
12033 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
12034
12035         * mini-ppc.c: started removing the internal uses of register r11
12036         to eventually allow the register allocator to manage it as an
12037         additional available register.
12038
12039 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
12040
12041         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
12042
12043 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
12044
12045         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
12046         specific trampolines as they are not performance critical as a jump
12047         target (maybe align as before only for AOT code?). This saves about
12048         200 KB of native code on x86 for monodevelop startup.
12049
12050 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
12051
12052         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
12053         monodevelop startup.
12054
12055 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
12056
12057         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
12058
12059         * mini-sparc.h mini-sparc.c: Implement IMT support.
12060
12061         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
12062         its smaller and doesn't clobber sparc_g1.
12063
12064         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
12065
12066 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
12067
12068         * mini-ppc.c: optimized the size of the IMT thunks a bit.
12069
12070 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
12071
12072         * mini-ppc.c: implemented fast delegate invocation.
12073
12074 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
12075
12076         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
12077
12078 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
12079
12080         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
12081         code to the new style trampoline in preparation for IMT support.
12082
12083 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
12084
12085         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
12086         systems already. This also reduces the specific trampiline sizes and
12087         prepares for the use of r12 as the IMT identifier register.
12088
12089 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
12090
12091         * mini-mips.h: endianess fix (simplified from a patch by
12092         Thomas Kunze <thommy@tabao.de>, bug #323737).
12093
12094 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
12095
12096         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
12097         to access ucontext fields and enable netbsd support
12098         (partially from Magnus Henoch <mange@freemail.hu>).
12099
12100 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
12101
12102         * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
12103         use the preprocessor from the CPP env var if it is set.
12104
12105 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
12106
12107         * mini-trampolines.c: fixed an assertion and moved it earlier in the
12108         code, before interface_offset gets used.
12109
12110 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
12111
12112         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
12113         mono_class_setup_vtable () before accessing klass->vtable.
12114
12115 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
12116
12117         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
12118         hackish.
12119
12120 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
12121
12122         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
12123         IMT slots (this saves hundreds of KB of memory in programs like
12124         IronPython and Monodevelop).
12125
12126 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
12127
12128         * mini.c: print the delegate counter.
12129
12130 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
12131
12132         * mini-x86.c: make it easier to enable the debugging code for IMT
12133         slots.
12134
12135 2007-09-28  Martin Baulig  <martin@ximian.com>
12136
12137         * debug-debugger.h
12138         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
12139         `mono_method_klass_offset' and `mono_method_token_offset'.
12140
12141 2007-09-20  Mark Probst  <mark.probst@gmail.com>
12142
12143         * mini.c: First generics sharing implementation.  Can only share
12144         in very simple cases.  If sharing doesn't work it falls back to
12145         dedicated compilation.
12146
12147         * mini.h: Flag in MonoCompile to specify whether generic
12148         compilation is shared.  Flags enum for marking which generic inst
12149         of a context is used.  Prototypes for helper functions.
12150
12151         * generic-sharing.c: Helper functions for generic method sharing.
12152
12153         * optflags-def.h: Optimization flag (gshared) for enabling generic
12154         method sharing added.
12155
12156         * Makefile.am: generic-sharing.c added.
12157
12158 2007-09-19 Daniel Nauck <dna@mono-project.de>
12159
12160         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
12161
12162 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
12163         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
12164         fixes bug 325507.
12165
12166 2007-09-19  Martin Baulig  <martin@ximian.com>
12167
12168         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
12169         mono_debug_cleanup() is now part of mono_cleanup().
12170
12171 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
12172
12173         * driver.c (mono_main): Fix a warning.
12174
12175 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
12176
12177         * aot-compiler.c: Optimize various parts when processing large assemblies.
12178         Fixes ##325568.
12179
12180         * mini.c (mono_patch_info_hash): Improve hash function.
12181
12182 2007-09-14  Jonathan Chambers <joncham@gmail.com>
12183
12184         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
12185         
12186         Code is contributed under MIT/X11 license.
12187
12188 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
12189
12190         * mini.c (mini_init): Fix a leak.
12191
12192         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
12193
12194 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
12195
12196         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
12197
12198 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
12199
12200         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
12201
12202 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
12203
12204         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
12205         variance tests.
12206
12207         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
12208
12209         * mini.c (handle_alloc): Enable managed allocators in AOT code.
12210
12211         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
12212
12213         * aot-runtime.c (decode_patch_info): Ditto.
12214
12215 2007-09-12  Jonathan Chambers <joncham@gmail.com>
12216
12217         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
12218         static case. Cache delegates in architecture specific code, 
12219         based on number of parameters.
12220         
12221         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
12222         in architecture specific code, based on number of parameters.
12223         
12224         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
12225         caching happen in architecture specific code now.
12226         
12227         Code is contributed under MIT/X11 license.
12228
12229 2007-09-12  Jonathan Chambers <joncham@gmail.com>
12230
12231         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
12232         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
12233         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
12234
12235         Code is contributed under MIT/X11 license.
12236
12237 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
12238         * mini.c: (mono_thread_abort) Fixed bug #82416.
12239
12240 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
12241
12242         * mini.: hook the new managed GC allocation feature into the JIT.
12243
12244 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
12245
12246         * mini.c: implementation for the new runtime tls opcode.
12247
12248 2007-09-11  Martin Baulig  <martin@ximian.com>
12249
12250         * debug-debugger.h
12251         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
12252         `mono_method_inflated_offset'.
12253
12254 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
12255
12256         * driver.c mini.h mini.c: Add a new devel command line option for injecting
12257         async exceptions into a method.
12258
12259         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
12260         purpose of testing whenever the unwinder works at every instruction.
12261
12262 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
12263
12264         * mini.c: check accessibility of method used in ldftn (fixes
12265         bug #82635).
12266
12267 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
12268
12269         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
12270
12271         * inssel.brg: Fix a warning.
12272
12273 2007-09-03  Martin Baulig  <martin@ximian.com>
12274
12275         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
12276         now takes the `main_method' as argument.
12277
12278 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
12279
12280         * cpu-sparc.md (endfilter): Add missing src1:i argument.
12281
12282 2007-08-30  Jonathan Chambers <joncham@gmail.com>
12283
12284         * driver.c: include the cil-coff.h header on Windows.
12285         
12286         Code is contributed under MIT/X11 license.
12287
12288 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
12289
12290         * mini.c, driver.c: don't include the cil-coff.h header.
12291
12292 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
12293
12294         * mini.c: flag places that needs fixes fo soft-float support.
12295
12296 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
12297
12298         * mini.h, inssel-float.brg: fix soft-float constant loads on big
12299         endian systems (partially from Dean Jenkins, bug #81924).
12300
12301 2007-08-28  Mark Probst  <mark.probst@gmail.com>
12302
12303         * mini.c (check_linkdemand): Remove embedded reference object in
12304         call to LinkDemandSecurityException.
12305         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
12306         with an IntPtr instead of a reference object.
12307
12308 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
12309
12310         * mini.c (handle_initobj): Handle alignment properly.
12311
12312         * inssel.brg (mini_emit_memset): Ditto. 
12313
12314         * inssel.brg (mini_emit_memcpy): Ditto. 
12315
12316         * inssel-sparc.brg: Ditto.              
12317
12318         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
12319
12320 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
12321
12322         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
12323         exceptions raised in unmanaged code. Fixes part of #82594.
12324
12325 2007-08-24  Mark Probst  <mark.probst@gmail.com>
12326
12327         * mini.c (mono_method_to_ir), declsec.c
12328         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
12329
12330 2007-08-22  Martin Baulig  <martin@ximian.com>
12331
12332         * debug-mini.h
12333         (MonoDebuggerThreadInfo): New typedef.
12334         (mono_debugger_thread_table): New global variable.
12335         (mono_debugger_thread_created): New public function.
12336         (mono_debugger_thread_cleanup): New public function.
12337
12338         * debug-debugger.h
12339         (MonoDebuggerInfo):
12340         - removed `get_current_thread' and `lookup_assembly'.
12341         - removed `data_table'.
12342         - added `thread_table'.
12343
12344         * mini.c
12345         (mono_thread_start_cb): Call mono_debugger_thread_created().
12346         (mono_thread_attach_cb): Likewise.
12347         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
12348         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
12349         initial domain.
12350
12351         * driver.c (mono_main): Move mono_debug_init() up, before calling
12352         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
12353
12354 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
12355
12356         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
12357         together when passing several arguments of type double (gives a small
12358         speedup and saves a few bytes of generated code).
12359
12360 2007-08-20  Jb Evain  <jbevain@novell.com>
12361
12362         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
12363
12364 2007-08-20  Jb Evain  <jbevain@novell.com>
12365
12366         * mini.c (mono_method_to_ir): throw MethodAccessException
12367         and FieldAccessException instead of InvalidProgramException.
12368
12369 2007-08-20  Mark Probst  <mark.probst@gmail.com>
12370
12371         * mini.c: CoreCLR security checks.
12372
12373         * mini.h: Removed MonoSecurityMode (moved to
12374         metadata/security-manager.h) and mono_security_mode global var
12375         (replaced by set/get functions in security-manager.h).
12376
12377         * driver.c: Added "core-clr-test" security mode for testing.  Used
12378         set-function for setting security mode.
12379
12380 2007-08-17  Mark Probst  <mark.probst@gmail.com>
12381
12382         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
12383         the new jit_info_table.
12384
12385         * driver.c: Test code for the new jit_info_table (enabled by the
12386         define MONO_JIT_INFO_TABLE_TEST).
12387
12388 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
12389
12390         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
12391         detection of call <REG> instruction sequence. Fixes build on freebsd.
12392
12393 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
12394
12395         * mini-exceptions.c: Fix a warning.
12396
12397 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
12398
12399         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
12400         stack overflow handling code on amd64 too.
12401
12402         * mini-exceptions.c (mono_setup_altstack): Make this use 
12403         mono_thread_get_stack_bounds ().
12404
12405         * mini-x86.h: Disable sigaltstack on solaris x86.
12406
12407 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
12408
12409         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
12410
12411 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
12412
12413         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
12414
12415 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
12416
12417         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
12418
12419         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
12420
12421 2007-08-03  Neale Ferguson <neale@sinenomine.net>
12422
12423         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
12424         due to alignment.
12425
12426 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
12427
12428         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
12429         to be emitted (bug #82281).
12430
12431 2007-08-01  Martin Baulig  <martin@ximian.com>
12432
12433         Merged the `debugger-dublin' branch.
12434
12435         * debug-debugger.h (MonoDebuggerInfo):
12436         Removed the `old_*' compatibility entries.
12437         Added `debugger_version' and `data_table'.
12438         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
12439         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
12440
12441         * debug-mini.c
12442         (MiniDebugMethodBreakpointInfo): Add `address_list'.
12443         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
12444         instead of a `gconstpointer'.
12445         (mono_debugger_insert_method_breakpoint): Return a
12446         `MonoDebugMethodAddressList *'.
12447
12448 2007-06-28  Martin Baulig  <martin@ximian.com>
12449
12450         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
12451
12452 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
12453
12454         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
12455         __builtin_frame_address () since it is broken on older gcc versions.
12456
12457 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
12458
12459         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
12460         on the stack overflow handling and made the managed stack overflows
12461         catchable in most cases using soft guard pages.
12462         * exceptions-x86.c: added code to restore the protection in the soft
12463         guard pages at the end of exception handling.
12464
12465 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
12466
12467         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
12468
12469 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
12470
12471         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
12472         exception handling.
12473
12474 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
12475
12476         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
12477         signal handling support until it has been ported to the new mechanism.
12478         * mini.c: fixed stack overflow detection and use the new
12479         architecture code  to handle signals on the altstack.
12480
12481 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
12482
12483         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
12484         stack overflows on the alt stack.
12485
12486 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
12487
12488         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
12489         stack overflows on the alt stack.
12490
12491 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
12492
12493         * exceptions-ppc.c: cleanup preparing for altstack support.
12494
12495 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
12496
12497         * exceptions-arm.c: cleanup preparing for altstack support.
12498
12499 2007-07-27  Mark Probst  <mark.probst@gmail.com>
12500
12501         * mini.c (print_jit_stats): Output hazard pointer stats.
12502
12503 2007-07-26  Mark Probst  <mark.probst@gmail.com>
12504
12505         * driver.c, mini.c: Replaced security mode flags with a single
12506         enum variable.
12507
12508 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
12509
12510         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
12511
12512 2007-07-25  Mark Probst  <mark.probst@gmail.com>
12513
12514         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
12515         (which doesn't do anything yet) for activating Core CLR
12516         (Silverlight) security.
12517
12518 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
12519
12520         * mini-codegen.c: work around a possible gcc bug on arm.
12521
12522 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
12523
12524         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
12525         message for platforms that don't support AOT compilation.
12526
12527 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
12528
12529         * mini.h, mini.c, driver.c: temporary smcs hack.
12530
12531 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
12532
12533         * mini-arm.h, mini-arm.c: arm EABI fixes.
12534
12535 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
12536
12537         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
12538         case.
12539
12540         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
12541         trampolines taking a method argument.
12542
12543         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
12544
12545         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
12546         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
12547
12548         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
12549         JIT compilation throws an exception. Fixes #82050.
12550
12551 2007-07-19  Mark Probst  <mark.probst@gmail.com>
12552
12553         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
12554         with the MONO_EXCEPTION_ defines.
12555
12556 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
12557
12558         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
12559         #82117.
12560         
12561         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
12562         the cause of an assertion.
12563
12564 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
12565
12566         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
12567         removed.
12568
12569 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
12570
12571         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
12572         assert. Should fix #82103.
12573
12574 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
12575
12576         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
12577         here too. Fixes #82095.
12578
12579         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
12580         addresses.
12581
12582         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
12583
12584         * mini-amd64.h: Enable IMT for amd64.
12585         
12586         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
12587
12588 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
12589
12590         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
12591
12592 2007-07-12  Mark Probst  <mark.probst@gmail.com>
12593
12594         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
12595         as soon as check_linkdemand sets an exception_type.
12596
12597 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
12598
12599         * mini-x86.c: fixed offsets for IMT call sequence.
12600         * mini-x86.h: enable IMT again.
12601
12602 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
12603
12604         * trace.c (mono_trace_enter_method): Decode MonoType too.
12605
12606         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
12607
12608         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
12609
12610         * mini-amd64.c: Add preliminary IMT implementation.
12611         
12612 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
12613
12614         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
12615         understand the new IMT-base interface invocation (thanks to
12616         Daniel Nauck for the report and the remote debugging session).
12617
12618 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
12619
12620         * mini-x86.c: size and speed optimizations for the IMT bsearch.
12621
12622 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
12623
12624         * Makefile.am (aotcheck): Make this actually use the AOTed code.
12625
12626 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
12627
12628         * mini-trampolines.c: implement AOT IMT support.
12629         * mini-x86.h: enable IMT support for wider testing.
12630
12631 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
12632
12633         * inssel.brg (emit_imt_argument): Add aot support here.
12634
12635         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
12636
12637 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
12638
12639         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
12640         of the IMT implementation, partially from massi, with my
12641         implementation of the bsearch sequence. Disabled by default until
12642         the AOT code is implemented.
12643
12644 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
12645
12646         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
12647
12648         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
12649
12650 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
12651
12652         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
12653         arch-independent IMT JIT code from Massimiliano
12654         Mantione (massi@ximian.com) with small cleanups from me.
12655
12656 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
12657
12658         * Makefile.am: fix svn invocation to get the svn revision to be
12659         independent of the local language (build fix).
12660
12661 2007-07-09  Mark Probst  <mark.probst@gmail.com>
12662
12663         * mini.c (inline_method): Reset cfg->exception_type if the
12664         inlining is aborted.  Fixes: 82049.
12665
12666 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
12667
12668         * mini.c: remove assert from exception handling code when exception_ptr
12669         is not set.
12670
12671 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
12672
12673         * mini.c (mono_codegen): Add an assert.
12674
12675         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
12676         enter and leave code.
12677         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
12678
12679 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
12680
12681         * mini-ppc.c: fixed memory corruption for localloc(0)
12682         (bug #81852).
12683
12684 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
12685         
12686         * mini.c: Fix warnings.
12687
12688 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
12689
12690         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
12691         to emit better double->int conversions.
12692
12693 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
12694
12695         * mini.c: the provided Min/Max optimizations are valid for unisgned
12696         ints.
12697
12698 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
12699
12700         * 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
12701
12702 2007-06-28  Miguel de Icaza  <miguel@novell.com>
12703
12704         * mini.c (mono_running_on_valgrind): Add support for reporting the
12705         method and  its boundaries to valgrind.
12706
12707 2007-06-28  Martin Baulig  <martin@ximian.com>
12708
12709         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
12710
12711 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
12712
12713         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
12714
12715         * generic.2.cs: Add new test case.
12716
12717 2007-06-25  Martin Baulig  <martin@ximian.com>
12718
12719         Merged the `debugger-dublin' branch.
12720
12721         * debug-mini.c
12722         (mono_debugger_insert_method_breakpoint): New public method.
12723         (mono_debugger_remove_method_breakpoint): Likewise.
12724         (mono_debugger_check_breakpoints): New static method.
12725         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
12726
12727         * debug-debugger.h (MonoDebuggerInfo):
12728         Renamed (to keep backward compatibility in the vtable):
12729         `insert_breakpoint' -> `old_insert_breakpoint'.
12730         `remove_breakpoint' -> `old_remove_breakpoint'.
12731         `create_string' -> `old_create_string'.
12732         `lookup_class' -> `old_lookup_class'.
12733         `lookup_type' -> removed; changed into a dummy field.
12734         `lookup_assembly' -> `old_lookup_assembly'.
12735         Added (same functionality, but different signature):
12736         `create_string', `lookup_class', `lookup_assembly'
12737         Added new:
12738         `get_method_addr_or_bpt', `remove_method_breakpoint',
12739         `runtime_class_init'.
12740
12741         * debug-debugger.c: Merged the `debugger-dublin' branch.
12742
12743 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
12744
12745         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
12746         well.
12747         (peephole_pass): Likewise.
12748
12749 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
12750
12751         * driver.c: hopefully make setaffinity work also for ancient
12752         versions of linux.
12753
12754 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
12755
12756         * driver.c : win32 build fix.
12757
12758 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
12759
12760         * driver.c: check for the MONO_NO_SMP env var and bind to a single
12761         processor if it is set.
12762
12763 2007-06-21  Martin Baulig  <martin@ximian.com>
12764
12765         * debug-mini.h: New file.
12766
12767         * debug-mini.c
12768         (mono_debugger_insert_breakpoint_full): Moved here from
12769         ../metadata/mono-debug-debugger.c.
12770         (mono_debugger_remove_breakpoint): Likewise.
12771         (mono_debugger_breakpoint_callback): Likewise.
12772
12773 2007-06-15  Raja R Harinath  <rharinath@novell.com>
12774
12775         * jit-icalls.c (mono_helper_compile_generic_method): Update to
12776         changes in MonoGenericClass.
12777
12778 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
12779
12780         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
12781
12782 2007-06-14  Raja R Harinath  <rharinath@novell.com>
12783
12784         * jit-icalls.c (mono_helper_compile_generic_method): Update to
12785         removal of MonoGenericMethod.
12786
12787 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
12788
12789         * mini-exceptions.c: hooks for the exception events profiling API.
12790
12791 2007-06-14  Randolph Chung  <tausq@debian.org>
12792
12793         * Makefile.ma: Add hppa target.
12794         * mini-arch.h: Include mini-hppa.h
12795         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
12796         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
12797         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12798
12799 2007-06-14  Randolph Chung  <tausq@debian.org>
12800
12801         * inssel.brg: Add rules for "chained" compare-branch operations so that
12802         a single compare op can affect multiple branches.  Adjust cost for
12803         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
12804         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
12805         cost for some rules so that they can more easily be overridden by
12806         per-arch rules (with fixes from lupus).
12807         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12808
12809 2007-06-13  Randolph Chung  <tausq@debian.org>
12810
12811         * mini-ops.h: Reorder branch ops so that they match the order of the
12812         corresponding CEE_* ops.  The code expects them this way.
12813         Add new ops for HPPA target.
12814         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12815
12816 2007-06-13  Randolph Chung  <tausq@debian.org>
12817
12818         * mini-exceptions.c: Handle cases where the stack grows towards
12819         larger addresses.
12820         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12821
12822 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
12823
12824         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
12825         counter.
12826         * driver.c: explain where a non-matching corlib is found.
12827
12828 2007-06-13  Mark Probst  <mark.probst@gmail.com>
12829
12830         * mini.c (print_jit_stats): Output dynamic code allocation stats.
12831
12832 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
12833
12834         * mini-exceptions.c: Generate a method profile leave event during
12835         an exception to ensure that the profiler gets notified.
12836
12837 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
12838
12839         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
12840         branch.
12841
12842         * cpu-amd64.md: Add long_and/or/xor opcodes.
12843
12844 2007-06-06  Wade Berrier  <wberrier@novell.com>
12845
12846         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
12847         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
12848         length of instruction shr_imm (expected 8, got 10)
12849
12850 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
12851
12852         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
12853
12854 2007-06-06  Mark Probst  <mark.probst@gmail.com>
12855
12856         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
12857         MonoInternalHashTable again (fixed bug in the internal hash table
12858         code).
12859
12860 2007-06-06  Mark Probst  <mark.probst@gmail.com>
12861
12862         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
12863         Have to figure out what makes it crash the SWF regression.
12864
12865 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
12866
12867         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
12868
12869 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
12870
12871         * mini.c: optimize out the type check when storing null in a
12872         reference array.
12873
12874 2007-06-04  Mark Probst  <mark.probst@gmail.com>
12875
12876         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
12877         MonoInternalHashTable.
12878
12879 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
12880
12881         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
12882         signed integer methods.
12883
12884 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
12885
12886         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
12887         permanently since the current approach doesn't work.
12888
12889 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
12890
12891         * inssel.brg (stmt): Only call delegate->invoke_impl if 
12892         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
12893
12894 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
12895
12896         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
12897         the sreg2==rdx case.
12898         
12899         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
12900         account if it contains a rex prefix.
12901         (peephole_pass): Handle OP_FMOVE as well.
12902
12903 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
12904
12905         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
12906         as it causes regressions.
12907
12908 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
12909
12910         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
12911         static case as well.
12912
12913         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
12914
12915         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
12916         (mono_arch_get_this_arg_from_call): Ditto.
12917
12918         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
12919
12920         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
12921         invoke_impl field.
12922
12923         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
12924         (mono_arch_get_this_arg_from_call): Ditto.
12925
12926         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
12927         
12928         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
12929         try to create optimized invoke code and use that for further invocations. 
12930         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
12931
12932         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
12933
12934 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
12935
12936         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
12937         sealed classes or methods.
12938         *devirtualization.cs: tests for the new optimization
12939
12940 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
12941
12942         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
12943         by the update_volatile () function.
12944
12945 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
12946
12947         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
12948         require it.
12949
12950         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
12951
12952 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
12953
12954         * mini.c: Add configure checks for header files.
12955         * mini-x86.c: Add configure checks for header files.
12956         * trace.c: Add configure checks for header files.
12957         * aot-runtime.c: Add configure checks for header files.
12958         * aot-compiler.c: Add configure checks for header files.
12959         * driver.c: Add configure checks for header files.
12960         * mini-codegen.c: Add configure checks for header files.
12961         
12962         Code is contributed under MIT/X11 license.
12963
12964 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
12965
12966         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
12967         icompare_imm -128 + op_iclt. Fixes #81703.
12968
12969 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
12970
12971         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
12972
12973 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
12974
12975         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
12976         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
12977         so that all isinst checks now use "interface_bitmap".
12978
12979 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
12980
12981         * cpu-amd64.md (jmp): Fix a warning.
12982
12983         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
12984
12985         * basic.cs: Add new regression test.
12986
12987         * basic.cs: Remove test which is now in basic-long.cs.
12988
12989         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
12990
12991         * basic-long.cs: Add new test.
12992         
12993 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
12994
12995         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
12996
12997 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
12998
12999         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
13000
13001         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
13002         places.
13003         
13004         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
13005         throwing code a bit.
13006
13007         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
13008         the exception throwing code a bit.
13009
13010         * mini-x86.c (get_call_info): Allocate result from a mempool.
13011
13012 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
13013
13014         * aot-compiler.c (find_typespec_for_class): Fix the assert.
13015
13016         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
13017
13018         * mini.h (MonoCompile): Add 'token_info_hash' field.
13019
13020         * mini.c: Save token->method associations during compilation so the AOT 
13021         compiler can use it.
13022         
13023         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
13024         which reference generic classes and methods.
13025
13026 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
13027
13028         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
13029
13030         * aot-compiler.c (compile_method): Fix a typo in a comment.
13031
13032         * aot-runtime.c (decode_cached_class_info): Skip generic types.
13033
13034         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
13035         everything generic.
13036
13037         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
13038
13039 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
13040
13041         * mini.h (MonoCompile): Add 'args' field.
13042
13043         * mini.c (mono_compile_create_vars): Store variables representing the arguments
13044         into cfg->args.
13045
13046         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
13047
13048 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
13049
13050         * mini.c (mono_compile_get_interface_var): Remove this unused function.
13051
13052         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
13053
13054         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
13055         opcodes for some opcodes.
13056
13057         * mini.h *.brg *.c: Use the new opcodes.
13058
13059 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
13060
13061         * mini.h: Bumped aot revision.
13062
13063         * inssel.brg: modified code generation of type checks for interfaces
13064         to use the new "MonoClass.interface_bitmap" instead of the old
13065         "MonoClass.interface_offsets".
13066
13067 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
13068
13069         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
13070
13071 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
13072
13073         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
13074         64 bit platforms.
13075
13076 2007-04-27  Neale Ferguson <neale@sinenomine.net>
13077
13078         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
13079
13080 2007-04-27  Wade Berrier  <wberrier@novell.com>
13081
13082         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
13083         mini.h) to fix build.
13084
13085 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
13086
13087         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
13088         
13089         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
13090         causes the corlib unit tests to fail.
13091
13092 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
13093
13094         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
13095
13096         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
13097
13098         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
13099         opcodes to the comparison relations.
13100
13101         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
13102         opcodes to their types.
13103         
13104         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
13105
13106         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
13107         it in cfg->arch.cinfo.
13108
13109         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
13110
13111         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
13112         cfg->cil_offset_to_bb.
13113
13114 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
13115
13116         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
13117         created becase of initlocals.
13118
13119 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
13120
13121         * mini-alpha.c cpu-alpha.md: More alpha port work from 
13122         Sergey Tikhonov <tsv@solvo.ru>.
13123
13124 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
13125
13126         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
13127
13128 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
13129
13130         * cpu-s390.md (break): Correct the length of break instruction.
13131
13132 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
13133
13134         * mini.c: fix a couple of soft-float issues and comments.
13135
13136 2007-04-15  Miguel de Icaza  <miguel@novell.com>
13137
13138         * trace.c (is_filenamechar): - is also a filename char.
13139
13140 2007-04-15  Neale Ferguson <neale@sinenomine.net>
13141
13142         * mini-s390.c: Correct checking for enum type in return value processing.
13143
13144 2007-04-14  Raja R Harinath  <rharinath@novell.com>
13145
13146         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
13147         (version.h): Makefile is in the build directory.
13148
13149 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
13150
13151         * mini-amd64.h: fix for assertion failure on Solaris/amd64
13152
13153 2007-04-11  Martin Baulig  <martin@ximian.com>
13154
13155         * mini.c (can_access_member): Fix handling of generic classes;
13156         fixes #81259.
13157
13158 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
13159
13160         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
13161
13162 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
13163
13164         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
13165
13166 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
13167
13168         * mini-codegen.c: make sure the right spill amount is
13169         used for fp or integer registers (fixes the float_sub_spill() on ppc).
13170
13171 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
13172
13173         * mini-ppc.c: fixes for the fp_branch_nan test.
13174
13175 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
13176
13177         * basic.cs: Comment out new test which still fails on ia64.
13178
13179 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13180
13181         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
13182
13183 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
13184
13185         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
13186
13187 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
13188
13189         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
13190         on 64 bit machines. Fixes part of #80738.
13191
13192         * basic.cs: Add regression test.
13193
13194 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
13195
13196         * inssel.brg basic.cs: Revert previous change to fix build.
13197
13198         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
13199         platforms.
13200         
13201         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
13202
13203         * basic.cs: Add new regression test.
13204
13205 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
13206
13207         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
13208         many arguments.
13209
13210 2007-03-16  Neale Ferguson <neale@sinenomine.net>
13211
13212         * cpu-s390x.md: Correct length of break instruction.
13213
13214 2007-03-16  Neale Ferguson <neale@sinenomine.net>
13215
13216         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
13217         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
13218
13219 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
13220
13221         * *.c: Begin WIN64 port.
13222         * mini.c:  Use correct register in profiler.
13223         * mini-amd64.c: No inline assembly on Win64.
13224         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
13225         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
13226         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
13227         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
13228         mono_arch_ip_from_context for Win64.
13229         
13230         Contributed under MIT/X11 license.
13231
13232 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
13233
13234         * exceptions-amd64.c (seh_handler): Ditto.
13235
13236         * exceptions-x86.c (seh_handler): Fix a memory leak.
13237
13238 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
13239
13240         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
13241         mini-s390x.c: fixed peephole optimizations to deal
13242         correctly with 1 and 2 byte reload avoidance.
13243
13244 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
13245
13246         * cpu-s390.md, cpu-s390x.md: update localloc length.
13247
13248 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
13249
13250         * cpu-g4.md: added missing descriptions.
13251
13252 2007-03-14  Miguel de Icaza  <miguel@novell.com>
13253
13254         *  Makefile.am: Add support so the tail tests are not executed on
13255         PowerPC as that is a known limitation of the PowerPC port.
13256
13257 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
13258
13259         * runmdesc.bat:  Move to msvc directory.
13260         
13261 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
13262
13263         * runmdesc.bat:  Run executable that was produced by the current
13264         target and sent via an argument.
13265         
13266 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
13267
13268         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
13269         #81102.
13270
13271         * generics.2.cs: Add regression test.
13272
13273 2007-03-09  Wade berrier  <wberrier@novell.com>
13274
13275         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
13276
13277 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
13278
13279         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
13280         AOT code depends on this.
13281
13282 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
13283
13284         * mini.c: more precise tracking of types in the eval stack
13285         (part of fix for bug #81044).
13286
13287 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
13288
13289         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
13290
13291         * aot-compiler.c (encode_patch): Remove an obsolete comment.
13292
13293 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
13294
13295         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
13296
13297         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
13298
13299 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
13300
13301         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
13302         a pointer on 64 bit systems. Fixes #80190.
13303
13304         * iltests.il: Add new regression test.
13305
13306 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
13307
13308         * mini.c: inline a constant for Environment.IsRunningOnWindows.
13309
13310 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
13311
13312         * trace.c: Remove an erroneous alignemnt check when tracing.
13313           Fixes --trace on OSX86.
13314
13315 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
13316
13317         * mini-$(arch).h: initialize SP in context for all the archs.
13318
13319 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
13320
13321         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
13322         regressions in the thread tests.
13323
13324 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
13325
13326         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
13327         - fixed implementation of LOCALLOC opcode
13328         - implemented non-un compare for floats
13329         - code cleanup
13330         - implementation of FDIV and CKFINITE opcodes
13331         - fixes for latest mono updates
13332         - additional arch opcodes
13333
13334 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
13335
13336         * Makefile.am: simplify and merge rules for cross-compilation.
13337
13338 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
13339
13340         * local-propagation.c: Actually *apply* the fix for bug 80591...
13341
13342 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
13343
13344         * mini-exceptions.c: backuot part of the last change
13345         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
13346
13347 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
13348         * inssel.brg: Fix bug 59286.
13349
13350
13351 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
13352
13353         * mini-exceptions.c: patch from Zoltan to correctly check for
13354         stack boundaries (using the stack register, not the frame register),
13355         fixes bugs #80724, #79717.
13356
13357 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
13358
13359         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
13360         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
13361
13362         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
13363         presence of frame pointer elimination.
13364
13365 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
13366         
13367         * mini-x86.h: NetBSD UCONTEX_REG defines.
13368
13369 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
13370
13371         * inssel-amd64.brg: Fix amd64 build.
13372
13373 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
13374
13375         * mini.h: remove extern to workaround what looks likes gcc bug 26905
13376         on amd64.
13377
13378 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
13379
13380         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
13381         ends.
13382
13383         * mini-<ARCH>.c: Use mono_is_regsize_var ().
13384
13385 2007-01-30 Mark Mason <mason@broadcom.com>
13386
13387            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
13388            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
13389            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
13390            beginning support for CEE_JMP [not quite working yet]
13391            * tramp-mips.c: LMF handling now works
13392         
13393 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
13394
13395         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
13396
13397         * mini.h (NULLIFY_INS): New macro.
13398
13399 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
13400
13401         * mini.c: statistical profiler fix for windows, patch
13402         from Tor Lillqvist (tml@novell.com).
13403
13404 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
13405         * local-propagation.c: Fix bug 80591.
13406
13407 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
13408
13409         * Makefile.am: put back the --export-dynamic option as with
13410         the previous gmodule flags (thanks to Robert Jordan).
13411
13412 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
13413
13414         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
13415
13416         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
13417         simplify and speed up the local register allocator. Also rename some fields
13418         like iassign->vassign.
13419         
13420         * regalloc.c: Remove some functions which are no longer used since their
13421         inlined version is in mini-codegen.c.
13422         
13423         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
13424
13425         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
13426
13427 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
13428
13429         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
13430         narrowing. Fixes #80622.
13431
13432         * iltests.il: Add new regresssion test. 
13433
13434 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
13435
13436         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
13437         debug-debugger.c, debug-debugger.h: warning fixes.
13438         * driver.c: updated copyright year and made it fit in one line.
13439
13440 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
13441
13442         * aot-runtime.c: updated to use mono-dl instead of gmodule.
13443
13444 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
13445
13446         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
13447
13448         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
13449
13450         * iltests.il: Add new test for bug #80507.
13451
13452 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
13453
13454         * mini-arm.h: use soft-float also on vfp for now.
13455
13456 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
13457
13458         * mini.c: fix some more soft-float issues.
13459
13460 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
13461
13462         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
13463
13464 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
13465         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
13466         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
13467         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
13468
13469 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
13470
13471         * mini-arm.c: typo fix.
13472
13473 2007-01-23  Neale Ferguson <neale@sinenomine.net>
13474
13475         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
13476
13477 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
13478
13479         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
13480         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
13481
13482         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
13483
13484         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
13485
13486         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
13487         
13488         * inssel.brg: Fix a warning.
13489
13490         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
13491
13492         * abcremoval.c ssa.c ssapre.c: Update after this change.
13493         
13494         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
13495
13496         * dominators.c (df_set): Use mono_bitset_union_fast.    
13497
13498 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
13499
13500         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
13501         mini-codegen.c: reduce relocations and memory usage for the cpu
13502         description.
13503
13504 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
13505
13506         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
13507
13508         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
13509         to reduce their size.
13510
13511 2007-01-19 Mark Mason <mason@broadcom.com>
13512
13513         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
13514         * mini-mips.c: more configuration macros, support long conditional branches, additional
13515         asserts, fix epilog instrumentation.
13516         * mini-mips.h: use standard stack walk
13517         * cpu-mips.md: increase size of div, rem and conditional branches
13518         
13519 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
13520
13521         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
13522         to cpu spec data.
13523
13524 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
13525
13526         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
13527         (compile_method): Ditto.
13528
13529         * aot-runtime.c (decode_klass_info): Ditto.
13530
13531         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
13532         needed by the code generated by inssel.brg. Also fix a warning.
13533
13534 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
13535
13536         * mini.c: deal with enums that become genericinsts by
13537         being nested in a generic class (bug #79956).
13538
13539 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
13540
13541         * mini.c: match the generic definition to check for
13542         private access with generic types (bug #78431).
13543
13544 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
13545
13546         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
13547         to make life easier for people cross-compiling that insist on not
13548         using scratchbox.
13549
13550 2007-01-17 Mark Mason <mason@broadcom.com>
13551
13552         * inssel-long.brg: patch to deal with mips missing flags
13553         * inssel-long32-mips.brg: implement overflow checks
13554         * insset-mips.brg: implement overflow checks
13555         * mini-mips.h: implement conditional exception handling
13556         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
13557           Remove unused code, minor cleanups.
13558         * exceptions-mips.c: minor cleanups
13559         * mini-ops.h: add mips conditional exception ops
13560         * cpu-mips.md: add mips conditional exception ops
13561
13562         
13563 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
13564
13565         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
13566         to deal with mips missing of flags.
13567
13568 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
13569
13570         * exceptions-ppc.c: execute fault handlers.
13571
13572 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
13573
13574         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
13575
13576 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
13577
13578         * mini.c: handle also floating point values in initialize_array.
13579
13580 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
13581
13582         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
13583         array initialization and make it conditional on the intrins option.
13584
13585 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
13586
13587         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
13588         relocations and put the patch info names close to the enum definition.
13589
13590 2007-01-15 Mark Mason <mason@broadcom.com>
13591
13592         * basic.cs, exceptions.cs: break up large tests to increase debugability.
13593
13594 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
13595
13596         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
13597
13598 2007-01-12  Raja R Harinath  <rharinath@novell.com>
13599
13600         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
13601
13602 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
13603
13604         * Makefile.am: distribute the mips sources.
13605
13606 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
13607
13608         * mini-codegen.h: handle bug #80489 here, by excluding ecx
13609         directly.
13610
13611 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
13612
13613         * cpu-x86.md: back out for now as this triggers other regressions.
13614
13615 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
13616
13617         * cpu-x86.md: force src1 and dest regpair for long shift instructions
13618         to eax:edx, so ecx can't get allocated to them (bug #80489).
13619
13620 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
13621
13622         * mini.c, mini-exceptions.c: enabled running fault handlers
13623         (bug #80469).
13624
13625 2007-01-03  Miguel de Icaza  <miguel@novell.com>
13626
13627         * driver.c: If nothing fail, do not use the string "failed",
13628         because it makes it very annoying to view test result logs on the
13629         web. 
13630
13631 2006-12-30  Miguel de Icaza  <miguel@novell.com>
13632
13633         * debug-debugger.c (mono_debugger_main): Rename "main" to
13634         "main_method" to prevent a warning.
13635
13636         Remove a warning for unused field.
13637
13638 2006-12-28  Martin Baulig  <martin@ximian.com>
13639
13640         * debug-debugger.c
13641         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
13642
13643 2006-12-22  Martin Baulig  <martin@ximian.com>
13644
13645         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
13646         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
13647         seperate `.mdb_debug_info' section, so we can access it from the
13648         debugger even if the binary is stripped.
13649
13650         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
13651         from the `.mdb_debug_info' here to prevent the linker from
13652         removing that section.
13653
13654         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
13655         mdb-debug-info64.s.
13656
13657 2006-12-19  Robert Jordan  <robertj@gmx.net>
13658
13659         * mini-x86: enable the code to return small structures in
13660         registers for FreeBSD as well. Fixes bug #80278.
13661         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
13662
13663 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
13664
13665         * mini-x86.c: align the stack when calling the profiler
13666         function instrumenting the prolog (on OSX).
13667
13668 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
13669
13670         * mini.c: emit a break opcode where Debugger.Break () is called.
13671
13672 2006-12-13  Miguel de Icaza  <miguel@novell.com>
13673
13674         * mini.c (mono_method_to_ir): Provide useful information on this
13675         assert, to prevent others from debugging like I did.
13676
13677 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
13678
13679         * mini.c: enable code which was incorrectly commented
13680         (bug #80235).
13681
13682 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
13683
13684         * mini-x86.c: enable on OSX, too, the code to return small
13685         structures in registers.
13686
13687 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
13688
13689         * mini-x86.c: remove the use of the dynamic code manager here, too.
13690
13691 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
13692
13693         * mini.h, debug-debugger.c, tramp-*.c: fixed 
13694         mono_debugger_create_notification_function() to use
13695         mono_global_codeman_reserve () instead of a dynamic code manager.
13696
13697 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
13698
13699         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
13700         ves_array_element_address() jit icall and use a generated
13701         managed method instead (which is about 4 times faster for a rank 3
13702         array access).
13703
13704 2006-11-29  Mark Mason  <mason@broadcom.com>
13705
13706         * basic-calls.cs: additional tests for passing
13707         structures as function arguments.
13708
13709 2006-11-29  Mark Mason  <mason@broadcom.com>
13710
13711         * mini-mips.h: disable custom exception handling
13712         * mini-mips.c: throw/rethrow should use jalr to call
13713         exception stubs.  Fixed bug with passing structures
13714         by value. More support for tracing floating point
13715         functions.
13716
13717 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
13718
13719         * mini.c: fixed typo in the soft-float ldind.r4 handling
13720         (bug #80086).
13721
13722 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
13723
13724         * mini.c, mini.h, driver.c: added --runtime command line
13725         option to select a different runtime than the autodetected one.
13726         * jit.h: added API for embedders to initialize with a specific
13727         runtime version.
13728
13729 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
13730
13731         * mini.c: handle also boxing of r4 values (bug #80024).
13732
13733 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
13734
13735         * mini-ppc.c: force indirect calls until we reserve
13736         enough address space for all the generated code.
13737
13738 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
13739
13740         * exceptions-arm.c: workaround bugs in the libc definition
13741         of struct ucontext.
13742
13743 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
13744
13745         * inssel.brg: fixes from me and Mark Mason.
13746
13747 2006-11-23  Dick Porter  <dick@ximian.com>
13748
13749         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
13750         semaphore display now we've fixed the initial value
13751
13752 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13753
13754         * inssel.brg: partially revert the last change to fix the build.
13755
13756 2006-11-21  Mark Mason  <mason@broadcom.com>
13757
13758         * inssel.brg: Add and use compare-and-branch macros to support
13759         architectures that do not have condition code registers (ie. MIPS).
13760         * *-mips.{c,brg,md}: Fix copyright statements
13761
13762 2006-11-20  Mark Mason  <mason@broadcom.com>
13763
13764         * Makefile.am: remove mini-codegen.c from list of MIPS sources
13765         * mini.c: Allow GET_CONTEXT to be specified by the arch port
13766         * mini.h: Added declaration for mono_print_ins()
13767         * mini-codegen.c: added ins_spec initializer for MIPS
13768         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
13769         vreg to be virtual and hreg to be non-virtual.
13770         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
13771         is not yet working/implemented correctly.
13772         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
13773         non-static, fixup calls to print_ins() from other parts in the file.
13774
13775 2006-11-20  Mark Mason  <mason@broadcom.com>
13776
13777         * basic-calls.cs: added tests for passing structures as arguments
13778         to calls.
13779
13780 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
13781
13782         * inssel-long32.brg: optimize signed division by power of two.
13783
13784 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
13785
13786         * mini-arm.c: added support for interworking with thumb code
13787         (mono must be still be built using the ARM instruction encoding).
13788
13789 2006-11-19  Miguel de Icaza  <miguel@novell.com>
13790
13791         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
13792         verifier has different rules for it.   Fixes a few verifier issues
13793         in the test suite.
13794
13795         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
13796         at the end, so people know what happened.
13797
13798 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
13799
13800         * brach-opts.c: in optimize_exception_target() make sure we
13801         are in a catch clause (fixes bug #79871).
13802
13803 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13804
13805         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
13806         more soft-float support fixes.
13807
13808 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
13809
13810         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
13811         that are passed half on the stack and half in registers.
13812
13813 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
13814
13815         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
13816         more mips integration work from Mark E Mason 
13817         <mark.e.mason@broadcom.com>.
13818
13819 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
13820
13821         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
13822         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
13823         tramp-mips.c: added sources for the mips port, not
13824         integrated in the build yet. Contributed by
13825         Mark E Mason <mark.e.mason@broadcom.com>.
13826
13827 2006-11-14  Neale Ferguson <neale@sinenomine.net>
13828
13829         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
13830
13831 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13832
13833         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
13834         put the soft-float rules in its own file since it seems to
13835         break s390 compilation.
13836
13837 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
13838
13839         * mini-arm.c: fixed wrnings.
13840
13841 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
13842
13843         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
13844         inssel-arm.brg: ARM support for soft-float.
13845
13846 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
13847
13848         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
13849         loads and stores of 32 bit fp values.
13850
13851 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
13852
13853         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
13854
13855         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
13856         works. Fixes #79852 and #79463.
13857
13858 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13859
13860         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
13861         more soft-float support WIP and fixes.
13862
13863 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
13864
13865         * mini-arm.c: some VFP updates.
13866
13867 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
13868
13869         * mini-exceptions.c: 0 is a valid local var offset in some
13870         architectures, don't assert (bug #78508).
13871
13872 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
13873
13874         * exceptions-arm.c: fixed off by one error in stack walk code.
13875
13876 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
13877
13878         * mini.h, mini.c: more precise tracking of type load exceptions.
13879
13880 2006-11-03  Robert Jordan  <robertj@gmx.net>
13881
13882         * Makefile.am: [WIN32] Add monow.exe target.
13883         * driver.c: [WIN32] Don't detach the console when debugging.
13884         Fixes bug #79797.
13885         
13886 2006-10-30  Miguel de Icaza  <miguel@novell.com>
13887
13888         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
13889
13890 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
13891
13892         * aot-compiler.c (emit_method_info): Add a case missed earlier.
13893
13894         * driver.c (mini_regression): Fix --regression with AOT.
13895
13896         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
13897
13898 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
13899
13900         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
13901
13902         * mini-sparc.h: Don't use sigaction on sparc/linux.
13903
13904         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
13905
13906         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
13907
13908         * mini-exceptions.c: Add proper include files for getpid ().
13909
13910 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
13911
13912         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
13913         address instead of a MonoJitInfo* to avoid decoding the exception info for the
13914         method.
13915
13916         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
13917         name cache to reduce its size.
13918
13919         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
13920
13921 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
13922
13923         * mini-x86.c: Save/restore the current LMF structure more efficiently using
13924         the mono_lmf TLS variable.
13925
13926         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
13927         trampoline lmf frames.  
13928
13929         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
13930
13931 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
13932
13933         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
13934         the mono_lmf TLS variable.
13935
13936         * mini-exceptions.c: Access the LMF structure through accessors.
13937
13938         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
13939         variable instead of in jit_tls->lmf.
13940
13941         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
13942         
13943         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
13944         trampoline lmf frames.
13945
13946         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
13947
13948 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
13949
13950        * mini.c trace.c mini-x86.c: Revert these too.
13951         
13952        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
13953        signature change.
13954
13955 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
13956
13957         * genmdesc.c: removed now dead code.
13958
13959 2006-10-09  Robert Jordan <robertj@gmx.net>
13960
13961         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
13962
13963 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
13964
13965         * mini.h: do not leave gaps in the opcode values.
13966
13967 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
13968
13969         * jit-icalls.h: flag functions as internal here, too.
13970
13971 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
13972
13973         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
13974         functions with the internal attribute.
13975
13976 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
13977
13978         * aot-compiler.c: fclose the file descriptor in the profile read loop.
13979
13980 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
13981
13982         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
13983         for soft-float.
13984
13985 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
13986
13987         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
13988         tail calls as on other platforms.
13989
13990         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
13991
13992         * iltests.il: Add a few tailcall tests.
13993
13994 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13995
13996         * driver.c: fix loop for old compilers (bug #79521).
13997
13998 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
13999
14000         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
14001
14002         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
14003
14004         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
14005         metadata without any code.
14006
14007         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
14008         more precise debugging information using gdb.
14009
14010 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
14011
14012         * inssel-ia64.brg: Make the helper methods static.
14013
14014 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
14015
14016         * inssel-x86.brg: make the helper methods static.
14017
14018 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
14019
14020         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
14021
14022 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
14023
14024         * mini.c: updates for monoburg changes.
14025         * inssel.brg: make a few helper functions static as they should.
14026
14027 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
14028
14029         * Makefile.am: Move mini-codegen.c to common_sources.
14030
14031 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
14032
14033         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
14034         instructions.
14035         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
14036         mini-ppc.h: port to use the common local register allocator.
14037
14038 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
14039
14040         * mini.h: Remove the comment too then.
14041
14042 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
14043
14044         * mini.h: put back backend.data which is to be used shortly and
14045         doesn't increase the size of MonoInst. If any 64 bit arch aligned
14046         pointers on 4 byte boundaries it'd have much bigger issues running
14047         and you can ifdef it out anyway.
14048
14049 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
14050
14051         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
14052         MonoInst size by 4 bytes on 64 bit machines.
14053
14054 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
14055
14056         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
14057         replacement with more meaningful field names. Arch maintainers, please
14058         check the assigned names are good enough for your arch.
14059
14060 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
14061
14062         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
14063         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
14064
14065 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
14066
14067         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
14068         relocations and memory requirements, put the optimization flags
14069         definitions in their own file.
14070
14071 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
14072
14073         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
14074
14075         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
14076
14077 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
14078
14079         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
14080
14081 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
14082
14083         * inssel.brg: use the correct function to get the size of an item
14084         in an array, given an element class.
14085         * aot-compiler.c: do not access class->class_size directly.
14086
14087 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
14088
14089         * mini.h, debug-mini.c: added a debugging function to print
14090         info about local variables and arguments in a jitted method.
14091
14092 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
14093
14094         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
14095
14096         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
14097
14098 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
14099
14100         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
14101         inner and outer loops when passing vtypes.
14102
14103 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
14104
14105         * mini-ppc.c: take into account the cpu errata for cache flushing
14106         which caused some random errors (bug #79381).
14107
14108 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
14109
14110         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
14111         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
14112
14113 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
14114
14115         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
14116         loaded.
14117
14118         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
14119         freebsd ports tree.
14120
14121         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
14122         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
14123
14124         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
14125         displacement.
14126
14127 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
14128
14129         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
14130
14131 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
14132
14133         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
14134         macro does not have to be changed during debugging.
14135
14136         * 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>.
14137
14138         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
14139
14140         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
14141         
14142         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
14143         MONO_ARCH_NO_EMULATE_MUL is defined.
14144
14145         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
14146
14147         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
14148
14149         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
14150
14151         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
14152         
14153 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
14154
14155         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
14156         stuff to mini-exceptions.c where it is used.
14157
14158         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
14159         setup code, the real one is in mini-exceptions.c.
14160
14161         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
14162         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
14163         some changes from the freebsd ports tree.
14164
14165         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
14166         constants.
14167         
14168         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
14169
14170 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
14171
14172         * mini.c: on Linux, check for /proc to be mounted
14173         (bug# 79351, novell bug#201204).
14174
14175 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
14176
14177         * mini.c: handle cases where pthread_attr_getstack() behaves
14178         incorrectly (bug #78096).
14179
14180 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
14181
14182         * mini-arm.c: support larger stack frames (bug #79272).
14183
14184 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
14185
14186         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
14187
14188         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
14189         tokens.
14190
14191         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
14192         mono_class_from_name () to find a class from its name.
14193
14194         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
14195
14196 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
14197
14198         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
14199
14200 2006-09-05  Kornel Pal  <kornelpal@gmail.com>
14201
14202         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
14203
14204 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
14205
14206         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
14207         callinfo->trampoline.
14208
14209         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
14210         fixes #79271.
14211         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
14212         future.
14213
14214 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
14215
14216         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
14217
14218 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
14219
14220         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
14221         stats.method_trampolines, it is already done by the generic trampoline code.
14222
14223         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
14224         
14225 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
14226
14227         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
14228
14229         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
14230
14231         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
14232
14233         * mini.c (print_jit_stats): Print mscorlib mempool size too.
14234         
14235         * mini.c (print_jit_stats): Print new stats.
14236
14237         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
14238
14239 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
14240
14241         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
14242         Address on two dimensional arrays. Fixes #78729.
14243
14244         * mini.h (MonoCompile): Add a 'skip_visibility' field.
14245
14246         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
14247         a method.
14248
14249         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
14250
14251         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
14252         #79130.
14253         
14254         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
14255         a race condition.
14256         (mini_get_ldelema_ins): Ditto.
14257
14258 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
14259
14260         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
14261         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
14262         Fixes #79213.
14263
14264 2006-08-29 Neale Ferguson <neale@sinenomine.net>
14265
14266         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
14267         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
14268
14269         * exceptions-s390x.c: Cosmetic change.
14270
14271         * tramp-s390.c: Fix warning.
14272
14273         * cpu-s390.md: Correct length of mul_imm.
14274
14275 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
14276
14277         * aot-compiler.c: added binary writer with ELF backend
14278         implementation (only on Linux/x86 for now).
14279
14280 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
14281
14282         * Makefile.am: Don't run net 2.0 AOT tests.
14283
14284         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
14285         (mono_compile_assembly): Skip net 2.0 assemblies as well.
14286
14287         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
14288
14289 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
14290
14291         * aot-compiler.c: simplified and refactored the asm-writing code
14292         to allow different backends.
14293
14294 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
14295
14296         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
14297
14298         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
14299         little. Share patches of type TYPE_FROM_HANDLE as well.
14300
14301         * mini.c (mono_patch_info_equal): New helper function.
14302         (mono_patch_info_hash): Ditto.
14303
14304         * aot-compiler.c (emit_method_code): Fix s390 build.
14305
14306         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
14307         is not handled because it is stored as a flag and not as a type ctor. Fixes
14308         #79016.
14309
14310 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
14311
14312         * aot-compiler.c: Fix computation of GOT slot statistics.
14313         
14314         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
14315         Also remove support for not PIC AOT.
14316
14317         * mini.h: Bump AOT file format version.
14318
14319         * objects.cs: Add a test for #78990.
14320
14321         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
14322         (peter.dettman@iinet.net.au). Fixes #79087.
14323
14324         * basic-long.cs: Add a test for the above.
14325
14326 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
14327
14328         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
14329         
14330         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
14331         code somewhat.
14332
14333 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
14334
14335         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
14336         exceptions.
14337
14338 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
14339
14340         * mini.c: Don't verify COM proxy invoke calls
14341         
14342
14343 2006-08-10  Dick Porter  <dick@ximian.com>
14344
14345         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
14346         which process is holding semaphores locked.
14347
14348 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
14349
14350         * mini-ia64.c mini-amd64.c: Fix #79027.
14351
14352         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
14353
14354         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
14355
14356         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
14357         implicit arguments in a vararg call. Fixes #79027.
14358
14359 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
14360
14361         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
14362         (mono_get_array_new_va_signature): Ditto.
14363
14364 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
14365
14366         * aot-runtime.c: Call init_plt lazily.
14367
14368         * inssel-long.brg: Fix unsigned long->int conversion.
14369
14370         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
14371
14372         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
14373         that most data is now in the .rss/.data section.
14374
14375 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
14376
14377         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
14378
14379         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
14380
14381         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
14382
14383         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
14384
14385         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
14386         virtual call. Fixes #79010.
14387
14388         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
14389         and use the result as the this argument in the real call.
14390
14391         * generics.2.cs: Add a new test for #79010.
14392         
14393 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
14394
14395         * mini-x86.c: Fix a warning.
14396
14397         * aot-compiler.c: Add a bunch of statistics.
14398
14399         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
14400
14401 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
14402
14403         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
14404
14405 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
14406
14407         * 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>.
14408
14409 2006-07-13  Miguel de Icaza  <miguel@novell.com>
14410
14411         * mini.c (mono_method_to_ir): Obtain the original method in the
14412         CIL stream and use this to perform validation.
14413
14414         Fixed: #78816
14415
14416 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
14417
14418         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
14419         (mono_arch_call_opcode): Ditto.
14420
14421         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
14422         #78826.
14423
14424         * mini.c (mono_patch_info_dup_mp): New helper function.
14425         
14426         * aot-compiler.c (compile_method): Fix some of the memory allocated during
14427         compilation. Fixes #78827.
14428
14429 2006-07-18  Kornel Pal  <kornelpal@gmail.com>
14430
14431         * declsec.c: Use original security informations for
14432           MONO_WRAPPER_MANAGED_TO_MANAGED.
14433
14434 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
14435
14436         * mini.c: Allow Com Interop methods/classes and
14437         don't verify COM wrapper calls
14438         
14439
14440 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
14441
14442         * inssel-long32.brg: Fix long->i4 checked conversion.
14443
14444         * exceptions.cs: Add a test for the above.
14445
14446 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
14447
14448         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
14449
14450         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
14451         leaks.
14452
14453         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
14454         #78775.
14455
14456 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
14457
14458         * mini.c: Fix solaris/x86 exception handling.
14459
14460         * Makefile.am: Get rid of $(ICU_LIBS).
14461
14462 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
14463
14464         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
14465         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
14466         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
14467
14468         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
14469
14470         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
14471         this function causes a SIGSEGV.
14472
14473 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
14474
14475         * mini.c: Remove unused solaris/x86 includes.
14476
14477 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
14478
14479         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
14480
14481 2006-06-20  Jb Evain  <jbevain@gmail.com>
14482
14483         * cpu-g4.md: fix max length of start_handler instruction.
14484
14485 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
14486         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
14487
14488 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
14489         * ssa.c: Fixed bug 78653 for SSA based deadce.
14490         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
14491         MonoInst.flags, used in SSA based deadce.
14492         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
14493         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
14494
14495 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
14496
14497         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
14498         it can end up using non executable memory on ppc64 systems
14499         running ppc32 userspace (fix from Johannes Berg).
14500
14501 2006-06-14  Dick Porter  <dick@ximian.com>
14502
14503         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
14504         4.1.1
14505
14506 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
14507         * mini.c: Made so that inline is locally disabled if it would
14508         trigger a .cctor, because too many apps depend on this behavior
14509         (which seems to be also the one of the MS CLR).
14510
14511 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
14512
14513         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
14514         No idea why this worked before.
14515
14516         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
14517         which branch to outer exception clauses since they could skip the
14518         inner finally clauses. Fixes #78633.
14519
14520         * exceptions.cs: Add a test for the above.
14521
14522         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
14523         Fixes #78629.
14524
14525         * iltests.il: Add a test for the above.
14526
14527 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
14528
14529         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
14530         after the end of a try bblock, to prevent asserts in mini_method_compile ().
14531
14532         * iltests.il: Add a test for the above.
14533
14534 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
14535
14536         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
14537         
14538         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
14539         methods as instrinsics.
14540
14541 2006-06-09  Wade Berrier <wberrier@novell.com>
14542
14543         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
14544         (simple-cee-ops.h ssapre-mini-ops.h)
14545
14546 2006-06-09  Neale Ferguson <neale@sinenomine.net>
14547
14548         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
14549         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
14550         instruction).
14551         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
14552         * cpu-s390x.md: Fix max. length values for a couple of instructions.
14553
14554 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
14555
14556         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
14557
14558 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
14559
14560         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
14561         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
14562         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
14563         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
14564         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
14565         of opcodes, so that bug 78549 should not happen again.
14566         * ssapre.c: Updated to use the renamed files.
14567
14568 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
14569
14570         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
14571         in OP_ATOMIC_EXCHANGE_I4.
14572
14573 2006-06-07  Wade Berrier <wberrier@novell.com>
14574
14575         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
14576         in mono_debugger_create_notification_function)
14577
14578 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
14579
14580         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
14581         
14582         * mini.c (type_from_stack_type): Disable some changes which do not
14583         seem to work.
14584
14585         * driver.c: Reenable opts.
14586
14587         * mini.h (MonoStackSlot): New structure to keep track of the verification state
14588         of the evaluation stack.
14589         
14590         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
14591         evaluation stack trace at entry to the bblock.
14592
14593         * mini.c (merge_stacks): New function to perform verification of stack merges.
14594         Turned off by default.
14595
14596         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
14597         STACK_MP.
14598         
14599 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
14600
14601         * local-propagation.c: Fixed bug 78549.
14602
14603 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
14604
14605         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
14606
14607 2006-06-02  Miguel de Icaza  <miguel@novell.com>
14608
14609         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
14610         tramp-arm.c, tramp-ia64.c
14611         (mono_debugger_create_notification_function): Update signature to
14612         new signature and use new protocol for creating the notification
14613         function.  
14614
14615         Should fix the build.
14616
14617 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
14618
14619         * exceptions-ppc.c (mono_jit_walk_stack)
14620         (ves_icall_get_frame_info): Fix the build
14621
14622 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
14623
14624         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
14625
14626 2006-05-31  Raja R Harinath  <rharinath@novell.com>
14627
14628         * il2tests.2.il: New file for generics CIL tests.  Add test for
14629         #78019.
14630         * Makefile.am: Update.
14631
14632         Fix #78019
14633         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
14634         to nullable types.
14635
14636 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
14637
14638         * aliasing.c: Fixed bug 78311.
14639
14640 2006-05-29  Martin Baulig  <martin@ximian.com>
14641
14642         * mini-exceptions.c (mono_find_jit_info): When computing the
14643         native offset, check whether we're actually inside the method's
14644         code; call mono_debug_print_stack_frame() to format the frame.
14645         (ves_icall_System_Exception_get_trace): Call
14646         mono_debug_print_stack_frame() to format the stack frame.
14647         (ves_icall_get_trace): Update to the new debugging API.
14648         (mono_jit_walk_stack_from_ctx): Likewise.
14649         (ves_icall_get_frame_info): Likewise.
14650
14651         * mini.c (get_method_from_ip): Use the new debugging API.
14652         (mono_print_method_from_ip): Likewise.
14653
14654         * exceptions-ppc.c
14655         (mono_jit_walk_stack): Use the new debugging API.
14656         (ves_icall_get_frame_info): Likewise.   
14657
14658 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
14659
14660         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
14661
14662 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
14663
14664         * mini.c: Added "limitator" to inline for debugging.
14665
14666 2006-05-24  Martin Baulig  <martin@ximian.com>
14667
14668         * debug-debugger.c (mono_debugger_init): Create a private,
14669         malloc()-based code manager for the notification function and
14670         intentionally leak it on exit.  This fixes the crash-on-exit race
14671         condition.
14672
14673         * tramp-amd64.c
14674         (mono_debugger_create_notification_function): Added
14675         `MonoCodeManager *' argument.
14676
14677         * tramp-x86.c
14678         (mono_debugger_create_notification_function): Added
14679         `MonoCodeManager *' argument.
14680
14681 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
14682
14683         * aliasing.c: Fixed 64 bit issue.
14684         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
14685         default since all known bugs are fixed (one more time!).
14686
14687 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
14688
14689         * mini.c: write barrier support.
14690
14691 2006-05-23  Martin Baulig  <martin@ximian.com>
14692
14693         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
14694         check at the top of the file.
14695
14696 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
14697
14698         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
14699         reverting changes without reason and without changelog entries.
14700
14701 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
14702
14703         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
14704         to a few opcodes. Fixes #78439.
14705
14706         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
14707         consistency with other archs.
14708
14709         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
14710
14711 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
14712
14713         * debug-debugger.c: fix the build.
14714
14715 2006-05-17  Martin Baulig  <martin@ximian.com>
14716
14717         * debug-debugger.c
14718         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
14719         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
14720         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
14721         (debugger_attach): Call GC_mono_debugger_add_all_threads().
14722
14723 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
14724
14725         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
14726
14727 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
14728
14729         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
14730         MONO_TYPE_GENERICINST.
14731         
14732         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
14733         MONO_TYPE_GENERICINST.
14734
14735 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
14736
14737         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
14738         #78325.
14739
14740 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
14741
14742         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
14743         mempool.
14744         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
14745
14746 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
14747
14748         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
14749         mono_trace_cleanup ().
14750
14751         * iltests.il: Fix problem with the newly added test.
14752
14753         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
14754         due to register constraints, free up the previous hreg. Fixes #78314.
14755
14756         * iltests.il: Add new test for #78314.  
14757
14758         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
14759         Interlocked.Add. Fixes #78312.
14760
14761         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
14762         
14763 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
14764
14765         * inssel.brg (mini_emit_virtual_call): Fix a warning.
14766
14767 2006-05-05  Martin Baulig  <martin@ximian.com>
14768
14769         * debug-mini.c (mono_debug_open_block): New method.
14770
14771         * mini-amd64.c
14772         (mono_arch_output_basic_block): Call mono_debug_open_block() at
14773         the beginning of each basic block.
14774
14775         * mini-x86.c
14776         (mono_arch_output_basic_block): Call mono_debug_open_block() at
14777         the beginning of each basic block.
14778
14779 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
14780
14781         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
14782         default until I understand why they break the build on amd64.
14783
14784 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
14785
14786         * mini.c (mini_cleanup): Call mono_cleanup ().
14787
14788         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
14789         errors.
14790
14791 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
14792
14793         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
14794         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
14795         default since all known bugs are fixed, and I cannot reproduce bug
14796         77944... I'm asking Matt Hargett to test again after this commit.
14797
14798 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
14799
14800         * mini-codegen.c: Fixed typo that thrashed inline.
14801
14802 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
14803
14804         * dominators.c (compute_dominators): Avoid using a worklist since
14805         it is not correct in some cases. Instead, iterate over all bblocks as
14806         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
14807
14808 2006-04-28  Miguel de Icaza  <miguel@novell.com>
14809
14810         * mini.c (mono_jit_compile_method_inner): Use
14811         mono_prepare_exception_from_error that resets the value
14812         internally.
14813
14814 2006-04-27  Miguel de Icaza  <miguel@novell.com>
14815
14816         * mini.c: Move the mini_loader_error_to_exception to metadata. 
14817         
14818 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
14819
14820         * aliasing.c: Fixed bug 78210.
14821
14822 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
14823
14824         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
14825         default until all their problems (or the ones they trigger) are fixed.
14826
14827 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
14828
14829         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
14830         
14831         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
14832         as loaded only after resolving patches since that could invoke the same method.
14833
14834         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
14835
14836         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
14837         functions.
14838
14839         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
14840         AOT loader.
14841
14842         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
14843         stack.
14844
14845         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
14846         made from AOT code through the PLT table.
14847
14848         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
14849         holding the plt offset when a call is made to the aot plt trampoline.
14850         
14851 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
14852
14853         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
14854         amd64 AOT support.
14855
14856         * Makefile.am (common_sources): Fix build breakage.
14857
14858         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
14859         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
14860         intra-assembly calls if possible.
14861         
14862         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
14863
14864         * mini-trampolines.c: Handle PLT entries.
14865
14866         * mini.c: Avoid creating a GOT var for calls.
14867
14868         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
14869         from mscorlib code.
14870
14871         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
14872         from mscorlib code.
14873
14874         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
14875         AOT code.       
14876
14877         * mini.h: Bump AOT file format version.
14878         
14879         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
14880         covers more cases.
14881
14882 2006-04-25  Martin Baulig  <martin@ximian.com>
14883
14884         * driver.c: Disable copyprop, consprop and inline when running
14885         inside the debugger.
14886
14887 2006-04-25  Martin Baulig  <martin@ximian.com>
14888
14889         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
14890         with `get_current_thread' and added `detach'.
14891         (MonoDebuggerMetadataInfo): Added `thread_size',
14892         `thread_tid_offset', `thread_stack_ptr_offset' and
14893         `thread_end_stack_offset'.
14894
14895 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
14896
14897         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
14898         aot-runtime.c.
14899
14900         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
14901         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
14902
14903         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
14904
14905         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
14906
14907         * aot.c: Add support for ADJUSTED_IID.  
14908
14909 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
14910
14911         * aot.c (emit_method_order): Don't align method_order_end.
14912
14913         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
14914         the interface ID changes.
14915
14916 2006-04-21  Dick Porter  <dick@ximian.com>
14917
14918         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
14919         cleaning up a thread.  Fixes the new part of bug 77470.
14920
14921 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
14922
14923         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
14924         to managed wrapper.
14925                      
14926 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
14927
14928         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
14929         
14930         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
14931         SIGSEGV. Fixes #78072.
14932
14933         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
14934         unregister our SIGABRT handler.
14935
14936 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
14937
14938         * mini.c: Disabled inline where it can alter the call stack in a
14939         way visible from managed code.
14940         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
14941         default.
14942
14943 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
14944
14945         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
14946         on other platforms. Fixes #78089.
14947
14948 2006-04-13  Martin Baulig  <martin@ximian.com>
14949
14950         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
14951         determine whether we're inside the debugger.
14952
14953         * debug-debugger.h
14954         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
14955
14956 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
14957
14958         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
14959         handler clauses. Fixes #78024.
14960
14961         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
14962         in the CALL_MEMBASE opcodes. Fixes #78088.
14963         (mono_arch_get_vcall_slot_addr): Ditto.
14964
14965 2006-04-10  Martin Baulig  <martin@ximian.com>
14966
14967         * debug-debugger.c: The thread handling code has now been moved
14968         into ../metadata/threads.c.
14969
14970 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
14971
14972         * driver.c (mono_main): Fix --with-gc=none build.
14973
14974         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
14975         (mono_spillvar_offset_float): Ditto.
14976         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
14977         hreg, not when its !global, since on ia64, there is a third category: stacked
14978         registers.      
14979
14980 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
14981
14982         * mini.c: set MonoInst->klass for load field address and a few other
14983         places.
14984
14985 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
14986
14987         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
14988
14989 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
14990
14991         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
14992         the branch opt changes.
14993
14994 2006-04-06  Dick Porter  <dick@ximian.com>
14995
14996         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
14997         
14998         * wapihandles.c (mini_wapi_seminfo): 
14999         * driver.c (mono_main): Add semaphore info option
15000
15001 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
15002
15003         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
15004         branch optimization changes. Fixes #78009.
15005
15006 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
15007
15008         * mini.c: ignore accessibility of methods in managed->native wrappers.
15009
15010 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
15011
15012         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
15013         
15014         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
15015
15016 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
15017
15018         * mini.c: Modify the branch optimizations to preserve the invariant that
15019         the entries inside the in_bb and out_bb arrays are unique.
15020         (mono_unlink_bblock): Avoid creation of new arrays.
15021
15022 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
15023
15024         * mini.c (mono_unlink_bblock): Fix regression caused by previous
15025         change (#77992).
15026
15027 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
15028
15029         * mini.c (optimize_branches): Remove the "optimizations" in
15030         the cbranch1/cbranch2 -> branch cases which were causing several
15031         problems in the past. Fixes #77986.
15032
15033 2006-03-31  Chris Toshok  <toshok@ximian.com>
15034
15035         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
15036         default optimizations :(
15037
15038 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
15039
15040         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
15041         branch.
15042
15043 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
15044
15045         * local-propagation.c: Added comments to structs and removed
15046         "Mono" prefixes from local tree mover types.
15047
15048 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
15049
15050         * Makefile.am (arch_sources): Define this for each architecture so 
15051         libmono_la_SOURCES is defined in one place.
15052
15053 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
15054
15055         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
15056         from handles/.
15057
15058 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
15059
15060         * driver.c: print the GC name supplied by configure.
15061
15062 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
15063
15064         * local-propagation.c: Added tree mover, and moved here all the
15065         local propagation code from mini.c
15066         * mini.c: Added support for treeprop, and moved all the local
15067         propagation code to local-propagation.c
15068         * mini.h: Added support for treeprop
15069         * driver.c: Added support for treeprop, enabled consprop, copyprop,
15070         treeprop, inline and deadce by default
15071         * Makefile.am: Added local-propagation.c
15072
15073 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
15074
15075         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
15076
15077 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
15078
15079         * debug-debugger.c: make it compile without the Boehm GC.
15080
15081 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
15082
15083         * mini.c: fixed issue with mismatch when an icall is registered
15084         with multiple names but same address.
15085
15086 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
15087
15088         * declsec.c, mini-exceptions.c: use write barrier to set reference
15089         fields of managed objects.
15090
15091 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
15092
15093         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
15094         (can_access_internals): Fix a warning.
15095
15096         * mini.c (print_method_from_ip): Rename this to 
15097         mono_print_method_from_ip so it gets exported.
15098
15099         * trace.c: Deal with strings inside StringBuilder's containing garbage
15100         and fix memory leaks. Fixes #77848.
15101
15102 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
15103
15104         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
15105         fixes #77787.
15106
15107 2006-03-16 Neale Ferguson <neale@sinenomine.net>
15108         
15109         * mini-s390.c: Remove OP_X86_TEST_NULL.
15110
15111 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
15112
15113         * mini.c: use the correct GetHashCode() for the moving collector.
15114
15115 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
15116
15117         * liveness.c: Regalloc spill cost tuning.
15118
15119 2006-03-15 Neale Ferguson <neale@sinenomine.net>
15120         
15121         * mini-s390x.h: Correct S390_LONG macro.
15122
15123         * mini-s390x.c: Cleanup unused code.
15124
15125 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
15126
15127         * jit-icalls.h: New file.
15128
15129         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
15130         icalls and include that instead of including jit-icalls.c.
15131
15132         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
15133         OP_X86 opcodes.
15134
15135 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
15136
15137         * mini.c: when checking for member accessibility, also check for
15138         friend assemblies and for explicit interface implementations.
15139
15140 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
15141
15142         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
15143
15144         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
15145
15146         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
15147         common cases are done first.    
15148
15149         * mini-ops.h: Only define platform specific opcodes on the given platform.
15150
15151         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
15152         branch.
15153         
15154 2006-03-14  Martin Baulig  <martin@ximian.com>
15155
15156         Revert Paolo's change from r57348:
15157
15158         * mini.h: don't use gboolean for bitfields.
15159         * mini.c: verifier changes for fields and methods accessibility.
15160
15161 2006-03-13  Neale Ferguson <neale@sinenomine.net>
15162
15163         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
15164
15165         * mini-s390x.c: Fix conv_r_un.
15166
15167         * cpu-s390, cpu-s390x.md: Fix lengths.
15168
15169 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
15170
15171         * mini.c: nested types have access to all the nesting
15172         levels, not just the enclosing types.
15173
15174 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
15175
15176         * mini.c: added a few more verification checks.
15177
15178 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
15179
15180         * liveness.c: Merge optimizations from the linear-il branch.
15181
15182 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
15183
15184         * mini-ia64.c (emit_call): Add a comment.
15185
15186         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
15187
15188         * tramp-ia64.c: Fix some warnings.
15189
15190 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
15191
15192         * mini.h: don't use gboolean for bitfields.
15193         * mini.c: verifier changes for fields and methods accessibility.
15194
15195 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
15196
15197         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
15198         lazy icall wrapper changes.
15199
15200         * dominators.c: Replace all the dominator algorithms with faster
15201         ones from the linear-il branch.
15202
15203         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
15204         the mempool.
15205
15206         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
15207         common cases are done first.
15208
15209         * mini-amd64.c: Fix some warnings.
15210
15211         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
15212         from the mempool.
15213
15214         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
15215         added code.
15216
15217         * mini.h: Add a missing prototype.
15218
15219 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
15220
15221         * mini.c: Compile icall wrappers lazily.
15222
15223         * mini-codegen.c: Use printf instead of g_print since its much faster.
15224
15225         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
15226         function.
15227
15228         * mini.c (optimize_branches): Cache the negative result from 
15229         remove_block_if_useless ().
15230
15231         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
15232         Also fix some bblock linking issues.
15233
15234         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
15235         assembly files.
15236
15237         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
15238
15239         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
15240         accessed fields first, for better cache behavior.
15241         
15242 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
15243
15244         * mini.c: speedup IList<T> array accesses.
15245
15246 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
15247
15248         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
15249         inline_costs counter. Fixes #77190.
15250
15251 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
15252
15253         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
15254         trace messages. Fixes #77706.
15255
15256 2006-03-04  Martin Baulig  <martin@ximian.com>
15257
15258         * tramp-amd64.c, tramp-x86.c
15259         (mono_debugger_create_notification_function): Use
15260         mono_global_codeman_reserve() to allocate a buffer at runtime and
15261         return it.
15262
15263         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
15264
15265         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
15266         notification function at runtime and then call `initialize' in the
15267         `MONO_DEBUGGER__debugger_info' vtable.
15268
15269 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
15270
15271         * iltests.il: Fix a visibility problem.
15272
15273 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
15274
15275         * driver.c, mini.c: add hooks for the counters API.
15276
15277 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
15278
15279         * driver.c: show disabled options.
15280
15281 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
15282
15283         * linear-scan.c: always use cost-driven selection.
15284
15285 2006-02-28  Raja R Harinath  <rharinath@novell.com>
15286
15287         * jit-icalls.c (helper_compile_generic_method): Revert change from
15288         2006-02-24.
15289
15290 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
15291
15292         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
15293
15294 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
15295
15296         * inssel.brg: style fixes, mostly to force the updated monoburg
15297         to run for people using svn.
15298
15299 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
15300
15301         * mini.c: match monoburg changes.
15302
15303 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
15304
15305         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
15306         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
15307         declaration in the header file.
15308
15309 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
15310
15311         * helpers.c: reduce relocations and mem usage.
15312
15313 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
15314
15315         * mini.h, mini-codegen.c: disable logging features if
15316         requested by configure.
15317
15318 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
15319
15320         * mini.c: tiny verifier changes.
15321
15322 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
15323
15324         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
15325         cpu-pentium.md: stack alignment changes for osx/x86,
15326         partially from Geoff Norton <gnorton@customerdna.com>.
15327
15328 2006-02-24  Raja R Harinath  <harinath@gmail.com>
15329
15330         * jit-icalls.c (helper_compile_generic_method): Update to changes
15331         in metadata/class.c.
15332
15333 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
15334         
15335         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
15336         
15337         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
15338         interface calls with large offsets.
15339
15340 2006-02-23  Raja R Harinath  <rharinath@novell.com>
15341
15342         * jit-icalls.c (helper_compile_generic_method): Document the
15343         special-case we depend on so that we can inflate the method twice
15344         with the same context with no bad side-effects.
15345
15346 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
15347
15348         * mini-x86.c, mini-amd64.c: fix for case when xen support
15349         is disabled.
15350
15351 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
15352
15353         * mini-x86.c, mini-amd64.c: generate code to access tls items
15354         in a faster way for Xen systems.
15355
15356 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
15357
15358         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
15359         updates and compilation fixes for the OSX/x86 port, mostly from
15360         Geoff Norton <gnorton@customerdna.com>.
15361
15362 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
15363
15364         * inssel.brg: faster interface call implementation
15365         to sync with the interface_offsets MonoVTable changes.
15366
15367 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
15368
15369         * mini.c: more verification checks.
15370
15371 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
15372
15373         * mini.c: added a few more verification checks.
15374
15375 2006-02-17      Neale Ferguson <neale@sinenomine.net>
15376
15377         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
15378         facility on the processor and use it if available.
15379
15380 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
15381
15382         * driver.c, aot.c, mini.c: throw exception if the IL code is
15383         invalid or unverifiable.
15384
15385 2006-02-17  Raja R Harinath  <rharinath@novell.com>
15386
15387         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
15388         m.StructField.
15389
15390 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
15391
15392         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
15393
15394 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
15395
15396         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
15397         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
15398         handling of instantiated generic valuetypes.
15399
15400 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
15401
15402         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
15403         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
15404         instead.
15405
15406         * generics.2.cs: Revert the nullable reftypes tests.
15407
15408 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
15409
15410         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
15411         using __builtin_frame_address (1) as it doesn't work in the presence
15412         of optimizations. Hopefully fixes #77273.
15413
15414         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
15415         -> generics.cs change as it doesn't work with some automake versions.
15416
15417 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
15418
15419         * mini.c: handle systems that sue a different way to
15420         retrieve the stack address of the current thread.
15421
15422 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
15423
15424         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
15425         it specially in the makefile.
15426
15427         * generics.2.cs: Add tests for nullable reference types.
15428
15429 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
15430
15431         * mini.c: always handle the case when mono_jit_init()
15432         is called in a thread different from the main thread,
15433         confusing libgc (bug #77309).
15434
15435 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
15436
15437         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
15438
15439 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
15440
15441         * mini.c: change optimize_branches () to use a single loop
15442         and introduce a new optimization to simplify some range checks.
15443
15444 2006-02-03  Martin Baulig  <martin@ximian.com>
15445
15446         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
15447         and merged with debugger_thread_manager_add_thread().
15448         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
15449         inform the debugger about the main thread.
15450
15451 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
15452
15453         * basic.cs: Add test for div.un/rem.un constant folding.
15454
15455 2006-02-03  Neale Ferguson <neale@sinenomine.net>
15456
15457         * cpu-s390x.md: correct int_xor_imm length
15458
15459 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
15460
15461         * generics.2.cs: New test for #77442.
15462
15463         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
15464         #77442.
15465
15466 2006-02-02  Martin Baulig  <martin@ximian.com>
15467
15468         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
15469         <mono/metadata/mono-debug-debugger.h>   
15470
15471         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
15472
15473 2006-02-02  Martin Baulig  <martin@ximian.com>
15474
15475         * debug-debugger.h: New header file for debug-debugger.c.
15476
15477         * debug-debugger.c: Big API cleanup; don't run the managed Main()
15478         function is a separate thread anymore; add support for attaching.
15479
15480 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
15481
15482         * tramp-x86.c: Fix a warning.
15483
15484 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
15485
15486         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
15487         on very large methods.
15488
15489         * aot.c (load_patch_info): Fix a warning.
15490
15491 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
15492
15493         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
15494         mini-ops.h: alu membase optimizations.
15495
15496 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
15497
15498         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
15499         to speedup StringBuilder.
15500
15501 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
15502
15503         * dominators.c (mono_compute_natural_loops): Fix detection of
15504         loop body start blocks.
15505
15506         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
15507
15508 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
15509
15510         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
15511         #75145.
15512
15513 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
15514
15515         * aliasing.c: Fixed aliasing issue on 64 bit archs.
15516
15517 2006-01-25  Martin Baulig  <martin@ximian.com>
15518
15519         * debug-debugger.c: Moved the `MonoDebuggerManager' and
15520         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
15521         started to cleanup this file a little bit.
15522
15523 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
15524
15525         * mini.c: optimize a codepath frequently happening in generics code.
15526
15527 2006-01-23  Martin Baulig  <martin@ximian.com>
15528
15529         * Makefile.am: Only compile debug-debugger.c on supported platforms.
15530
15531         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
15532         functions directly.
15533
15534         * driver.c: debug-debugger.c is only available if
15535         `MONO_DEBUGGER_SUPPORTED' is defined.   
15536
15537 2006-01-23  Martin Baulig  <martin@ximian.com>
15538
15539         * debug-debugger.c: Only enable this on platforms where the Mono
15540         Debugger is working (x86 and x86_64).
15541
15542 2006-01-21  Martin Baulig  <martin@ximian.com>
15543
15544         The Mono Debugger is now using the normal `mono' instead of the
15545         `mono-debugger-mini-wrapper' when executing managed code.
15546
15547         * debug-debugger.c: New file; previously known as
15548         debugger/wrapper/wrapper.c.
15549
15550         * debug-mini.c (mono_init_debugger): Removed.
15551
15552         * driver.c (mono_main): Added new `--inside-mdb' command line
15553         argument which is used when running inside the debugger.
15554
15555 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
15556
15557         * liveness.c (mono_analyze_liveness): Remove some unused data
15558         structures.
15559
15560 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
15561
15562         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
15563
15564 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
15565
15566         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
15567         depends on implementation details of monobitset.
15568
15569         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
15570         Fixes #77271.
15571
15572 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
15573
15574         * liveness.c: Update after monobitset changes.
15575
15576 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
15577
15578         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
15579
15580 2006-01-11 Neale Ferguson <neale@sinenomine.net>
15581
15582         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
15583
15584         * mini-s390x.c: Remove warning messages.
15585
15586 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
15587
15588         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
15589
15590 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
15591
15592         * generics.2.cs: Add ldelem/stelem_any test.
15593
15594 2006-01-10 Neale Ferguson <neale@sinenomine.net>
15595
15596         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
15597
15598 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
15599
15600         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
15601         
15602 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
15603
15604         * generics.2.cs: Reenable vtype tests.
15605
15606         * inssel-x86.brg: Remove an icorrect valuetype rule.
15607
15608 2006-01-06 Neale Ferguson <neale@sinenomine.net>
15609
15610         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
15611         initial support for OP_ABS.
15612
15613 2006-01-05 Neale Ferguson <neale@sinenomine.net>
15614
15615         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
15616
15617 2006-01-05 Neale Ferguson <neale@sinenomine.net>
15618
15619         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
15620         conversion and implement LADD/LSUB.
15621
15622         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
15623         architectures.
15624
15625 2006-01-05 Neale Ferguson <neale@sinenomine.net>
15626
15627         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
15628
15629         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
15630         architectures.
15631
15632 2006-01-05 Neale Ferguson <neale@sinenomine.net>
15633
15634         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
15635         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
15636         (stack walk problem).
15637
15638 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
15639
15640         * aot.c (mono_aot_load_method): Fix a warning.
15641
15642 2006-01-03  Neale Ferguson <neale@sinenomine.net>
15643
15644         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
15645
15646 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
15647
15648         * iltests.il: Add test for #77148.
15649
15650         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
15651         #77148.
15652
15653 2006-01-03  Neale Ferguson <neale@sinenomine.net>
15654
15655         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
15656
15657 2006-01-03  Neale Ferguson <neale@sinenomine.net>
15658
15659         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
15660         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
15661
15662         * basic-long.cs: Add lconv-to-r4/r8 tests.
15663
15664 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
15665
15666         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
15667
15668         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
15669         here as on other archs.
15670
15671 2005-12-29 Neale Ferguson <neale@sinenomine.net>
15672
15673         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
15674
15675 2005-12-29 Neale Ferguson <neale@sinenomine.net>
15676
15677         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
15678         
15679         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
15680
15681         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
15682         instrument_prolog; Add memory_barrier instruction.
15683
15684 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
15685
15686         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
15687
15688 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
15689
15690         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
15691
15692         * aliasing.c inssel.brg: Fix warnings.
15693
15694         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
15695         could skip initialization of some parts of memory.
15696
15697         * mini.c mini-ia64.c: Fix warnings.
15698
15699         * inssel-sparc.brg: Add an implementation of lneg which actually works.
15700
15701 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
15702
15703         * aliasing.c (mono_build_aliasing_information): Add a workaround for
15704         a crash seen on sparc.
15705
15706         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
15707         
15708         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
15709
15710 2005-12-21 Neale Ferguson <neale@sinenomine.net>
15711
15712         * mini-ops.h: Add s390_backchain instruction
15713
15714         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
15715
15716         * cpu-s390.md: Add s390_backchain instruction
15717
15718         * mini-s390.c: Significant ABI changes
15719
15720         * mini-s390.h: Cater for zero length structures
15721
15722 2005-12-20 Neale Ferguson <neale@sinenomine.net>
15723
15724         * mini-s390.c: ABI fixes
15725
15726         * inssel-s390.brg: Remove debug statements
15727
15728         * cpu-s390.md: Fix length of ATOMIC_xx operations
15729
15730 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
15731
15732         * basic-float.cs: Add float<->long conversion tests.
15733
15734 2005-12-16 Neale Ferguson <neale@sinenomine.net>
15735
15736         * mini-s390.c: Fix LOCALLOC processing.
15737
15738         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
15739
15740 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
15741
15742         * iltests.il: Add tests for some opcodes not covered by the other
15743         tests.
15744
15745 2005-12-15 Neale Ferguson <neale@sinenomine.net>
15746
15747         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
15748         register loading for Tail processing; Correct trace output.
15749
15750         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
15751
15752         * cpu-s390.md: Correct size of jmp instruction. 
15753
15754 2005-12-13 Neale Ferguson <neale@sinenomine.net>
15755
15756         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
15757
15758 2005-12-13 Neale Ferguson <neale@sinenomine.net>
15759
15760         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
15761           Bring s390 up to current level.
15762
15763 2005-12-12  Zltan Varga  <vargaz@gmail.com>
15764
15765         * generics.2.cs: Disable the newly added tests as they do not work yet.
15766         
15767         * generics.2.cs: Add valuetype tests.
15768
15769 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
15770
15771         * basic-long.cs: Add i4->u8 test.
15772
15773         * objects.cs: Add tests for JIT intrinsic.
15774
15775         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
15776         optimizations lost by a mistake.
15777
15778 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
15779
15780         * basic-long.cs: Remove a test moved to objects.cs.
15781
15782         * arrays.cs: Add more array tests.
15783
15784 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
15785
15786         * arrays.cs: Add new tests for multi-dimensional arrays.
15787
15788 2005-12-06  Raja R Harinath  <rharinath@novell.com>
15789
15790         * Makefile.am (test_sources2): Add generics.2.cs.
15791         (EXTRA_DIST): Add test_sources2.
15792
15793 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
15794
15795         Support for boxing and unboxing nullable types as well as the
15796         isinst operation on nullables, per the CLI ammendment.
15797
15798         * inssel.brg (CEE_ISINST): Special case for nullable
15799
15800         * mini.c (handle_unbox_nullable): new method
15801         (handle_box): Special case for nullable types
15802         (mono_method_to_ir): Call handle_unbox_nullable in correct
15803         places.
15804
15805         * generics.2.cs: New test suite
15806
15807         * Makefile.am: Support for regression tests with generics.
15808
15809 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
15810
15811         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
15812         allocated to registers. Fixes #76800.
15813
15814 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
15815
15816         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
15817
15818 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
15819
15820         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
15821         of platforms.
15822
15823 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
15824
15825         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
15826         objects.cs.
15827
15828         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
15829         
15830         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
15831 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
15832
15833         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
15834         single precision before storing to a single precision location.
15835
15836 2005-11-28  Raja R Harinath  <rharinath@novell.com>
15837
15838         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
15839
15840 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
15841
15842         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
15843         correct files.
15844
15845         * basic.cs: Remove test_0_byte_compares test which was moved to
15846         objects.cs a long time ago.
15847
15848 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
15849
15850         * aliasing.c: Fixed aliasing issue on 64 bit archs.
15851
15852 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
15853
15854         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
15855         handlers are called.
15856
15857         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
15858         throwing code.
15859
15860          * mini-ia64.c: Add support for the throw->branch exception 
15861         optimization.   
15862
15863         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
15864
15865 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
15866
15867         * mini.c: Enabled "fastpath" deadce :-)
15868         
15869 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
15870
15871         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
15872         alias analysis pass to support it.
15873         * mini.h: Likewise.
15874         * ssa.c: Likewise.
15875         * liveness.c: Likewise (liveness computation can use aliasing
15876         information to be more accurate).
15877         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
15878         moreover made so that "--compile-all" uses the given optimization
15879         flags and not the default ones.
15880         * aliasing.c: Alias analysis (new file).
15881         * aliasing.h: Likewise.
15882         * Makefile.am: added "aliasing.c" and "aliasing.h".
15883         
15884 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
15885
15886         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
15887         OP_L opcodes.
15888
15889 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
15890
15891         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
15892         fp >= end_of_stack exit condition, as it is not needed, and it might
15893         become true for fp eliminated frames.
15894
15895 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
15896
15897         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
15898         coded offsets.
15899
15900 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
15901
15902         * mini-arm.c: fixed alignment of doubles/longs to match
15903         the C ABI (bug #76635).
15904
15905 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
15906
15907         * aot.c: fix compilation with --enable-minimal=aot.
15908
15909 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
15910
15911         * mini-arm.c: fixed compatibility with the new
15912         floating point emulator package for compares.
15913
15914 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
15915
15916         * mini.c : reverted sig->pinvoke changes (r51396-51397).
15917
15918 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
15919
15920         * mini-exceptions.c (print_stack_frame): Output to stderr.
15921         (mono_handle_native_sigsegv): Ditto.
15922
15923 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
15924
15925         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
15926         OP_LCONV_TO_OVF_I implementation.
15927
15928         * mini-amd64.c: Add support for the throw->branch exception 
15929         optimization.
15930
15931         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
15932         when the catch clause catches a more general exception, i.e. Object.
15933
15934 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
15935
15936         * cpu-ia64.md: Remove unused opcodes.
15937
15938         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
15939         specific defines for architectures defining USE_SIGACTION.
15940
15941         * mini-ia64.c: Fix some warnings.
15942
15943         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
15944         version seemed to skip a frame.
15945
15946 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
15947
15948         * mini.c: Clean up the usage of sig->pinvoke flag. Now
15949         only calls which are made to native code use this flag.
15950
15951 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
15952
15953         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
15954         varargs methods as well.
15955         
15956         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
15957         which have save_lmf set. Reorganize methods prologs a bit.
15958
15959         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
15960         debugger to the proper place.
15961
15962 2005-10-29  Martin Baulig  <martin@ximian.com>
15963
15964         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
15965         when running inside the debugger until the debugger has support
15966         for it.
15967
15968 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
15969
15970         * mini.h: Fix a warning.
15971
15972 2005-10-24  Miguel de Icaza  <miguel@novell.com>
15973
15974         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
15975         we expose publicly, this returns the string.
15976
15977 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
15978
15979         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
15980         with fp elimination.
15981
15982 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
15983
15984         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
15985         native stacktrace using the glibc 'backtrace' function if available.
15986
15987 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
15988
15989         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
15990
15991         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
15992         handle SIGSEGVs received while in native code.
15993
15994         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
15995         code, call mono_handle_native_sigsegv which will abort the runtime
15996         after printing some diagnostics, instead of converting it into a
15997         confusing NullReferenceException.
15998
15999 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
16000
16001         * cpu-pentium.md: Remove unused opcodes.
16002
16003 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
16004
16005         * mini-amd64.h (MonoLMF): Add rsp field.
16006
16007         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
16008         the lmf too.
16009
16010 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
16011
16012         * mini-codegen.c (get_register_spilling): Fix some warnings.
16013
16014 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
16015
16016         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
16017         elimination during exception handling. Enable fp elimination by
16018         default.
16019
16020         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
16021         elimination.
16022
16023 2005-10-16  Martin Baulig  <martin@ximian.com>
16024
16025         * mini-exceptions.c
16026         (mono_debugger_run_finally): New public method for the debugger.
16027
16028 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
16029
16030         * debug-mini.c (mono_debug_init_method): Fix warning.
16031
16032         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
16033         the 'exname' parameter const to fix some warnings.
16034
16035 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
16036
16037         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
16038         introduced by the previous patch.
16039
16040 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
16041
16042         * basic-float.cs: Add test for precision of float arithmetic.
16043
16044         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
16045         when loading/storing single values from/to memory.
16046
16047         * mini.c (mono_jit_compile_method_with_opt): Create the function
16048         pointers in the correct domain.
16049
16050 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
16051
16052         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
16053         introduced by previous patch.
16054         
16055         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
16056         when out_filter_idx is NULL.
16057
16058         * mini-exceptions.c: Don't run filter clauses twice during exception
16059         handling. Fixes #75755.
16060
16061 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
16062
16063         * aot.c: Add support for ldflda wrappers.
16064
16065         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
16066         #75902.
16067
16068 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
16069
16070         * mini.c, mini.h: do not consider exception handlers blocks when
16071         setting up interface variables.
16072
16073 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
16074
16075         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
16076
16077 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
16078
16079         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
16080         causes a regression.
16081
16082         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
16083
16084 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
16085
16086         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
16087         of the OP_P definitions.
16088
16089         * TODO: Add a proposal for dealing with the CEE/OP mess.
16090
16091         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
16092         optimizations from the x86 port.
16093
16094         * cpu-amd64.md: Ditto.
16095
16096         * basic.cs basic-long.cs: Add tests.
16097
16098 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
16099
16100         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
16101         Patrik Torstensson's implementation of my exception-handling
16102         optimization idea, when the exception object is not used
16103         (bug #62150).
16104
16105 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
16106
16107         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
16108         of the mul_imm optimizations from the old jit.
16109
16110 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
16111
16112         * mini.c, liveness.c: patch by Patrik Torstensson and
16113         Zoltan Varga to improve performance in methods with
16114         exception clauses.
16115
16116 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
16117
16118         * driver.c: Remove 'Globalization' entry from --version.
16119
16120 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
16121
16122         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
16123         there is a profiler interested in JIT events.
16124
16125         * aot.c: Load profile files produced by the AOT profiling module, and
16126         reorder methods based on the profiling info. Add a 'method_order' table
16127         to the AOT file to make mono_aot_find_jit_info work with the reordered
16128         methods.
16129
16130         * mini.h: Bump AOT file version info.
16131
16132 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
16133
16134         * mini-arm.h: work around what looks like a gcc bug when optimizations
16135         are enabled.
16136
16137 2005-09-28  Raja R Harinath  <rharinath@novell.com>
16138
16139         * Makefile.am (AM_CFLAGS): Don't use += to append inside
16140         conditionals.  Use ...
16141         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
16142
16143 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
16144
16145         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
16146         to determine the amount of memory to copy when passing valuetypes.
16147
16148         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
16149         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
16150
16151 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
16152
16153         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
16154         information about aot.
16155
16156 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
16157
16158         * *.c: Replace the use of {Enter,Leave}CriticalSection with
16159         macros. This will allow a deadlock debugger to easily be plugged
16160         in.
16161
16162 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
16163
16164         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
16165
16166 2005-09-27  Raja R Harinath  <rharinath@novell.com>
16167
16168         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
16169         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
16170         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
16171         ($(arch_built)) [CROSS_COMPILING]: Error out.
16172
16173 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
16174
16175         * aot.c: Add support for the no_special_static flag for classes.
16176
16177 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
16178
16179         * Reapply reverted patches.
16180
16181         * *: Revert r50174 as well.
16182
16183         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
16184
16185 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
16186
16187         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
16188
16189 2005-09-23  Miguel de Icaza  <miguel@novell.com>
16190
16191         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
16192         part of the SIG_HANDLER_SIGNATURE.  
16193
16194 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
16195
16196         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
16197         statistics.
16198
16199         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
16200         introduced by previous patch.
16201
16202 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
16203
16204         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
16205         saved registers too.
16206
16207         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
16208         upon the information returned by get_call_info ().
16209         
16210         * mini-x86.c (add_float): Fix stack size calculation.
16211         (mono_arch_call_opcode): Rewrite this so it works based up the
16212         information returned by get_call_info ().
16213         (mono_arch_get_this_vret_args): Ditto.
16214
16215 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
16216
16217         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
16218         in cinfo to determine the registers which need to be used.
16219
16220 2005-09-20  Miguel de Icaza  <miguel@novell.com>
16221
16222         * driver.c (mono_main): Add --server and --desktop flags. 
16223
16224 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
16225
16226         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
16227         registers as global registers.
16228
16229         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
16230         longer needed with the new register allocator.
16231
16232         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
16233
16234         * cpu-ia64.md: Remove unused opcodes.
16235         
16236         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
16237         
16238 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
16239
16240         * cpu-amd64.md: Remove unused opcodes.
16241
16242         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
16243         needed with the new register allocator.
16244
16245         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
16246         reg-reg moves.
16247
16248 2005-09-16  Raja R Harinath  <rharinath@novell.com>
16249
16250         * Makefile.am (check-local): Don't invoke semdel-wrapper.
16251
16252 2005-09-16  Martin Baulig  <martin@ximian.com>
16253
16254         * exceptions-amd64.c
16255         (throw_exception): Don't call mono_debugger_throw_exception() if
16256         we're a rethrow - see the FIXME in the code.
16257
16258 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
16259
16260         * mini.c (mono_init_exceptions): This only works on some architectures.
16261         
16262 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
16263
16264         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
16265         on ia64.
16266
16267         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
16268
16269         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
16270         now in mini-exceptions.c.
16271
16272 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
16273
16274         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
16275         now in mini-exceptions.c.
16276
16277 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
16278
16279         * exceptions-x86.c: Applied patch from Patrik Torstensson 
16280         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
16281
16282         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
16283         code into mini-exceptions.c. Add some assertions to it.
16284
16285 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
16286
16287         * aot.c (emit_section_change): Applied patch from "The Software Team" 
16288         (<software@solmersa.com>). Fix as errors on windows.
16289
16290 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
16291
16292         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
16293         method info into the LMF.
16294
16295 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
16296         
16297         * mini-ia64.c: Add proper unwind info for method epilogs.
16298
16299         * exceptions-ia64.c: Add some code to help debugging.
16300         
16301         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
16302
16303         * mini-exceptions.c: Fix warning.
16304
16305 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
16306
16307         * mini.c: Really fix build.
16308
16309         * mini-x86.c mini-amd64.c: Fix build.
16310
16311 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
16312
16313         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
16314
16315         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
16316         some Interlocked methods as intrinsics.
16317
16318         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
16319         for Thread methods as well.
16320
16321         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
16322
16323         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
16324
16325         * mini-ia64.c mini-x86.c mini-amd64.c 
16326         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
16327         OP_MEMORY_BARRIER.
16328         
16329         * mini.c (mono_init_exceptions): Fix build breakage.
16330
16331 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
16332
16333         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
16334         of instructions. Use the new ia64_unw_op macros for emitting unwind
16335         info.
16336
16337         * mini.c (mono_init_exceptions): Initialize exception handling
16338         related trampolines at startup.
16339
16340 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
16341
16342         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
16343
16344 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
16345
16346         * mini.c: Handle type loading errors gracefully during compilation and
16347         throw the appropriate exception.
16348
16349 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
16350
16351         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
16352         for the mono binary.
16353
16354 2005-09-09  Martin Baulig  <martin@ximian.com>
16355
16356         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
16357         the release.
16358
16359 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
16360
16361         * mini-arm.h: use emulation for conv.r.un for the release.
16362
16363 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
16364
16365         * mini-arm.c, objects.cs: more fixes and tests for them.
16366
16367 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
16368
16369         * mini-arm.c: align structures to at least 4 bytes to be able
16370         to keep our current optimized memcpy.
16371
16372 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
16373
16374         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
16375
16376 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16377
16378         * mini.c: ignore SIGPIPE.
16379
16380 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
16381
16382         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
16383
16384         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
16385
16386 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
16387
16388         * mini.h: Add prototype for mono_allocate_stack_slots_full.
16389
16390 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
16391
16392         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
16393         exception handling support.
16394         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
16395         patch by Brian Koropoff <briank@marakicorp.com>).
16396
16397 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
16398
16399         * mini.c: revert another 'optimization' which breaks when
16400         items on the eval stack need to be saved at a basic block end
16401         (bug #75940).
16402
16403 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
16404
16405         * jit-icalls.c: for arrays, ensure we always provide
16406         lower bounds.
16407
16408 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
16409
16410         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
16411         
16412         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
16413
16414 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
16415
16416         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
16417         arguments in their original register.
16418
16419 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
16420
16421         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
16422         memset/memcpy.
16423
16424         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
16425         when ssapre is enabled.
16426
16427         * inssel-long.brg: Fix bug in previous patch.
16428
16429         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
16430         multiplication by a constant.
16431
16432 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
16433
16434         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
16435         icc.
16436
16437         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
16438         saving registers.
16439
16440 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
16441
16442         * inssel-arm.brg: apply changes tested by Brian Koropoff
16443         <briank@marakicorp.com>.
16444
16445 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
16446
16447         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
16448         
16449 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
16450
16451         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
16452         to the same register if dreg is just a base register.
16453         (print_ins): Improve printing of membase opcodes.
16454
16455         * inssel-x86.brg: Add optimized ldind(reg) rules.
16456
16457         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
16458
16459 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
16460
16461         * mini.c: when running under valgrind, set the stack bottom for
16462         the GC at the actual approximate stack for the app (fixes running
16463         mono with valgrind).
16464
16465 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
16466
16467         * mini.c: do no break at the first valuetype to init found
16468         (fixes bug #75791).
16469
16470 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
16471
16472         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
16473
16474 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
16475
16476         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
16477
16478 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
16479
16480         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
16481
16482 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
16483
16484         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
16485
16486         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
16487         code.
16488
16489         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
16490         code.
16491
16492         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
16493         methods.
16494
16495 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
16496
16497         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
16498
16499 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
16500
16501         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
16502         in the tail recursion optimization.
16503
16504         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
16505         debug info into the assembly file.
16506
16507         * iltests.il: Add test for filter regions.
16508
16509         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
16510         initial stack of filter regions. Fixes #75755.
16511
16512 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
16513
16514         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
16515         stack requirements.
16516
16517 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
16518
16519         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
16520         the check for an already compiled method on non-ia64 platforms.
16521         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
16522         proper domain.
16523
16524         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
16525
16526         * inssel-x86.brg: Add some optimized call rules.
16527
16528 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
16529
16530         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
16531         method here.
16532
16533         * mini.h mini-trampolines.c: Pass the trampoline argument to 
16534         mono_arch_patch_delegate_trampoline.
16535
16536         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
16537
16538         * mini-trampolines.c: Fix build.
16539
16540         * mini-amd64.h: Add delegate trampolines.
16541
16542         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
16543
16544         * inssel-amd64.brg: Add optimized call rules.
16545         
16546         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
16547
16548         * inssel-ia64.brg: Add optimized ldind(reg) rules.
16549
16550 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
16551
16552         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
16553         change.
16554
16555         * mini-ia64.c: Remove LMF fixmes.
16556
16557         * mini-ia64.h: Remove most fields from LMF.
16558
16559         * inssel-ia64.brg (stmt): Fix unaligned access errors.
16560
16561         * mini-trampolines.c: Add support for IA64 function descriptors.
16562
16563         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
16564         for IA64 function descriptors.
16565
16566 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
16567
16568         * tramp-arm.c: patch the vtable for virtual calls. Added
16569         support code to register/unregister the LMF.
16570         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
16571         more LMF work.
16572
16573 2005-08-19  Dick Porter  <dick@ximian.com>
16574
16575         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
16576         bit value if needed.
16577
16578 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
16579
16580         * mini.c (mini_get_method): Move handling of wrapper data here.
16581
16582         * mini.c (mono_method_to_ir): Add support for dynamic methods.
16583
16584         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
16585         virtual.
16586
16587         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
16588         bblock->code does not remain empty.
16589
16590 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
16591
16592         * arrays.cs: Add regression test for #75832.
16593
16594         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
16595         rules. Fixes #75832.
16596
16597         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
16598         instruction scheduling.
16599
16600 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
16601
16602         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
16603
16604 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
16605
16606         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
16607
16608         * mini-codegen.c: Fix VC build.
16609
16610         * cpu-pentium.md: Increase length of atomic_exhange_i4.
16611
16612 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16613
16614         * mini.h: fix signature for mono_register_opcode_emulation.
16615
16616 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
16617
16618         * mini.c: Get rid of most of the helper_sig_... constants using
16619         mono_create_icall_signature ().
16620
16621 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
16622
16623         * jit-icalls.c (helper_ldstr): New helper function.
16624
16625         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
16626
16627         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
16628         throw, load the string using a helper call instead of creating a string object.
16629
16630         * aot.c: Update after LDSTR changes.
16631
16632         * mini.h: Bump AOT file version.
16633         
16634         * aot.c: Save class size info into the AOT file. Print more statistics during
16635         compilation.
16636
16637         * mini.h: Bump AOT file version.
16638
16639         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
16640         ordering of disasm cases. Fixes #74957.
16641
16642 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
16643
16644         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
16645         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
16646         the generic code needed for the ARM port.
16647
16648 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
16649
16650         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
16651         inssel-arm.brg: more ARM features and fixes.
16652
16653 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
16654
16655         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
16656         ARM port work in progress.
16657
16658 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
16659
16660         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
16661
16662         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
16663
16664         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
16665
16666         * inssel.brg (mini_emit_memset): Add support for unaligned access.
16667
16668         * *-ia64.*: Ongoing IA64 work.
16669         
16670         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
16671
16672 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
16673
16674         * TODO: Remove out-of-data todo stuff.
16675
16676         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
16677         dead code.
16678
16679         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
16680
16681         * mini.h: Bump corlib version.
16682
16683 2005-07-27  Martin Baulig  <martin@ximian.com>
16684
16685         * mini-codegen.c
16686         (create_copy_ins): Added `const unsigned char *ip' argument; set
16687         `copy->cil_code' from it.
16688
16689 2005-07-27  Martin Baulig  <martin@ximian.com>
16690
16691         * mini-exceptions.c (mono_handle_exception): Don't call
16692         mono_debugger_handle_exception() for filters.
16693
16694 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
16695
16696         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
16697         as well.
16698
16699 2005-07-26  Martin Baulig  <martin@ximian.com>
16700
16701         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
16702
16703         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
16704         helper_compile_generic_method() if the method is actually virtual
16705         and non-final.
16706
16707 2005-07-26  Martin Baulig  <martin@ximian.com>
16708
16709         * mini.c
16710         (trampoline_code): Renamed to `mono_trampoline_code' and made it
16711         public; this is now accessed directly by the debugger.
16712         (mono_generic_trampoline_code): Removed.
16713
16714         * debug-mini.c
16715         (mono_debug_init_method): Also add interncalls and wrappers.
16716
16717 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
16718
16719         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
16720
16721 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
16722
16723         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
16724
16725 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
16726
16727         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
16728
16729 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
16730
16731         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
16732         getting TLS offsets on AMD64 too.
16733
16734 2005-07-20  Kornel Pal <kornelpal@hotmail.com>
16735
16736         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
16737
16738 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
16739
16740         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
16741         inssel-arm.brg, mini-arm.h: ARM port work in progress.
16742
16743 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
16744
16745         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
16746
16747         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
16748         to mini.c.
16749
16750         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
16751         mono_sparc_is_virtual_call ().
16752         
16753         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
16754
16755         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
16756         trampoline parameters.
16757
16758         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
16759         
16760         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
16761         to mono_arch_get_vcall_slot_addr.
16762
16763         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
16764         trampoline code.
16765
16766         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
16767
16768 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
16769
16770         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
16771
16772 2005-07-19  Martin Baulig  <martin@ximian.com>
16773
16774         * exceptions-amd64.c (throw_exception): Call
16775         mono_debugger_throw_exception() here like we're doing it on i386.
16776
16777 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
16778
16779         * mini-ia64.c: Add optimized TLS access support.
16780
16781 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
16782
16783         * mini-exceptions.c: Ongoing IA64 work.
16784
16785         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
16786
16787         * mini.c: Use the default optimization set when embedding. Fixes
16788         #75194.
16789
16790 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
16791
16792         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
16793         of trampolines to a separate file.
16794
16795         * mini-trampolines.c: New file.
16796
16797         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
16798         separate file.
16799         
16800         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
16801         amd64/ia64 code.
16802
16803         * mini-codegen.c: Fix cygwin build.
16804
16805 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
16806
16807         * mini.c: Add some minor changes needed by the IA64 port.
16808
16809         * *-ia64.*: Ongoing IA64 work.
16810
16811 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
16812
16813         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
16814         trampolines into arch-independent and arch-dependent parts.
16815
16816         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
16817
16818 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
16819
16820         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
16821
16822         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
16823         the xp-regalloc-branch for amd64.
16824
16825         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
16826         xp-regalloc-branch for x86.
16827
16828 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
16829
16830         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
16831
16832 2005-07-06  Martin Baulig  <martin@ximian.com>
16833
16834         * mini.c
16835         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
16836         (mono_jit_runtime_invoke): Likewise.
16837
16838 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
16839
16840         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
16841         on x86 too.
16842         
16843         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
16844         without loading their metadata. Reorganize the file format so exception handling+
16845         debug info is kept separate from normal method info. Create MonoJitInfo 
16846         structures for methods lazily.
16847
16848         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
16849         loading metadata.
16850         (x86_class_init_trampoline): Patch AOT class init trampolines too.
16851
16852         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
16853
16854         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
16855         in AOT code.
16856
16857         * mini.h: Bump AOT file version.
16858
16859 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
16860
16861         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
16862
16863 2005-07-01  Raja R Harinath  <rharinath@novell.com>
16864
16865         * Makefile.am (check-local): Call semdel-wrapper.
16866
16867 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
16868
16869         * mini-x86.c: Revert the last change as it seems to break the build..
16870
16871 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
16872
16873         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
16874         
16875         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
16876
16877 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
16878
16879         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
16880         outside of the macro, so strange stuff doesn't happen with gcc4
16881         (NEW_AOTCONST_TOKEN): Likewise.
16882
16883 2005-06-28  Martin Baulig  <martin@ximian.com>
16884
16885         * mini.c (mini_class_is_system_array): New static method; use this
16886         instead of `klass->parent == mono_defaults.array_class' everywhere
16887         since this also works for the new generic array class.
16888
16889 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
16890
16891         * inssel.brg: Remove warnings.
16892
16893 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
16894
16895         * mini-ia64.c: Ongoing IA64 work.
16896
16897         * basic-float.cs: Add float->i1 conversion test.
16898
16899         * iltests.il: Add conv.u4 test.
16900
16901 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
16902
16903         * inssel-long.brg: Fix bug caused by last change.
16904
16905 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
16906
16907         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
16908         BSDs.  Allows the x86 JIT to work on OSX86
16909
16910 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
16911
16912         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
16913         u4->i8 conversion.
16914
16915         * mini-ia64.c: Ongoing IA64 work.
16916
16917 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
16918
16919         * mini-ia64.c: Ongoing IA64 work.
16920
16921         * driver.c: Clean up jit_code_hash as well when using --regression.
16922
16923         * inssel-long.brg: Fix long->i4/u4 conversion rules.
16924
16925         * basic-long.cs: Add tests for long->u4 conversion.
16926
16927 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
16928
16929         * mini.c: Take mono_get_domainvar out of macros. This makes sure
16930         that we do not depend on undefined C behavior: the order stuff
16931         gets evaluated within an expression. Fixes mono when compiled on
16932         GCC 4.
16933
16934 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
16935
16936         * *-ia64.*: Ongoing IA64 work.
16937
16938         * aot.c: Lower memory usage while loading AOT methods.
16939
16940         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
16941
16942         * mini.h: Bump AOT file format version.
16943
16944 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
16945
16946         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
16947
16948 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
16949
16950         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
16951         not on callee assembly). Fixed some comments.
16952
16953 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
16954
16955         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
16956         it gets proper disassembly.
16957         (emit_method_info): Remove some dead code.
16958
16959         * mini.c (mini_method_compile): Allways allocate the GOT var in
16960         mono_method_to_ir for emulating opcodes.
16961
16962 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
16963
16964         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
16965         before freeing the code memory. Fixes #74990.
16966
16967         * objects.cs: Add regression test for #74992.
16968
16969         * liveness.c: Extend live ranges of arguments to the beginning of the
16970         method. Fixes #74992.
16971
16972         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
16973         so it points into the faulting instruction.
16974
16975 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
16976
16977         * jit-icalls.c (mono_imul_ovf): Add exception handling.
16978
16979         * *-ia64.*: Ongoing IA64 work.
16980
16981         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
16982
16983 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
16984
16985         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
16986
16987         * *-ia64.*: Ongoing IA64 work.
16988
16989 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
16990
16991         * basic-long.cs: Add tests for add/sub.ovf.
16992
16993         * basic.cs: Add tests for sub.ovf.
16994
16995         * *-ia64.*: Ongoing IA64 work.
16996
16997 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
16998
16999         * *-ia64.*: Ongoing IA64 work.
17000
17001         * basic.cs: Add conv.ovf.i4.un test.
17002
17003 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
17004
17005         * mini.c: (remove_block_if_useless) Fixed bug 75061.
17006         
17007 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17008
17009         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
17010
17011 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
17012
17013         * *-ia64.*: Ongoing IA64 work.
17014
17015 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17016
17017         * trace.[ch]:
17018         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
17019
17020 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
17021
17022         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
17023
17024 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
17025
17026         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
17027
17028         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
17029         of a call is callable by a near call.
17030
17031 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
17032
17033         * mini-ia64.c: Ongoing IA64 work.
17034
17035 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
17036
17037         * genmdesc.c: Make the generated array non-static.
17038
17039         * inssel-long.brg: Fix LSHR_IMM rule.
17040
17041         * *-ia64.*: Ongoing IA64 work.
17042
17043         * *-ia64.*: Ongoing IA64 work.
17044
17045 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
17046
17047         * *-ia64.*: Ongoing IA64 work.
17048
17049         * *-ia64.*: Ongoing IA64 work.
17050         
17051         * mini-ia64.c: Ongoing IA64 work.
17052
17053         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
17054
17055 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
17056
17057         * objects.cs basic-calls.cs: Move some tests to objects.cs.
17058         
17059         * objects.cs basic-long.cs: Move some tests to objects.cs.
17060
17061 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
17062
17063         * *-ia64.*: Ongoing IA64 work.
17064
17065         * iltests.il: Add a new test.
17066
17067         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
17068         newobj. Fixes #75042.
17069
17070 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
17071
17072         * *-ia64.*: Ongoing IA64 work.
17073         
17074         * *-ia64.*: Ongoing IA64 work.
17075         
17076         * *-ia64.*: Ongoing IA64 work.
17077
17078         * basic.cs objects.cs: Move tests accessing static variables as well.
17079
17080         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
17081
17082 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
17083
17084         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
17085
17086         * driver.c: Always print failed tests.
17087
17088         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
17089         frame pointer.
17090
17091         * *ia64*: Ongoing IA64 work.
17092
17093 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
17094
17095         * basic.cs: Add tests for add.ovf. Fix warnings.
17096
17097 2005-05-18  Miguel de Icaza  <miguel@novell.com>
17098
17099         * driver.c (mono_main): Avoid crash if no argument is passed to
17100         --break;  Do not use g_error, but f_printf.   And fix all other
17101         ocurrences of the same crash.
17102
17103 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
17104
17105         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
17106         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
17107         Fixes #74742.
17108
17109 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
17110
17111         * *-ia64.*: Add beginnings of IA64 backend.
17112
17113         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
17114
17115 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
17116
17117         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
17118         Fixes #74925.
17119
17120         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
17121
17122         * mini-amd64.c: Fix a warning.
17123
17124 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
17125
17126         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
17127         in float_neg. Fixes #74897.
17128
17129         * mini-amd64.c (emit_call): Fix another near call bug.
17130
17131 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
17132
17133         * declsec.c: Keep the appdomain information in the structure. Added a 
17134         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
17135         value gets overwritten).
17136         * declsec.h: Set the default MonoArray for the the stack to 6. Added
17137         an MonoAppDomain member to MonoSecurityFrame.
17138         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
17139         used in the stack walk. Now use a MonoArray which grow (double) when
17140         it gets full.
17141
17142 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
17143
17144         * mini.c: Re-enabled runtime cleanup, since running threads should
17145         now properly stop when exiting.
17146
17147 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
17148
17149         * mini-codegen.c: New file contaning the arch-independent local
17150         register allocator. Not used by any architectures yet.
17151
17152         * mini.h linear-scan.c: Merge some changes from the 
17153         mini-xp-local-regalloc branch.
17154
17155 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
17156
17157         * mini-amd64.c (emit_call): Fix calls to native functions when the
17158         runtime is compiled as a shared library. Fixes #74756.
17159
17160         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
17161         on a literal field. Fixes #74751.
17162
17163 2005-04-25  Raja R Harinath  <rharinath@novell.com>
17164
17165         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
17166
17167 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
17168
17169         * objects.cs: Add missing null casting test.
17170
17171 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
17172
17173         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
17174         in wrapper methods. Also rename 'address' variable to 'offset'.
17175
17176 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
17177
17178         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
17179         warnings.
17180         
17181         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
17182
17183         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
17184         work on windows.
17185
17186 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
17187
17188         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
17189
17190 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
17191
17192         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
17193         just the last bytes.
17194
17195 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
17196
17197         * aot.c (mono_compile_assembly): Fix warning.
17198
17199         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
17200         by the _MSC_VER stuff.
17201
17202 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
17203
17204         * inssel-long.brg: Fix #74588.
17205
17206         * cpu-amd64.md: Fix #74591.
17207
17208         * iltests.il: Add new regression tests.
17209
17210 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
17211
17212         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
17213         valuetype.
17214
17215 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
17216
17217         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
17218
17219         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
17220         from Bill Middleton <flashdict@gmail.com>.
17221
17222 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
17223
17224         * arrays.cs: Add new regression test. Fix warnings.
17225
17226 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
17227
17228         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
17229         and leakage in CKFINITE.
17230
17231         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
17232         this to a null op since it is called on amd64 too.
17233
17234         * exceptions-amd64.c (get_throw_trampoline): Align stack.
17235
17236         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
17237         body since this is not used on amd64.
17238         
17239         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
17240
17241         * mini-amd64.c: Remove obsolete fixmes.
17242
17243         * mini.c (print_method_from_ip): Fix debugging support.
17244
17245 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
17246
17247         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
17248         so that expressions that don't give much gain are not reduced.
17249         * ssapre.h: Likewise.
17250
17251 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
17252
17253         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
17254
17255         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
17256
17257         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
17258
17259 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
17260
17261         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
17262
17263         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
17264
17265 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
17266
17267         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
17268         stack touching.
17269
17270         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
17271
17272         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
17273
17274         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
17275
17276         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
17277         MONO_ARCH_USE_SIGACTION. Fixes #74252.
17278
17279         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
17280
17281         * mini-x86.c: Fix up stack overflow handling.   
17282
17283         * exceptions.cs: Add new regression test.
17284
17285 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
17286
17287         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
17288         mono_jit_thread_attach.
17289
17290         * mini.c (mono_method_to_ir): Verify called method is not abstract.
17291
17292 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
17293
17294         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
17295         avoid calling constructors using callvirt.
17296
17297         * inssel.brg: Fix #74073.
17298
17299 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
17300
17301         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
17302         compilation with non-GCC compilers.
17303         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
17304         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
17305
17306 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
17307
17308         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
17309         klass->interface_offsets (will likely fix bug#74073).
17310
17311 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
17312
17313         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
17314
17315 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
17316
17317         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
17318         to amd64_div_reg_size ().
17319         
17320         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
17321
17322 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
17323
17324         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
17325
17326 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
17327
17328         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
17329
17330 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
17331
17332         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
17333         
17334         * mini.c (mono_precompile_assembly): Load and precompile referenced
17335         assemblies as well. Fixes #74015.
17336
17337 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
17338
17339         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
17340
17341 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
17342
17343         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
17344         a lot of checks and (anyway) permissions cannot work until corlib is 
17345         loaded.
17346
17347 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
17348
17349         * mini-ppc.c: fixed ABI issue on sysv/ppc.
17350
17351 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
17352
17353         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
17354         calls (fixes bug#72824).
17355
17356 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
17357
17358         * mini.c: fix tail recursion elimination (see test in bug#73936).
17359
17360 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
17361
17362         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
17363         some fp functions in sse2 mode.
17364
17365 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
17366
17367         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
17368
17369 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
17370
17371         * mini.h mini.c: Add mono_get_jit_tls_key ().
17372
17373         * mini-x86.c: Enable fast TLS support on windows.
17374
17375 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
17376
17377         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
17378         * mini.c: Check for p/invoke method when generating code. If a
17379         p/invoke method, or it's class, isn't decorated with [Suppress
17380         UnmanagedCodeSecurity] then generate code to call System.Security.
17381         UnmanagedDemand (only if the security manager is active).
17382
17383 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
17384
17385         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
17386         last change as it seems to cause strange crashes.
17387         
17388 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
17389
17390         * *.c: handle unsafe function pointers where needed.
17391
17392 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
17393
17394         * mini.c (mono_jit_free_method): Remove the fixme too.
17395
17396 2005-03-15  Miguel de Icaza  <miguel@novell.com>
17397
17398         * mini.c: As discussed, make the code actually free the delegate
17399         thunk now, to enable the debugging of delegate problems, use
17400         MONO_DEBUG=1 when running Mono. 
17401
17402         This takes also care of parts of the leaks as seen by Joe.
17403
17404 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
17405
17406         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
17407         thread_tls_offset calculation.
17408
17409 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
17410
17411         * declsec.c: Reworked linkdemand checks for icall. The previous code
17412         was using the declaration code (untrusted) and didn't work as expected
17413         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
17414         specific case.
17415
17416 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
17417
17418         * iltests.il: Add new localloc test.
17419
17420         * mini-amd64.c: Handle large stack allocations the same way as on
17421         windows if stack overflow handling is working.
17422         
17423         * mini-amd64.c: Allocate the signal stack using mmap.
17424
17425         * mini.c (sigsegv_signal_handler): Fix reading of context.
17426
17427         * mini-exceptions.c: Fix up stack overflow handling.
17428
17429         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
17430
17431         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
17432
17433         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
17434
17435         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
17436
17437         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
17438         tramp_init functions as they are no longer needed.
17439
17440 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
17441
17442         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
17443         
17444         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
17445
17446         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
17447         
17448         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
17449         support that now.
17450
17451         * mini-ops.h: Add OP_LMUL_IMM.
17452
17453         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
17454         long mul/div opcodes as intrinsic.
17455
17456         * mini-amd64.c (emit_call): Handle the case when the callee might be
17457         an AOT method.
17458
17459 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
17460
17461         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
17462         extra safe.
17463         
17464         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
17465
17466         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
17467
17468 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
17469
17470         * mini.c (mono_codegen): Don't leak here, to help people running
17471         monogrind.
17472
17473 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
17474
17475         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
17476         conversions in sse2 mode.
17477
17478         * basic-float.cs: Add regression test.
17479         
17480         * mini-amd64.c: Reenable sse2.
17481
17482 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
17483
17484         * mini-amd64.c: Disable sse2 until some regressions are fixed.
17485
17486 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
17487
17488         * driver.c: Copyright text should include 2005.
17489         
17490 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
17491
17492         * cpu-amd64.md (load_membase): Fix more max lengths.
17493
17494 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
17495
17496         * cpu-amd64.md (load_membase): Fix max length.
17497
17498         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
17499
17500         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
17501
17502         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
17503         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
17504
17505         * basic-float.cs: Add rounding regression test.
17506
17507         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
17508
17509 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
17510
17511         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
17512         structures in registers for pinvoke wrappers.
17513
17514 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
17515
17516         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
17517
17518 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
17519
17520         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
17521         wrapper to mono_jit_thread_attach.
17522
17523         * mini.c (mini_jit_thread_attach): New jit icall.
17524
17525         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
17526         native->managed wrappers.
17527
17528         * exceptions.cs: Add new regression test.
17529
17530         * mini.c (optimize_branches): Check regions in the cbranch to throw
17531         block case as well. Fixes #73242.
17532
17533 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
17534
17535         * mini.c: thread safety fixes.
17536
17537 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
17538
17539         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
17540         patching stuff, since delegates use jump trampolines so there is
17541         no caller.
17542
17543         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
17544         jump trampolines.
17545         
17546         * tramp-amd64.c: Fix build.
17547
17548         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
17549         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
17550
17551         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
17552         Rename this to mono_arch....
17553         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
17554
17555         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
17556
17557         * mini-amd64.c (emit_call): If both the caller and the callee is
17558         guaranteed to have 32 bit addresses, emit a normal call.
17559
17560         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
17561
17562         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
17563         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
17564         method_ptr inside delegates.
17565
17566 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
17567
17568         * mini.c (mono_jit_free_method): Free the method info even if the native code is
17569         invalidated. Fixes #73001.
17570
17571         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
17572
17573         * mini-x86.c: Only use stdcall for pinvokes on windows.
17574
17575 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
17576
17577         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
17578         * mini-x86.c: remove unreliable __thread var offset detection,
17579         use the correct accessors and enable by default.
17580
17581 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
17582
17583         * mini.c (mono_jit_free_method): Fix memory leak.
17584
17585 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
17586
17587         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
17588
17589 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
17590
17591         * cpu-amd64.md: Fix lengths of atomic opcodes.
17592
17593 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
17594
17595         * driver.c: try to not imply using ICU is any good.
17596
17597 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
17598
17599         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
17600         functions as inline ops.
17601
17602         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
17603         some Interlocked functions as inline ops.
17604
17605         * mini.c (move_basic_block_to_end): Fix bug in last patch.
17606
17607         * mini.h (MonoBasicBlock): Reorganize fields a bit.
17608
17609         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
17610
17611         * mini.c: Add support for OP_NOT_TAKEN.
17612
17613         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
17614         structures in registers for pinvoke wrappers.
17615
17616         * mini-amd64.c: Fix warnings.
17617
17618 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
17619
17620         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
17621
17622         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
17623
17624         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
17625         address instead of loading the address from it.
17626
17627         * mini-x86.c: Add support for returning small structs in registers
17628         on Win32. Fixes part of #70864.
17629         
17630 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
17631
17632         * trace.c (get_token): Improve error checking.
17633
17634 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
17635
17636         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
17637
17638 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
17639  
17640         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
17641         it can be reused for MonoClass.
17642         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
17643         _LINKDEMAND.
17644
17645 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
17646
17647         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
17648         instead of a MonoReflectionMethod. The method information wasn't used
17649         when displaying SecurityException details (but will be now).
17650
17651 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
17652
17653         * Makefile.am : windows build fix.
17654
17655 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
17656
17657         * iltests.il: Add new regression test.
17658
17659         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
17660         #72522.
17661
17662 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
17663  
17664         * mini.c: Moved linkdemand check into helper function check_linkdemand
17665         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
17666         LDFTN, LDVIRTFTN).
17667
17668 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
17669
17670         * declsec.c: Added statistics counter for different kinds of 
17671         LinkDemands.
17672         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
17673         (and commented) declaration.
17674         * mini.c: Added statistics counter for security Demand code 
17675         generation. Added display of security statistics.
17676
17677 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
17678
17679         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
17680         Fix compilation errors under gcc-2.95.
17681
17682 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
17683
17684         * mini.c, driver.c: Use the new jit trampoline hashtable
17685
17686 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
17687
17688         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
17689
17690 2005-02-11  Martin Baulig  <martin@ximian.com>
17691
17692         * debug-mini.c (mono_debug_close_method): Free the line number array.
17693
17694 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
17695
17696         * aot.c: Break up large methods into smaller ones. Share GOT slots for
17697         icalls.
17698
17699         * mini.h: Bump AOT file format version. 
17700
17701 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
17702
17703         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
17704         APTC and P/Invoke.
17705         * declsec.h: Added macros to get/set lazyly initialized security 
17706         informations about assemblies. Added new enum for different type of
17707         possible LinkDemand violation. Added function to check LinkDemands.
17708         * mini.h: Added a field to MonoCompile to hold any security violation
17709         detected when JITting a method (so it can be thrown later).
17710         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
17711         and CEE_CALLVIRT. Added code to throw exception at the end of
17712         mini_method_compile (note: the exception is unhandled right now).
17713
17714 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
17715
17716         * mini.c, jit-icalls.c: use the managed implementation of
17717         memset for initobj and memset, to avoid managed <-> unmanaged
17718         transitions.
17719
17720 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
17721
17722         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
17723         optimization if it would need a GOT var.
17724
17725         * basic.cs: Add tests for constant propagation and switch statements.
17726
17727         * ssa.c: Fix out-of-range constant propagation and switch statements.
17728
17729 2005-02-09    <vargaz@freemail.hu>
17730
17731         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
17732
17733 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
17734
17735         * cpu-amd64.md (load_membase): Fix max length of load_membase.
17736
17737 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
17738
17739         * mini.c: update to new signature of mono_class_get_allocation_ftn().
17740
17741 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
17742
17743         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
17744         arithmetic operations.
17745
17746 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
17747
17748         * mini-ppc.c: add a workaround for broken user code that
17749         DllImports vararg functions with non-vararg signatures.
17750
17751 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
17752
17753         * mini.c (mono_jit_compile_method_inner): Add detection and a 
17754         meaningfull error message for assemblies written in Managed C++.
17755
17756         * tramp-amd64.c mini-amd64.h: Add support for 
17757         create_trampoline_from_token ().
17758
17759         * aot.c mini-x86.c abcremoval.c: Applied patch from
17760         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
17761
17762 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
17763
17764         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
17765         which takes a MonoImage/token as parameter instead of a MonoMethod.
17766
17767         * aot.c: Use the new trampoline for initializing vtables.
17768
17769         * aot.c: Add support for ldfld/stfld_remote wrappers.
17770
17771         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
17772         rules for compare <MEM>, IMM.
17773
17774         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
17775
17776         * aot.c: Handle inherited finalizers correctly.
17777
17778 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
17779
17780         * inssel.brg (stmt): Add a missing _setup_... ().
17781
17782         * aot.c: Save some parts of the class state to the AOT file and use it
17783         to recompute that state when a class is initialized.
17784
17785         * mini.c: Install AOT hooks into the runtime.
17786
17787         * mini.h: Bump AOT file format version.
17788         
17789         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
17790         Fixes #72148.
17791
17792         * iltests.il: Add new test.
17793
17794 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
17795
17796         * mini.c: fix typo.
17797
17798 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
17799
17800         * mini.c: setup the statistical profiler in the thread attach
17801         callback to cope with the new single thread code.
17802
17803 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
17804
17805         * mini-ppc.c: ensure we have enough room for the profiler
17806         calls (fixed bug#72084).
17807
17808 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
17809
17810         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
17811         it.
17812
17813 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
17814
17815         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
17816
17817 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
17818
17819         * ssapre.c: Fixed an issue with down safety (this allows IronPython
17820         to succesfully execute parrotbench).
17821         * ssapre.h: Likewise.
17822
17823 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
17824
17825         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
17826         variable for stores to method arguments (fixes a SSAPRE issue).
17827
17828 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
17829
17830         * mini.c: handle value types in dup, fixes gen-112.cs.
17831
17832 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
17833
17834         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
17835         sequence for calls in dynamic methods to avoid thunks.
17836
17837 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
17838
17839         * mini.c: correctly remove dynamic methods from the hashtable.
17840
17841 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
17842
17843         * driver.c: Disabled SSAPRE until fix the bug that appears
17844         in IronPython's parrotbench.
17845
17846 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
17847
17848         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
17849
17850         * mini.c (mono_method_to_ir): Revert the previous change.
17851         
17852         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
17853         when AOT compiling.
17854
17855         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
17856         mono_jit_info_table_find () etc. when running under valgrind.
17857
17858         * inssel.brg: Fix warnings.
17859
17860         * mini-exceptions.c: Fix warnings.
17861
17862 2005-01-31  Martin Baulig  <martin@ximian.com>
17863
17864         * driver.c (compile_all_methods_thread_main): Don't try to compile
17865         generic methods or anything which has type parameters.
17866
17867 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
17868
17869         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
17870
17871         * TestDriver.cs: Add --verbose flags.
17872
17873         * graph.c ssa.c: Fix 64 bit warnings.
17874         
17875         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
17876         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
17877         Fix 64 bit warnings.
17878
17879         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
17880         variable not spotted by gcc.
17881         
17882         * mini-amd64.c inssel-amd64.brg: Applied patch from  
17883         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
17884         X86_COMPARE_MEMBASE opcodes.
17885
17886         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
17887
17888 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
17889
17890         * *: MonoMethod->signature might be NULL now. You *MUST* use
17891         mono_method_signature.
17892
17893 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
17894
17895         * driver.c (compile_all_methods_thread_main): Compile the methods
17896         without invoking cctors.
17897
17898 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
17899
17900         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
17901         * basic-calls.cs: test for the above.
17902
17903 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
17904
17905         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
17906         MonoJitInfo changes.
17907
17908 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
17909
17910         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
17911         eagerly if it contains dynamic methods.
17912         
17913         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
17914
17915         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
17916         trace, it is now computed by an icall from trace_ips.
17917         
17918         * mini-exceptions.c: Fix a warning.
17919
17920 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
17921
17922         * mini-exceptions.c: don't bother getting stack trace info if
17923         it's not going to be used.
17924
17925 2005-01-27  Raja R Harinath  <rharinath@novell.com>
17926
17927         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
17928         ssapre-mini-ops.h.
17929
17930 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
17931
17932         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
17933
17934         * aot.c: Avoid calling mono_method_get_header () if not needed.
17935
17936         * mini.h: Bump AOT file format version.
17937         
17938         * mini.c (mono_emit_native_call): Allocate a GOT var here.
17939
17940         * mini.c (mono_print_tree): Print more info for calls.
17941
17942 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
17943
17944         * declsec.h: Remove warning by adding missing include for marshal.h
17945
17946 2005-01-26  Martin Baulig  <martin@ximian.com>
17947
17948         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
17949         `ip' twice.
17950
17951 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
17952
17953         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
17954         flags.
17955
17956         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
17957
17958         * aot.c (mono_compile_assembly): Fix a warning.
17959
17960 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
17961
17962         * declsec.c: Look for security attributes on the original MonoMethod 
17963         (and not the wrapped one). This fix permissions on icalls.
17964
17965 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
17966
17967         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
17968
17969         * mini.c (mono_allocate_stack_slots): Add a fixme.
17970
17971         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
17972
17973 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
17974
17975         * inssel.brg: optimize casts of sealed types (more
17976         optimizations waiting for fixes in remoting).
17977
17978 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
17979
17980         * inssel.brg (stmt): Add another dummy rule.
17981
17982         * driver.c: Fix warnings.
17983
17984         * driver.c (mono_main): If running under valgrind, instruct glib to use
17985         the system allocation functions so valgrind can track the memory
17986         allocated by the g_... functions.
17987
17988         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
17989
17990         * mini-ops.h: Add OP_DUMMY_STORE opcode.
17991
17992         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
17993
17994         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
17995         variables in try regions.
17996
17997         * mini.c (mini_method_compile): Don't disable optimizations on large
17998         methods when AOT compiling.
17999
18000         * mini.c (mono_allocate_stack_slots): New arch independent method to 
18001         allocate stack slots. Not yet used.
18002
18003 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
18004
18005         * debug-mini.c (mono_debug_close_method): Plug some leaks.
18006
18007 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
18008
18009         * mini-ppc.c: make the branch info relative as the code
18010         buffer can be reallocated.
18011
18012 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
18013
18014         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
18015         * driver.c: Removed the AOT/security restriction. Now initialize the
18016         security manager (in metadata) if --security is used.
18017         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
18018         rather than the pointer to declarative security, when AOT is used.
18019
18020 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
18021
18022         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
18023         basic blocks, reduced intrinsic exception throwing code size.
18024
18025 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
18026
18027         * driver.c (mini_usage): Reorder the usage screen.
18028
18029 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
18030
18031         * mini.c (mono_resolve_patch_target): Fix warning.
18032
18033 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
18034
18035         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
18036         previous patch.
18037
18038         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
18039
18040         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
18041         breaks the amd64 build.
18042
18043         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
18044         register allocation. Fixes #71454.
18045
18046         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
18047
18048         * arrays.cs: Add new regression test.   
18049
18050 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
18051
18052         * ssapre.c: Turned usage of snprintf to GString.
18053         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
18054         (I left it on by mistake in my previous commit).
18055
18056 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
18057
18058         * mini.c, cfold.c, basic-calls.cs: preserve side effects
18059         on cond branch optimization (fixes bug# 71515).
18060
18061 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
18062
18063         * abcremoval.c: Fixed bug 71062.
18064         * abcremoval.h: Likewise.
18065
18066 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
18067
18068         * mini.c: Added a new functionality to optimize_branches, the removal
18069         of useless basic blocks, and fixed some problem in the removal of
18070         critical edges; some utility functions added for both purposes.
18071         * ssapre.c: Added complex expression support, and fixed bug 70637.
18072         * ssapre.h: Likewise.
18073         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
18074         enabled in SSAPRE.
18075         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
18076         * driver.c: Re-enabled SSAPRE.
18077
18078 2005-01-19  Martin Baulig  <martin@ximian.com>
18079
18080         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
18081         the result of mono_get_method_constrained().
18082
18083 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
18084
18085         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
18086         manager.
18087
18088 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
18089
18090         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
18091         be detected.  Fixes #59296.
18092
18093 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
18094
18095         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
18096         which can happen. Fixes #71361.
18097
18098 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
18099
18100         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
18101         manager.
18102
18103 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
18104
18105         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
18106         appdomain-unload.exe to fail.
18107         
18108         * mini.c: Fix some memory leaks.
18109
18110 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
18111
18112         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
18113         Fixed bug and sped up some codepaths.
18114
18115 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
18116
18117         * mini.c: Fix some memory leaks.
18118
18119         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
18120         conversion.
18121
18122         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
18123
18124         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
18125         #71320.
18126
18127         * iltests.il: Add regression test for #71320.
18128
18129 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
18130
18131         * mini.c (mono_codegen): Fix installation of profiler hooks.
18132
18133         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
18134
18135 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
18136
18137         * mini.h, mini.c, cfold.c: optimize access to enum
18138         readonly fields, too. Eval conditional branches if possible
18139         to perform unreachable code removal in more cases.
18140
18141 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
18142
18143         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
18144
18145         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
18146         code manager.
18147
18148         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
18149         WinXP DEP. Fixes #71244.
18150
18151 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
18152
18153         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
18154
18155 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
18156
18157         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
18158
18159 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
18160
18161         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
18162         changes.
18163
18164         * mini.h: Bump AOT version.
18165
18166         * mini.h (MonoCompile): Change exvar to a hash table.
18167
18168         * mini.c: Allocate a separate exvar for each handler block.
18169
18170         * mini.c: Get rid of the computation of filter_lengths, its not needed.
18171
18172         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
18173         ex var with the pending exception and only throw if the two are equal.
18174         Fixes #68552.
18175         
18176         * exceptions.cs: Add tests for rethrow and nested catch clauses.
18177
18178         * mini-x86.c: Fix warnings.
18179
18180         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
18181         used by all the ports now.
18182
18183         * aot.c: Add write-symbols and save-temps options.
18184
18185 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
18186
18187         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
18188
18189 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
18190
18191         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
18192         operations.
18193
18194         * tramp-s390.c: Check vtable slot belongs to the domain.
18195
18196         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
18197         as per other platforms.
18198
18199         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
18200
18201 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
18202
18203         * driver.c: we don't run the Main() code in a subthread anymore.
18204
18205 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
18206
18207         * mini.c: added experimental rtc support in the statistical
18208         profiler: if the user has the permission, more accurate statistics
18209         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
18210         The MONO_RTC value must be restricted to what the linux rtc allows:
18211         power of two from 64 to 8192 Hz.
18212
18213 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
18214
18215         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
18216
18217 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
18218
18219         * mini-ppc.c: better icache flush for smp.
18220
18221 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
18222
18223         * mini-amd64.c (emit_move_return_value): Fix memory leak.
18224
18225         * mini-x86.c (get_call_info): Add the get_call_info () code from the
18226         amd64 port, not yet used.
18227
18228 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
18229
18230         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
18231         a struct type.
18232
18233 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
18234
18235         * driver.c: Added --security option to activate the security manager.
18236         Right now this will allow code generation for declarative demands and
18237         is disabled when AOT is specified.
18238         * mini.c: Add code generation for declarative security demands.
18239         * mini.h: Add mono_use_security_manager as an extern gboolean.
18240
18241 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
18242
18243         * aot.c (mono_compile_assembly): Speed up compilation a bit by
18244         emitting more dense assembly code.
18245
18246         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
18247         exception throwing stuff.
18248
18249 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
18250
18251         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
18252         dead code.
18253
18254         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
18255         left in by mistake.
18256
18257         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
18258         fixed.
18259
18260         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
18261
18262         * tramp-*.c: Only patch vtable slots if the object is in the current
18263         domain. Fixes appdomain-unload.exe.
18264
18265         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
18266         
18267         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
18268         x86 branch.
18269
18270 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
18271
18272         * mini.c (reverse_branch_op): New helper function.
18273
18274         * mini.c (optimize_branches): Run the new optimization only on 
18275         platforms which support it. Also reverse all kinds of branches.
18276
18277         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
18278
18279         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
18280         a throw statement.
18281
18282         * mini.c (optimize_branches): Reverse not-equals branches if the false
18283         bblock is a throw. This happens a lot of time with argument checking in
18284         corlib.
18285
18286         * mini.c (mono_codegen): Add support for placing basic blocks after
18287         the function epilogue.
18288
18289         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
18290         function epilogue.
18291         
18292 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
18293
18294         * mini.c (setup_stat_profiler): Only set this up if the platform
18295         supports ITIMER_PROF.
18296
18297 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
18298
18299         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
18300         previous patch.
18301
18302         * inssel.brg: Fix a warning.
18303
18304 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
18305
18306         * mini.c: added support for statistical profiler 
18307         (run with: --profile=default:stat).
18308
18309 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
18310
18311         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
18312
18313         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
18314
18315         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
18316         related to global registers from the amd64 port.
18317
18318 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
18319
18320         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
18321
18322         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
18323         with global registers.
18324         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
18325
18326         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
18327
18328 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
18329
18330         * debug-mini.c (encode_value): Fix off-by-one.
18331
18332         * aot.c (encode_value): Likewise.
18333
18334         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
18335
18336 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
18337
18338         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
18339         AOT.
18340
18341         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
18342         
18343         * aot.c (emit_method_info): Increase size of temp buffer.
18344
18345         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
18346         the AOT case.
18347
18348 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
18349
18350         * aot.c (emit_method_info): Fix build.
18351         
18352         * aot.c: Further rework of the AOT file format to reduce the size of
18353         the method info data.
18354
18355         * mini.h: Bump AOT file format version.
18356
18357 2004-12-27  Martin Baulig  <martin@ximian.com>
18358
18359         * mini.c (mini_get_method): New static method; call
18360         mono_get_method_full() and mono_get_inflated_method().
18361         (mono_method_to_ir): Use mini_get_method() instead of
18362         mono_get_method_full(). 
18363
18364 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
18365
18366         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
18367
18368 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
18369
18370         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
18371
18372         * inssel-amd64.brg: Add some optimization rules.
18373
18374 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
18375
18376         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
18377         standard not GC'd stuff is fine.
18378
18379 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
18380
18381         * aot.c: Rework the AOT file format to get rid of most of the global
18382         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
18383
18384         * mini.h: Bump AOT file format version.
18385         
18386 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
18387
18388         * mini.h: Bump AOT file format version.
18389
18390         * aot.c (mono_aot_is_got_entry): New function to determine if an 
18391         address is inside a GOT.
18392
18393         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
18394
18395         * cpu-pentium.md: Increase the maximum size of some instructions which
18396         might involve a got access.
18397         
18398         * mini.c (get_method_from_ip): Another debug helper function.
18399
18400         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
18401         when got var accesses are created during the decompose phase.
18402
18403         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
18404
18405         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
18406         argument mini_compile_method and to MonoCompile, and use this to
18407         determine whenever a given method is compiled for AOT. This allows the
18408         other methods compiled during AOT compilation to be free of AOT stuff,
18409         so the backends does not need to add special support for them by
18410         creating a fake GOT etc.
18411
18412         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
18413         longer needed.
18414
18415 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
18416
18417         * mini.c (mono_method_to_ir): It turns out that some of the
18418         x-appdomain wrappers are lax with types, so just ignore this for
18419         all wrappers.
18420
18421         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
18422         at the vtable->klass. If it is non-shared code we can just use the
18423         vtable.
18424
18425 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
18426
18427         * mini-ppc.c: access MonoDomain from tls, too.
18428
18429 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
18430
18431         * declsec.c: Removed unused variable (and related warning ;-)
18432
18433 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
18434
18435         * iltests.il: New test for LDELEMA on an array of ref types.
18436
18437         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
18438         all ldelema's on reftypes.
18439         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
18440         it was the wrong place to put it.
18441
18442         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
18443         register to pop to make this cleaner, at the request of Paolo.
18444
18445 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
18446
18447         * mini-ops.h (OP_GETHASHCODE): New op.
18448
18449         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
18450
18451         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
18452         operation.
18453
18454         For a microbenchmark, this reduces the cost of Hashtable.get_Item
18455         by 25%.
18456         
18457         * mini-x86.c (mono_arch_output_basic_block): Rather than
18458
18459         add ebp, 4
18460
18461         Emit
18462
18463         pop edx
18464
18465         The first is 3 bytes while the second is 1. This saves 36 kb on
18466         mscorlib, quite a big saving. When bootstraping mcs, I was able to
18467         see a small boost because of icache locality.
18468
18469         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
18470
18471 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
18472
18473         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
18474         started code sharing with the generic code.
18475
18476 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
18477
18478         * mini-ppc.c, cpu-g4.md: added code for direct access to
18479         tls data slots.
18480
18481 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
18482
18483         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
18484          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
18485         to OP_TLS_GET.
18486
18487 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
18488
18489         * declsec.c|h: Added functions to cache the declarative stack modifiers
18490         in MonoJitInfo and to create a security frame from a MonoJitInfo 
18491         structure.
18492         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
18493         created. Register internal calls for System.Security.SecurityFrame::
18494         _GetSecurityFrame and _GetSecurityStack.
18495         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
18496         the definitions for the new stack walk/callback mechanism.
18497         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
18498         first security frame for LinkDemands and InheritanceDemands) and
18499         GetSecurityStack for Demands. Both use the new mono_walk_stack code
18500         from lupus.
18501         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
18502         walk initialization (lupus).
18503
18504 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
18505
18506         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
18507         idiom.
18508         (handle_loaded_temps): Do not create a temporary variable for
18509         things that we know are temps. They will never be modified.
18510         (mono_spill_call): Set MONO_INST_IS_TEMP
18511         (mono_emulate_opcode): ditto
18512         (emit_tree): ditto
18513         (mono_method_to_ir.CEE_DUP): ditto
18514
18515 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
18516
18517         * mini.c (type_to_eval_stack_type): Make this handle the void type
18518         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
18519         (emit_tree): use ip_in_bb to special case some common idioms
18520         Update all callers to pass in the IP.
18521         (mono_method_to_ir): Make CEE_CALL* do the above as well.
18522
18523         This gives us a nice 2% speedup in mcs bootstrap.
18524
18525         * mini-x86.c (peephole_pass): Peephole pass to make
18526         mov  [foo], eax
18527         push [foo]
18528
18529         into
18530
18531         mov [foo], eax
18532         push eax
18533
18534         * mini.c (ip_in_bb): new method.
18535         (mono_method_to_ir): use this method rather than doing the hash
18536         lookup ourselves.
18537
18538         * linear-scan.c (mono_linear_scan): When expiring actives, you
18539         don't need to keep around variables that expire on this
18540         instruction. This makes it so that:
18541              a = b + 1
18542         will turn into:
18543              store (ebx add (ebx, 1))
18544         which will become
18545              add ebx, 1
18546
18547 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
18548
18549         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
18550         combination to avoid doing two copies. Fix up problems with previous
18551         patch.
18552
18553         * mini.c: Fix 64 bit warnings.
18554
18555         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
18556
18557 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
18558
18559         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
18560         changes from the x86 code.
18561
18562         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
18563
18564 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
18565
18566         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
18567         throwing code to reduce its size, unify the AOT and non-aot code and 
18568         get rid of relocations in the AOT case.
18569
18570         * mini-x86.h mini.c exceptions-x86.c 
18571         (mono_arch_get_throw_corlib_exception): New arch specific function to 
18572         raise corlib exceptions which doesn't require relocations in the 
18573         caller.
18574
18575         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
18576
18577 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
18578
18579         * mini.c (mono_emit_method_call): Only allocate the got var when it is
18580         needed.
18581
18582         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
18583         in the AOT case.
18584
18585 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
18586
18587         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
18588         with add function when used from Inc/dec atomic 
18589         functions. Re-enabled optimization on x86.
18590         * mini-ops.h: renamed atomic_add functions to
18591         allow _add to match the Interlocked::Add and
18592         _add_next to match Interlocked::Inc/Dec.
18593
18594 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
18595
18596         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
18597         linking of BBs to the end BB, and enabled SSAPRE also with
18598         consprop and copyprop (which was prevented by that bug).
18599
18600 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
18601
18602         * mini-x86.c: disabling the Interlocked optimizing code. 
18603
18604 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
18605
18606         * aot.c (load_aot_module): Move reading of got_addr after the AOT
18607         file version check.
18608         
18609 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
18610
18611         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
18612         interlocked optimization due lack of support on x86, rewrote 
18613         exchange to take into account that base may be in eax.
18614         
18615         xsp works again; activated Interlocked optimizing code.
18616         
18617 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
18618
18619         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
18620
18621 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
18622
18623         * mini-ops.h: Add new opcodes.
18624
18625         * mini.h: Add new patch types. Add got_var to MonoCompile.
18626
18627         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
18628         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
18629         make it work with all kinds of patchable code.
18630
18631         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
18632         address of the GOT, and referencing entries in the GOT.
18633
18634         * mini.c: Add code to load the GOT address if needed by an opcode.
18635
18636         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
18637         independent AOT code on the x86 using an elf-style Global Offset Table.
18638
18639 2004-12-14  Raja R Harinath  <rharinath@novell.com>
18640
18641         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
18642
18643 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18644
18645         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
18646         when running xsp.
18647
18648 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
18649
18650         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
18651         of Interlocked:Increment/Decrement/Add as inline ops.
18652         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
18653
18654 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
18655
18656         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
18657         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
18658
18659 2004-12-12  Duncan Mak  <duncan@ximian.com>
18660
18661         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
18662         again. `patch_info->table_size' is no longer valid after Zoltan's
18663         commit #37636.
18664
18665 2004-12-12  Martin Baulig  <martin@ximian.com>
18666
18667         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
18668         if we are the "real" method, ie. not an inlined method inside it.
18669
18670 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
18671
18672         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
18673         before we look in the special fields table. This fixes
18674         ../tests/thread-static-init.cs.
18675
18676 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18677
18678         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
18679         for Array get_Rank and get_Length. Fixes bug #70465.
18680
18681 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
18682
18683         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
18684         separate structure to reduce the size of MonoJumpInfo.
18685
18686 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
18687
18688         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
18689
18690 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
18691
18692         * mini.c (mini_get_inst_for_method): Changed to allow ports
18693         to return a MonoInst instead of opcode 
18694         (renamed mini_get_opcode_for_method to better reflect the new functionality)
18695         
18696         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
18697         Allow ports to return a created MonoInst instead of op-code, will enable
18698         new optimizations.
18699         (renamed mini_get_opcode_for_method to better reflected the functionality)
18700
18701 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
18702
18703         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
18704
18705 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
18706
18707         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
18708         Fixes #69985.
18709
18710 2004-12-08  Martin Baulig  <martin@ximian.com>
18711
18712         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
18713         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
18714
18715 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
18716
18717         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
18718         correctly.
18719
18720         * exceptions.cs: Disable some tests which depend on properties of x86 fp
18721         arithmetic.
18722
18723 2004-12-08  Raja R Harinath  <rharinath@novell.com>
18724
18725         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
18726
18727 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
18728
18729         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
18730         bug introduced by the previous patch.
18731
18732 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
18733
18734         * mini-ppc.c, objectc.cs: handle large structs passed by value
18735         (fixes bug #69972).
18736
18737 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
18738
18739         * mini-ppc.c: OP_ARGLIST implementation from
18740         Geoff Norton  <gnorton@customerdna.com>.
18741
18742 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
18743
18744         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
18745         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
18746
18747 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
18748
18749         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
18750
18751 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18752
18753         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
18754         support.
18755
18756 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
18757
18758         * mini-sparc.c: Zero out localled-ed memory.
18759
18760         * iltests.il: Add tests for zeroing out localloc-ed memory.
18761
18762 2004-12-04  Martin Baulig  <martin@ximian.com>
18763
18764         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
18765         mono_method_get_signature_full().       
18766
18767 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
18768
18769         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
18770         and some utility functions (always for SSAPRE), integrated SSAPRE.
18771         * mini.h: Likewise.
18772         * driver.c: Added ssapre option.
18773         * ssa.c: Small fix on OP_ARG handling.
18774         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
18775         * Makefile.am: Likewise.
18776
18777 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
18778
18779         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
18780         now in the xp code.
18781
18782         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
18783         icall.
18784
18785 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18786
18787         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
18788         
18789         * cpu-s390.md : Increase instruction length of oparglist.
18790
18791         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
18792
18793 2004-11-30  Martin Baulig  <martin@ximian.com>
18794
18795         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
18796         virtual generic methods.  We call a special helper_compile_generic_method()
18797         icall to retrieve the method from the vtable, inflate and compile
18798         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
18799
18800         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
18801
18802 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
18803
18804         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
18805
18806 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
18807
18808         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
18809         Fixes #69929.
18810
18811 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
18812
18813         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
18814         platforms with PIC aot.
18815
18816 2004-11-28  Martin Baulig  <martin@ximian.com>
18817
18818         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
18819         Fixes gen-112.cs.
18820
18821 2004-11-28  Martin Baulig  <martin@ximian.com>
18822
18823         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
18824         the result of mono_type_get_underlying_type() to check whether
18825         we're byref.
18826
18827 2004-11-26  Martin Baulig  <martin@ximian.com>
18828
18829         * mini.c
18830         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
18831         in the g_assert().
18832
18833 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
18834
18835         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
18836         the same way as the other arguments so they won't get clobbered.
18837
18838         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
18839         calls through R11 since it is clobbered by the trampoline code.
18840
18841 2004-11-26  Raja R Harinath  <rharinath@novell.com>
18842
18843         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
18844         pick up in-tree mscorlib.dll.
18845
18846 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
18847
18848         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
18849
18850         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
18851         runtime data/code are now stored in a table similar to the GOT in ELF. 
18852         This allows the code itself to be position independent.
18853
18854         * aot.c: Fix loading of referenced assemblies after the lazy assembly
18855         loading changes.
18856
18857         * aot.c: Attach ELF type (object/function) directives to all global
18858         symbols.
18859
18860         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
18861
18862         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
18863
18864         * mini-amd64.h: Turn on PIC AOT code.
18865
18866         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
18867         returning the offset within an OP_AOTCONST instruction where the GOT
18868         offset needs to be added.
18869
18870         * mini.h: Bump AOT file format version.
18871
18872 2004-11-25  Martin Baulig  <martin@ximian.com>
18873
18874         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
18875         uninflated generic methods.
18876
18877 2004-11-25  Martin Baulig  <martin@ximian.com>
18878
18879         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
18880
18881 2004-11-24  Martin Baulig  <martin@ximian.com>
18882
18883         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
18884         original klass (this only applies for generic instances).
18885
18886 2004-11-24  Martin Baulig  <martin@ximian.com>
18887
18888         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
18889         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
18890         that array).
18891
18892 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
18893
18894         * mini.c (mono_method_to_ir): Disable inlining for methods containing
18895         localloc. Fixes #69678.
18896
18897         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
18898         
18899 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
18900
18901         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
18902         used SSE registers on pinvoke calls. Fixes #69774.
18903
18904 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
18905
18906         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
18907         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
18908
18909 2004-11-23  Raja R Harinath  <rharinath@novell.com>
18910
18911         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
18912         Refer directly to the mcs/ tree.
18913
18914 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18915
18916         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
18917         Check if a trampoline for a synchronized method is required. 
18918
18919 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
18920
18921         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
18922         with localloc if needed. Throe arithmetric exception in
18923         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
18924         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
18925
18926 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
18927
18928         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
18929         types before switching on type.  Fixes #69622.
18930
18931 2004-11-19  Raja R Harinath  <rharinath@novell.com>
18932
18933         * Makefile.am (check-local): New.  Integrate into 'make check'.
18934         (MCS,RUNTIME): Define using in-tree mono and mcs.
18935         (ILASM): New.
18936         (%.exe): Use $(ILASM).
18937
18938 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
18939
18940         * mini-ppc.c: adjust initial prolog size (bug #69691).
18941
18942 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
18943
18944         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
18945         #69664.
18946
18947 2004-11-17  Raja R Harinath  <rharinath@novell.com>
18948
18949         * Makefile.am (clean-local): Rename from 'clean'.
18950
18951 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18952
18953         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
18954         to mono_arch_is_int_overflow. 
18955         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
18956         SIGFPE events.
18957
18958 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
18959
18960         * declsec.c|h: New files to support declarative security attributes.
18961         Added function to check if a method has (applicable) security.
18962         * mini.c|h: Add check for declarative security attributes in
18963         mono_method_check_inlining.
18964         * Makefile.am: Added declsec.c and declsec.h to the build.
18965
18966 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
18967
18968         * mini.c, mini.h: update to keep dynamic code info per-domain.
18969
18970 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
18971
18972         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
18973         (mini_init): Get rid of it from here too.
18974
18975 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
18976
18977         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
18978         implemented OP_RETHROW (patch by Geoff Norton
18979         <gnorton@customerdna.com>).
18980
18981 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
18982
18983         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
18984         between appdomains.  Fixes appdomain-unload on PPC.
18985
18986 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
18987
18988         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18989         mini-exceptions.c: handle the new wrapper types.
18990         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
18991         token value as a MonoClass* when compiling a wrapper.
18992         mono_jit_create_remoting_trampoline now takes an additional
18993         MonoRemotingTarget parameter.
18994         
18995 2004-11-10  Martin Baulig  <martin@localhost>
18996
18997         * mini.c (mono_method_to_ir): Use `generic_container->context'
18998         rather than creating a new one.
18999
19000 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19001
19002         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
19003
19004         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
19005
19006 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
19007
19008         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
19009         the experimental aot cache stuff.
19010
19011 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
19012
19013         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
19014         mini-exceptions.c: update to exception clause structure changes.
19015
19016 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
19017
19018         * exceptions-x86.c (throw_exception): Fix warnings.
19019
19020         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
19021         for OP_RETHROW.
19022
19023 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
19024
19025         * exceptions-sparc.c (get_throw_exception): Really fix this.
19026
19027 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
19028
19029         * tramp-*.c: we no longer support icalls without wrappers, so
19030         a bit of code can be removed here
19031
19032 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
19033
19034         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
19035         patch.
19036
19037         * cpu-sparc.md: Add op_rethrow.
19038
19039         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
19040
19041         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
19042
19043         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
19044         * mini-ops.h: Add OP_RETHROW.
19045
19046         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
19047
19048         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
19049
19050 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
19051         
19052         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
19053         Makes the output much easier to read
19054
19055 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
19056
19057         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
19058         prevents another huge leak when compiling with ssa. Secondly, the
19059         performance of doing this rather than freeing the lists is much
19060         better. GList does a lock every time you allocate a list link,
19061         so that it can use a memory pool. So, it is better to just use
19062         a memory pool of our own.
19063         
19064         * ssa.c, linear-scan.c: replace g_list_remove_link with
19065         g_list_delete.  The remove one does not free the GList, so we were
19066         leaking memory. On -O=all --compile-all with corlib, this cut down
19067         3 MB of allocations.
19068
19069 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
19070
19071         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
19072
19073         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
19074
19075         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
19076         into a new function mono_create_jit_trampoline ().
19077
19078 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
19079
19080         * trace.c (get_spec): Allow tracing of classes without a namespace.
19081
19082 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
19083
19084         * mini.c: Fix pointer overwrite in mini_method_compile.
19085
19086 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
19087
19088         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
19089         The darwin ABI needs some special handling for 1 and 2 byte structs
19090         Lets use lbz/lhz instead of lwz everywhere.
19091         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
19092         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
19093         Use stb/sth for the former, and put the latter always on stack instead of in
19094         argument registers.
19095
19096 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
19097
19098         * trace.c (is_filenamechar): Add '_'.
19099
19100 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
19101
19102         * mini-s390.c: Fix prolog length to allow for large trace requirements.
19103
19104         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
19105
19106 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
19107
19108         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
19109         depends on libmonogc. Fixes #68805.
19110
19111 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
19112
19113         * mini.c (mono_jit_free_method): Provide extra information for
19114         this error.  Currently this leaks, but will be turned into a
19115         developer option in the future.
19116
19117 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
19118
19119         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
19120
19121 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
19122
19123         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
19124         boundary. Fixes reading of PATCH_INFO_R4 and R8.
19125         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
19126
19127 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
19128
19129         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
19130         trampolines for AOT code.
19131
19132 2004-10-22    <vargaz@freemail.hu>
19133
19134         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
19135         constructed types. Fixes #68136.
19136
19137 2004-10-21  Martin Baulig  <martin@ximian.com>
19138
19139         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
19140         if it returns true, unwind the stack to the call instruction.
19141
19142 2004-10-21    <vargaz@freemail.hu>
19143
19144         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
19145
19146         * mini.h: Bump AOT version number.
19147
19148         * objects.cs: Add another test for unbox trampolines.
19149
19150         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
19151         valuetype methods.
19152
19153 2004-10-20    <vargaz@freemail.hu>
19154
19155         * driver.c: Add SHARED to the set of optimizations tested.
19156
19157         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
19158
19159         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
19160         used by CEE_NEWARR.
19161
19162         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
19163
19164 2004-10-20  Martin Baulig  <martin@ximian.com>
19165
19166         * mini-exceptions.c (mono_handle_exception): Call
19167         mono_debugger_handle_exception() to tell the debugger about
19168         catch/finally clauses.
19169
19170 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
19171
19172         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
19173
19174         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
19175         #68447.
19176
19177 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
19178
19179         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
19180         methods as their native size, fixed bug #57543, #57545.
19181         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
19182         This saves a temporary register and mullw call down into 1 (minor perf
19183         increase for cases like sum = sum * 5;  This use to translate into:
19184             li r11,5
19185             mullw r28,r28,r11
19186         It now translates to
19187             mulli r28,r28,5
19188
19189 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
19190
19191         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
19192         #68388.
19193
19194 2004-10-11  Martin Baulig  <martin@ximian.com>
19195
19196         * mini.c (mono_method_to_ir): If we're a generic method, get the
19197         MonoGenericContainer from our MonoMethodNormal and create a
19198         MonoGenericContext from it.
19199
19200 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
19201
19202         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
19203
19204         * basic-long.cs: Add test for checked i8->i2 cast.
19205
19206 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19207
19208         * inssel-ppc.brg: added a couple of speedup rules.
19209
19210 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
19211
19212         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
19213         to speed up rebuilds.
19214
19215 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19216
19217         * mini-s390.c: Minor fix to OP_OR_IMM.
19218
19219 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
19220
19221         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
19222         better. Fixes appdomain-unload.exe on sparc.
19223
19224 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
19225
19226         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
19227         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
19228         see bug 67324.
19229
19230 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
19231
19232         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
19233
19234 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
19235
19236         * mini.c: Always generate a field read/write wrapper for members
19237         of the class MarshalByRefObject since the actual instance could
19238         be a CBO.
19239
19240 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
19241
19242         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
19243
19244 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
19245
19246         * driver.c mini.h trace.c: Move the setting of the main assembly into
19247         a separate function called mono_trace_set_assembly () and call it after
19248         actually loading the main assembly. Fixes #66872.
19249
19250 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
19251
19252         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
19253         using the code manager.
19254
19255 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
19256
19257         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
19258
19259 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
19260
19261         * cpu-amd64.md: Fix bug in previous patch.
19262         
19263         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
19264         #66650.
19265
19266 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
19267
19268         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
19269         mini-exceptions.c: updates for changed stack walk interface.
19270
19271 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19272
19273         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
19274
19275 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
19276
19277         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
19278
19279 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
19280
19281         * driver.c (mini_regression_list): Do not call mono_assembly_close 
19282         since assemblies can't be unloaded.
19283         
19284 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
19285
19286         * cpu-amd64.md: Fix more instruction lengths.
19287
19288         * cpu-amd64.md: Fix lengths of some instructions.
19289
19290 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
19291
19292         * inssel.brg: Make the array ldelema check aot friendly.
19293
19294 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
19295
19296         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
19297
19298         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
19299
19300 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
19301
19302         * mini-x86.c: Fix build.
19303
19304         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
19305         mono_type_get_underlying_type () helper function to simplify code.
19306         
19307 2004-09-09  Martin Baulig  <martin@ximian.com>
19308
19309         * mini-amd64.c: Don't access `type->data.klass' directly, call
19310         mono_class_from_mono_type() instead since the type may be a
19311         generic instance.
19312
19313 2004-09-09  Martin Baulig  <martin@ximian.com>
19314
19315         * mini-amd64.c (get_call_info): Fix support for generic instances.
19316         (add_valuetype): Use mono_class_from_mono_type() to get the class
19317         since we can be a generic instance.
19318
19319 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
19320
19321         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
19322
19323 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
19324
19325         * liveness.c: reset spill costs on each scan: bug 62107
19326
19327 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
19328
19329         * exceptions-sparc.c (mono_arch_find_jit_info): remove
19330         unnecessary line that doesn't compile
19331
19332 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
19333
19334         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
19335         trampolines, make them call an error function so people can fix their
19336         code.
19337
19338 2004-09-06  Martin Baulig  <martin@ximian.com>
19339
19340         * mini.c (mono_method_to_ir): When initializing locals, handle a
19341         generic instances like a valuetype if it's a valuetype and like a
19342         class if it's a class.
19343
19344 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
19345
19346         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
19347         stack. Fixes #64674.
19348
19349         * exceptions.cs: Add test for unwinding of call arguments.
19350
19351 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
19352
19353         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
19354         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
19355         set the carry/borrow flag). The sparc and s390 implementations
19356         can now use optimized versions (and simplify the code). ppc bugfixes.
19357
19358 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
19359
19360         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
19361
19362 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
19363
19364         * inssel-amd64.brg: Remove leftover 32 bit rule.
19365
19366         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
19367
19368 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
19369
19370         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
19371         mono_arch_find_jit_info functions into a new function. Fix a memory
19372         leak.
19373
19374         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
19375         refactored code.
19376         
19377 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
19378
19379         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
19380         as well.
19381         
19382         * exceptions.cs: Add array size tests.
19383
19384         * mini.c: Allocate a separate icall wrapper for each arity of 
19385         mono_array_new_va. Fixes #59509.
19386
19387         * exceptions.cs: Add testcase for 64578.
19388
19389         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
19390
19391         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
19392         
19393 2004-09-02  Martin Baulig  <martin@ximian.com>
19394
19395         * mini.c (mono_method_to_ir): When initializing the locals, call
19396         handle_initobj() on the generic instance itself, not its
19397         underlying type.
19398
19399 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
19400
19401         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
19402         MonoJitInfo for dynamic methods.
19403
19404         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
19405
19406         * mini.c: Add support for freeing JIT data for dynamic methods.
19407         
19408 2004-09-01  Martin Baulig  <martin@ximian.com>
19409
19410         * mini-x86.c (is_regsize_var): Added support for generic
19411         instances.
19412         (mono_arch_emit_prolog): Make this compile again, use
19413         `x86_push_imm_template (code)'.
19414
19415 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
19416
19417         * mini-x86.c: make all push_imm instructions that get
19418         patched always emit the long form
19419
19420 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
19421
19422         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
19423         in a per-domain hash.
19424
19425         * mini-amd64.c (merge_argument_class_from_type): Handle generic
19426         types.
19427
19428 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
19429
19430         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
19431         work.
19432         
19433         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
19434         work.
19435
19436         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
19437         Beginnings of SSE2 support.
19438
19439         * exceptions.cs: Add more tests for checked int<->uint casts.
19440
19441 2004-08-28  Martin Baulig  <martin@ximian.com>
19442
19443         * mini-x86.c (mono_arch_instrument_epilog): Added support for
19444         generic instances.
19445
19446         * mini.c
19447         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
19448         Handle generic instances recursively.
19449
19450 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
19451
19452         * iltests.il: test for conv.u8 on a constant
19453
19454 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
19455
19456         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
19457         LCONV_x4 (shrun_32 (membase)).
19458
19459 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
19460
19461         * inssel-x86.brg: c&p rules for push/setret of long
19462
19463 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
19464
19465         * inssel-x86.brg: c&p rules for compare (base, regvar) and
19466         compare (regvar, base)
19467
19468         * inssel-x86.brg: more burg love
19469
19470         * inssel.brg: more cleanup
19471
19472         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
19473
19474 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
19475
19476         * basic-long.cs, basic-calls.cs: new tests for optimization.
19477
19478 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
19479
19480         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
19481         patch.
19482
19483 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
19484
19485         * mini-amd64.c (read_tls_offset_from_method): Add another case.
19486         
19487 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
19488
19489         * inssel.brg (mini_emit_memcpy): use 
19490         NO_UNALIGNED_ACCESS to disable memcpy optimization
19491
19492 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
19493
19494         * mini-amd64.c: Handle generic types in various places.
19495
19496         * mini.c (mono_method_to_ir): Handle generic types in init locals.
19497
19498 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
19499
19500         * mini.c (handle_box): Fix warning.
19501
19502         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
19503
19504         * mini-amd64.h: Enable the emit_state optimization.
19505
19506         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
19507
19508         * mini-amd64.c: Add some new 64 bit peephole opts.
19509
19510         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
19511
19512         * cpu-amd64.md: sreg1 of div instructions must be %rax.
19513
19514         * mini-amd64.c: Register allocator fixes.
19515
19516         * mini.c: Add an optimization to emit_state to avoid allocation of new
19517         registers on some platforms.
19518
19519 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
19520
19521         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
19522
19523         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
19524         allocation. Fixes #63085.
19525
19526         * basic-long.cs: Add new regression test.
19527
19528         * mini-amd64.c: Register allocator improvements.
19529
19530 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
19531
19532         * mini-amd64.c (read_tls_offset_from_method): Add another code
19533         sequence.
19534
19535         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
19536         instruction sequence for nullifying class init trampolines.
19537
19538         * objects.cs: Add new regalloc test.
19539
19540         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
19541
19542 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
19543
19544         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
19545         
19546         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
19547         arguments.
19548
19549         * driver.c: Fix profiling after TLS changes.
19550         
19551         * driver.c (mono_main): Set mono_stats.enabled if needed.
19552
19553         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
19554         CEE_BOX.
19555
19556 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
19557
19558         * mini-x86.c: use a 1 op rather than a 2 op tls access
19559         instruction -> faster.
19560
19561 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
19562
19563         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
19564         x86 backend.
19565
19566 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
19567
19568         * exceptions-sparc.c (throw_exception): fix typo
19569
19570 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
19571
19572         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
19573         set tree->dreg correctly with tls. Allow any
19574         register to be used.
19575
19576         * mini-x86.c (read_tls_offset_from_method): add new code
19577         generation pattern seen with GCC.
19578
19579
19580 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
19581
19582         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
19583         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
19584         exceptions-sparc.c: fix some performance issues in exception
19585         handling and setting of the stack trace for exceptions that were
19586         already thrown.
19587
19588 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
19589
19590         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
19591         x86 backend.
19592         
19593         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
19594         registers.
19595
19596 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
19597
19598         This patch inlines tls access, when possible.
19599         
19600         * mini.h: new arch functions for TLS intrinsics.
19601         All platforms updated with a stub.
19602
19603         * mini.c: use the new intrinsics
19604
19605         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
19606         arch specific intrinsic for tls variables
19607
19608 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
19609
19610         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
19611         under windows.
19612
19613 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19614
19615         * mini.c: thread local allocation
19616
19617 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
19618
19619         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
19620
19621         * Makefile.am: Link against the static version of libmonogc.
19622         
19623         * Makefile.am: Link the static versions of the convenience libraries
19624         into the mono executable.
19625
19626         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
19627
19628 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
19629
19630         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
19631         on integer overflow.
19632
19633         * mini-amd64.c: Reorganize function call code.
19634
19635         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
19636
19637 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
19638
19639         * inssel-x86.brg: use xor eax,eax.
19640         
19641         * basic.cs: new tests
19642
19643 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
19644
19645         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
19646         in exception throwing code.
19647         
19648 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
19649
19650         * inssel-x86.brg: use xor esi,esi.
19651
19652 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
19653
19654         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
19655         can trace methods compiled during mini_init () too.
19656
19657         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
19658         CEE_CONV_U4.
19659
19660 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
19661
19662         * Makefile.am: static link on x86 (r=zoltan)
19663
19664 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
19665
19666         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
19667         code since it causes some programs to fail.
19668
19669 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
19670
19671         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
19672
19673 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
19674
19675         * mini.c: ovfops_op_map - add STACK_OBJ case for
19676         CONV_I 
19677         * basic.cs: add test_0_pin_string as test
19678         case for above.
19679
19680 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
19681
19682         * Makefile.am: build C# if srcdir != builddir
19683
19684 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
19685
19686         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
19687         fall-through blocks.
19688
19689 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19690
19691         * driver.c: enable loop by default again and include abcrem in -O=all.
19692
19693 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
19694
19695         * iltests.il: Add some localloc tests.
19696
19697         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
19698
19699         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
19700         Fixes #62574.
19701
19702         * inssel-amd64.brg: Add some optimizations.
19703
19704         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
19705         for gcc-3.4.
19706
19707         * Makefile.am: Statically link mono against libmono on AMD64.
19708         
19709         * mini-amd64.c inssel-amd64.brg: Optimizations.
19710
19711 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
19712
19713         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
19714
19715         * tramp-amd64.c: Patch calling code in trampolines.
19716
19717 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
19718
19719         * mini-amd64.c: pinvoke struct passing fixes.
19720
19721 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
19722
19723         * mini-sparc.c: redo change, make mono_arch_cpu_init call
19724         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
19725
19726 2004-08-05  Duncan Mak  <duncan@ximian.com>
19727
19728         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
19729         CEE_LDELEM_ANY.
19730
19731 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
19732
19733         * mini-amd64.c (emit_move_return_value): Move return value for normal
19734         calls too.
19735
19736 2004-08-05  Martin Baulig  <martin@ximian.com>
19737
19738         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
19739         `type->type'; just modify `type' itself when dealing with enums
19740         and generic instances.
19741         (check_call_signature): Make `simple_type' a `MonoType *'.
19742
19743 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
19744
19745         * mini.c: Use OP_PADD to add offsets to addresses.
19746
19747         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
19748
19749 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
19750
19751         * mini-sparc.c (mono_arch_emit_epilog): fix check
19752         for folding last op into restore instruction
19753
19754 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
19755
19756         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
19757         helper methods using the code manager.
19758         
19759         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
19760
19761         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
19762
19763 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19764         
19765         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
19766           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
19767
19768         * mini-s390.c: fix tail processing
19769
19770 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
19771
19772         * mini-ppc.c: mul.ovf.un exception name fix.
19773
19774 2004-08-03  Martin Baulig  <martin@ximian.com>
19775
19776         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
19777         instances; before jumping to `handle_enum', also modify `ptype'.
19778
19779 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
19780
19781         * cpu-sparc.md: fcall maximal length too small.
19782
19783 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
19784
19785         * mini-amd64.c mini.h: Add initial support for passing/returning 
19786         structures to/from pinvoked methods.
19787
19788 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
19789
19790         * mini-ppc.c: reg allocator fix.
19791
19792 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
19793
19794         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
19795
19796         * inssel.brg: Optimize memset on 64 bit machines.
19797
19798         * mini-amd64.c: Fix some vararg cases.
19799
19800 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19801
19802         * mini-s390.c: Corrected macro in emit_float_to_int
19803
19804         * s390-abi.cs: Tests to exercise the s390 ABI
19805
19806 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
19807
19808         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
19809         caller saved regs.
19810
19811         * basic.cs: Add a test for add.ovf.un.
19812
19813 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
19814
19815         * mini-sparc.c: add case for OP_IDIV_UN
19816
19817 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
19818
19819         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
19820         
19821         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
19822
19823 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
19824
19825         * basic.cs: regression tests.
19826
19827         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
19828         regressions.
19829
19830 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
19831
19832         * basic.cs: Add a new test.
19833
19834         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
19835         and AOT. Various fixes and optimizations.
19836
19837         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
19838
19839 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
19840
19841         * mini-ppc.c: make sure temp regs are not used for global reg
19842         allocation.
19843
19844 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
19845
19846         * cpu-sparc.md: conv_i8 fix for 64bits
19847
19848         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
19849
19850 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
19851         
19852         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
19853         add opcode for cmp BYTE PTR [eax], imm.
19854
19855         * inssel.brg: Make memcpy and memset takes bases.
19856
19857 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
19858
19859         * *-amd64.*: More AMD64 work.
19860         
19861 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
19862
19863         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
19864         add a compare-not-equal opcode.
19865         
19866 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
19867
19868         * mini.c: Use mono_init_from_assembly instead of mono_init.
19869         
19870 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
19871
19872         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
19873
19874         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
19875
19876         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
19877
19878         * inssel.brg: 64 bit fixes.
19879
19880         * mini.h (MonoCallInst): Add some AMD64 specific data.
19881
19882         * mini.h: Add some OP_P opcodes.
19883
19884 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
19885
19886         * basic.cs: tests for 61797 and 61740
19887
19888 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
19889
19890         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
19891         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
19892
19893 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
19894
19895         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
19896
19897         * *-amd64*.*: Ongoing AMD64 work.
19898
19899 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
19900
19901         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
19902
19903         * *-amd64*: Ongoing AMD64 work.
19904
19905         * mini-arch.h: Add AMD64 support.
19906
19907         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
19908
19909         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
19910
19911         * mini-ops.h: Add new opcodes.
19912
19913         * Makefile.am: Add AMD64 support.
19914
19915         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
19916         rules into the inssel-long*.brg files.
19917
19918         * *-amd64.*: Add beginnings of AMD64 backend.
19919
19920 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
19921
19922         * mini.c (print_dfn): commenting out the code that prints
19923         the cil. With -O=deadce, this makes -v -v crash.
19924         
19925         * cpu-pentium.md: make checkthis have a length of 2
19926
19927 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
19928
19929         * mini-sparc.h: fix implementations of __builtin
19930         functions for Sun compiler for V9.
19931
19932 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
19933
19934         * mini.c: use the new stelem.ref wrapper
19935         * exceptions.cs, arrays.cs: new stelem.ref tests
19936
19937 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19938
19939         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
19940         new XSP should work with these changes).
19941
19942 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
19943         
19944         * inssel-{long32,x86,}.brg: trivial optimizations.
19945         
19946 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
19947
19948         * mini.c: load value when emitting box operation in
19949         constrained calls.
19950
19951 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
19952
19953         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
19954         is one byte shorter than cmp DWORD PTR [eax], 0.
19955
19956 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
19957
19958         * inssel-ppc.brg: arguments on the stack are always
19959         relative to the stack pointer (spotted by Neale Ferguson).
19960
19961 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19962
19963         * exceptions-x86.c: delay appending the method name to the trace until
19964         after mono_jit_info_table_find is called, as this gets the real
19965         MonoMethod.
19966
19967 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
19968
19969         * aot.c: register roots
19970
19971 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
19972
19973         * aot.c : I could just use PLATFORM_WIN32 flag.
19974
19975 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
19976
19977         * aot.c : Reverting the previous fix. This time it broke linux build.
19978
19979 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
19980
19981         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
19982
19983 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
19984
19985         * mini.c (handle_stack_args): Remove some more debugging code.
19986         
19987         * mini.c (handle_stack_args): Remove debug output left in by mistake.
19988
19989         * driver.c mini.h aot.c: Allow additional options to be specified with
19990         --aot and pass them to mono_compile_assembly.
19991
19992         * aot.c: Add experimental code to AOT compile all loaded assemblies
19993         on demand and save the code into a cache in the filesystem.
19994
19995         * aot.c: Add support for more wrapper methods.
19996         
19997         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
19998         58863.
19999
20000         * cpu-*.md: Remove removed opcodes.
20001
20002         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
20003         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
20004         related icalls to marshal.c.
20005
20006 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
20007
20008         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
20009
20010         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
20011
20012         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
20013
20014 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
20015         * liveness.c: If liveness is recomputated we need to reset the information
20016         for each variable. This way, if the liveness range has been narrowed
20017         by optimizations that happened after the last computation, we can return
20018         a smaller range.
20019         
20020         For example, if you have
20021         
20022         {
20023                 int i = 0;
20024                 
20025                 // Tons of code that does not affect i
20026                 
20027                 i = foo ();
20028                 ...
20029         }
20030         
20031         i = 0 is dead code and will be removed by SSA. However, when
20032         linear scan gets to the code, i will still appear to be live
20033         throughout the entire block. This prevents good register allocation.
20034
20035 2004-07-06  Martin Baulig  <martin@ximian.com>
20036
20037         * debug-mini.c (mono_debug_init_method): Allow
20038         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
20039         (mono_debug_add_icall_wrapper): New method.
20040
20041         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
20042
20043 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
20044
20045         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
20046         optimization.
20047
20048 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
20049
20050         * aot.c (mono_aot_load_method): Fix loading of debug info.
20051
20052 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
20053
20054         * aot.c: Add logging support.
20055
20056 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
20057
20058         * mini.h: Add prototype for mono_print_method_from_ip.
20059
20060         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
20061
20062         * inssel.brg: 64 bit fixes.
20063
20064         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
20065         inssel-long32.brg.
20066
20067         * Makefile.am: Add SPARC64 support.
20068
20069 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
20070
20071         * aot.c: Fix alignment problems on 32 bit platforms.
20072
20073 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
20074
20075         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
20076         SPARC64.
20077
20078         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
20079         problems.
20080
20081         * mini.h: Bump AOT file version. Some 64 bit fixes.
20082
20083 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
20084
20085         * inssel-sparc.brg: Add new rule to avoid register moves.
20086
20087         * inssel.brg: Add ldind_to_load_membase helper function.
20088
20089 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
20090
20091         * mini.c: OffsetToStringData intrinsic.
20092         
20093 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
20094
20095         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
20096
20097         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
20098         regression tests.
20099
20100         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
20101 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
20102
20103         * mini.c: reinstated mono_compile_get_interface_var()
20104         on x86, too, since the change breaks the Gtk# build there as well.
20105
20106 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20107
20108         * driver.c: remove loop from the default optimizations: it seems to
20109         interact badly with some of the other options (see bug #60613).
20110
20111 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
20112
20113         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
20114         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
20115
20116 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
20117
20118         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
20119         vararg-using methods.
20120
20121 2004-06-21  Martin Baulig  <martin@ximian.com>
20122
20123         * mini/mini-exceptions.c
20124         (mono_handle_exception): Added `gpointer original_ip' argument.
20125         After calling mono_unhandled_exception(), call
20126         mono_debugger_unhandled_exception() and if that returns true,
20127         restore the context and return.
20128
20129 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
20130
20131         * mini-ppc.c: prefer the use of relative branches so
20132         they won't need to be patched in aot code (patch from Patrick Beard).
20133
20134 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
20135
20136         * aot.c: patch from Patrick Beard to make the output assembly
20137         more correct for the MacOSX assembler. Small tweak to
20138         generate sane images on Linux/PPC, too.
20139
20140 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20141
20142         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
20143         case until bug #59509 is fixed (shows up in #60332).
20144
20145 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
20146
20147         * mini.c: make sure the needed wrappers are compiled, too, with
20148         precomp.
20149
20150 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
20151
20152         * driver.c: remove NPTL reference in --version output.
20153
20154 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20155
20156         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
20157         generate valid assembly for the Mach-O assembler.
20158
20159 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
20160
20161         * driver.c: don't include abcrem in the all optimization specifier
20162         since it slows down jit compilation too much for now.
20163
20164 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20165
20166         * mini.c: use BIGMUL only if both operands have the same signage.
20167         * iltests.il: Test for bug 60056. (errors related to signage in
20168         BIGMUL).
20169
20170         r=lupus.
20171
20172 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
20173
20174         * mini.c, aot.c: memory leak fixes.
20175
20176 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
20177
20178         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
20179
20180 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
20181
20182         * Makefile.am: remove the -static hack completely, it links in
20183         statically glib as well.
20184
20185 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
20186
20187         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
20188         * exceptions.cs: make it compile with new mcs/csc.
20189
20190 2004-06-03 Massimiliano Mantione <massi@ximian.com>
20191         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
20192         and added relevant test case.
20193
20194 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
20195
20196         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
20197         regressions in gtk-sharp.
20198
20199 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
20200
20201         * exceptions.cs: New regression tests.
20202
20203         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
20204
20205 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
20206
20207         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
20208
20209 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
20210
20211         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
20212
20213         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
20214
20215 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
20216
20217         * mini.c (mono_jit_runtime_invoke): Init class in this
20218         method instead of trusting mono_jit_compile_method to
20219         do the work (because wrappers can be in object class)
20220
20221 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
20222
20223         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
20224
20225         * basic-long.cs: New regression test.
20226
20227 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
20228
20229         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
20230         and div/rem checks.
20231
20232 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
20233
20234         * Makefile.am: fix miguel's change to build mono statically against
20235         libmono (track build dependencies).
20236
20237 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
20238
20239         * cfold.c: Some glib versions do not have G_MININT32.
20240
20241 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
20242
20243         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
20244         with precision of tan, atan, sin and cos, and implemented related
20245         regressions tests (fixes bug 54467, but one new problem appeared and
20246         is not fixed yet).
20247
20248 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
20249
20250         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
20251
20252         * exceptions.cs: Add test for constant folding && division by zero.
20253
20254         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
20255         since driver.c is in libmono too, so the optimization was useless.
20256
20257         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
20258         variable to driver.c so the compiler can emit more efficient code to
20259         access them.
20260
20261 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20262
20263         * Makefile.am: don't distribute generated inssel.[ch] files.
20264
20265 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
20266
20267         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
20268         into the default appdomain. Fixes #58707.
20269
20270         * jit-icalls.c: Remove the broken approximation for truncl, doing
20271         no conversion is better.
20272
20273         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
20274         Fixes #58863.
20275
20276 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
20277
20278         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
20279         of the mcrxr instruction which is not available on some processors
20280         even if it's documented to be. Implement add and sub overflow correctly
20281         (still not complete for long unsigned). Speed up icalls a bit.
20282
20283 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
20284
20285         * mini.c (mono_jit_compile_method_with_opt): Make sure that
20286         we run .cctor in the current domain instead of target_domain.
20287         
20288         Fixes bug #58558, .cctor not being called in -O=shared.
20289
20290 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
20291
20292         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
20293
20294 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
20295
20296         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
20297         which can be done with an imm8, do it that way.
20298         (mono_arch_output_basic_block): ditto for a jmp
20299         (mono_arch_emit_prolog): Computate maximum offset of a label.
20300
20301 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
20302
20303         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
20304         now tries to allocate prefered physical reg's for virtual
20305         regs. This reduces the number of emited spills/loads with
20306         20-30% on our core assemblies.
20307
20308 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
20309
20310         * jit-icalls.c: truncl() is not needed and trunc() is
20311         the correct thing to do anyway (bug #58287).
20312
20313 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
20314
20315         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
20316         if available.
20317
20318 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
20319
20320         * driver.c: enable loop optimizations by default.
20321
20322 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
20323
20324         * mini-x86.c: fix calc of max loop size when aligning loops start.
20325
20326 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
20327
20328         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
20329         the stack.
20330
20331 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
20332
20333         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
20334         should set carry.
20335
20336         * basic-long.cs: Add tests for add/subtract of immediates with carry.
20337
20338         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
20339         
20340         * mini.c (inline_method): Allways inline some wrappers even if the cost
20341         is too large. Fixes #58785.
20342
20343         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
20344         
20345 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
20346
20347         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
20348         (crichton@gimp.org). Beginning of support for sparc/linux.
20349
20350         * mini-sparc.c: Optimize retrieval of LMF address.
20351
20352 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
20353
20354         * exceptions-ppc.c:  handle alloca in methods with clauses.
20355
20356 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
20357
20358         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
20359
20360 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
20361
20362         * mini.c: Delegate most of the abort signal work to 
20363           mono_thread_request_interruption, which also handles Stop and Suspend
20364           states.
20365
20366 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
20367
20368         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
20369         supports the save/restore lmf opcodes.
20370
20371 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
20372
20373         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
20374         by gcc-3.4 as well.
20375
20376         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
20377
20378 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
20379
20380         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
20381         methods which contain array accesses.
20382
20383         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
20384         boundaries. Fixes #58537.
20385
20386         * iltests.il: Add regression test for #58537.
20387
20388 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
20389
20390         * mini-x86.c (mono_arch_local_regalloc): Last part of
20391         fix for bug #58633 (releasing register to early).
20392
20393 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
20394
20395         * basic-long.cs: Add new regression test.
20396
20397 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
20398
20399         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
20400         register too early on the chain.
20401
20402 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
20403
20404         * mini.c (create_helper_signature): Use a helper function to reduce
20405         the code which needs to be written. Also set the calling convention of
20406         icalls on windows. Fixes #57840.
20407
20408 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
20409
20410         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
20411         exceptions-ppc.c: added helper function to get the instruction address
20412         from a signal handler context.
20413
20414 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
20415
20416         * helpers.c: use g_get_tmp_dir. Invokes happyness 
20417         from gonzalo.
20418
20419 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
20420
20421         * helpers.c: Add new env variable to pass args to objdump.
20422         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
20423
20424 2004-05-17  Radek Doulik  <rodo@ximian.com>
20425
20426         * Makefile.am (common_sources): added abcremoval.h so it get
20427         disted and daily mono packages on go-mono.com will build again
20428
20429 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
20430
20431         * abcremoval.c: Fixed coding style, added copyright header.
20432
20433         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
20434
20435         * mini.h: Added prototype for abc removal main function.
20436
20437         * build_relations_propagation_table.pl: Added copyright header.
20438
20439 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
20440
20441         * basic-long.cs: reg test for complex ceq_long bug.
20442
20443 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
20444
20445         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
20446         reg in long and clob case (bug #58343). Fixed/added comments.
20447
20448 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
20449
20450         * mini.c (mono_jit_runtime_invoke): Follow new convention
20451         of calling the invoke method with an function pointer.
20452
20453 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
20454
20455         * ChangeLog: Fix author of memory leak patch.
20456
20457 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
20458
20459         * Makefile.am: fix make dist as well...
20460
20461
20462 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
20463
20464         * cfold.c: Made so that conversions from pointer to int4 are no-ops
20465         on archs where pointers are 4 bytes long.
20466
20467         * Makefile.am: Added abcremoval.c source file.
20468
20469         * abcremoval.c: Added abcremoval.c.
20470
20471         * abcremoval.h: Added abcremoval.h.
20472
20473         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
20474
20475         * inssel.brg: Enabled bounds check removal.
20476
20477         * mini.c: Added support for abcrem optimization.
20478
20479         * mini.h: Added abcrem optimization label.
20480
20481         * driver.c: Added support for abcrem optimization.
20482
20483         * propagated_relations_table.def: Added propagated_relations_table.def.
20484
20485 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
20486
20487         * mini.c, cfold.c: fix style.
20488
20489 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
20490
20491         * mini.c: handle issue with the low-level implementation of
20492         some long opcodes (bug #54209).
20493
20494 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
20495
20496         * basic.cs: test for my new cmov stuff.
20497
20498 2004-05-13      Patrik Torstensson
20499
20500         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
20501         opt and added peephole documentation.
20502
20503 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
20504
20505         * tramp-ppc.c: rewrote the generic trampoline code.
20506
20507 2004-05-11      Patrik Torstensson
20508
20509         * mini-x86.c: optimize long shl/shr asm code (one less branch)
20510
20511 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
20512
20513         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
20514
20515         * mini.h mini.c dominators.c: Applied patch from Derek Woo
20516         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
20517
20518         * mini.c: Add new icalls for AsAny marshalling.
20519
20520 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
20521
20522         * tramp-ppc.c, mini-ppc.c: more cleanups.
20523
20524 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20525
20526         * mini.c: no warnings.
20527
20528 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20529
20530         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
20531
20532 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
20533
20534         * mini.c: In the thread abort signal handler, if the thread is in the
20535         process of being stoped, don't throw the Abort exception, just stop the
20536         thread.
20537
20538 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
20539
20540         * tramp-ppc.c: removed old code.
20541
20542 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20543
20544         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
20545         do some simple speed optimizations on ppc.
20546
20547 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
20548
20549         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
20550         and large offsets in load/store.
20551
20552 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
20553
20554         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
20555         it causes regressions.
20556
20557 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
20558
20559         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
20560         support.
20561
20562 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
20563
20564         * jit-icalls.c: remove warnings.
20565         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
20566         speedups for unsafe code.
20567
20568 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
20569
20570         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
20571
20572 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
20573
20574         * basic-calls.cs: Add new regression test.
20575
20576         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
20577         more portable.
20578
20579         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
20580
20581         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
20582         is no longer used.
20583
20584 2004-05-06      Patrik Torstensson
20585
20586         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
20587         long reg allocation in any reg (not only eax:edx) and implemented 
20588         long shl/shr ops in asm instead of helpers.
20589
20590 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
20591
20592         * mini-sparc.h: Fix warnings.
20593
20594         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
20595         stack.
20596
20597         * mini-exceptions.c (mono_handle_exception): Call the filter in a
20598         separate statement for clarity.
20599
20600         * mini-sparc.c: Update status.
20601
20602 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
20603
20604         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
20605         here.
20606
20607 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
20608
20609         * inssel-ppc.brg: another small pre-release workaround:
20610         we don't do overflow detection for long_sub_un.
20611
20612 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
20613
20614         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
20615         (also works around a weird ppc bug: 57957).
20616
20617 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
20618
20619         * tramp-ppc.c: trampoline fixes.
20620
20621 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
20622
20623         * mini-ppc.c: fixed typos.
20624
20625 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
20626
20627         * mini-ppc.c, exceptions-ppc.c: more code saves registers
20628         at the top of the stack. Fixed typos. Use a frame registers
20629         for all the methods with exception clauses.
20630
20631 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
20632
20633         * exceptions-ppc.c: restore fp registers.
20634
20635 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
20636
20637         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
20638         order from the stack top (moved the stack room to save the
20639         return value for trace after the param area). Fixed corruption
20640         in restoring registers on unwind.
20641
20642 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
20643
20644         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
20645
20646 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
20647
20648         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
20649         and prolog/epilog for methods that use it. Allow
20650         enough param area room for varargs methods. Fix miguel's
20651         breakage in exception handling.
20652
20653 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
20654
20655         * Makefile.am: run genmdesc only on current arch.
20656
20657 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20658
20659         * exceptions-x86.c:
20660         * mini-x86.h: fix the build on windows.
20661
20662 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
20663
20664         * 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.
20665
20666         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
20667
20668         * mini-exceptions.c: New file.
20669         
20670         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
20671         Move some parts of the x86 exception handling code to an 
20672         arch-independent file so it can be shared with other ports.
20673
20674 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
20675
20676         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
20677
20678 2004-04-26  David Waite  <mass@akuma.org>
20679
20680         * driver.c: remove comma from end of enumeration declaration
20681
20682 2004-04-26  Jackson Harper  <jackson@ximian.com>
20683
20684         * driver.c: parse config file before loading first assembly. This
20685         allows the user gac to be enabled/disabled. 
20686         
20687 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
20688
20689         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
20690         simpler mechanism: we do not care what is encoded initially
20691         (branch absolute or relative), we care about the code and its
20692         target.  I kept the old code for reference for now.
20693
20694         The new code tries first to determine if the jump is anywhere in
20695         the -/+32 absolute meg range, if it succeeds, it encodes using the
20696         absolute branch;  If not, it tried to find something in the
20697         relative range, if not, it uses the handle_thunk code. 
20698
20699 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
20700
20701         * exceptions-ppc.c: use the correct ip register on macosx.
20702
20703 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
20704
20705         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
20706
20707 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
20708
20709         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
20710         Raise exception on integer divide by zero by hand since the hw
20711         doesn't support it. Handle NaNs in FP compares.
20712
20713 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
20714
20715         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
20716         code reducing duplication between the platforms and enabled
20717         signal exception handling (on linux for now).
20718
20719 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
20720
20721         * exceptions-ppc.c: more macosx support.
20722
20723 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20724
20725         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
20726
20727 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
20728
20729         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
20730
20731 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20732
20733         * iltests.il: more tests.
20734
20735 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
20736
20737         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
20738         vars as well.
20739
20740 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
20741
20742         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
20743
20744 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
20745
20746         * liveness.c: Mark variables as volatile in all basic blocks reachable
20747         from exception clauses.
20748
20749 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
20750
20751         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
20752         inlining.
20753
20754 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
20755
20756         * iltests.il, basic.cs: more tests for regalloc.
20757
20758 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
20759
20760         * iltests.il: Some tests for register allocation modifications
20761         I have locally.
20762
20763 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
20764
20765         * exceptions.cs: Add regression test for bug #56782.
20766
20767         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
20768         original stack trace if an exception is rethrown. Fixes #56782. Oh,
20769         the beauty of fixing the same thing in 5 different files...
20770
20771 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
20772
20773         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
20774         methods.
20775
20776 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
20777
20778         * mini.c: Add support for STRWLPARRAY marshalling convention.
20779
20780 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
20781
20782         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
20783         to init the context to setup the regs pointer).
20784
20785 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
20786
20787         * exceptions-ppc.c: more exceptions work.
20788
20789 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
20790
20791         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
20792         not allowed.
20793
20794 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
20795
20796         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
20797         can use the memory directly.
20798
20799         * cpu-pentium.md: Update documentation from a post from Zoltan. 
20800
20801         add x86_add_membase, x86_sub_membase, x86_mul_membase
20802
20803 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
20804
20805         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
20806         GENERAL_REGS they were also hardcoded for all PPC ports.
20807
20808         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
20809
20810         Remove hard-coded limit for floating point registers, use
20811         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
20812
20813         Notice that in MacOS X calling conventions you can fit a lot more
20814         floating point values in registers, so I should update the PInvoke
20815         test to excercise the passing of floating point values on the
20816         stack (currently broken).
20817         
20818 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
20819
20820         * tramp-ppc.c (create_trampoline_code): Added
20821         JUMP_TRAMPOLINE_SIZE. 
20822         (ppc_magic_trampoline): Follow the pattern from
20823         x86_magic_trampoline: if code is set to zero, return. 
20824         (create_trampoline_code): Always pass MonoMethod to the jump
20825         trampoline, before it was passing a null.
20826         (mono_arch_create_jump_trampoline): Implement the jump stub, could
20827         share the code with mono_arch_create_jit_trampoline. 
20828
20829         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
20830         implemented.
20831         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
20832         implemented.  
20833
20834         * cpu-g4.md: Added length for jmp instruction, the worst case
20835         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
20836         for save_lmf).
20837
20838 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
20839
20840         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
20841
20842 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
20843
20844         * mini.c: Only set bblock->real_offset when adding a new bblock, and
20845         before each IL instruction.
20846
20847         * mini.c (CEE_BOX): Fix warnings.
20848
20849 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20850
20851         * mini.c: removed a few unused vars and extra whitespace.
20852
20853 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
20854
20855         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
20856         checks.
20857         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
20858         index.
20859         (OP_GETCHR): use the above
20860         (CEE_LDELEMA): use the above.
20861
20862         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
20863         version of the generic impl.
20864         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
20865         (CEE_LDELEMA): use the above.
20866
20867 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
20868
20869         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
20870         Fixes #56317.
20871
20872         * iltests.il: Added new regression test for #56317.
20873
20874 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
20875
20876         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
20877         under NetBSD. Fixes #56450.
20878
20879         * liveness.c (update_gen_kill_set): Fix previous patch.
20880
20881 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20882
20883         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
20884
20885 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
20886
20887         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
20888         ldsfld and ldsflda.
20889
20890         * inssel-sparc.brg: Add more optimizations.
20891
20892         * mini-sparc.c: Replace multiply/divide with shifts if possible.
20893
20894 2004-04-01  Martin Baulig  <martin@ximian.com>
20895
20896         * mini.c (handle_box): New static function; moved the
20897         implementation of CEE_BOX here.
20898         (mono_method_to_ir): Added `constrained_call' variable.
20899         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
20900         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
20901         mono_method_get_constrained() to get the method.
20902
20903 2004-04-01  Martin Baulig  <martin@ximian.com>
20904
20905         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
20906         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
20907         (mono_method_to_ir): We don't need these macros anymore since
20908         mono_class_get_full() already takes care of it. 
20909
20910 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20911
20912         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
20913         use @function (as doesn't accept #function here) and check the return
20914         value of system and stop if fails.
20915
20916 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20917
20918         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
20919
20920 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
20921
20922         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
20923
20924         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
20925
20926         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
20927         #56223.
20928
20929         * basic-long.cs: Add test for negation of Int64.MinValue.
20930
20931 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
20932
20933         * mini-sparc.c: Update status.
20934
20935         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
20936
20937         * exceptions-sparc.c: Fix return value in filters.
20938
20939         * inssel-sparc.brg: Fix register allocation in some rules.
20940
20941 2004-03-28  Martin Baulig  <martin@ximian.com>
20942
20943         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
20944         if neccessary.  
20945
20946 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
20947
20948         * mini-x86.c (mono_arch_patch_code): Fix warnings.
20949         
20950         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
20951         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
20952         remove unused conv_u4 opcode.
20953
20954         * mini-x86.c: Remove valgrind workaround since it slows down things
20955         even when mono is not run under valgrind.
20956
20957 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
20958
20959         * mini-sparc.c: Update status.
20960
20961         * inssel-sparc.brg: Add some optimizations.
20962
20963         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
20964         future delay slot filling. Add support for varargs, tail calls and JMP.
20965
20966         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
20967         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
20968
20969         * inssel.brg: Fix register allocation in OP_ARGLIST.
20970
20971         * inssel.brg: Fix warnings.
20972
20973 2004-03-25  Martin Baulig  <martin@ximian.com>
20974
20975         * mini.c (inflate_generic_field): Removed.
20976         (mini_get_method): Removed, use mono_get_method_full(),
20977         (mini_get_class): Removed, use mono_class_get_full().
20978         (mono_method_to_ir): Pass our generic context to
20979         mono_field_from_token().        
20980
20981 2004-03-25  Martin Baulig  <martin@ximian.com>
20982
20983         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
20984         of a `MonoMethod *'.
20985         (mini_get_method): Take a `MonoGenericContext *' instead
20986         of a `MonoMethod *'.
20987         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
20988         a new local variable called `generic_context' which holds the
20989         current `MonoGenericContext *'; use it to lookup things.
20990
20991 2004-03-24  Martin Baulig  <martin@ximian.com>
20992
20993         * mini.c (mini_get_class): New static method; if we're inside a
20994         generic instance, inflate the class if neccessary.
20995         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
20996
20997 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
20998
20999         * iltests.il: New regression test for #55976.
21000
21001         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
21002         #55976.
21003
21004 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
21005
21006         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
21007         output.
21008
21009 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
21010
21011         * liveness.c: Consider SSA stores as well as loads when making vars
21012         volatile.
21013
21014         * exceptions.cs: New regression tests for register allocation.
21015         
21016 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
21017
21018         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
21019         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
21020           domain lock only to protect puntual access to data structures.
21021           Added access lock for sighash, jit_icall_hash_name, 
21022           jit_icall_hash_addr and domain->code_mp.
21023
21024 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
21025
21026         * driver.c: Print SIGSEGV handling method.
21027
21028         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
21029
21030         * mini.c (setup_jit_tls_data): Handle case when this is called
21031         multiple times for a thread.
21032
21033         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
21034         is different from fbxx_un. Fixes #54303. Also use constants instead of
21035         magic numbers in a lot of places.
21036
21037 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
21038
21039         * exceptions.cs: Fix cctor test when --regression is used.
21040
21041 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
21042
21043         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
21044         for Linux/ppc.
21045
21046 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
21047
21048         * inssel-ppc.brg: fixed register assignments for some rules.
21049
21050 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
21051
21052         * exceptions.cs: Add test for exceptions in static constructors.
21053
21054         * mini.c (mono_jit_compile_method_with_out): Move the calling of
21055         static constructors outside the domain lock. Fixes #55720.
21056
21057 2004-03-17  Martin Baulig  <martin@ximian.com>
21058
21059         * mini.c (get_generic_field_inst): Removed, this'll never happen.
21060         (inflate_generic_field): Take the `MonoMethod *' instead of the
21061         `MonoClass *' and added support for generic method.
21062         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
21063         have a `field->parent->gen_params', only inflate the field if it's
21064         an open constructed type.
21065
21066 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
21067
21068         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
21069         exception object instead of the preconstructed ones.
21070
21071 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21072
21073         * mini.c: reverted changed to sigsegv_signal_handler commited
21074         accidentally in the previous patch.
21075
21076 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21077
21078         * mini.c:
21079         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
21080         running --aot with an old assembly.
21081
21082 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
21083
21084         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
21085         point values.
21086
21087         * mini-sparc.c: Add support for v9 branches with prediction.
21088
21089 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
21090
21091         * mini.c (mini_init): #warning is GNUC only
21092
21093         * mini-sparc.h: implement __builtin_frame_address
21094         and __builtin_return_address for Sun C compiler
21095
21096 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
21097
21098         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
21099
21100 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
21101
21102         * basic-calls.cs: Add test for unaligned byref long argument passing.
21103
21104         * mini-ops.h: Add sparcv9 compare and branch instructions.
21105
21106         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
21107         v9 instructions if we have a v9 cpu.
21108
21109         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
21110         registers for global allocation.
21111
21112         * exceptions-sparc.c: Fixes.
21113         
21114 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
21115
21116         * liveness.c (mono_analyze_liveness): Optimized version.
21117
21118         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
21119
21120         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
21121         sparc work.
21122
21123         * basic-float.cs basic-calls.cs: New regression tests.
21124
21125 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
21126
21127         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
21128         sigaltstack implementation.
21129
21130         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
21131         
21132         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
21133         stuff if SIGSEGV_ON_ALTSTACK is not defined.
21134
21135 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
21136
21137         * mini.c: Fix warnings.
21138         
21139         * mini.c (mono_resolve_patch_target): New function which contains the
21140         arch independent part of the patching process.
21141
21142         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
21143         patching code to a separate function.
21144
21145 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
21146
21147         * mini.c (add_signal_handler): ifdef out on Windows
21148
21149 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
21150
21151         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
21152         cpu-sparc.md: Add exception handling support + other fixes.
21153
21154         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
21155         typed GC detection in --version.
21156
21157         * basic.cs exceptions.cs: New regression tests.
21158
21159         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
21160         the arch specific code can store data during a compilation.
21161
21162         * mini-ops.h: Add OP_SETFRET.
21163
21164         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
21165         function, register a separate icall for each arity, so the icalls can
21166         get a wrapper.
21167         
21168         * mini.c (mono_print_tree): Print negative offsets in a more readable
21169         form.
21170         
21171         * mini.c: Make signal handling work on sparc.
21172         
21173         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
21174
21175         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
21176
21177         * jit-icalls.c: Emulate truncl by aintl on solaris.
21178
21179         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
21180
21181 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
21182
21183         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
21184
21185 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
21186
21187         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
21188         a MarshalByRef type, inline a method that performs the check, taking into
21189         account that the object can be a proxy. Also implemented tow new opcodes:
21190         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
21191         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
21192         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
21193
21194 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
21195
21196         * mini-ppc.c: if a relative branch displacement is too big
21197         but it points to and area reachable with an absolute branch, 
21198         avoid the thunks.
21199
21200 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
21201
21202         * mini.c: optimize small copies in cpblk.
21203
21204 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
21205
21206         * basic-calls.cs basic-float.cs: New regression tests.
21207
21208         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
21209         negative offsets from %fp. Implement localloc. Fix local register 
21210         allocation. Fix the case when the this argument needs to be saved to
21211         the stack. Implement some missing opcodes.
21212
21213 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
21214
21215         * mini.c (mini_method_compile): Reenable global regalloc in methods
21216         with exception handlers.
21217
21218         * linear-scan.c (mono_varlist_sort): Fix warning.
21219
21220         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
21221
21222         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
21223         regalloc costs.
21224
21225         * liveness.c: Make all variables uses in exception clauses volatile, to
21226         prevent them from being allocated to registers. Fixes #42136.
21227
21228 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
21229
21230         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
21231         causes regressions.
21232
21233         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
21234         argument to mono_arch_regalloc_cost.
21235
21236         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
21237         precisely.
21238
21239 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
21240
21241         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
21242         Make the cost of allocating a variable to a register arch dependent.
21243
21244         * basic-calls.cs: Fix compilation of tests.
21245         
21246         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
21247         helper function to cut back on the number of #ifdefs needed.
21248
21249         * mini-ppc.c: Fix compilation.
21250
21251         * basic-calls.cs: New regression tests.
21252
21253         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
21254
21255         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
21256         of l0 since that is callee saved.
21257
21258         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
21259         to virtual calls.
21260
21261         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
21262         of delay instruction.
21263
21264         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
21265
21266         * mini.h (MonoCallInst): Add 'virtual' flag.
21267
21268         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
21269
21270 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
21271
21272         * *.cs: New regression tests.
21273
21274         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
21275         work.
21276
21277         * mini.c (mono_runtime_install_handlers): Fix build.
21278
21279         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
21280         'signal_stack_size' members.
21281
21282         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
21283         alternate signal stack.
21284
21285         * exceptions-x86.c: Add stack overflow handling.
21286
21287         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
21288         functions to arch independent code.
21289
21290         * mini.c (mono_print_tree): Print more detailed info for load_membase
21291         opcodes.
21292         
21293 2004-02-23  Martin Baulig  <martin@ximian.com>
21294
21295         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
21296
21297 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
21298
21299         * mini-x86.c: fixed reg allocation for div/rem.
21300
21301 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
21302
21303         * driver.c (mono_main): Report some configuratio options on --version.
21304
21305 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
21306
21307         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
21308         low in the address space. Correctly flush memory in thunks where we
21309         output native code.
21310
21311 2004-02-20  Martin Baulig  <martin@ximian.com>
21312
21313         * mini.c (mini_get_method): New static method; inflate all generic
21314         methods and methods in open generic instances.
21315         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
21316         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
21317
21318 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
21319
21320         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
21321
21322         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
21323
21324 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
21325
21326         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
21327
21328         * mini-sparc.c (flushi mono_arch_output_basic_block): make
21329         it compile using Sun's compiler.
21330
21331 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
21332
21333         * 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.
21334
21335         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
21336
21337 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
21338
21339         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
21340         code.
21341         * mini-ppc.c: handle calls outside of the allowed range with thunks
21342         allocated using the code manager.
21343         * tramp-ppc.c: use the code manager to hold generated native code.
21344         Fixed the magic trampoline to just patch vtable entries.
21345
21346 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
21347
21348         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
21349         independent file.
21350
21351 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
21352
21353         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
21354         PPC.
21355
21356         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
21357         if we have a working __thread implementation.
21358
21359         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
21360         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
21361
21362 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
21363
21364         * mini-x86.c: Fix compilation under gcc 2.
21365         
21366 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
21367
21368         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
21369         contains a call to the wrapped function.
21370
21371         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
21372         OP_<CALL>_IMM opcodes, and use them under X86.
21373         
21374         * mini.c (mono_jit_find_compiled_method): Fix warning.
21375
21376         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
21377
21378         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
21379
21380         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
21381         functionality to mini.c.
21382
21383         * mini.c (mono_create_jump_trampoline): New function to create a jump
21384         trampoline. Return a compiled method instead of a trampoline if it
21385         exists. Add a cache for jump trampolines.
21386
21387         * mini.c (mono_jit_find_compiled_method): New function to return a
21388         compiled method if it exists.
21389
21390         * mini-x86.c: Call mono_create_jump_trampoline instead of 
21391         mono_arch_create_jit_trampoline.
21392
21393         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
21394         a jump trampoline. Fixes #52092.
21395         
21396 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
21397
21398         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
21399         which is not up-to-date. Add check_corlib_version () instead.
21400
21401         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
21402         have to call it.
21403         
21404         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
21405         since newer valgrind versions do not need it.
21406
21407         * mini.c (mono_jit_compile_method_with_opt): New helper function to
21408         compile a method with a given set of optimizations.
21409
21410         * mini.c: Compile icall wrappers on-demand instead of at startup.
21411
21412         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
21413         wrapper for an icall.
21414
21415 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
21416
21417         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
21418         #54063.
21419
21420         * iltests.il: Add test for non-empty stack before switch instruction.
21421
21422 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
21423
21424         * mini.c: Add support for new stringbuilder marshalling conventions.
21425
21426         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
21427
21428 2004-02-01  Martin Baulig  <martin@ximian.com>
21429
21430         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
21431         in `ginst->mtype_argv'.
21432
21433 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
21434
21435         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
21436         facilitate grepping.
21437
21438 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
21439
21440         * mini.c: fixed buglet in initobj generic implementation for references.
21441
21442 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
21443
21444         * Makefile.am: make the version script conditional.
21445         * jit-icalls.c: handle missing truncl().
21446
21447 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
21448
21449         * exceptions.cs: Add more tests for double->int conversion.
21450
21451         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
21452         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
21453
21454 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
21455
21456         * driver.c: make --verbose --version emit an error
21457         if the loaded corlib doesn't match the runtime version.
21458
21459 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
21460
21461         * mini-ppc.h: export ppc_patch().
21462         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
21463         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
21464         on par or better than on MacOSX.
21465
21466 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
21467
21468         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
21469         mono_lookup_pinvoke_call.
21470
21471         * mini-x86.c: Under windows, the default pinvoke calling convention is
21472         stdcall. Fixes #52834.
21473
21474         * mini.c (optimize_branches): Add an upper bound to the number of
21475         iterations to prevent infinite loops on strange loops. Fixes #53003.
21476
21477 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
21478
21479         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
21480         and ISINST. Fixes #52093.
21481
21482         * objects.cs (test_0_vector_array_cast): New tests.
21483         
21484 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
21485
21486         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
21487         checking in Array.Set ().
21488
21489         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
21490         #52590.
21491
21492         * object.cs (test_0_multi_array_cast): New regression test.
21493
21494 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
21495
21496         * exceptions-ppc.c: fix build on Linux/PPC.
21497
21498 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
21499
21500         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
21501         running under valgrind.
21502         (x86_magic_trampoline): Fix build bustage.
21503
21504         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
21505         negative values as well. This is needed for the encoding of the line number
21506         info, since sometimes the line numbers are not in increasing order.
21507
21508 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
21509
21510         * cpu-pentium.md (localloc): Increase the size of the localloc 
21511         instruction since it is a loop under Win32.
21512
21513         * debug-mini.c (record_line_number): Get rid of unneccesary memory
21514         allocation.
21515
21516 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
21517
21518         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
21519         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
21520         Max Horn (max@quendi.de). Fix file names in comments.
21521
21522 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
21523
21524         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
21525         avoid stack overflow.
21526         (replace_usage): Avoid uninitialized variable warnings.
21527
21528         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
21529         and taking the address of valuetype variables.
21530
21531 2004-01-03  Patrik Torstensson
21532
21533         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
21534         for other purposes than FP later on.
21535
21536 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
21537
21538         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
21539         of tail calls.
21540
21541 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
21542
21543         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
21544
21545 2003-12-30  Patrik Torstensson <p@rxc.se>
21546
21547         * mini-x86.h: Decreased number of availiable fp regs.
21548         Solves corner cases with FP spilling.
21549
21550 2003-12-23  Patrik Torstensson <p@rxc.se>
21551
21552         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
21553         for floating point stack tracking / spilling on x86. 
21554         Fixes bug #49012.
21555         
21556         * basic-float.cs: added float mul overflow test.
21557
21558 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
21559
21560         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
21561
21562 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
21563
21564         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
21565         supports for cond branches that overflow the immediate
21566         overflow offset. mcs can compile simple programs.
21567
21568 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
21569
21570         * exceptions-ppc.c: exception handling support wip:
21571         finally handlers get run on exception.
21572
21573 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
21574
21575         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
21576         profiling.
21577
21578 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
21579
21580         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
21581         initial support for stack walking and unwinding.
21582
21583 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
21584
21585         * driver.c (mono_main): Make corlib-out-of-sync message more 
21586         descriptive. Also remove verify_corlib call.
21587
21588 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
21589
21590         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
21591         not overlap with other call's arguments, too.
21592
21593 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
21594
21595         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
21596         move to arch-specific code the choice of arch-specific
21597         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
21598         * mini.c: ensure emulation calls will not interleave
21599         with other calls.
21600
21601 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
21602
21603         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
21604         the magic trampoline stack frame is dropped before executing
21605         the new method.
21606
21607 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
21608
21609         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
21610         and integer to fp conversions. Added support for overflowing
21611         arguments on the stack. Reserve a couple more registers as temps.
21612         Added support for aot compilation (as output still needs to be
21613         tweaked, though).
21614
21615 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
21616
21617         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
21618         Don't overwrite return register in some corner cases.
21619
21620 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
21621
21622         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
21623         static constructors when AOT compiling.
21624
21625         * driver.c (mono_main): Call mono_check_corlib_version.
21626
21627 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
21628
21629         * cpu-g4.md, basic.cs: fixed div target register.
21630
21631 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
21632
21633         * mini-ppc.c, basic.cs: shl_imm fix with test.
21634
21635 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
21636
21637         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
21638         structures by value. Misc fixes.
21639         * objects.cs: more tests.
21640
21641 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
21642
21643         * mini-ppc.c: lconv.ovf.i implemented.
21644
21645 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21646
21647         * mini.c:
21648         (mini_init): don't error out if someone already called g_thread_init.
21649
21650 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
21651
21652         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
21653         to be any type per the spec. Fix abnormal memory usage when
21654         the same object is repeatedly thrown.
21655
21656 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
21657
21658         * mini.c: check for overruns in IL code.
21659
21660 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
21661
21662         * TODO: Add/remove some todo entries.
21663
21664 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
21665
21666         * driver.c (mono_main): Call mono_verify_corlib.
21667
21668 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
21669
21670         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
21671         This has been moved to mini.c
21672         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
21673         type being casted is marshalbyref it could be a proxy, so instead of
21674         emitting the type check code, emit a call to a runtime method that will
21675         perform the check by calling CanCastTo if needed.
21676
21677 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
21678
21679         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
21680         methods with large stack frames under Win32.
21681
21682 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
21683
21684         * Makefile.am: Distribute regression tests.
21685
21686         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
21687         at the end instead of inserting each variable into the sorted list.
21688
21689         * linear-scan.c (mono_varlist_sort): New helper function.
21690         
21691 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
21692
21693         * mini.c: ensure arguments and locals are within bounds.
21694
21695 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
21696
21697         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
21698         related fixes.
21699
21700 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
21701
21702         * mini.c (mono_cprop_copy_values): Fix crash.
21703
21704         * aot.c: Set verbosity back to 0.
21705         
21706 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
21707
21708         * regalloc.c: complete memory leak fix by Laurent Morichetti
21709         (l_m@pacbell.net).
21710
21711 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
21712
21713         * driver.c (main_thread_handler): Revert the previous patch.
21714
21715         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
21716         under valgrind.
21717
21718         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
21719         memory from the memory pool.
21720
21721         * driver.c (main_thread_handler): Turn on all optimizations when
21722         --aot is used.
21723
21724         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
21725         an array for better performance.
21726
21727         * regalloc.c (mono_regstate_assign): Fix memory leak.
21728
21729         * debug-mini.c (mono_debug_serialize_debug_info): New function to
21730         serialize the debug info.
21731
21732         * debug-mini.c (mono_debug_add_aot_method): New function to load the
21733         debug info from the serialized representation.
21734
21735         * aot.c: Save debug info into the generated file and load it when 
21736         loading a method.
21737
21738         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
21739
21740 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
21741
21742         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
21743         More FP-related fixes.
21744
21745 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
21746
21747         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
21748         and register allocation buglet. Hello world now runs.
21749
21750 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
21751
21752         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
21753         * tramp-ppc.c: fixed class init trampoline.
21754         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
21755
21756 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
21757
21758         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
21759         mini.c: more ppc changes/fixes.
21760
21761 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
21762
21763         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
21764         Also optimize the case when the arguments are the same in the caller 
21765         and in the callee.
21766
21767         * iltests.il: Add tests for tail calls with valuetype arguments.
21768
21769 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
21770
21771         * mini-ppc.c: fixes for struct return type.
21772
21773 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
21774
21775         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
21776         mono_spillvar_offset() to arch-specific code.
21777
21778 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
21779
21780         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
21781
21782 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
21783
21784         * exceptions-x86.c: Fix stack space leaks.
21785         
21786         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
21787         registers from the lmf if the method has save_lmf set.
21788
21789 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
21790
21791         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
21792         of icall wrappers into InvokeInDomain, since these are now per-domain.
21793
21794 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
21795
21796         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
21797         make some opcode emulation and intrinsic ops enabled/disabled 
21798         according to the architecture. More fixes.
21799
21800 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
21801
21802         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
21803
21804 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
21805
21806         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
21807         arch-specific handling for 'this' and struct return type to
21808         arch-specific code.
21809
21810 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21811
21812         * aot.c: prevent divide by zero error when reporting (it happened with
21813         Accessibility.dll).
21814
21815 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
21816
21817         * mini.h (inst_switch): Remove unused macro.
21818
21819 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21820
21821         * aot.c:
21822         (load_aot_module): free 'info->methods' and 'info' properly. No more
21823         "free(): invalid pointer blah" messages when you have an old aot
21824         compiled assembly.
21825
21826 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
21827
21828         * jit-icalls.c, mini.c: Added support for context static fields.
21829
21830 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
21831
21832         * mini.c (mono_method_blittable): Methods which set LastError are not 
21833         blittable either. Fixes #51108.
21834         
21835 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
21836
21837         * mini.c: flush icache.
21838         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
21839
21840 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
21841
21842         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
21843
21844 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
21845
21846         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
21847         safe on IA32.
21848
21849         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
21850         vararg calls.
21851
21852         * inssel.brg (CEE_MKREFANY): Fix AOT case.
21853
21854 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
21855
21856         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
21857         instruction when the result is discarded.
21858
21859         * iltests.il (test_0_div_regalloc): New regression test.
21860
21861         * arrays.cs: Fix compilation error.
21862
21863 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
21864
21865         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
21866         float rules to inssel-x86.brg: sane architectures with FP registers
21867         don't need to implement these rules.
21868
21869 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
21870
21871         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
21872
21873 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
21874
21875         * mini.h, inssel-long32.brg: fixed endianess issues in int64
21876         implementation of 32 bit systems.
21877
21878 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
21879
21880         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
21881         (Jeroen Zwartepoorte).
21882
21883 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
21884
21885         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
21886         the caller and the callee matches.
21887         
21888         * mini.c (mono_method_to_ir): Add comment.
21889
21890         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
21891         signbit is missing on some platforms.
21892
21893 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
21894
21895         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
21896
21897         * mini.c (setup_jit_tls_data): Call the new function.
21898         
21899         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
21900
21901         * mini-x86.c: Add experimental support for fast access to the lmf
21902         structure under NPTL/Linux 2.6.x.
21903
21904 2003-11-06  Martin Baulig  <martin@ximian.com>
21905
21906         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
21907         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
21908         the debugger.
21909
21910 2003-11-02  Martin Baulig  <martin@ximian.com>
21911
21912         * mini.c (inflate_generic_field): New static method.
21913         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
21914         generic instance and the field is declared in a generic type, call
21915         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
21916
21917 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
21918
21919         * mini.h mini.c (mono_method_same_domain): New function to return
21920         whenever the caller and the callee are in the same domain.
21921
21922         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
21923
21924 2003-10-30  Martin Baulig  <martin@ximian.com>
21925
21926         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
21927         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
21928         method parameters.
21929         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
21930         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
21931
21932 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
21933
21934         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
21935         propagation.
21936
21937         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
21938         object here, so it is in the correct appdomain etc.
21939
21940 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
21941
21942         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
21943         already done.
21944         (mono_method_to_ir): Avoid freeing the type created returned from
21945         mono_type_create_from_typespec, since it is put into an internal cache
21946         by the function. Fixes pointer.exe.
21947
21948         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
21949         trampolines for icalls and pinvokes as well. Fixes #33569.
21950
21951 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
21952
21953         * mini.c: Update after appdomain changes.
21954
21955         * mini.c (mono_jit_compile_method_inner): Allways compile native
21956         method wrappers in the root domain, since there can only be one
21957         instance of them, whose address is stored in method->info.
21958
21959 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
21960
21961         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
21962         environment variable. Instead detect automatically whenever running
21963         under valgrind using the magic macro RUNNING_ON_VALGRIND from
21964         valgrind.h.
21965
21966 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
21967
21968         * trace.c, trace.h: New files that implement the new trace option
21969         parsing. 
21970
21971         * driver.c: Document new --trace options.
21972
21973         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
21974         mini-x86.c: Apply:
21975
21976         -       if (mono_jit_trace_calls)
21977         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
21978
21979         * mini.h: prototypes.
21980         
21981 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
21982
21983         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
21984
21985         * mini.c inssel.brg: Implement typedefbyref opcodes.
21986
21987         * mini.c (mono_jit_compile_method): Remove unused local variable.
21988
21989         * mini.c (mono_jit_compile_method_inner): Ditto.
21990         
21991 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
21992
21993         * tramp-x86.c (x86_class_init_trampoline): Fix build.
21994         
21995         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
21996
21997 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
21998
21999         * mini.c (mono_no_aot): Remove unused global variable.
22000
22001         * mini.c: Thread safety fixes.
22002
22003 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
22004
22005         * mini.c (mono_create_class_init_trampoline): Add a lock around
22006         class_init_hash_addr.
22007
22008         * arrays.cs (test_0_newarr_emulation): Add new regression test for
22009         #30073.
22010
22011         * mini.c: Decompose the NEWARR instruction before decomposing its
22012         arguments. Fixes #30073.
22013
22014 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
22015
22016         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
22017         convention.
22018
22019 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
22020
22021         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
22022
22023         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
22024
22025         * driver.c: Add support for compiling icall wrappers to --compile.
22026
22027 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
22028
22029         * inssel.brg: The empty value in class->interface_offsets is -1, not
22030         0. Fixes #49287.
22031
22032 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
22033
22034         * objects.cs: New test for 'is' operator on an array of interfaces.
22035
22036 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22037
22038         * tramp-ppc.c: update trampoline code to support jumps
22039         and class initialization.
22040
22041 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
22042
22043         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
22044
22045         * inssel.brg (OP_UNBOXCAST): Fix #46027.
22046
22047         * inssel.brg (OP_UNBOX): Remove unused rule.
22048
22049         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
22050         region instead of one for each method. Fixes #47813.
22051
22052 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
22053
22054         * exceptions.cs (test_0_nested_finally): New regression test for
22055         nested exception handlers.
22056
22057         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
22058
22059         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
22060
22061         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
22062         inlining.
22063
22064         * mini.c (mono_method_check_inlining): Make the inlining limit 
22065         configurable by an environment variable.
22066         
22067         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
22068
22069         * mini.h: Bump AOT file version.
22070
22071         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
22072         token, store the image along with the token, since the token might not 
22073         refer to the same image as the method containing the relocation, 
22074         because of inlining.
22075
22076 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
22077
22078         * mini.c (mono_precompile_assemblies): New function to compile
22079         all methods in all loaded assemblies.
22080
22081         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
22082
22083         * regalloc.h regalloc.c (MonoRegState): Change the type of 
22084         iassign and fassign to int*, since they can contain large negative
22085         values if the register is spilled. Also added some comments. Fixes
22086         #45817.
22087
22088         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
22089         under Win32. Fixes #42964.
22090
22091 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
22092
22093         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
22094
22095         * aot.c: Added support for AOT compiling methods which contain calls
22096         to wrappers. Currently, only remoting-invoke-with-check wrappers are
22097         handled.
22098         
22099         * driver.c (compile_all_methods): Run the compilation in a thread
22100         managed by mono. Fixes #44023.
22101
22102         * mini.c (mono_codegen): Print full method name in verbose output.
22103
22104         * mini-x86.c (mono_arch_patch_code): Fix warning.
22105         
22106         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
22107         jumps, since the method we are jumping to might be domain-specific.
22108
22109         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
22110
22111 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
22112
22113         * inssel.brg: string chars are unsigned.
22114
22115 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
22116
22117         * TODO: New todo item.
22118
22119         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
22120         which calls mono_runtime_class_init and patches the call site to
22121         avoid further calls.
22122         (mono_arch_create_class_init_trampoline): New arch specific function 
22123         to create a class init trampoline.
22124         (create_trampoline_code): Generalized so it can create
22125         class init trampolines as well.
22126
22127         * mini.c (helper_sig_class_init_trampoline): New helper variable.
22128         (mono_create_class_init_trampoline): New function to create and cache
22129         class init trampolines.
22130         (mono_find_class_init_trampoline_by_addr): New function to lookup the
22131         vtable given the address of a class init trampoline. Used by the
22132         patching process.
22133         (mono_codegen): Generate a call to a trampoline instead of
22134         mono_runtime_class_init in LDSFLD[A].
22135         (mono_codegen): Add relocations for the new trampoline.
22136         
22137         * mini.h mini-x86.c aot.c: Added a new relocation type: 
22138         MONO_PATCH_INFO_CLASS_INIT.
22139
22140         * mini.h: Bump AOT version number.
22141
22142         * aot.c: Create a copy of the loaded code instead of using the original
22143         so methods which call each other will be close in memory, improving
22144         cache behaviour.
22145         
22146         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
22147         patch since it breaks the regression tests.
22148         
22149         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
22150         for the register saving instruction sequence since the 
22151         frame_state_for function in glibc 2.3.2 don't seem to detect it.
22152
22153 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
22154
22155         * TODO: Fix todo item && remove another.
22156
22157 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
22158
22159         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
22160         previous checkin.
22161
22162         * aot.c: Moved the check for MONO_LASTAOT into the initialization
22163         function of the module.
22164
22165         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
22166         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
22167         --no-aot command line option.
22168
22169 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
22170
22171         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
22172         by Bernie Solomon (bernard@ugsolutions.com).
22173
22174         * inssel.brg: Refactor the interface offset table related code into
22175         its separate functions and add support for the AOT case.
22176
22177 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
22178
22179         * aot.c (mono_aot_get_method_inner): Fix memory leak.
22180         
22181         * aot.c: Added mono_aot_verbose variable and made all debugging
22182         output depend on the value of this variable.
22183
22184         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
22185         method_label and info_label.
22186
22187         * mini.h mini-x86.c aot.c: Added a new relocation type 
22188         MONO_PATCH_INFO_IID for klass->interface_id.
22189
22190         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
22191         the MonoJitInfo structure.
22192
22193         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
22194         a non-root appdomain in shared mode.
22195
22196 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
22197
22198         * aot.c: make aot loader less verbose. Remove free of unused variable.
22199
22200 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
22201
22202         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
22203
22204         * .cvsignore: Added *.dll.
22205
22206         * mini.c (mono_print_tree_nl): New function callable while debugging.
22207
22208         * mini.c (mono_print_code): Export this.
22209
22210         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
22211         patched code.
22212
22213 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
22214
22215         * mini.h (MonoCompile): Added 'jit_info' field.
22216
22217         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
22218         the cfg structure, since it is needed by the AOT compiler.
22219
22220         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
22221
22222         * aot.c: A major rewrite. Changes include:
22223         - save exception tables for methods which have them.
22224         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
22225         to g_module_symbol.
22226         - reworked the file format so it is now much smaller and needs
22227         fewer relocation entries.
22228         
22229 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
22230
22231         * aot.c (load_aot_module): Fix build bustage on platforms without
22232         Boehm GC.
22233
22234 2003-09-04  Martin Baulig  <martin@ximian.com>
22235
22236         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
22237
22238 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
22239
22240         * TODO: Some new optimization ideas.
22241
22242         * aot.c: Move AOT module loading logic here from mono_assembly_open.
22243
22244         * aot.c: Save the optimization flags used to compile the code into
22245         the AOT module.
22246
22247         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
22248         support emitting domain specific code.
22249         
22250         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
22251         no longer domain neutral. It can be made domain neutral by compiling 
22252         with --optimize=shared.
22253
22254         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
22255         between appdomains.
22256
22257         * driver.c mini.h mini.c: New --no-aot debugging option which disables
22258         loading of AOT code.
22259
22260         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
22261         
22262         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
22263         if there is no domain neutrality information.
22264
22265 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
22266
22267         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
22268         format version into the generated library.
22269
22270         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
22271         callee method into the caller since one of them could be shared.
22272
22273         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
22274         system exceptions from AOT code now works.
22275
22276         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
22277         method if it is domain neutral and the callee is not.
22278
22279         * graph.c (cfg_emit_one_loop_level): Fix warning.
22280
22281 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
22282
22283         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
22284         last checkin.
22285
22286 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
22287
22288         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
22289         is needed  by code which is executed before mono_runtime_init ().
22290         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
22291         
22292         * mini.c (mono_thread_abort): Fix warning.
22293         (mono_jit_compile_method): Call static constructor in the AOT case too.
22294
22295         * aot.c (mono_compile_assembly): Fix warning.
22296
22297 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22298
22299         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
22300
22301 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
22302
22303         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
22304
22305         * cpu-pentium.md: Fix the length of call opcodes so they include the
22306         ESP restoring instruction. Fixes #47968.
22307
22308 2003-08-28  Martin Baulig  <martin@ximian.com>
22309
22310         * mini-x86.c (mono_arch_call_opcode): Added support for
22311         MONO_TYPE_GENERICINST.
22312
22313         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
22314
22315 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
22316
22317         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
22318         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
22319
22320         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
22321         metadata_section.
22322
22323 2003-08-26  Martin Baulig  <martin@ximian.com>
22324
22325         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
22326         when reporting an error, set this to the actual error location.
22327         (mono_method_to_ir): Report the correct error location if
22328         get_basic_blocks() returned an error.
22329
22330 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
22331
22332         * mini.c (mono_type_blittable): OBJECT is not blittable.
22333         (mono_method_blittable): Methods which have marshalling descriptors
22334         are not blittable either. Fixes #47842.
22335
22336 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
22337
22338         * driver.c mini.c: Use an environment variable instead of a global 
22339         variable. Also fix the build.
22340
22341         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
22342         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
22343         reporting this. 
22344
22345         * driver.c mini.c: Added --with-valgrind option to turn off some
22346         code which prevents mono from running under valgrind.
22347
22348         * mini.c (mono_emit_call_args): Fixed warning.
22349
22350         * mini.c (mono_emulate_opcode): Fixed warning.
22351
22352 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22353
22354         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
22355         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
22356         regalloc.c, regalloc.h: specify available registers in arch-specific
22357         code and support floats in the regallocator (patch by Laurent Morichetti 
22358         <l_m@pacbell.net>)
22359
22360 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
22361
22362         * mini.c: mono_thread_current() can be called only after
22363         mono_runtime_init(): rearrange code to not call it early on.
22364
22365 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
22366
22367         * mini.c: allocate jump tables in the code mempools.
22368
22369 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
22370
22371         * mini.c, mini.h: make sure per-thread data allocated by the jit is
22372         freed.
22373
22374 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
22375
22376         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
22377         12 to 16.  This fixes bug #47453.
22378
22379
22380 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
22381
22382         * mini-ppc.c: fixed indexed load and unsigned compares.
22383
22384 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
22385
22386         * mini.c: reenabled installation of handler for
22387           thread abort signal.
22388
22389 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22390
22391         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
22392         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
22393         until it's fixed and actually useful.
22394
22395 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22396
22397         * inssel-long32.brg: couple more opcodes implemented.
22398
22399 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
22400         
22401         * mini-sparc.c: Even more opcodes implemeted.
22402
22403 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
22404
22405         * mini-sparc.c: More opcodes implemented.
22406
22407 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
22408
22409         * mini-sparc.c: More opcodes implemented.
22410
22411 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
22412
22413         * inssel-sparc.brg: Add some needed rules.  Direct
22414         copy from PPC.
22415         * Makefile.am: Use inssel-sparc.brg
22416         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
22417         an assert happy for now.
22418
22419 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
22420
22421         * mini-sparc.c: Fixed compile errors.
22422         * exceptions-sparc.c: Same.  We now produce a mono binary 
22423         on sparc-linux.  Yea.
22424
22425 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
22426
22427         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
22428         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
22429         They compile, but do not work.
22430
22431 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22432
22433         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
22434         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
22435         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
22436         (ct@gentoo.org).
22437
22438 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22439
22440         * mini.c: more opcodes implemented and better support for generics.
22441
22442 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
22443
22444         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
22445         * mini.c, mini.h: first cut at generics support: some new instructions 
22446         added and changed the behaviour of some of the existing ones.
22447
22448 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
22449
22450         * mini.c: Removed definition of metadata_shared mutex here.
22451
22452 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
22453
22454         * mini-x86.c: make vararg calls work for instance methods.
22455
22456 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
22457
22458         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
22459         returns the arguments in a separte list, now.
22460
22461 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
22462
22463         * aot.c, mini.c: updates for array type representation changes.
22464
22465 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
22466
22467         * mini.c: register function to perform jit shutdown.
22468
22469 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22470
22471         * mini.c: use a faster allocator if possible.
22472
22473 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
22474
22475         * aot.c: some cleanups and portability changes.
22476
22477 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
22478
22479         * mini.c: use faster allocation for CEE_BOX if possible.
22480
22481 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
22482
22483         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
22484         Moved inlined mempcy code to its own function so that is can be
22485         reused. Added an inline memset function as well (optimized initobj).
22486         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
22487
22488 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
22489
22490         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
22491
22492 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
22493
22494         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
22495         arch code can setup the cpu for CLR execution, if needed.
22496         We use it on x86 to set the precision of FP operations.
22497
22498 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
22499
22500         * mini.c: disable some optimizations if we can guess they'll cost too
22501         much for a given method.
22502
22503 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
22504
22505         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
22506         
22507 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
22508         * mini.h mini.c mini-x86.c: Added instruction level coverage 
22509         info collection support.
22510
22511 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
22512
22513         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
22514         is now implemented in the profiling API. Get rid of a couple of
22515         unnecessary global variables.
22516
22517 2003-06-15  Nick Drochak <ndrochak@gol.com>
22518
22519         * basic-long.cs: tests for negative values for bigmul, and unsigned.
22520         * cpu-g4.md: add op_bigmul and op_bigmul_un
22521         * cpu_pentium.md: add op_bigmul_un
22522         * inssel-long32.brg: add rule for unsigned bigmul
22523         * mini-ops.h: define OP_BIGMUL_UN
22524         * mini-x86.c: THE BUG: handle (un)signed properly
22525         * mini.c: choose unsigned opcode if needed.
22526         This set of patches fixes bug #44291
22527
22528 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
22529
22530         * mini.c (optimize_branches): improved to handle all kinds of
22531         conditional branches.
22532
22533 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
22534
22535         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
22536         don't raise exceptions.
22537
22538 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
22539
22540         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
22541         to arch-specific files.
22542
22543 2003-06-09  Martin Baulig  <martin@ximian.com>
22544
22545         * Makefile.am (libs): Added $(LIBGC_LIBS).
22546
22547 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
22548
22549         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
22550         and OP_ATAN (fixes bug#44293).
22551
22552 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
22553
22554         * Makefile.am, mini-x86.c: rename cpu description array to
22555         pentium_desc, since some compilers define the 'pentium' preprocessor
22556         symbol.
22557
22558 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
22559
22560         * mini.c (mini_select_instructions): add explicit branch if the
22561         following block is not the false target of a conditional branch -
22562         we need this with any optimization that reorder or remove bblocks
22563
22564         * mini.c (optimize_branches): bug fixes
22565
22566 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
22567
22568         * mini.c (mono_method_to_ir): inline static readonly fields
22569
22570         * ssa.c (fold_tree): start cfold support for long (very simple
22571         cases only)
22572
22573         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
22574
22575 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
22576
22577         * inssel.brg: fixed memcpy (bug #44219).
22578
22579 2003-06-05  Dick Porter  <dick@ximian.com>
22580
22581         * driver.c: Set the glib log levels to not abort if g_message
22582         recurses.
22583
22584         g_set_prgname() has to happen before mini_init() so that the
22585         process handle gets the info.
22586         
22587 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
22588
22589         * driver.c: add intrins to the default optimizations to get wider
22590         exposure.
22591
22592 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
22593
22594         * mini.h: some large basic blocks will overflow a 16-bit
22595         integers for symbolic registers.
22596
22597 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
22598
22599         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
22600         (mono_arch_output_basic_block): fix bug 43499 
22601
22602 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
22603
22604         * mini.c: kill duplicated definition of mono_debug_format.
22605
22606 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
22607
22608         * mini-x86.c, arrays.cs: fixed register allocation bug.
22609
22610 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
22611
22612         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
22613
22614         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
22615
22616 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22617
22618         * mini.c:
22619         (print_method_from_ip): also print source location information if
22620         available.
22621
22622 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
22623
22624         * mini.c (mono_find_block_region): bug fix in region code
22625         (mini_method_compile): enable removing unreachable code again, but
22626         only in methods without exception clauses.
22627
22628 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
22629
22630         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
22631         Implemented arglist opcode and handling of TypedReference type.
22632         Fixed x86 call convention when a structure is returned.
22633         Minimal support for calling static vararg methods.
22634
22635 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
22636
22637         * mini.c (mini_method_compile):  always remove unreachable code,
22638         because the code in them may be inconsistent  (access to dead
22639         variables for example).
22640
22641 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
22642
22643         * driver.c, debug-mini.c: warning fixes.
22644
22645 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
22646
22647         * Makefile.am, jit.h, mini.h: install header for embedding mono.
22648
22649 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
22650
22651         * mini.c: thread-static fields are registered in mono_class_vtable(),
22652         so ensure the function is called before checking for them.
22653
22654 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
22655
22656         * mini.c (optimize_branches): fix for bug 43586
22657
22658         * jit-icalls.c (mono_llmult_ovf): added an additional check for
22659         overflow (fixes Bug #43639)
22660
22661 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
22662
22663         * mini.c, objects.cs: allow the use of stobj for primitive types.
22664
22665 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
22666
22667         * mini.c: be less strict about argument checking until we support
22668         running the verifier.
22669
22670 2003-05-27  Nick Drochak <ndrochak@gol.com>
22671
22672         * basic-long.cs: tests for (ulong)int * (ulong)int also
22673         * mini.c: use the same trick for (ulong)int * (ulong)int
22674
22675 2003-05-27  Nick Drochak <ndrochak@gol.com>
22676
22677         * basic-long.cs: add regression test for (long)int * (long)int
22678         * cpu-pentium.md: add op_bigmul specification
22679         * inssel-long32.brg: add OP_BIGMUL rule
22680         * mini-ops.h: add OP_BIGMUL
22681         * mini-x86.c: register allocator: handle case where src1 needs to be
22682         in EAX.
22683         * mini.c: substitute special BIGMUL opcode in the tree for 
22684         (long)int * (long)int
22685
22686 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
22687
22688         * jit-icalls.c: call the type ctor on field access if needed.
22689
22690 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
22691
22692         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
22693         to a method (including results of ldelema, bug#43207).
22694
22695 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
22696
22697         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
22698         colors to show exception handler blocks.
22699
22700         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
22701         (fix for pinvoke7.cs).
22702
22703 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
22704
22705         * mini.h, mini.c: ensure correct initialization order for types that
22706         require it. Prepare for lazy compilation of jit icall wrappers.
22707         Provide a name for opcode emulation to reduce unneeded mallocing.
22708
22709 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
22710
22711         * mini-x86.c: better register restoring code and profiling
22712         support for tail calls.
22713
22714 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
22715
22716         * mini.h, driver.c: prepare for leaf methods optimization.
22717
22718 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
22719
22720         * mini.c: get targets of branches before converting a method.
22721
22722 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
22723
22724         * mini.c (optimize_branches): added some experimental code (disbaled) 
22725
22726 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
22727
22728         * mini.c (optimize_branches): fix branch to branch optimization 
22729
22730         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
22731
22732         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
22733
22734         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
22735
22736         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
22737         if needed.
22738
22739 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
22740
22741         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
22742         enable use of interface variables again.
22743
22744         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
22745         I1 to registers because there is no simply way to sign extend 8bit
22746         quantities in caller saved registers on x86.
22747
22748         * inssel-float.brg: set costs of some rules to 2 so
22749         that monobure always select the arch. specific ones if supplied,
22750         regardless of the order we pass the files to monoburg.
22751
22752 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
22753
22754         * mini.c, mini-x86.c: since the magic trampoline for jumps
22755         can't patch the code directly, we do it as soon as the
22756         method gets compiled.
22757
22758 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
22759
22760         * mini-x86.c, mini.h: introduce a new patching method
22761         to support CEE_JMP and tail calls.
22762         * mini.c: obey tail.call. Don't precompile methods target
22763         of CEE_JMP.
22764         * tramp-x86.c: new trampoline code to handle methods
22765         reached through a jump.
22766
22767 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
22768
22769         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
22770         bit values to registers
22771
22772 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
22773
22774         * mini.c (mono_compile_get_interface_var): share interface
22775         variables if possible.
22776
22777 2003-05-16  Martin Baulig  <martin@ximian.com>
22778
22779         * debug-mini.c (mono_init_debugger): New function to initialize
22780         the debugger.  This is not in the debugger since it needs to
22781         access some of mini's internals.
22782
22783 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
22784
22785         * mini.c (mono_method_to_ir): inlining fixes/cleanups
22786
22787 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
22788
22789         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
22790         for value type handling.
22791
22792 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
22793
22794         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
22795         (mono_method_check_inlining): enable inlining of all kinds of wrappers
22796
22797 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
22798
22799         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
22800           the constructor through a proxy.
22801
22802 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
22803
22804         * jit-icalls.c, inssel.brg: fixes to array element address
22805         calculations.
22806
22807 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
22808
22809         * mini-x86.c (is_regsize_var): allocate pointer to registers
22810
22811 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22812
22813         * driver.c: fixed typo, added intrins to the set of optimizations
22814         tested with regressions.
22815
22816 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
22817
22818         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
22819         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
22820         test case.
22821
22822 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
22823
22824         * inssel.brg: remove some common pop instructions without side effects
22825
22826 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
22827
22828         * inssel-x86.brg: fixed thinko in int to double conversions.
22829
22830 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
22831
22832         * mini.c, jit-icalls.c: added runtime thread-static variable support.
22833
22834 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
22835
22836         * inssel-long32.brg: two more missing instructions.
22837
22838 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
22839
22840         * mini.c (mono_emit_call_args): set the cil_code for all arguments
22841         if not already set.
22842
22843 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
22844
22845         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
22846         correctly.
22847
22848         * basic-float.cs: Added tests for negative zero.
22849
22850 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
22851
22852         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
22853         a couple of missing operations for long casts, with test cases.
22854
22855 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22856
22857         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
22858
22859 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
22860
22861         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
22862         code size estimation.
22863
22864 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
22865
22866         * mini.c (mono_jit_create_remoting_trampoline): make it work with
22867         abstract methods (fix bug 42542)
22868
22869         * aot.c: add ability to handle array types
22870         
22871 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
22872
22873         * mini.c: Call the _specific versions of the object allocation
22874         functions if possible.
22875
22876 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
22877
22878         * driver.c: call setlocale ().
22879
22880 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
22881
22882         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
22883         windows build.
22884
22885 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
22886
22887         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
22888
22889         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
22890         wrappers (fix bug 42122)
22891
22892 2003-05-04  Martin Baulig  <martin@ximian.com>
22893
22894         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
22895
22896         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
22897         s/mini_set_defaults/mono_set_defaults/g.
22898
22899 2003-05-04  Martin Baulig  <martin@ximian.com>
22900
22901         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
22902
22903 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22904
22905         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
22906         (reported by Don Roberts).
22907
22908 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
22909
22910         * mini.c: temporarily work around two bugs for this release.
22911
22912 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
22913
22914         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
22915         that contains -export-dynamic and it makes using the ld script
22916         useless.
22917         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
22918
22919 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
22920
22921         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
22922         specific cpu.
22923
22924 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
22925
22926         * mini.c: make sure leave calls all the needed finally blocks,
22927         even when the target jumps out of multiple exception clauses.
22928
22929 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22930
22931         * ldscript, Makefile.am: add linker script to reduce the number of
22932         exported symbols (should also fix the issues with libwine defining
22933         some of the same symbols in io-layer).
22934
22935 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
22936
22937         * driver.c (mini_main): Avoid assertion when no file name is given on 
22938         the command line.
22939
22940 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
22941
22942         * driver.c: added --version/-V command line option.
22943         Added the inline optimization in the regression tests.
22944
22945 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22946
22947         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
22948         to the type in the method signature (fixes bug#42134).
22949
22950 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
22951
22952         * mini.c: when inlining, check this is not null only when needed (bug #42135).
22953
22954 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
22955
22956         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
22957
22958 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22959
22960         * driver.c: fixed bug #42100.
22961
22962 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
22963
22964         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
22965
22966 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
22967
22968         * mini.c: moved most of the code required to do inlining to its own
22969         function so it can be reused. Inline also ctors if appropriate.
22970
22971 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
22972
22973         * Makefile.am: Link with -export-dynamic so shared libs loaded by
22974         the runtime can call mono API functions.
22975
22976 2003-04-27  Martin Baulig  <martin@ximian.com>
22977
22978         * debug-mini.c (mono_debug_init_method): Added
22979         `guint32 breakpoint_id' argument; if the method has a breakpoint,
22980         send a notification to the debugger.
22981
22982         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
22983         running in the Mono Debugger, just pass the breakpoint number to
22984         mono_debug_init_method().
22985
22986         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
22987
22988 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
22989
22990         * mini.c: allow some more unsafe compares.
22991
22992 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22993
22994         * mini-x86.c, Makefile.am: make distcheck works (partially from
22995         a patch by Richard Lee <r.h.lee@attbi.com>).
22996         * regset.c, regset.h: removed, they are unused.
22997
22998 2003-04-25  Dick Porter  <dick@ximian.com>
22999
23000         * driver.c: Usage reports the name as 'mono' not 'mini'
23001         * exceptions-x86.c: Build and run on freebsd
23002
23003 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
23004
23005         * Makefile.am: install the program with the 'mono' name and
23006         the library as libmono instead of mini and libmini.
23007
23008 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
23009
23010         * driver.c: provide the APIs for the embedding interface of the old jit.
23011
23012 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
23013
23014         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
23015
23016 2003-04-23  Martin Baulig  <martin@ximian.com>
23017
23018         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
23019
23020         * driver.c: Added `--debug' command line argument to enable
23021         debugging support.
23022
23023 2003-04-23  Martin Baulig  <martin@ximian.com>
23024
23025         * debug.[ch]: Removed.  The code is now in
23026         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
23027
23028         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
23029         last six months.
23030
23031 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
23032
23033         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
23034
23035 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23036
23037         * mini.c:
23038         (mini_cleanup): moved mono_runtime_cleanup call after the call to
23039         mono_domain_finalize.
23040         (mini_method_compile): use mono_method_profile* if the the option is
23041         enabled.
23042
23043 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
23044
23045         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
23046         methods with their wrapper.
23047
23048         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
23049         methods with their wrapper.
23050
23051         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
23052         their wrapper.
23053
23054         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
23055         wrapper.
23056
23057         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
23058         methods.
23059
23060 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
23061
23062         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
23063
23064 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
23065
23066         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
23067         of the mempool. This is slightly faster and uses less memory
23068
23069 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
23070
23071         * mini.c: avoid O(n) allocation for variables.
23072
23073 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
23074
23075         * mini.c: handle items on the stack after inlining methods.
23076
23077 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
23078
23079         * mini.c: make the method->opcode optimization dependent
23080         on MONO_OPT_INSTRINS and do it lazily.
23081
23082 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
23083
23084         * driver.c: print overall results at the end of regression run.
23085
23086 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
23087
23088         * inssel.brg: don't overwrite symbolic registers.
23089
23090 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
23091
23092         * inssel-x86.brg: fix conversion from long to float.
23093
23094 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
23095
23096         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
23097
23098 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
23099
23100         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
23101
23102         * driver.c: Added --print-vtable option as in the old JIT.
23103
23104 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
23105
23106         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
23107
23108 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
23109
23110         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
23111
23112 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
23113
23114         * mini.c regalloc.c regalloc.h: Fix memory leak.
23115
23116 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
23117
23118         * aot.c (mono_aot_get_method): register all used strings
23119
23120 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
23121
23122         * mini.c: always intern strings references with ldstr at compile time.
23123
23124 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
23125
23126         * Makefile.am: add BUILT_SOURCES.
23127
23128 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
23129
23130         * driver.c: give a better error message when the assembly to execute
23131         doesn't have an entry point.
23132
23133 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
23134
23135         * Makefile.am: added hack for automake
23136
23137         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
23138         correct sematics.
23139
23140         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
23141
23142 22003-04-07  Martin Baulig  <martin@ximian.com>
23143
23144         * Makefile.am: Added Makefile.am.
23145
23146         * debugger-main.c: Removed, this is now in the debugger where it
23147         belongs.
23148
23149         * mini.pc.in: Call this package `mini' for the moment.
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164