2009-05-14 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2009-05-14  Zoltan Varga  <vargaz@gmail.com>
2
3         * aot-compiler.c (emit_method_code): Emit a C style symbol for each
4         method so a breakpoint can be set when using gdb.
5
6 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
7
8         * aot-compiler.c (mono_aot_method_hash): Implement this properly based
9         on mono_method_get_imt_slot ().
10
11         * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
12         num_decodes variables.
13
14         * aot-compiler.c (mono_aot_method_hash): Revert part of the last
15         change as it doesn't seem to work.
16         
17         * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
18         wrappers.
19
20 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
21
22         * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill 
23         MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
24
25         * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
26         builder when using full aot.
27
28         * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
29         here, it is already handled.
30         
31         * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
32         correctly for IMT.
33
34         * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
35
36         * mini-arm.h: Enable IMT for full aot.
37         
38         * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
39         arch doesn't support it.
40
41         * mini.c (mini_init): Don't disable IMT for full aot if the
42         architecture supports it.
43
44         * mini.h (MonoAotTrampoline): New enum containing the different types
45         of 'numerous' trampolines.
46         (MONO_AOT_FILE_VERSION): Bump this.
47
48         * aot-compiler.c aot-runtime.c: Unify the handling of specific and
49         static rgctx trampolines. Add support for full-aot IMT thunks.
50
51         * mini-amd64.h: Enable IMT for full aot.
52
53         * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
54         to exclude tests belonging to a category.
55
56         * generics.cs: Mark some tests with a !FULLAOT category.
57
58         * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
59         generics tests.
60
61 2009-05-11  Zoltan Varga  <vargaz@gmail.com>
62
63         * aot-compiler.c (emit_and_reloc_code): Move the implementation of
64         MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
65         (emit_plt): Fix a warning.
66
67 2009-05-10  Zoltan Varga  <vargaz@gmail.com>
68
69         * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
70         back into aot-compiler.c to a place where the other functions shared by
71         the runtime and aot compiler are.
72         
73         * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
74         as done previously, instead of in MonoAotFileInfo, since pointers might have
75         alignment requirements.
76
77         * mini.h: Bump AOT file format version.
78
79 2009-05-10  Miguel de Icaza  <miguel@novell.com>
80
81         * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
82         that is used at runtime from the aot-compiler.c, this makes it
83         work on setups that remove the AOT compiler from the output
84         image. 
85
86 2009-05-09  Zoltan Varga  <vargaz@gmail.com>
87
88         * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
89
90         * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific 
91         stuff to mono_arch_decompose_long_opts ().
92         (mono_decompose_opcode): Remove some dead code.
93
94 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
95
96         * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
97         cmethod can be null for quite a some reasons.
98
99 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
100
101         * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
102
103 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
104
105         * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
106
107 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
108
109         * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
110         (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
111         whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
112         calls returning structures by addr on amd64.
113
114         * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
115
116         * iltests.il.in: Restructure the tail call tests a bit.
117         
118 2009-05-07  Zoltan Varga  <vargaz@gmail.com>
119
120         * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
121         for virtual methods too.
122
123 2009-05-06  Raja R Harinath  <harinath@hurrynot.org>
124
125         * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
126         due to regression in verifying System.dll.
127
128 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
129
130         * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
131         in dynamic methods.
132
133         * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
134         instances.
135
136         * aot-compiler.c aot-runtime.c: Use our own hash function instead of
137         g_str_hash () which can change.
138
139         * driver.c (mini_regression): Disable optimizations not supported by
140         the cpu. Fixes #500019.
141
142         * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
143         build.
144
145 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
146
147         * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
148         to the latest LLVM code.
149
150 2009-05-05  Zoltan Varga  <vargaz@gmail.com>
151
152         * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
153
154 2009-05-04  Zoltan Varga  <vargaz@gmail.com>
155
156         * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on 
157         x86/amd64.
158
159         * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
160         no longer saving offsets, so just save the patch types along with the other
161         info.
162         * aot-runtime.c (load_patch_info): Update after the changes to 
163         encode_patch_list ().
164         (decode_got_entry): Removed, merged into load_patch_info ().
165         (is_shared_got_patch): Removed, call the same function from
166         aot-compiler.c.
167
168         * mini.h: Bump aot file format version.
169         
170         * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
171         half-finished no-dlsym code.
172
173         * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
174         option.
175
176         * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the 
177         MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
178
179 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
180
181         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
182         buffer length to work with AOT code.
183
184         * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
185         ldfld/stfld opcodes.
186
187         * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
188         as it is not used.
189
190         * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
191
192         * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
193
194         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
195         LLVM API.
196
197         * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
198         if needed. Don't decompose long operations when using llvm.
199
200 2009-05-01  Zoltan Varga  <vargaz@gmail.com>
201
202         * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
203         PAGESIZE constant.
204
205         * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
206
207 2009-05-03  Martin Baulig  <martin@ximian.com>
208
209         * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
210         mono_debugger_insert_method_breakpoint() since the class init
211         handler we're inserting at the top of the method already gives us
212         a notification.
213
214 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
215
216         * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
217         to mono_arch_decompose_long_opts () for x86 and arm.
218
219 2009-04-29  Zoltan Varga  <vargaz@gmail.com>
220
221         * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
222         TARGET_AMD64 here.
223
224 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
225
226         * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
227         JIT code.
228
229 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
230
231         * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
232         number of trampolines used in full-aot mode.
233
234         * aot-compiler.c: Add an ntrampolines option to set the number of 
235         trampolines emitted in full-aot mode.
236
237 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
238
239         * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
240         a volatile load. Get rid of get_tempname (), llvm assigns names
241         automatically.
242
243         * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
244         builder function.
245
246         * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
247         a value.
248
249         * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
250         level 1.
251
252         * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
253         to the same register as a fixed sreg2. Fixes #497271.
254
255         * iltests.il.in: Add a new test.
256
257 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
258
259         * mini-amd64.c: Use moves instead of pushes for passing arguments on the
260         stack, since pushes complicate exception handling.
261
262         * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
263         the stack if they are passed using moves.
264
265         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
266
267         * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
268         when using llvm.
269
270         * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the 
271         icalls themselves. Convert arguments of FCOMPARE. Convert the destination
272         of FMOVE if it is an R4.
273
274 2009-04-25  Zoltan Varga  <vargaz@gmail.com>
275
276         * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
277
278         * mini.h (LLVMCallInfo): New structure to store calling convention 
279         information for the LLVM back end similar to the CallInfo structures in 
280         the back-ends.
281
282         * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
283         call information in a format usable by LLVM.
284         (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
285
286         * method-to-ir.c (mono_emit_call_args): Emit calls using 
287         mono_llvm_emit_call () when compiling using LLVM.
288
289         * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
290         comments to all functions. Fix memory leaks. Add a public init/cleanup
291         function.
292
293         * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
294
295         * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
296         mono_array_new_va () jit icall.
297         
298 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
299
300         * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
301         multiple machine description files to be specified.
302         * mini-ops.h: fixes for cross-compilation.
303
304 2009-04-22  Miguel de Icaza  <miguel@novell.com>
305
306         * aot-runtime.c (make_writable): Use mono_mprotect to simplify
307         some porting work.
308
309 2009-04-22  Zoltan Varga  <vargaz@gmail.com>
310
311         * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
312         to prevent asserts in various passes. Fixes #497220.
313
314 2009-04-21  Zoltan Varga  <vargaz@gmail.com>
315
316         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
317         a racy assert.
318
319         * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
320         table to avoid duplicates.
321
322         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
323         
324         * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
325         option is used.
326
327 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
328
329         * mini.c (mini_method_verify): Fail fulltrust code if the exception
330         is for method or field access.
331
332 2009-04-20  Zoltan Varga  <vargaz@gmail.com>
333
334         * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
335         a Value to stdout.
336
337         * mini-llvm.c (mono_llvm_emit_method): Use it.
338         
339         * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
340         (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
341         on volatile values.
342
343         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for 
344         synchronized methods.
345
346         * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
347
348         * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
349
350         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
351         OP_LOADI8_MEM.
352
353         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
354         allowing some options to be set dynamically.
355
356 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
357
358         * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
359         unconditional branch.
360
361         * mini.h (MonoTrampolineType): Add new trampoline type 
362         'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
363         compiled code.
364
365         * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline 
366         function.
367
368         * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
369         creation function.
370
371         * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
372         is enabled. Instead, use the llvm vcall trampoline.
373         
374         * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
375
376         * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
377         
378         * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
379         functions.
380
381         * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of 
382         MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
383
384         * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
385         OP_IA64_CSET opcode.
386
387         * mini.c: Fix a warning.
388
389         * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
390         THROW to the appropriate llvm type.
391
392 2009-04-18  Zoltan Varga  <vargaz@gmail.com>
393
394         * mini.c (mini_method_compile): Add statistics for methods JITted
395         with/without LLVM.
396
397 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
398
399         * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
400         OP_IA64_CMP_<cond>_IMM opcodes.
401
402 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
403
404         * mini-llvm.c (emit_cond_system_exception): Implement throwing of
405         corlib exceptions.
406
407         * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
408         correctly.
409
410         * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
411         GENERICINST.
412
413 2009-04-17  Atsushi Enomoto  <atsushi@ximian.com>
414
415         * mini-exceptions.c : add thread id to EXCEPTION trace message.
416
417 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
418
419         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
420         support.
421
422         * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
423         rgctx invoke trampolines for x86.
424
425         * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
426         indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
427         (mono_arch_get_vcall_slot): Simplify this.
428
429 2009-04-16  Zoltan Varga  <vargaz@gmail.com>
430
431         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
432         mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
433
434 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
435
436         * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx 
437         trampolines for ARM. Add full-aot support for delegate invokes for ARM.
438
439         * mini-trampolines.c (mono_magic_trampoline): Fix the build.
440
441         * liveness.c (visit_bb): Remove a needless assert.
442
443 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
444
445         * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
446         full aot support to the arch specific code.
447
448         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
449
450         * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
451
452         * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
453         
454         * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
455         collect information about the delegate invoke impl trampolines.
456
457         * mini.h (MonoAotTrampInfo): New structure collecting the information needed
458         to save trampolines during full-aot mode.
459
460         * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
461         creation function which returns a trampoline which sets the rgctx
462         argument.
463         (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
464         wrapper if possible.
465         (mono_delegate_trampoline): Ditto.
466
467         * mini.c (mono_jit_runtime_invoke): Ditto.
468
469         * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
470         
471         * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
472
473         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
474         
475 2009-04-12  Zoltan Varga  <vargaz@gmail.com>
476
477         * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
478         just setting the opcode to OP_NOP.
479
480 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
481
482         * mini.c (mini_method_compile): Put the last change inside an 
483         #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
484         
485         * mini.c (mini_method_compile): Disable sharing of stack slots/registers
486         and extend live ranges to cover the whole method when using xdb.
487
488         * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
489         do it in the trampolines.
490
491         * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
492         needed.
493
494         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
495         
496         * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
497         call code in full-aot mode since IMT is disabled there.
498         (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
499         new JIT no longer has that restriction.
500
501         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
502
503         * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
504         a more compact format.
505         (mono_aot_wrapper_name): New function to return a unique name for a
506         wrapper method, also used by the AOT runtime.
507
508         * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
509         aot-compiler.c.
510
511         * aot-compiler.c (add_generic_class): Add the helper methods from T[]
512         when a ICollection<T> etc is encountered.
513         (add_generic_instances): Process method arguments/locals too.
514         (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
515         trampoline names.
516
517         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
518         
519 2009-04-10  Zoltan Varga  <vargaz@gmail.com>
520
521         * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
522
523         * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
524
525         * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
526         representing the result of the decomposition. Nullify instructions
527         instead of setting them to OP_NOP since nops can't have registers
528         set.
529
530 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
531
532         * aot-compiler.c (mono_compile_assembly): Split this huge function into
533         smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
534         info. Strip 'mapping symbols' on ARM.
535
536         * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
537         
538         * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
539         this with the native genmdesc.
540
541 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
542
543         * aot-runtime.c:  Fixing the MSVC build.
544
545         Code is contributed under MIT/X11 license.
546
547 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
548
549         * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since 
550         JITted code depends on it.
551
552 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
553
554         * aot-compiler.c: Use new MonoGenericParam accessors.
555
556 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
557
558         Reduce memory usage and improve correctness wrt MonoGenericParam
559         * aot-runtime.c (decode_klass_ref): Simplify generic parameter
560         handing.  Avoid allocating MonoGenericParams, but use the ones in
561         the container itself.
562
563 2009-04-07  Miguel de Icaza  <miguel@novell.com>
564
565         * tasklets.c: Return exceptions in the out argument.
566
567 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
568
569         * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
570         opcode. Use pointer types in more places instead of casting them to 
571         integers.
572
573         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
574         optimizations.
575         (mono_llvm_optimize_method): New helper function to optimize a method.
576
577         * method-to-ir.c (mono_emit_widen_call_res): Extract the call result 
578         widening code so it could be called from more places.
579         (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
580         code paths in the call opcodes.
581
582 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
583
584         * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
585
586 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
587
588         * dwarfwriter.c: Use _ to separate class name 
589         components as gdb can't handle '.'. Represent reference variables
590         as 'class <NAME>&'.
591         
592         * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
593
594         * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
595         
596         * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
597
598         * gc-test.cs: New file with GC stack marking tests.
599         
600         * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
601         negative numbers for vfp.
602
603         * basic-float.cs: Add a test.
604         
605 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
606
607         * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
608
609 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
610
611         * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
612         part of tasklet/continuation support.
613
614 2009-04-05  Zoltan Varga  <vargaz@gmail.com>
615
616         * mini-llvm.c (mono_llvm_emit_method): Move the handling of
617         amd64 opcodes inside an ifdef.
618
619         * dwarfwriter.c: Emit inheritance information for classes, emit fields
620         of complex types.
621         
622         * dwarfwriter.c (emit_type): Emit the class info for classes.
623
624 2009-04-04  Zoltan Varga  <vargaz@gmail.com>
625
626         * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
627
628         * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
629
630         * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
631
632         * ssa.c (mono_ssa_compute): Fix some memory leaks.
633
634 2009-04-03  Zoltan Varga  <vargaz@gmail.com>
635
636         * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
637
638         * mini-llvm.c: Update comments.
639
640         * mini.h (COMPILE_LLVM): New macro.
641
642         * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
643
644         * ssa.c (mono_ssa_compute): Ditto.
645         
646         * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
647         the unwind ops from a DWARF FDE.
648
649         * mini-llvm.c: Implement generation of unwind info for LLVM compiled
650         methods by extracting the dwarf unwind ops from the unwind info generated
651         by LLVM.
652         
653         * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
654         calls.
655
656         * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
657         addressing modes.
658
659 2009-04-02  Zoltan Varga  <vargaz@gmail.com>
660
661         * Makefile.am (llvm_sources): Enable this.
662
663         * mini.c (mini_method_compile): Add support for compiling with LLVM, 
664         failing back to the JIT if something cannot be handled.
665
666         * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
667         compiling with LLVM.
668
669         * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
670         compiling with LLVM.
671
672         * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when 
673         compiling with LLVM.
674
675         * mini-ops.h: Add a few opcodes needed by LLVM.
676
677         * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
678         has no unwind info.
679
680         * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
681         backend.
682
683         * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
684
685         * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
686
687 2009-04-01  Mark Probst  <mark.probst@gmail.com>
688
689         * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
690         ridiculously large methods.
691
692 2009-03-31  Martin Baulig  <martin@ximian.com>
693
694         * debug-debugger.c (debugger_remove_breakpoint): Call
695         mono_debugger_remove_class_init_callback ().
696
697 2009-03-31  Zoltan Varga  <vargaz@gmail.com>
698
699         * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
700         right before emitting code, not at the start.
701
702         * mini.c (mono_postprocess_patches): Extract this into a separate function
703         from mono_codegen ().
704
705         * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
706         byref types correctly.
707
708 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
709
710         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
711         by the last change.
712
713 2009-03-29  Zoltan Varga  <vargaz@gmail.com>
714
715         * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before 
716         indirect calls, this avoids problems where get_vcall_slot () would get
717         confused by the native code for the instruction preceeding the call.
718         (mono_arch_get_vcall_slot): Simplify this.
719         (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
720
721         * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
722         register allocator now seems to depend on them instead of the data in
723         cpu-<ARCH>.md.
724
725         * mini.c (mini_method_compile): Throw the correct type of exception if
726         mono_method_get_header () fails because of a loading error.
727
728 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
729
730         * mini.c (mini_method_compile): Clear the loader error if the method
731         header cannot be decoded.
732
733         * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual 
734         interface methods on proxies correctly.
735
736         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
737         this argument for vtype methods. Add precise liveness info for arguments.
738
739         * mini-codegen.c (mono_print_ins_index): Print the vreg of the
740         LIVERANGE_START/END opcodes.
741
742         * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
743         for arguments and values in registers.
744
745 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
746
747         * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
748         return a valuetype. Fixes #487518.
749
750         * iltests.il: Add a test.
751         
752         * aot-compiler.c: Use mono_thread_create () to create helper threads.
753
754         * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
755         closed over a null reference correctly.
756
757 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
758
759         * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
760
761 2009-03-25  Mark Probst  <mark.probst@gmail.com>
762
763         * mini-codegen.c (mono_local_regalloc): Don't let sregs get
764         allocated to the same registers as fixed sregs.
765
766 2009-03-24  Mark Probst  <mark.probst@gmail.com>
767
768         * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
769         ATOMIC_CAS_IMM ops.
770
771         * method-to-ir.c: Handle more cases for
772         Interlocked.CompareExchange.
773
774         * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
775         mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
776         ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
777
778 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
779
780         * aot-runtime.c (decode_method_ref): Fix a warning.
781
782         * unwind.c (mono_unwind_frame): Ditto.  
783
784 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
785
786         * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
787         (mono_compile_assembly): Enable the binary writer for full-aot as well.
788
789         * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
790         fix the handling of large values in the ALU_PC_G0_NC relocation.
791
792 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
793
794         * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
795
796 2009-03-22  Mark Probst  <mark.probst@gmail.com>
797
798         * method-to-ir.c (mono_spill_global_vars): Support for ternary
799         ops.
800
801 2009-03-22  Mark Probst  <mark.probst@gmail.com>
802
803         * method-to-ir.c: MINI_OP3 needs a comma.
804
805         * method-to-ir.c, mini.h, mini.c: Remove
806         mono_init_op_sreg_counts ().
807
808 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
809
810         * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
811         OP_JMP.
812         
813         * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
814         assertion.
815
816         * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
817
818         * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
819         code somewhat.
820
821 2009-03-21  Mark Probst  <mark.probst@gmail.com>
822
823         * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
824         liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
825         mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
826         operations.
827
828 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
829
830         * driver.c: Change location of gc_wrapper.h.
831
832         * method-to-ir.c (mono_find_block_region): Handle try clauses nested
833         inside finally clauses correctly. Fixes #485721.
834
835         * mini.c (mono_find_spvar_for_region): This needs to handle try regions
836         after the change above.
837
838         * exceptions.cs: Add a test.
839         
840 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
841
842         * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
843
844         * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
845         into cfg->used_int_regs, it is not needed with the dwarf unwinder.
846         (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
847
848         * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
849         the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
850
851 2009-03-19  Sebastien Pouliot  <sebastien@ximian.com>
852
853         * method-to-ir.c: Allow CoreCLR to throw FieldAccessException. 
854         Simplify logic for ensure_method_is_allowed_to_call_method. 
855         Handle wrappers on callers.
856
857 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
858
859         * Makefile.am (fullaotcheck): Don't run the generics tests, some of
860         them don't run yet.
861
862         * basic-simd.cs: Fix the names of some test methods.
863
864 2009-03-18  Geoff Norton  <gnorton@novell.com>
865
866         * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
867
868 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
869
870         * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
871
872 2009-03-17  Jb Evain  <jbevain@novell.com>
873
874         * driver.c: remove now uneeded call to mono_gc_base_init before
875         mono_profiler_load.
876
877 2009-03-17  Jb Evain  <jbevain@novell.com>
878
879         * dwarfwriter.c (token_handler): handle more cases.
880
881 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com> 
882
883         * method-to-ir.c: Remove more dead code (that was required only
884         because of method_is_safe). Fix compiler warnings.
885
886 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
887
888         * method-to-ir.c: Remove unneeded/useless method_is_safe
889         http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
890
891 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
892
893         * mini.c (mini_method_compile): Print the method been compiled with
894         verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
895         for people not familiar with the runtime.
896
897 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
898
899         * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
900         a managed object which is later put into a GList. Return its class instead.
901
902         * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
903         stack slots when using sgen.
904
905 2009-03-16  Zoltan Varga  <vargaz@gmail.com>
906
907         * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
908
909 2009-03-14  Zoltan Varga  <vargaz@gmail.com>
910
911         * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
912         > so it works on the first vreg as well.
913
914 2009-03-13  Zoltan Varga  <vargaz@gmail.com>
915
916         * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
917         trigger randomly.
918
919         * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
920         
921         * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
922         implement GArray.
923
924 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
925
926         * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
927         native->IL offset mapping.
928
929 2009-03-11  Zoltan Varga  <vargaz@gmail.com>
930
931         * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
932
933         * basic.cs: Add a test.
934
935 2009-03-11  Mark Probst  <mark.probst@gmail.com>
936
937         * mini-x86.c (mono_arch_output_basic_block): Use different
938         registers in case the ones we want to overwrite are used by the
939         other operand.  Fixes regression in #480807.
940
941 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
942
943         * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
944
945         * dwarfwriter.c (emit_line_number_info): The line number info for
946         IL code was off by one. Fix that.
947
948         * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
949         stack.
950
951 2009-03-09  Mark Probst  <mark.probst@gmail.com>
952
953         Contributed under the terms of the MIT/X11 license by Steven
954         Munroe <munroesj@us.ibm.com>.
955
956         * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
957         Fixes #483462.
958
959 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
960
961         * dwarfwriter.c (token_handler): Decode method references in non-wrappers
962         as well.
963
964 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
965
966         * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
967         the delegate ctor handling code. Fixes #482638.
968         
969         * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
970         #481458.
971
972         * iltests.il.in: Add a test.
973         
974         * mini-darwin.c (mono_chain_signal): Remove this, it is already in
975         mini-posix.c.
976
977 2009-03-05  Mark Probst  <mark.probst@gmail.com>
978
979         * mini-trampolines.c (mono_create_jump_trampoline): If the method
980         is shared generic code, return the trampoline, even if the method
981         has already been compiled.  Fixes #479763.
982
983         * mini.c, mini.h: New function
984         mono_jit_find_compiled_method_with_jit_info() which is the same as
985         mono_jit_find_compiled_method() but also returns the jit info.
986
987 2009-03-05  Mark Probst  <mark.probst@gmail.com>
988
989         * method-to-ir.c (mono_method_to_ir): Only force the vtable var
990         for methods which actually have one.  For all other methods, make
991         sure the this argument var is live the whole method.
992
993         * mini.c (mini_method_compile): Every shared method has a
994         this/vtable/mrgctx info.  Fixes #480807.
995
996 2009-03-05  Mark Probst  <mark.probst@gmail.com>
997
998         * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
999         generic/imt thunks where some entries branch through the vtable,
1000         while other entries branch directly.
1001
1002 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
1003
1004         * mini-darwin.c (mono_chain_signal): Define this to fix the build.
1005
1006         * mini-windows.c: Ditto.
1007         
1008         * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
1009         ctors.
1010
1011 2009-03-04  Zoltan Varga  <vargaz@gmail.com>
1012
1013         * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
1014         down an assert.
1015
1016 2009-03-04  Mark Probst  <mark.probst@gmail.com>
1017
1018         * method-to-ir.c: Don't inline methods that use JMP.  Fixes
1019         #481403.
1020
1021 2009-03-04  Mark Probst  <mark.probst@gmail.com>
1022
1023         * exceptions-x86.c: Include debug-mini.h - fixes build.
1024
1025 2009-03-04  Martin Baulig  <martin@ximian.com>
1026
1027         * debug-mini.c: Clean up the exception API and add documentation.
1028         (mono_debugger_handle_exception): New public method; this is
1029         called when throwing an exception or encountering an unhandled one.
1030         (mono_debugger_call_exception_handler): Formerly known as
1031         mono_debugger_handle_exception(); this is used to tell the
1032         debugger that we're about to invoke an exception handler.
1033
1034 2009-03-04  Martin Baulig  <martin@ximian.com>
1035
1036         * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
1037         ../metadata/mono-debug-debugger.c; save and reset exception state.
1038
1039 2009-03-02  Martin Baulig  <martin@ximian.com>
1040
1041         * debug-mini.c: Moved the debugger exception handling here from
1042         ../metadata/mono-debug-debugger.c.
1043
1044         * debug-mini.h
1045         (MonoDebuggerExceptionAction): New exception typedef.
1046
1047         * debug-mini.c
1048         (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
1049
1050         * exceptions-amd64.c
1051         (mono_amd64_throw_exception): Use the new debugger exception
1052         handling code.
1053
1054         * mini-exceptions.c
1055         (mono_handle_exception_internal): Don't call
1056         mono_debugger_unhandled_exception() here.
1057
1058 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
1059
1060         * mini.c aot-compiler.c: Update after the changes to 
1061         mono_marshal_get_runtime_invoke ().
1062
1063         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): 
1064         Virtual generic methods might not have method->slot set, work around
1065         that.
1066
1067         * generics.cs: Add a test.
1068
1069 2009-03-02  Geoff Norton  <gnorton@novell.com>
1070
1071         * mini.c:
1072         * driver.c: Allow signal chaining of SIGFPE as well.
1073
1074 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
1075
1076         * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
1077         this since it now receives the method not its generic context in the
1078         IMT reg.
1079
1080         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
1081         generic/imt thunks where some entries branch through the vtable, while
1082         other entries branch directly.
1083
1084         * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
1085
1086         * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call 
1087         support for interface methods as well.
1088
1089         * mini-trampolines.c: Add support for virtual generic methods in interfaces
1090         using the normal IMT thunks.
1091
1092         generics.cs: Add new tests.
1093         
1094         * method-to-ir.c (mono_method_to_ir): Pass the method instead of
1095         the generic inst to the generic imt thunks. This fixes AOT support, 
1096         improves consistency with the normal IMT thunks, and makes it easier to
1097         add support for interface generic virtual methods later.
1098
1099         * mini-trampolines.c (mono_magic_trampoline): Ditto.    
1100         
1101 2009-02-28  Zoltan Varga  <vargaz@gmail.com>
1102
1103         * driver.c (mono_set_signal_chaining): New public API function to enable
1104         signal chaining on POSIX platforms.
1105
1106         * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland 
1107         (si@lindenlab.com) to implement signal chaining. The original patch was
1108         contributed under the MIT X/11 license:
1109         https://bugzilla.novell.com/show_bug.cgi?id=318894
1110
1111 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
1112
1113         * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
1114         too until it can be made to run on amd64.
1115
1116 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
1117
1118         * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
1119         to  get_generic_context_from_code () + get_call_info () if possible.
1120
1121 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
1122
1123         * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
1124         suspend-on-sigsegv functionality.
1125
1126         * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
1127         to suspend when a native SIGSEGV is received. This is useful for debugging
1128         crashes which don't happen under gdb, since a live process contains more
1129         information than a core file.
1130
1131         * mini-exceptions.c (mono_print_thread_dump): Use 
1132         MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
1133
1134         * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
1135
1136         * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
1137         
1138         * basic-float.cs: Disable the tests which currently fail on amd64.
1139
1140         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null 
1141         value to mono_arch_patch_callsite () to fix crashes.
1142         
1143         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
1144
1145 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
1146
1147         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
1148         nop code by patching the call address to point to the nullified class init
1149         trampoline, as the former does not seem to be safe on SMP machines.
1150
1151 2009-02-23  Mark Probst  <mark.probst@gmail.com>
1152
1153         * mini-ops.h: Fix the argument types for a few x86 opcodes where
1154         they were wrong.
1155
1156 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
1157
1158         * basic-float.cs basic-calls.cs: Fix warnings.
1159
1160 2009-02-22  Mark Probst  <mark.probst@gmail.com>
1161
1162         * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
1163         correct frame pointer in the LMF.  Should fix #478394.
1164
1165 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
1166
1167         * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
1168
1169         * image-writer.c: Make the binary writer less verbose.
1170
1171 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
1172
1173         * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
1174         are called from runtime invoke wrappers.
1175
1176 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
1177
1178         * cpu-ppc.md (store_memindex): Increase the size of this.
1179
1180 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
1181
1182         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1183
1184         * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
1185
1186         * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
1187         OP_LCONV_TO_R_UN.
1188
1189         Last fix for of #467201.
1190
1191
1192 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
1193
1194         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1195
1196         * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
1197         and long_conv_to_r8_2:
1198
1199         Fixed part of #467201.
1200
1201 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
1202
1203         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1204
1205         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
1206         conversion to 32 bits.
1207
1208         * cpu-x86.md: Increase the size of int_conv_to_r4.
1209
1210         * basic-float.cs: Add a test for this.
1211
1212         Fixed part of #467201.
1213
1214 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
1215
1216         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1217
1218         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
1219         conversion to 64 bits.
1220
1221         * basic-float.cs: Add a test for this.
1222
1223         Fixed part of #467201.
1224
1225 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
1226
1227         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1228
1229         * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
1230         This behavior is compatible with MS.
1231
1232         * iltest.il.in: Add a test for this.
1233
1234         Fixed part of #467201.
1235
1236 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
1237
1238         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1239
1240         * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
1241         change the precision of the value.
1242
1243         * cpu-x86.md: Define len for float_conv_to_r4.
1244
1245         * basic-float.cs: Add a test for this.
1246
1247         Fixed part of #467201.
1248
1249 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
1250
1251         * mini.c: Adjust locking order to the new semantics where the loader lock
1252         comes first.
1253
1254 2009-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
1255
1256         * aot-runtime.c:
1257         * mini-amd64.c:
1258         * mini-arm.c:
1259         * mini-ia64.c:
1260         * mini-mips.c:
1261         * mini-ppc.c:
1262         * mini-sparc.c:
1263         * mini-trampolines.c:
1264         * mini-x86.c:
1265         * mini.c:
1266         * tramp-alpha.c:
1267         * tramp-amd64.c:
1268         * tramp-arm.c:
1269         * tramp-hppa.c:
1270         * tramp-ia64.c:
1271         * tramp-mips.c:
1272         * tramp-ppc.c:
1273         * tramp-s390.c:
1274         * tramp-s390x.c:
1275         * tramp-sparc.c:
1276         * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
1277
1278 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
1279
1280         * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
1281         as it is incorrect.
1282
1283 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
1284
1285         * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
1286         for cctors if needed.
1287
1288 2009-02-17  Mark Probst  <mark.probst@gmail.com>
1289
1290         * mini-ppc.c: Fix build on Darwin.
1291
1292 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
1293
1294         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
1295         version instead of 3 as valgrind doesn't like version 3.
1296
1297         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1298
1299         * aot-compiler.c (mono_aot_method_hash): New function to return a hash
1300         usable for hashing methods.
1301         (emit_extra_methods): Use the new hash to avoid putting every method in the
1302         same hash bucket.
1303
1304         * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
1305
1306         * aot-runtime.c (can_method_ref_match_method): New function to quickly check
1307         whenever a method ref could match a method.
1308         
1309         * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
1310         test to fail.
1311         
1312         * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded 
1313         methods refs.
1314
1315         * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
1316
1317         * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
1318         the encoding buffer.
1319
1320         * method-to-ir.c (mono_method_check_inlining): Avoid calling 
1321         mono_method_get_header () on inflated methods as an optimization.
1322
1323 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
1324
1325         * ssa.c (fold_ins): Fix another crash if the instruction following the
1326         switch was optimized away.
1327
1328 2009-02-16  Mark Probst  <mark.probst@gmail.com>
1329
1330         Contributed under the terms of the MIT/X11 license by Steven
1331         Munroe <munroesj@us.ibm.com>.
1332
1333         * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
1334
1335 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
1336
1337         * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
1338         around the mono_domain_alloc calls, it is now done by the functions
1339         themselves.
1340
1341         * aot-compiler.c (compile_method): Only add wrappers referenced by
1342         the method if compiling with full AOT.
1343         (mono_compile_assembly): Error out if --aot=full is specified on
1344         a platform where it is not supported.
1345
1346         * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
1347         on ARM too.
1348
1349         * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
1350         AOT support.
1351
1352         * aot-runtime.c (load_named_code): Handle 
1353         mono_arm_throw_exception_by_token.
1354
1355         * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
1356
1357         * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
1358         unaligned.
1359
1360         * Makefile.am (fullaotcheck): Exit if a test fails.
1361
1362         * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
1363         on ARM.
1364         (mono_compile_assembly): Handle the assembler failing.
1365
1366         * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
1367         accepting subsections of .bss.
1368
1369         * ssa.c (visit_inst): Fix a crash if the instruction following a switch
1370         was optimized away.
1371
1372         * aot-compiler.c: Remove some unused includes.
1373         
1374         * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
1375         now in MonoImageWriter.
1376
1377         * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
1378         code sequence which matches a non-virtual call. Fixes #472654.
1379
1380 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
1381
1382         * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
1383         xdebug code.
1384         
1385         * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
1386         use the image/dwarf writers directly.
1387
1388         * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
1389         field.
1390
1391         * aot-compiler.c (MonoAotCompile): Remove fields which are now in
1392         MonoDwarfWriter.
1393
1394         * image-writer.h: Fix some typos.
1395
1396         * dwarfwriter.h dwarfwriter.c: New files.
1397         
1398         * aot-compiler.c: Extract the DWARF info writing functionality into a 
1399         separate module.
1400
1401         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
1402         argument to return unwind info.
1403
1404         * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
1405
1406         * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
1407         
1408         * aot-runtime.c (decode_method_ref): Add a case for 
1409         MONO_AOT_METHODREF_WRAPPER_NAME.
1410
1411         * mini.h: Add constants for the magic numbers used in encode_method_ref ()
1412         for AOT.
1413
1414         * aot-compiler.c (encode_method_ref): Use the new constants.
1415
1416         * aot-runtime.c (decode_method_ref): Ditto.
1417
1418         * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
1419         be compiled, not the icall itself.
1420
1421 2009-02-14  Zoltan Varga  <vargaz@gmail.com>
1422
1423         * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
1424         using decode_method_ref ().
1425
1426         * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
1427         convert it to an in32. Fixes #475859.
1428
1429         * arrays.cs: Add a test.
1430
1431 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
1432
1433         * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
1434         OP_LCONV_TO_U2.
1435
1436         * basic-long.cs: Add a test.
1437
1438 2009-02-12  Mark Probst  <mark.probst@gmail.com>
1439
1440         * mini-x86.c, mini-x86.h: Very simple frame pointer removal.  We
1441         remove the frame pointer in leaf methods which don't receive any
1442         arguments, don't throw exceptions and don't do dynamic stack
1443         allocations.
1444
1445 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
1446
1447         * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
1448         the fail_tramp changes. Hopefully fixes #475132.
1449
1450 2009-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
1451
1452         * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
1453         instead of mono_metadata_signature_dup_full.
1454
1455 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
1456
1457         * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
1458         for processing jump tables. Fixes #473787.
1459
1460 2009-02-11  Mark Probst  <mark.probst@gmail.com>
1461
1462         * mini-generic-sharing.c: mini_method_get_context() just calls
1463         mono_method_get_context_general() now.
1464
1465         * mini.c, mini.h: Moved get_object_generic_inst(),
1466         construct_object_context_for_method() and
1467         mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
1468
1469 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
1470
1471         * branch-opts.c (mono_if_conversion): Handle the case where the merged 
1472         basic block fell through to its successor bblock without a branch. Fixes
1473         #474718.
1474
1475         * iltests.il.in: Add a test.
1476         
1477         * aot-compiler.c (encode_method_ref): Encode methods of array types.
1478         (can_encode_patch): We can now handle arrays of generic parameters and
1479         array methods.
1480
1481         * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
1482
1483         * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
1484         the AOT file to avoid some #ifdefs in aot-runtime.c
1485
1486         * mini.h: Bump AOT file format version.
1487
1488 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
1489
1490         * Makefile.am (fullaotcheck): Make this run the tests.
1491
1492         * aot-compiler.c: Make the printing of skipped methods runtime configurable.
1493
1494 2009-02-10  Mark Probst  <mark.probst@gmail.com>
1495
1496         * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
1497         individually.  Fixes #473482.
1498
1499 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
1500
1501         * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
1502
1503 2009-02-09  Jeffrey Stedfast  <fejj@novell.com>
1504
1505         * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
1506         (mono_compile_assembly): Hush compile warnings about
1507         uninitialized [tmp_]outfile_name variables in the !use_bin_writer
1508         code path.
1509
1510 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
1511
1512         * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
1513
1514         * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
1515
1516         * aot-compiler.c: Fix arm support.
1517
1518         * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
1519         img_writer_emit_unset_mode () function.
1520
1521         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
1522         (mono_unwind_get_dwarf_pc_reg): Ditto.
1523
1524         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
1525         Move almost all platform specific code to a set of arch_ functions, 
1526         and document them to ease porting.
1527         
1528         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
1529
1530         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
1531
1532         * aot-compiler.c: Extract the image writing functionality into a separate
1533         module to reduce the size of this file.
1534
1535 2009-02-09  Geoff Norton  <gnorton@novell.com>
1536
1537         * mini-s390.c: Fix the signature of emit_sig_cookie.
1538
1539 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
1540
1541         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
1542
1543         * aot-runtime.c (is_shared_got_patch): Ditto.
1544
1545         * aot-runtime.c (load_named_code): Cope with the fact that 
1546         decode_got_entry () won't decode the patch fully if its corresponding got
1547         entry is already filled.
1548         
1549         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
1550         Initialize *ji.
1551         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
1552
1553         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
1554         as the moving pointer instead of 'buf' for consistency with the rest of the
1555         codebase.
1556         (mono_arch_create_monitor_exit_trampoline): Ditto.
1557
1558         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
1559         generic_class_init trampolines.
1560         (add_generic_class): Extract some code from add_generic_instances () into a
1561         separate function so it can be called from other places too.
1562         (compile_method): Call add_generic_class () for the classes of inflated methods
1563         referenced by the method.
1564         (can_encode_patch): Allow references to generic parameters.
1565
1566         * aot-runtime.c: Add support the patches required by the new trampolines.
1567         
1568         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
1569         support.
1570
1571         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
1572         full-aot support.
1573
1574         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
1575         this from get_throw_pending_exception, make the signature full aot compatible.
1576
1577         * Makefile.am (fullaotcheck): New target to run full-aot tests.
1578
1579         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
1580
1581         * exceptions.cs: Add a test.
1582
1583 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
1584
1585         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
1586         use the DWARF_DATA_ALIGN constant instead.
1587
1588         * exception-<ARCH>.c: Update after the above change.
1589
1590         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
1591         dwarf unwinder.
1592
1593         * mini-arm.c: Enable the dwarf unwinder.
1594
1595         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
1596         instead of mono_class_setup_vtable ().
1597
1598 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
1599
1600         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
1601         dwarf unwinder.
1602
1603         * mini-x86.h: Enable the dwarf unwinder.
1604
1605 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
1606
1607         Fix mcs/tests/test-7.cs
1608         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
1609         2009-02-03.
1610
1611 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
1612
1613         * mini.c (print_jit_stats): Remove some unused statistics.
1614
1615 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
1616
1617         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
1618
1619 2009-02-05  Mark Probst  <mark.probst@gmail.com>
1620
1621         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
1622         the method we get from mono_object_get_virtual_method() because
1623         that function does it properly, now.
1624
1625 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
1626
1627         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
1628         opcodes. Fixes #472775.
1629
1630 2009-02-05  Mark Probst  <mark.probst@gmail.com>
1631
1632         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
1633         fact that mono_find_jit_info() sometimes returns the context
1634         corresponding to the jit info in new_ctx.  Fixes #472600.
1635
1636 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
1637
1638         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
1639         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
1640         klass->enum_basetype directly.
1641
1642         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
1643         enum subtypes.
1644
1645         * unwind.c: Avoid 0 sized arrays.
1646
1647 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
1648
1649         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
1650         size on systems with 64k pages. Fixes #471389.
1651
1652 2009-02-04  Mark Probst  <mark.probst@gmail.com>
1653
1654         Contributed under the terms of the MIT/X11 license by Steven
1655         Munroe <munroesj@us.ibm.com>.
1656
1657         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
1658         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
1659         necessary.
1660
1661 2009-02-04  Mark Probst  <mark.probst@gmail.com>
1662
1663         Contributed under the terms of the MIT/X11 license by Steven
1664         Munroe <munroesj@us.ibm.com>.
1665
1666         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
1667         comparison fix.
1668
1669         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
1670         The trampoline can be longer on PPC64.
1671
1672 2009-02-04  Mark Probst  <mark.probst@gmail.com>
1673
1674         Contributed under the terms of the MIT/X11 license by Steven
1675         Munroe <munroesj@us.ibm.com>.
1676
1677         * mini-ppc.c: Compiler warning fixes and trivial code
1678         simplifications.
1679
1680 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
1681
1682         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
1683         ins->dreg which could be a hardware register, not a vreg.
1684
1685         * aot-compiler.c (emit_method_dwarf_info): Ditto.
1686         
1687         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
1688         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
1689
1690         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
1691         
1692         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
1693         ->dreg, that is not the vreg we are looking for.
1694
1695         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
1696
1697         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
1698         LIVERANGE_END.
1699
1700         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
1701         strange crashes.
1702
1703 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
1704
1705         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
1706
1707         * aot-compiler.c (emit_line_number_info): Fix line number emission when
1708         the line diff is 0.
1709
1710         * aot-compiler.c: Add xdebug support on x86.
1711
1712         * unwind.c: Add x86 support.
1713         
1714         * aot-compiler.c (emit_exception_debug_info): Control the emission of
1715         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
1716
1717         * mini.c (mini_method_compile): Ditto.
1718         
1719         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
1720         the variable index.
1721
1722         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
1723         which mimic .push_section/.pop_section in GAS.
1724         
1725         * aot-compiler.c: Emit precise live range information for variables.
1726
1727         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
1728
1729         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
1730         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
1731         them.
1732
1733         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
1734         the live ranges of variables.
1735
1736         * mini.h (struct MonoMethodVar): Add two fields containing the live range
1737         of the variable in terms of native offsets.
1738
1739 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
1740
1741         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
1742         
1743 2009-02-02  Mark Probst  <mark.probst@gmail.com>
1744
1745         Contributed under the terms of the MIT/X11 license by Steven
1746         Munroe <munroesj@us.ibm.com>.
1747
1748         * exceptions-ppc.c (restore_regs_from_context): Correct operand
1749         order (offset then base reg) for ppc_load_multiple_regs.
1750         (emit_save_saved_regs) Correct operand order for
1751         ppc_store_multiple_regs.
1752         (mono_arch_get_call_filter): Correct operand order for
1753         ppc_load_multiple_regs.
1754
1755         * mini-ppc.c (emit_memcpy): Fix operand order for
1756         ppc_load_reg_update and ppc_store_reg_update.
1757         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
1758         (mono_arch_emit_epilog): Correct operand order for
1759         ppc_load_multiple_regs.
1760
1761         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
1762         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
1763
1764 2009-02-02  Mark Probst  <mark.probst@gmail.com>
1765
1766         * cpu-ppc64.md: Fixed storer4_memindex length.
1767
1768 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
1769
1770         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
1771         line number info.
1772         
1773         * aot-compiler.c (emit_line_number_info): Optimize this.
1774
1775 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
1776
1777         * aot-compiler.c: Disassemble tokens in the IL disassembly.
1778         
1779         * aot-compiler.c: Add debug info for methods without debug info by
1780         emitting an IL file and having the line number info referencing that file.
1781
1782         * aot-compiler.c: Optimize the size of the generated line number info.
1783
1784         * aot-compiler.c: Emit line number info in xdebug mode.
1785
1786         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
1787         million arguments.
1788
1789 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
1790
1791         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
1792
1793         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
1794         is used.
1795
1796 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
1797
1798         * basic-calls.cs: Test for the weird crash found on arm.
1799         
1800 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
1801
1802         * cpu-arm.md: Increase the size of storer8_membase_reg and
1803         loadr8_membase_reg to 24 bytes to accomodate the extra add.
1804
1805         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
1806         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
1807         reg to LR otherwise we'll be loading/storing from just the offset.
1808
1809 2009-01-30  Miguel de Icaza  <miguel@novell.com>
1810
1811         Question: if we are storing gint32's inside the "*native_offset",
1812         should we change the signature to "gint32 *native_offset" to
1813         ensure that we do not have type definition problems?
1814         
1815         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
1816         an int * as this is what the other function expects, causes
1817         problems with Freescale's compiler that defined int32_t to be a
1818         long and makes int incompatible 
1819
1820 2009-01-30  Miguel de Icaza  <miguel@novell.com>
1821
1822         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
1823         filename conflict with bjam.
1824
1825 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
1826
1827         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
1828         as it might use decomposed ops.
1829
1830 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
1831
1832         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
1833
1834         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
1835         is defined.
1836
1837         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
1838
1839         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
1840         offsets.
1841
1842         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
1843         way registers are stored in MonoContext on arm.
1844
1845         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
1846         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
1847
1848         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
1849
1850         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
1851
1852         * mini.c (mini_init): Register mono_isfinite.
1853
1854         * jit-icalls.c (mono_isfinite): New jit icall.
1855
1856         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
1857         
1858         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
1859         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
1860         the parent frame.
1861
1862 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
1863
1864         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
1865         separate frame and stack pointers, so we must use FP to find the register
1866         spill area.
1867         The FP reg is retrieved from the MonoContext::regs array.
1868
1869 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
1870
1871         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
1872         as FPA requires it.
1873
1874 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
1875
1876         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
1877         return R4 and R8 when not running under softfloat.
1878
1879         Fixes basic-calls.exe
1880
1881 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
1882
1883         * mini-arm.c: Implement some overflow opcodes.
1884
1885 2009-01-29  Miguel de Icaza  <miguel@novell.com>
1886
1887         * ssa.c: handle another alloca.h
1888
1889         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
1890         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
1891         MONO_ARCH_USE_SIGACTION. 
1892
1893         * aot-runtime.c, mini-exceptions.c: Replace platform define with
1894         capability defines.
1895
1896         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
1897
1898         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
1899         PPC targets as sigaction does not exist on all platforms, define
1900         this on a per-platform basis.
1901
1902         Instead of erroring out if the platform is not defined, include
1903         mini-ppc-os.h, and expect that the OS specific setting provides
1904         the required information.   
1905
1906 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
1907
1908         * aot-compiler.c: Fix --enable-minimal=aot.
1909
1910 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
1911
1912         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
1913         previous change.
1914
1915 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
1916
1917         * exceptions-arm.c: Fix warnings.
1918
1919         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
1920         ARM.
1921
1922         * mini-x86.c: Fix --enable-minimal=jit build.
1923
1924         * mini.c: Really fix --enable-minimal=jit build.
1925         
1926         * mini.c (construct_object_context_for_method): Move this outside
1927         the DISABLE_JIT block to fix the --enable-minimal=jit build.
1928
1929         "Backported" of r124984 from 2.0 branch.
1930         
1931         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
1932
1933         "Backport" of r124977 + r124978 from 2.0 branch.
1934         
1935         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
1936         to avoid calling mono_exception_from_token () from the throw trampoline.
1937         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
1938         for throwing corlib exceptions, this fixes full-aot support for corlib
1939         exceptions.
1940
1941         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
1942
1943 2009-01-29  Miguel de Icaza  <miguel@novell.com>
1944
1945         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
1946         part of the changes to split the code in mini into operating
1947         system specific files.
1948
1949         This patch was done by copying mini.c to the respective files to
1950         preserve SVN history.
1951
1952 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
1953
1954         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
1955
1956 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
1957
1958         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
1959         remoting-invoke-with-check wrappers of shared methods.
1960
1961         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
1962
1963 2009-01-27  Mark Probst  <mark.probst@gmail.com>
1964
1965         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
1966         optimization if the top of stack is the last instruction in the
1967         bblock.  Otherwise it might have been used after its definition.
1968         Fixes #469742.
1969
1970 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
1971
1972         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
1973         method as well when get_vcall_slot () fails to match a code sequence.
1974
1975         * mini-arm.c: Fix the android build, which doesn't have
1976         __aeabi_read_tp.
1977
1978 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
1979
1980         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
1981         the s390x build.
1982
1983 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
1984
1985         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
1986
1987 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
1988
1989         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
1990         and put its id into jinfo->used_regs. This is only used on amd64,
1991         which is currently the only platform generating unwind info.
1992
1993         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
1994         the dwarf unwinder. This is required to correctly handle async exceptions
1995         like thread abort and stack overflows, which can happen while a method
1996         is in the middle of its prolog or epilog.
1997         
1998         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
1999         the unwind info belonging to an AOTed method.
2000
2001         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
2002         into cfg->unwind_ops.
2003         
2004         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
2005
2006         * mini.c (mini_init): Call mono_unwind_init ().
2007         (mini_cleanup): Call mono_unwind_cleanup ().
2008
2009         * unwind.c: Add functions for managing a set of unwind info entries, allowing
2010         unwind info to be shared between methods.
2011
2012         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
2013         saved in the LMF.
2014
2015         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
2016         get_throw_pending_exception () to avoid initialization races.
2017
2018         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
2019         mono_arch_exceptions_init () function.
2020
2021         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
2022
2023 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
2024
2025         * mini.c (mono_get_domain_intrinsic): New helper function.
2026         (mono_get_thread_intrinsic): Ditto.
2027
2028         * mini-arm.c mini-ia64.c: Use the new helper functions.
2029         
2030         * method-to-ir.c (mono_method_to_ir): Fix the comment for
2031         the last constrained_call change, since it is needed in the non-AOT
2032         case as well.
2033
2034         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
2035         
2036         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
2037         mono_get_lmf_addr () on arm eabi linux.
2038
2039 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
2040
2041         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
2042         code sequence which matches a non-virtual call.
2043
2044 2009-01-23  Mark Probst  <mark.probst@gmail.com>
2045
2046         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
2047         stack pointer (r1).
2048
2049 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
2050
2051         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
2052         runtime-invoke wrappers, since they are also shared based on signature.
2053
2054 2009-01-22  Mark Probst  <mark.probst@gmail.com>
2055
2056         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
2057         info from the (correct) context.
2058
2059 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
2060
2061         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
2062         
2063         * unwind.c (mono_unwind_frame): New function to unwind through a frame
2064         using dwarf unwinding info. Not yet used.
2065
2066         * mini.c (mini_init): When using xdebug, disable freeing of domains.
2067
2068 2009-01-21  Mark Probst  <mark.probst@gmail.com>
2069
2070         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
2071         descriptors.
2072
2073         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
2074         special case and handle mono_arch_delegate_invoke_impl() returning
2075         function descriptors.
2076
2077         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
2078         trampolines return function descriptors, too.
2079
2080 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
2081
2082         * method-to-ir.c (handle_alloc): Avoid generic instances in the
2083         out_of_line optimization.
2084
2085 2009-01-21  Martin Baulig  <martin@ximian.com>
2086
2087         * mini.h
2088         (MonoCompile): Added `disable_deadce_vars' to disable removing
2089         unused variables.
2090
2091         * mini.c
2092         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
2093         inside the debugger.
2094
2095         * liveness.c (mono_analyze_liveness): Don't remove any unused
2096         variables if `cfg->disable_deadce_vars' is set.
2097
2098 2009-01-21  Mark Probst  <mark.probst@gmail.com>
2099
2100         * method-to-ir.c: Only apply exception constructor optimization if
2101         the the method actually belongs to an exception class.  Fixes
2102         #467456.
2103
2104 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
2105
2106         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
2107         change inside a #ifdef __mono_ppc64__.
2108
2109         * aot-compiler.c (compile_method): Remove the previous limitation.
2110
2111         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
2112         on type variables in AOTed code.
2113         
2114         * aot-compiler.c (compile_method): Skip generic methods having type 
2115         constraints on their generic parameters.
2116
2117         * aot-compiler.c (compile_method): Check for methods which cannot be
2118         encoded inside RGCTX_FETCH patches as well.
2119
2120         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
2121         build.
2122
2123 2009-01-20  Mark Probst  <mark.probst@gmail.com>
2124
2125         * method-to-ir.c: Force the vtable variable in shared generic code
2126         for the case that they might show up on a stack trace where they
2127         are needed.
2128
2129         * mini-exceptions.c: Save and use generic sharing info as well as
2130         IP in stack traces to resolve shared generic instantiations.
2131
2132 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
2133
2134         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
2135         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
2136
2137 2009-01-20  Mark Probst  <mark.probst@gmail.com>
2138
2139         * method-to-ir.c: Do generic sharing for array constructors.
2140
2141 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
2142
2143         * mini-exceptions.c (mono_print_thread_dump): Add information
2144         about the thread state using wapi_current_thread_desc.
2145
2146 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
2147
2148         * basic-simd.cs: Tests for the new constructors. 
2149
2150 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
2151
2152         * mini-ops.h: Added OP_EXPAND_*
2153
2154         * cpu-x86.md: Same.
2155
2156         * mini-x86.c (mono_arch_output_basic_block): Same.
2157         
2158         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
2159
2160 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
2161
2162         * iltests.il.in: Add a test for #467385.
2163
2164 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
2165
2166         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
2167         thread been cleaned up is not the same currently in execution.
2168
2169         Fixes appdomain-unload crashes on windows, osx and linux variants
2170         without the __thread keyword.
2171
2172 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
2173
2174         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
2175         (koush@koushikdutta.com). Implement this for android.
2176
2177         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
2178         begins with a digit.
2179
2180         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
2181         mono_marshal_get_write_barrier ().
2182
2183 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
2184
2185         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
2186         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
2187         that pass them on a register pair.
2188
2189         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
2190         test was crashing due to that.
2191
2192 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
2193
2194         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
2195         trampoline code. Include ucontext.h only if available.
2196
2197 2009-01-15  Mark Probst  <mark.probst@gmail.com>
2198
2199         * mini.c: mono_domain_lookup_shared_generic() takes an open method
2200         and doesn't check whether it's sharable, like it was before
2201         removing the shared generics hash.  This brings IronPython
2202         performance back to what it was before that change.
2203
2204 2009-01-14  Mark Probst  <mark.probst@gmail.com>
2205
2206         * method-to-ir.c: Handle delegate invocation optimization earlier,
2207         otherwise it would be handled (much more slowly) by the
2208         final/sealed optimization.
2209
2210 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
2211
2212         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
2213         domain is not set. Fixes #465864.
2214
2215 2009-01-12  Mark Probst  <mark.probst@gmail.com>
2216
2217         * method-to-ir.c: Don't stop sharing of generic methods with catch
2218         clauses - we already handle those.
2219
2220 2009-01-12  Mark Probst  <mark.probst@gmail.com>
2221
2222         * mini.c, mini.h: lookup_generic_method() is now
2223         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
2224         making the shared_generics_hash obsolete.
2225
2226 2009-01-12  Mark Probst  <mark.probst@gmail.com>
2227
2228         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
2229         use the red zone.  Make room on the stack first and then use it,
2230         not the other way around.
2231
2232 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
2233
2234         * mini.c (mini_init): Call mono_xdebug_init ().
2235
2236         * aot-compiler.c (mono_xdebug_init): Make this non-static.
2237
2238 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
2239
2240         * TestDriver.cs: Add an --iter argument to run tests multiple times.
2241
2242         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
2243         trampolines.
2244
2245         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
2246         debug+unwind info for trampolines.
2247
2248         * mini.c (mono_create_unwind_op): New helper function.
2249
2250         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
2251
2252 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
2253
2254         * aot-compiler.c: Fix the build.
2255
2256 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
2257
2258         * Makefile.am: Update dtrace-prelink.sh location.
2259
2260 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
2261
2262         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
2263         optimization. Fixes #464520.
2264
2265 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
2266
2267         * mini-amd64.c : Adding code to save/restore non-volatile registers
2268            on Winx64.
2269
2270         * exceptions-amd64.c : Adding code to save/restore non-volatile 
2271           registers on Winx64.
2272
2273         Contributed under MIT/X11 license.
2274
2275 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
2276
2277         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
2278         __GNUC_MINOR__ which can break when the major version changes.
2279
2280 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
2281
2282         * basic-simd.cs: Add tests for usage of the sizeof opcode.
2283
2284 2009-01-07  Geoff Norton  <gnorton@novell.com>
2285
2286         * helpers.c:  Allow mono -v -v -v to work on darwin.
2287
2288 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
2289
2290         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
2291           pattern. 
2292
2293         Contributed under MIT/X11 license.
2294
2295 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
2296
2297         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
2298         instead of directly accessing type->data.klass. Fixes #462016.
2299         (mono_allocate_stack_slots_full): Ditto.
2300
2301         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
2302         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
2303
2304         * aot-compiler.c (emit_plt): Fix ARM build.
2305
2306 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
2307
2308         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
2309         
2310         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
2311         change.
2312
2313         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
2314         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
2315         #463357.
2316
2317         * iltests.il.in: Add a regression test.
2318
2319 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
2320
2321         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
2322
2323 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
2324
2325         * basic-simd.cs: Add a regression test for #462457.
2326
2327 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
2328
2329         * mini-ops.h: Add a definition of XPHI.
2330
2331         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
2332
2333         * ssa.c (op_phi_to_move): Handle XPHI.
2334
2335         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
2336
2337         Fixes #462457
2338
2339 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
2340
2341         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
2342
2343 2008-12-31  Geoff Norton  <gnorton@novell.com>
2344
2345         * mini-ppc.c: The prolog size allocated can be too small for darwin
2346         ppc32 under certain circumstances.  Also fix a small logic bug.
2347
2348 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
2349
2350         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
2351         while loading AOT methods.
2352
2353         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
2354         since only the former is nulled out after a successful cast. This prevents
2355         crashes with rethrown exceptions when using --debug=casts.
2356
2357 2008-12-24  Mark Probst  <mark.probst@gmail.com>
2358
2359         * mini.h: New macro for checking whether a method is final,
2360         i.e. whether the method or its class is marked final.
2361
2362         * method-to-ir.c: Use the new macro for all final-checks
2363         consistently.  Fixes the crash in the System.ServiceModel tests.
2364
2365 2008-12-23  Mark Probst  <mark.probst@gmail.com>
2366
2367         * mini-exceptions.c (get_exception_catch_class): Corrected another
2368         overly strict assertion.
2369
2370 2008-12-23  Mark Probst  <mark.probst@gmail.com>
2371
2372         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
2373         Clobbering it is not allowed because the caller might use it as
2374         the vtable register in the interface call.
2375
2376 2008-12-19  Mark Probst  <mark.probst@gmail.com>
2377
2378         * mini-exceptions.c (get_exception_catch_class): Corrected an
2379         overly strict assertion.
2380
2381 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
2382         
2383         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
2384
2385         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
2386
2387         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
2388
2389         * cpu-mips.md: correct lengths for certain long_ opcodes.
2390
2391         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
2392
2393         * 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().
2394         
2395 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
2396
2397         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
2398         
2399 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
2400         
2401         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
2402         
2403 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
2404
2405         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
2406         next basic block.
2407         
2408 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
2409
2410         * 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
2411
2412         * 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)
2413         
2414 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
2415         
2416         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
2417         
2418 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
2419
2420         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
2421         gshared code. Fixes #458947.
2422
2423         * generics.cs: Add a test.
2424
2425 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
2426         
2427         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2428         
2429         * mini-mips.c: first pass n32 code generation.
2430
2431         * mini-mips.h: datatypes and defines for n32 support.
2432
2433         * exceptions-mips.c: first pass n32 code generation.
2434         
2435         * tramp-mips.c: first pass n32 code generation.
2436         
2437         * cpu-mips.md: add long_ opcodes.
2438         
2439 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
2440
2441         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2442
2443         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2444         
2445         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2446         
2447         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2448
2449         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2450
2451         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2452
2453         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2454
2455         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
2456
2457         * helpers.c: for mips/n32, don't pass -mips32 to objdump
2458
2459 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
2460
2461         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
2462
2463 2008-12-12  Andres G. Aragoneses  <aaragoneses@novell.com>
2464
2465         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
2466
2467 2008-12-12  Mark Probst  <mark.probst@gmail.com>
2468
2469         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
2470         descriptors for helper functions directly in front of the code.
2471
2472 2008-12-11  Mark Probst  <mark.probst@gmail.com>
2473
2474         * method-to-ir.c: Removed an unnecessary assertion.
2475
2476 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
2477
2478         * method-to-ir.c: Merge SGEN changes from the old JIT.
2479
2480 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
2481
2482         * driver.c (compile_all_methods_thread_main): Handle failure of
2483         mono_get_method ().
2484
2485 2008-12-10  Mark Probst  <mark.probst@gmail.com>
2486
2487         * mini-ppc.c: Merged with mini-ppc64.c.
2488
2489         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
2490
2491         * Makefile.am: Use the same sources for PPC and PPC64.
2492
2493         * mini-ppc64.c: Removed.
2494
2495 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
2496
2497         * branch-opts.c (remove_block_if_useless): Extract fall through detection
2498         code to mono_bb_is_fall_through.
2499         
2500         * branch-opts.c (mono_remove_critical_edges): Same.
2501
2502 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
2503
2504         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
2505         expect that an OP_BR_REG will be there.
2506
2507 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
2508
2509         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
2510         for the many branch ops. The original check miss OP_BR_REG.
2511
2512         Fixes #457574.
2513         
2514 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
2515
2516         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
2517
2518 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
2519
2520         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
2521         while holding the aot lock.
2522
2523 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
2524
2525         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
2526         
2527 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
2528
2529         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
2530           to release all runtime callable wrappers held by the runtime.
2531
2532         Contributed under MIT/X11 license.
2533
2534 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
2535
2536         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
2537           for Winx64.
2538
2539         Contributed under MIT/X11 license.
2540
2541 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
2542
2543         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
2544         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
2545
2546 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
2547
2548         * cpu-mips.md: fix ckfinite length
2549
2550         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
2551         (mono_arch_lowering_pass): cleanup, rearrange for clarity
2552         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
2553         
2554 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
2555
2556         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
2557         
2558 2008-12-08  Geoff Norton  <gnorton@novell.com>
2559
2560         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
2561         size by 8 bytes as well.
2562
2563 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2564
2565         * basic-simd.cs: Fix method names for Vector16b.
2566         
2567 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2568
2569         * basic-simd.cs: Fix method names for Vector16sb.
2570
2571 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2572
2573         * basic-simd.cs: Fix method names for Vector8us.
2574         
2575 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2576
2577         * basic-simd.cs: Fix method names for Vector8s.
2578         
2579 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2580
2581         * basic-simd.cs: Fix method names for Vector4ui.
2582
2583 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2584
2585         * basic-simd.cs: Fix method names for Vector2l.
2586
2587 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2588
2589         * basic-simd.cs: Fix method names for Vector2d.
2590
2591 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2592
2593         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
2594         that are extension methods.
2595
2596 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2597
2598         * basic-simd.cs: Fix method names for Vector4f.
2599
2600 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
2601
2602         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
2603         as such. Fixes #456669.
2604
2605 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
2606
2607         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
2608         
2609 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
2610
2611         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
2612         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
2613         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
2614         (mips_adjust_stackframe): handle FP spills
2615                 
2616         * mini-ops.h: add mips_mtc1_s2
2617         
2618         * cpu-mips.md: add mips_mtc1_s2
2619         
2620 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
2621
2622         * unwind.c: New file, move the unwind info encoding functions here from
2623         aot-compiler.c, so they could be used at runtime too.
2624
2625 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
2626
2627         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
2628         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
2629         
2630 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
2631
2632         * mini-mips.c: cleanup warnings
2633         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
2634         (mips_adjust_stackframe): handle case of taking the address of stack locals
2635         
2636 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
2637
2638         * aot-compiler.c: Implement a few functions missing from the asm writer.
2639         (emit_method_code): Only write symbols for methods when using the bin
2640         writer, since the assembler can't deal with the characters in our method
2641         names.
2642
2643         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
2644
2645         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
2646         call.
2647
2648         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
2649         a bit to also restore %rax.
2650
2651 2008-12-05  Mark Probst  <mark.probst@gmail.com>
2652
2653         * mini-ppc.c: Some simple merges from mini-ppc64.c.
2654
2655 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
2656
2657         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
2658         arguments.
2659
2660 2008-12-05  Mark Probst  <mark.probst@gmail.com>
2661
2662         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
2663
2664         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
2665         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
2666
2667         * exceptions-ppc64.c: Removed.
2668
2669         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
2670
2671 2008-12-05  Mark Probst  <mark.probst@gmail.com>
2672
2673         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
2674         tramp-ppc64.c.
2675
2676         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
2677
2678         * tramp-ppc64.c: Removed.
2679
2680 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
2681
2682         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
2683         the TYPESPEC table.
2684
2685 2008-12-05  Mark Probst  <mark.probst@gmail.com>
2686
2687         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
2688
2689         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
2690         mini-ppc.h instead of mini-ppc64.h.
2691
2692         * mini-ppc64.h: Removed.
2693
2694 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
2695
2696         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
2697         
2698         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
2699         
2700 2008-12-05  Mark Probst  <mark.probst@gmail.com>
2701
2702         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
2703         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
2704         code easier.
2705
2706 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
2707
2708         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
2709
2710 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
2711
2712         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
2713
2714 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
2715
2716         * basic-simd.cs: Tests for operator == and != on Vector4f.
2717
2718 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
2719
2720         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
2721
2722         * simd-intrinsics.c: Kill useless enum.
2723
2724 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
2725
2726         * cpu-mips.md: add long_conv_to_ovf_i4_2
2727         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
2728
2729 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
2730
2731         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
2732         
2733         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
2734
2735 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
2736
2737         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
2738         
2739 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
2740
2741         * basic-simd.cs: Add tests for new methods.
2742
2743 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
2744
2745         * simd-intrinsics.c: Add support for operator == and !=
2746         on Vector4(u)i.
2747
2748         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
2749
2750 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
2751
2752         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
2753
2754 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
2755
2756         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
2757
2758         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
2759         MONO_PATCH_INFO_ICALL_ADDR.
2760
2761         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
2762
2763         * aot-compiler.c: Resurrect full-aot support.
2764
2765 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
2766
2767         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
2768         
2769 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
2770
2771         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
2772         
2773 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
2774
2775         * basic-simd.cs: Fix tests to work under ppc.
2776         Remove tests for methods that will be removed.
2777
2778 2008-12-03  Mark Probst  <mark.probst@gmail.com>
2779
2780         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
2781         generic type (via a typedef or typeref) correctly.
2782
2783 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
2784
2785         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
2786         diagnose an assertion failure.
2787
2788 2008-12-02  Mark Probst  <mark.probst@gmail.com>
2789
2790         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
2791         Fix trampoline size.
2792
2793         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
2794         conversion opcodes are implemented natively instead via emulation.
2795
2796 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
2797
2798         * cpu-mips.md: remove mips_xori
2799
2800         * mini-ops.h:  remove mips_xori
2801
2802         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
2803
2804         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
2805         
2806         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
2807         
2808 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
2809
2810         * cpu-mips.md: fix instruction lengths.
2811
2812         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
2813
2814         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
2815
2816         * mini-ops.h: fix slti / sltiu op profiles.
2817         
2818 2008-12-02  Martin Baulig  <martin@ximian.com>
2819
2820         * method-to-ir.c (mono_method_to_ir): Disable debugging
2821         information for the init locals block to make the debugger stop
2822         after all locals have been initalized.
2823
2824 2008-12-02  Martin Baulig  <martin@ximian.com>
2825
2826         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
2827         running inside the debugger.
2828
2829 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
2830
2831         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
2832         is enabled.
2833
2834         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
2835         alu->alu imm optimization which only shows if deadce is disabled.
2836
2837         * aot-compiler.c: Rename the function names for the binary and asm writers
2838         so they can coexist in the same process. Rework the xdebug code to use the
2839         asm writer. This avoids the need to call into the runtime to dump the
2840         debugging info. Add more debugging info for types.
2841
2842         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
2843
2844         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
2845         cpu description tables, they can't occur in cpu-<ARCH>.md.
2846
2847         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
2848         the stack in CEE_LDFLDA. Fixes #450542.
2849
2850         * generics.cs: Add a new test.
2851
2852 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
2853
2854         * mini-ops.h: updated MIPS opcodes
2855         * mini-mips.c: decompose long opts
2856         * mini-mips.h: decompose long opts
2857         
2858 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
2859
2860         * cpu-mips.md: fix length on int_rem_un
2861         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
2862         
2863 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
2864
2865         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
2866
2867         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
2868
2869 2008-11-29  Martin Baulig  <martin@ximian.com>
2870
2871         * mini-exceptions.c (mono_handle_native_sigsegv): Check
2872         mono_debug_using_mono_debugger() in addition to the
2873         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
2874
2875 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
2876
2877         * mini-ops.h: updated more MIPS opcodes
2878         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
2879         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
2880         
2881 2008-11-28  Mark Probst  <mark.probst@gmail.com>
2882
2883         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
2884
2885 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
2886
2887         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
2888         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
2889         * mini-ops.h: correct selected mips opcode entries
2890         
2891 2008-11-28  Mark Probst  <mark.probst@gmail.com>
2892
2893         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
2894         make them work.
2895
2896 2008-11-28  Mark Probst  <mark.probst@gmail.com>
2897
2898         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
2899
2900 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
2901
2902         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
2903         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
2904         * mini-mips.h: disable IMT
2905         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
2906         
2907 2008-11-28  Mark Probst  <mark.probst@gmail.com>
2908
2909         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
2910
2911 2008-11-28  Mark Probst  <mark.probst@gmail.com>
2912
2913         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
2914
2915 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
2916
2917         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
2918         consistency.
2919
2920 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
2921
2922         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
2923         for Set/GetVector aligned versions.
2924
2925 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
2926
2927         * basic-simd.cs: Add tests for Get/SetVector.
2928
2929 2008-11-27  Mark Probst  <mark.probst@gmail.com>
2930
2931         * mini.c: Removed g_slist_append_mempool().  Now in
2932         metadata/mempool.c.
2933
2934 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
2935
2936         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
2937         size properly and make the bounds check optional.
2938
2939         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
2940         for SetVector and IsAligned.
2941
2942 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
2943
2944         * mini.c: Remove unused mono_normalize_opcodes () function.
2945
2946 2008-11-26  Mark Probst  <mark.probst@gmail.com>
2947
2948         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
2949         using the new atomic add ops now.
2950
2951         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
2952         add.
2953
2954 2008-11-26  Mark Probst  <mark.probst@gmail.com>
2955
2956         * mini-ppc64.c: Several fixes.
2957
2958 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
2959
2960         * cpu-mips.md: added jump_table
2961         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
2962
2963 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
2964
2965         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
2966
2967 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
2968
2969         * mini-ops.h: corrected a handful of MIPS opcodes.
2970
2971 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
2972
2973         * aot-compiler.c: MIPS to use ELF writer
2974
2975 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
2976
2977         * mini-codegen.c: remove MIPS specific assert.
2978
2979 2008-11-25  Mark Probst  <mark.probst@gmail.com>
2980
2981         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
2982         fixes.  PPC64 now passes most of the runtime regressions.
2983
2984 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
2985
2986         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
2987         volatile intervals a bit.
2988
2989 2008-11-24  Mark Probst  <mark.probst@gmail.com>
2990
2991         * basic-long.cs: New test case.
2992
2993 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
2994
2995         * mini.c (mini_method_compile): Disable globalra for large methods for 
2996         now.
2997
2998         * regalloc2.c (order_moves): Add fp support.
2999
3000         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
3001         source bblock ends with an OP_BR_REG.
3002
3003         * ratests.cs: Add a new test.
3004
3005 2008-11-23  Mark Probst  <mark.probst@gmail.com>
3006
3007         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
3008         sharing.  PPC64 now passes generics.exe.
3009
3010 2008-11-23  Mark Probst  <mark.probst@gmail.com>
3011
3012         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
3013
3014 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
3015
3016         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
3017         memory when mono_jit_info_table_find () can't find the method in the
3018         LMF case.
3019
3020         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
3021         AOTed code too.
3022         
3023         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
3024         writer too.
3025
3026 2008-11-23  Mark Probst  <mark.probst@gmail.com>
3027
3028         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
3029         Several fixes.  PPC64 now runs exceptions.exe and
3030         devirtualization.exe.
3031
3032 2008-11-22  Mark Probst  <mark.probst@gmail.com>
3033
3034         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
3035         arrays.exe and basic-math.exe.
3036
3037 2008-11-22  Mark Probst  <mark.probst@gmail.com>
3038
3039         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
3040         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
3041
3042 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
3043
3044         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
3045
3046 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
3047
3048         * method-to-ir.c: Move bounds checking macros to ir-emit.h
3049
3050         * ir-emit.h: Move macros from method-to-ir.c to here.
3051
3052 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
3053
3054         * mini-ops.h: Correct the long simd ops to use LREG.
3055
3056 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
3057
3058         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
3059         
3060         * mini-ops.h: Correct the dreg type of a few long opcodes.
3061
3062         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
3063         Add netbsd support.
3064
3065 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
3066
3067         * mini-ppc.c: remove negative stack references in epilog
3068         for platforms that don't support the red zone.
3069
3070 2008-11-21  Mark Probst  <mark.probst@gmail.com>
3071
3072         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
3073         point regs.  Now PPC64 passes basic-calls.exe.
3074
3075 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3076
3077         * basic-simd.cs: Add tests for accessors of Vector2l.
3078
3079 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3080
3081         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
3082
3083         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
3084         
3085         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
3086
3087 2008-11-21  Mark Probst  <mark.probst@gmail.com>
3088
3089         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
3090         PPC64 passes basic-long.exe.
3091
3092 2008-11-20  Mark Probst  <mark.probst@gmail.com>
3093
3094         * decompose.c: Decompose carry and overflow add on PPC64 like on
3095         other 64 bit archs.  Don't decompose sub at all on PPC64.
3096
3097         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
3098         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
3099         basic-long.exe.
3100
3101 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3102
3103         * basic-simd.cs: Add tests for accessors of Vector2d.
3104
3105 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3106
3107         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
3108
3109         * cpu-x86.md: Same.
3110
3111         * mini-x86.c (mono_arch_output_basic_block): Same.
3112         
3113         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
3114
3115 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3116
3117         * basic-simd.cs: Add tests for accessors of Vector4f.
3118
3119 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3120
3121         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
3122
3123         * cpu-x86.md: Same.
3124
3125         * mini-x86.c (mono_arch_output_basic_block): Same.
3126         
3127         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
3128
3129 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3130
3131         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
3132
3133 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3134
3135         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
3136
3137         * cpu-x86.md: Same.
3138
3139         * mini-x86.c (mono_arch_output_basic_block): Same.
3140         
3141         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
3142
3143 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3144
3145         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
3146
3147 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3148
3149         * simd-intrinsics.c: Enable setters for Vector16sb.
3150
3151 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3152
3153         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
3154
3155         * cpu-x86.md: Same.
3156
3157         * mini-x86.c (mono_arch_output_basic_block): Same.
3158         
3159         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
3160
3161 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
3162
3163         * simd-intrinsics.c: Implement setter for Vector8us.
3164
3165 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
3166
3167         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
3168         for dead variables.
3169
3170 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
3171
3172         * mini-ppc.c: remove references to the red zone in the prolog
3173         (for systems that don't support it).
3174
3175 2008-11-19  Mark Probst  <mark.probst@gmail.com>
3176
3177         * cpu-ppc64.md: Fixed a few instruction lengths.
3178
3179         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
3180         now.
3181
3182 2008-11-19  Mark Probst  <mark.probst@gmail.com>
3183
3184         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
3185         basic.exe now.
3186
3187 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
3188
3189         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
3190
3191 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
3192
3193         * mini-ops.h: Added OP_INSERT_I2.
3194
3195         * cpu-x86.md: Same.
3196
3197         * mini-x86.c (mono_arch_output_basic_block): Same.
3198         
3199         * simd-intrinsics.c: Implement setter for Vector8s.
3200
3201         * simd-methods.h: Add the names of get setters of Vector8s.
3202
3203 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
3204
3205         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
3206         
3207         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
3208         parameters.
3209
3210         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
3211
3212 2008-11-18  Mark Probst  <mark.probst@gmail.com>
3213
3214         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
3215         for PPC64.  An empty program runs now.
3216
3217 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
3218
3219         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
3220
3221         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
3222         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
3223         info for JITted code is emitted into a shared library, loadable into gdb.
3224
3225 2008-11-18  Mark Probst  <mark.probst@gmail.com>
3226
3227         * Makefile.am: Changes to build PPC64.
3228
3229         * mini-arch.h: Include mini-ppc64.h on PPC64.
3230
3231 2008-11-18  Mark Probst  <mark.probst@gmail.com>
3232
3233         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
3234         in PPC code up to r119147.
3235
3236 2008-11-18  Mark Probst  <mark.probst@gmail.com>
3237
3238         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
3239         cpu-ppc64.md: Changes for PPC64.
3240
3241         Based on code submitted by andreas.faerber@web.de at
3242         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
3243         X11/MIT license.
3244
3245 2008-11-18  Mark Probst  <mark.probst@gmail.com>
3246
3247         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
3248         cpu-ppc64.md: Copied from the corresponding PPC files from
3249         r118846.
3250
3251 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
3252
3253         * mini-ops.h: Added OP_ROUND.
3254
3255         * cpu-x86.md: Added round.
3256
3257         * mini-x86.c: Added support for intrinsicing Math.Round (double).
3258
3259         * basic-math.cs: Added test_0_round to test rounding.
3260
3261         Contributed under MIT/X11 license.
3262
3263 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
3264
3265         * aot-compiler.c : Fix the Winx64 build.
3266
3267         Contributed under MIT/X11 license.
3268
3269 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
3270
3271         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
3272         in OP_EXTRACT_R8 to avoid possible stack corruption.
3273
3274 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
3275
3276         * mini-ops.h: Added OP_EXTRACT_R8/I8.
3277
3278         * cpu-x86.md: Added extract_r8.
3279
3280         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
3281         
3282         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
3283         a couple of OP_EXTRACT_I4.
3284
3285         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
3286
3287         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
3288
3289 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
3290
3291         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
3292         and not 4.1. 
3293
3294 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
3295
3296         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
3297         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
3298
3299         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
3300         are not needed any more.
3301
3302         * mini.h: Remove the unused INS_LIST macros.
3303
3304         * mini.c (mini_method_compile): Remove a disable globalra case which is no
3305         longer needed.
3306
3307         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
3308         ir-emit.h.
3309
3310         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
3311         mono_alloc_ireg () instead.
3312
3313         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
3314         macros.
3315
3316         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
3317         on amd64.
3318
3319         * aot-runtime.c (load_aot_module): Disable AOT when running under
3320         CAS.
3321
3322         * mini-amd64.h: Change the monitor fastpath defines to check for
3323         !PLATFORM_WIN32 so they work on *bsd too.
3324
3325         * mini.h mini.c mini-hhpa.c: Remove more unused code.
3326
3327         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
3328
3329         * mini.h (MonoCompile): Remove new_ir flag.
3330
3331         * regalloc.h regalloc.c: Remove unused code.
3332
3333         * cpu-*.md: Remove more unused opcodes.
3334
3335         * simple-cee-ops.h simple-mini-ops.h: Removed.
3336
3337         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
3338         
3339 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
3340
3341         * aliasing.h: Removed.
3342
3343         * *.c: Remove references to aliasing.h and inssel.h.
3344
3345         * mini.c: Remove additional unused functions.
3346
3347         * mini-ops.h cpu-*.md: Remove unused opcodes.
3348
3349 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
3350
3351         Remove the old JIT code.
3352
3353         * inssel*.brg: Removed.
3354
3355         * ssa.c abcremoval.c aliasing.c: Removed.
3356
3357         * ssa2.c: Renamed to ssa.c.
3358
3359         * abcremoval2.c: Renamed to abcremoval.c.
3360
3361         * *.c: Removed all !cfg->new_ir code.
3362
3363         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
3364         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
3365
3366         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
3367         
3368 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
3369
3370         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
3371         to simplify the code and cut back on the number of global symbols in the AOT
3372         file.
3373         
3374         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
3375
3376 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
3377
3378         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
3379         with the got/got_info tables.
3380
3381         * mini.h: Bump AOT file format version.
3382         
3383         * unwind.h: New file, contains definitions for stack unwinding.
3384
3385         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
3386         to cfg->unwind_ops.
3387         
3388         * aot-compiler.c: Generalize the emitting of unwind information to use the
3389         information in cfg->unwind_ops.
3390
3391         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
3392
3393         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
3394         AOT method frames. Enable writing symbols for methods by default.
3395
3396 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
3397
3398         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
3399         and make it work with vectors of element sizes 1, 2 and 4.
3400
3401         * simd-intrinsics.c: Enable getter for all vectors with element size
3402         1, 2 or 4.
3403
3404         * simd-methods.h: Add the names of other getters.
3405
3406         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
3407
3408         * cpu-x86.md: Same.
3409
3410         * mini-x86.c: Same.
3411
3412 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
3413
3414         * mini-ppc.h: portability fix.
3415
3416 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
3417
3418         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
3419         buggy and will overwrite it.
3420
3421 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
3422
3423         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
3424         Use it to emit local symbols for all methods so AOTed methods show up with
3425         their full name in gdb/valgrind output.
3426
3427 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
3428
3429         * mini-ppc.c: portability fixes.
3430
3431 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
3432
3433         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
3434         entries out of the if (!generic_shared...) code so it is always done.
3435         (mono_class_init_trampoline): Do the patching when running under valgrind
3436         too, newer versions of valgrind have no problems with it.
3437
3438 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
3439
3440         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
3441         further sections.
3442
3443 2008-11-13  Mark Probst  <mark.probst@gmail.com>
3444
3445         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
3446         filters.
3447
3448 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
3449
3450         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
3451
3452 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
3453
3454         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
3455
3456         * cpu-x86.md: Same.
3457
3458         * mini-x86.c: Same.
3459
3460         * simd-intrinsics.c: Same.
3461
3462 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
3463
3464         * simd-intrinsics.c: Enable constructor intrinsics for all types.
3465
3466 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
3467
3468         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
3469         to work with more Vector types.
3470
3471 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
3472
3473         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
3474         store the elemens directly instead of using and intermediate.
3475
3476 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
3477
3478         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
3479
3480         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
3481         to preserve %eax for aot plt trampolines.
3482
3483         * aot-compiler.c (compile_method): Don't skip synchronized methods.
3484         (encode_method_ref): Flag synchronized methods so they won't go through
3485         the AOT trampoline.
3486
3487         * aot-compiler.c: Additional work to support AOTing synchronized methods/
3488         wrappers.
3489
3490         * cpu-ia64.md (jmp): Increase max length.
3491
3492 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
3493
3494         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
3495         open generic classes.
3496
3497         * aot-compiler.c: Enable the ELF writer on ELF platforms.
3498
3499         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
3500         box+brtrue optimization since it causes test failures on x86.
3501
3502 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
3503
3504         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
3505
3506         * cpu-x86.md: Same.
3507
3508         * mini-x86.c: Same.
3509
3510         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
3511         for simd ctor values. 
3512
3513         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
3514         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
3515
3516 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
3517
3518         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
3519         LogicalRightShift.
3520
3521         * simd-instrincs.c: Same.
3522
3523         * basic-simd.cs: Same.
3524
3525 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
3526
3527         * ratests.cs: Add more tests.
3528
3529         * regalloc2.c (add_spill_code): Handle more corner cases.
3530
3531 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
3532
3533         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
3534         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
3535         both the source an destination of an instruction.
3536
3537 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
3538
3539         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
3540         wapihandles.c: more portability changes.
3541
3542 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
3543
3544         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
3545         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
3546         safe to execute in a signal handler and the kernel provides better
3547         the info in /proc/self/smaps. Avoid the assert on sigaction during
3548         cleanup.
3549
3550 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
3551
3552         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
3553         do the bblock linking hack if it is actually needed.
3554
3555         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
3556         up linking.
3557
3558         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
3559         crash problem is fixed.
3560
3561         * branch-opts.c (mono_remove_critical_edges): Link up newly added
3562         bblocks.
3563
3564         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
3565         for catch clauses.
3566         (mini_method_compile): Set the starting value of next_vreg to 
3567         MAX_IREGS + MAX_FREGS when using globalra.
3568
3569         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
3570         filter clauses with BB_EXCEPTION_HANDLER.
3571
3572         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
3573
3574 2008-11-10  Mark Probst  <mark.probst@gmail.com>
3575
3576         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
3577         space for stdcall.  Fixes regressions on Win32.
3578
3579 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
3580
3581         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
3582         bblocks.
3583         (linear_scan): Remove an assert which doesn't seem to be needed.
3584
3585         * local-propagation.c (mono_local_deadce): Avoid a call to
3586         MONO_DELETE_INS which would screw up the instruction linking.
3587
3588         * mini.c (mono_decompose_op_imm): Make this work with globalra.
3589
3590         * regalloc2.c: Upgrade to work the current JIT code.
3591
3592 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
3593
3594         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
3595         case.
3596
3597         * aot-runtime.c: Remove some dead code.
3598
3599         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
3600         consistency.
3601         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
3602
3603         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
3604         trampolines using sscanf since atoi doesn't work on large unsigned values.
3605
3606         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
3607         Initialize code_size.
3608
3609 2008-11-08  Mark Probst  <mark.probst@gmail.com>
3610
3611         * method-to-ir.c (mini_emit_inst_for_method): Make
3612         Interlocked.CompareExchange work for Int arguments on 32 bit
3613         archs, as well.
3614
3615 2008-11-07  Mark Probst  <mark.probst@gmail.com>
3616
3617         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
3618
3619 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
3620
3621         * main.c Fix MSVC build.
3622
3623         Contributed under MIT/X11 license.
3624
3625 2008-11-06  Mark Probst  <mark.probst@gmail.com>
3626
3627         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
3628         alignment larger than 8 bytes are aligned correctly, too.
3629
3630         * mini.c: Honor the min_align field of MonoClass when laying out
3631         the stack.
3632
3633 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
3634
3635         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
3636
3637         * aot-compiler.c (emit_plt): Fix a warning.
3638         
3639         * aot-compiler.c: Implement ARM support in the binary writer.
3640
3641 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
3642
3643         * basic-simd.cs: Add test for getter with byref arg.
3644         Fix the naming of a few tests.
3645         Add missing checks to a test.
3646
3647 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
3648
3649         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
3650
3651         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
3652         most of the full-aot support for monitor enter/exit trampolines.
3653
3654         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
3655         enter/exit trampoline creation functions.
3656
3657         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
3658         make dist.
3659
3660 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
3661
3662         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
3663         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
3664         implement the needed functionality without adding crap to the runtime.
3665
3666 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
3667
3668         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
3669         non-x86 builds.
3670
3671         * mini.c (mono_build_date): New global version holding the build date in
3672         string format.
3673         
3674         * Makefile.am (buildver.c): Generate a file containing the build date.
3675
3676         * main.c: Set the build date from the generated file.
3677
3678         * mini.c (mono_get_runtime_build_info): New helper function returning build
3679         information in a string format.
3680         
3681         * driver.c (mono_main): Print the build date in --version.
3682
3683         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
3684         file when the bind-to-runtime-version option is used.
3685
3686 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
3687
3688         * simd-intrinsics.c: Fix bug when using getters and byref args. 
3689
3690 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
3691
3692         * simd-methods.h: Rename prefetch methods.
3693
3694         * simd-intrinsics.c: Same.      
3695
3696 2008-11-05  Mark Probst  <mark.probst@gmail.com>
3697
3698         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
3699         sizes.
3700
3701 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
3702
3703         * aot-compiler.c: Use the bundled elf header files instead of depending on
3704         the system one.
3705         
3706         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
3707         mempool.
3708
3709         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
3710         on every call.
3711
3712 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
3713
3714         * cpu-x86.md: Add store nta ops.
3715
3716         * mini-ops.h: Same.
3717
3718         * mini-x86.c: Same.
3719
3720         * mini.h: Add an enum for simd prefetch modes.
3721
3722         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
3723         of store. Use the changed code to support store nta.
3724
3725         * simd-intrinsics.c: Add prefetch ops for all vector types.
3726
3727 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
3728
3729         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
3730         threads.
3731         
3732         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
3733         names.
3734
3735         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
3736         trampolines.
3737
3738 2008-11-04  Mark Probst  <mark.probst@gmail.com>
3739
3740         * mini-x86.c: Fixed commit.
3741
3742 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
3743
3744         * aot-compiler.c (emit_plt): Align the plt section only on x86.
3745
3746 2008-11-04  Mark Probst  <mark.probst@gmail.com>
3747
3748         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
3749         and MONITOR_EXIT, for the ASM fastpaths.
3750
3751         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
3752         available.
3753
3754         * mini.c, patch-info.h: Signature and patch infos for
3755         Monitor.Enter/Exit trampolines.
3756
3757         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
3758
3759         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
3760         Monitor.Enter/Exit ASM fastpath for Linux.
3761
3762 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
3763
3764         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
3765
3766         * objects.cs: Add a new test.
3767         
3768         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
3769
3770         * aot-runtime.c (load_method): Run class initialization in the PLT case even
3771         if MONO_LOG_LEVEL is set.
3772
3773         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
3774
3775         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
3776
3777         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
3778         
3779         * aot-compiler.c: Change the relocation code to use virtual addresses instead
3780         of file offsets. Align the sections belonging to the data segment to 
3781         PAGESIZE.
3782
3783 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
3784
3785         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
3786         elf.h. Port it to amd64.
3787
3788 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
3789
3790         * driver.c: Enable SIMD by default.
3791
3792 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
3793
3794         * cpu-x86.md: Add prefetch op.
3795
3796         * mini-ops.h: Same.
3797
3798         * mini-x86.c: Same.
3799
3800         * mini.h: Add an enum for simd prefetch modes.
3801
3802         * simd-methods.h: Add prefetch function names.
3803
3804         * simd-intrinsics.c: Add prefetch ops for all vector types.
3805
3806 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
3807
3808         * aot-compiler.c (emit_bytes): Speed this up a little.
3809
3810 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
3811
3812         * aot-compiler.c: Add JIT time etc. statistics.
3813         
3814         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
3815
3816         * mini.h (MonoCompile): Add 'got_offset' field.
3817
3818         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
3819         method_got_offsets array.
3820
3821         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
3822         wrappers.
3823
3824         * aot-compiler.c (compile_method): Add generic method instances referenced
3825         by the method to the list of methods to be compiled, this is required so if
3826         A<T> references B<T>, and another assembly references A<int>, then it will
3827         also get a copy of B<int>.
3828
3829         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
3830         when checking for monitor enter/exit.
3831
3832 2008-10-30  Mark Probst  <mark.probst@gmail.com>
3833
3834         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
3835         for Monitor.Enter and Monitor.Exit if enabled.
3836
3837         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
3838         Solaris.
3839
3840 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
3841
3842         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
3843         of an OP_MOVE. Fixes #440046.
3844
3845         * basic-long.cs: Add a new test.
3846
3847 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
3848
3849         * mini.h: Add synchronization note for the managed counter-part.
3850
3851         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
3852         returns the simd caps of the current cpu.
3853
3854 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
3855
3856         * basic-simd.cs: Remove Console.WriteLine.
3857
3858 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
3859
3860         * basic-simd.cs: New tests for Vector2ul.
3861
3862 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
3863
3864         * simd-intrinsics.c: Add new vector type Vector2ul.
3865
3866 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
3867
3868         * basic-simd.cs: New tests for Vector2l.
3869
3870 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
3871
3872         * cpu-x86.md: Add long version of most packed int ops.
3873
3874         * mini-ops.h: Same.
3875
3876         * mini-x86.h: Same.
3877
3878         * simd-intrinsics.c: Add new vector type Vector2l.
3879
3880 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
3881
3882         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
3883
3884         * simd-methods.h: Remove SN_op_BitwiseXor.
3885
3886 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
3887
3888         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
3889         alignment.
3890
3891 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
3892
3893         * basic-simd.cs: Test for Vector2d.
3894
3895         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
3896         value.
3897
3898 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
3899
3900         * cpu-x86.md: Add double version of all packed float ops.
3901
3902         * mini-ops.h: Same.
3903
3904         * mini-x86.h: Same.
3905
3906         * simd-intrinsics.c: Add new vector type Vector2d.
3907
3908         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
3909
3910         * simd-methods.h: Add Duplicate.
3911
3912 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
3913
3914         * basic-simd.cs: Test for packing with signed saturation.
3915
3916 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
3917
3918         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
3919         found in the TYPESPEC table.
3920
3921 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
3922
3923         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
3924         too.
3925
3926         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3927
3928         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
3929         instead of the RVA, since the RVA can be changed by tools like the cil 
3930         stripper.
3931
3932         * method-to-ir.c (mono_method_to_ir2): Ditto.
3933
3934         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
3935         (deserialize_variable): Ditto.
3936
3937 2008-10-25  Martin Baulig  <martin@ximian.com>
3938
3939         * debug-mini.c (write_variable): Use
3940         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
3941
3942 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
3943
3944         * cpu-x86.md: Add unsigned variants of packd and packw.
3945
3946         * mini-ops.h: Same.
3947
3948         * mini-x86.h: Emit the right instruction for packd and packw.
3949         Add unsigned variants of packd and packw.
3950
3951         * simd-intrinsics.c: Packd and packw were used in place of their
3952         unsigned variants. Change that.
3953         Add intrinsics for (Signed)PackWithSignedSaturation.
3954
3955         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
3956
3957 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
3958
3959         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
3960
3961 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
3962
3963         * mini-ops.h: Remove dword packed add/sub with saturation ops.
3964
3965         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
3966
3967         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
3968         sse instructions.
3969
3970         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
3971
3972 2008-10-24  Mark Probst  <mark.probst@gmail.com>
3973
3974         * method-to-ir.c, mini.c: Special casing for the synchronized
3975         wrapper for the ldtoken+GetTypeFromHandle case.
3976
3977 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
3978
3979         * mini.c (mono_replace_ins): Move this to branch-opts.c.
3980
3981         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
3982         created/split bblocks.
3983
3984 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
3985
3986         * mini-ops.h: Add packed signed mul high.
3987         
3988         * cpu-x86.md: Same.
3989
3990         * mini-x86.c (mono_arch_output_basic_block): Same.
3991
3992         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
3993
3994         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
3995
3996 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
3997
3998         * basic-simd.cs: Tests for Vector16sb.
3999
4000 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
4001
4002         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
4003
4004 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
4005
4006         * mini-ops.h: Add packed signed min, max and compare greater.
4007         
4008         * cpu-x86.md: Same.
4009
4010         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
4011         saturation.
4012
4013         * simd-methods.h: Add CompareGreaterThan.
4014
4015         * simd-methods.h: Remove CompareEquals.
4016
4017         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
4018
4019         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
4020
4021         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
4022         CompareEqual.
4023
4024 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
4025
4026         * basic-simd.cs: Fix tests due to change in the API.
4027
4028 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
4029
4030         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
4031
4032 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
4033
4034         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
4035
4036         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
4037         inst_offset as this has invalid values for LDADDR.
4038
4039 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
4040
4041         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
4042
4043         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
4044
4045 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
4046
4047         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
4048         for accessing field->data.
4049
4050 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
4051
4052         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
4053
4054 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
4055
4056         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
4057
4058         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
4059
4060 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
4061
4062         * dominators.c (mono_compute_natural_loops): Allocate GList enties
4063         from the cfg mempool.
4064
4065 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
4066
4067         * basic-simd.cs: Tests for new methods in Vector8us.
4068
4069 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
4070
4071         * mini-ops.h: Add multiply and store high.
4072         
4073         * cpu-x86.md: Same.
4074
4075         * mini-x86.c (mono_arch_output_basic_block): Same.
4076
4077         * simd-methods.h: Same.
4078
4079         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
4080         and CompareEqual.
4081
4082 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
4083
4084         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
4085         mono_class_setup_vtable ().
4086
4087         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
4088         mono_class_get_vtable_entry () for accessing klass->vtable.
4089
4090         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
4091
4092         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
4093         found.
4094
4095         * method-to-ir.c (mono_save_token_info): Don't save references made from
4096         wrappers.
4097
4098         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
4099         of generic instances.
4100
4101         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
4102
4103 2008-10-19  Mark Probst  <mark.probst@gmail.com>
4104
4105         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
4106         OP_JMP depends on the method signature.  Calculate it properly.
4107
4108 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
4109         
4110         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
4111         called directly.
4112
4113         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
4114         instances.
4115         (emit_extra_methods): Add another table mapping method indexes to 
4116         offsets in the extra_method_info table.
4117
4118         * mini.h: Bump AOT file format version.
4119         
4120         * aot-runtime.c: Merge most of the code from mono_aot_get_method
4121         and mono_aot_get_method_from_token () into one function.
4122
4123 2008-10-19  Mark Probst  <mark.probst@gmail.com>
4124
4125         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
4126         separate counter.
4127
4128 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
4129
4130         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
4131         methods.
4132
4133         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
4134         disable_aot.
4135
4136         * mini.c (mono_patch_info_equal): Compare the generic context as well.
4137
4138         * mini.h: Bump aot file format version.
4139
4140         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
4141         AOT file can contain native code for methods which are not in the METHOD
4142         table. Generate code for non-sharable generic instances of generic methods
4143         found in the METHODSPEC table.
4144         
4145         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
4146         encoding generic type handles.
4147
4148         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
4149         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
4150
4151         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
4152         macros + MONO_ADD_INS.
4153
4154         * mini.c (mono_jump_info_token_new2): New function which takes a generic
4155         context as well.
4156
4157         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
4158
4159         * mini.h: Bump aot file format version.
4160
4161         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
4162
4163 2008-10-17  Mark Probst  <mark.probst@gmail.com>
4164
4165         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
4166         platforms, with definable stack alignment value.  Set to 16 now
4167         for all platforms.
4168
4169         * mini.c, mini.h, driver.c: Command line option for disabling
4170         stack alignment.
4171
4172 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
4173
4174         * basic-simd.cs: Tests for new methods in Vector4ui.
4175
4176 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
4177
4178         * mini-ops.h: Add packed int shuffle.
4179         
4180         * cpu-x86.md: Same.
4181
4182         * mini-x86.c (mono_arch_output_basic_block): Same.
4183
4184         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
4185         extract mask, max, min, shuffle.
4186
4187         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
4188
4189 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
4190
4191         * basic-simd.cs: Tests for new methods in Vector8us.
4192
4193 2008-10-17  Mark Probst  <mark.probst@gmail.com>
4194
4195         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
4196         RuntimeTypeHandle, not a TypedReference.
4197
4198 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
4199
4200         * simd-intrinsics.c: remove relocations.
4201
4202 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
4203
4204         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
4205         optimizations from the x86 backend.
4206
4207 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
4208
4209         * simd-methods.h, simd-intrinsics.c: debloat method names and
4210         prepare for no relocations.
4211
4212 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
4213
4214         * mini-ops.h: Add packed min/equal and sum of absolute differences.
4215         
4216         * cpu-x86.md: Same.
4217
4218         * mini-x86.c (mono_arch_output_basic_block): Same.
4219
4220         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
4221         extract mask, max, min and sum of absolute differences.
4222
4223         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
4224         method name.
4225
4226 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
4227
4228         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
4229         Renamed one test for consistency.
4230
4231 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
4232
4233         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
4234         fix to the code that deal with other blocks.
4235
4236 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
4237
4238         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
4239
4240 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
4241
4242         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
4243         that deals with vreg interference. Explicitly check for OP_LDADDR to be
4244         able to process the source reg.
4245
4246 2008-10-16  Martin Baulig  <martin@ximian.com>
4247
4248         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
4249
4250         * inssel.brg: Add `OP_HARD_NOP'.
4251
4252         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
4253
4254         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
4255         `OP_HARD_NOP' instruction when running inside the debugger.
4256
4257         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
4258         `OP_HARD_NOP' instruction when running inside the debugger.
4259
4260 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
4261
4262         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
4263         now works. The issue with the regalloc tripping up no longer
4264         happens.
4265
4266         * simd-intrinsics.c (load_simd_vreg): Same.
4267
4268 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
4269         
4270         * basic-simd.cs: Tests for new Vector8ui methods.
4271
4272 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
4273
4274         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
4275         only for type. This fixes crashes where MonoInst::klass is checked
4276         for ops of type != VTYPE or OBJ.
4277
4278         * simd-intrinsics.c (load_simd_vreg): Same.
4279
4280 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
4281
4282         * mini-ops.h: Add ops for packed shuffle/max/avg and
4283         extract mask.
4284         
4285         * cpu-x86.md: Same.
4286
4287         * mini-x86.c (mono_arch_output_basic_block): Same.
4288
4289         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
4290         extract mask.
4291
4292         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
4293         to emit extract mask op.
4294
4295         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
4296         to emit word shuffles.
4297
4298 2008-10-15  Mark Probst  <mark.probst@gmail.com>
4299
4300         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
4301         the largest alignment needed by a variable, but at least
4302         sizeof(gpointer).
4303
4304 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
4305
4306         * basic-simd.cs: Tests for the fixes in the last commit.
4307
4308 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
4309
4310         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
4311         no longer handles STACK_PTR input.
4312
4313         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
4314
4315         * simd-intrinsics.c (load_simd_vreg): New function that works like 
4316         get_simd_vreg   but handles STACK_PTR input.
4317
4318         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
4319         as the input can be an arbitrary pointer.
4320
4321         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
4322         LDADDR local optimization directly otherwise use a store op.
4323
4324 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
4325
4326         * basic-simd.cs: Tests for dup low and dup high.
4327
4328 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
4329
4330         * mini-ops.h: Add dup low and dup high ops.
4331         
4332         * cpu-x86.md: Same.
4333
4334         * mini-x86.c (mono_arch_output_basic_block): Same.
4335
4336         * simd-intrinsics.c (vector4f_intrinsics): Same.
4337
4338 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
4339
4340         * basic-simd.cs: Tests for recently added functionality.
4341
4342 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
4343
4344         * mini-ops.h: Add remaining sse1 fp ops.
4345         
4346         * cpu-x86.md: Add remaining sse1 fp ops.
4347
4348         * mini-x86.c (mono_arch_output_basic_block): Same.
4349
4350         * mini.h: Add enum for simd FP compare conditions.
4351
4352         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
4353
4354         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
4355         so the backed can generate the appropriate op.
4356
4357 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
4358         This patch squeese one more byte from the SimdIntrinsc struct.
4359
4360         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
4361         a a shift amount intead of simply or'ing it.
4362
4363         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
4364
4365         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
4366         byte so we can have an aditional flags field without increasing struct size.
4367
4368         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
4369         against the simd_supported_versions bitmask.
4370
4371         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
4372
4373 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
4374
4375         * mini.c: remove rawbuffer code (the only use here is unsafe because
4376         it takes locks during signal handling and the kernel now provides much
4377         better info in proc/pid/smaps these days).
4378
4379 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
4380
4381         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
4382         OP_X86_PUSH_OBJ. Fixes #434620.
4383
4384         * objects.cs: Add a test.
4385         
4386 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
4387
4388         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
4389         that the packuswb/packusdw don't work with unsigned numbers for what
4390         would be negative numbers in signed format.
4391
4392         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
4393         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
4394
4395         * mini-ops.h: Add doubleword forms of many ops and packing ones.
4396
4397         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
4398
4399         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
4400
4401         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
4402
4403         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
4404         add more ops.
4405
4406         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
4407         version as the enum in mini.h.
4408
4409         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
4410         for sse3 ops, check the simd_version field if present. This way the code
4411         works with all versions of sse.
4412
4413 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
4414
4415         * simd-intrinsics.c: Fixed intrinsic name typo.
4416
4417         * mini.h: Added missing simd exported function.
4418
4419         * basic-simd.cs: Added tests for Vector4ui.
4420         Fixed broken test for Vector16b.
4421
4422 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
4423
4424         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
4425         the max length to 64.
4426
4427 2008-10-10  Mark Probst  <mark.probst@gmail.com>
4428
4429         * method-to-ir.c: Only do the fast virtual generic method call for
4430         non-wrapper methods.
4431
4432         * mini.h, mini-trampolines.c: The new generic virtual remoting
4433         trampoline handles virtual method calls via the vtable (as done by
4434         the fast virtual generic method calls) to remoting proxies.
4435
4436         * mini.c (mono_jit_create_remoting_trampoline): For generic
4437         methods reate a generic virtual remoting trampoline.
4438
4439         * mini-amd64.h: Enable fast virtual generic method calls again.
4440
4441 2008-10-10  Mark Probst  <mark.probst@gmail.com>
4442
4443         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
4444         restore registers when doing tail calls.
4445
4446 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
4447
4448         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
4449         Vector4ui.
4450
4451 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
4452
4453         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
4454
4455 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
4456
4457         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
4458
4459 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
4460
4461         * basic-simd.cs: Retrofit for API changes.
4462
4463 2008-10-10  Mark Probst  <mark.probst@gmail.com>
4464
4465         * mini-ppc.c: Handle integer stack arguments for tail calls.
4466
4467 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
4468
4469         * optflags-def.h: Removed sse3 optimization.
4470
4471         * driver.c: Same.
4472
4473         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
4474         sse3.
4475
4476         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
4477
4478         * mini.h: Added enumeration with simd versions.
4479
4480         * simd-intrinsics.c (emit_intrinsics): Use the new static var
4481         for detecting SSE3.
4482
4483         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
4484
4485         * mini.c (mini_init): Call mono_simd_intrinsics_init.
4486
4487 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
4488
4489         * basic-simd.cs: Added tests for Vector8u and Vector16u.
4490
4491         * basic-simd.cs: Fixed test naming.
4492
4493 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
4494
4495         * mini-ops.h: Added ops for packed and saturated math, shifts
4496         and packing/unpacking.
4497
4498         * cpu-x86.md: Added descriptors for the above ops.
4499
4500         * mini-x86.c: Added code to emmit the above ops.
4501
4502         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
4503
4504 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
4505
4506         * aot-compiler.c (compile_method): Enable AOT for generic code.
4507
4508         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
4509
4510 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
4511
4512         * mini.c: add a workaround for a common screwup that ends up blamed
4513         to mono (other processes blocking signal delivery).
4514
4515 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
4516
4517         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
4518         in the LDFLD/STFLD opcodes. Fixes #432673.
4519
4520         * iltests.il.in: Add a new test.
4521
4522 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
4523
4524         * mini-arm.c: attach the thread in unmanaged->managed transitions
4525         using delegates (bug #433148).
4526
4527 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
4528
4529        * basic-simd.cs: Use new ShuffleSel constants.
4530
4531 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
4532
4533         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
4534
4535         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
4536         only disable simd intrinsics if no sse2 is detected.
4537
4538         * optflags-def.h: Added sse3.
4539
4540         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
4541         is disabled.
4542
4543 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
4544
4545         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
4546         when adding delegate-invoke wrappers.
4547
4548 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
4549
4550         * Makefile.am: Reenable the simd tests.
4551
4552 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
4553
4554         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
4555           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
4556           other vreg is allocated to that hreg.
4557
4558         Contributed under MIT/X11 license.
4559
4560 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
4561
4562         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
4563         yet checked in.
4564
4565 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
4566
4567         * basic-simd.cs: New test suite for SIMD intrinsics.
4568
4569         * Makefile.am: Added new tests.
4570
4571 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
4572
4573         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
4574
4575         * mini-ops.h: Same.
4576
4577         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
4578
4579         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
4580         using SSE2 aware opcodes.
4581
4582         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
4583         is enabled, this code path is only reachable if conversion ops are emmited after
4584         mono_method_to_ir.
4585
4586         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
4587
4588         This optimization saves 6 bytes per conversion against the old version.
4589
4590 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
4591
4592         * aot-compiler.c (compile_method): Don't skip methods referencing 
4593         generic methods without a corresponding entry in token_info_hash, since
4594         encode_method_ref () can handle all generic methods now.
4595
4596         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
4597         generic context is set.
4598         
4599         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
4600         generic sharing of LDTOKEN.
4601
4602 2008-10-06  Mark Probst  <mark.probst@gmail.com>
4603
4604         * mini-amd64.h: Temporarily disabled fast virtual generic method
4605         calls because it breaks the System.Runtime.Remoting tests.
4606
4607 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
4608
4609         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
4610
4611         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
4612         so inlining actually works.
4613         (check_inline_caller_method_name_limit): Ditto.
4614
4615 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
4616
4617         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
4618         64 bit safety (from Olaf Hering and Andreas Farber).
4619
4620 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
4621         
4622         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
4623         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
4624         unused virtual call support code.
4625
4626         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
4627         
4628         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
4629         which can't use aot trampolines.
4630         (decode_patch): Don't create aot trampolines for methods which can't use
4631         them.
4632
4633         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
4634         use aot trampolines.
4635
4636         * mini.h: Bump AOT image format version.
4637         
4638 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
4639
4640         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
4641         to save_token_info () since cmethod is inflated for constrained calls.
4642
4643         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
4644
4645 2008-10-04  Andreas Farber  <andreas.faerber@web.de>
4646
4647         * Makefile.am: Add build rules for ppc64.
4648         This avoids the build failing at pedump with unresolved symbols
4649         due to lack of arch_sources. Instead it will now fail earlier
4650         due to lack of cpu-ppc64.md.
4651
4652         Contributed under MIT/X11 license.
4653
4654 2008-10-04  Mark Probst  <mark.probst@gmail.com>
4655
4656         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
4657         tail calls.
4658
4659         * iltests.il.in: Add test case for tail call with many arguments.
4660
4661 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
4662
4663         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
4664         to the fast virtual generic method code until the aot case is fixed.
4665
4666 2008-10-03  Mark Probst  <mark.probst@gmail.com>
4667
4668         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
4669
4670 2008-10-03  Mark Probst  <mark.probst@gmail.com>
4671
4672         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
4673         thunks.
4674
4675 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
4676         
4677         * simd-intrinsics.c: Forgot to add this one.
4678
4679         * mini-codegen.c: Fix macro in case SIMD is not supported.
4680
4681 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
4682         
4683         This patch land initial JIT support for simd intrinsics.
4684
4685         * mini-x86.h: Added new define to make --enable_minimal work on x86.
4686
4687         * Makefile.am: Added simd-intrinsics.c
4688
4689         * simd-intrinsics.c: New file with simd instrinsic related
4690         code.
4691
4692         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
4693
4694         * cpu-x86.md: Add simd related instructions.
4695
4696         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
4697
4698         * driver.c: Added two new --regression variants.
4699
4700         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
4701
4702         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
4703
4704         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
4705         extract some complicated logic to helper functions.
4706
4707         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
4708
4709         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
4710
4711         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
4712         the specialized simplification pass.
4713
4714         * method-to-ir.c (mono_spill_global_vars): Use new macro.
4715
4716         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
4717
4718         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
4719         table.
4720
4721         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
4722         if MONO_ARCH_NEED_SIMD_BANK is defined.
4723
4724         * mini-ops.h: Added the new simd ops.
4725
4726         * mini-x86.c: Added mono_arch_xregname.
4727
4728         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
4729
4730         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
4731
4732         * mini-x86.h: Define simd related MONO_ARCH macros.
4733
4734         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
4735
4736         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
4737
4738         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
4739         MONO_CLASS_IS_SIMD to deal with simd related IR.
4740
4741         * mini.h (MonoInst): Added spill_var to the backend union.
4742
4743         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
4744
4745         * mini.h: Added forward declarations of the new simd fuctions.
4746
4747         * optflags-def.h: Added new optimization names SIMD.
4748
4749         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
4750
4751         * regalloc.h: Added support for working with 3 register banks.
4752
4753         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
4754
4755         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
4756
4757 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
4758
4759         * mini-exceptions.c: remove 64 bit related ifdef clutter.
4760
4761 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
4762
4763         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
4764         instead of one on 64 bit systems.
4765
4766         * method-to-ir.c: Remove unused includes.
4767
4768 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
4769
4770         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
4771         cfg->used_int_regs, since the two are different on arm.
4772
4773 2008-10-02  Mark Probst  <mark.probst@gmail.com>
4774
4775         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
4776         mono_method_get_vtable_index() to get the vtable index.
4777
4778 2008-10-02  Mark Probst  <mark.probst@gmail.com>
4779
4780         * method-to-ir.c (mono_method_to_ir2): Don't create native
4781         wrappers for array methods, because they're never called (and if
4782         they were called they wouldn't work).
4783
4784 2008-10-02  Mark Probst  <mark.probst@gmail.com>
4785
4786         * method-to-ir.c (mono_method_to_ir2): Array methods are
4787         special-cased and must not be invoked indirectly via the (M)RGCTX
4788         when generic sharing is turned on.  Fixes #431413.
4789
4790 2008-10-01  Mark Probst  <mark.probst@gmail.com>
4791
4792         * method-to-ir.c: When generic sharing is active, call
4793         non-interface virtual generic methods via the standard trampoline.
4794
4795         * mini-trampolines.c: Handle virtual generic shared methods.
4796
4797         * mini.h, mini-x86.c, mini-x86.h: New argument for
4798         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
4799         method thunks and which is the trampoline to call if the lookup
4800         fails.  Enable the virtual generic method thunk for x86.
4801
4802         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
4803         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
4804         argument but assert that it's NULL, because these archs don't yet
4805         implement the virtual generic method thunk.  Changes in the IMT
4806         thunk data structures.
4807
4808 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
4809
4810         * aot-compiler.c (emit_globals): Avoid invalid characters in
4811         the static linking symbol.
4812
4813         * objects.cs: Add a test for the range check optimization. Fix warnings.
4814
4815         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
4816         optimization from the current JIT.
4817
4818         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
4819         later in decompose_array_access_opts () to allow more optimizations.
4820
4821         * method-to-ir.c (mono_handle_soft_float): Rename this to 
4822         mono_decompose_soft_float () for consistency.
4823
4824         * mini-ops.h: Fix arguments of OP_STRLEN.
4825
4826         * method-to-ir.c (save_cast_details): Extract the cast details saving code
4827         into a separate function.
4828         (reset_cast_details): Ditto.
4829         (handle_unbox): Save cast details. Fixes #431254.
4830
4831         * method-to-ir.c: Remove some obsolete FIXMEs.
4832
4833 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
4834
4835         * ir-emit.h (alloc_dreg): Write a warning before crashing.
4836
4837 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
4838
4839         * mini-codegen.c: More work on macros to make them
4840         ready for multiple regbanks.
4841
4842 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
4843
4844         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
4845
4846         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
4847
4848 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
4849
4850         * mini-codegen.c (mono_spillvar_offset): Proper support for
4851         multiple regbanks.
4852
4853 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
4854
4855         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
4856         the stack overflow changes.
4857
4858 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
4859
4860         * mini-codegen.c: Make all bank macros depend on reg_bank.
4861
4862         * mini-codegen.c (mono_local_regalloc): Make free mask
4863         initialization regbank aware.
4864
4865 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
4866
4867         * mini-codegen.c (mono_local_regalloc): Extract callee
4868         mask selection to a function and make it regbank aware.
4869
4870 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
4871
4872         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
4873         code to deal with many regbanks.
4874
4875 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
4876
4877         * mini-codegen.c: More fp->regbank changes.
4878
4879 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
4880
4881         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
4882         of a hardcoded constant.
4883
4884 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
4885
4886         * method-to-ir.c (type_from_stack_type): Fix typo.
4887
4888 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
4889
4890         * mini-ia64.c (emit_move_return_value): Convert float return values to
4891         double.
4892
4893         * objects.cs: Add a new test.
4894         
4895         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
4896         VARARG methods to fix an assert later.
4897
4898         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
4899         end so it at least compiles.
4900
4901 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
4902
4903         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
4904
4905 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
4906
4907         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
4908         optimization to a new function (emit_optimized_ldloca_ir) and enable
4909         it for both ldloca and ldloca_s.
4910
4911 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
4912
4913         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
4914         gshared CASTCLASS code.
4915
4916         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
4917         amd64, where the libc stack unwinder encounters stack frames referring to
4918         native code in unmapped memory.
4919
4920         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
4921         sharing.
4922
4923         * generics.cs: Add new test.
4924
4925 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
4926
4927         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
4928         add a check that one of the ARM_FPU_ constants is defined.
4929
4930         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
4931         
4932         * mini-exceptions.c: Fix build on non-altstack platforms.
4933
4934         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
4935         sharing of vtypes.
4936
4937         * ir-emit.h: Add a comment to NEW_PCONST.
4938
4939         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
4940
4941         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
4942
4943         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
4944         after the changes to MonoJitDomainInfo.
4945
4946 2008-09-27  Mark Probst  <mark.probst@gmail.com>
4947
4948         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
4949
4950 2008-09-27  Mark Probst  <mark.probst@gmail.com>
4951
4952         * mini-ppc.c: Compiler warning fixes.
4953
4954 2008-09-27  Mark Probst  <mark.probst@gmail.com>
4955
4956         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
4957         for pinvokes.
4958
4959 2008-09-27  Mark Probst  <mark.probst@gmail.com>
4960
4961         * exceptions-ppc.c, mini-ppc.h: Compile
4962         mono_arch_handle_altstack_exception() on Darwin, too.
4963
4964 2008-09-27  Mark Probst  <mark.probst@gmail.com>
4965
4966         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
4967         work on archs which don't have generic sharing implemented, only
4968         without the vtable_arg.
4969
4970 2008-09-26  Mark Probst  <mark.probst@gmail.com>
4971
4972         * mini.c: Added comment explaining why delegate ctor icall
4973         wrappers are compiled.
4974
4975 2008-09-26  Mark Probst  <mark.probst@gmail.com>
4976
4977         * mini.c: Don't produce trampolines to delegate ctor icall
4978         wrappers but compile them upfront.
4979
4980 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
4981
4982         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
4983         runtime-set function when going back to managed code. Currently this
4984         is used to set back the protection on the soft ovf pages and/or to
4985         throw the stack overflow exception that happened in unmanaged code.
4986
4987 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
4988
4989         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
4990         runtime-set function when going back to managed code. Currently this
4991         is used to set back the protection on the soft ovf pages and/or to
4992         throw the stack overflow exception that happened in unmanaged code.
4993
4994 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
4995
4996         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
4997         the support code for restoring stack protection after stack overflows
4998         that happen in unmanaged code. Don't set the exec permission on the
4999         soft overflow area.
5000
5001 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
5002
5003         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
5004         delegate->method_ptr is set. Fixes #428054.
5005
5006 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
5007
5008         * tests.cs: Rename to ratests.cs.
5009
5010         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
5011         emit_get_rgctx_... functions.
5012
5013 2008-09-25  Mark Probst  <mark.probst@gmail.com>
5014
5015         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
5016
5017 2008-09-25  Mark Probst  <mark.probst@gmail.com>
5018
5019         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
5020         before asserting that method is sharable.
5021
5022 2008-09-25  Mark Probst  <mark.probst@gmail.com>
5023
5024         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
5025         whether method needs a static RGCTX wrapper used instead of
5026         complex conditions.
5027
5028         * generic-sharing.c, mini.h: A few functions moved to
5029         metadata/generic-sharing.c.
5030
5031 2008-09-25  Mark Probst  <mark.probst@gmail.com>
5032
5033         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
5034         Generic code sharing for value types, which essentially means
5035         treating value type methods like static methods.  The RGCTX is
5036         passed in the same way.
5037
5038 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
5039
5040         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
5041         opcode when creating multi-dimensional arrays of open types.
5042
5043         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
5044         open generic types.
5045
5046         * generics.cs: Add a test.
5047
5048         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
5049
5050 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
5051
5052         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
5053
5054         * mini.c (mini_method_compile): Set it when running under the debugger. 
5055
5056         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
5057         vreg optimization if the flag is set.
5058
5059         * driver.c (mono_main): Add --attach= option to pass options to
5060         the attach agent.
5061
5062         * mini.c (sigquit_signal_handler): Start the attach agent.
5063
5064         * ssapre.c: Disable this to save space since it is not yet ported to
5065         linear IR.
5066
5067         * regalloc2.c: Disable this to save space.
5068
5069         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
5070
5071 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
5072
5073         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
5074         the -v option useful again.
5075
5076 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
5077
5078         * mini-amd64.c (mono_arch_output_basic_block): Add support for
5079         --break-at-bb.
5080
5081         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
5082         arrays of arrays. Fixes #428406.
5083
5084         * method-to-ir.c (mini_emit_castclass): Ditto.
5085
5086         * objects.cs: Add new test.
5087         
5088 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
5089
5090         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
5091         was wrong at it choked against target_type_is_incompatible for byref types.
5092
5093 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
5094
5095         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
5096         places.
5097
5098 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
5099
5100         * mini-exceptions.c: update a few more exceptions-related counters.
5101
5102 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
5103
5104         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
5105         new functions to allocate from persistent mempools.
5106
5107 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
5108
5109         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
5110         multiple register banks in the future.
5111
5112         * mini-codegen.c (mono_local_regalloc): Fix a warning.
5113
5114 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
5115
5116         * mini.c (type_to_eval_stack_type): Remove duplicated function.
5117
5118         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
5119
5120         * mini.h: Export type_to_eval_stack_type.
5121
5122         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
5123         is only ins->klass of byref types.
5124
5125 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
5126
5127         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
5128         (mini_emit_memcpy2): Ditto.
5129
5130         * mini-amd64.c: Fix a warning.
5131
5132 2008-09-21  Mark Probst  <mark.probst@gmail.com>
5133
5134         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
5135         linking.
5136
5137 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
5138
5139         * method-to-ir.c: Extract stloc micro-optimization to a
5140         function and apply it to all cases.
5141
5142 2008-09-19  Mark Probst  <mark.probst@gmail.com>
5143
5144         * method-to-ir.c: Don't fail generic code sharing in cases we
5145         already support.
5146
5147 2008-09-18  Mark Probst  <mark.probst@gmail.com>
5148
5149         * mini-ppc.c: Handle structs in tailcalls on Darwin.
5150
5151 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
5152
5153         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
5154         implementation.
5155
5156 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
5157
5158         * trace.c: make tracing more useful and correct, with per-thread
5159         id and indent info.
5160
5161 2008-09-15  Mark Probst  <mark.probst@gmail.com>
5162
5163         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
5164         doing a method call and the argument is an R4.
5165
5166 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
5167
5168         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
5169         generic methods.
5170
5171 2008-09-13  Mark Probst  <mark.probst@gmail.com>
5172
5173         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
5174
5175 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
5176
5177         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
5178         (MONO_JUMP_TABLE_FROM_INS): Ditto.
5179
5180 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
5181
5182         * driver.c: Add a --agent argument (not supported yet) to load managed
5183         agent assemblies before loading the main assembly, similarly to how the
5184         Java VM handles agents.
5185
5186 2008-09-11  Mark Probst  <mark.probst@gmail.com>
5187
5188         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
5189         function to do stack layout of local variables.
5190
5191 2008-09-11  Mark Probst  <mark.probst@gmail.com>
5192
5193         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
5194         calculation.
5195
5196 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
5197
5198         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
5199         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
5200         JIT if DISABLE_JIT is defined.
5201
5202         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
5203         defined.
5204
5205 2008-09-10  Mark Probst  <mark.probst@gmail.com>
5206
5207         * iltests.il.in: Disable the fconv test on PPC (the result is
5208         undefined according to ECMA).
5209
5210 2008-09-10  Mark Probst  <mark.probst@gmail.com>
5211
5212         * iltests.il.in: Enable tail call tests for PPC.
5213
5214         * mini.h: Add variable for storing incoming valuetype argument
5215         addresses for tail calls.
5216
5217         * mini-ppc.c: Implement valuetype arguments and return values for
5218         tailcalls on Linux.
5219
5220 2008-09-09  Mark Probst  <mark.probst@gmail.com>
5221
5222         * mini-ppc.c: Partially implement tail calls (struct arguments and
5223         return values not supported).
5224
5225         * method-to-ir.c: Enable tail calls on PPC.
5226
5227 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
5228
5229         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
5230         runtime-invoke wrappers to work around the problem of them getting
5231         assigned to a random class.
5232
5233         * aot-runtime.c (mono_aot_get_method): Ditto.
5234         
5235 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
5236
5237         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
5238         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
5239
5240 2008-09-07  Mark Probst  <mark.probst@gmail.com>
5241
5242         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
5243         until they're implemented properly.
5244
5245         * exceptions-ppc.c: Use arch-independent exception-handling code
5246         instead of custom one.
5247
5248         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
5249         for Linear IR.
5250
5251         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
5252
5253         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
5254         applies when __powerpc__ is defined.
5255
5256 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
5257
5258         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
5259         methods to their code to avoid computing the full name of wrappers and
5260         doing a lookup in a string hash table.
5261
5262 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
5263
5264         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
5265         we identify bblocks before method_to_ir () is ran.
5266
5267         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
5268         Also avoid optimizing branches pointing to themselves.
5269
5270         * mini.c (mini_method_compile): Ditto. Fixes #422947.
5271
5272 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
5273
5274         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
5275
5276 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
5277
5278         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
5279         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
5280         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
5281         'buf'.
5282
5283         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
5284         jumped to the same entry in plt_jump_table.
5285
5286 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
5287
5288         * method-to-ir.c (initialize_array_data): Handle field with RVA from
5289         dynamic images.
5290
5291 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
5292
5293         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
5294         other assignment can be if converted. Saves 1.5% on corlib size and fixes
5295         #421807.
5296
5297 2008-08-29  Geoff Norton  <gnorton@novell.com>
5298
5299         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
5300         segment, and doesn't properly handle .space as .text.  Fixes
5301         AOT Mach/ARM
5302
5303 2008-08-29  Geoff Norton  <gnorton@novell.com>
5304
5305         * mini.c: Disable the mach exception handler when running on 
5306         ARM
5307
5308 2008-08-29  Geoff Norton  <gnorton@novell.com>
5309
5310         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
5311         globals on Darwin/ARM
5312
5313 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
5314
5315         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
5316         since too many things depend on it. Instead, call 
5317         mono_runtime_set_no_exec ().
5318         
5319         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
5320         the new JIT.
5321
5322         * aot-compiler.c: Add an 'asm-only' AOT option.
5323
5324         * mini.c: Avoid initializing the runtime when doing AOT compilation.
5325                 
5326         * aot-compiler.c (compile_method): Disable gshared support for now as it
5327         doesn't yet work.
5328
5329 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
5330
5331         * mini-amd64.h : Fix a compiler warning.
5332
5333         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
5334           Changed to use a callback function to retrieve the unwind info.
5335           This avoids problems observed when code blocks were removed by
5336           unloading an app domain.
5337
5338         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
5339           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
5340           to work properly.
5341
5342         Contributed under MIT/X11 license.
5343
5344 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
5345
5346         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
5347           case to keep the stack aligned to 8.
5348
5349         Contributed under MIT/X11 license.
5350
5351 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
5352
5353         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
5354         avoid repeated linear searches.
5355
5356 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
5357
5358         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
5359         methods it can't handle.
5360         
5361         * aot-compiler.c (add_method): Avoid adding a method twice.
5362         (add_wrappers): Add runtime invoke wrappers for all methods.
5363
5364         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
5365         function to create an aot-compatible version of this trampoline.
5366
5367         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
5368
5369 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
5370
5371         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
5372
5373         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
5374         with a generic sharing failure.
5375
5376         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
5377
5378         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
5379         CEE_RETHROW. Fixes #419634.
5380
5381         * mini.c (mono_method_to_ir): Ditto.
5382
5383         * exceptions.cs: Add a new test.
5384         
5385         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
5386         to mono_type_stack_size_internal () since some callers might not pass in
5387         an rgctx.
5388
5389         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
5390         instrument_prolog. Fixes #419878.
5391
5392         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
5393         doubles in soft float mode volatile.
5394
5395 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
5396
5397         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
5398
5399         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
5400         to handle soft float correctly.
5401
5402         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
5403         the fast path.
5404
5405         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
5406
5407         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
5408         to sp, since the generics catch code requires it.
5409
5410         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
5411         copying.
5412
5413         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
5414         mono_arch_emit_imt_argument ().
5415
5416         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
5417
5418         * mini-arm.c tramp-arm.c: Generic sharing updates.
5419
5420 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
5421
5422         * mini-arm.c: Fix the arm build.
5423
5424         * generic-sharing.c (mini_type_get_underlying_type): New helper function
5425         handling enums, generic instances and generic sharing.
5426         (mini_type_stack_size_full): Ditto.
5427
5428         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
5429         
5430         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
5431
5432         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
5433
5434         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
5435         trampolines.
5436
5437         * mini-arm.c: Various small generic sharing changes.
5438
5439         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
5440         this for x86.
5441         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
5442         custom code.
5443
5444         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
5445         helper function to return a generic class init trampoline.
5446
5447         * method-to-ir.c mini.c: Use it.
5448         
5449         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
5450         arch-specfic function to return a generic class init trampoline.
5451
5452         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
5453         the GENERIC_CLASS_INIT custom code.
5454
5455         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
5456         a fatal error, not a sharing failure.
5457
5458         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
5459         needed.
5460
5461         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
5462         trampoline argument from MONO_ARCH_VTABLE_REG.
5463
5464         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
5465         order of the arguments to the C trampoline: pass 'slot' as the trampoline
5466         argument, and pass the vtable in VTABLE_REG.
5467
5468         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
5469         order of the arguments to the C trampoline: pass 'slot' as the trampoline
5470         argument, and pass the vtable in VTABLE_REG.
5471         (mono_arch_create_trampoline_code_full): Remove some special casing for
5472         the rgctx fetch trampoline.
5473
5474         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
5475         Fixes #419273.
5476
5477         * iltests.il: Add a test for it.
5478
5479 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
5480
5481         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
5482
5483         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
5484         no longer needed.
5485
5486         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
5487         use mono_jit_info_table_find () to avoid recursion.
5488         (mono_delegate_trampoline): Add a sync wrapper here.
5489
5490         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
5491         here.
5492
5493         * mini.c (mono_method_to_ir): Ditto.
5494         
5495         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
5496         add_sync_wrapper argument. Don't add a sync wrapper here.
5497         (mono_create_jump_trampoline): Don't add a sync wrapper here.
5498
5499         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
5500         
5501 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
5502
5503         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
5504           of nonvolatile registers back from MonoContext to CONTEXT.
5505
5506         Contributed under MIT/X11 license.
5507
5508 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
5509
5510         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
5511           arguments on Winx64 there are only 4 argument registers.  For this
5512           logic to work the last argument must be pulled from the stack.  
5513
5514         Contributed under MIT/X11 license.
5515
5516 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
5517
5518         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
5519
5520         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
5521         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
5522         encode/decode_method_ref ().
5523
5524         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
5525
5526         * aot-runtime.c (decode_patch): Ditto.  
5527
5528         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
5529         MONO_PATCH_INFO_METHOD.
5530
5531         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
5532         MonoGenericJitInfo.
5533
5534         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
5535         MonoGenericJitInfo.
5536
5537         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
5538
5539         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
5540         one from the caller.
5541
5542         * aot-runtime.c (decode_generic_inst): New function to decode and
5543         return a interned generic inst.
5544         (decode_klass_ref): Use it.
5545         (decode_method_ref): Ditto.
5546
5547         * aot-compiler.c (emit_exception_debug_info): Save 
5548         jinfo->has_generic_jit_info too.
5549
5550 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
5551
5552         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
5553
5554         * iltests.il.in: Add a test for fconv_to_i.
5555
5556         * liveness.c: Disable the liveness2 pass for now to save space.
5557
5558         * regalloc2.c: Include mempool-internals.h to fix warnings.
5559
5560         * aot-compiler.c (encode_method_ref): Encode the context of generic
5561         instance methods.
5562
5563         * aot-runtime.c (decode_method_ref): Inflate generic methods using
5564         the context saved in the aot file.
5565
5566         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
5567
5568         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
5569
5570         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
5571         volatile so they won't be optimized away.
5572
5573 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
5574
5575         * ssa.c:
5576         * ssa2.c:
5577         * mini.c:
5578         * regalloc2.c:
5579         * dominators.c: Remove duplicated functions that now are in
5580         mempool-internals.h.
5581
5582 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
5583
5584         * aot-compiler.c: Fix warnings.
5585
5586         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
5587
5588         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
5589
5590         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
5591         as the patch type.
5592
5593         * mini.c (mono_resolve_patch_target): Ditto.
5594         
5595         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
5596         (encode_klass_ref): Add support for encoding VARs/MVARs.
5597
5598         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
5599
5600         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
5601         the handling of the got entries into a separate 'decode_got_entry' function.
5602         Add support for RGCTX_FETCH.
5603
5604         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
5605         clobbered by the trampoline code.
5606
5607         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
5608         not clobbered by the indirect calling code.
5609
5610 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
5611
5612         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
5613         to fix the build.
5614
5615 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
5616
5617         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
5618         signature using the compilation mempool otherwise we would leak it.
5619
5620 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
5621
5622         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
5623         mono_emit_abs_call ().
5624
5625         * patch-info.h: Add GENERIC_CLASS_INIT.
5626
5627         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
5628
5629         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
5630         as their target as a near call.
5631
5632         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
5633         ABS handling code.
5634         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
5635
5636         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
5637         call to a runtime function described by a patch.
5638
5639         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
5640         mono_emit_abs_call, this has the advantage that the ABS handling code in
5641         mono_codegen () can handle them both, and can handle other stuff in the
5642         future without additional code.
5643
5644         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
5645         entry.
5646         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
5647         abs addresses.
5648
5649         * mini.h: Add missing bblock related prototypes.
5650
5651         * mini.h (MonoCompile): Remove unused reverse_inst_list and
5652         reverse_inst_list_len fields.
5653
5654         * mini.c: Refactor this file a bit by moving branch optimizations to 
5655         branch-opts.c.
5656
5657         * method-to-ir.c: Merge generic sharing changes missed earlier.
5658
5659         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
5660
5661         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
5662         shared patches. Process METHODCONST as a shared patch.
5663
5664         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
5665         as it crashes on the 2.0 mscorlib.
5666
5667         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
5668         to cause crashes.
5669         
5670         * aot-compiler.c: Use is_plt_patch () in a few additional places.
5671         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
5672         by IMT.
5673
5674         * aot-compiler.c: Reorganize the got handling code to be a bit more
5675         understandable.
5676
5677 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
5678
5679         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
5680         mono_patch_info_equals/hash, and use it to massively simplify
5681         get_plt_index ().
5682
5683         * mini.c (mono_patch_info_hash): Simplify this and add support for
5684         more patch types.
5685
5686         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
5687
5688         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
5689         handling code, since an offset is not enough to identify a trampoline.
5690
5691         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
5692
5693 2008-08-17  Mark Probst  <mark.probst@gmail.com>
5694
5695         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
5696
5697         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
5698
5699         * mini-ops.h: Argument and result types for OVF_CARRY ops.
5700
5701         * decompose.c: PPC decompositions for various ops.
5702
5703         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
5704
5705 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
5706
5707         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
5708         call the generic trampoline code using a call, instead of a jump, to
5709         remove some special casing from the generic trampoline code.
5710
5711         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
5712         (mono_codegen): Ditto.
5713
5714         * aot-compiler.c aot-runtime.c: Ditto.
5715
5716         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
5717
5718         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
5719         helper function to find the offset corresponding to a lazy fetch trampoline.
5720
5721         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
5722         when doing generic sharing.
5723
5724         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
5725         places.
5726         
5727         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
5728         mini-trampolines.c to be with the other trampoline creation functions.
5729
5730         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
5731         as it is equal to method->signature in most cases, add a 
5732         mono_emit_method_call_full variant which takes a signature and an imt
5733         argument as well.
5734
5735 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
5736
5737         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
5738         to this function, since it could be computed easily from the method 
5739         argument.
5740         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
5741         more.
5742
5743         * method-to-ir.c mini.c: Remove references to 
5744         compile_generic_method_wo_context.
5745
5746         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
5747         generic method calls.
5748         
5749         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
5750         dimensional non-szarrays.
5751
5752         * mini.c (mini_init): Register mono_array_new_1.
5753
5754         * jit-icalls.c (mono_array_new_1): New jit icall.
5755
5756         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
5757         pointing to the method.
5758
5759         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
5760         method addresses belonging to METHOD_JUMP patches in the 
5761         jump_target_got_slot_hash.
5762         (mono_aot_load_method): Ditto.
5763
5764         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
5765         METHOD_JUMP patches.
5766
5767         * mini.c (mini_create_jit_domain_info): New helper function which 
5768         initializes/frees domain->runtime_info.
5769         (mini_free_jit_domain_info): Ditto.
5770         (mini_init): Install the domain hook functions with the runtime.
5771
5772         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
5773         information maintained by the JIT.
5774
5775         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
5776         insertion into jump_table_hash into mono_codegen (), also implement proper
5777         locking.
5778
5779         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
5780         tail calls, it is already done by the aot code.
5781         
5782         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
5783         mechanism on amd64.
5784
5785         * iltests.il.in: Make the jmp test a bit more complex.
5786
5787         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
5788         generic instances which doesn't have a token.
5789
5790         * aot-runtime.c (decode_method_ref): Ditto.
5791         
5792         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
5793         can handle this case now.
5794         (handle_box): Ditto.
5795
5796 2008-08-15  Geoff Norton  <gnorton@novell.com>
5797
5798         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
5799         debugging check.
5800
5801 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
5802
5803         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
5804         calling generic methods.
5805
5806         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
5807
5808         * aot-runtime.c (decode_patch_info): Ditto.
5809
5810         * mini.c (mono_resolve_patch_target): Ditto.
5811         
5812         * patch-info.h: Add METHOD_RGCTX.
5813
5814         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
5815
5816 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
5817
5818         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
5819         arguments in registers.
5820
5821         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
5822         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
5823
5824         * mini.c (mini_method_compile): Abort aot compilation for generic
5825         methods if generic sharing is disabled.
5826         
5827         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
5828         an mrgctx.
5829
5830         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
5831         requiring an mrgctx.
5832
5833         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
5834         store instructions when converting a vcall to a normal call.
5835
5836         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
5837         mono_arch_find_jit_info.
5838
5839 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
5840
5841         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
5842         avoid calling mono_method_full_name () for every method even if the
5843         env var is not set.
5844         (check_inline_caller_method_name_limit): Ditto.
5845
5846 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
5847
5848         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
5849         assemblies in one run.
5850
5851         * aot-compiler.c (mono_compile_assembly): Only print out a count of
5852         skipped methods if it is not 0.
5853
5854         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
5855
5856 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
5857
5858         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
5859           MONO_ARCH_HAVE_UNWIND_TABLE.
5860
5861         Contributed under MIT/X11 license.
5862
5863 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
5864
5865         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
5866           from default optimizaton list on Winx64.
5867
5868         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
5869
5870         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
5871           the LMF from the MonoJitTlsData structure.
5872
5873         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
5874
5875         Contributed under MIT/X11 license.
5876
5877 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
5878
5879         * mini.c (sigsegv_signal_handler): Fix the build.
5880
5881         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
5882         assembly->aot_module.
5883
5884         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
5885         hash table. This simplifies and speeds up a lot of code, and fixes support
5886         for .netmodules.
5887
5888         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
5889         with the runtime.
5890
5891         * mini-exceptions.c: Ditto.
5892         
5893         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
5894         'native_offset' argument, since these are computed in the 
5895         mono_find_jit_info () function.
5896
5897         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
5898         is used by exceptions-ppc.c.
5899
5900         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
5901         mono_arch_find_jit_info ().
5902         
5903         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
5904         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
5905         generic code in mini-exceptions.c.
5906
5907 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
5908
5909         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
5910
5911         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
5912         
5913         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
5914         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
5915         called while holding the loader lock. Fixes #415608.
5916         (mono_aot_get_method_from_token_inner): Ditto.
5917
5918 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
5919
5920         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
5921         to reduce differences between this and the generic implementation in
5922         mini-exceptions.c.
5923         (ves_icall_get_frame_info): Ditto.
5924
5925         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
5926
5927         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
5928         longer neccesarry.
5929
5930         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
5931         mono_arch_get_call_filter () and make it non-static, for consistency with the
5932         other architectures.
5933
5934 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
5935
5936         * mini.c:
5937         * local-propagation.c:
5938         * mini-x86.c: Correct the name of arch defines.
5939
5940 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
5941
5942         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
5943         NO_EMULATE_LONG_SHIFT_OPS define.
5944
5945 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
5946
5947         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
5948         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
5949
5950         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
5951         MACH fixes. Merged from the 2.0 branch.
5952
5953         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
5954
5955         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
5956         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
5957
5958         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
5959
5960         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
5961         mono_marshal_get_native_wrapper () signature changes.
5962
5963 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
5964
5965         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
5966         conversion bug under arm.
5967
5968 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
5969
5970         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
5971
5972         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
5973         with overflow checking.
5974
5975 2008-08-05  Marek Habersack  <mhabersack@novell.com>
5976
5977         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
5978         to the genmdesc.pl file
5979
5980 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
5981
5982         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
5983         arg_array in the soft-float versions of the LOAD/STORE macros.
5984
5985         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
5986         implementation.
5987
5988         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
5989
5990 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
5991
5992         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
5993         a float HFA. Fixes #413621.
5994
5995 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
5996
5997         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
5998         frame_size to args_size. Fixes build.
5999
6000 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
6001
6002         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
6003         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
6004
6005         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
6006         the stack are not unaligned. Fixes #413247.
6007         
6008 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
6009
6010         * mini.c: update jitted methods performance counters.
6011
6012 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
6013
6014         * mini-exceptions.c: increase the exceptions thrown performance
6015         counter in mono_handle_exception ().
6016
6017 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
6018
6019         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
6020         can work with netmodules.
6021
6022 2008-07-28  Geoff Norton  <gnorton@novell.com>
6023
6024         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
6025         regression tests.
6026
6027 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
6028
6029         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
6030         correct place.
6031
6032 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
6033
6034         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
6035           The float param registers and other param registers must be the 
6036           same index on Windows x64.
6037
6038         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
6039           ArgValuetypeAddrInIReg argument case.  Setting the argument
6040           op to OP_VTARG_ADDR (OP_REGOFFSET)).
6041
6042         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
6043           variable computed above as the copy length for arguments of storage
6044           type ArgValuetypeAddrInIReg.
6045
6046         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
6047           ArgValuetypeAddrInIReg argument case.  This case will rely on
6048           mono_arch_emit_outarg_vt to emit the correct code later in the process.
6049
6050         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
6051           a 32 byte stack allocation for all calls.  We will omit the adjustment for
6052           jump and tail call instructoins as they do not follow the typical call behavior.
6053
6054         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
6055           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
6056           local variable and pass the local variable by reference to the called method.
6057
6058         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
6059           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
6060           of a struct is passed in a register it must be saved with the other
6061           volatile argument on the stack.
6062
6063         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
6064           frame pointer the stack adjustment value must be saved to the unwind 
6065           info structure.
6066
6067         Contributed under MIT/X11 license.
6068
6069 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
6070
6071         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
6072         which got lost in the merge.
6073
6074 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
6075
6076         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
6077         build.
6078
6079         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
6080         
6081         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
6082         icalls, since they won't be patched.
6083
6084         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
6085         different code sequence when running under valgrind to prevent some valgrind
6086         errors.
6087
6088         * iltests.il.in: Add new regression test.
6089
6090         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
6091         end with a throw.
6092
6093         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
6094         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
6095
6096         * iltests.il.in: Add new test.
6097
6098         * aot-compiler.c: Fix some warnings.
6099
6100         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
6101         Fixes #412494.
6102
6103 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
6104
6105         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
6106         (mini_usage_jitdeveloper): Add a missing --wapi option.
6107
6108 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
6109
6110         * mini-codegen.c: Simplify the is_fp macros.
6111         (free_up_ireg): Remove, use free_up_reg instead.
6112         (free_up_reg): Fix the fp case.
6113
6114 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
6115
6116         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
6117         lowered earlier.
6118
6119         * exceptions-x86.c: Merge some changes which seemed to have got lost
6120         in the linear-ir merge.
6121
6122         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
6123
6124         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
6125         long vreg volatile even if the variable was already created.
6126
6127         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
6128         volatile variables.
6129
6130 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
6131
6132         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
6133
6134         * mini.c (mono_jit_compile_method_inner): Add support for 
6135         MONO_EXCEPTION_BAD_IMAGE.
6136
6137         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
6138         mini_method_get_context () returns NULL. Fixes #356531.
6139
6140         * mini.c (mono_method_to_ir): Ditto.
6141         
6142         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
6143         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
6144
6145 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
6146
6147         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
6148         in the LDFTN implementation.
6149
6150 2008-07-25  Mark Probst  <mark.probst@gmail.com>
6151
6152         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
6153         code, patch calls to icalls, too, even if they're not in the
6154         shared generic code hash.  Fixes #411962.
6155
6156 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
6157
6158         * cpu-x86.md: Increase the length of the fcall opcodes.
6159
6160         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
6161         calls returning floats.
6162
6163         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
6164         on NEWARR.
6165         
6166         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
6167         missed earlier.
6168
6169         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
6170         into the domain->method_code_hash.
6171
6172         * aot-compiler.c: Fix win32 build.
6173
6174         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
6175         
6176         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
6177         gshared NEWARR implementation.
6178
6179         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
6180
6181         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
6182         can be used outside of method_to_ir.
6183
6184         * mini.h (MonoCompile): Add arg_types field.
6185
6186         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
6187         
6188         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
6189         the values of the local arg_array and param_types array.
6190
6191 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
6192
6193         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
6194         got accesses might only get generated later when NEWOBJ is decomposed.
6195         
6196         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
6197         looking up the native code of the target method when a delegate is called
6198         for the first time.
6199
6200         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
6201         optimization.
6202
6203         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
6204
6205         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
6206         AOT work on platforms without a working dlsym implementation.
6207
6208         * mini.h: Bump AOT image format version.
6209         
6210 2008-07-24  Mark Probst  <mark.probst@gmail.com>
6211
6212         * mini-exceptions.c: Free a MonoType with
6213         mono_metadata_free_type() instead of g_free().
6214
6215         * aot-runtime.c: Free a MonoType.
6216
6217 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
6218
6219         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
6220         optimization.
6221
6222         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
6223         fp stack on x86.
6224
6225 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
6226         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
6227         profiler hook.
6228
6229 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
6230
6231         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
6232         NEWOBJ calls on valuetypes.
6233
6234         * iltests.il.in: Add new test.
6235
6236         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
6237
6238 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
6239
6240         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
6241         is no longer needed.
6242
6243         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
6244         non register sized integer arguments.
6245         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
6246         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
6247         emit_memcpy2 ().
6248
6249         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
6250         CEE_MONO_RETOBJ.
6251         
6252         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
6253         two a binop with different sized arguments is emitted.
6254
6255         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
6256         instruction in the ins==NULL case.
6257
6258 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
6259
6260         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
6261
6262         * mini-x86.c: Fix osx build.
6263
6264         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
6265         opcodes as well.
6266
6267         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
6268         instruction for non int sized variables.
6269
6270         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
6271         implementation.
6272
6273 2008-07-23  Robert Jordan  <robertj@gmx.net>
6274
6275         * method-to-ir.c: Fix MSVC build.
6276
6277 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
6278
6279         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
6280         a non int sized type, widen it to an int since newer versions of gcc seem to
6281         generate code which needs this.
6282
6283         * ssa2.c abcremoval2.c: Fix warnings.
6284
6285         * *: Merge the Linear IR branch.
6286
6287         The original branch is at trunk/branches/vargaz/mini-linear-il, and
6288         the ChangeLog file there describes all the changes done over the years. 
6289         Further documentation can be found at www.mono-project.com/Linear_IL.
6290
6291 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
6292
6293         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
6294           The float param registers and other param registers must be the 
6295           same index on Windows x64.
6296
6297         Contributed under MIT/X11 license.
6298
6299 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
6300
6301         * mini.c: Make the previous fix GC safe.
6302
6303 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
6304
6305         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
6306
6307 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
6308
6309         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
6310           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
6311           ArgValuetypeAddrInIReg instead.
6312
6313         Contributed under MIT/X11 license.
6314
6315 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
6316
6317         * mini-codegen.c (get_register_spilling): Fix a warning.
6318
6319 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
6320
6321         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
6322         for types which the initialization fails. Raises the provided exception
6323         at the right stop after cleanup.
6324
6325 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
6326
6327         * aot-compiler.c: Free most of the memory allocated during compilation.
6328
6329         * mini.c (mini_parse_debug_options): Fix a leak.
6330         
6331         * mini.c (mini_method_compile): Don't add the method to the jit info tables
6332         during aot compilation.
6333
6334 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
6335
6336         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
6337         it has too much register pressure.
6338
6339 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
6340
6341         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
6342
6343 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
6344
6345         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
6346         on x86.
6347
6348         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
6349         on amd64 similar to the way it is done on arm.
6350
6351         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6352
6353         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
6354         consistency, normalize error messages, avoid loading aot-only modules in
6355         normal mode.
6356
6357         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
6358         for consistency.
6359
6360         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
6361
6362 2008-07-11  Martin Baulig  <martin@ximian.com>
6363
6364         * debug-debugger.h
6365         (MonoDebuggerInfo): Add `interruption_request'.
6366
6367 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
6368
6369         * aot-compiler.c (emit_plt): Remove some dead code.
6370
6371         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
6372
6373         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
6374         return the plt info offset belonging to a given plt entry.
6375
6376         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
6377         mono_aot_get_plt_info_offset.
6378         
6379         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
6380         similar to the amd64 code by makeing jumps through a separate jump table 
6381         instead of embedding the jump addresses into the code.
6382
6383 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
6384
6385         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
6386         method.
6387
6388 2008-07-10  Martin Baulig  <martin@ximian.com>
6389
6390         * mini.c (mini_method_compile): Disable generics sharing when
6391         running in the debugger.
6392
6393 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
6394
6395         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
6396
6397         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
6398         the local register allocator from running out of registers on x86 when 
6399         using aot.
6400
6401 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
6402
6403         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
6404         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
6405         C4146.
6406
6407         Contributed under MIT/X11 license.
6408
6409 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
6410
6411         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
6412         speed up the assembler.
6413
6414 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
6415
6416         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
6417         support.
6418
6419         * mini.c: Move the soft float handling macros a bit earlier, add 
6420         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
6421         place.
6422
6423         * mini.h: Add prototype for mono_arch_fixup_jinfo.
6424
6425         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
6426         read-only to help catch code allocation requests.
6427         
6428         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
6429         and turn it off when using --aot-only or when compiling with --aot=full.
6430
6431         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
6432         jump table for switches from the normal domain mempool, not the code
6433         manager.
6434
6435         * mini-trampolines.c (get_unbox_trampoline): New function to return an
6436         unbox trampoline which handles aot-only mode too.
6437
6438         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
6439         an AOTed unbox trampoline.
6440
6441         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
6442
6443 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
6444
6445         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
6446         ""
6447
6448         Contributed under MIT/X11 license.
6449
6450 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
6451
6452         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
6453           the unwind information for the method at the end of the allocated block.
6454           
6455         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
6456           MonoCompileArch to hold the unwind info for SEH on Winx64
6457         
6458         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
6459           frame pointer info for the method being compiled.
6460           
6461         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
6462           the call to mono_exception_from_token.
6463           
6464         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
6465           storing the method prolog information in a format that the Winx64 SEH can understand.  This
6466           information is stored a the end of the method block because it is all 32-bit offset based.
6467
6468         Contributed under MIT/X11 license.
6469
6470 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
6471
6472         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
6473
6474         * wapihandles.c: Fix warnings.
6475
6476         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
6477         mode.
6478
6479         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
6480         mono_jit_compile_method in aot-only mode since that calls the type 
6481         initializer.
6482         
6483         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
6484         get_delegate_invoke_impl in aot-only mode.
6485
6486         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
6487
6488 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
6489
6490         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
6491
6492         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
6493         is on by default.
6494
6495         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
6496
6497         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
6498         init trampoline from the AOT file as well.
6499
6500         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
6501         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
6502         code.
6503
6504         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
6505         mono_init.
6506
6507         * exceptions-amd64.c: Add _full variants for the remaining exception code
6508         creation functions as well, allow emission of relocatable code, remove
6509         caching since that is now done by the caller.
6510
6511         * mini-exceptions.c: Add _full variants for the remaining exception code
6512         creation functions as well, add aot-only support.
6513
6514         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
6515         if we can determine a proper token for them.
6516         (add_wrappers): Add a few more wrappers.
6517         (emit_method_code): Remove some dead code.
6518         (emit_trampolines): Emit exception code too.
6519
6520         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
6521
6522         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
6523         mono_array_new_va which avoids varargs.
6524
6525         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
6526
6527         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
6528         mono_arch_create_specific_trampoline () in all places.
6529
6530         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
6531         a bit so it can be used for other things as well.
6532         
6533         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
6534         on demand as well.
6535
6536         * exceptions-amd64.c: Rename the caching from the exception code creation
6537         functions, it is done by the caller instead.
6538         
6539         * exceptions-amd64.c: Change the signature of the exception code creation 
6540         functions to allow the creation of relocatable code later.
6541
6542         * mini-exceptions.c: Add a set of functions to query the various 
6543         runtime-generated exception functions.
6544
6545         * mini.c mini-exceptions.c: Use the newly added functions instead of the
6546         mono_arch_.. () functions.
6547         
6548 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
6549
6550         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
6551
6552         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
6553
6554         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
6555         (mini_get_vtable_trampoline): Ditto.
6556
6557         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
6558         code in the AOT case by returning the code size and a list of relocations to
6559         the caller.
6560
6561         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
6562
6563 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
6564
6565         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
6566           clean the stack.
6567
6568         Contributed under MIT/X11 license.
6569
6570 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
6571
6572         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
6573         so the buffer size can be computed correctly. Fixes #404735.
6574
6575         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
6576         normally as cfg->debug_info is already freed.
6577
6578 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
6579
6580         * mini-amd64.c: For calls returning vtypes in registers, don't store
6581         the return address on the stack, instead allocate a separate local for
6582         it. Fixes #404729.
6583
6584 2008-07-05  Mark Probst  <mark.probst@gmail.com>
6585
6586         * mini-trampolines.c, mini.h: Add an argument to
6587         mono_create_jit_trampoline_in_domain() for turning off the adding
6588         of the sync wrapper.
6589
6590         * mini.c: Use the JIT trampoline without sync instead of
6591         ldftn_nosync in static RGCTX invoke wrappers so that the call can
6592         be patched.
6593
6594 2008-07-04  Mark Probst  <mark.probst@gmail.com>
6595
6596         * driver.c: Turn on GSHARED optimization by default.
6597
6598 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
6599
6600         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
6601         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
6602
6603         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
6604         create a variant of the generic trampoline code callable from AOTed trampolines.
6605
6606         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
6607         trampoline code callable from AOTed trampolines.
6608
6609         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
6610
6611 2008-07-04  Mark Probst  <mark.probst@gmail.com>
6612
6613         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
6614         pass-through manner.
6615
6616         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
6617         and don't fail sharing for them anymore.
6618
6619         * mini-exceptions.c: Handle exceptions in shared generic methods.
6620
6621         * generic-sharing.c: When checking the context of a generic
6622         method, also check its class's context.  Don't treat wrappers as
6623         sharable.
6624
6625         * mini-trampolines.c: Some code factored out to
6626         metadata/generic-sharing.c.  Handle the MRGCTX case.
6627
6628         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
6629         we must deal with the method being of another instantiation of the
6630         class.  Add static rgctx invoke wrappers to generic methods.
6631
6632 2008-07-04  Mark Probst  <mark.probst@gmail.com>
6633
6634         * mini.c: Provide all jit infos of generic shared methods with a
6635         generic jit info.
6636
6637         * mini-exceptions.c: Handle the new situation that a generic info
6638         might be available, but not info about the this/vtable/mrgctx
6639         variable.
6640
6641 2008-07-03  Mark Probst  <mark.probst@gmail.com>
6642
6643         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
6644         generic methods.
6645
6646 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
6647
6648         * dominators.c (check_dominance_frontier): Fix a warning.
6649
6650         * mini.h: Add some missing prototypes.
6651
6652         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
6653
6654         * driver.c (mono_jit_init_version): Correct the comments since the first
6655         argument should be the name of the root domain, not a filename.
6656
6657         * aot-runtime.c (make_writable): Error out if this is called while running
6658         with --aot-only.
6659         (load_aot_module): Ditto.
6660
6661         * aot-compiler.c: Really fix the computation of method indexes.
6662
6663         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
6664         optimizations as this is no longer called frequently.
6665
6666         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
6667         method and the invoke impl code and pass it to the delegate trampoline instead of
6668         just the delegate class.
6669
6670 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
6671
6672         * aot-compiler.c: Fixup the computation of method indexes.
6673         (add_wrappers): Create the base methods of the runtime invoke wrappers using
6674         the method builder infrastructure.
6675
6676         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
6677         has no header.
6678
6679         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
6680         mode, load the method right away instead of creating a trampoline.
6681
6682         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
6683
6684         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
6685         some checks a bit.
6686
6687 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
6688
6689         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
6690         (mono_aot_load_method): Use method_index instead of method->token.
6691
6692         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
6693         can handle icalls etc. properly.
6694
6695         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6696
6697         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
6698
6699         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
6700         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
6701         JIT_ICALL_ADDR patch type.
6702
6703         * patch-info.h: Add JIT_ICALL_ADDR patch type.
6704
6705         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
6706         request flag.
6707         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
6708
6709         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
6710
6711 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
6712
6713         * mini.c: Use domain->jit_code_hash_lock for controlling access to
6714         domain->jit_code_hash.
6715
6716 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
6717
6718         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
6719
6720 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
6721
6722         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
6723         get_this_arg_from_call, let it compute it when needed.
6724
6725         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
6726         gsctx from code only when needed.
6727
6728         * mini-trampolines.c (get_generic_context): Rename this to 
6729         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
6730         it can be called by the arch backends.
6731
6732         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
6733
6734 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
6735
6736         * driver.c (mono_main): Add experimental --aot-only command line option.
6737
6738         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
6739         set.
6740
6741 2008-06-26  Kornel Pal  <kornelpal@gmail.com>
6742
6743         * driver.c (DllMain): Remove mono_module_handle.
6744
6745         Contributed under MIT/X11 license.
6746
6747 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
6748
6749         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
6750         for emitting methods which are not in the source assembly. Detect and report
6751         failure of assembling+linking.
6752         
6753         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
6754
6755         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
6756
6757 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
6758
6759         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
6760
6761 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
6762
6763         * mini.h: Remove some obsolete prototypes.
6764
6765         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
6766
6767 2008-06-24  Mark Probst  <mark.probst@gmail.com>
6768
6769         * mini.c (get_object_generic_inst): Variable-sized arrays are not
6770         supported by Visual Studio, so use alloca().
6771
6772 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
6773
6774         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
6775         Fixes #402585.
6776
6777 2008-06-23  Mark Probst  <mark.probst@gmail.com>
6778
6779         * mini.c: Fail sharing of a generic method if it contains an open
6780         catch clause (because we don't pass MRGCTXs yet).
6781
6782 2008-06-23  Mark Probst  <mark.probst@gmail.com>
6783
6784         * mini.c: When compiling a method with generic sharing, insert the
6785         method instantiated with an all-Object generic context into the
6786         jit info table, instead of the context of the first instantiation
6787         of the method we happen to compile.
6788
6789 2008-06-18  Martin Baulig  <martin@ximian.com>
6790
6791         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
6792         `major_version' and `minor_version'.
6793
6794 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6795
6796         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
6797         mono_method_is_generic_sharable_impl() takes an additional
6798         argument specifying whether to treat type variables as reference
6799         types.
6800
6801 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6802
6803         * mini.h: Removed obsolete prototypes.
6804
6805 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6806
6807         * mini.c: Don't fail generic sharing for initobj and sizeof - we
6808         already handle them.
6809
6810 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6811
6812         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
6813         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
6814         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
6815         tramp-x86.c: Added a MonoGenericContext* argument to
6816         mono_arch_get_unbox_trampoline() so that it can call other
6817         functions which require it.
6818
6819 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6820
6821         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
6822         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
6823         mono_arch_get_this_arg_from_call() takes a
6824         MonoGenericSharingContext* as well.
6825
6826 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6827
6828         * mini.c: Factor out code for emitting unbox into emit_unbox() and
6829         implement generic sharing of unbox.
6830
6831 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6832
6833         * mini.c: Don't compute the vtable to determine whether a field is
6834         special static, because it might not work for open types.
6835
6836 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6837
6838         * mini.c: Removed the unused token_type and token_source arguments
6839         from get_runtime_generic_context_ptr().
6840
6841 2008-06-17  Marek Habersack  <mhabersack@novell.com>
6842
6843         * mini.c (ADD_BINOP): fix the build
6844
6845 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
6846
6847         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
6848         a widening op.
6849
6850 2008-06-16  Mark Probst  <mark.probst@gmail.com>
6851
6852         * mini.h: Removed class relations enum that's not used anymore.
6853
6854 2008-06-16  Mark Probst  <mark.probst@gmail.com>
6855
6856         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
6857
6858         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
6859         the lazy fetch trampoline access code.
6860
6861 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
6862
6863         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
6864
6865 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
6866
6867         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
6868
6869         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
6870
6871         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
6872
6873 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
6874
6875         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
6876         intrinsics.
6877
6878         * mini-ops.h: Add MIN/MAX_UN opcodes.
6879
6880         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
6881         intrinsics.
6882
6883         * basic-math.cs: Add more min/max tests.
6884
6885         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
6886
6887 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6888
6889         * mini.c: Small fix in the prologue of emit_castclass.
6890
6891 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
6892
6893         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
6894
6895         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
6896         do not work even for unsigned types. Fixes #400014.
6897
6898         * basic-math.cs: Add regression tests for unsigned Min/Max.
6899
6900 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6901
6902         * mini.c: Added additional context_used argument to several
6903         functions, which will be needed for sharing generic methods.  Use
6904         GET_RGCTX macro wherever appropriate.  Declare only one
6905         context_used in mono_method_to_ir().
6906
6907 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6908
6909         * mini.c, generic-sharing.c: Removed generic class relations.
6910
6911         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
6912         functions due to MRGCTX changes.
6913
6914 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6915
6916         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
6917         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
6918         with calculated IMT.
6919
6920         * mini.c: Generic sharing of calls via generic interfaces.
6921
6922         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
6923         generic method with non-constant MonoGenericContext*.  Instead,
6924         the context is taken out of the method itself.
6925
6926 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6927
6928         * mini.c: Generic sharing of ldvirtftn.
6929
6930 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6931
6932         * mini.c: Generic sharing of ldftn.
6933
6934 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6935
6936         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
6937
6938 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6939
6940         * mini.c: Generic sharing of the special case of ldtoken followed
6941         by a call to GetTypeFromHandle.
6942
6943 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6944
6945         * mini.c: Generic sharing of box for nullable types.
6946
6947 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
6948
6949         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
6950         are passed on the stack. Fixes #324807.
6951
6952 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
6953
6954         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
6955         for the ArgValuetypeAddrInIReg case.
6956
6957         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
6958         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
6959
6960         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
6961         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
6962         local variable and pass the local variable by reference to the called method.
6963           
6964         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
6965         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
6966
6967         Contributed under MIT/X11 license.
6968
6969 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
6970
6971         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
6972
6973         * debug-mini.c (mono_debug_print_vars): Release memory after printing
6974         everything.
6975
6976 2008-06-10  Martin Baulig  <martin@ximian.com>
6977
6978         * debug-mini.c
6979         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
6980
6981 2008-06-09  Kornel Pal  <kornelpal@gmail.com>
6982
6983         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
6984         possible error when no arguments are passed.
6985
6986         Contributed under MIT/X11 license.
6987
6988 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
6989
6990         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
6991         where the file name is NULL.
6992
6993 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
6994
6995         * mini.c: Fix s390 build.
6996
6997 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
6998
6999         * trace.c (mono_trace_parse_options): Fix warnings.
7000
7001         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
7002
7003 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
7004
7005         * mini.c (remove_block_if_useless): Avoid printing the method name.
7006         
7007         * mini.c: Remove needless setting of ins->cil_code which is now done by 
7008         MONO_INST_NEW.
7009
7010         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
7011         LMF. Not yet used.
7012
7013         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
7014         translated code after it has been patched.
7015
7016 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
7017
7018         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
7019         avoid problems during code patching on SMP systems.
7020         (emit_call): Avoid adding a patch info which is already added by 
7021         emit_call_body.
7022         (mono_arch_emit_exceptions): Ditto.
7023
7024 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
7025
7026         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
7027         MONO_TYPE_ISSTRUCT already checks for it.
7028
7029 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
7030
7031         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
7032           structs with floats on Winx64 the float registers are not used.  
7033           The integer registers are always used..
7034         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
7035           only one register will be used and only if the size of the struct 
7036           is 1,2,4, or 8 bytes.
7037
7038         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
7039           to work for Winx64.
7040
7041         Contributed under MIT/X11 license.
7042
7043 2008-06-05  Martin Baulig  <martin@ximian.com>
7044
7045         * debug-debugger.c (debugger_lookup_class): Also call
7046         mono_class_setup_methods() here; we're only called from RTI.
7047
7048 2008-06-05  Andreas Farber  <andreas.faerber@web.de>
7049
7050         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
7051         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
7052         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
7053         Post-process object files and add dtrace-generated object, if necessary.
7054
7055         Contributed under MIT/X11 license.
7056
7057 2008-06-04  Mark Probst  <mark.probst@gmail.com>
7058
7059         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
7060         element class.
7061
7062         * mini.c: Generic sharing for unbox.any and castclass.
7063
7064 2008-06-04  Mark Probst  <mark.probst@gmail.com>
7065
7066         * mini.c: Ignore tailcall prefix in shared generic code and when
7067         doing calls which require a vtable/rgctx argument.
7068
7069 2008-06-04  Mark Probst  <mark.probst@gmail.com>
7070
7071         * mini.c: Don't free the JIT info.
7072
7073         * driver.c: Changes in the JIT info table testing code.
7074
7075 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
7076
7077         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
7078         interruption. Fix some warnings.
7079
7080         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
7081         interruption_checkpoint.
7082
7083 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
7084
7085         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
7086         from embedding applications.
7087
7088 2008-06-02  William Holmes  <billholmes54@gmail.com>
7089
7090         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
7091           reserving 32 bytes on the stack when making calls. 
7092
7093         Contributed under MIT/X11 license.
7094
7095 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
7096
7097         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
7098         the linear IL branch.
7099
7100         * driver.c: Print out more information for --version on arm.
7101
7102 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
7103
7104         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
7105         bb_exit instead, since out of line bblocks might not actually be emitted
7106         out-of-line.
7107         
7108         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
7109         maximum epilog size for out of line bblocks if tracing is enabled.
7110
7111         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
7112
7113 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
7114
7115         * arrays.cs: Regression tests for allocating arrays with negative sizes.
7116
7117 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
7118
7119         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
7120         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
7121         opcodes.
7122
7123 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
7124
7125         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
7126         the 'value' to store is a constant.
7127
7128         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
7129
7130         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
7131         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
7132
7133 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
7134
7135         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
7136         for accessing method->generic_container.
7137
7138 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
7139
7140         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
7141         
7142         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
7143
7144         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
7145
7146         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
7147         fails.
7148
7149 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
7150
7151         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
7152
7153         * mini.c: Handle the case when mono_class_vtable () fails.
7154
7155 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
7156         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
7157         the stat profiler.
7158
7159 2008-05-22  Mark Probst  <mark.probst@gmail.com>
7160
7161         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
7162         together with domain sharing.
7163
7164 2008-05-22  Mark Probst  <mark.probst@gmail.com>
7165
7166         * mini.c: Treat callvirts to final methods like non-virtual calls
7167         when doing generic sharing, i.e. look them up in the runtime
7168         generic context.
7169
7170 2008-05-22  Mark Probst  <mark.probst@gmail.com>
7171
7172         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
7173         with computed types (for generic sharing).
7174
7175         * mini.c: Generic sharing for mkrefany and refanyval.
7176
7177 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
7178
7179         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
7180         possible.
7181
7182         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
7183         the generic sharing code.
7184         
7185         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
7186         when needed.
7187
7188 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
7189
7190         * mini.h: Remove the declaration of mono_aot_init_vtable ().
7191
7192 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
7193
7194         * driver.c: updated copyright date
7195
7196 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
7197
7198         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
7199         needed.
7200
7201 2008-05-19  Martin Baulig  <martin@ximian.com>
7202
7203         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
7204         pointing to the new `_mono_debug_using_mono_debugger' variable.
7205
7206         * driver.c
7207         (mono_main): Check mono_debug_using_mono_debugger() rather than
7208         the `MONO_INSIDE_MDB' environment variable to check whether we're
7209         inside the debugger.
7210
7211 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
7212
7213         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
7214         argument.
7215
7216 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
7217
7218         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
7219
7220         * mini.c: Added mini_assembly_can_skip_verification. This
7221         function checks if the assembly requested to skip verification. 
7222         Fixes part of #387274.
7223
7224 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
7225
7226         * mini.c (mini_get_method): Disable the check for open generic classes when
7227         using generic sharing.
7228
7229         * generics.cs: Add a test for #387034.
7230
7231         * mini.c (mini_get_method): Check whenever the method class is an open generic
7232         type, and return NULL in that case, causing a verification error. Fixes
7233         #384123.
7234
7235 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
7236
7237         * driver.c (mono_main): Revert r102623. The right
7238         thing to do is to enable the verifier under verifiable
7239         unless a --security flag was passed.
7240
7241         We need this non-trivial behavior for --verify-all otherwise
7242         mcs-compileall won't be able to use it. As it needs everything to
7243         be verified under validil.
7244
7245 2008-05-06  Martin Baulig  <martin@ximian.com>
7246
7247         Fix #383749.
7248
7249         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
7250         (mono_debugger_thread_cleanup): Likewise.
7251         (mono_debugger_extended_notification): Likewise.
7252
7253 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
7254
7255         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
7256         against both inflated and non-inflated methods. We need to check against the
7257         generic definition for cases where the instantiated method is not visible.
7258         We need to check against the inflated types for cases where the instantiation
7259         changes any super type. This fixes #382986.
7260
7261         Note that this doesn't need to be applied to other parts of mono_method_to_ir
7262         that check for visibiliy as generic params only appears as the type subject
7263         of tokens on call opcodes. Field manipulation and ldftn must always
7264         target an exact type.
7265
7266 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
7267
7268         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
7269         if no related --security flag is passed.
7270
7271 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
7272
7273         * mini-arch.h: Prepare support for ppc64.
7274
7275         Contributed under MIT/X11 license.
7276
7277 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
7278
7279         * aot-runtime.c: Prepare support for ppc64.
7280
7281         Contributed under MIT/X11 license.
7282
7283 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
7284
7285         * mini-ops.h: Prepare support for ppc64.
7286
7287         Contributed under MIT/X11 license.
7288
7289 2008-05-04  Andreas Farber  <andreas.faerber@web.de>
7290
7291         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
7292
7293         Contributed under MIT/X11 license.
7294
7295 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
7296
7297         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
7298         assemblies, since aot_name is not a full path, causing us to load MS.NET 
7299         assemblies on windows.
7300
7301 ?2008-04-28  Kornel Pal  <kornelpal@gmail.com>
7302
7303         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
7304         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
7305         * main.c: Use UTF-8 encoded command line instead of Windows default code
7306         page on Windows to support Unicode.
7307         * driver.c (DllMain): New function for mixed-mode assembly support.
7308         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
7309         export __stdcall functions without decoration.
7310
7311         Contributed under MIT/X11 license.
7312
7313 2008-04-28  Mark Probst  <mark.probst@gmail.com>
7314
7315         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
7316         saving it very early.
7317
7318 2008-04-28  Mark Probst  <mark.probst@gmail.com>
7319
7320         * mini.h, mini.c: Lots of code for accessing the old RGCTX
7321         deleted.  The only way to access the new RGCTX is via the
7322         trampline.
7323
7324         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
7325         vtable instead of the RGCTX to static methods.
7326
7327         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
7328         accessing the new RGCTX.
7329
7330         * generic-sharing.c: There is no separation between self, type
7331         arguments and other types in the RGCTX anymore.
7332
7333 2008-04-25  Jonathan Chambers <joncham@gmail.com>
7334
7335         * mini-amd64.c (add_general): Remove previous stack adjustment.
7336         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
7337         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
7338         for 32 bytes of stack space reserved for all calls.
7339         
7340         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
7341         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
7342         adjustment.
7343         
7344         Code contributed under MIT/X11 license.
7345
7346 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
7347
7348         * mini.c (mini_method_verify): Only verify non-inflated methods, check
7349         against the root definition, peeling out method and type instantiations.
7350         Cache verify success results, code that fails verification is still
7351         checked multiple times.
7352
7353 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
7354
7355         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
7356
7357 2008-04-23  Jonathan Chambers <joncham@gmail.com>
7358
7359         * mini-amd64.c (add_general): Always increment stack on Win64.
7360         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
7361         on Win64.
7362         
7363         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
7364         stack based argument handling on Win64.
7365         
7366         Code contributed under MIT/X11 license.
7367
7368 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
7369
7370         * Makefile.am (version.h): Add support for git-svn.
7371
7372 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
7373
7374         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
7375         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
7376         avoiding allocations and libc functions which might deadlock.
7377         
7378         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
7379         'no-gdb-backtrace' option is set.
7380
7381         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
7382
7383         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
7384
7385 2008-04-21  Martin Baulig  <martin@ximian.com>
7386
7387         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
7388         and `get_lmf_addr'; `notification_address' is no longer a pointer.
7389
7390 2008-04-21  Martin Baulig  <martin@ximian.com>
7391
7392         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
7393         `thread_vtable', `event_handler_ptr' and `event_handler'.
7394
7395 2008-04-21  Martin Baulig  <martin@ximian.com>
7396
7397         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
7398         allows delayed initialization of the `executable_code_buffer' when
7399         attaching.
7400
7401 2008-04-21  Martin Baulig  <martin@ximian.com>
7402
7403         * mini.h (mono_debugger_create_notification_function): Removed.
7404         * tramp-*.c (mono_debugger_create_notification_function): Removed.
7405
7406         * mdb-debug-info64.s
7407         (MONO_DEBUGGER__notification_function): Added this in the .text section.
7408
7409         * mdb-debug-info32.s
7410         (MONO_DEBUGGER__notification_function): Added this in the .text section.
7411
7412         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
7413         currently only works on x86 and x86_64, so don't create it on ppc.
7414
7415 2008-04-21  Martin Baulig  <martin@ximian.com>
7416
7417         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
7418
7419         * mini.c
7420         (mini_method_compile): In the fp elimination check, check
7421         `debug_options.mdb_optimizations' in addition to
7422         mono_debug_using_mono_debugger().       
7423
7424         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
7425         disable some JIT optimizations which are only disabled when
7426         running inside the debugger.
7427         Added `--help-debug' option to describe the debugging options.
7428         (parse_debug_options): New static function to parse the `--debug'
7429         options, so we can easily add more stuff in future.
7430
7431 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
7432
7433         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
7434         the method has no body.
7435
7436 2008-04-19  Jonathan Chambers <joncham@gmail.com>
7437
7438         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
7439         assembly is not allowed in MSVC 64-bit compiler. 
7440         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
7441         as we get floating point exceptions everywhere.
7442         
7443         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
7444         correctly align arguments for call to throw_exception.
7445         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
7446         
7447         Code contributed under MIT/X11 license.
7448
7449 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
7450
7451         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
7452
7453 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
7454
7455         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
7456
7457         * mini-amd64.c (NEW_INS): Set cil_code.
7458
7459         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
7460         from mini-amd64.c so all debugger related logic is in one place.
7461
7462         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
7463         later won't have a random ip assigned to them.
7464
7465 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
7466
7467         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
7468         the arch specific function initializes code_size.
7469         (mono_create_delegate_trampoline): Ditto.
7470
7471         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
7472         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
7473         platforms.
7474
7475         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
7476         running under the debugger.
7477
7478         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
7479         debugger.
7480
7481         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
7482         debugger. Also move the disabling of optimizations here from driver.c.
7483         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
7484         debugger.
7485
7486         * mini.h (MonoCompile): Add a few new flags.
7487
7488 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
7489
7490         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
7491         so the cil_code field of created MonoInst's is properly set.
7492         (mini_select_instructions): Ditto.
7493
7494         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
7495         (MONO_INST_NEW_CALL): Ditto.
7496
7497         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
7498         in many places so the ins->cil_code field is properly initialized.
7499
7500         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
7501         place.
7502
7503 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
7504
7505         * mini.c (mini_method_compile): Print a different message when compiling a 
7506         shared method.
7507         
7508         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
7509         > 1.
7510
7511 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
7512
7513         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
7514         SSE2 instructions.
7515
7516         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
7517         
7518 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
7519
7520         * mini.c (handle_stack_args): Make this return void since its return value was
7521         never used. Also set cfg->unverifiable for invalid IL instead of calling
7522         G_BREAKPOINT ().
7523
7524 2008-04-10  Mark Probst  <mark.probst@gmail.com>
7525
7526         * mini.c: Make sure "this" is live in catch clauses with type
7527         variables in shared generic code.
7528
7529 2008-04-08  Mark Probst  <mark.probst@gmail.com>
7530
7531         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
7532         generic_class_is_reference_type() to ensure the proper behaviour
7533         when sharing generic code and the type in question is a type
7534         argument.
7535
7536 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
7537
7538         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
7539         race conditions when printing thread dumps. Fixes #377738.
7540
7541 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
7542         
7543         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
7544         shows up when both MonoInst arguments can cause aliasig.
7545         There is likely no way in the current JIT to trigger this problem, but
7546         it showed up in the development of generics sharing, when in a new
7547         opcode both args of an OP_GROUP can be aliases (addresses of a local).
7548         When the generics sharing code will be committed, its tests will be
7549         valid also for this bug.
7550
7551 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
7552
7553         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
7554         PATCH_INFO_METHOD.
7555
7556         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
7557         NULL.
7558
7559 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
7560
7561         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
7562         use a more detailed exception message for InvalidCastException.
7563
7564         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
7565
7566         * driver.c (mono_main): Add --debug=casts option to turn on better 
7567         InvalidCastException message details.
7568
7569         * mini.c (mini_get_debug_options): New helper function to return the address of
7570         the debug_options variable.
7571
7572         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
7573         the jit_tls TLS variable.
7574
7575         * mini.c (mono_jit_tls): New TLS variable.
7576
7577         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
7578         option is used.
7579
7580 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
7581
7582         * mini.h: Removed verifer related stuff. This code was moved to verify.c
7583
7584         * mini.c: Removed verifer related stuff, code moved to verify.c.
7585
7586         * driver.c: Using code from verify.c instead of mini.c.
7587
7588 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
7589
7590         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
7591         longer valid.
7592
7593 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
7594
7595         * mini.c (check_for_method_verify): Enabling verification of
7596         corlib if mono_verify_all is set. Bugs in the verifier preventing that
7597         have been fixed.
7598
7599 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
7600
7601         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
7602         caller saved registers as well.
7603         
7604         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
7605         saved registers as well.
7606
7607 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
7608
7609         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
7610
7611         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
7612         code.
7613
7614 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
7615
7616         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
7617         to get_call_info.
7618         (get_call_info): Take a gsctx argument instead of 'cfg'.
7619
7620 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
7621
7622         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
7623         mono_verify_all is set.
7624
7625         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
7626
7627         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
7628
7629 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
7630
7631         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
7632         an exception.
7633
7634         * driver.c mini.c mini.h: Add a --verify-all development option to test the
7635         verifier and the code generated by the compiler.
7636
7637 2008-03-25  Mark Probst  <mark.probst@gmail.com>
7638
7639         * mini.c: Generic sharing of the non-nullable case of the box
7640         instruction.
7641
7642 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
7643
7644         * inssel.brg: Fix the build.
7645
7646         * iltests.il.in: Add a test for lconv.ovf.u8.un.
7647
7648 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
7649
7650         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
7651         Array:Address. Fixes #372410.
7652
7653         * iltests.il.in: New tests for readonly prefix.
7654
7655 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
7656
7657         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
7658         mini-trampolines.c.
7659
7660         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
7661         mini-exceptions.c.
7662
7663         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
7664         
7665         * mini.c (mono_decompose_op_imm): New helper function.
7666
7667         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
7668         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
7669         return value.
7670
7671         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
7672         mono_arch_output_basic_block. Fix warnings.
7673
7674         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
7675         for now.
7676
7677 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
7678
7679         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
7680         since the extra frame is now detected automatically inside the loop.
7681
7682         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
7683         opts which are now in mono_peephole_ins ().
7684         
7685         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
7686
7687         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
7688         frames and skip duplicate managed-to-native frames. Fixes #367665.
7689
7690         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
7691         opts which are now in mono_peephole_ins ().
7692         (mono_arch_peephole_pass_2): Ditto.
7693
7694         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
7695
7696         * mini-codegen.c (mono_peephole_ins): New helper function containing the
7697         arch independent peephole optimizations.
7698
7699         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
7700         opts which are now in mono_peephole_ins ().
7701
7702         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
7703         
7704         * mini-s390.c (mono_arch_output_basic_block): Fix build.
7705
7706         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
7707         pattern.
7708
7709         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
7710         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
7711         opcode. 
7712
7713 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
7714
7715         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
7716         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
7717         return value.
7718
7719         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
7720         mono_arch_output_basic_block. Fix warnings.
7721
7722 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
7723
7724         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
7725         conv.ovf.u.un.
7726
7727 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
7728
7729         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
7730         conv.ovf.u.un.
7731
7732         * iltests.il: Add new tests.
7733
7734 2008-03-20  Kornel Pal  <kornelpal@gmail.com>
7735
7736         * mini.c: Removed Windows version macros.
7737
7738 2008-03-20  Mark Probst  <mark.probst@gmail.com>
7739
7740         * generic-sharing.c: Put reflection types in the extensible part
7741         of the runtime generic context.
7742
7743         * mini.c: Generic sharing of the GetTypeHandle special case of the
7744         ldtoken instruction.
7745
7746 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
7747
7748         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
7749
7750         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
7751         
7752         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
7753         consistency with the other version on the linear IR branch.
7754
7755         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
7756
7757         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
7758
7759         * iltests.il.in: Add new tests.
7760
7761 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
7762
7763         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
7764
7765         * iltests.il.in: Add new tests.
7766
7767 2008-03-19  Mark Probst  <mark.probst@gmail.com>
7768
7769         * mini.c: Two variables with the same name were declared in
7770         nesting contexts and one wasn't initialized.  Fixed.
7771
7772 2008-03-19  Mark Probst  <mark.probst@gmail.com>
7773
7774         * mini.c: Generic sharing of the initobj instruction.
7775
7776 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
7777
7778         * mini.c: make the test to optimize ldtoken from typeof() more
7779         precise.
7780
7781 2008-03-18  Mark Probst  <mark.probst@gmail.com>
7782
7783         * mini.c: Generic sharing of the initobj instruction for reference
7784         types.
7785
7786 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
7787
7788         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
7789         the mono_breakpoint_clean_code() code to perform bound checks.
7790
7791 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
7792
7793         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
7794         mono_arch_patch_callsite() to include the start of the managed method
7795         to be able to perform bound checks.
7796
7797 2008-03-17  Mark Probst  <mark.probst@gmail.com>
7798
7799         * mini.c: Generic sharing for the isinst instruction.
7800
7801 2008-03-17  Mark Probst  <mark.probst@gmail.com>
7802
7803         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
7804         inssel-long32-mips.brg: Added opcodes for doing indirect calls
7805         with the runtime generic context argument.
7806
7807         * mini.c: Share calls to several types of unsharable methods by
7808         putting the address of the method code in the runtime generic
7809         context and doing an indirect call.
7810
7811         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
7812         to switches.
7813
7814 2008-03-16  Mark Probst  <mark.probst@gmail.com>
7815
7816         * generic-sharing.c: Change due to a change in the runtime genric
7817         context API.
7818
7819 2008-03-15  Martin Baulig  <martin@ximian.com>
7820
7821         * tramp-x86.c
7822         (mono_arch_nullify_class_init_trampoline): Add call to
7823         mono_breakpoint_clean_code() to make things work when running
7824         inside the debugger.
7825
7826         * tramp-amd64.c
7827         (mono_arch_nullify_class_init_trampoline): Add call to
7828         mono_breakpoint_clean_code() to make things work when running
7829         inside the debugger.
7830
7831 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
7832
7833         * inssel-long.brg (reg): Fix 64 bit build.
7834
7835 2008-03-14  Mark Probst  <mark.probst@gmail.com>
7836
7837         * mini.c, mini.h: Share static generic code by passing it an
7838         implicit argument pointing to the runtime generic context.
7839
7840         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
7841         inssel-long32-mips.brg: New opcodes for calling shared static,
7842         which need to be passed the runtime generic context.
7843
7844         * mini-amd64.c, mini-x86.c: Save the runtime generic context
7845         argument on the stack in the prologue if needed.  New function for
7846         finding the runtime generic context argument from the registers
7847         saved by the trampoline.
7848
7849         * mini-amd64.h, mini-x86.h: Specify which register to use for the
7850         runtime generic context argument.
7851
7852         * tramp-amd64.c: Also restore the register used for the runtime
7853         generic context argument.
7854
7855         * mini-trampoline.c: Resolve shared static calls by consulting the
7856         runtime generic context via the new argument.
7857
7858         * generic-sharing.c: Add an argument to sharability-checking
7859         functions that specifies whether type variables should be treated
7860         as sharable type arguments.
7861
7862         * inssel-x86.brg: Removed a superfluous, buggy rule.
7863
7864         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
7865         to switches.
7866
7867 2008-03-14  Martin Baulig  <martin@ximian.com>
7868
7869         * debug-debugger.c (main_thread_handler): Call
7870         mono_runtime_run_main() without sending any notifications.
7871
7872         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
7873
7874 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
7875
7876         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
7877
7878 2008-03-14  Mark Probst  <mark.probst@gmail.com>
7879
7880         * tramp-x86.c: Fixed register restore offsets in the trampoline
7881         code for ECX and EDX.
7882
7883 2008-03-12  Geoff Norton  <gnorton@novell.com>
7884
7885         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
7886         different ucontext_t implementations.
7887         * exceptions-arm.c: Use the above defines to get exceptions working on 
7888         iPhone (based on a patch by Luke Howard lukeh@padl.com)
7889         * mini-arm.c: Implement iPhone icache support (based on a patch by
7890         Luke Howard lukeh@padl.com)
7891
7892 2008-03-12  Mark Probst  <mark.probst@gmail.com>
7893
7894         * mini.c: Enable generic sharing of calls to non-static
7895         non-interface non-generic non-value-type methods.
7896
7897         * mini-trampolines.c: Resolve calls from shared generic code.
7898
7899 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
7900
7901         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
7902
7903         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
7904
7905 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
7906
7907         * mini.c: some fixes for the AOT compiler.
7908
7909 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
7910
7911         * cpu-amd64.md: Add clob:1 to some float opcodes.
7912
7913 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
7914
7915         * mini.h: Added MiniVerifierMode enumeration.
7916
7917         * mini.c: Added mini_verifier_set_mode to control
7918         the usage of the new verifier.
7919
7920         * mini.c (mono_method): Integrated the new verifier.
7921
7922         * driver.c: Extended --security option with validil and
7923         verifiable options to activate the new verifier.
7924
7925 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
7926
7927         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
7928         optimization to ctors taking 0 or 2 arguments too.
7929
7930         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
7931         a bit.
7932
7933         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
7934
7935         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
7936
7937 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
7938
7939         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
7940         non-aot case as well.
7941
7942         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
7943
7944         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
7945         changes.
7946
7947         * aot-compiler.c (encode_patch): Ditto.
7948
7949         * mini.h (G_MININT32): Fix the definition of this.
7950
7951 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
7952
7953         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
7954
7955         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
7956
7957 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
7958
7959         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
7960         methods returning vtypes in registers.
7961         (mono_arch_allocate_vars): Ditto.
7962
7963         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
7964
7965         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
7966
7967         * generics.cs: Add a test from the linear IR branch.
7968
7969         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
7970
7971         * mini.c (inline_method): Cache failed inline attempts.
7972
7973 2008-03-04  Mark Probst  <mark.probst@gmail.com>
7974
7975         * mini.c: For shared methods of generic classes put the location
7976         of "this" into the MonoGenericJitInfo.
7977
7978         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
7979         register out of a MonoContext by register number.  Add the generic
7980         sharing context as an argument to mono_arch_find_this_argument().
7981
7982         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
7983         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
7984         for new arch function.
7985
7986         * mini-exception.c: Handle open exception clauses in shared
7987         generic code.
7988
7989         * mini-trampolines.c: Supply additional argument to
7990         mono_arch_find_this_argument().
7991
7992 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
7993
7994         * Makefile.am (regtests): Run the bench.exe tests last.
7995
7996 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
7997
7998         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
7999         a bit.
8000
8001 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
8002
8003         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
8004         with MS.
8005
8006         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
8007         
8008         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
8009
8010         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
8011         whose class has no cctor.
8012
8013         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
8014
8015 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
8016
8017         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
8018         unverified.
8019
8020 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
8021
8022         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
8023         to be in sync with the code on the linear IR branch.
8024
8025         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
8026
8027         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
8028
8029 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
8030
8031         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
8032
8033         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
8034
8035         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
8036
8037         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
8038
8039         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
8040         
8041         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
8042         body.
8043
8044 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
8045
8046         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
8047         OP_LOADR4_MEMBASE emission.
8048
8049         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
8050         (mono_spillvar_offset_float): Ditto.
8051
8052         * mini-mips.c (mono_arch_emit_prolog): Ditto.
8053
8054         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
8055         emission.
8056
8057         * basic-long.cs: Add regression tests for them.
8058
8059         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
8060         use.
8061         (mono_arch_allocate_vars): Fix representation of single-precision float
8062         argument.
8063         (mono_arch_output_basic_block): Ditto.
8064
8065         * inssel-mips.brg: Ditto, remove duplicate items.
8066
8067         * mini-mips.c (emit_load_volatile_arguments): New function to handle
8068         arguments of tail calls as on other platforms.
8069         (mono_arch_output_basic_block): Handle tail calls.
8070
8071         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
8072         register.
8073
8074         * objects.cs (test_5_pass_static_struct): Add test for it.
8075
8076         Contributed under MIT/X11 license.
8077
8078 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
8079
8080         * Makefile.am: Use gmcs for compiling the regression tests.
8081
8082         * *.2.cs *.2.il: Rename to *.cs and *.il.
8083
8084 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
8085
8086         * regalloc.h: Make the vassign array smaller.
8087
8088         * mini.c (mini_method_compile): Remove an unused field in cfg.
8089
8090         * mini-codegen.c: Add a bunch of micro optimizations.
8091
8092 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
8093
8094         * regalloc.h: Remove some unused fields.
8095
8096 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
8097
8098         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
8099
8100         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
8101
8102 2008-02-22  Mark Probst  <mark.probst@gmail.com>
8103
8104         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
8105
8106         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
8107         trampoline: Fetch an entry from the runtime generic context.  If
8108         it's NULL, jump to the actual trampoline to fill the runtime
8109         generic context.  Otherwise, return it.
8110
8111         * mini.c: Call the lazy fetch trampoline to get entries out of the
8112         runtime generic context.
8113
8114         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
8115         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
8116         tramp-sparc.c: Stubs for the lazy fetch trampoline.
8117
8118 2008-02-21  Mark Probst  <mark.probst@gmail.com>
8119
8120         * mini.c: Fetch data out of the extensible part of the runtime
8121         generic context instead of calling a helper function.
8122
8123         * generic-sharing.c: Some functions moved into
8124         metadata/generic-sharing.c.  Helper function for fetching other
8125         types now checks and asserts against extensible rgctx (just for
8126         debugging purposes - the helper function isn't called anymore
8127         unless for debugging).
8128
8129 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
8130
8131         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
8132         for tail calls up to the point that the tests in iltests.exe run. Also add a
8133         dummy CKFINITE implementation.
8134         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
8135         needed for trampoline LMF frames.
8136
8137         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
8138         trampoline LMF frames.
8139
8140 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
8141
8142         * mini.c (inline_method): clean any pending loader error when inlining fail.
8143         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
8144
8145 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
8146
8147         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
8148
8149         * aot-runtime.c (decode_patch_info): Ditto.
8150
8151         * mini.c (mono_resolve_patch_target): Ditto.
8152         
8153         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
8154         icall wrappers.
8155
8156         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
8157         
8158         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
8159         if it references an icall address.
8160
8161 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
8162
8163         * cpu-s390x.md: Remove some more unused opcodes.
8164         
8165         * cpu-s390x.md: Remove some unused opcodes.
8166
8167         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
8168         mono_op_imm_to_op ().
8169
8170         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
8171         instead of a switch statement.
8172         
8173         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
8174         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
8175
8176         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
8177         
8178         * mini-codegen.c: Remove unused mono_regstate2_... functions.
8179
8180         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
8181         -1.
8182
8183 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
8184
8185         * driver.c (mono_main): Improve error reporting when an assembly cannot be
8186         opened. Fixes #362607.
8187
8188         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
8189
8190         * iltests.il.in: Add a test for static methods in interfaces.
8191
8192 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
8193
8194         * genmdesc.c (build_table): Fix a crash on older glib versions.
8195
8196         * cpu-sparc.md: Remove some unused opcodes.
8197         
8198         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
8199         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
8200
8201         * cpu-amd64.md: Remove some unused opcodes.
8202
8203         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
8204         like the other opcodes.
8205
8206 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
8207
8208         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
8209
8210         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
8211
8212         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
8213         variables 'cfg' instead of 'm' for consistency.
8214
8215         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
8216
8217         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
8218         argument holding the vtype return address, to avoid the ambigious use of
8219         cfg->ret for this purpose.
8220
8221         * mini.c (NEW_RETLOADA): Use vret_addr if set.
8222
8223         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
8224         
8225         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
8226         new mono_print_ins () function which only takes one argument.
8227
8228 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
8229
8230         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
8231         macro arguments.
8232
8233 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
8234
8235         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
8236
8237         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
8238
8239         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
8240         opcodes and other small changes.
8241
8242         * mini-ops.h: Add some new opcodes from the linear IR branch.
8243
8244         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
8245
8246         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
8247         opcodes, use the REG_MEMBASE opcodes instead.
8248         
8249         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
8250         opcodes, use the REG_MEMBASE opcodes instead.
8251         
8252         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
8253         linear IR branch.
8254
8255         * mini.c (mono_op_imm_to_op): New helper function.
8256
8257         * mini-ops.h: Add some opcodes from linear IR branch.
8258
8259 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
8260
8261         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
8262         <tsv@solvo.ru>.
8263
8264 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
8265
8266         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
8267         OP_ICONV_TO_R4/R8.
8268
8269         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
8270
8271 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
8272
8273         * aot-compiler.c (emit_method_code): Add an assert.
8274
8275         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
8276         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
8277         methods.
8278
8279 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
8280
8281         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
8282         some load/store opcodes so they are consistent. 
8283         (mono_arch_emit_prolog): Simplify some code.
8284
8285         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
8286
8287         * objects.cs: Add tests for large argument offsets on ARM.
8288
8289         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
8290         stack offsets. Fixes #359651.
8291
8292         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
8293
8294         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
8295
8296         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
8297
8298         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
8299
8300         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
8301
8302         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
8303         rid of CEE_CONV_R_UN.
8304
8305         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
8306
8307 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
8308
8309         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
8310
8311         * mini.c (mono_normalize_opcodes): Add some more opcodes.
8312
8313         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
8314
8315         * cpu-amd64.md: Remove some unused opcodes.
8316
8317         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
8318
8319         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
8320
8321         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
8322         arch specific functions for its parts. Call the peephole pass after local
8323         regalloc so the prolog can compute a more accurate max_offset.
8324         
8325         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
8326         the corresponding OP_I/OP_L opcodes.
8327
8328         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
8329
8330         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
8331
8332 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
8333
8334         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
8335         as they are handled in mini.c.
8336
8337         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
8338         
8339         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
8340         case since it is handled in mini.c.
8341
8342         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
8343
8344         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
8345
8346         * *.c: Use the new opcodes in the IR and back end code.
8347
8348         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
8349
8350         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
8351
8352 2008-02-06  Mark Probst  <mark.probst@gmail.com>
8353
8354         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
8355         an assert because it has a race condition.
8356
8357 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
8358
8359         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
8360
8361         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
8362
8363         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
8364
8365         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
8366         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
8367
8368 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
8369
8370         * cpu-amd64.md (move): Correct the maximum size of move.
8371
8372 2008-02-05  Mark Probst  <mark.probst@gmail.com>
8373
8374         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
8375         the generic class init trampoline to return quickly if the class
8376         is already inited.
8377
8378 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
8379
8380         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
8381         issues where an 32 bit callsite cannot be patched by a 64 bit address.
8382
8383 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
8384
8385         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
8386         branch.
8387
8388 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
8389
8390         * objects.cs: Add some soft-float tests.
8391
8392         * mini.c: Fix a couple more soft-float issues.
8393
8394         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
8395
8396         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
8397         avoid a REX prefix.
8398
8399 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
8400
8401         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
8402         exception happens while compiling a virtual method.
8403
8404 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
8405
8406         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
8407         
8408         * mini-sparc.c: Fix build.
8409
8410         * mini-sparc.c (get_call_info): Add support for generic sharing.
8411
8412         * mini-exceptions.c: Add a FIXME.
8413
8414 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
8415
8416         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
8417         altstack handling code.
8418
8419         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
8420         
8421         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
8422
8423         * mini-s390.c: Add support for generic sharing.
8424
8425         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
8426         Fix CAS on s390.
8427         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
8428
8429         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
8430
8431         * mini-s390x.c: Add support for generic sharing.
8432         
8433         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
8434         Fix CAS on ia64.
8435         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
8436
8437         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
8438         can be used since it takes a 16 bit signed immediate.
8439
8440         * inssel-s390x.brg: Fix OP_SETRET.
8441
8442         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
8443
8444         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
8445
8446         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
8447
8448         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
8449
8450         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
8451         in one place.
8452
8453         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
8454         stuff.
8455
8456         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
8457         of the unused mono_arch_patch_delegate_trampoline stuff.
8458
8459 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
8460
8461         * basic-long.cs: Move the fp related tests to basic-float.cs.
8462
8463         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
8464
8465         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
8466
8467         * basic-calls.cs: Add a test for proper float argument passing.
8468
8469         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
8470         if the context corresponds to an exception received through a signal.
8471
8472         * exceptions.cs: Add a test for nullref handling at the start of a try
8473         clause.
8474
8475         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
8476
8477         * jit-icalls.c (mono_break): New JIT icall.
8478
8479         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
8480
8481         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
8482
8483 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
8484
8485         * cpu-*.md: Get rid of unused opcodes.
8486
8487         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
8488
8489         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
8490         by all platforms.
8491
8492         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
8493         define.
8494
8495         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
8496         the arch independent trampoline code in mini-trampolines.c.
8497
8498         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
8499
8500         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
8501
8502         * mini-s390.h: Remove an unused define.
8503         
8504         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
8505         the arch independent trampoline code in mini-trampolines.c.
8506
8507         * mini-arm.c (mono_arch_emit_prolog): Fix build.
8508
8509 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
8510
8511         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
8512
8513         * mini-s390.c (mono_arch_emit_prolog): Fix build.
8514
8515         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
8516
8517         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
8518
8519         * cpu-amd64.md: Use smaller sizes for int opcodes.
8520
8521         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
8522
8523         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
8524         objects.cs.
8525
8526         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
8527         debugging.
8528
8529         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
8530         instead of though a pointer to save an indirection when accessing elements of
8531         the array.
8532
8533         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
8534         some typos.
8535         (NOT_IMPLEMENTED): New helper macro.
8536         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
8537         of a bb.
8538
8539         * *.c: Use the new helper macro.
8540
8541 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
8542
8543         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
8544
8545 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
8546
8547         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
8548         stack slots.
8549
8550 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
8551
8552         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
8553         profiling is enabled.
8554         
8555         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
8556         the end.
8557         (mono_arch_emit_prolog): Add more first bblock optimizations.
8558
8559         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
8560         in order if possible.
8561         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
8562         bblock, since the arguments are still in their original registers.
8563
8564         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
8565
8566 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
8567
8568         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
8569         as well.
8570
8571         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
8572         offset 0.
8573
8574         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
8575
8576         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
8577         process async exceptions received while in unmanaged code.
8578
8579         * mini.c (mini_init): Install a callback with the runtime which will be called
8580         when a thread receives an async exception while in unmanaged code.
8581
8582         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
8583
8584         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
8585
8586 2008-01-16  Wade Berrier  <wberrier@novell.com>
8587
8588         * cpu-g4.md:
8589         * cpu-arm.md:
8590         * cpu-s390x.md:
8591         fix build
8592
8593 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
8594
8595         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
8596         compilation with sun cc.
8597
8598         * cpu-*.md: Fix the build.
8599
8600         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
8601
8602         * mini-amd64.h: Add some comments to the MonoLMF structure.
8603
8604         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
8605         
8606         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
8607         in the LMF structure if possible. This saves two instructions in the
8608         managed->native wrappers.
8609
8610         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
8611
8612 2008-01-16  Mark Probst  <mark.probst@gmail.com>
8613
8614         * generic-sharing.c: New type argument lookup code which uses the
8615         runtime generic context template.
8616
8617 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
8618
8619         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
8620
8621         * mini-arm.c (add_general): Fix arm eabi parameter passing.
8622         (mono_arch_output_basic_block): Fix localloc implementation.
8623
8624         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
8625
8626         * mini-ia64.c (peephole_pass): Fix ia64 build.
8627
8628         * mini-amd64.c (peephole_pass): Fix a warning.
8629         
8630         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
8631         at a constant offset from sp/fp.
8632
8633         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
8634         instead of obtaining it from *lmf in the managed method case.
8635
8636 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
8637
8638         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
8639
8640 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
8641
8642         * mini.h (MonoInstList): New type.
8643         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
8644         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
8645         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
8646         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
8647         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
8648         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
8649         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
8650         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
8651         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
8652         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
8653         MONO_INST_LIST_FOR_EACH_ENTRY,
8654         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
8655         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
8656         mono_inst_list_first, mono_inst_list_last,
8657         mono_inst_list_next, mono_inst_list_prev): New instruction
8658         list handling interfaces.
8659         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
8660         list head 'ins_list'.
8661         (MonoInst): Replace next pointer with list head 'node'.
8662         (MonoCallInst): Make 'out_args' a MonoInstList.
8663         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
8664         (MonoCompile): Delete reverse_inst_list and
8665         reverse_inst_list_len.
8666         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
8667         mono_arch_lowering_pass, mono_arch_local_regalloc,
8668         mono_arch_output_basic_block, mono_arch_emit_prolog):
8669         Convert to new instruction lists.
8670         (insert_after_ins): Delete.
8671         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
8672         instruction lists.
8673         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
8674         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
8675         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
8676         mono_emulate_opcode, mono_emit_load_got_addr,
8677         inline_method, mono_method_to_ir, mono_print_bb_code,
8678         print_dfn, decompose_pass, nullify_basic_block,
8679         replace_out_block_in_code, remove_block_if_useless,
8680         merge_basic_blocks, move_basic_block_to_end,
8681         try_unsigned_compare, optimize_branches, mono_print_code,
8682         mini_select_instructions, remove_critical_edges): Likewise.
8683         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
8684         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
8685         mono_arch_output_basic_block, mono_arch_emit_prolog):
8686         Likewise.
8687         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
8688         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
8689         mono_arch_output_basic_block): Likewise.
8690         (inst_list_prepend, insert_after_ins): Delete.
8691         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
8692         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
8693         instruction lists.
8694         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
8695         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
8696         mono_arch_emit_prolog): Likewise.
8697         * cfold.c (mono_constant_fold): Likewise.
8698         * liveness.c (visit_bb, mono_analyze_liveness,
8699         optimize_initlocals): Likewise.
8700         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
8701         * graph.c (mono_draw_code_cfg): Likewise.
8702         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
8703         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
8704         mono_ssa_cprop): Likewise.
8705         * abcremoval (get_relations_from_previous_bb, process_block):
8706         Likewise.
8707         * local-propagation (mono_cprop_invalidate_values,
8708         mono_local_cprop_bb): Likewise.
8709         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
8710         peephole_pass, mono_arch_output_basic_block,
8711         mono_arch_emit_prolog): Likewise.
8712         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
8713         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
8714         mono_arch_emit_prolog): Likewise.
8715         (insert_after_ins): Delete.
8716         * aliasing.c (print_code_with_aliasing_information,
8717         mono_build_aliasing_information, mono_aliasing_deadce):
8718         Convert to new instruction lists.
8719         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
8720         peephole_pass, NEW_INS, mono_arch_lowering_pass,
8721         mono_arch_local_regalloc, mono_arch_output_basic_block):
8722         Likewise.
8723         (insert_after_ins): Delete.
8724         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
8725         peephole_pass, mono_arch_output_basic_block): Convert to
8726         new instruction lists.
8727         * mini-codegen (InstList, inst_list_prepend,
8728         insert_after_ins): Delete.
8729         (insert_before_ins, get_register_force_spilling,
8730         get_register_spilling, free_up_ireg, free_up_reg,
8731         create_copy_ins, create_spilled_store, alloc_int_reg,
8732         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
8733         to new instruction lists.
8734         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
8735         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
8736         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
8737         (insert_after_ins): Delete.
8738         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
8739         mono_arch_local_regalloc, mono_arch_output_basic_block,
8740         mono_arch_call_opcode): Convert to new instruction lists.
8741         (insert_after_ins): Delete.
8742         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
8743         peephole_pass, mono_arch_output_basic_block,
8744         mono_arch_emit_prolog): Convert to new instruction lists.
8745
8746 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
8747
8748         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
8749
8750         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
8751         Fixes #353182.
8752
8753         * Makefile.am (version.h): Make this work with non-bash shells.
8754
8755 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
8756
8757         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
8758
8759 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
8760
8761         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
8762         the InitializeArray optimization.
8763
8764 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
8765
8766         * mini.c driver.c: Don't include os/gc_wrapper.h.
8767
8768 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
8769
8770         * mini.c (print_jit_stats): Print GC statistics if available.
8771
8772 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
8773
8774         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
8775
8776 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
8777
8778         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
8779
8780 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
8781
8782         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
8783         
8784         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
8785
8786         * driver.c (mono_main): Ditto.
8787
8788 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
8789
8790         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
8791
8792         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
8793         in the vtable can't be encoded.
8794         (compile_method): Ditto.
8795
8796 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
8797
8798         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
8799         defined.
8800
8801         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
8802         lmf->rbp.
8803
8804         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
8805         the top LMF entry belongs to the current method.
8806
8807         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
8808
8809 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
8810
8811         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
8812         
8813         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
8814
8815         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
8816
8817         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
8818
8819         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
8820
8821         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
8822         implementation.
8823
8824         * basic-float.cs: Add an ulong->double cast test.
8825
8826 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
8827
8828         * mini.c (mono_method_to_ir): Fix a warning.
8829
8830 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
8831
8832         * mini-ops.h: Add OP_SWITCH.
8833
8834         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
8835         CEE_SWITCH in back-end code, use OP_SWITCH instead.
8836
8837 2007-12-11  Geoff Norton  <gnorton@novell.com>
8838
8839         * mini-s390x.c: Minor change to the MAX() define to allow
8840         it to compile with other gcc versions.
8841
8842 2007-12-11  Geoff Norton  <gnorton@novell.com>
8843
8844         * cpu-s390x.md:
8845         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
8846
8847 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
8848
8849         exceptions-arm.c (mono_arch_get_restore_context): Restore
8850         the frame pointer.
8851
8852         exceptions-arm.c (throw_exception): Save the frame pointer.
8853         This is a partial fix for #323747. Only the client side is
8854         fixed.
8855
8856 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
8857
8858         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
8859         was using an unrelated variable to log the class which
8860         needed the cctor to be called. This was crashing on arm.
8861
8862 2007-12-09  Robert Jordan  <robertj@gmx.net>
8863
8864         * mini-x86.c (mono_arch_emit_epilog):
8865         Consider all kinds of 64-bit types. Fixes #323114.
8866
8867 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
8868
8869         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
8870
8871 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
8872
8873         * mini-amd64.c (peephole_pass): Add a missing instruction check.
8874
8875 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
8876
8877         * mini.c: run type ctor before allocating an object, not only
8878         when running it's constructor method (fixes at least part of bug #342507).
8879
8880 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
8881         
8882         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
8883         
8884         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
8885         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
8886         function.
8887
8888         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
8889         mono_generic_class_init_trampoline () the same as it is done with the other
8890         trampolines.
8891
8892         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
8893         aot-runtime.c aot-compiler.c: Implement AOT support.    
8894
8895 2007-12-07  Mark Probst  <mark.probst@gmail.com>
8896
8897         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
8898         build for archs which don't have the vtable trampoline defined
8899         yet.
8900
8901 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
8902
8903         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
8904
8905         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
8906
8907         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
8908
8909         * tramp-<ARCH>.c: Use the new helper function.
8910
8911 2007-12-07  Mark Probst  <mark.probst@gmail.com>
8912
8913         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
8914         trampoline call, which takes a vtable argument.
8915
8916         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
8917         OP_TRAMPCALL_VTABLEs like other calls.
8918
8919         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
8920         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
8921         call.  Implemented a support function which fetches the vtable
8922         from a register set.
8923
8924         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
8925         Implemented a generic class init trampoline, using the
8926         OP_TRAMPCALL_VTABLE opcode.
8927
8928         * mini.c: Implemented static field access when sharing generic
8929         code.  This implies initing the class using the new
8930         OP_TRAMPCALL_VTABLE call.
8931
8932 2007-12-07  Mark Probst  <mark.probst@gmail.com>
8933
8934         * mini.c: Don't compile methods with sharing enabled if their
8935         classes are disabled for sharing.
8936
8937 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
8938
8939         * inssel.brg: Add a missing sign extension to the GETCHR and array access
8940         opcodes. Fixes #346563.
8941
8942         * objects.cs: Add a new test.
8943
8944         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
8945
8946         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
8947         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
8948
8949 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
8950
8951         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
8952
8953 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
8954
8955         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
8956         code stream.
8957
8958 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
8959
8960         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
8961
8962         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
8963         optimization in the AOT case.
8964         
8965 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
8966
8967         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
8968         
8969         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
8970
8971         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
8972
8973         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
8974
8975         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
8976         is created by the inlined delegate ctor.
8977
8978         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
8979
8980         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
8981
8982 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
8983
8984         * cpu-x86.md: Fix the length of ckfinite.
8985
8986 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
8987
8988         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
8989         
8990         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
8991         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
8992
8993         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
8994
8995         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
8996         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
8997
8998 2007-11-28  Martin Baulig  <martin@ximian.com>
8999
9000         * mini-x86.c
9001         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
9002         after creating the trampoline.
9003
9004 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
9005
9006         * aot-runtime.c (load_aot_module): Check runtime version if needed.
9007
9008         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
9009         the same version.
9010
9011         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
9012         instead of the calling method to help AOT.
9013
9014         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
9015
9016 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
9017
9018         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
9019         is defined.
9020
9021 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
9022
9023         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
9024         
9025         * aot-compiler.c (compile_method): Correct check for generic method definitions.
9026         (encode_method_ref): No need to handle generic method definitions specially.
9027
9028         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
9029
9030         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
9031         decode_klass_info.
9032
9033         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
9034         encode_klass_info.
9035         (compile_method): Enable generic sharing.
9036
9037 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
9038
9039         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
9040         (mini_method_compile): Add preliminary support for AOTing shared generic code.
9041
9042         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
9043         generic code.
9044
9045         * mini-trampolines.c: Fix a warning.
9046
9047         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
9048         NEW_PCONST.
9049         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
9050         (generic_class_is_reference_type): Remove unused function.
9051
9052         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
9053         in the generic vtable trampoline case.
9054
9055         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
9056         
9057         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
9058         return an AOT method based on a vtable slot.
9059
9060         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
9061
9062         * mini.c (mini_get_vtable_trampoline): Export this.
9063
9064 2007-11-22  Martin Baulig  <martin@ximian.com>
9065
9066         * debug-debugger.h
9067         (MonoDebuggerInfo): Move `debugger_version' up.
9068
9069 2007-11-22  Martin Baulig  <martin@ximian.com>
9070
9071         * mini-amd64.c
9072         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
9073
9074         * mini-trampolines.c
9075         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
9076         after compiling the method.
9077
9078 2007-11-20  Martin Baulig  <martin@ximian.com>
9079
9080         * debug-mini.c
9081         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
9082         (mono_debugger_remove_breakpoint): Likewise.
9083         (mono_debugger_check_breakpoints): Likewise.
9084
9085         * debug-debugger.c: Implement the new breakpoint interface here.
9086
9087 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
9088
9089         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
9090         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
9091
9092         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
9093
9094 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
9095
9096         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
9097
9098         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
9099         mini.c.
9100
9101         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
9102         mini.c.
9103
9104         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
9105         returning a vtype in a register.
9106
9107         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
9108         here from the arch specific code.
9109
9110         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
9111         mini.c.
9112
9113         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
9114         (mono_arch_emit_prolog): Increment maximum prolog size.
9115
9116         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
9117         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
9118
9119         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
9120         MonoGenericSharingContext.
9121
9122         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
9123         MonoGenericSharingContext. Allocate memory from the cfg mempool.
9124
9125 2007-11-15  Mark Probst  <mark.probst@gmail.com>
9126
9127         * mini.c, mini.h, generic-sharing.c: Functions for producing code
9128         which extract fields out of the runtime generic context.  Full
9129         sharing of the NEWARR opcode.
9130
9131 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
9132
9133         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
9134         --enable-minimal=ssa.
9135
9136 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
9137
9138         * mini-trampolines.c (mono_delegate_trampoline): Update after 
9139         mono_marshal_get_delegate_invoke () signature change.
9140
9141 2007-11-13  Mark Probst  <mark.probst@gmail.com>
9142
9143         * mini.c: Removed the shared context in favor of the generic
9144         sharing context.  Allocate the MonoJitInfo structure with room for
9145         the generic sharing context if it's needed.
9146
9147         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
9148         domain-internals.h now.
9149
9150         * mini-x86.c: Pass the generic sharing context to get_call_info ().
9151
9152         * generic-sharing.c: Several changes for working without a shared
9153         context and instead operating on open types instead.
9154
9155 2007-11-12  David S. Miller  <davem@davemloft.net>
9156
9157        * inssel-sparc.brg: Fix double instruction emit.
9158
9159 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
9160
9161         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
9162         Get/Set/Address methods.
9163         
9164         * mini.c debug-debugger.c mini-trampolines.c: Update after 
9165         mono_marshal_get_delegate_invoke signature change.
9166
9167 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
9168
9169         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
9170         This can happens with dynamic methods. Fixes the other bug in #322722.
9171
9172 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
9173
9174         * tramp-arm.c (mono_arch_patch_callsite): Support patching
9175         BX call sequence.
9176
9177         * mini-arm.c (arm_patch): Implement patching of BX call
9178         sequence. Fixes one of the bugs in #322722.
9179
9180 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
9181
9182        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
9183        under Linux.  We only need to flush every 32-byte cache line.    
9184
9185 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
9186
9187         * mini.c:
9188         move_basic_block_to_end: Add branches when needed, eventually creating
9189         a new BB.
9190         optimize_branches: added a parameter that tells if it's ok to create
9191         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
9192         and avoid calling move_basic_block_to_end when it's not ok.
9193         Fixes bug 318677.
9194
9195 2007-11-07  Mark Probst  <mark.probst@gmail.com>
9196
9197         * mini.c: Abort inlining call to InitializeArray if something
9198         looks wrong.  Let the icall handle it, which now has proper safety
9199         checks.
9200
9201 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
9202
9203         * mini.c (mono_spill_call): add support for soft-float.
9204
9205         * mini.c (mono_method_to_ir): add support for soft-float
9206         to inlined functions that return float.
9207
9208         * mini.c (mono_method_to_ir): add support for soft-float
9209         to cee_stsfld opcode on float fields.
9210
9211 2007-11-05  Geoff Norton  <gnorton@novell.com>
9212
9213         * mini-x86.h: Fix the structure access for X86 Leopard.
9214
9215
9216 2007-11-05  Martin Baulig  <martin@ximian.com>
9217
9218         * mini-trampolines.c
9219         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
9220         after compiling the method to notify the debugger.
9221
9222 2007-11-05  Martin Baulig  <martin@ximian.com>
9223
9224         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
9225
9226 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
9227
9228         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
9229         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
9230
9231 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
9232
9233         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
9234         native-to-managed wrappers.
9235         
9236 2007-11-01  Geoff Norton  <gnorton@novell.com>
9237
9238         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
9239         members.
9240
9241 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
9242
9243         * mini.c, mini-x86.c: when getting back from unmanaged code
9244         to managed via a marshaled delegate we also need to set the
9245         right domain.
9246
9247 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9248
9249         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
9250         for amd64.
9251
9252 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
9253
9254         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
9255         let the debugger or other external agents to tell the JIT when
9256         a sw breakpoint has been inserted in the code that the JIT needs
9257         to be able to inspect.
9258
9259 2007-10-31  Martin Baulig  <martin@ximian.com>
9260
9261         * debug-debugger.h
9262         (MonoDebuggerInfo): Remove `runtime_class_init'.
9263
9264 2007-10-30  Martin Baulig  <martin@ximian.com>
9265
9266         * debug-mini.h
9267         (mono_debugger_thread_created): Added `MonoThread *' argument.
9268         (mono_debugger_extended_notification): New public method.
9269         (mono_debugger_trampoline_compiled): New public method.
9270
9271         * debug-mini.c
9272         (MonoDebuggerThreadInfo): Added `thread' and
9273         `extended_notifications' fields.
9274
9275         * debug-debugger.c
9276         (debugger_executable_code_buffer): New static variable.
9277
9278         * debug-debugger.h
9279         (MonoDebuggerInfo): Added `executable_code_buffer',
9280         `executable_code_buffer_size', `breakpoint_info_area',
9281         `breakpoint_table' and `breakpoint_table_size'.
9282
9283 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
9284
9285         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
9286         that IP  either is an unused value or the vtable pointer. IMT 
9287         calls use vtable + offset now. Reduced by almost half the size
9288         of IMT entries.
9289
9290 2007-10-26  Jonathan Chambers <joncham@gmail.com>
9291
9292         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
9293         defines to access param registers. Replace long usage with
9294         gsize as sizeof(long) != sizeof(void*) on Win64.
9295
9296         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
9297         on Win64. Fix intrinsic, use _AddressOfReturnAddress
9298         instead of non-existant _GetAddressOfReturnAddress.
9299
9300         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
9301         param registers. Save/restore %rdi and %rsi in MonoLMF.
9302
9303         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
9304         param registers. Modify (throw_exception) signature to take 
9305         %rdi and %rsi on Win64. 
9306
9307         Code is contributed under MIT/X11 license.
9308
9309 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
9310
9311         * helpers.c: unlink debugging output files.
9312
9313 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
9314
9315         * mini.c: Move mono_create_ftnptr () to object.c.
9316
9317 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
9318
9319         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
9320         optional. This function can now be used to disassemble code generated
9321         outside the JIT such as trampolines and IMT thunks.
9322
9323         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
9324
9325         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
9326         vtable pointer from a ldr instruction.
9327
9328         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
9329         new IMT call sequence.
9330
9331         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
9332         call sequence for interface invocations.
9333
9334         * mini-arm.c (mono_arch_emit_imt_argument): added, required
9335         for imt support. This function is empty since IMT on ARM requires no
9336         special handling on the IR side.
9337
9338         * mini-arm.c (mono_arch_find_imt_method): added, required for
9339         imt support.
9340
9341         * mini-arm.c (mono_arch_find_this_argument): added, required
9342         for imt support.
9343
9344         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
9345         a ldr instruction to load a value stored in the code stream.
9346
9347         * mini-arm.c (mono_arch_build_imt_thunk):added, required
9348         for imt support.
9349
9350
9351 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
9352
9353         * mini.c (mini_init): Install the jump trampoline callback.
9354
9355 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
9356
9357         * mini-trampolines.c: handle synchronized methods with the common
9358         vtable trampoline (bug #335601).
9359
9360 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
9361
9362         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
9363
9364         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
9365         64 bit platforms.
9366
9367         * mini-ia64.h mini-ia64.c: Add support for IMT.
9368
9369         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
9370         prolog. Fixes #331958.
9371
9372 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
9373
9374         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
9375
9376 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
9377
9378         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
9379         trampoline.
9380
9381 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
9382
9383         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
9384         trampoline.
9385
9386 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
9387
9388         * mini-x86.c, mini-x86.h: x86 support for the common vtable
9389         trampoline.
9390
9391 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
9392
9393         * mini-trampolines.c: changed the magic rampoline to understand
9394         the common vtable trampoline method: the method to invoke is
9395         determined by the vtable displacement of the call.
9396
9397 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
9398
9399         * mini.c, mini.h: register the common vtable trampoline if the
9400         architecture supports it.
9401
9402 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
9403
9404         * cpu-amd64.md: use the correct max length for tls_get.
9405
9406 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
9407
9408         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
9409         CEE_STELEM_ANY. Fixes #333696.
9410
9411 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
9412
9413         * exceptions-x86.c: provide more graceful handling of the case where
9414         we followed a bogus function pointer from managed code (bug #332866).
9415
9416 2007-10-11  Mark Probst  <mark.probst@gmail.com>
9417
9418         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
9419         replaces the generic_shared flag and will carry more information
9420         in the future.
9421
9422         * generic-sharing.c: Added mini_type_stack_size() which allows
9423         allows open types if given a generic sharing context.
9424         mini_get_basic_type_from_generic() takes a
9425         MonoGenericSharingContext* instead of a MonoCompile* now.
9426
9427         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
9428         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
9429         mini-sparc.c, mini-x86.c: Trivial changes required by the two
9430         changes above.  Just passing arguments through to the right
9431         places.
9432
9433 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
9434
9435         * mini-arm.c: unify the call emission to emit_code_seq().
9436
9437 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
9438
9439         * tramp-arm.c: reduced the trampoline size.
9440
9441 2007-10-10  Mark Probst  <mark.probst@gmail.com>
9442
9443         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
9444         variable handling out of arch-specific code.
9445
9446 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
9447
9448         * mini-arm.c: implemented fast delegate dispatch.
9449
9450 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
9451
9452         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
9453         that fp elimination is turned off if the space required by locals is too
9454         big. Fixes #331958.
9455
9456 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
9457
9458         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
9459         ARM to the new style trampoline.
9460
9461 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
9462
9463         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
9464
9465         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
9466
9467 2007-10-09  Martin Baulig  <martin@ximian.com>
9468
9469         * debug-debugger.h
9470         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
9471         `field_info_offset_offset'.     
9472
9473 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
9474
9475         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
9476         removed more internal usage of the r11 register and made it available
9477         to the register allocator.
9478
9479 2007-10-08  Mark Probst  <mark.probst@gmail.com>
9480
9481         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
9482         when sharing generics and treat type variables as references.
9483
9484 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
9485
9486         * mini-ppc.c: started removing the internal uses of register r11
9487         to eventually allow the register allocator to manage it as an
9488         additional available register.
9489
9490 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
9491
9492         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
9493
9494 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
9495
9496         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
9497         specific trampolines as they are not performance critical as a jump
9498         target (maybe align as before only for AOT code?). This saves about
9499         200 KB of native code on x86 for monodevelop startup.
9500
9501 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
9502
9503         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
9504         monodevelop startup.
9505
9506 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
9507
9508         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
9509
9510         * mini-sparc.h mini-sparc.c: Implement IMT support.
9511
9512         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
9513         its smaller and doesn't clobber sparc_g1.
9514
9515         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
9516
9517 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
9518
9519         * mini-ppc.c: optimized the size of the IMT thunks a bit.
9520
9521 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
9522
9523         * mini-ppc.c: implemented fast delegate invocation.
9524
9525 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
9526
9527         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
9528
9529 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
9530
9531         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
9532         code to the new style trampoline in preparation for IMT support.
9533
9534 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
9535
9536         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
9537         systems already. This also reduces the specific trampiline sizes and
9538         prepares for the use of r12 as the IMT identifier register.
9539
9540 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
9541
9542         * mini-mips.h: endianess fix (simplified from a patch by
9543         Thomas Kunze <thommy@tabao.de>, bug #323737).
9544
9545 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
9546
9547         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
9548         to access ucontext fields and enable netbsd support
9549         (partially from Magnus Henoch <mange@freemail.hu>).
9550
9551 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
9552
9553         * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
9554         use the preprocessor from the CPP env var if it is set.
9555
9556 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
9557
9558         * mini-trampolines.c: fixed an assertion and moved it earlier in the
9559         code, before interface_offset gets used.
9560
9561 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
9562
9563         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
9564         mono_class_setup_vtable () before accessing klass->vtable.
9565
9566 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
9567
9568         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
9569         hackish.
9570
9571 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
9572
9573         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
9574         IMT slots (this saves hundreds of KB of memory in programs like
9575         IronPython and Monodevelop).
9576
9577 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
9578
9579         * mini.c: print the delegate counter.
9580
9581 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
9582
9583         * mini-x86.c: make it easier to enable the debugging code for IMT
9584         slots.
9585
9586 2007-09-28  Martin Baulig  <martin@ximian.com>
9587
9588         * debug-debugger.h
9589         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
9590         `mono_method_klass_offset' and `mono_method_token_offset'.
9591
9592 2007-09-20  Mark Probst  <mark.probst@gmail.com>
9593
9594         * mini.c: First generics sharing implementation.  Can only share
9595         in very simple cases.  If sharing doesn't work it falls back to
9596         dedicated compilation.
9597
9598         * mini.h: Flag in MonoCompile to specify whether generic
9599         compilation is shared.  Flags enum for marking which generic inst
9600         of a context is used.  Prototypes for helper functions.
9601
9602         * generic-sharing.c: Helper functions for generic method sharing.
9603
9604         * optflags-def.h: Optimization flag (gshared) for enabling generic
9605         method sharing added.
9606
9607         * Makefile.am: generic-sharing.c added.
9608
9609 2007-09-19 Daniel Nauck <dna@mono-project.de>
9610
9611         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
9612
9613 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
9614         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
9615         fixes bug 325507.
9616
9617 2007-09-19  Martin Baulig  <martin@ximian.com>
9618
9619         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
9620         mono_debug_cleanup() is now part of mono_cleanup().
9621
9622 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
9623
9624         * driver.c (mono_main): Fix a warning.
9625
9626 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
9627
9628         * aot-compiler.c: Optimize various parts when processing large assemblies.
9629         Fixes ##325568.
9630
9631         * mini.c (mono_patch_info_hash): Improve hash function.
9632
9633 2007-09-14  Jonathan Chambers <joncham@gmail.com>
9634
9635         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
9636         
9637         Code is contributed under MIT/X11 license.
9638
9639 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
9640
9641         * mini.c (mini_init): Fix a leak.
9642
9643         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
9644
9645 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
9646
9647         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
9648
9649 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
9650
9651         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
9652
9653 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
9654
9655         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
9656         variance tests.
9657
9658         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
9659
9660         * mini.c (handle_alloc): Enable managed allocators in AOT code.
9661
9662         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
9663
9664         * aot-runtime.c (decode_patch_info): Ditto.
9665
9666 2007-09-12  Jonathan Chambers <joncham@gmail.com>
9667
9668         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
9669         static case. Cache delegates in architecture specific code, 
9670         based on number of parameters.
9671         
9672         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
9673         in architecture specific code, based on number of parameters.
9674         
9675         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
9676         caching happen in architecture specific code now.
9677         
9678         Code is contributed under MIT/X11 license.
9679
9680 2007-09-12  Jonathan Chambers <joncham@gmail.com>
9681
9682         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
9683         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
9684         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
9685
9686         Code is contributed under MIT/X11 license.
9687
9688 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
9689         * mini.c: (mono_thread_abort) Fixed bug #82416.
9690
9691 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
9692
9693         * mini.: hook the new managed GC allocation feature into the JIT.
9694
9695 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
9696
9697         * mini.c: implementation for the new runtime tls opcode.
9698
9699 2007-09-11  Martin Baulig  <martin@ximian.com>
9700
9701         * debug-debugger.h
9702         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
9703         `mono_method_inflated_offset'.
9704
9705 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
9706
9707         * driver.c mini.h mini.c: Add a new devel command line option for injecting
9708         async exceptions into a method.
9709
9710         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
9711         purpose of testing whenever the unwinder works at every instruction.
9712
9713 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
9714
9715         * mini.c: check accessibility of method used in ldftn (fixes
9716         bug #82635).
9717
9718 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
9719
9720         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
9721
9722         * inssel.brg: Fix a warning.
9723
9724 2007-09-03  Martin Baulig  <martin@ximian.com>
9725
9726         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
9727         now takes the `main_method' as argument.
9728
9729 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
9730
9731         * cpu-sparc.md (endfilter): Add missing src1:i argument.
9732
9733 2007-08-30  Jonathan Chambers <joncham@gmail.com>
9734
9735         * driver.c: include the cil-coff.h header on Windows.
9736         
9737         Code is contributed under MIT/X11 license.
9738
9739 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
9740
9741         * mini.c, driver.c: don't include the cil-coff.h header.
9742
9743 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
9744
9745         * mini.c: flag places that needs fixes fo soft-float support.
9746
9747 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
9748
9749         * mini.h, inssel-float.brg: fix soft-float constant loads on big
9750         endian systems (partially from Dean Jenkins, bug #81924).
9751
9752 2007-08-28  Mark Probst  <mark.probst@gmail.com>
9753
9754         * mini.c (check_linkdemand): Remove embedded reference object in
9755         call to LinkDemandSecurityException.
9756         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
9757         with an IntPtr instead of a reference object.
9758
9759 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
9760
9761         * mini.c (handle_initobj): Handle alignment properly.
9762
9763         * inssel.brg (mini_emit_memset): Ditto. 
9764
9765         * inssel.brg (mini_emit_memcpy): Ditto. 
9766
9767         * inssel-sparc.brg: Ditto.              
9768
9769         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
9770
9771 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
9772
9773         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
9774         exceptions raised in unmanaged code. Fixes part of #82594.
9775
9776 2007-08-24  Mark Probst  <mark.probst@gmail.com>
9777
9778         * mini.c (mono_method_to_ir), declsec.c
9779         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
9780
9781 2007-08-22  Martin Baulig  <martin@ximian.com>
9782
9783         * debug-mini.h
9784         (MonoDebuggerThreadInfo): New typedef.
9785         (mono_debugger_thread_table): New global variable.
9786         (mono_debugger_thread_created): New public function.
9787         (mono_debugger_thread_cleanup): New public function.
9788
9789         * debug-debugger.h
9790         (MonoDebuggerInfo):
9791         - removed `get_current_thread' and `lookup_assembly'.
9792         - removed `data_table'.
9793         - added `thread_table'.
9794
9795         * mini.c
9796         (mono_thread_start_cb): Call mono_debugger_thread_created().
9797         (mono_thread_attach_cb): Likewise.
9798         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
9799         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
9800         initial domain.
9801
9802         * driver.c (mono_main): Move mono_debug_init() up, before calling
9803         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
9804
9805 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
9806
9807         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
9808         together when passing several arguments of type double (gives a small
9809         speedup and saves a few bytes of generated code).
9810
9811 2007-08-20  Jb Evain  <jbevain@novell.com>
9812
9813         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
9814
9815 2007-08-20  Jb Evain  <jbevain@novell.com>
9816
9817         * mini.c (mono_method_to_ir): throw MethodAccessException
9818         and FieldAccessException instead of InvalidProgramException.
9819
9820 2007-08-20  Mark Probst  <mark.probst@gmail.com>
9821
9822         * mini.c: CoreCLR security checks.
9823
9824         * mini.h: Removed MonoSecurityMode (moved to
9825         metadata/security-manager.h) and mono_security_mode global var
9826         (replaced by set/get functions in security-manager.h).
9827
9828         * driver.c: Added "core-clr-test" security mode for testing.  Used
9829         set-function for setting security mode.
9830
9831 2007-08-17  Mark Probst  <mark.probst@gmail.com>
9832
9833         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
9834         the new jit_info_table.
9835
9836         * driver.c: Test code for the new jit_info_table (enabled by the
9837         define MONO_JIT_INFO_TABLE_TEST).
9838
9839 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
9840
9841         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9842         detection of call <REG> instruction sequence. Fixes build on freebsd.
9843
9844 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
9845
9846         * mini-exceptions.c: Fix a warning.
9847
9848 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
9849
9850         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
9851         stack overflow handling code on amd64 too.
9852
9853         * mini-exceptions.c (mono_setup_altstack): Make this use 
9854         mono_thread_get_stack_bounds ().
9855
9856         * mini-x86.h: Disable sigaltstack on solaris x86.
9857
9858 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
9859
9860         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
9861
9862 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
9863
9864         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
9865
9866 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
9867
9868         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
9869
9870         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
9871
9872 2007-08-03  Neale Ferguson <neale@sinenomine.net>
9873
9874         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
9875         due to alignment.
9876
9877 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
9878
9879         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
9880         to be emitted (bug #82281).
9881
9882 2007-08-01  Martin Baulig  <martin@ximian.com>
9883
9884         Merged the `debugger-dublin' branch.
9885
9886         * debug-debugger.h (MonoDebuggerInfo):
9887         Removed the `old_*' compatibility entries.
9888         Added `debugger_version' and `data_table'.
9889         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
9890         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
9891
9892         * debug-mini.c
9893         (MiniDebugMethodBreakpointInfo): Add `address_list'.
9894         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
9895         instead of a `gconstpointer'.
9896         (mono_debugger_insert_method_breakpoint): Return a
9897         `MonoDebugMethodAddressList *'.
9898
9899 2007-06-28  Martin Baulig  <martin@ximian.com>
9900
9901         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
9902
9903 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
9904
9905         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
9906         __builtin_frame_address () since it is broken on older gcc versions.
9907
9908 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
9909
9910         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
9911         on the stack overflow handling and made the managed stack overflows
9912         catchable in most cases using soft guard pages.
9913         * exceptions-x86.c: added code to restore the protection in the soft
9914         guard pages at the end of exception handling.
9915
9916 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
9917
9918         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
9919
9920 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
9921
9922         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
9923         exception handling.
9924
9925 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
9926
9927         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
9928         signal handling support until it has been ported to the new mechanism.
9929         * mini.c: fixed stack overflow detection and use the new
9930         architecture code  to handle signals on the altstack.
9931
9932 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
9933
9934         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
9935         stack overflows on the alt stack.
9936
9937 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
9938
9939         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
9940         stack overflows on the alt stack.
9941
9942 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
9943
9944         * exceptions-ppc.c: cleanup preparing for altstack support.
9945
9946 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
9947
9948         * exceptions-arm.c: cleanup preparing for altstack support.
9949
9950 2007-07-27  Mark Probst  <mark.probst@gmail.com>
9951
9952         * mini.c (print_jit_stats): Output hazard pointer stats.
9953
9954 2007-07-26  Mark Probst  <mark.probst@gmail.com>
9955
9956         * driver.c, mini.c: Replaced security mode flags with a single
9957         enum variable.
9958
9959 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
9960
9961         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
9962
9963 2007-07-25  Mark Probst  <mark.probst@gmail.com>
9964
9965         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
9966         (which doesn't do anything yet) for activating Core CLR
9967         (Silverlight) security.
9968
9969 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
9970
9971         * mini-codegen.c: work around a possible gcc bug on arm.
9972
9973 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
9974
9975         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
9976         message for platforms that don't support AOT compilation.
9977
9978 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
9979
9980         * mini.h, mini.c, driver.c: temporary smcs hack.
9981
9982 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
9983
9984         * mini-arm.h, mini-arm.c: arm EABI fixes.
9985
9986 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
9987
9988         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
9989         case.
9990
9991         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
9992         trampolines taking a method argument.
9993
9994         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
9995
9996         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
9997         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
9998
9999         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
10000         JIT compilation throws an exception. Fixes #82050.
10001
10002 2007-07-19  Mark Probst  <mark.probst@gmail.com>
10003
10004         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
10005         with the MONO_EXCEPTION_ defines.
10006
10007 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
10008
10009         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
10010         #82117.
10011         
10012         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
10013         the cause of an assertion.
10014
10015 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
10016
10017         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
10018         removed.
10019
10020 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
10021
10022         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
10023         assert. Should fix #82103.
10024
10025 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
10026
10027         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
10028         here too. Fixes #82095.
10029
10030         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
10031         addresses.
10032
10033         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
10034
10035         * mini-amd64.h: Enable IMT for amd64.
10036         
10037         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
10038
10039 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
10040
10041         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
10042
10043 2007-07-12  Mark Probst  <mark.probst@gmail.com>
10044
10045         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
10046         as soon as check_linkdemand sets an exception_type.
10047
10048 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
10049
10050         * mini-x86.c: fixed offsets for IMT call sequence.
10051         * mini-x86.h: enable IMT again.
10052
10053 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
10054
10055         * trace.c (mono_trace_enter_method): Decode MonoType too.
10056
10057         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
10058
10059         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
10060
10061         * mini-amd64.c: Add preliminary IMT implementation.
10062         
10063 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
10064
10065         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
10066         understand the new IMT-base interface invocation (thanks to
10067         Daniel Nauck for the report and the remote debugging session).
10068
10069 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
10070
10071         * mini-x86.c: size and speed optimizations for the IMT bsearch.
10072
10073 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
10074
10075         * Makefile.am (aotcheck): Make this actually use the AOTed code.
10076
10077 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
10078
10079         * mini-trampolines.c: implement AOT IMT support.
10080         * mini-x86.h: enable IMT support for wider testing.
10081
10082 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
10083
10084         * inssel.brg (emit_imt_argument): Add aot support here.
10085
10086         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
10087
10088 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
10089
10090         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
10091         of the IMT implementation, partially from massi, with my
10092         implementation of the bsearch sequence. Disabled by default until
10093         the AOT code is implemented.
10094
10095 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
10096
10097         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
10098
10099         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
10100
10101 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
10102
10103         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
10104         arch-independent IMT JIT code from Massimiliano
10105         Mantione (massi@ximian.com) with small cleanups from me.
10106
10107 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
10108
10109         * Makefile.am: fix svn invocation to get the svn revision to be
10110         independent of the local language (build fix).
10111
10112 2007-07-09  Mark Probst  <mark.probst@gmail.com>
10113
10114         * mini.c (inline_method): Reset cfg->exception_type if the
10115         inlining is aborted.  Fixes: 82049.
10116
10117 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
10118
10119         * mini.c: remove assert from exception handling code when exception_ptr
10120         is not set.
10121
10122 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
10123
10124         * mini.c (mono_codegen): Add an assert.
10125
10126         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
10127         enter and leave code.
10128         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
10129
10130 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10131
10132         * mini-ppc.c: fixed memory corruption for localloc(0)
10133         (bug #81852).
10134
10135 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
10136         
10137         * mini.c: Fix warnings.
10138
10139 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
10140
10141         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
10142         to emit better double->int conversions.
10143
10144 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
10145
10146         * mini.c: the provided Min/Max optimizations are valid for unisgned
10147         ints.
10148
10149 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
10150
10151         * 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
10152
10153 2007-06-28  Miguel de Icaza  <miguel@novell.com>
10154
10155         * mini.c (mono_running_on_valgrind): Add support for reporting the
10156         method and  its boundaries to valgrind.
10157
10158 2007-06-28  Martin Baulig  <martin@ximian.com>
10159
10160         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
10161
10162 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
10163
10164         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
10165
10166         * generic.2.cs: Add new test case.
10167
10168 2007-06-25  Martin Baulig  <martin@ximian.com>
10169
10170         Merged the `debugger-dublin' branch.
10171
10172         * debug-mini.c
10173         (mono_debugger_insert_method_breakpoint): New public method.
10174         (mono_debugger_remove_method_breakpoint): Likewise.
10175         (mono_debugger_check_breakpoints): New static method.
10176         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
10177
10178         * debug-debugger.h (MonoDebuggerInfo):
10179         Renamed (to keep backward compatibility in the vtable):
10180         `insert_breakpoint' -> `old_insert_breakpoint'.
10181         `remove_breakpoint' -> `old_remove_breakpoint'.
10182         `create_string' -> `old_create_string'.
10183         `lookup_class' -> `old_lookup_class'.
10184         `lookup_type' -> removed; changed into a dummy field.
10185         `lookup_assembly' -> `old_lookup_assembly'.
10186         Added (same functionality, but different signature):
10187         `create_string', `lookup_class', `lookup_assembly'
10188         Added new:
10189         `get_method_addr_or_bpt', `remove_method_breakpoint',
10190         `runtime_class_init'.
10191
10192         * debug-debugger.c: Merged the `debugger-dublin' branch.
10193
10194 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
10195
10196         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
10197         well.
10198         (peephole_pass): Likewise.
10199
10200 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
10201
10202         * driver.c: hopefully make setaffinity work also for ancient
10203         versions of linux.
10204
10205 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
10206
10207         * driver.c : win32 build fix.
10208
10209 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
10210
10211         * driver.c: check for the MONO_NO_SMP env var and bind to a single
10212         processor if it is set.
10213
10214 2007-06-21  Martin Baulig  <martin@ximian.com>
10215
10216         * debug-mini.h: New file.
10217
10218         * debug-mini.c
10219         (mono_debugger_insert_breakpoint_full): Moved here from
10220         ../metadata/mono-debug-debugger.c.
10221         (mono_debugger_remove_breakpoint): Likewise.
10222         (mono_debugger_breakpoint_callback): Likewise.
10223
10224 2007-06-15  Raja R Harinath  <rharinath@novell.com>
10225
10226         * jit-icalls.c (mono_helper_compile_generic_method): Update to
10227         changes in MonoGenericClass.
10228
10229 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
10230
10231         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
10232
10233 2007-06-14  Raja R Harinath  <rharinath@novell.com>
10234
10235         * jit-icalls.c (mono_helper_compile_generic_method): Update to
10236         removal of MonoGenericMethod.
10237
10238 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
10239
10240         * mini-exceptions.c: hooks for the exception events profiling API.
10241
10242 2007-06-14  Randolph Chung  <tausq@debian.org>
10243
10244         * Makefile.ma: Add hppa target.
10245         * mini-arch.h: Include mini-hppa.h
10246         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
10247         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
10248         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
10249
10250 2007-06-14  Randolph Chung  <tausq@debian.org>
10251
10252         * inssel.brg: Add rules for "chained" compare-branch operations so that
10253         a single compare op can affect multiple branches.  Adjust cost for
10254         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
10255         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
10256         cost for some rules so that they can more easily be overridden by
10257         per-arch rules (with fixes from lupus).
10258         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
10259
10260 2007-06-13  Randolph Chung  <tausq@debian.org>
10261
10262         * mini-ops.h: Reorder branch ops so that they match the order of the
10263         corresponding CEE_* ops.  The code expects them this way.
10264         Add new ops for HPPA target.
10265         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
10266
10267 2007-06-13  Randolph Chung  <tausq@debian.org>
10268
10269         * mini-exceptions.c: Handle cases where the stack grows towards
10270         larger addresses.
10271         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
10272
10273 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
10274
10275         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
10276         counter.
10277         * driver.c: explain where a non-matching corlib is found.
10278
10279 2007-06-13  Mark Probst  <mark.probst@gmail.com>
10280
10281         * mini.c (print_jit_stats): Output dynamic code allocation stats.
10282
10283 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
10284
10285         * mini-exceptions.c: Generate a method profile leave event during
10286         an exception to ensure that the profiler gets notified.
10287
10288 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
10289
10290         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
10291         branch.
10292
10293         * cpu-amd64.md: Add long_and/or/xor opcodes.
10294
10295 2007-06-06  Wade Berrier  <wberrier@novell.com>
10296
10297         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
10298         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
10299         length of instruction shr_imm (expected 8, got 10)
10300
10301 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
10302
10303         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
10304
10305 2007-06-06  Mark Probst  <mark.probst@gmail.com>
10306
10307         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
10308         MonoInternalHashTable again (fixed bug in the internal hash table
10309         code).
10310
10311 2007-06-06  Mark Probst  <mark.probst@gmail.com>
10312
10313         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
10314         Have to figure out what makes it crash the SWF regression.
10315
10316 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
10317
10318         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
10319
10320 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
10321
10322         * mini.c: optimize out the type check when storing null in a
10323         reference array.
10324
10325 2007-06-04  Mark Probst  <mark.probst@gmail.com>
10326
10327         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
10328         MonoInternalHashTable.
10329
10330 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
10331
10332         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
10333         signed integer methods.
10334
10335 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
10336
10337         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
10338         permanently since the current approach doesn't work.
10339
10340 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
10341
10342         * inssel.brg (stmt): Only call delegate->invoke_impl if 
10343         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
10344
10345 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
10346
10347         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
10348         the sreg2==rdx case.
10349         
10350         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
10351         account if it contains a rex prefix.
10352         (peephole_pass): Handle OP_FMOVE as well.
10353
10354 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
10355
10356         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
10357         as it causes regressions.
10358
10359 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
10360
10361         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
10362         static case as well.
10363
10364         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
10365
10366         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
10367         (mono_arch_get_this_arg_from_call): Ditto.
10368
10369         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
10370
10371         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
10372         invoke_impl field.
10373
10374         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
10375         (mono_arch_get_this_arg_from_call): Ditto.
10376
10377         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
10378         
10379         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
10380         try to create optimized invoke code and use that for further invocations. 
10381         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
10382
10383         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
10384
10385 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
10386
10387         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
10388         sealed classes or methods.
10389         *devirtualization.cs: tests for the new optimization
10390
10391 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
10392
10393         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
10394         by the update_volatile () function.
10395
10396 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
10397
10398         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
10399         require it.
10400
10401         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
10402
10403 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
10404
10405         * mini.c: Add configure checks for header files.
10406         * mini-x86.c: Add configure checks for header files.
10407         * trace.c: Add configure checks for header files.
10408         * aot-runtime.c: Add configure checks for header files.
10409         * aot-compiler.c: Add configure checks for header files.
10410         * driver.c: Add configure checks for header files.
10411         * mini-codegen.c: Add configure checks for header files.
10412         
10413         Code is contributed under MIT/X11 license.
10414
10415 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
10416
10417         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
10418         icompare_imm -128 + op_iclt. Fixes #81703.
10419
10420 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
10421
10422         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
10423
10424 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
10425
10426         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
10427         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
10428         so that all isinst checks now use "interface_bitmap".
10429
10430 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
10431
10432         * cpu-amd64.md (jmp): Fix a warning.
10433
10434         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
10435
10436         * basic.cs: Add new regression test.
10437
10438         * basic.cs: Remove test which is now in basic-long.cs.
10439
10440         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
10441
10442         * basic-long.cs: Add new test.
10443         
10444 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
10445
10446         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
10447
10448 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
10449
10450         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
10451
10452         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
10453         places.
10454         
10455         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
10456         throwing code a bit.
10457
10458         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
10459         the exception throwing code a bit.
10460
10461         * mini-x86.c (get_call_info): Allocate result from a mempool.
10462
10463 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
10464
10465         * aot-compiler.c (find_typespec_for_class): Fix the assert.
10466
10467         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
10468
10469         * mini.h (MonoCompile): Add 'token_info_hash' field.
10470
10471         * mini.c: Save token->method associations during compilation so the AOT 
10472         compiler can use it.
10473         
10474         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
10475         which reference generic classes and methods.
10476
10477 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
10478
10479         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
10480
10481         * aot-compiler.c (compile_method): Fix a typo in a comment.
10482
10483         * aot-runtime.c (decode_cached_class_info): Skip generic types.
10484
10485         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
10486         everything generic.
10487
10488         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
10489
10490 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
10491
10492         * mini.h (MonoCompile): Add 'args' field.
10493
10494         * mini.c (mono_compile_create_vars): Store variables representing the arguments
10495         into cfg->args.
10496
10497         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
10498
10499 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
10500
10501         * mini.c (mono_compile_get_interface_var): Remove this unused function.
10502
10503         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
10504
10505         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
10506         opcodes for some opcodes.
10507
10508         * mini.h *.brg *.c: Use the new opcodes.
10509
10510 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
10511
10512         * mini.h: Bumped aot revision.
10513
10514         * inssel.brg: modified code generation of type checks for interfaces
10515         to use the new "MonoClass.interface_bitmap" instead of the old
10516         "MonoClass.interface_offsets".
10517
10518 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
10519
10520         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
10521
10522 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
10523
10524         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
10525         64 bit platforms.
10526
10527 2007-04-27  Neale Ferguson <neale@sinenomine.net>
10528
10529         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
10530
10531 2007-04-27  Wade Berrier  <wberrier@novell.com>
10532
10533         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
10534         mini.h) to fix build.
10535
10536 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
10537
10538         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
10539         
10540         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
10541         causes the corlib unit tests to fail.
10542
10543 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
10544
10545         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
10546
10547         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
10548
10549         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
10550         opcodes to the comparison relations.
10551
10552         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
10553         opcodes to their types.
10554         
10555         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
10556
10557         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
10558         it in cfg->arch.cinfo.
10559
10560         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
10561
10562         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
10563         cfg->cil_offset_to_bb.
10564
10565 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
10566
10567         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
10568         created becase of initlocals.
10569
10570 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
10571
10572         * mini-alpha.c cpu-alpha.md: More alpha port work from 
10573         Sergey Tikhonov <tsv@solvo.ru>.
10574
10575 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
10576
10577         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
10578
10579 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
10580
10581         * cpu-s390.md (break): Correct the length of break instruction.
10582
10583 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10584
10585         * mini.c: fix a couple of soft-float issues and comments.
10586
10587 2007-04-15  Miguel de Icaza  <miguel@novell.com>
10588
10589         * trace.c (is_filenamechar): - is also a filename char.
10590
10591 2007-04-15  Neale Ferguson <neale@sinenomine.net>
10592
10593         * mini-s390.c: Correct checking for enum type in return value processing.
10594
10595 2007-04-14  Raja R Harinath  <rharinath@novell.com>
10596
10597         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
10598         (version.h): Makefile is in the build directory.
10599
10600 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
10601
10602         * mini-amd64.h: fix for assertion failure on Solaris/amd64
10603
10604 2007-04-11  Martin Baulig  <martin@ximian.com>
10605
10606         * mini.c (can_access_member): Fix handling of generic classes;
10607         fixes #81259.
10608
10609 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
10610
10611         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
10612
10613 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
10614
10615         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
10616
10617 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
10618
10619         * mini-codegen.c: make sure the right spill amount is
10620         used for fp or integer registers (fixes the float_sub_spill() on ppc).
10621
10622 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
10623
10624         * mini-ppc.c: fixes for the fp_branch_nan test.
10625
10626 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
10627
10628         * basic.cs: Comment out new test which still fails on ia64.
10629
10630 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10631
10632         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
10633
10634 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
10635
10636         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
10637
10638 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
10639
10640         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
10641         on 64 bit machines. Fixes part of #80738.
10642
10643         * basic.cs: Add regression test.
10644
10645 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
10646
10647         * inssel.brg basic.cs: Revert previous change to fix build.
10648
10649         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
10650         platforms.
10651         
10652         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
10653
10654         * basic.cs: Add new regression test.
10655
10656 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
10657
10658         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
10659         many arguments.
10660
10661 2007-03-16  Neale Ferguson <neale@sinenomine.net>
10662
10663         * cpu-s390x.md: Correct length of break instruction.
10664
10665 2007-03-16  Neale Ferguson <neale@sinenomine.net>
10666
10667         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
10668         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
10669
10670 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
10671
10672         * *.c: Begin WIN64 port.
10673         * mini.c:  Use correct register in profiler.
10674         * mini-amd64.c: No inline assembly on Win64.
10675         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
10676         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
10677         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
10678         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
10679         mono_arch_ip_from_context for Win64.
10680         
10681         Contributed under MIT/X11 license.
10682
10683 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
10684
10685         * exceptions-amd64.c (seh_handler): Ditto.
10686
10687         * exceptions-x86.c (seh_handler): Fix a memory leak.
10688
10689 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
10690
10691         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
10692         mini-s390x.c: fixed peephole optimizations to deal
10693         correctly with 1 and 2 byte reload avoidance.
10694
10695 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
10696
10697         * cpu-s390.md, cpu-s390x.md: update localloc length.
10698
10699 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
10700
10701         * cpu-g4.md: added missing descriptions.
10702
10703 2007-03-14  Miguel de Icaza  <miguel@novell.com>
10704
10705         *  Makefile.am: Add support so the tail tests are not executed on
10706         PowerPC as that is a known limitation of the PowerPC port.
10707
10708 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
10709
10710         * runmdesc.bat:  Move to msvc directory.
10711         
10712 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
10713
10714         * runmdesc.bat:  Run executable that was produced by the current
10715         target and sent via an argument.
10716         
10717 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
10718
10719         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
10720         #81102.
10721
10722         * generics.2.cs: Add regression test.
10723
10724 2007-03-09  Wade berrier  <wberrier@novell.com>
10725
10726         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
10727
10728 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
10729
10730         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
10731         AOT code depends on this.
10732
10733 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
10734
10735         * mini.c: more precise tracking of types in the eval stack
10736         (part of fix for bug #81044).
10737
10738 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
10739
10740         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
10741
10742         * aot-compiler.c (encode_patch): Remove an obsolete comment.
10743
10744 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
10745
10746         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
10747
10748         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
10749
10750 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
10751
10752         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
10753         a pointer on 64 bit systems. Fixes #80190.
10754
10755         * iltests.il: Add new regression test.
10756
10757 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
10758
10759         * mini.c: inline a constant for Environment.IsRunningOnWindows.
10760
10761 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
10762
10763         * trace.c: Remove an erroneous alignemnt check when tracing.
10764           Fixes --trace on OSX86.
10765
10766 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
10767
10768         * mini-$(arch).h: initialize SP in context for all the archs.
10769
10770 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
10771
10772         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
10773         regressions in the thread tests.
10774
10775 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
10776
10777         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
10778         - fixed implementation of LOCALLOC opcode
10779         - implemented non-un compare for floats
10780         - code cleanup
10781         - implementation of FDIV and CKFINITE opcodes
10782         - fixes for latest mono updates
10783         - additional arch opcodes
10784
10785 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
10786
10787         * Makefile.am: simplify and merge rules for cross-compilation.
10788
10789 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
10790
10791         * local-propagation.c: Actually *apply* the fix for bug 80591...
10792
10793 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
10794
10795         * mini-exceptions.c: backuot part of the last change
10796         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
10797
10798 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
10799         * inssel.brg: Fix bug 59286.
10800
10801
10802 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
10803
10804         * mini-exceptions.c: patch from Zoltan to correctly check for
10805         stack boundaries (using the stack register, not the frame register),
10806         fixes bugs #80724, #79717.
10807
10808 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
10809
10810         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
10811         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
10812
10813         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
10814         presence of frame pointer elimination.
10815
10816 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
10817         
10818         * mini-x86.h: NetBSD UCONTEX_REG defines.
10819
10820 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
10821
10822         * inssel-amd64.brg: Fix amd64 build.
10823
10824 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
10825
10826         * mini.h: remove extern to workaround what looks likes gcc bug 26905
10827         on amd64.
10828
10829 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
10830
10831         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
10832         ends.
10833
10834         * mini-<ARCH>.c: Use mono_is_regsize_var ().
10835
10836 2007-01-30 Mark Mason <mason@broadcom.com>
10837
10838            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
10839            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
10840            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
10841            beginning support for CEE_JMP [not quite working yet]
10842            * tramp-mips.c: LMF handling now works
10843         
10844 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
10845
10846         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
10847
10848         * mini.h (NULLIFY_INS): New macro.
10849
10850 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
10851
10852         * mini.c: statistical profiler fix for windows, patch
10853         from Tor Lillqvist (tml@novell.com).
10854
10855 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
10856         * local-propagation.c: Fix bug 80591.
10857
10858 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
10859
10860         * Makefile.am: put back the --export-dynamic option as with
10861         the previous gmodule flags (thanks to Robert Jordan).
10862
10863 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
10864
10865         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
10866
10867         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
10868         simplify and speed up the local register allocator. Also rename some fields
10869         like iassign->vassign.
10870         
10871         * regalloc.c: Remove some functions which are no longer used since their
10872         inlined version is in mini-codegen.c.
10873         
10874         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
10875
10876         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
10877
10878 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
10879
10880         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
10881         narrowing. Fixes #80622.
10882
10883         * iltests.il: Add new regresssion test. 
10884
10885 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
10886
10887         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
10888         debug-debugger.c, debug-debugger.h: warning fixes.
10889         * driver.c: updated copyright year and made it fit in one line.
10890
10891 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
10892
10893         * aot-runtime.c: updated to use mono-dl instead of gmodule.
10894
10895 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
10896
10897         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
10898
10899         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
10900
10901         * iltests.il: Add new test for bug #80507.
10902
10903 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
10904
10905         * mini-arm.h: use soft-float also on vfp for now.
10906
10907 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
10908
10909         * mini.c: fix some more soft-float issues.
10910
10911 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
10912
10913         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
10914
10915 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
10916         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
10917         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
10918         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
10919
10920 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
10921
10922         * mini-arm.c: typo fix.
10923
10924 2007-01-23  Neale Ferguson <neale@sinenomine.net>
10925
10926         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
10927
10928 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
10929
10930         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
10931         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
10932
10933         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
10934
10935         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
10936
10937         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
10938         
10939         * inssel.brg: Fix a warning.
10940
10941         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
10942
10943         * abcremoval.c ssa.c ssapre.c: Update after this change.
10944         
10945         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
10946
10947         * dominators.c (df_set): Use mono_bitset_union_fast.    
10948
10949 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
10950
10951         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
10952         mini-codegen.c: reduce relocations and memory usage for the cpu
10953         description.
10954
10955 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
10956
10957         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
10958
10959         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
10960         to reduce their size.
10961
10962 2007-01-19 Mark Mason <mason@broadcom.com>
10963
10964         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
10965         * mini-mips.c: more configuration macros, support long conditional branches, additional
10966         asserts, fix epilog instrumentation.
10967         * mini-mips.h: use standard stack walk
10968         * cpu-mips.md: increase size of div, rem and conditional branches
10969         
10970 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
10971
10972         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
10973         to cpu spec data.
10974
10975 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
10976
10977         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
10978         (compile_method): Ditto.
10979
10980         * aot-runtime.c (decode_klass_info): Ditto.
10981
10982         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
10983         needed by the code generated by inssel.brg. Also fix a warning.
10984
10985 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
10986
10987         * mini.c: deal with enums that become genericinsts by
10988         being nested in a generic class (bug #79956).
10989
10990 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
10991
10992         * mini.c: match the generic definition to check for
10993         private access with generic types (bug #78431).
10994
10995 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
10996
10997         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
10998         to make life easier for people cross-compiling that insist on not
10999         using scratchbox.
11000
11001 2007-01-17 Mark Mason <mason@broadcom.com>
11002
11003         * inssel-long.brg: patch to deal with mips missing flags
11004         * inssel-long32-mips.brg: implement overflow checks
11005         * insset-mips.brg: implement overflow checks
11006         * mini-mips.h: implement conditional exception handling
11007         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
11008           Remove unused code, minor cleanups.
11009         * exceptions-mips.c: minor cleanups
11010         * mini-ops.h: add mips conditional exception ops
11011         * cpu-mips.md: add mips conditional exception ops
11012
11013         
11014 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
11015
11016         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
11017         to deal with mips missing of flags.
11018
11019 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
11020
11021         * exceptions-ppc.c: execute fault handlers.
11022
11023 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
11024
11025         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
11026
11027 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
11028
11029         * mini.c: handle also floating point values in initialize_array.
11030
11031 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
11032
11033         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
11034         array initialization and make it conditional on the intrins option.
11035
11036 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
11037
11038         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
11039         relocations and put the patch info names close to the enum definition.
11040
11041 2007-01-15 Mark Mason <mason@broadcom.com>
11042
11043         * basic.cs, exceptions.cs: break up large tests to increase debugability.
11044
11045 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
11046
11047         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
11048
11049 2007-01-12  Raja R Harinath  <rharinath@novell.com>
11050
11051         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
11052
11053 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
11054
11055         * Makefile.am: distribute the mips sources.
11056
11057 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
11058
11059         * mini-codegen.h: handle bug #80489 here, by excluding ecx
11060         directly.
11061
11062 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
11063
11064         * cpu-x86.md: back out for now as this triggers other regressions.
11065
11066 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
11067
11068         * cpu-x86.md: force src1 and dest regpair for long shift instructions
11069         to eax:edx, so ecx can't get allocated to them (bug #80489).
11070
11071 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
11072
11073         * mini.c, mini-exceptions.c: enabled running fault handlers
11074         (bug #80469).
11075
11076 2007-01-03  Miguel de Icaza  <miguel@novell.com>
11077
11078         * driver.c: If nothing fail, do not use the string "failed",
11079         because it makes it very annoying to view test result logs on the
11080         web. 
11081
11082 2006-12-30  Miguel de Icaza  <miguel@novell.com>
11083
11084         * debug-debugger.c (mono_debugger_main): Rename "main" to
11085         "main_method" to prevent a warning.
11086
11087         Remove a warning for unused field.
11088
11089 2006-12-28  Martin Baulig  <martin@ximian.com>
11090
11091         * debug-debugger.c
11092         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
11093
11094 2006-12-22  Martin Baulig  <martin@ximian.com>
11095
11096         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
11097         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
11098         seperate `.mdb_debug_info' section, so we can access it from the
11099         debugger even if the binary is stripped.
11100
11101         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
11102         from the `.mdb_debug_info' here to prevent the linker from
11103         removing that section.
11104
11105         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
11106         mdb-debug-info64.s.
11107
11108 2006-12-19  Robert Jordan  <robertj@gmx.net>
11109
11110         * mini-x86: enable the code to return small structures in
11111         registers for FreeBSD as well. Fixes bug #80278.
11112         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
11113
11114 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11115
11116         * mini-x86.c: align the stack when calling the profiler
11117         function instrumenting the prolog (on OSX).
11118
11119 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
11120
11121         * mini.c: emit a break opcode where Debugger.Break () is called.
11122
11123 2006-12-13  Miguel de Icaza  <miguel@novell.com>
11124
11125         * mini.c (mono_method_to_ir): Provide useful information on this
11126         assert, to prevent others from debugging like I did.
11127
11128 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
11129
11130         * mini.c: enable code which was incorrectly commented
11131         (bug #80235).
11132
11133 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
11134
11135         * mini-x86.c: enable on OSX, too, the code to return small
11136         structures in registers.
11137
11138 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11139
11140         * mini-x86.c: remove the use of the dynamic code manager here, too.
11141
11142 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
11143
11144         * mini.h, debug-debugger.c, tramp-*.c: fixed 
11145         mono_debugger_create_notification_function() to use
11146         mono_global_codeman_reserve () instead of a dynamic code manager.
11147
11148 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
11149
11150         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
11151         ves_array_element_address() jit icall and use a generated
11152         managed method instead (which is about 4 times faster for a rank 3
11153         array access).
11154
11155 2006-11-29  Mark Mason  <mason@broadcom.com>
11156
11157         * basic-calls.cs: additional tests for passing
11158         structures as function arguments.
11159
11160 2006-11-29  Mark Mason  <mason@broadcom.com>
11161
11162         * mini-mips.h: disable custom exception handling
11163         * mini-mips.c: throw/rethrow should use jalr to call
11164         exception stubs.  Fixed bug with passing structures
11165         by value. More support for tracing floating point
11166         functions.
11167
11168 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11169
11170         * mini.c: fixed typo in the soft-float ldind.r4 handling
11171         (bug #80086).
11172
11173 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
11174
11175         * mini.c, mini.h, driver.c: added --runtime command line
11176         option to select a different runtime than the autodetected one.
11177         * jit.h: added API for embedders to initialize with a specific
11178         runtime version.
11179
11180 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
11181
11182         * mini.c: handle also boxing of r4 values (bug #80024).
11183
11184 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11185
11186         * mini-ppc.c: force indirect calls until we reserve
11187         enough address space for all the generated code.
11188
11189 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
11190
11191         * exceptions-arm.c: workaround bugs in the libc definition
11192         of struct ucontext.
11193
11194 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
11195
11196         * inssel.brg: fixes from me and Mark Mason.
11197
11198 2006-11-23  Dick Porter  <dick@ximian.com>
11199
11200         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
11201         semaphore display now we've fixed the initial value
11202
11203 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
11204
11205         * inssel.brg: partially revert the last change to fix the build.
11206
11207 2006-11-21  Mark Mason  <mason@broadcom.com>
11208
11209         * inssel.brg: Add and use compare-and-branch macros to support
11210         architectures that do not have condition code registers (ie. MIPS).
11211         * *-mips.{c,brg,md}: Fix copyright statements
11212
11213 2006-11-20  Mark Mason  <mason@broadcom.com>
11214
11215         * Makefile.am: remove mini-codegen.c from list of MIPS sources
11216         * mini.c: Allow GET_CONTEXT to be specified by the arch port
11217         * mini.h: Added declaration for mono_print_ins()
11218         * mini-codegen.c: added ins_spec initializer for MIPS
11219         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
11220         vreg to be virtual and hreg to be non-virtual.
11221         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
11222         is not yet working/implemented correctly.
11223         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
11224         non-static, fixup calls to print_ins() from other parts in the file.
11225
11226 2006-11-20  Mark Mason  <mason@broadcom.com>
11227
11228         * basic-calls.cs: added tests for passing structures as arguments
11229         to calls.
11230
11231 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
11232
11233         * inssel-long32.brg: optimize signed division by power of two.
11234
11235 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
11236
11237         * mini-arm.c: added support for interworking with thumb code
11238         (mono must be still be built using the ARM instruction encoding).
11239
11240 2006-11-19  Miguel de Icaza  <miguel@novell.com>
11241
11242         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
11243         verifier has different rules for it.   Fixes a few verifier issues
11244         in the test suite.
11245
11246         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
11247         at the end, so people know what happened.
11248
11249 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
11250
11251         * brach-opts.c: in optimize_exception_target() make sure we
11252         are in a catch clause (fixes bug #79871).
11253
11254 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
11255
11256         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
11257         more soft-float support fixes.
11258
11259 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
11260
11261         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
11262         that are passed half on the stack and half in registers.
11263
11264 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
11265
11266         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
11267         more mips integration work from Mark E Mason 
11268         <mark.e.mason@broadcom.com>.
11269
11270 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
11271
11272         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
11273         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
11274         tramp-mips.c: added sources for the mips port, not
11275         integrated in the build yet. Contributed by
11276         Mark E Mason <mark.e.mason@broadcom.com>.
11277
11278 2006-11-14  Neale Ferguson <neale@sinenomine.net>
11279
11280         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
11281
11282 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
11283
11284         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
11285         put the soft-float rules in its own file since it seems to
11286         break s390 compilation.
11287
11288 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
11289
11290         * mini-arm.c: fixed wrnings.
11291
11292 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
11293
11294         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
11295         inssel-arm.brg: ARM support for soft-float.
11296
11297 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
11298
11299         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
11300         loads and stores of 32 bit fp values.
11301
11302 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
11303
11304         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
11305
11306         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
11307         works. Fixes #79852 and #79463.
11308
11309 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
11310
11311         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
11312         more soft-float support WIP and fixes.
11313
11314 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
11315
11316         * mini-arm.c: some VFP updates.
11317
11318 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11319
11320         * mini-exceptions.c: 0 is a valid local var offset in some
11321         architectures, don't assert (bug #78508).
11322
11323 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
11324
11325         * exceptions-arm.c: fixed off by one error in stack walk code.
11326
11327 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
11328
11329         * mini.h, mini.c: more precise tracking of type load exceptions.
11330
11331 2006-11-03  Robert Jordan  <robertj@gmx.net>
11332
11333         * Makefile.am: [WIN32] Add monow.exe target.
11334         * driver.c: [WIN32] Don't detach the console when debugging.
11335         Fixes bug #79797.
11336         
11337 2006-10-30  Miguel de Icaza  <miguel@novell.com>
11338
11339         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
11340
11341 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
11342
11343         * aot-compiler.c (emit_method_info): Add a case missed earlier.
11344
11345         * driver.c (mini_regression): Fix --regression with AOT.
11346
11347         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
11348
11349 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
11350
11351         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
11352
11353         * mini-sparc.h: Don't use sigaction on sparc/linux.
11354
11355         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
11356
11357         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
11358
11359         * mini-exceptions.c: Add proper include files for getpid ().
11360
11361 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
11362
11363         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
11364         address instead of a MonoJitInfo* to avoid decoding the exception info for the
11365         method.
11366
11367         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
11368         name cache to reduce its size.
11369
11370         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
11371
11372 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
11373
11374         * mini-x86.c: Save/restore the current LMF structure more efficiently using
11375         the mono_lmf TLS variable.
11376
11377         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
11378         trampoline lmf frames.  
11379
11380         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
11381
11382 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
11383
11384         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
11385         the mono_lmf TLS variable.
11386
11387         * mini-exceptions.c: Access the LMF structure through accessors.
11388
11389         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
11390         variable instead of in jit_tls->lmf.
11391
11392         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
11393         
11394         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
11395         trampoline lmf frames.
11396
11397         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
11398
11399 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
11400
11401        * mini.c trace.c mini-x86.c: Revert these too.
11402         
11403        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
11404        signature change.
11405
11406 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
11407
11408         * genmdesc.c: removed now dead code.
11409
11410 2006-10-09  Robert Jordan <robertj@gmx.net>
11411
11412         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
11413
11414 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
11415
11416         * mini.h: do not leave gaps in the opcode values.
11417
11418 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
11419
11420         * jit-icalls.h: flag functions as internal here, too.
11421
11422 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
11423
11424         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
11425         functions with the internal attribute.
11426
11427 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
11428
11429         * aot-compiler.c: fclose the file descriptor in the profile read loop.
11430
11431 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
11432
11433         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
11434         for soft-float.
11435
11436 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
11437
11438         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
11439         tail calls as on other platforms.
11440
11441         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
11442
11443         * iltests.il: Add a few tailcall tests.
11444
11445 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
11446
11447         * driver.c: fix loop for old compilers (bug #79521).
11448
11449 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
11450
11451         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
11452
11453         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
11454
11455         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
11456         metadata without any code.
11457
11458         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
11459         more precise debugging information using gdb.
11460
11461 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
11462
11463         * inssel-ia64.brg: Make the helper methods static.
11464
11465 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
11466
11467         * inssel-x86.brg: make the helper methods static.
11468
11469 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
11470
11471         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
11472
11473 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
11474
11475         * mini.c: updates for monoburg changes.
11476         * inssel.brg: make a few helper functions static as they should.
11477
11478 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
11479
11480         * Makefile.am: Move mini-codegen.c to common_sources.
11481
11482 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
11483
11484         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
11485         instructions.
11486         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
11487         mini-ppc.h: port to use the common local register allocator.
11488
11489 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
11490
11491         * mini.h: Remove the comment too then.
11492
11493 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
11494
11495         * mini.h: put back backend.data which is to be used shortly and
11496         doesn't increase the size of MonoInst. If any 64 bit arch aligned
11497         pointers on 4 byte boundaries it'd have much bigger issues running
11498         and you can ifdef it out anyway.
11499
11500 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
11501
11502         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
11503         MonoInst size by 4 bytes on 64 bit machines.
11504
11505 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
11506
11507         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
11508         replacement with more meaningful field names. Arch maintainers, please
11509         check the assigned names are good enough for your arch.
11510
11511 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
11512
11513         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
11514         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
11515
11516 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
11517
11518         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
11519         relocations and memory requirements, put the optimization flags
11520         definitions in their own file.
11521
11522 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
11523
11524         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
11525
11526         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
11527
11528 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
11529
11530         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
11531
11532 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
11533
11534         * inssel.brg: use the correct function to get the size of an item
11535         in an array, given an element class.
11536         * aot-compiler.c: do not access class->class_size directly.
11537
11538 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
11539
11540         * mini.h, debug-mini.c: added a debugging function to print
11541         info about local variables and arguments in a jitted method.
11542
11543 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
11544
11545         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
11546
11547         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
11548
11549 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
11550
11551         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
11552         inner and outer loops when passing vtypes.
11553
11554 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
11555
11556         * mini-ppc.c: take into account the cpu errata for cache flushing
11557         which caused some random errors (bug #79381).
11558
11559 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
11560
11561         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
11562         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
11563
11564 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
11565
11566         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
11567         loaded.
11568
11569         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
11570         freebsd ports tree.
11571
11572         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
11573         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
11574
11575         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
11576         displacement.
11577
11578 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
11579
11580         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
11581
11582 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
11583
11584         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
11585         macro does not have to be changed during debugging.
11586
11587         * 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>.
11588
11589         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
11590
11591         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
11592         
11593         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
11594         MONO_ARCH_NO_EMULATE_MUL is defined.
11595
11596         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
11597
11598         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
11599
11600         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
11601
11602         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
11603         
11604 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
11605
11606         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
11607         stuff to mini-exceptions.c where it is used.
11608
11609         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
11610         setup code, the real one is in mini-exceptions.c.
11611
11612         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
11613         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
11614         some changes from the freebsd ports tree.
11615
11616         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
11617         constants.
11618         
11619         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
11620
11621 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
11622
11623         * mini.c: on Linux, check for /proc to be mounted
11624         (bug# 79351, novell bug#201204).
11625
11626 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
11627
11628         * mini.c: handle cases where pthread_attr_getstack() behaves
11629         incorrectly (bug #78096).
11630
11631 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
11632
11633         * mini-arm.c: support larger stack frames (bug #79272).
11634
11635 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
11636
11637         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
11638
11639         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
11640         tokens.
11641
11642         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
11643         mono_class_from_name () to find a class from its name.
11644
11645         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
11646
11647 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
11648
11649         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
11650
11651 2006-09-05  Kornel Pal  <kornelpal@gmail.com>
11652
11653         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
11654
11655 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
11656
11657         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
11658         callinfo->trampoline.
11659
11660         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
11661         fixes #79271.
11662         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
11663         future.
11664
11665 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
11666
11667         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
11668
11669 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
11670
11671         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
11672         stats.method_trampolines, it is already done by the generic trampoline code.
11673
11674         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
11675         
11676 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
11677
11678         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
11679
11680         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
11681
11682         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
11683
11684         * mini.c (print_jit_stats): Print mscorlib mempool size too.
11685         
11686         * mini.c (print_jit_stats): Print new stats.
11687
11688         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
11689
11690 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
11691
11692         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
11693         Address on two dimensional arrays. Fixes #78729.
11694
11695         * mini.h (MonoCompile): Add a 'skip_visibility' field.
11696
11697         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
11698         a method.
11699
11700         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
11701
11702         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
11703         #79130.
11704         
11705         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
11706         a race condition.
11707         (mini_get_ldelema_ins): Ditto.
11708
11709 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
11710
11711         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
11712         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
11713         Fixes #79213.
11714
11715 2006-08-29 Neale Ferguson <neale@sinenomine.net>
11716
11717         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
11718         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
11719
11720         * exceptions-s390x.c: Cosmetic change.
11721
11722         * tramp-s390.c: Fix warning.
11723
11724         * cpu-s390.md: Correct length of mul_imm.
11725
11726 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
11727
11728         * aot-compiler.c: added binary writer with ELF backend
11729         implementation (only on Linux/x86 for now).
11730
11731 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
11732
11733         * Makefile.am: Don't run net 2.0 AOT tests.
11734
11735         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
11736         (mono_compile_assembly): Skip net 2.0 assemblies as well.
11737
11738         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
11739
11740 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
11741
11742         * aot-compiler.c: simplified and refactored the asm-writing code
11743         to allow different backends.
11744
11745 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
11746
11747         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
11748
11749         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
11750         little. Share patches of type TYPE_FROM_HANDLE as well.
11751
11752         * mini.c (mono_patch_info_equal): New helper function.
11753         (mono_patch_info_hash): Ditto.
11754
11755         * aot-compiler.c (emit_method_code): Fix s390 build.
11756
11757         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
11758         is not handled because it is stored as a flag and not as a type ctor. Fixes
11759         #79016.
11760
11761 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
11762
11763         * aot-compiler.c: Fix computation of GOT slot statistics.
11764         
11765         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
11766         Also remove support for not PIC AOT.
11767
11768         * mini.h: Bump AOT file format version.
11769
11770         * objects.cs: Add a test for #78990.
11771
11772         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
11773         (peter.dettman@iinet.net.au). Fixes #79087.
11774
11775         * basic-long.cs: Add a test for the above.
11776
11777 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
11778
11779         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
11780         
11781         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
11782         code somewhat.
11783
11784 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
11785
11786         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
11787         exceptions.
11788
11789 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
11790
11791         * mini.c: Don't verify COM proxy invoke calls
11792         
11793
11794 2006-08-10  Dick Porter  <dick@ximian.com>
11795
11796         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
11797         which process is holding semaphores locked.
11798
11799 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
11800
11801         * mini-ia64.c mini-amd64.c: Fix #79027.
11802
11803         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
11804
11805         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
11806
11807         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
11808         implicit arguments in a vararg call. Fixes #79027.
11809
11810 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
11811
11812         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
11813         (mono_get_array_new_va_signature): Ditto.
11814
11815 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
11816
11817         * aot-runtime.c: Call init_plt lazily.
11818
11819         * inssel-long.brg: Fix unsigned long->int conversion.
11820
11821         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
11822
11823         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
11824         that most data is now in the .rss/.data section.
11825
11826 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
11827
11828         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
11829
11830         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
11831
11832         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
11833
11834         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
11835
11836         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
11837         virtual call. Fixes #79010.
11838
11839         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
11840         and use the result as the this argument in the real call.
11841
11842         * generics.2.cs: Add a new test for #79010.
11843         
11844 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
11845
11846         * mini-x86.c: Fix a warning.
11847
11848         * aot-compiler.c: Add a bunch of statistics.
11849
11850         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
11851
11852 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
11853
11854         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
11855
11856 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
11857
11858         * 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>.
11859
11860 2006-07-13  Miguel de Icaza  <miguel@novell.com>
11861
11862         * mini.c (mono_method_to_ir): Obtain the original method in the
11863         CIL stream and use this to perform validation.
11864
11865         Fixed: #78816
11866
11867 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
11868
11869         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
11870         (mono_arch_call_opcode): Ditto.
11871
11872         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
11873         #78826.
11874
11875         * mini.c (mono_patch_info_dup_mp): New helper function.
11876         
11877         * aot-compiler.c (compile_method): Fix some of the memory allocated during
11878         compilation. Fixes #78827.
11879
11880 2006-07-18  Kornel Pal  <kornelpal@gmail.com>
11881
11882         * declsec.c: Use original security informations for
11883           MONO_WRAPPER_MANAGED_TO_MANAGED.
11884
11885 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
11886
11887         * mini.c: Allow Com Interop methods/classes and
11888         don't verify COM wrapper calls
11889         
11890
11891 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
11892
11893         * inssel-long32.brg: Fix long->i4 checked conversion.
11894
11895         * exceptions.cs: Add a test for the above.
11896
11897 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
11898
11899         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
11900
11901         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
11902         leaks.
11903
11904         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
11905         #78775.
11906
11907 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
11908
11909         * mini.c: Fix solaris/x86 exception handling.
11910
11911         * Makefile.am: Get rid of $(ICU_LIBS).
11912
11913 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
11914
11915         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
11916         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
11917         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
11918
11919         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
11920
11921         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
11922         this function causes a SIGSEGV.
11923
11924 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
11925
11926         * mini.c: Remove unused solaris/x86 includes.
11927
11928 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
11929
11930         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
11931
11932 2006-06-20  Jb Evain  <jbevain@gmail.com>
11933
11934         * cpu-g4.md: fix max length of start_handler instruction.
11935
11936 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
11937         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
11938
11939 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
11940         * ssa.c: Fixed bug 78653 for SSA based deadce.
11941         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
11942         MonoInst.flags, used in SSA based deadce.
11943         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
11944         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
11945
11946 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
11947
11948         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
11949         it can end up using non executable memory on ppc64 systems
11950         running ppc32 userspace (fix from Johannes Berg).
11951
11952 2006-06-14  Dick Porter  <dick@ximian.com>
11953
11954         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
11955         4.1.1
11956
11957 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
11958         * mini.c: Made so that inline is locally disabled if it would
11959         trigger a .cctor, because too many apps depend on this behavior
11960         (which seems to be also the one of the MS CLR).
11961
11962 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
11963
11964         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
11965         No idea why this worked before.
11966
11967         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
11968         which branch to outer exception clauses since they could skip the
11969         inner finally clauses. Fixes #78633.
11970
11971         * exceptions.cs: Add a test for the above.
11972
11973         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
11974         Fixes #78629.
11975
11976         * iltests.il: Add a test for the above.
11977
11978 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
11979
11980         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
11981         after the end of a try bblock, to prevent asserts in mini_method_compile ().
11982
11983         * iltests.il: Add a test for the above.
11984
11985 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
11986
11987         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
11988         
11989         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
11990         methods as instrinsics.
11991
11992 2006-06-09  Wade Berrier <wberrier@novell.com>
11993
11994         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
11995         (simple-cee-ops.h ssapre-mini-ops.h)
11996
11997 2006-06-09  Neale Ferguson <neale@sinenomine.net>
11998
11999         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
12000         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
12001         instruction).
12002         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
12003         * cpu-s390x.md: Fix max. length values for a couple of instructions.
12004
12005 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
12006
12007         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
12008
12009 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
12010
12011         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
12012         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
12013         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
12014         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
12015         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
12016         of opcodes, so that bug 78549 should not happen again.
12017         * ssapre.c: Updated to use the renamed files.
12018
12019 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
12020
12021         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
12022         in OP_ATOMIC_EXCHANGE_I4.
12023
12024 2006-06-07  Wade Berrier <wberrier@novell.com>
12025
12026         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
12027         in mono_debugger_create_notification_function)
12028
12029 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
12030
12031         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
12032         
12033         * mini.c (type_from_stack_type): Disable some changes which do not
12034         seem to work.
12035
12036         * driver.c: Reenable opts.
12037
12038         * mini.h (MonoStackSlot): New structure to keep track of the verification state
12039         of the evaluation stack.
12040         
12041         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
12042         evaluation stack trace at entry to the bblock.
12043
12044         * mini.c (merge_stacks): New function to perform verification of stack merges.
12045         Turned off by default.
12046
12047         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
12048         STACK_MP.
12049         
12050 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
12051
12052         * local-propagation.c: Fixed bug 78549.
12053
12054 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
12055
12056         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
12057
12058 2006-06-02  Miguel de Icaza  <miguel@novell.com>
12059
12060         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
12061         tramp-arm.c, tramp-ia64.c
12062         (mono_debugger_create_notification_function): Update signature to
12063         new signature and use new protocol for creating the notification
12064         function.  
12065
12066         Should fix the build.
12067
12068 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
12069
12070         * exceptions-ppc.c (mono_jit_walk_stack)
12071         (ves_icall_get_frame_info): Fix the build
12072
12073 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
12074
12075         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
12076
12077 2006-05-31  Raja R Harinath  <rharinath@novell.com>
12078
12079         * il2tests.2.il: New file for generics CIL tests.  Add test for
12080         #78019.
12081         * Makefile.am: Update.
12082
12083         Fix #78019
12084         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
12085         to nullable types.
12086
12087 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
12088
12089         * aliasing.c: Fixed bug 78311.
12090
12091 2006-05-29  Martin Baulig  <martin@ximian.com>
12092
12093         * mini-exceptions.c (mono_find_jit_info): When computing the
12094         native offset, check whether we're actually inside the method's
12095         code; call mono_debug_print_stack_frame() to format the frame.
12096         (ves_icall_System_Exception_get_trace): Call
12097         mono_debug_print_stack_frame() to format the stack frame.
12098         (ves_icall_get_trace): Update to the new debugging API.
12099         (mono_jit_walk_stack_from_ctx): Likewise.
12100         (ves_icall_get_frame_info): Likewise.
12101
12102         * mini.c (get_method_from_ip): Use the new debugging API.
12103         (mono_print_method_from_ip): Likewise.
12104
12105         * exceptions-ppc.c
12106         (mono_jit_walk_stack): Use the new debugging API.
12107         (ves_icall_get_frame_info): Likewise.   
12108
12109 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
12110
12111         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
12112
12113 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
12114
12115         * mini.c: Added "limitator" to inline for debugging.
12116
12117 2006-05-24  Martin Baulig  <martin@ximian.com>
12118
12119         * debug-debugger.c (mono_debugger_init): Create a private,
12120         malloc()-based code manager for the notification function and
12121         intentionally leak it on exit.  This fixes the crash-on-exit race
12122         condition.
12123
12124         * tramp-amd64.c
12125         (mono_debugger_create_notification_function): Added
12126         `MonoCodeManager *' argument.
12127
12128         * tramp-x86.c
12129         (mono_debugger_create_notification_function): Added
12130         `MonoCodeManager *' argument.
12131
12132 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
12133
12134         * aliasing.c: Fixed 64 bit issue.
12135         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
12136         default since all known bugs are fixed (one more time!).
12137
12138 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
12139
12140         * mini.c: write barrier support.
12141
12142 2006-05-23  Martin Baulig  <martin@ximian.com>
12143
12144         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
12145         check at the top of the file.
12146
12147 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
12148
12149         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
12150         reverting changes without reason and without changelog entries.
12151
12152 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
12153
12154         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
12155         to a few opcodes. Fixes #78439.
12156
12157         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
12158         consistency with other archs.
12159
12160         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
12161
12162 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
12163
12164         * debug-debugger.c: fix the build.
12165
12166 2006-05-17  Martin Baulig  <martin@ximian.com>
12167
12168         * debug-debugger.c
12169         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
12170         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
12171         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
12172         (debugger_attach): Call GC_mono_debugger_add_all_threads().
12173
12174 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
12175
12176         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
12177
12178 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
12179
12180         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
12181         MONO_TYPE_GENERICINST.
12182         
12183         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
12184         MONO_TYPE_GENERICINST.
12185
12186 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
12187
12188         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
12189         #78325.
12190
12191 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
12192
12193         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
12194         mempool.
12195         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
12196
12197 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
12198
12199         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
12200         mono_trace_cleanup ().
12201
12202         * iltests.il: Fix problem with the newly added test.
12203
12204         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
12205         due to register constraints, free up the previous hreg. Fixes #78314.
12206
12207         * iltests.il: Add new test for #78314.  
12208
12209         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
12210         Interlocked.Add. Fixes #78312.
12211
12212         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
12213         
12214 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
12215
12216         * inssel.brg (mini_emit_virtual_call): Fix a warning.
12217
12218 2006-05-05  Martin Baulig  <martin@ximian.com>
12219
12220         * debug-mini.c (mono_debug_open_block): New method.
12221
12222         * mini-amd64.c
12223         (mono_arch_output_basic_block): Call mono_debug_open_block() at
12224         the beginning of each basic block.
12225
12226         * mini-x86.c
12227         (mono_arch_output_basic_block): Call mono_debug_open_block() at
12228         the beginning of each basic block.
12229
12230 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
12231
12232         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
12233         default until I understand why they break the build on amd64.
12234
12235 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
12236
12237         * mini.c (mini_cleanup): Call mono_cleanup ().
12238
12239         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
12240         errors.
12241
12242 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
12243
12244         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
12245         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
12246         default since all known bugs are fixed, and I cannot reproduce bug
12247         77944... I'm asking Matt Hargett to test again after this commit.
12248
12249 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
12250
12251         * mini-codegen.c: Fixed typo that thrashed inline.
12252
12253 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
12254
12255         * dominators.c (compute_dominators): Avoid using a worklist since
12256         it is not correct in some cases. Instead, iterate over all bblocks as
12257         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
12258
12259 2006-04-28  Miguel de Icaza  <miguel@novell.com>
12260
12261         * mini.c (mono_jit_compile_method_inner): Use
12262         mono_prepare_exception_from_error that resets the value
12263         internally.
12264
12265 2006-04-27  Miguel de Icaza  <miguel@novell.com>
12266
12267         * mini.c: Move the mini_loader_error_to_exception to metadata. 
12268         
12269 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
12270
12271         * aliasing.c: Fixed bug 78210.
12272
12273 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
12274
12275         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
12276         default until all their problems (or the ones they trigger) are fixed.
12277
12278 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
12279
12280         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
12281         
12282         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
12283         as loaded only after resolving patches since that could invoke the same method.
12284
12285         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
12286
12287         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
12288         functions.
12289
12290         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
12291         AOT loader.
12292
12293         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
12294         stack.
12295
12296         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
12297         made from AOT code through the PLT table.
12298
12299         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
12300         holding the plt offset when a call is made to the aot plt trampoline.
12301         
12302 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
12303
12304         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
12305         amd64 AOT support.
12306
12307         * Makefile.am (common_sources): Fix build breakage.
12308
12309         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
12310         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
12311         intra-assembly calls if possible.
12312         
12313         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
12314
12315         * mini-trampolines.c: Handle PLT entries.
12316
12317         * mini.c: Avoid creating a GOT var for calls.
12318
12319         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
12320         from mscorlib code.
12321
12322         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
12323         from mscorlib code.
12324
12325         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
12326         AOT code.       
12327
12328         * mini.h: Bump AOT file format version.
12329         
12330         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
12331         covers more cases.
12332
12333 2006-04-25  Martin Baulig  <martin@ximian.com>
12334
12335         * driver.c: Disable copyprop, consprop and inline when running
12336         inside the debugger.
12337
12338 2006-04-25  Martin Baulig  <martin@ximian.com>
12339
12340         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
12341         with `get_current_thread' and added `detach'.
12342         (MonoDebuggerMetadataInfo): Added `thread_size',
12343         `thread_tid_offset', `thread_stack_ptr_offset' and
12344         `thread_end_stack_offset'.
12345
12346 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
12347
12348         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
12349         aot-runtime.c.
12350
12351         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
12352         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
12353
12354         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
12355
12356         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
12357
12358         * aot.c: Add support for ADJUSTED_IID.  
12359
12360 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
12361
12362         * aot.c (emit_method_order): Don't align method_order_end.
12363
12364         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
12365         the interface ID changes.
12366
12367 2006-04-21  Dick Porter  <dick@ximian.com>
12368
12369         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
12370         cleaning up a thread.  Fixes the new part of bug 77470.
12371
12372 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
12373
12374         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
12375         to managed wrapper.
12376                      
12377 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
12378
12379         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
12380         
12381         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
12382         SIGSEGV. Fixes #78072.
12383
12384         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
12385         unregister our SIGABRT handler.
12386
12387 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
12388
12389         * mini.c: Disabled inline where it can alter the call stack in a
12390         way visible from managed code.
12391         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
12392         default.
12393
12394 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
12395
12396         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
12397         on other platforms. Fixes #78089.
12398
12399 2006-04-13  Martin Baulig  <martin@ximian.com>
12400
12401         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
12402         determine whether we're inside the debugger.
12403
12404         * debug-debugger.h
12405         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
12406
12407 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
12408
12409         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
12410         handler clauses. Fixes #78024.
12411
12412         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
12413         in the CALL_MEMBASE opcodes. Fixes #78088.
12414         (mono_arch_get_vcall_slot_addr): Ditto.
12415
12416 2006-04-10  Martin Baulig  <martin@ximian.com>
12417
12418         * debug-debugger.c: The thread handling code has now been moved
12419         into ../metadata/threads.c.
12420
12421 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
12422
12423         * driver.c (mono_main): Fix --with-gc=none build.
12424
12425         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
12426         (mono_spillvar_offset_float): Ditto.
12427         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
12428         hreg, not when its !global, since on ia64, there is a third category: stacked
12429         registers.      
12430
12431 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
12432
12433         * mini.c: set MonoInst->klass for load field address and a few other
12434         places.
12435
12436 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
12437
12438         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
12439
12440 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
12441
12442         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
12443         the branch opt changes.
12444
12445 2006-04-06  Dick Porter  <dick@ximian.com>
12446
12447         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
12448         
12449         * wapihandles.c (mini_wapi_seminfo): 
12450         * driver.c (mono_main): Add semaphore info option
12451
12452 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
12453
12454         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
12455         branch optimization changes. Fixes #78009.
12456
12457 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
12458
12459         * mini.c: ignore accessibility of methods in managed->native wrappers.
12460
12461 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
12462
12463         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
12464         
12465         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
12466
12467 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
12468
12469         * mini.c: Modify the branch optimizations to preserve the invariant that
12470         the entries inside the in_bb and out_bb arrays are unique.
12471         (mono_unlink_bblock): Avoid creation of new arrays.
12472
12473 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
12474
12475         * mini.c (mono_unlink_bblock): Fix regression caused by previous
12476         change (#77992).
12477
12478 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
12479
12480         * mini.c (optimize_branches): Remove the "optimizations" in
12481         the cbranch1/cbranch2 -> branch cases which were causing several
12482         problems in the past. Fixes #77986.
12483
12484 2006-03-31  Chris Toshok  <toshok@ximian.com>
12485
12486         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
12487         default optimizations :(
12488
12489 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
12490
12491         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
12492         branch.
12493
12494 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
12495
12496         * local-propagation.c: Added comments to structs and removed
12497         "Mono" prefixes from local tree mover types.
12498
12499 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
12500
12501         * Makefile.am (arch_sources): Define this for each architecture so 
12502         libmono_la_SOURCES is defined in one place.
12503
12504 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
12505
12506         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
12507         from handles/.
12508
12509 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
12510
12511         * driver.c: print the GC name supplied by configure.
12512
12513 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
12514
12515         * local-propagation.c: Added tree mover, and moved here all the
12516         local propagation code from mini.c
12517         * mini.c: Added support for treeprop, and moved all the local
12518         propagation code to local-propagation.c
12519         * mini.h: Added support for treeprop
12520         * driver.c: Added support for treeprop, enabled consprop, copyprop,
12521         treeprop, inline and deadce by default
12522         * Makefile.am: Added local-propagation.c
12523
12524 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
12525
12526         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
12527
12528 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
12529
12530         * debug-debugger.c: make it compile without the Boehm GC.
12531
12532 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
12533
12534         * mini.c: fixed issue with mismatch when an icall is registered
12535         with multiple names but same address.
12536
12537 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
12538
12539         * declsec.c, mini-exceptions.c: use write barrier to set reference
12540         fields of managed objects.
12541
12542 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
12543
12544         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
12545         (can_access_internals): Fix a warning.
12546
12547         * mini.c (print_method_from_ip): Rename this to 
12548         mono_print_method_from_ip so it gets exported.
12549
12550         * trace.c: Deal with strings inside StringBuilder's containing garbage
12551         and fix memory leaks. Fixes #77848.
12552
12553 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
12554
12555         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
12556         fixes #77787.
12557
12558 2006-03-16 Neale Ferguson <neale@sinenomine.net>
12559         
12560         * mini-s390.c: Remove OP_X86_TEST_NULL.
12561
12562 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
12563
12564         * mini.c: use the correct GetHashCode() for the moving collector.
12565
12566 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
12567
12568         * liveness.c: Regalloc spill cost tuning.
12569
12570 2006-03-15 Neale Ferguson <neale@sinenomine.net>
12571         
12572         * mini-s390x.h: Correct S390_LONG macro.
12573
12574         * mini-s390x.c: Cleanup unused code.
12575
12576 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
12577
12578         * jit-icalls.h: New file.
12579
12580         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
12581         icalls and include that instead of including jit-icalls.c.
12582
12583         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
12584         OP_X86 opcodes.
12585
12586 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
12587
12588         * mini.c: when checking for member accessibility, also check for
12589         friend assemblies and for explicit interface implementations.
12590
12591 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
12592
12593         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
12594
12595         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
12596
12597         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
12598         common cases are done first.    
12599
12600         * mini-ops.h: Only define platform specific opcodes on the given platform.
12601
12602         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
12603         branch.
12604         
12605 2006-03-14  Martin Baulig  <martin@ximian.com>
12606
12607         Revert Paolo's change from r57348:
12608
12609         * mini.h: don't use gboolean for bitfields.
12610         * mini.c: verifier changes for fields and methods accessibility.
12611
12612 2006-03-13  Neale Ferguson <neale@sinenomine.net>
12613
12614         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
12615
12616         * mini-s390x.c: Fix conv_r_un.
12617
12618         * cpu-s390, cpu-s390x.md: Fix lengths.
12619
12620 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
12621
12622         * mini.c: nested types have access to all the nesting
12623         levels, not just the enclosing types.
12624
12625 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
12626
12627         * mini.c: added a few more verification checks.
12628
12629 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
12630
12631         * liveness.c: Merge optimizations from the linear-il branch.
12632
12633 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
12634
12635         * mini-ia64.c (emit_call): Add a comment.
12636
12637         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
12638
12639         * tramp-ia64.c: Fix some warnings.
12640
12641 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
12642
12643         * mini.h: don't use gboolean for bitfields.
12644         * mini.c: verifier changes for fields and methods accessibility.
12645
12646 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
12647
12648         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
12649         lazy icall wrapper changes.
12650
12651         * dominators.c: Replace all the dominator algorithms with faster
12652         ones from the linear-il branch.
12653
12654         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
12655         the mempool.
12656
12657         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
12658         common cases are done first.
12659
12660         * mini-amd64.c: Fix some warnings.
12661
12662         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
12663         from the mempool.
12664
12665         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
12666         added code.
12667
12668         * mini.h: Add a missing prototype.
12669
12670 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
12671
12672         * mini.c: Compile icall wrappers lazily.
12673
12674         * mini-codegen.c: Use printf instead of g_print since its much faster.
12675
12676         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
12677         function.
12678
12679         * mini.c (optimize_branches): Cache the negative result from 
12680         remove_block_if_useless ().
12681
12682         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
12683         Also fix some bblock linking issues.
12684
12685         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
12686         assembly files.
12687
12688         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
12689
12690         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
12691         accessed fields first, for better cache behavior.
12692         
12693 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
12694
12695         * mini.c: speedup IList<T> array accesses.
12696
12697 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
12698
12699         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
12700         inline_costs counter. Fixes #77190.
12701
12702 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
12703
12704         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
12705         trace messages. Fixes #77706.
12706
12707 2006-03-04  Martin Baulig  <martin@ximian.com>
12708
12709         * tramp-amd64.c, tramp-x86.c
12710         (mono_debugger_create_notification_function): Use
12711         mono_global_codeman_reserve() to allocate a buffer at runtime and
12712         return it.
12713
12714         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
12715
12716         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
12717         notification function at runtime and then call `initialize' in the
12718         `MONO_DEBUGGER__debugger_info' vtable.
12719
12720 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
12721
12722         * iltests.il: Fix a visibility problem.
12723
12724 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
12725
12726         * driver.c, mini.c: add hooks for the counters API.
12727
12728 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
12729
12730         * driver.c: show disabled options.
12731
12732 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
12733
12734         * linear-scan.c: always use cost-driven selection.
12735
12736 2006-02-28  Raja R Harinath  <rharinath@novell.com>
12737
12738         * jit-icalls.c (helper_compile_generic_method): Revert change from
12739         2006-02-24.
12740
12741 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
12742
12743         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
12744
12745 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
12746
12747         * inssel.brg: style fixes, mostly to force the updated monoburg
12748         to run for people using svn.
12749
12750 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
12751
12752         * mini.c: match monoburg changes.
12753
12754 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
12755
12756         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
12757         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
12758         declaration in the header file.
12759
12760 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
12761
12762         * helpers.c: reduce relocations and mem usage.
12763
12764 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
12765
12766         * mini.h, mini-codegen.c: disable logging features if
12767         requested by configure.
12768
12769 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
12770
12771         * mini.c: tiny verifier changes.
12772
12773 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
12774
12775         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
12776         cpu-pentium.md: stack alignment changes for osx/x86,
12777         partially from Geoff Norton <gnorton@customerdna.com>.
12778
12779 2006-02-24  Raja R Harinath  <harinath@gmail.com>
12780
12781         * jit-icalls.c (helper_compile_generic_method): Update to changes
12782         in metadata/class.c.
12783
12784 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
12785         
12786         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
12787         
12788         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
12789         interface calls with large offsets.
12790
12791 2006-02-23  Raja R Harinath  <rharinath@novell.com>
12792
12793         * jit-icalls.c (helper_compile_generic_method): Document the
12794         special-case we depend on so that we can inflate the method twice
12795         with the same context with no bad side-effects.
12796
12797 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
12798
12799         * mini-x86.c, mini-amd64.c: fix for case when xen support
12800         is disabled.
12801
12802 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
12803
12804         * mini-x86.c, mini-amd64.c: generate code to access tls items
12805         in a faster way for Xen systems.
12806
12807 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
12808
12809         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
12810         updates and compilation fixes for the OSX/x86 port, mostly from
12811         Geoff Norton <gnorton@customerdna.com>.
12812
12813 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
12814
12815         * inssel.brg: faster interface call implementation
12816         to sync with the interface_offsets MonoVTable changes.
12817
12818 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
12819
12820         * mini.c: more verification checks.
12821
12822 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
12823
12824         * mini.c: added a few more verification checks.
12825
12826 2006-02-17      Neale Ferguson <neale@sinenomine.net>
12827
12828         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
12829         facility on the processor and use it if available.
12830
12831 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
12832
12833         * driver.c, aot.c, mini.c: throw exception if the IL code is
12834         invalid or unverifiable.
12835
12836 2006-02-17  Raja R Harinath  <rharinath@novell.com>
12837
12838         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
12839         m.StructField.
12840
12841 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
12842
12843         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
12844
12845 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12846
12847         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
12848         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
12849         handling of instantiated generic valuetypes.
12850
12851 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
12852
12853         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
12854         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
12855         instead.
12856
12857         * generics.2.cs: Revert the nullable reftypes tests.
12858
12859 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
12860
12861         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
12862         using __builtin_frame_address (1) as it doesn't work in the presence
12863         of optimizations. Hopefully fixes #77273.
12864
12865         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
12866         -> generics.cs change as it doesn't work with some automake versions.
12867
12868 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12869
12870         * mini.c: handle systems that sue a different way to
12871         retrieve the stack address of the current thread.
12872
12873 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
12874
12875         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
12876         it specially in the makefile.
12877
12878         * generics.2.cs: Add tests for nullable reference types.
12879
12880 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12881
12882         * mini.c: always handle the case when mono_jit_init()
12883         is called in a thread different from the main thread,
12884         confusing libgc (bug #77309).
12885
12886 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
12887
12888         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
12889
12890 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
12891
12892         * mini.c: change optimize_branches () to use a single loop
12893         and introduce a new optimization to simplify some range checks.
12894
12895 2006-02-03  Martin Baulig  <martin@ximian.com>
12896
12897         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
12898         and merged with debugger_thread_manager_add_thread().
12899         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
12900         inform the debugger about the main thread.
12901
12902 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
12903
12904         * basic.cs: Add test for div.un/rem.un constant folding.
12905
12906 2006-02-03  Neale Ferguson <neale@sinenomine.net>
12907
12908         * cpu-s390x.md: correct int_xor_imm length
12909
12910 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
12911
12912         * generics.2.cs: New test for #77442.
12913
12914         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
12915         #77442.
12916
12917 2006-02-02  Martin Baulig  <martin@ximian.com>
12918
12919         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
12920         <mono/metadata/mono-debug-debugger.h>   
12921
12922         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
12923
12924 2006-02-02  Martin Baulig  <martin@ximian.com>
12925
12926         * debug-debugger.h: New header file for debug-debugger.c.
12927
12928         * debug-debugger.c: Big API cleanup; don't run the managed Main()
12929         function is a separate thread anymore; add support for attaching.
12930
12931 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
12932
12933         * tramp-x86.c: Fix a warning.
12934
12935 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
12936
12937         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
12938         on very large methods.
12939
12940         * aot.c (load_patch_info): Fix a warning.
12941
12942 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
12943
12944         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
12945         mini-ops.h: alu membase optimizations.
12946
12947 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
12948
12949         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
12950         to speedup StringBuilder.
12951
12952 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
12953
12954         * dominators.c (mono_compute_natural_loops): Fix detection of
12955         loop body start blocks.
12956
12957         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
12958
12959 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
12960
12961         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
12962         #75145.
12963
12964 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
12965
12966         * aliasing.c: Fixed aliasing issue on 64 bit archs.
12967
12968 2006-01-25  Martin Baulig  <martin@ximian.com>
12969
12970         * debug-debugger.c: Moved the `MonoDebuggerManager' and
12971         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
12972         started to cleanup this file a little bit.
12973
12974 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
12975
12976         * mini.c: optimize a codepath frequently happening in generics code.
12977
12978 2006-01-23  Martin Baulig  <martin@ximian.com>
12979
12980         * Makefile.am: Only compile debug-debugger.c on supported platforms.
12981
12982         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
12983         functions directly.
12984
12985         * driver.c: debug-debugger.c is only available if
12986         `MONO_DEBUGGER_SUPPORTED' is defined.   
12987
12988 2006-01-23  Martin Baulig  <martin@ximian.com>
12989
12990         * debug-debugger.c: Only enable this on platforms where the Mono
12991         Debugger is working (x86 and x86_64).
12992
12993 2006-01-21  Martin Baulig  <martin@ximian.com>
12994
12995         The Mono Debugger is now using the normal `mono' instead of the
12996         `mono-debugger-mini-wrapper' when executing managed code.
12997
12998         * debug-debugger.c: New file; previously known as
12999         debugger/wrapper/wrapper.c.
13000
13001         * debug-mini.c (mono_init_debugger): Removed.
13002
13003         * driver.c (mono_main): Added new `--inside-mdb' command line
13004         argument which is used when running inside the debugger.
13005
13006 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
13007
13008         * liveness.c (mono_analyze_liveness): Remove some unused data
13009         structures.
13010
13011 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
13012
13013         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
13014
13015 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
13016
13017         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
13018         depends on implementation details of monobitset.
13019
13020         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
13021         Fixes #77271.
13022
13023 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
13024
13025         * liveness.c: Update after monobitset changes.
13026
13027 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
13028
13029         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
13030
13031 2006-01-11 Neale Ferguson <neale@sinenomine.net>
13032
13033         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
13034
13035         * mini-s390x.c: Remove warning messages.
13036
13037 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
13038
13039         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
13040
13041 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
13042
13043         * generics.2.cs: Add ldelem/stelem_any test.
13044
13045 2006-01-10 Neale Ferguson <neale@sinenomine.net>
13046
13047         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
13048
13049 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
13050
13051         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
13052         
13053 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
13054
13055         * generics.2.cs: Reenable vtype tests.
13056
13057         * inssel-x86.brg: Remove an icorrect valuetype rule.
13058
13059 2006-01-06 Neale Ferguson <neale@sinenomine.net>
13060
13061         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
13062         initial support for OP_ABS.
13063
13064 2006-01-05 Neale Ferguson <neale@sinenomine.net>
13065
13066         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
13067
13068 2006-01-05 Neale Ferguson <neale@sinenomine.net>
13069
13070         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
13071         conversion and implement LADD/LSUB.
13072
13073         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
13074         architectures.
13075
13076 2006-01-05 Neale Ferguson <neale@sinenomine.net>
13077
13078         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
13079
13080         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
13081         architectures.
13082
13083 2006-01-05 Neale Ferguson <neale@sinenomine.net>
13084
13085         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
13086         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
13087         (stack walk problem).
13088
13089 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
13090
13091         * aot.c (mono_aot_load_method): Fix a warning.
13092
13093 2006-01-03  Neale Ferguson <neale@sinenomine.net>
13094
13095         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
13096
13097 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
13098
13099         * iltests.il: Add test for #77148.
13100
13101         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
13102         #77148.
13103
13104 2006-01-03  Neale Ferguson <neale@sinenomine.net>
13105
13106         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
13107
13108 2006-01-03  Neale Ferguson <neale@sinenomine.net>
13109
13110         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
13111         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
13112
13113         * basic-long.cs: Add lconv-to-r4/r8 tests.
13114
13115 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
13116
13117         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
13118
13119         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
13120         here as on other archs.
13121
13122 2005-12-29 Neale Ferguson <neale@sinenomine.net>
13123
13124         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
13125
13126 2005-12-29 Neale Ferguson <neale@sinenomine.net>
13127
13128         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
13129         
13130         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
13131
13132         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
13133         instrument_prolog; Add memory_barrier instruction.
13134
13135 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
13136
13137         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
13138
13139 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
13140
13141         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
13142
13143         * aliasing.c inssel.brg: Fix warnings.
13144
13145         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
13146         could skip initialization of some parts of memory.
13147
13148         * mini.c mini-ia64.c: Fix warnings.
13149
13150         * inssel-sparc.brg: Add an implementation of lneg which actually works.
13151
13152 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
13153
13154         * aliasing.c (mono_build_aliasing_information): Add a workaround for
13155         a crash seen on sparc.
13156
13157         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
13158         
13159         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
13160
13161 2005-12-21 Neale Ferguson <neale@sinenomine.net>
13162
13163         * mini-ops.h: Add s390_backchain instruction
13164
13165         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
13166
13167         * cpu-s390.md: Add s390_backchain instruction
13168
13169         * mini-s390.c: Significant ABI changes
13170
13171         * mini-s390.h: Cater for zero length structures
13172
13173 2005-12-20 Neale Ferguson <neale@sinenomine.net>
13174
13175         * mini-s390.c: ABI fixes
13176
13177         * inssel-s390.brg: Remove debug statements
13178
13179         * cpu-s390.md: Fix length of ATOMIC_xx operations
13180
13181 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
13182
13183         * basic-float.cs: Add float<->long conversion tests.
13184
13185 2005-12-16 Neale Ferguson <neale@sinenomine.net>
13186
13187         * mini-s390.c: Fix LOCALLOC processing.
13188
13189         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
13190
13191 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
13192
13193         * iltests.il: Add tests for some opcodes not covered by the other
13194         tests.
13195
13196 2005-12-15 Neale Ferguson <neale@sinenomine.net>
13197
13198         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
13199         register loading for Tail processing; Correct trace output.
13200
13201         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
13202
13203         * cpu-s390.md: Correct size of jmp instruction. 
13204
13205 2005-12-13 Neale Ferguson <neale@sinenomine.net>
13206
13207         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
13208
13209 2005-12-13 Neale Ferguson <neale@sinenomine.net>
13210
13211         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
13212           Bring s390 up to current level.
13213
13214 2005-12-12  Zltan Varga  <vargaz@gmail.com>
13215
13216         * generics.2.cs: Disable the newly added tests as they do not work yet.
13217         
13218         * generics.2.cs: Add valuetype tests.
13219
13220 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
13221
13222         * basic-long.cs: Add i4->u8 test.
13223
13224         * objects.cs: Add tests for JIT intrinsic.
13225
13226         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
13227         optimizations lost by a mistake.
13228
13229 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
13230
13231         * basic-long.cs: Remove a test moved to objects.cs.
13232
13233         * arrays.cs: Add more array tests.
13234
13235 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
13236
13237         * arrays.cs: Add new tests for multi-dimensional arrays.
13238
13239 2005-12-06  Raja R Harinath  <rharinath@novell.com>
13240
13241         * Makefile.am (test_sources2): Add generics.2.cs.
13242         (EXTRA_DIST): Add test_sources2.
13243
13244 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
13245
13246         Support for boxing and unboxing nullable types as well as the
13247         isinst operation on nullables, per the CLI ammendment.
13248
13249         * inssel.brg (CEE_ISINST): Special case for nullable
13250
13251         * mini.c (handle_unbox_nullable): new method
13252         (handle_box): Special case for nullable types
13253         (mono_method_to_ir): Call handle_unbox_nullable in correct
13254         places.
13255
13256         * generics.2.cs: New test suite
13257
13258         * Makefile.am: Support for regression tests with generics.
13259
13260 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
13261
13262         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
13263         allocated to registers. Fixes #76800.
13264
13265 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
13266
13267         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
13268
13269 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
13270
13271         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
13272         of platforms.
13273
13274 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
13275
13276         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
13277         objects.cs.
13278
13279         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
13280         
13281         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
13282 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
13283
13284         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
13285         single precision before storing to a single precision location.
13286
13287 2005-11-28  Raja R Harinath  <rharinath@novell.com>
13288
13289         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
13290
13291 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
13292
13293         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
13294         correct files.
13295
13296         * basic.cs: Remove test_0_byte_compares test which was moved to
13297         objects.cs a long time ago.
13298
13299 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
13300
13301         * aliasing.c: Fixed aliasing issue on 64 bit archs.
13302
13303 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
13304
13305         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
13306         handlers are called.
13307
13308         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
13309         throwing code.
13310
13311          * mini-ia64.c: Add support for the throw->branch exception 
13312         optimization.   
13313
13314         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
13315
13316 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
13317
13318         * mini.c: Enabled "fastpath" deadce :-)
13319         
13320 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
13321
13322         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
13323         alias analysis pass to support it.
13324         * mini.h: Likewise.
13325         * ssa.c: Likewise.
13326         * liveness.c: Likewise (liveness computation can use aliasing
13327         information to be more accurate).
13328         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
13329         moreover made so that "--compile-all" uses the given optimization
13330         flags and not the default ones.
13331         * aliasing.c: Alias analysis (new file).
13332         * aliasing.h: Likewise.
13333         * Makefile.am: added "aliasing.c" and "aliasing.h".
13334         
13335 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
13336
13337         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
13338         OP_L opcodes.
13339
13340 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
13341
13342         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
13343         fp >= end_of_stack exit condition, as it is not needed, and it might
13344         become true for fp eliminated frames.
13345
13346 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
13347
13348         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
13349         coded offsets.
13350
13351 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
13352
13353         * mini-arm.c: fixed alignment of doubles/longs to match
13354         the C ABI (bug #76635).
13355
13356 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
13357
13358         * aot.c: fix compilation with --enable-minimal=aot.
13359
13360 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
13361
13362         * mini-arm.c: fixed compatibility with the new
13363         floating point emulator package for compares.
13364
13365 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
13366
13367         * mini.c : reverted sig->pinvoke changes (r51396-51397).
13368
13369 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
13370
13371         * mini-exceptions.c (print_stack_frame): Output to stderr.
13372         (mono_handle_native_sigsegv): Ditto.
13373
13374 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
13375
13376         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
13377         OP_LCONV_TO_OVF_I implementation.
13378
13379         * mini-amd64.c: Add support for the throw->branch exception 
13380         optimization.
13381
13382         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
13383         when the catch clause catches a more general exception, i.e. Object.
13384
13385 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
13386
13387         * cpu-ia64.md: Remove unused opcodes.
13388
13389         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
13390         specific defines for architectures defining USE_SIGACTION.
13391
13392         * mini-ia64.c: Fix some warnings.
13393
13394         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
13395         version seemed to skip a frame.
13396
13397 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
13398
13399         * mini.c: Clean up the usage of sig->pinvoke flag. Now
13400         only calls which are made to native code use this flag.
13401
13402 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
13403
13404         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
13405         varargs methods as well.
13406         
13407         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
13408         which have save_lmf set. Reorganize methods prologs a bit.
13409
13410         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
13411         debugger to the proper place.
13412
13413 2005-10-29  Martin Baulig  <martin@ximian.com>
13414
13415         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
13416         when running inside the debugger until the debugger has support
13417         for it.
13418
13419 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
13420
13421         * mini.h: Fix a warning.
13422
13423 2005-10-24  Miguel de Icaza  <miguel@novell.com>
13424
13425         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
13426         we expose publicly, this returns the string.
13427
13428 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
13429
13430         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
13431         with fp elimination.
13432
13433 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
13434
13435         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
13436         native stacktrace using the glibc 'backtrace' function if available.
13437
13438 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
13439
13440         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
13441
13442         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
13443         handle SIGSEGVs received while in native code.
13444
13445         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
13446         code, call mono_handle_native_sigsegv which will abort the runtime
13447         after printing some diagnostics, instead of converting it into a
13448         confusing NullReferenceException.
13449
13450 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
13451
13452         * cpu-pentium.md: Remove unused opcodes.
13453
13454 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
13455
13456         * mini-amd64.h (MonoLMF): Add rsp field.
13457
13458         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
13459         the lmf too.
13460
13461 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
13462
13463         * mini-codegen.c (get_register_spilling): Fix some warnings.
13464
13465 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
13466
13467         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
13468         elimination during exception handling. Enable fp elimination by
13469         default.
13470
13471         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
13472         elimination.
13473
13474 2005-10-16  Martin Baulig  <martin@ximian.com>
13475
13476         * mini-exceptions.c
13477         (mono_debugger_run_finally): New public method for the debugger.
13478
13479 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
13480
13481         * debug-mini.c (mono_debug_init_method): Fix warning.
13482
13483         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
13484         the 'exname' parameter const to fix some warnings.
13485
13486 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
13487
13488         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
13489         introduced by the previous patch.
13490
13491 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
13492
13493         * basic-float.cs: Add test for precision of float arithmetic.
13494
13495         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
13496         when loading/storing single values from/to memory.
13497
13498         * mini.c (mono_jit_compile_method_with_opt): Create the function
13499         pointers in the correct domain.
13500
13501 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
13502
13503         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
13504         introduced by previous patch.
13505         
13506         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
13507         when out_filter_idx is NULL.
13508
13509         * mini-exceptions.c: Don't run filter clauses twice during exception
13510         handling. Fixes #75755.
13511
13512 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
13513
13514         * aot.c: Add support for ldflda wrappers.
13515
13516         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
13517         #75902.
13518
13519 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
13520
13521         * mini.c, mini.h: do not consider exception handlers blocks when
13522         setting up interface variables.
13523
13524 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
13525
13526         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
13527
13528 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
13529
13530         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
13531         causes a regression.
13532
13533         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
13534
13535 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
13536
13537         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
13538         of the OP_P definitions.
13539
13540         * TODO: Add a proposal for dealing with the CEE/OP mess.
13541
13542         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
13543         optimizations from the x86 port.
13544
13545         * cpu-amd64.md: Ditto.
13546
13547         * basic.cs basic-long.cs: Add tests.
13548
13549 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
13550
13551         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
13552         Patrik Torstensson's implementation of my exception-handling
13553         optimization idea, when the exception object is not used
13554         (bug #62150).
13555
13556 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
13557
13558         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
13559         of the mul_imm optimizations from the old jit.
13560
13561 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
13562
13563         * mini.c, liveness.c: patch by Patrik Torstensson and
13564         Zoltan Varga to improve performance in methods with
13565         exception clauses.
13566
13567 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
13568
13569         * driver.c: Remove 'Globalization' entry from --version.
13570
13571 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
13572
13573         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
13574         there is a profiler interested in JIT events.
13575
13576         * aot.c: Load profile files produced by the AOT profiling module, and
13577         reorder methods based on the profiling info. Add a 'method_order' table
13578         to the AOT file to make mono_aot_find_jit_info work with the reordered
13579         methods.
13580
13581         * mini.h: Bump AOT file version info.
13582
13583 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
13584
13585         * mini-arm.h: work around what looks like a gcc bug when optimizations
13586         are enabled.
13587
13588 2005-09-28  Raja R Harinath  <rharinath@novell.com>
13589
13590         * Makefile.am (AM_CFLAGS): Don't use += to append inside
13591         conditionals.  Use ...
13592         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
13593
13594 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
13595
13596         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
13597         to determine the amount of memory to copy when passing valuetypes.
13598
13599         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
13600         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
13601
13602 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
13603
13604         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
13605         information about aot.
13606
13607 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
13608
13609         * *.c: Replace the use of {Enter,Leave}CriticalSection with
13610         macros. This will allow a deadlock debugger to easily be plugged
13611         in.
13612
13613 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
13614
13615         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
13616
13617 2005-09-27  Raja R Harinath  <rharinath@novell.com>
13618
13619         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
13620         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
13621         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
13622         ($(arch_built)) [CROSS_COMPILING]: Error out.
13623
13624 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
13625
13626         * aot.c: Add support for the no_special_static flag for classes.
13627
13628 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
13629
13630         * Reapply reverted patches.
13631
13632         * *: Revert r50174 as well.
13633
13634         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
13635
13636 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
13637
13638         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
13639
13640 2005-09-23  Miguel de Icaza  <miguel@novell.com>
13641
13642         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
13643         part of the SIG_HANDLER_SIGNATURE.  
13644
13645 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
13646
13647         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
13648         statistics.
13649
13650         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
13651         introduced by previous patch.
13652
13653 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
13654
13655         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
13656         saved registers too.
13657
13658         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
13659         upon the information returned by get_call_info ().
13660         
13661         * mini-x86.c (add_float): Fix stack size calculation.
13662         (mono_arch_call_opcode): Rewrite this so it works based up the
13663         information returned by get_call_info ().
13664         (mono_arch_get_this_vret_args): Ditto.
13665
13666 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
13667
13668         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
13669         in cinfo to determine the registers which need to be used.
13670
13671 2005-09-20  Miguel de Icaza  <miguel@novell.com>
13672
13673         * driver.c (mono_main): Add --server and --desktop flags. 
13674
13675 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
13676
13677         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
13678         registers as global registers.
13679
13680         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
13681         longer needed with the new register allocator.
13682
13683         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
13684
13685         * cpu-ia64.md: Remove unused opcodes.
13686         
13687         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
13688         
13689 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
13690
13691         * cpu-amd64.md: Remove unused opcodes.
13692
13693         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
13694         needed with the new register allocator.
13695
13696         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
13697         reg-reg moves.
13698
13699 2005-09-16  Raja R Harinath  <rharinath@novell.com>
13700
13701         * Makefile.am (check-local): Don't invoke semdel-wrapper.
13702
13703 2005-09-16  Martin Baulig  <martin@ximian.com>
13704
13705         * exceptions-amd64.c
13706         (throw_exception): Don't call mono_debugger_throw_exception() if
13707         we're a rethrow - see the FIXME in the code.
13708
13709 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
13710
13711         * mini.c (mono_init_exceptions): This only works on some architectures.
13712         
13713 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
13714
13715         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
13716         on ia64.
13717
13718         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
13719
13720         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
13721         now in mini-exceptions.c.
13722
13723 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
13724
13725         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
13726         now in mini-exceptions.c.
13727
13728 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
13729
13730         * exceptions-x86.c: Applied patch from Patrik Torstensson 
13731         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
13732
13733         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
13734         code into mini-exceptions.c. Add some assertions to it.
13735
13736 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
13737
13738         * aot.c (emit_section_change): Applied patch from "The Software Team" 
13739         (<software@solmersa.com>). Fix as errors on windows.
13740
13741 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
13742
13743         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
13744         method info into the LMF.
13745
13746 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
13747         
13748         * mini-ia64.c: Add proper unwind info for method epilogs.
13749
13750         * exceptions-ia64.c: Add some code to help debugging.
13751         
13752         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
13753
13754         * mini-exceptions.c: Fix warning.
13755
13756 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
13757
13758         * mini.c: Really fix build.
13759
13760         * mini-x86.c mini-amd64.c: Fix build.
13761
13762 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
13763
13764         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
13765
13766         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
13767         some Interlocked methods as intrinsics.
13768
13769         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
13770         for Thread methods as well.
13771
13772         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
13773
13774         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
13775
13776         * mini-ia64.c mini-x86.c mini-amd64.c 
13777         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
13778         OP_MEMORY_BARRIER.
13779         
13780         * mini.c (mono_init_exceptions): Fix build breakage.
13781
13782 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
13783
13784         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
13785         of instructions. Use the new ia64_unw_op macros for emitting unwind
13786         info.
13787
13788         * mini.c (mono_init_exceptions): Initialize exception handling
13789         related trampolines at startup.
13790
13791 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
13792
13793         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
13794
13795 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
13796
13797         * mini.c: Handle type loading errors gracefully during compilation and
13798         throw the appropriate exception.
13799
13800 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
13801
13802         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
13803         for the mono binary.
13804
13805 2005-09-09  Martin Baulig  <martin@ximian.com>
13806
13807         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
13808         the release.
13809
13810 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
13811
13812         * mini-arm.h: use emulation for conv.r.un for the release.
13813
13814 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
13815
13816         * mini-arm.c, objects.cs: more fixes and tests for them.
13817
13818 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
13819
13820         * mini-arm.c: align structures to at least 4 bytes to be able
13821         to keep our current optimized memcpy.
13822
13823 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
13824
13825         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
13826
13827 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13828
13829         * mini.c: ignore SIGPIPE.
13830
13831 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
13832
13833         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
13834
13835         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
13836
13837 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
13838
13839         * mini.h: Add prototype for mono_allocate_stack_slots_full.
13840
13841 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
13842
13843         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
13844         exception handling support.
13845         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
13846         patch by Brian Koropoff <briank@marakicorp.com>).
13847
13848 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
13849
13850         * mini.c: revert another 'optimization' which breaks when
13851         items on the eval stack need to be saved at a basic block end
13852         (bug #75940).
13853
13854 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
13855
13856         * jit-icalls.c: for arrays, ensure we always provide
13857         lower bounds.
13858
13859 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
13860
13861         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
13862         
13863         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
13864
13865 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
13866
13867         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
13868         arguments in their original register.
13869
13870 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
13871
13872         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
13873         memset/memcpy.
13874
13875         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
13876         when ssapre is enabled.
13877
13878         * inssel-long.brg: Fix bug in previous patch.
13879
13880         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
13881         multiplication by a constant.
13882
13883 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
13884
13885         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
13886         icc.
13887
13888         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
13889         saving registers.
13890
13891 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
13892
13893         * inssel-arm.brg: apply changes tested by Brian Koropoff
13894         <briank@marakicorp.com>.
13895
13896 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
13897
13898         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
13899         
13900 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
13901
13902         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
13903         to the same register if dreg is just a base register.
13904         (print_ins): Improve printing of membase opcodes.
13905
13906         * inssel-x86.brg: Add optimized ldind(reg) rules.
13907
13908         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
13909
13910 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
13911
13912         * mini.c: when running under valgrind, set the stack bottom for
13913         the GC at the actual approximate stack for the app (fixes running
13914         mono with valgrind).
13915
13916 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
13917
13918         * mini.c: do no break at the first valuetype to init found
13919         (fixes bug #75791).
13920
13921 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
13922
13923         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
13924
13925 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
13926
13927         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
13928
13929 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
13930
13931         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
13932
13933 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
13934
13935         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
13936
13937         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
13938         code.
13939
13940         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
13941         code.
13942
13943         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
13944         methods.
13945
13946 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
13947
13948         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
13949
13950 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
13951
13952         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
13953         in the tail recursion optimization.
13954
13955         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
13956         debug info into the assembly file.
13957
13958         * iltests.il: Add test for filter regions.
13959
13960         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
13961         initial stack of filter regions. Fixes #75755.
13962
13963 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
13964
13965         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
13966         stack requirements.
13967
13968 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
13969
13970         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
13971         the check for an already compiled method on non-ia64 platforms.
13972         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
13973         proper domain.
13974
13975         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
13976
13977         * inssel-x86.brg: Add some optimized call rules.
13978
13979 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
13980
13981         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
13982         method here.
13983
13984         * mini.h mini-trampolines.c: Pass the trampoline argument to 
13985         mono_arch_patch_delegate_trampoline.
13986
13987         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
13988
13989         * mini-trampolines.c: Fix build.
13990
13991         * mini-amd64.h: Add delegate trampolines.
13992
13993         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
13994
13995         * inssel-amd64.brg: Add optimized call rules.
13996         
13997         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
13998
13999         * inssel-ia64.brg: Add optimized ldind(reg) rules.
14000
14001 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
14002
14003         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
14004         change.
14005
14006         * mini-ia64.c: Remove LMF fixmes.
14007
14008         * mini-ia64.h: Remove most fields from LMF.
14009
14010         * inssel-ia64.brg (stmt): Fix unaligned access errors.
14011
14012         * mini-trampolines.c: Add support for IA64 function descriptors.
14013
14014         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
14015         for IA64 function descriptors.
14016
14017 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
14018
14019         * tramp-arm.c: patch the vtable for virtual calls. Added
14020         support code to register/unregister the LMF.
14021         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
14022         more LMF work.
14023
14024 2005-08-19  Dick Porter  <dick@ximian.com>
14025
14026         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
14027         bit value if needed.
14028
14029 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
14030
14031         * mini.c (mini_get_method): Move handling of wrapper data here.
14032
14033         * mini.c (mono_method_to_ir): Add support for dynamic methods.
14034
14035         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
14036         virtual.
14037
14038         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
14039         bblock->code does not remain empty.
14040
14041 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
14042
14043         * arrays.cs: Add regression test for #75832.
14044
14045         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
14046         rules. Fixes #75832.
14047
14048         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
14049         instruction scheduling.
14050
14051 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
14052
14053         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
14054
14055 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
14056
14057         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
14058
14059         * mini-codegen.c: Fix VC build.
14060
14061         * cpu-pentium.md: Increase length of atomic_exhange_i4.
14062
14063 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14064
14065         * mini.h: fix signature for mono_register_opcode_emulation.
14066
14067 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
14068
14069         * mini.c: Get rid of most of the helper_sig_... constants using
14070         mono_create_icall_signature ().
14071
14072 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
14073
14074         * jit-icalls.c (helper_ldstr): New helper function.
14075
14076         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
14077
14078         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
14079         throw, load the string using a helper call instead of creating a string object.
14080
14081         * aot.c: Update after LDSTR changes.
14082
14083         * mini.h: Bump AOT file version.
14084         
14085         * aot.c: Save class size info into the AOT file. Print more statistics during
14086         compilation.
14087
14088         * mini.h: Bump AOT file version.
14089
14090         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
14091         ordering of disasm cases. Fixes #74957.
14092
14093 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
14094
14095         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
14096         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
14097         the generic code needed for the ARM port.
14098
14099 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
14100
14101         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
14102         inssel-arm.brg: more ARM features and fixes.
14103
14104 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
14105
14106         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
14107         ARM port work in progress.
14108
14109 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
14110
14111         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
14112
14113         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
14114
14115         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
14116
14117         * inssel.brg (mini_emit_memset): Add support for unaligned access.
14118
14119         * *-ia64.*: Ongoing IA64 work.
14120         
14121         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
14122
14123 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
14124
14125         * TODO: Remove out-of-data todo stuff.
14126
14127         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
14128         dead code.
14129
14130         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
14131
14132         * mini.h: Bump corlib version.
14133
14134 2005-07-27  Martin Baulig  <martin@ximian.com>
14135
14136         * mini-codegen.c
14137         (create_copy_ins): Added `const unsigned char *ip' argument; set
14138         `copy->cil_code' from it.
14139
14140 2005-07-27  Martin Baulig  <martin@ximian.com>
14141
14142         * mini-exceptions.c (mono_handle_exception): Don't call
14143         mono_debugger_handle_exception() for filters.
14144
14145 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
14146
14147         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
14148         as well.
14149
14150 2005-07-26  Martin Baulig  <martin@ximian.com>
14151
14152         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
14153
14154         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
14155         helper_compile_generic_method() if the method is actually virtual
14156         and non-final.
14157
14158 2005-07-26  Martin Baulig  <martin@ximian.com>
14159
14160         * mini.c
14161         (trampoline_code): Renamed to `mono_trampoline_code' and made it
14162         public; this is now accessed directly by the debugger.
14163         (mono_generic_trampoline_code): Removed.
14164
14165         * debug-mini.c
14166         (mono_debug_init_method): Also add interncalls and wrappers.
14167
14168 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
14169
14170         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
14171
14172 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
14173
14174         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
14175
14176 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
14177
14178         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
14179
14180 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
14181
14182         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
14183         getting TLS offsets on AMD64 too.
14184
14185 2005-07-20  Kornel Pal <kornelpal@hotmail.com>
14186
14187         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
14188
14189 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
14190
14191         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
14192         inssel-arm.brg, mini-arm.h: ARM port work in progress.
14193
14194 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
14195
14196         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
14197
14198         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
14199         to mini.c.
14200
14201         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
14202         mono_sparc_is_virtual_call ().
14203         
14204         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
14205
14206         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
14207         trampoline parameters.
14208
14209         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
14210         
14211         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
14212         to mono_arch_get_vcall_slot_addr.
14213
14214         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
14215         trampoline code.
14216
14217         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
14218
14219 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
14220
14221         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
14222
14223 2005-07-19  Martin Baulig  <martin@ximian.com>
14224
14225         * exceptions-amd64.c (throw_exception): Call
14226         mono_debugger_throw_exception() here like we're doing it on i386.
14227
14228 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
14229
14230         * mini-ia64.c: Add optimized TLS access support.
14231
14232 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
14233
14234         * mini-exceptions.c: Ongoing IA64 work.
14235
14236         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
14237
14238         * mini.c: Use the default optimization set when embedding. Fixes
14239         #75194.
14240
14241 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
14242
14243         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
14244         of trampolines to a separate file.
14245
14246         * mini-trampolines.c: New file.
14247
14248         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
14249         separate file.
14250         
14251         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
14252         amd64/ia64 code.
14253
14254         * mini-codegen.c: Fix cygwin build.
14255
14256 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
14257
14258         * mini.c: Add some minor changes needed by the IA64 port.
14259
14260         * *-ia64.*: Ongoing IA64 work.
14261
14262 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
14263
14264         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
14265         trampolines into arch-independent and arch-dependent parts.
14266
14267         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
14268
14269 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
14270
14271         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
14272
14273         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
14274         the xp-regalloc-branch for amd64.
14275
14276         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
14277         xp-regalloc-branch for x86.
14278
14279 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
14280
14281         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
14282
14283 2005-07-06  Martin Baulig  <martin@ximian.com>
14284
14285         * mini.c
14286         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
14287         (mono_jit_runtime_invoke): Likewise.
14288
14289 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
14290
14291         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
14292         on x86 too.
14293         
14294         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
14295         without loading their metadata. Reorganize the file format so exception handling+
14296         debug info is kept separate from normal method info. Create MonoJitInfo 
14297         structures for methods lazily.
14298
14299         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
14300         loading metadata.
14301         (x86_class_init_trampoline): Patch AOT class init trampolines too.
14302
14303         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
14304
14305         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
14306         in AOT code.
14307
14308         * mini.h: Bump AOT file version.
14309
14310 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
14311
14312         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
14313
14314 2005-07-01  Raja R Harinath  <rharinath@novell.com>
14315
14316         * Makefile.am (check-local): Call semdel-wrapper.
14317
14318 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
14319
14320         * mini-x86.c: Revert the last change as it seems to break the build..
14321
14322 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
14323
14324         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
14325         
14326         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
14327
14328 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
14329
14330         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
14331         outside of the macro, so strange stuff doesn't happen with gcc4
14332         (NEW_AOTCONST_TOKEN): Likewise.
14333
14334 2005-06-28  Martin Baulig  <martin@ximian.com>
14335
14336         * mini.c (mini_class_is_system_array): New static method; use this
14337         instead of `klass->parent == mono_defaults.array_class' everywhere
14338         since this also works for the new generic array class.
14339
14340 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
14341
14342         * inssel.brg: Remove warnings.
14343
14344 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
14345
14346         * mini-ia64.c: Ongoing IA64 work.
14347
14348         * basic-float.cs: Add float->i1 conversion test.
14349
14350         * iltests.il: Add conv.u4 test.
14351
14352 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
14353
14354         * inssel-long.brg: Fix bug caused by last change.
14355
14356 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
14357
14358         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
14359         BSDs.  Allows the x86 JIT to work on OSX86
14360
14361 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
14362
14363         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
14364         u4->i8 conversion.
14365
14366         * mini-ia64.c: Ongoing IA64 work.
14367
14368 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
14369
14370         * mini-ia64.c: Ongoing IA64 work.
14371
14372         * driver.c: Clean up jit_code_hash as well when using --regression.
14373
14374         * inssel-long.brg: Fix long->i4/u4 conversion rules.
14375
14376         * basic-long.cs: Add tests for long->u4 conversion.
14377
14378 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
14379
14380         * mini.c: Take mono_get_domainvar out of macros. This makes sure
14381         that we do not depend on undefined C behavior: the order stuff
14382         gets evaluated within an expression. Fixes mono when compiled on
14383         GCC 4.
14384
14385 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
14386
14387         * *-ia64.*: Ongoing IA64 work.
14388
14389         * aot.c: Lower memory usage while loading AOT methods.
14390
14391         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
14392
14393         * mini.h: Bump AOT file format version.
14394
14395 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
14396
14397         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
14398
14399 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
14400
14401         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
14402         not on callee assembly). Fixed some comments.
14403
14404 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
14405
14406         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
14407         it gets proper disassembly.
14408         (emit_method_info): Remove some dead code.
14409
14410         * mini.c (mini_method_compile): Allways allocate the GOT var in
14411         mono_method_to_ir for emulating opcodes.
14412
14413 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
14414
14415         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
14416         before freeing the code memory. Fixes #74990.
14417
14418         * objects.cs: Add regression test for #74992.
14419
14420         * liveness.c: Extend live ranges of arguments to the beginning of the
14421         method. Fixes #74992.
14422
14423         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
14424         so it points into the faulting instruction.
14425
14426 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
14427
14428         * jit-icalls.c (mono_imul_ovf): Add exception handling.
14429
14430         * *-ia64.*: Ongoing IA64 work.
14431
14432         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
14433
14434 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
14435
14436         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
14437
14438         * *-ia64.*: Ongoing IA64 work.
14439
14440 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
14441
14442         * basic-long.cs: Add tests for add/sub.ovf.
14443
14444         * basic.cs: Add tests for sub.ovf.
14445
14446         * *-ia64.*: Ongoing IA64 work.
14447
14448 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
14449
14450         * *-ia64.*: Ongoing IA64 work.
14451
14452         * basic.cs: Add conv.ovf.i4.un test.
14453
14454 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
14455
14456         * mini.c: (remove_block_if_useless) Fixed bug 75061.
14457         
14458 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14459
14460         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
14461
14462 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
14463
14464         * *-ia64.*: Ongoing IA64 work.
14465
14466 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14467
14468         * trace.[ch]:
14469         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
14470
14471 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
14472
14473         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
14474
14475 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
14476
14477         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
14478
14479         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
14480         of a call is callable by a near call.
14481
14482 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
14483
14484         * mini-ia64.c: Ongoing IA64 work.
14485
14486 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
14487
14488         * genmdesc.c: Make the generated array non-static.
14489
14490         * inssel-long.brg: Fix LSHR_IMM rule.
14491
14492         * *-ia64.*: Ongoing IA64 work.
14493
14494         * *-ia64.*: Ongoing IA64 work.
14495
14496 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
14497
14498         * *-ia64.*: Ongoing IA64 work.
14499
14500         * *-ia64.*: Ongoing IA64 work.
14501         
14502         * mini-ia64.c: Ongoing IA64 work.
14503
14504         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
14505
14506 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
14507
14508         * objects.cs basic-calls.cs: Move some tests to objects.cs.
14509         
14510         * objects.cs basic-long.cs: Move some tests to objects.cs.
14511
14512 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
14513
14514         * *-ia64.*: Ongoing IA64 work.
14515
14516         * iltests.il: Add a new test.
14517
14518         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
14519         newobj. Fixes #75042.
14520
14521 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
14522
14523         * *-ia64.*: Ongoing IA64 work.
14524         
14525         * *-ia64.*: Ongoing IA64 work.
14526         
14527         * *-ia64.*: Ongoing IA64 work.
14528
14529         * basic.cs objects.cs: Move tests accessing static variables as well.
14530
14531         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
14532
14533 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
14534
14535         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
14536
14537         * driver.c: Always print failed tests.
14538
14539         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
14540         frame pointer.
14541
14542         * *ia64*: Ongoing IA64 work.
14543
14544 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
14545
14546         * basic.cs: Add tests for add.ovf. Fix warnings.
14547
14548 2005-05-18  Miguel de Icaza  <miguel@novell.com>
14549
14550         * driver.c (mono_main): Avoid crash if no argument is passed to
14551         --break;  Do not use g_error, but f_printf.   And fix all other
14552         ocurrences of the same crash.
14553
14554 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
14555
14556         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
14557         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
14558         Fixes #74742.
14559
14560 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
14561
14562         * *-ia64.*: Add beginnings of IA64 backend.
14563
14564         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
14565
14566 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
14567
14568         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
14569         Fixes #74925.
14570
14571         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
14572
14573         * mini-amd64.c: Fix a warning.
14574
14575 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
14576
14577         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
14578         in float_neg. Fixes #74897.
14579
14580         * mini-amd64.c (emit_call): Fix another near call bug.
14581
14582 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
14583
14584         * declsec.c: Keep the appdomain information in the structure. Added a 
14585         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
14586         value gets overwritten).
14587         * declsec.h: Set the default MonoArray for the the stack to 6. Added
14588         an MonoAppDomain member to MonoSecurityFrame.
14589         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
14590         used in the stack walk. Now use a MonoArray which grow (double) when
14591         it gets full.
14592
14593 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
14594
14595         * mini.c: Re-enabled runtime cleanup, since running threads should
14596         now properly stop when exiting.
14597
14598 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
14599
14600         * mini-codegen.c: New file contaning the arch-independent local
14601         register allocator. Not used by any architectures yet.
14602
14603         * mini.h linear-scan.c: Merge some changes from the 
14604         mini-xp-local-regalloc branch.
14605
14606 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
14607
14608         * mini-amd64.c (emit_call): Fix calls to native functions when the
14609         runtime is compiled as a shared library. Fixes #74756.
14610
14611         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
14612         on a literal field. Fixes #74751.
14613
14614 2005-04-25  Raja R Harinath  <rharinath@novell.com>
14615
14616         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
14617
14618 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
14619
14620         * objects.cs: Add missing null casting test.
14621
14622 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
14623
14624         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
14625         in wrapper methods. Also rename 'address' variable to 'offset'.
14626
14627 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
14628
14629         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
14630         warnings.
14631         
14632         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
14633
14634         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
14635         work on windows.
14636
14637 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
14638
14639         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
14640
14641 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
14642
14643         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
14644         just the last bytes.
14645
14646 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
14647
14648         * aot.c (mono_compile_assembly): Fix warning.
14649
14650         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
14651         by the _MSC_VER stuff.
14652
14653 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
14654
14655         * inssel-long.brg: Fix #74588.
14656
14657         * cpu-amd64.md: Fix #74591.
14658
14659         * iltests.il: Add new regression tests.
14660
14661 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
14662
14663         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
14664         valuetype.
14665
14666 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
14667
14668         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
14669
14670         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
14671         from Bill Middleton <flashdict@gmail.com>.
14672
14673 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
14674
14675         * arrays.cs: Add new regression test. Fix warnings.
14676
14677 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
14678
14679         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
14680         and leakage in CKFINITE.
14681
14682         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
14683         this to a null op since it is called on amd64 too.
14684
14685         * exceptions-amd64.c (get_throw_trampoline): Align stack.
14686
14687         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
14688         body since this is not used on amd64.
14689         
14690         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
14691
14692         * mini-amd64.c: Remove obsolete fixmes.
14693
14694         * mini.c (print_method_from_ip): Fix debugging support.
14695
14696 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
14697
14698         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
14699         so that expressions that don't give much gain are not reduced.
14700         * ssapre.h: Likewise.
14701
14702 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
14703
14704         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
14705
14706         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
14707
14708         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
14709
14710 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
14711
14712         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
14713
14714         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
14715
14716 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
14717
14718         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
14719         stack touching.
14720
14721         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
14722
14723         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
14724
14725         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
14726
14727         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
14728         MONO_ARCH_USE_SIGACTION. Fixes #74252.
14729
14730         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
14731
14732         * mini-x86.c: Fix up stack overflow handling.   
14733
14734         * exceptions.cs: Add new regression test.
14735
14736 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
14737
14738         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
14739         mono_jit_thread_attach.
14740
14741         * mini.c (mono_method_to_ir): Verify called method is not abstract.
14742
14743 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
14744
14745         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
14746         avoid calling constructors using callvirt.
14747
14748         * inssel.brg: Fix #74073.
14749
14750 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
14751
14752         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
14753         compilation with non-GCC compilers.
14754         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
14755         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
14756
14757 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
14758
14759         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
14760         klass->interface_offsets (will likely fix bug#74073).
14761
14762 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
14763
14764         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
14765
14766 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
14767
14768         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
14769         to amd64_div_reg_size ().
14770         
14771         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
14772
14773 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
14774
14775         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
14776
14777 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
14778
14779         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
14780
14781 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
14782
14783         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
14784         
14785         * mini.c (mono_precompile_assembly): Load and precompile referenced
14786         assemblies as well. Fixes #74015.
14787
14788 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
14789
14790         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
14791
14792 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
14793
14794         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
14795         a lot of checks and (anyway) permissions cannot work until corlib is 
14796         loaded.
14797
14798 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
14799
14800         * mini-ppc.c: fixed ABI issue on sysv/ppc.
14801
14802 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
14803
14804         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
14805         calls (fixes bug#72824).
14806
14807 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
14808
14809         * mini.c: fix tail recursion elimination (see test in bug#73936).
14810
14811 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
14812
14813         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
14814         some fp functions in sse2 mode.
14815
14816 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
14817
14818         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
14819
14820 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
14821
14822         * mini.h mini.c: Add mono_get_jit_tls_key ().
14823
14824         * mini-x86.c: Enable fast TLS support on windows.
14825
14826 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
14827
14828         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
14829         * mini.c: Check for p/invoke method when generating code. If a
14830         p/invoke method, or it's class, isn't decorated with [Suppress
14831         UnmanagedCodeSecurity] then generate code to call System.Security.
14832         UnmanagedDemand (only if the security manager is active).
14833
14834 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
14835
14836         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
14837         last change as it seems to cause strange crashes.
14838         
14839 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
14840
14841         * *.c: handle unsafe function pointers where needed.
14842
14843 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
14844
14845         * mini.c (mono_jit_free_method): Remove the fixme too.
14846
14847 2005-03-15  Miguel de Icaza  <miguel@novell.com>
14848
14849         * mini.c: As discussed, make the code actually free the delegate
14850         thunk now, to enable the debugging of delegate problems, use
14851         MONO_DEBUG=1 when running Mono. 
14852
14853         This takes also care of parts of the leaks as seen by Joe.
14854
14855 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
14856
14857         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
14858         thread_tls_offset calculation.
14859
14860 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
14861
14862         * declsec.c: Reworked linkdemand checks for icall. The previous code
14863         was using the declaration code (untrusted) and didn't work as expected
14864         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
14865         specific case.
14866
14867 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
14868
14869         * iltests.il: Add new localloc test.
14870
14871         * mini-amd64.c: Handle large stack allocations the same way as on
14872         windows if stack overflow handling is working.
14873         
14874         * mini-amd64.c: Allocate the signal stack using mmap.
14875
14876         * mini.c (sigsegv_signal_handler): Fix reading of context.
14877
14878         * mini-exceptions.c: Fix up stack overflow handling.
14879
14880         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
14881
14882         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
14883
14884         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
14885
14886         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
14887
14888         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
14889         tramp_init functions as they are no longer needed.
14890
14891 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
14892
14893         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
14894         
14895         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
14896
14897         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
14898         
14899         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
14900         support that now.
14901
14902         * mini-ops.h: Add OP_LMUL_IMM.
14903
14904         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
14905         long mul/div opcodes as intrinsic.
14906
14907         * mini-amd64.c (emit_call): Handle the case when the callee might be
14908         an AOT method.
14909
14910 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
14911
14912         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
14913         extra safe.
14914         
14915         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
14916
14917         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
14918
14919 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
14920
14921         * mini.c (mono_codegen): Don't leak here, to help people running
14922         monogrind.
14923
14924 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
14925
14926         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
14927         conversions in sse2 mode.
14928
14929         * basic-float.cs: Add regression test.
14930         
14931         * mini-amd64.c: Reenable sse2.
14932
14933 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
14934
14935         * mini-amd64.c: Disable sse2 until some regressions are fixed.
14936
14937 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
14938
14939         * driver.c: Copyright text should include 2005.
14940         
14941 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
14942
14943         * cpu-amd64.md (load_membase): Fix more max lengths.
14944
14945 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
14946
14947         * cpu-amd64.md (load_membase): Fix max length.
14948
14949         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
14950
14951         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
14952
14953         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
14954         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
14955
14956         * basic-float.cs: Add rounding regression test.
14957
14958         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
14959
14960 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
14961
14962         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
14963         structures in registers for pinvoke wrappers.
14964
14965 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
14966
14967         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
14968
14969 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
14970
14971         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
14972         wrapper to mono_jit_thread_attach.
14973
14974         * mini.c (mini_jit_thread_attach): New jit icall.
14975
14976         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
14977         native->managed wrappers.
14978
14979         * exceptions.cs: Add new regression test.
14980
14981         * mini.c (optimize_branches): Check regions in the cbranch to throw
14982         block case as well. Fixes #73242.
14983
14984 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
14985
14986         * mini.c: thread safety fixes.
14987
14988 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
14989
14990         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
14991         patching stuff, since delegates use jump trampolines so there is
14992         no caller.
14993
14994         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
14995         jump trampolines.
14996         
14997         * tramp-amd64.c: Fix build.
14998
14999         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
15000         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
15001
15002         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
15003         Rename this to mono_arch....
15004         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
15005
15006         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
15007
15008         * mini-amd64.c (emit_call): If both the caller and the callee is
15009         guaranteed to have 32 bit addresses, emit a normal call.
15010
15011         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
15012
15013         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
15014         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
15015         method_ptr inside delegates.
15016
15017 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
15018
15019         * mini.c (mono_jit_free_method): Free the method info even if the native code is
15020         invalidated. Fixes #73001.
15021
15022         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
15023
15024         * mini-x86.c: Only use stdcall for pinvokes on windows.
15025
15026 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
15027
15028         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
15029         * mini-x86.c: remove unreliable __thread var offset detection,
15030         use the correct accessors and enable by default.
15031
15032 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
15033
15034         * mini.c (mono_jit_free_method): Fix memory leak.
15035
15036 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
15037
15038         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
15039
15040 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
15041
15042         * cpu-amd64.md: Fix lengths of atomic opcodes.
15043
15044 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
15045
15046         * driver.c: try to not imply using ICU is any good.
15047
15048 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
15049
15050         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
15051         functions as inline ops.
15052
15053         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
15054         some Interlocked functions as inline ops.
15055
15056         * mini.c (move_basic_block_to_end): Fix bug in last patch.
15057
15058         * mini.h (MonoBasicBlock): Reorganize fields a bit.
15059
15060         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
15061
15062         * mini.c: Add support for OP_NOT_TAKEN.
15063
15064         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
15065         structures in registers for pinvoke wrappers.
15066
15067         * mini-amd64.c: Fix warnings.
15068
15069 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
15070
15071         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
15072
15073         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
15074
15075         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
15076         address instead of loading the address from it.
15077
15078         * mini-x86.c: Add support for returning small structs in registers
15079         on Win32. Fixes part of #70864.
15080         
15081 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
15082
15083         * trace.c (get_token): Improve error checking.
15084
15085 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
15086
15087         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
15088
15089 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
15090  
15091         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
15092         it can be reused for MonoClass.
15093         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
15094         _LINKDEMAND.
15095
15096 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
15097
15098         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
15099         instead of a MonoReflectionMethod. The method information wasn't used
15100         when displaying SecurityException details (but will be now).
15101
15102 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
15103
15104         * Makefile.am : windows build fix.
15105
15106 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
15107
15108         * iltests.il: Add new regression test.
15109
15110         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
15111         #72522.
15112
15113 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
15114  
15115         * mini.c: Moved linkdemand check into helper function check_linkdemand
15116         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
15117         LDFTN, LDVIRTFTN).
15118
15119 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
15120
15121         * declsec.c: Added statistics counter for different kinds of 
15122         LinkDemands.
15123         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
15124         (and commented) declaration.
15125         * mini.c: Added statistics counter for security Demand code 
15126         generation. Added display of security statistics.
15127
15128 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
15129
15130         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
15131         Fix compilation errors under gcc-2.95.
15132
15133 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
15134
15135         * mini.c, driver.c: Use the new jit trampoline hashtable
15136
15137 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
15138
15139         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
15140
15141 2005-02-11  Martin Baulig  <martin@ximian.com>
15142
15143         * debug-mini.c (mono_debug_close_method): Free the line number array.
15144
15145 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
15146
15147         * aot.c: Break up large methods into smaller ones. Share GOT slots for
15148         icalls.
15149
15150         * mini.h: Bump AOT file format version. 
15151
15152 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
15153
15154         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
15155         APTC and P/Invoke.
15156         * declsec.h: Added macros to get/set lazyly initialized security 
15157         informations about assemblies. Added new enum for different type of
15158         possible LinkDemand violation. Added function to check LinkDemands.
15159         * mini.h: Added a field to MonoCompile to hold any security violation
15160         detected when JITting a method (so it can be thrown later).
15161         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
15162         and CEE_CALLVIRT. Added code to throw exception at the end of
15163         mini_method_compile (note: the exception is unhandled right now).
15164
15165 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
15166
15167         * mini.c, jit-icalls.c: use the managed implementation of
15168         memset for initobj and memset, to avoid managed <-> unmanaged
15169         transitions.
15170
15171 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
15172
15173         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
15174         optimization if it would need a GOT var.
15175
15176         * basic.cs: Add tests for constant propagation and switch statements.
15177
15178         * ssa.c: Fix out-of-range constant propagation and switch statements.
15179
15180 2005-02-09    <vargaz@freemail.hu>
15181
15182         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
15183
15184 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
15185
15186         * cpu-amd64.md (load_membase): Fix max length of load_membase.
15187
15188 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
15189
15190         * mini.c: update to new signature of mono_class_get_allocation_ftn().
15191
15192 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
15193
15194         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
15195         arithmetic operations.
15196
15197 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
15198
15199         * mini-ppc.c: add a workaround for broken user code that
15200         DllImports vararg functions with non-vararg signatures.
15201
15202 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
15203
15204         * mini.c (mono_jit_compile_method_inner): Add detection and a 
15205         meaningfull error message for assemblies written in Managed C++.
15206
15207         * tramp-amd64.c mini-amd64.h: Add support for 
15208         create_trampoline_from_token ().
15209
15210         * aot.c mini-x86.c abcremoval.c: Applied patch from
15211         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
15212
15213 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
15214
15215         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
15216         which takes a MonoImage/token as parameter instead of a MonoMethod.
15217
15218         * aot.c: Use the new trampoline for initializing vtables.
15219
15220         * aot.c: Add support for ldfld/stfld_remote wrappers.
15221
15222         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
15223         rules for compare <MEM>, IMM.
15224
15225         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
15226
15227         * aot.c: Handle inherited finalizers correctly.
15228
15229 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
15230
15231         * inssel.brg (stmt): Add a missing _setup_... ().
15232
15233         * aot.c: Save some parts of the class state to the AOT file and use it
15234         to recompute that state when a class is initialized.
15235
15236         * mini.c: Install AOT hooks into the runtime.
15237
15238         * mini.h: Bump AOT file format version.
15239         
15240         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
15241         Fixes #72148.
15242
15243         * iltests.il: Add new test.
15244
15245 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
15246
15247         * mini.c: fix typo.
15248
15249 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
15250
15251         * mini.c: setup the statistical profiler in the thread attach
15252         callback to cope with the new single thread code.
15253
15254 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
15255
15256         * mini-ppc.c: ensure we have enough room for the profiler
15257         calls (fixed bug#72084).
15258
15259 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
15260
15261         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
15262         it.
15263
15264 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
15265
15266         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
15267
15268 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
15269
15270         * ssapre.c: Fixed an issue with down safety (this allows IronPython
15271         to succesfully execute parrotbench).
15272         * ssapre.h: Likewise.
15273
15274 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
15275
15276         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
15277         variable for stores to method arguments (fixes a SSAPRE issue).
15278
15279 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
15280
15281         * mini.c: handle value types in dup, fixes gen-112.cs.
15282
15283 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
15284
15285         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
15286         sequence for calls in dynamic methods to avoid thunks.
15287
15288 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
15289
15290         * mini.c: correctly remove dynamic methods from the hashtable.
15291
15292 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
15293
15294         * driver.c: Disabled SSAPRE until fix the bug that appears
15295         in IronPython's parrotbench.
15296
15297 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
15298
15299         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
15300
15301         * mini.c (mono_method_to_ir): Revert the previous change.
15302         
15303         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
15304         when AOT compiling.
15305
15306         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
15307         mono_jit_info_table_find () etc. when running under valgrind.
15308
15309         * inssel.brg: Fix warnings.
15310
15311         * mini-exceptions.c: Fix warnings.
15312
15313 2005-01-31  Martin Baulig  <martin@ximian.com>
15314
15315         * driver.c (compile_all_methods_thread_main): Don't try to compile
15316         generic methods or anything which has type parameters.
15317
15318 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
15319
15320         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
15321
15322         * TestDriver.cs: Add --verbose flags.
15323
15324         * graph.c ssa.c: Fix 64 bit warnings.
15325         
15326         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
15327         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
15328         Fix 64 bit warnings.
15329
15330         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
15331         variable not spotted by gcc.
15332         
15333         * mini-amd64.c inssel-amd64.brg: Applied patch from  
15334         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
15335         X86_COMPARE_MEMBASE opcodes.
15336
15337         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
15338
15339 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
15340
15341         * *: MonoMethod->signature might be NULL now. You *MUST* use
15342         mono_method_signature.
15343
15344 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
15345
15346         * driver.c (compile_all_methods_thread_main): Compile the methods
15347         without invoking cctors.
15348
15349 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
15350
15351         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
15352         * basic-calls.cs: test for the above.
15353
15354 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
15355
15356         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
15357         MonoJitInfo changes.
15358
15359 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
15360
15361         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
15362         eagerly if it contains dynamic methods.
15363         
15364         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
15365
15366         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
15367         trace, it is now computed by an icall from trace_ips.
15368         
15369         * mini-exceptions.c: Fix a warning.
15370
15371 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
15372
15373         * mini-exceptions.c: don't bother getting stack trace info if
15374         it's not going to be used.
15375
15376 2005-01-27  Raja R Harinath  <rharinath@novell.com>
15377
15378         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
15379         ssapre-mini-ops.h.
15380
15381 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
15382
15383         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
15384
15385         * aot.c: Avoid calling mono_method_get_header () if not needed.
15386
15387         * mini.h: Bump AOT file format version.
15388         
15389         * mini.c (mono_emit_native_call): Allocate a GOT var here.
15390
15391         * mini.c (mono_print_tree): Print more info for calls.
15392
15393 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
15394
15395         * declsec.h: Remove warning by adding missing include for marshal.h
15396
15397 2005-01-26  Martin Baulig  <martin@ximian.com>
15398
15399         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
15400         `ip' twice.
15401
15402 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
15403
15404         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
15405         flags.
15406
15407         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
15408
15409         * aot.c (mono_compile_assembly): Fix a warning.
15410
15411 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
15412
15413         * declsec.c: Look for security attributes on the original MonoMethod 
15414         (and not the wrapped one). This fix permissions on icalls.
15415
15416 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
15417
15418         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
15419
15420         * mini.c (mono_allocate_stack_slots): Add a fixme.
15421
15422         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
15423
15424 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
15425
15426         * inssel.brg: optimize casts of sealed types (more
15427         optimizations waiting for fixes in remoting).
15428
15429 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
15430
15431         * inssel.brg (stmt): Add another dummy rule.
15432
15433         * driver.c: Fix warnings.
15434
15435         * driver.c (mono_main): If running under valgrind, instruct glib to use
15436         the system allocation functions so valgrind can track the memory
15437         allocated by the g_... functions.
15438
15439         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
15440
15441         * mini-ops.h: Add OP_DUMMY_STORE opcode.
15442
15443         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
15444
15445         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
15446         variables in try regions.
15447
15448         * mini.c (mini_method_compile): Don't disable optimizations on large
15449         methods when AOT compiling.
15450
15451         * mini.c (mono_allocate_stack_slots): New arch independent method to 
15452         allocate stack slots. Not yet used.
15453
15454 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
15455
15456         * debug-mini.c (mono_debug_close_method): Plug some leaks.
15457
15458 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
15459
15460         * mini-ppc.c: make the branch info relative as the code
15461         buffer can be reallocated.
15462
15463 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
15464
15465         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
15466         * driver.c: Removed the AOT/security restriction. Now initialize the
15467         security manager (in metadata) if --security is used.
15468         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
15469         rather than the pointer to declarative security, when AOT is used.
15470
15471 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
15472
15473         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
15474         basic blocks, reduced intrinsic exception throwing code size.
15475
15476 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
15477
15478         * driver.c (mini_usage): Reorder the usage screen.
15479
15480 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
15481
15482         * mini.c (mono_resolve_patch_target): Fix warning.
15483
15484 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
15485
15486         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
15487         previous patch.
15488
15489         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
15490
15491         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
15492         breaks the amd64 build.
15493
15494         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
15495         register allocation. Fixes #71454.
15496
15497         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
15498
15499         * arrays.cs: Add new regression test.   
15500
15501 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
15502
15503         * ssapre.c: Turned usage of snprintf to GString.
15504         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
15505         (I left it on by mistake in my previous commit).
15506
15507 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
15508
15509         * mini.c, cfold.c, basic-calls.cs: preserve side effects
15510         on cond branch optimization (fixes bug# 71515).
15511
15512 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
15513
15514         * abcremoval.c: Fixed bug 71062.
15515         * abcremoval.h: Likewise.
15516
15517 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
15518
15519         * mini.c: Added a new functionality to optimize_branches, the removal
15520         of useless basic blocks, and fixed some problem in the removal of
15521         critical edges; some utility functions added for both purposes.
15522         * ssapre.c: Added complex expression support, and fixed bug 70637.
15523         * ssapre.h: Likewise.
15524         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
15525         enabled in SSAPRE.
15526         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
15527         * driver.c: Re-enabled SSAPRE.
15528
15529 2005-01-19  Martin Baulig  <martin@ximian.com>
15530
15531         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
15532         the result of mono_get_method_constrained().
15533
15534 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
15535
15536         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
15537         manager.
15538
15539 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
15540
15541         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
15542         be detected.  Fixes #59296.
15543
15544 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
15545
15546         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
15547         which can happen. Fixes #71361.
15548
15549 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
15550
15551         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
15552         manager.
15553
15554 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
15555
15556         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
15557         appdomain-unload.exe to fail.
15558         
15559         * mini.c: Fix some memory leaks.
15560
15561 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
15562
15563         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
15564         Fixed bug and sped up some codepaths.
15565
15566 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
15567
15568         * mini.c: Fix some memory leaks.
15569
15570         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
15571         conversion.
15572
15573         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
15574
15575         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
15576         #71320.
15577
15578         * iltests.il: Add regression test for #71320.
15579
15580 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
15581
15582         * mini.c (mono_codegen): Fix installation of profiler hooks.
15583
15584         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
15585
15586 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
15587
15588         * mini.h, mini.c, cfold.c: optimize access to enum
15589         readonly fields, too. Eval conditional branches if possible
15590         to perform unreachable code removal in more cases.
15591
15592 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
15593
15594         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
15595
15596         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
15597         code manager.
15598
15599         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
15600         WinXP DEP. Fixes #71244.
15601
15602 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
15603
15604         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
15605
15606 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
15607
15608         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
15609
15610 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
15611
15612         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
15613         changes.
15614
15615         * mini.h: Bump AOT version.
15616
15617         * mini.h (MonoCompile): Change exvar to a hash table.
15618
15619         * mini.c: Allocate a separate exvar for each handler block.
15620
15621         * mini.c: Get rid of the computation of filter_lengths, its not needed.
15622
15623         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
15624         ex var with the pending exception and only throw if the two are equal.
15625         Fixes #68552.
15626         
15627         * exceptions.cs: Add tests for rethrow and nested catch clauses.
15628
15629         * mini-x86.c: Fix warnings.
15630
15631         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
15632         used by all the ports now.
15633
15634         * aot.c: Add write-symbols and save-temps options.
15635
15636 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
15637
15638         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
15639
15640 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
15641
15642         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
15643         operations.
15644
15645         * tramp-s390.c: Check vtable slot belongs to the domain.
15646
15647         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
15648         as per other platforms.
15649
15650         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
15651
15652 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
15653
15654         * driver.c: we don't run the Main() code in a subthread anymore.
15655
15656 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
15657
15658         * mini.c: added experimental rtc support in the statistical
15659         profiler: if the user has the permission, more accurate statistics
15660         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
15661         The MONO_RTC value must be restricted to what the linux rtc allows:
15662         power of two from 64 to 8192 Hz.
15663
15664 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
15665
15666         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
15667
15668 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
15669
15670         * mini-ppc.c: better icache flush for smp.
15671
15672 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
15673
15674         * mini-amd64.c (emit_move_return_value): Fix memory leak.
15675
15676         * mini-x86.c (get_call_info): Add the get_call_info () code from the
15677         amd64 port, not yet used.
15678
15679 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
15680
15681         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
15682         a struct type.
15683
15684 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
15685
15686         * driver.c: Added --security option to activate the security manager.
15687         Right now this will allow code generation for declarative demands and
15688         is disabled when AOT is specified.
15689         * mini.c: Add code generation for declarative security demands.
15690         * mini.h: Add mono_use_security_manager as an extern gboolean.
15691
15692 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
15693
15694         * aot.c (mono_compile_assembly): Speed up compilation a bit by
15695         emitting more dense assembly code.
15696
15697         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
15698         exception throwing stuff.
15699
15700 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
15701
15702         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
15703         dead code.
15704
15705         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
15706         left in by mistake.
15707
15708         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
15709         fixed.
15710
15711         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
15712
15713         * tramp-*.c: Only patch vtable slots if the object is in the current
15714         domain. Fixes appdomain-unload.exe.
15715
15716         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
15717         
15718         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
15719         x86 branch.
15720
15721 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
15722
15723         * mini.c (reverse_branch_op): New helper function.
15724
15725         * mini.c (optimize_branches): Run the new optimization only on 
15726         platforms which support it. Also reverse all kinds of branches.
15727
15728         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
15729
15730         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
15731         a throw statement.
15732
15733         * mini.c (optimize_branches): Reverse not-equals branches if the false
15734         bblock is a throw. This happens a lot of time with argument checking in
15735         corlib.
15736
15737         * mini.c (mono_codegen): Add support for placing basic blocks after
15738         the function epilogue.
15739
15740         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
15741         function epilogue.
15742         
15743 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
15744
15745         * mini.c (setup_stat_profiler): Only set this up if the platform
15746         supports ITIMER_PROF.
15747
15748 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
15749
15750         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
15751         previous patch.
15752
15753         * inssel.brg: Fix a warning.
15754
15755 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
15756
15757         * mini.c: added support for statistical profiler 
15758         (run with: --profile=default:stat).
15759
15760 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
15761
15762         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
15763
15764         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
15765
15766         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
15767         related to global registers from the amd64 port.
15768
15769 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
15770
15771         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
15772
15773         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
15774         with global registers.
15775         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
15776
15777         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
15778
15779 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
15780
15781         * debug-mini.c (encode_value): Fix off-by-one.
15782
15783         * aot.c (encode_value): Likewise.
15784
15785         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
15786
15787 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
15788
15789         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
15790         AOT.
15791
15792         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
15793         
15794         * aot.c (emit_method_info): Increase size of temp buffer.
15795
15796         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
15797         the AOT case.
15798
15799 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
15800
15801         * aot.c (emit_method_info): Fix build.
15802         
15803         * aot.c: Further rework of the AOT file format to reduce the size of
15804         the method info data.
15805
15806         * mini.h: Bump AOT file format version.
15807
15808 2004-12-27  Martin Baulig  <martin@ximian.com>
15809
15810         * mini.c (mini_get_method): New static method; call
15811         mono_get_method_full() and mono_get_inflated_method().
15812         (mono_method_to_ir): Use mini_get_method() instead of
15813         mono_get_method_full(). 
15814
15815 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
15816
15817         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
15818
15819 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
15820
15821         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
15822
15823         * inssel-amd64.brg: Add some optimization rules.
15824
15825 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
15826
15827         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
15828         standard not GC'd stuff is fine.
15829
15830 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
15831
15832         * aot.c: Rework the AOT file format to get rid of most of the global
15833         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
15834
15835         * mini.h: Bump AOT file format version.
15836         
15837 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
15838
15839         * mini.h: Bump AOT file format version.
15840
15841         * aot.c (mono_aot_is_got_entry): New function to determine if an 
15842         address is inside a GOT.
15843
15844         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
15845
15846         * cpu-pentium.md: Increase the maximum size of some instructions which
15847         might involve a got access.
15848         
15849         * mini.c (get_method_from_ip): Another debug helper function.
15850
15851         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
15852         when got var accesses are created during the decompose phase.
15853
15854         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
15855
15856         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
15857         argument mini_compile_method and to MonoCompile, and use this to
15858         determine whenever a given method is compiled for AOT. This allows the
15859         other methods compiled during AOT compilation to be free of AOT stuff,
15860         so the backends does not need to add special support for them by
15861         creating a fake GOT etc.
15862
15863         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
15864         longer needed.
15865
15866 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
15867
15868         * mini.c (mono_method_to_ir): It turns out that some of the
15869         x-appdomain wrappers are lax with types, so just ignore this for
15870         all wrappers.
15871
15872         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
15873         at the vtable->klass. If it is non-shared code we can just use the
15874         vtable.
15875
15876 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
15877
15878         * mini-ppc.c: access MonoDomain from tls, too.
15879
15880 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
15881
15882         * declsec.c: Removed unused variable (and related warning ;-)
15883
15884 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
15885
15886         * iltests.il: New test for LDELEMA on an array of ref types.
15887
15888         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
15889         all ldelema's on reftypes.
15890         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
15891         it was the wrong place to put it.
15892
15893         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
15894         register to pop to make this cleaner, at the request of Paolo.
15895
15896 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
15897
15898         * mini-ops.h (OP_GETHASHCODE): New op.
15899
15900         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
15901
15902         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
15903         operation.
15904
15905         For a microbenchmark, this reduces the cost of Hashtable.get_Item
15906         by 25%.
15907         
15908         * mini-x86.c (mono_arch_output_basic_block): Rather than
15909
15910         add ebp, 4
15911
15912         Emit
15913
15914         pop edx
15915
15916         The first is 3 bytes while the second is 1. This saves 36 kb on
15917         mscorlib, quite a big saving. When bootstraping mcs, I was able to
15918         see a small boost because of icache locality.
15919
15920         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
15921
15922 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
15923
15924         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
15925         started code sharing with the generic code.
15926
15927 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
15928
15929         * mini-ppc.c, cpu-g4.md: added code for direct access to
15930         tls data slots.
15931
15932 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
15933
15934         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
15935          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
15936         to OP_TLS_GET.
15937
15938 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
15939
15940         * declsec.c|h: Added functions to cache the declarative stack modifiers
15941         in MonoJitInfo and to create a security frame from a MonoJitInfo 
15942         structure.
15943         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
15944         created. Register internal calls for System.Security.SecurityFrame::
15945         _GetSecurityFrame and _GetSecurityStack.
15946         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
15947         the definitions for the new stack walk/callback mechanism.
15948         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
15949         first security frame for LinkDemands and InheritanceDemands) and
15950         GetSecurityStack for Demands. Both use the new mono_walk_stack code
15951         from lupus.
15952         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
15953         walk initialization (lupus).
15954
15955 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
15956
15957         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
15958         idiom.
15959         (handle_loaded_temps): Do not create a temporary variable for
15960         things that we know are temps. They will never be modified.
15961         (mono_spill_call): Set MONO_INST_IS_TEMP
15962         (mono_emulate_opcode): ditto
15963         (emit_tree): ditto
15964         (mono_method_to_ir.CEE_DUP): ditto
15965
15966 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
15967
15968         * mini.c (type_to_eval_stack_type): Make this handle the void type
15969         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
15970         (emit_tree): use ip_in_bb to special case some common idioms
15971         Update all callers to pass in the IP.
15972         (mono_method_to_ir): Make CEE_CALL* do the above as well.
15973
15974         This gives us a nice 2% speedup in mcs bootstrap.
15975
15976         * mini-x86.c (peephole_pass): Peephole pass to make
15977         mov  [foo], eax
15978         push [foo]
15979
15980         into
15981
15982         mov [foo], eax
15983         push eax
15984
15985         * mini.c (ip_in_bb): new method.
15986         (mono_method_to_ir): use this method rather than doing the hash
15987         lookup ourselves.
15988
15989         * linear-scan.c (mono_linear_scan): When expiring actives, you
15990         don't need to keep around variables that expire on this
15991         instruction. This makes it so that:
15992              a = b + 1
15993         will turn into:
15994              store (ebx add (ebx, 1))
15995         which will become
15996              add ebx, 1
15997
15998 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
15999
16000         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
16001         combination to avoid doing two copies. Fix up problems with previous
16002         patch.
16003
16004         * mini.c: Fix 64 bit warnings.
16005
16006         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
16007
16008 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
16009
16010         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
16011         changes from the x86 code.
16012
16013         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
16014
16015 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
16016
16017         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
16018         throwing code to reduce its size, unify the AOT and non-aot code and 
16019         get rid of relocations in the AOT case.
16020
16021         * mini-x86.h mini.c exceptions-x86.c 
16022         (mono_arch_get_throw_corlib_exception): New arch specific function to 
16023         raise corlib exceptions which doesn't require relocations in the 
16024         caller.
16025
16026         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
16027
16028 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
16029
16030         * mini.c (mono_emit_method_call): Only allocate the got var when it is
16031         needed.
16032
16033         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
16034         in the AOT case.
16035
16036 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
16037
16038         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
16039         with add function when used from Inc/dec atomic 
16040         functions. Re-enabled optimization on x86.
16041         * mini-ops.h: renamed atomic_add functions to
16042         allow _add to match the Interlocked::Add and
16043         _add_next to match Interlocked::Inc/Dec.
16044
16045 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
16046
16047         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
16048         linking of BBs to the end BB, and enabled SSAPRE also with
16049         consprop and copyprop (which was prevented by that bug).
16050
16051 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
16052
16053         * mini-x86.c: disabling the Interlocked optimizing code. 
16054
16055 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
16056
16057         * aot.c (load_aot_module): Move reading of got_addr after the AOT
16058         file version check.
16059         
16060 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
16061
16062         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
16063         interlocked optimization due lack of support on x86, rewrote 
16064         exchange to take into account that base may be in eax.
16065         
16066         xsp works again; activated Interlocked optimizing code.
16067         
16068 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
16069
16070         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
16071
16072 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
16073
16074         * mini-ops.h: Add new opcodes.
16075
16076         * mini.h: Add new patch types. Add got_var to MonoCompile.
16077
16078         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
16079         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
16080         make it work with all kinds of patchable code.
16081
16082         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
16083         address of the GOT, and referencing entries in the GOT.
16084
16085         * mini.c: Add code to load the GOT address if needed by an opcode.
16086
16087         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
16088         independent AOT code on the x86 using an elf-style Global Offset Table.
16089
16090 2004-12-14  Raja R Harinath  <rharinath@novell.com>
16091
16092         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
16093
16094 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16095
16096         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
16097         when running xsp.
16098
16099 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
16100
16101         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
16102         of Interlocked:Increment/Decrement/Add as inline ops.
16103         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
16104
16105 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
16106
16107         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
16108         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
16109
16110 2004-12-12  Duncan Mak  <duncan@ximian.com>
16111
16112         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
16113         again. `patch_info->table_size' is no longer valid after Zoltan's
16114         commit #37636.
16115
16116 2004-12-12  Martin Baulig  <martin@ximian.com>
16117
16118         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
16119         if we are the "real" method, ie. not an inlined method inside it.
16120
16121 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
16122
16123         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
16124         before we look in the special fields table. This fixes
16125         ../tests/thread-static-init.cs.
16126
16127 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16128
16129         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
16130         for Array get_Rank and get_Length. Fixes bug #70465.
16131
16132 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
16133
16134         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
16135         separate structure to reduce the size of MonoJumpInfo.
16136
16137 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
16138
16139         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
16140
16141 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
16142
16143         * mini.c (mini_get_inst_for_method): Changed to allow ports
16144         to return a MonoInst instead of opcode 
16145         (renamed mini_get_opcode_for_method to better reflect the new functionality)
16146         
16147         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
16148         Allow ports to return a created MonoInst instead of op-code, will enable
16149         new optimizations.
16150         (renamed mini_get_opcode_for_method to better reflected the functionality)
16151
16152 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
16153
16154         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
16155
16156 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
16157
16158         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
16159         Fixes #69985.
16160
16161 2004-12-08  Martin Baulig  <martin@ximian.com>
16162
16163         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
16164         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
16165
16166 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
16167
16168         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
16169         correctly.
16170
16171         * exceptions.cs: Disable some tests which depend on properties of x86 fp
16172         arithmetic.
16173
16174 2004-12-08  Raja R Harinath  <rharinath@novell.com>
16175
16176         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
16177
16178 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
16179
16180         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
16181         bug introduced by the previous patch.
16182
16183 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
16184
16185         * mini-ppc.c, objectc.cs: handle large structs passed by value
16186         (fixes bug #69972).
16187
16188 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
16189
16190         * mini-ppc.c: OP_ARGLIST implementation from
16191         Geoff Norton  <gnorton@customerdna.com>.
16192
16193 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
16194
16195         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
16196         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
16197
16198 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
16199
16200         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
16201
16202 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16203
16204         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
16205         support.
16206
16207 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
16208
16209         * mini-sparc.c: Zero out localled-ed memory.
16210
16211         * iltests.il: Add tests for zeroing out localloc-ed memory.
16212
16213 2004-12-04  Martin Baulig  <martin@ximian.com>
16214
16215         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
16216         mono_method_get_signature_full().       
16217
16218 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
16219
16220         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
16221         and some utility functions (always for SSAPRE), integrated SSAPRE.
16222         * mini.h: Likewise.
16223         * driver.c: Added ssapre option.
16224         * ssa.c: Small fix on OP_ARG handling.
16225         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
16226         * Makefile.am: Likewise.
16227
16228 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
16229
16230         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
16231         now in the xp code.
16232
16233         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
16234         icall.
16235
16236 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16237
16238         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
16239         
16240         * cpu-s390.md : Increase instruction length of oparglist.
16241
16242         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
16243
16244 2004-11-30  Martin Baulig  <martin@ximian.com>
16245
16246         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
16247         virtual generic methods.  We call a special helper_compile_generic_method()
16248         icall to retrieve the method from the vtable, inflate and compile
16249         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
16250
16251         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
16252
16253 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
16254
16255         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
16256
16257 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
16258
16259         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
16260         Fixes #69929.
16261
16262 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
16263
16264         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
16265         platforms with PIC aot.
16266
16267 2004-11-28  Martin Baulig  <martin@ximian.com>
16268
16269         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
16270         Fixes gen-112.cs.
16271
16272 2004-11-28  Martin Baulig  <martin@ximian.com>
16273
16274         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
16275         the result of mono_type_get_underlying_type() to check whether
16276         we're byref.
16277
16278 2004-11-26  Martin Baulig  <martin@ximian.com>
16279
16280         * mini.c
16281         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
16282         in the g_assert().
16283
16284 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
16285
16286         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
16287         the same way as the other arguments so they won't get clobbered.
16288
16289         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
16290         calls through R11 since it is clobbered by the trampoline code.
16291
16292 2004-11-26  Raja R Harinath  <rharinath@novell.com>
16293
16294         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
16295         pick up in-tree mscorlib.dll.
16296
16297 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
16298
16299         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
16300
16301         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
16302         runtime data/code are now stored in a table similar to the GOT in ELF. 
16303         This allows the code itself to be position independent.
16304
16305         * aot.c: Fix loading of referenced assemblies after the lazy assembly
16306         loading changes.
16307
16308         * aot.c: Attach ELF type (object/function) directives to all global
16309         symbols.
16310
16311         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
16312
16313         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
16314
16315         * mini-amd64.h: Turn on PIC AOT code.
16316
16317         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
16318         returning the offset within an OP_AOTCONST instruction where the GOT
16319         offset needs to be added.
16320
16321         * mini.h: Bump AOT file format version.
16322
16323 2004-11-25  Martin Baulig  <martin@ximian.com>
16324
16325         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
16326         uninflated generic methods.
16327
16328 2004-11-25  Martin Baulig  <martin@ximian.com>
16329
16330         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
16331
16332 2004-11-24  Martin Baulig  <martin@ximian.com>
16333
16334         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
16335         original klass (this only applies for generic instances).
16336
16337 2004-11-24  Martin Baulig  <martin@ximian.com>
16338
16339         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
16340         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
16341         that array).
16342
16343 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
16344
16345         * mini.c (mono_method_to_ir): Disable inlining for methods containing
16346         localloc. Fixes #69678.
16347
16348         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
16349         
16350 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
16351
16352         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
16353         used SSE registers on pinvoke calls. Fixes #69774.
16354
16355 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
16356
16357         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
16358         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
16359
16360 2004-11-23  Raja R Harinath  <rharinath@novell.com>
16361
16362         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
16363         Refer directly to the mcs/ tree.
16364
16365 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16366
16367         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
16368         Check if a trampoline for a synchronized method is required. 
16369
16370 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
16371
16372         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
16373         with localloc if needed. Throe arithmetric exception in
16374         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
16375         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
16376
16377 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
16378
16379         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
16380         types before switching on type.  Fixes #69622.
16381
16382 2004-11-19  Raja R Harinath  <rharinath@novell.com>
16383
16384         * Makefile.am (check-local): New.  Integrate into 'make check'.
16385         (MCS,RUNTIME): Define using in-tree mono and mcs.
16386         (ILASM): New.
16387         (%.exe): Use $(ILASM).
16388
16389 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
16390
16391         * mini-ppc.c: adjust initial prolog size (bug #69691).
16392
16393 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
16394
16395         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
16396         #69664.
16397
16398 2004-11-17  Raja R Harinath  <rharinath@novell.com>
16399
16400         * Makefile.am (clean-local): Rename from 'clean'.
16401
16402 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16403
16404         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
16405         to mono_arch_is_int_overflow. 
16406         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
16407         SIGFPE events.
16408
16409 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
16410
16411         * declsec.c|h: New files to support declarative security attributes.
16412         Added function to check if a method has (applicable) security.
16413         * mini.c|h: Add check for declarative security attributes in
16414         mono_method_check_inlining.
16415         * Makefile.am: Added declsec.c and declsec.h to the build.
16416
16417 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
16418
16419         * mini.c, mini.h: update to keep dynamic code info per-domain.
16420
16421 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
16422
16423         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
16424         (mini_init): Get rid of it from here too.
16425
16426 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
16427
16428         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
16429         implemented OP_RETHROW (patch by Geoff Norton
16430         <gnorton@customerdna.com>).
16431
16432 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
16433
16434         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
16435         between appdomains.  Fixes appdomain-unload on PPC.
16436
16437 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
16438
16439         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
16440         mini-exceptions.c: handle the new wrapper types.
16441         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
16442         token value as a MonoClass* when compiling a wrapper.
16443         mono_jit_create_remoting_trampoline now takes an additional
16444         MonoRemotingTarget parameter.
16445         
16446 2004-11-10  Martin Baulig  <martin@localhost>
16447
16448         * mini.c (mono_method_to_ir): Use `generic_container->context'
16449         rather than creating a new one.
16450
16451 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16452
16453         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
16454
16455         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
16456
16457 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
16458
16459         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
16460         the experimental aot cache stuff.
16461
16462 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
16463
16464         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
16465         mini-exceptions.c: update to exception clause structure changes.
16466
16467 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
16468
16469         * exceptions-x86.c (throw_exception): Fix warnings.
16470
16471         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
16472         for OP_RETHROW.
16473
16474 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
16475
16476         * exceptions-sparc.c (get_throw_exception): Really fix this.
16477
16478 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
16479
16480         * tramp-*.c: we no longer support icalls without wrappers, so
16481         a bit of code can be removed here
16482
16483 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
16484
16485         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
16486         patch.
16487
16488         * cpu-sparc.md: Add op_rethrow.
16489
16490         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
16491
16492         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
16493
16494         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
16495         * mini-ops.h: Add OP_RETHROW.
16496
16497         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
16498
16499         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
16500
16501 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
16502         
16503         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
16504         Makes the output much easier to read
16505
16506 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
16507
16508         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
16509         prevents another huge leak when compiling with ssa. Secondly, the
16510         performance of doing this rather than freeing the lists is much
16511         better. GList does a lock every time you allocate a list link,
16512         so that it can use a memory pool. So, it is better to just use
16513         a memory pool of our own.
16514         
16515         * ssa.c, linear-scan.c: replace g_list_remove_link with
16516         g_list_delete.  The remove one does not free the GList, so we were
16517         leaking memory. On -O=all --compile-all with corlib, this cut down
16518         3 MB of allocations.
16519
16520 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
16521
16522         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
16523
16524         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
16525
16526         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
16527         into a new function mono_create_jit_trampoline ().
16528
16529 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
16530
16531         * trace.c (get_spec): Allow tracing of classes without a namespace.
16532
16533 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
16534
16535         * mini.c: Fix pointer overwrite in mini_method_compile.
16536
16537 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
16538
16539         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
16540         The darwin ABI needs some special handling for 1 and 2 byte structs
16541         Lets use lbz/lhz instead of lwz everywhere.
16542         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
16543         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
16544         Use stb/sth for the former, and put the latter always on stack instead of in
16545         argument registers.
16546
16547 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
16548
16549         * trace.c (is_filenamechar): Add '_'.
16550
16551 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
16552
16553         * mini-s390.c: Fix prolog length to allow for large trace requirements.
16554
16555         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
16556
16557 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
16558
16559         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
16560         depends on libmonogc. Fixes #68805.
16561
16562 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
16563
16564         * mini.c (mono_jit_free_method): Provide extra information for
16565         this error.  Currently this leaks, but will be turned into a
16566         developer option in the future.
16567
16568 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
16569
16570         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
16571
16572 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
16573
16574         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
16575         boundary. Fixes reading of PATCH_INFO_R4 and R8.
16576         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
16577
16578 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
16579
16580         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
16581         trampolines for AOT code.
16582
16583 2004-10-22    <vargaz@freemail.hu>
16584
16585         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
16586         constructed types. Fixes #68136.
16587
16588 2004-10-21  Martin Baulig  <martin@ximian.com>
16589
16590         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
16591         if it returns true, unwind the stack to the call instruction.
16592
16593 2004-10-21    <vargaz@freemail.hu>
16594
16595         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
16596
16597         * mini.h: Bump AOT version number.
16598
16599         * objects.cs: Add another test for unbox trampolines.
16600
16601         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
16602         valuetype methods.
16603
16604 2004-10-20    <vargaz@freemail.hu>
16605
16606         * driver.c: Add SHARED to the set of optimizations tested.
16607
16608         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
16609
16610         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
16611         used by CEE_NEWARR.
16612
16613         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
16614
16615 2004-10-20  Martin Baulig  <martin@ximian.com>
16616
16617         * mini-exceptions.c (mono_handle_exception): Call
16618         mono_debugger_handle_exception() to tell the debugger about
16619         catch/finally clauses.
16620
16621 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
16622
16623         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
16624
16625         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
16626         #68447.
16627
16628 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
16629
16630         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
16631         methods as their native size, fixed bug #57543, #57545.
16632         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
16633         This saves a temporary register and mullw call down into 1 (minor perf
16634         increase for cases like sum = sum * 5;  This use to translate into:
16635             li r11,5
16636             mullw r28,r28,r11
16637         It now translates to
16638             mulli r28,r28,5
16639
16640 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
16641
16642         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
16643         #68388.
16644
16645 2004-10-11  Martin Baulig  <martin@ximian.com>
16646
16647         * mini.c (mono_method_to_ir): If we're a generic method, get the
16648         MonoGenericContainer from our MonoMethodNormal and create a
16649         MonoGenericContext from it.
16650
16651 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
16652
16653         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
16654
16655         * basic-long.cs: Add test for checked i8->i2 cast.
16656
16657 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16658
16659         * inssel-ppc.brg: added a couple of speedup rules.
16660
16661 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
16662
16663         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
16664         to speed up rebuilds.
16665
16666 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16667
16668         * mini-s390.c: Minor fix to OP_OR_IMM.
16669
16670 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
16671
16672         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
16673         better. Fixes appdomain-unload.exe on sparc.
16674
16675 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
16676
16677         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
16678         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
16679         see bug 67324.
16680
16681 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
16682
16683         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
16684
16685 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
16686
16687         * mini.c: Always generate a field read/write wrapper for members
16688         of the class MarshalByRefObject since the actual instance could
16689         be a CBO.
16690
16691 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
16692
16693         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
16694
16695 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
16696
16697         * driver.c mini.h trace.c: Move the setting of the main assembly into
16698         a separate function called mono_trace_set_assembly () and call it after
16699         actually loading the main assembly. Fixes #66872.
16700
16701 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
16702
16703         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
16704         using the code manager.
16705
16706 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
16707
16708         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
16709
16710 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
16711
16712         * cpu-amd64.md: Fix bug in previous patch.
16713         
16714         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
16715         #66650.
16716
16717 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
16718
16719         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
16720         mini-exceptions.c: updates for changed stack walk interface.
16721
16722 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16723
16724         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
16725
16726 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
16727
16728         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
16729
16730 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
16731
16732         * driver.c (mini_regression_list): Do not call mono_assembly_close 
16733         since assemblies can't be unloaded.
16734         
16735 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
16736
16737         * cpu-amd64.md: Fix more instruction lengths.
16738
16739         * cpu-amd64.md: Fix lengths of some instructions.
16740
16741 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
16742
16743         * inssel.brg: Make the array ldelema check aot friendly.
16744
16745 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
16746
16747         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
16748
16749         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
16750
16751 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
16752
16753         * mini-x86.c: Fix build.
16754
16755         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
16756         mono_type_get_underlying_type () helper function to simplify code.
16757         
16758 2004-09-09  Martin Baulig  <martin@ximian.com>
16759
16760         * mini-amd64.c: Don't access `type->data.klass' directly, call
16761         mono_class_from_mono_type() instead since the type may be a
16762         generic instance.
16763
16764 2004-09-09  Martin Baulig  <martin@ximian.com>
16765
16766         * mini-amd64.c (get_call_info): Fix support for generic instances.
16767         (add_valuetype): Use mono_class_from_mono_type() to get the class
16768         since we can be a generic instance.
16769
16770 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
16771
16772         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
16773
16774 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
16775
16776         * liveness.c: reset spill costs on each scan: bug 62107
16777
16778 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
16779
16780         * exceptions-sparc.c (mono_arch_find_jit_info): remove
16781         unnecessary line that doesn't compile
16782
16783 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
16784
16785         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
16786         trampolines, make them call an error function so people can fix their
16787         code.
16788
16789 2004-09-06  Martin Baulig  <martin@ximian.com>
16790
16791         * mini.c (mono_method_to_ir): When initializing locals, handle a
16792         generic instances like a valuetype if it's a valuetype and like a
16793         class if it's a class.
16794
16795 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
16796
16797         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
16798         stack. Fixes #64674.
16799
16800         * exceptions.cs: Add test for unwinding of call arguments.
16801
16802 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
16803
16804         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
16805         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
16806         set the carry/borrow flag). The sparc and s390 implementations
16807         can now use optimized versions (and simplify the code). ppc bugfixes.
16808
16809 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
16810
16811         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
16812
16813 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
16814
16815         * inssel-amd64.brg: Remove leftover 32 bit rule.
16816
16817         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
16818
16819 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
16820
16821         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
16822         mono_arch_find_jit_info functions into a new function. Fix a memory
16823         leak.
16824
16825         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
16826         refactored code.
16827         
16828 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
16829
16830         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
16831         as well.
16832         
16833         * exceptions.cs: Add array size tests.
16834
16835         * mini.c: Allocate a separate icall wrapper for each arity of 
16836         mono_array_new_va. Fixes #59509.
16837
16838         * exceptions.cs: Add testcase for 64578.
16839
16840         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
16841
16842         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
16843         
16844 2004-09-02  Martin Baulig  <martin@ximian.com>
16845
16846         * mini.c (mono_method_to_ir): When initializing the locals, call
16847         handle_initobj() on the generic instance itself, not its
16848         underlying type.
16849
16850 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
16851
16852         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
16853         MonoJitInfo for dynamic methods.
16854
16855         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
16856
16857         * mini.c: Add support for freeing JIT data for dynamic methods.
16858         
16859 2004-09-01  Martin Baulig  <martin@ximian.com>
16860
16861         * mini-x86.c (is_regsize_var): Added support for generic
16862         instances.
16863         (mono_arch_emit_prolog): Make this compile again, use
16864         `x86_push_imm_template (code)'.
16865
16866 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
16867
16868         * mini-x86.c: make all push_imm instructions that get
16869         patched always emit the long form
16870
16871 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
16872
16873         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
16874         in a per-domain hash.
16875
16876         * mini-amd64.c (merge_argument_class_from_type): Handle generic
16877         types.
16878
16879 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
16880
16881         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
16882         work.
16883         
16884         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
16885         work.
16886
16887         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
16888         Beginnings of SSE2 support.
16889
16890         * exceptions.cs: Add more tests for checked int<->uint casts.
16891
16892 2004-08-28  Martin Baulig  <martin@ximian.com>
16893
16894         * mini-x86.c (mono_arch_instrument_epilog): Added support for
16895         generic instances.
16896
16897         * mini.c
16898         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
16899         Handle generic instances recursively.
16900
16901 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
16902
16903         * iltests.il: test for conv.u8 on a constant
16904
16905 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
16906
16907         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
16908         LCONV_x4 (shrun_32 (membase)).
16909
16910 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
16911
16912         * inssel-x86.brg: c&p rules for push/setret of long
16913
16914 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
16915
16916         * inssel-x86.brg: c&p rules for compare (base, regvar) and
16917         compare (regvar, base)
16918
16919         * inssel-x86.brg: more burg love
16920
16921         * inssel.brg: more cleanup
16922
16923         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
16924
16925 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
16926
16927         * basic-long.cs, basic-calls.cs: new tests for optimization.
16928
16929 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
16930
16931         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
16932         patch.
16933
16934 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
16935
16936         * mini-amd64.c (read_tls_offset_from_method): Add another case.
16937         
16938 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
16939
16940         * inssel.brg (mini_emit_memcpy): use 
16941         NO_UNALIGNED_ACCESS to disable memcpy optimization
16942
16943 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
16944
16945         * mini-amd64.c: Handle generic types in various places.
16946
16947         * mini.c (mono_method_to_ir): Handle generic types in init locals.
16948
16949 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
16950
16951         * mini.c (handle_box): Fix warning.
16952
16953         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
16954
16955         * mini-amd64.h: Enable the emit_state optimization.
16956
16957         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
16958
16959         * mini-amd64.c: Add some new 64 bit peephole opts.
16960
16961         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
16962
16963         * cpu-amd64.md: sreg1 of div instructions must be %rax.
16964
16965         * mini-amd64.c: Register allocator fixes.
16966
16967         * mini.c: Add an optimization to emit_state to avoid allocation of new
16968         registers on some platforms.
16969
16970 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
16971
16972         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
16973
16974         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
16975         allocation. Fixes #63085.
16976
16977         * basic-long.cs: Add new regression test.
16978
16979         * mini-amd64.c: Register allocator improvements.
16980
16981 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
16982
16983         * mini-amd64.c (read_tls_offset_from_method): Add another code
16984         sequence.
16985
16986         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
16987         instruction sequence for nullifying class init trampolines.
16988
16989         * objects.cs: Add new regalloc test.
16990
16991         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
16992
16993 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
16994
16995         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
16996         
16997         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
16998         arguments.
16999
17000         * driver.c: Fix profiling after TLS changes.
17001         
17002         * driver.c (mono_main): Set mono_stats.enabled if needed.
17003
17004         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
17005         CEE_BOX.
17006
17007 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
17008
17009         * mini-x86.c: use a 1 op rather than a 2 op tls access
17010         instruction -> faster.
17011
17012 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
17013
17014         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
17015         x86 backend.
17016
17017 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
17018
17019         * exceptions-sparc.c (throw_exception): fix typo
17020
17021 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
17022
17023         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
17024         set tree->dreg correctly with tls. Allow any
17025         register to be used.
17026
17027         * mini-x86.c (read_tls_offset_from_method): add new code
17028         generation pattern seen with GCC.
17029
17030
17031 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
17032
17033         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
17034         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
17035         exceptions-sparc.c: fix some performance issues in exception
17036         handling and setting of the stack trace for exceptions that were
17037         already thrown.
17038
17039 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
17040
17041         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
17042         x86 backend.
17043         
17044         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
17045         registers.
17046
17047 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
17048
17049         This patch inlines tls access, when possible.
17050         
17051         * mini.h: new arch functions for TLS intrinsics.
17052         All platforms updated with a stub.
17053
17054         * mini.c: use the new intrinsics
17055
17056         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
17057         arch specific intrinsic for tls variables
17058
17059 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
17060
17061         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
17062         under windows.
17063
17064 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
17065
17066         * mini.c: thread local allocation
17067
17068 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
17069
17070         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
17071
17072         * Makefile.am: Link against the static version of libmonogc.
17073         
17074         * Makefile.am: Link the static versions of the convenience libraries
17075         into the mono executable.
17076
17077         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
17078
17079 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
17080
17081         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
17082         on integer overflow.
17083
17084         * mini-amd64.c: Reorganize function call code.
17085
17086         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
17087
17088 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
17089
17090         * inssel-x86.brg: use xor eax,eax.
17091         
17092         * basic.cs: new tests
17093
17094 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
17095
17096         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
17097         in exception throwing code.
17098         
17099 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
17100
17101         * inssel-x86.brg: use xor esi,esi.
17102
17103 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
17104
17105         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
17106         can trace methods compiled during mini_init () too.
17107
17108         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
17109         CEE_CONV_U4.
17110
17111 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
17112
17113         * Makefile.am: static link on x86 (r=zoltan)
17114
17115 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
17116
17117         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
17118         code since it causes some programs to fail.
17119
17120 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
17121
17122         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
17123
17124 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
17125
17126         * mini.c: ovfops_op_map - add STACK_OBJ case for
17127         CONV_I 
17128         * basic.cs: add test_0_pin_string as test
17129         case for above.
17130
17131 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
17132
17133         * Makefile.am: build C# if srcdir != builddir
17134
17135 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
17136
17137         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
17138         fall-through blocks.
17139
17140 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
17141
17142         * driver.c: enable loop by default again and include abcrem in -O=all.
17143
17144 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
17145
17146         * iltests.il: Add some localloc tests.
17147
17148         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
17149
17150         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
17151         Fixes #62574.
17152
17153         * inssel-amd64.brg: Add some optimizations.
17154
17155         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
17156         for gcc-3.4.
17157
17158         * Makefile.am: Statically link mono against libmono on AMD64.
17159         
17160         * mini-amd64.c inssel-amd64.brg: Optimizations.
17161
17162 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
17163
17164         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
17165
17166         * tramp-amd64.c: Patch calling code in trampolines.
17167
17168 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
17169
17170         * mini-amd64.c: pinvoke struct passing fixes.
17171
17172 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
17173
17174         * mini-sparc.c: redo change, make mono_arch_cpu_init call
17175         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
17176
17177 2004-08-05  Duncan Mak  <duncan@ximian.com>
17178
17179         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
17180         CEE_LDELEM_ANY.
17181
17182 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
17183
17184         * mini-amd64.c (emit_move_return_value): Move return value for normal
17185         calls too.
17186
17187 2004-08-05  Martin Baulig  <martin@ximian.com>
17188
17189         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
17190         `type->type'; just modify `type' itself when dealing with enums
17191         and generic instances.
17192         (check_call_signature): Make `simple_type' a `MonoType *'.
17193
17194 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
17195
17196         * mini.c: Use OP_PADD to add offsets to addresses.
17197
17198         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
17199
17200 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
17201
17202         * mini-sparc.c (mono_arch_emit_epilog): fix check
17203         for folding last op into restore instruction
17204
17205 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
17206
17207         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
17208         helper methods using the code manager.
17209         
17210         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
17211
17212         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
17213
17214 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17215         
17216         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
17217           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
17218
17219         * mini-s390.c: fix tail processing
17220
17221 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
17222
17223         * mini-ppc.c: mul.ovf.un exception name fix.
17224
17225 2004-08-03  Martin Baulig  <martin@ximian.com>
17226
17227         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
17228         instances; before jumping to `handle_enum', also modify `ptype'.
17229
17230 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
17231
17232         * cpu-sparc.md: fcall maximal length too small.
17233
17234 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
17235
17236         * mini-amd64.c mini.h: Add initial support for passing/returning 
17237         structures to/from pinvoked methods.
17238
17239 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
17240
17241         * mini-ppc.c: reg allocator fix.
17242
17243 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
17244
17245         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
17246
17247         * inssel.brg: Optimize memset on 64 bit machines.
17248
17249         * mini-amd64.c: Fix some vararg cases.
17250
17251 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17252
17253         * mini-s390.c: Corrected macro in emit_float_to_int
17254
17255         * s390-abi.cs: Tests to exercise the s390 ABI
17256
17257 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
17258
17259         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
17260         caller saved regs.
17261
17262         * basic.cs: Add a test for add.ovf.un.
17263
17264 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
17265
17266         * mini-sparc.c: add case for OP_IDIV_UN
17267
17268 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
17269
17270         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
17271         
17272         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
17273
17274 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
17275
17276         * basic.cs: regression tests.
17277
17278         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
17279         regressions.
17280
17281 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
17282
17283         * basic.cs: Add a new test.
17284
17285         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
17286         and AOT. Various fixes and optimizations.
17287
17288         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
17289
17290 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
17291
17292         * mini-ppc.c: make sure temp regs are not used for global reg
17293         allocation.
17294
17295 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
17296
17297         * cpu-sparc.md: conv_i8 fix for 64bits
17298
17299         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
17300
17301 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
17302         
17303         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
17304         add opcode for cmp BYTE PTR [eax], imm.
17305
17306         * inssel.brg: Make memcpy and memset takes bases.
17307
17308 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
17309
17310         * *-amd64.*: More AMD64 work.
17311         
17312 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
17313
17314         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
17315         add a compare-not-equal opcode.
17316         
17317 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
17318
17319         * mini.c: Use mono_init_from_assembly instead of mono_init.
17320         
17321 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
17322
17323         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
17324
17325         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
17326
17327         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
17328
17329         * inssel.brg: 64 bit fixes.
17330
17331         * mini.h (MonoCallInst): Add some AMD64 specific data.
17332
17333         * mini.h: Add some OP_P opcodes.
17334
17335 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
17336
17337         * basic.cs: tests for 61797 and 61740
17338
17339 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
17340
17341         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
17342         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
17343
17344 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
17345
17346         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
17347
17348         * *-amd64*.*: Ongoing AMD64 work.
17349
17350 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
17351
17352         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
17353
17354         * *-amd64*: Ongoing AMD64 work.
17355
17356         * mini-arch.h: Add AMD64 support.
17357
17358         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
17359
17360         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
17361
17362         * mini-ops.h: Add new opcodes.
17363
17364         * Makefile.am: Add AMD64 support.
17365
17366         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
17367         rules into the inssel-long*.brg files.
17368
17369         * *-amd64.*: Add beginnings of AMD64 backend.
17370
17371 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
17372
17373         * mini.c (print_dfn): commenting out the code that prints
17374         the cil. With -O=deadce, this makes -v -v crash.
17375         
17376         * cpu-pentium.md: make checkthis have a length of 2
17377
17378 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
17379
17380         * mini-sparc.h: fix implementations of __builtin
17381         functions for Sun compiler for V9.
17382
17383 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
17384
17385         * mini.c: use the new stelem.ref wrapper
17386         * exceptions.cs, arrays.cs: new stelem.ref tests
17387
17388 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
17389
17390         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
17391         new XSP should work with these changes).
17392
17393 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
17394         
17395         * inssel-{long32,x86,}.brg: trivial optimizations.
17396         
17397 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
17398
17399         * mini.c: load value when emitting box operation in
17400         constrained calls.
17401
17402 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
17403
17404         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
17405         is one byte shorter than cmp DWORD PTR [eax], 0.
17406
17407 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
17408
17409         * inssel-ppc.brg: arguments on the stack are always
17410         relative to the stack pointer (spotted by Neale Ferguson).
17411
17412 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17413
17414         * exceptions-x86.c: delay appending the method name to the trace until
17415         after mono_jit_info_table_find is called, as this gets the real
17416         MonoMethod.
17417
17418 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
17419
17420         * aot.c: register roots
17421
17422 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
17423
17424         * aot.c : I could just use PLATFORM_WIN32 flag.
17425
17426 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
17427
17428         * aot.c : Reverting the previous fix. This time it broke linux build.
17429
17430 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
17431
17432         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
17433
17434 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
17435
17436         * mini.c (handle_stack_args): Remove some more debugging code.
17437         
17438         * mini.c (handle_stack_args): Remove debug output left in by mistake.
17439
17440         * driver.c mini.h aot.c: Allow additional options to be specified with
17441         --aot and pass them to mono_compile_assembly.
17442
17443         * aot.c: Add experimental code to AOT compile all loaded assemblies
17444         on demand and save the code into a cache in the filesystem.
17445
17446         * aot.c: Add support for more wrapper methods.
17447         
17448         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
17449         58863.
17450
17451         * cpu-*.md: Remove removed opcodes.
17452
17453         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
17454         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
17455         related icalls to marshal.c.
17456
17457 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
17458
17459         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
17460
17461         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
17462
17463         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
17464
17465 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
17466         * liveness.c: If liveness is recomputated we need to reset the information
17467         for each variable. This way, if the liveness range has been narrowed
17468         by optimizations that happened after the last computation, we can return
17469         a smaller range.
17470         
17471         For example, if you have
17472         
17473         {
17474                 int i = 0;
17475                 
17476                 // Tons of code that does not affect i
17477                 
17478                 i = foo ();
17479                 ...
17480         }
17481         
17482         i = 0 is dead code and will be removed by SSA. However, when
17483         linear scan gets to the code, i will still appear to be live
17484         throughout the entire block. This prevents good register allocation.
17485
17486 2004-07-06  Martin Baulig  <martin@ximian.com>
17487
17488         * debug-mini.c (mono_debug_init_method): Allow
17489         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
17490         (mono_debug_add_icall_wrapper): New method.
17491
17492         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
17493
17494 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
17495
17496         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
17497         optimization.
17498
17499 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
17500
17501         * aot.c (mono_aot_load_method): Fix loading of debug info.
17502
17503 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
17504
17505         * aot.c: Add logging support.
17506
17507 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
17508
17509         * mini.h: Add prototype for mono_print_method_from_ip.
17510
17511         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
17512
17513         * inssel.brg: 64 bit fixes.
17514
17515         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
17516         inssel-long32.brg.
17517
17518         * Makefile.am: Add SPARC64 support.
17519
17520 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
17521
17522         * aot.c: Fix alignment problems on 32 bit platforms.
17523
17524 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
17525
17526         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
17527         SPARC64.
17528
17529         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
17530         problems.
17531
17532         * mini.h: Bump AOT file version. Some 64 bit fixes.
17533
17534 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
17535
17536         * inssel-sparc.brg: Add new rule to avoid register moves.
17537
17538         * inssel.brg: Add ldind_to_load_membase helper function.
17539
17540 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
17541
17542         * mini.c: OffsetToStringData intrinsic.
17543         
17544 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
17545
17546         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
17547
17548         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
17549         regression tests.
17550
17551         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
17552 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
17553
17554         * mini.c: reinstated mono_compile_get_interface_var()
17555         on x86, too, since the change breaks the Gtk# build there as well.
17556
17557 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17558
17559         * driver.c: remove loop from the default optimizations: it seems to
17560         interact badly with some of the other options (see bug #60613).
17561
17562 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
17563
17564         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
17565         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
17566
17567 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
17568
17569         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
17570         vararg-using methods.
17571
17572 2004-06-21  Martin Baulig  <martin@ximian.com>
17573
17574         * mini/mini-exceptions.c
17575         (mono_handle_exception): Added `gpointer original_ip' argument.
17576         After calling mono_unhandled_exception(), call
17577         mono_debugger_unhandled_exception() and if that returns true,
17578         restore the context and return.
17579
17580 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
17581
17582         * mini-ppc.c: prefer the use of relative branches so
17583         they won't need to be patched in aot code (patch from Patrick Beard).
17584
17585 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
17586
17587         * aot.c: patch from Patrick Beard to make the output assembly
17588         more correct for the MacOSX assembler. Small tweak to
17589         generate sane images on Linux/PPC, too.
17590
17591 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17592
17593         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
17594         case until bug #59509 is fixed (shows up in #60332).
17595
17596 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17597
17598         * mini.c: make sure the needed wrappers are compiled, too, with
17599         precomp.
17600
17601 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
17602
17603         * driver.c: remove NPTL reference in --version output.
17604
17605 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17606
17607         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
17608         generate valid assembly for the Mach-O assembler.
17609
17610 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
17611
17612         * driver.c: don't include abcrem in the all optimization specifier
17613         since it slows down jit compilation too much for now.
17614
17615 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
17616
17617         * mini.c: use BIGMUL only if both operands have the same signage.
17618         * iltests.il: Test for bug 60056. (errors related to signage in
17619         BIGMUL).
17620
17621         r=lupus.
17622
17623 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
17624
17625         * mini.c, aot.c: memory leak fixes.
17626
17627 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
17628
17629         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
17630
17631 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
17632
17633         * Makefile.am: remove the -static hack completely, it links in
17634         statically glib as well.
17635
17636 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
17637
17638         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
17639         * exceptions.cs: make it compile with new mcs/csc.
17640
17641 2004-06-03 Massimiliano Mantione <massi@ximian.com>
17642         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
17643         and added relevant test case.
17644
17645 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
17646
17647         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
17648         regressions in gtk-sharp.
17649
17650 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
17651
17652         * exceptions.cs: New regression tests.
17653
17654         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
17655
17656 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
17657
17658         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
17659
17660 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
17661
17662         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
17663
17664         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
17665
17666 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
17667
17668         * mini.c (mono_jit_runtime_invoke): Init class in this
17669         method instead of trusting mono_jit_compile_method to
17670         do the work (because wrappers can be in object class)
17671
17672 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
17673
17674         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
17675
17676         * basic-long.cs: New regression test.
17677
17678 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
17679
17680         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
17681         and div/rem checks.
17682
17683 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
17684
17685         * Makefile.am: fix miguel's change to build mono statically against
17686         libmono (track build dependencies).
17687
17688 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
17689
17690         * cfold.c: Some glib versions do not have G_MININT32.
17691
17692 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
17693
17694         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
17695         with precision of tan, atan, sin and cos, and implemented related
17696         regressions tests (fixes bug 54467, but one new problem appeared and
17697         is not fixed yet).
17698
17699 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
17700
17701         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
17702
17703         * exceptions.cs: Add test for constant folding && division by zero.
17704
17705         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
17706         since driver.c is in libmono too, so the optimization was useless.
17707
17708         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
17709         variable to driver.c so the compiler can emit more efficient code to
17710         access them.
17711
17712 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17713
17714         * Makefile.am: don't distribute generated inssel.[ch] files.
17715
17716 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
17717
17718         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
17719         into the default appdomain. Fixes #58707.
17720
17721         * jit-icalls.c: Remove the broken approximation for truncl, doing
17722         no conversion is better.
17723
17724         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
17725         Fixes #58863.
17726
17727 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
17728
17729         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
17730         of the mcrxr instruction which is not available on some processors
17731         even if it's documented to be. Implement add and sub overflow correctly
17732         (still not complete for long unsigned). Speed up icalls a bit.
17733
17734 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
17735
17736         * mini.c (mono_jit_compile_method_with_opt): Make sure that
17737         we run .cctor in the current domain instead of target_domain.
17738         
17739         Fixes bug #58558, .cctor not being called in -O=shared.
17740
17741 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
17742
17743         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
17744
17745 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
17746
17747         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
17748         which can be done with an imm8, do it that way.
17749         (mono_arch_output_basic_block): ditto for a jmp
17750         (mono_arch_emit_prolog): Computate maximum offset of a label.
17751
17752 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
17753
17754         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
17755         now tries to allocate prefered physical reg's for virtual
17756         regs. This reduces the number of emited spills/loads with
17757         20-30% on our core assemblies.
17758
17759 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17760
17761         * jit-icalls.c: truncl() is not needed and trunc() is
17762         the correct thing to do anyway (bug #58287).
17763
17764 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
17765
17766         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
17767         if available.
17768
17769 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
17770
17771         * driver.c: enable loop optimizations by default.
17772
17773 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
17774
17775         * mini-x86.c: fix calc of max loop size when aligning loops start.
17776
17777 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
17778
17779         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
17780         the stack.
17781
17782 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
17783
17784         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
17785         should set carry.
17786
17787         * basic-long.cs: Add tests for add/subtract of immediates with carry.
17788
17789         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
17790         
17791         * mini.c (inline_method): Allways inline some wrappers even if the cost
17792         is too large. Fixes #58785.
17793
17794         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
17795         
17796 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
17797
17798         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
17799         (crichton@gimp.org). Beginning of support for sparc/linux.
17800
17801         * mini-sparc.c: Optimize retrieval of LMF address.
17802
17803 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
17804
17805         * exceptions-ppc.c:  handle alloca in methods with clauses.
17806
17807 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
17808
17809         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
17810
17811 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
17812
17813         * mini.c: Delegate most of the abort signal work to 
17814           mono_thread_request_interruption, which also handles Stop and Suspend
17815           states.
17816
17817 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
17818
17819         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
17820         supports the save/restore lmf opcodes.
17821
17822 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
17823
17824         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
17825         by gcc-3.4 as well.
17826
17827         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
17828
17829 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
17830
17831         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
17832         methods which contain array accesses.
17833
17834         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
17835         boundaries. Fixes #58537.
17836
17837         * iltests.il: Add regression test for #58537.
17838
17839 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
17840
17841         * mini-x86.c (mono_arch_local_regalloc): Last part of
17842         fix for bug #58633 (releasing register to early).
17843
17844 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
17845
17846         * basic-long.cs: Add new regression test.
17847
17848 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
17849
17850         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
17851         register too early on the chain.
17852
17853 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
17854
17855         * mini.c (create_helper_signature): Use a helper function to reduce
17856         the code which needs to be written. Also set the calling convention of
17857         icalls on windows. Fixes #57840.
17858
17859 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
17860
17861         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
17862         exceptions-ppc.c: added helper function to get the instruction address
17863         from a signal handler context.
17864
17865 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
17866
17867         * helpers.c: use g_get_tmp_dir. Invokes happyness 
17868         from gonzalo.
17869
17870 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
17871
17872         * helpers.c: Add new env variable to pass args to objdump.
17873         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
17874
17875 2004-05-17  Radek Doulik  <rodo@ximian.com>
17876
17877         * Makefile.am (common_sources): added abcremoval.h so it get
17878         disted and daily mono packages on go-mono.com will build again
17879
17880 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
17881
17882         * abcremoval.c: Fixed coding style, added copyright header.
17883
17884         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
17885
17886         * mini.h: Added prototype for abc removal main function.
17887
17888         * build_relations_propagation_table.pl: Added copyright header.
17889
17890 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
17891
17892         * basic-long.cs: reg test for complex ceq_long bug.
17893
17894 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
17895
17896         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
17897         reg in long and clob case (bug #58343). Fixed/added comments.
17898
17899 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
17900
17901         * mini.c (mono_jit_runtime_invoke): Follow new convention
17902         of calling the invoke method with an function pointer.
17903
17904 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
17905
17906         * ChangeLog: Fix author of memory leak patch.
17907
17908 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
17909
17910         * Makefile.am: fix make dist as well...
17911
17912
17913 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
17914
17915         * cfold.c: Made so that conversions from pointer to int4 are no-ops
17916         on archs where pointers are 4 bytes long.
17917
17918         * Makefile.am: Added abcremoval.c source file.
17919
17920         * abcremoval.c: Added abcremoval.c.
17921
17922         * abcremoval.h: Added abcremoval.h.
17923
17924         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
17925
17926         * inssel.brg: Enabled bounds check removal.
17927
17928         * mini.c: Added support for abcrem optimization.
17929
17930         * mini.h: Added abcrem optimization label.
17931
17932         * driver.c: Added support for abcrem optimization.
17933
17934         * propagated_relations_table.def: Added propagated_relations_table.def.
17935
17936 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
17937
17938         * mini.c, cfold.c: fix style.
17939
17940 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
17941
17942         * mini.c: handle issue with the low-level implementation of
17943         some long opcodes (bug #54209).
17944
17945 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
17946
17947         * basic.cs: test for my new cmov stuff.
17948
17949 2004-05-13      Patrik Torstensson
17950
17951         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
17952         opt and added peephole documentation.
17953
17954 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
17955
17956         * tramp-ppc.c: rewrote the generic trampoline code.
17957
17958 2004-05-11      Patrik Torstensson
17959
17960         * mini-x86.c: optimize long shl/shr asm code (one less branch)
17961
17962 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
17963
17964         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
17965
17966         * mini.h mini.c dominators.c: Applied patch from Derek Woo
17967         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
17968
17969         * mini.c: Add new icalls for AsAny marshalling.
17970
17971 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
17972
17973         * tramp-ppc.c, mini-ppc.c: more cleanups.
17974
17975 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17976
17977         * mini.c: no warnings.
17978
17979 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17980
17981         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
17982
17983 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
17984
17985         * mini.c: In the thread abort signal handler, if the thread is in the
17986         process of being stoped, don't throw the Abort exception, just stop the
17987         thread.
17988
17989 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
17990
17991         * tramp-ppc.c: removed old code.
17992
17993 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17994
17995         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
17996         do some simple speed optimizations on ppc.
17997
17998 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
17999
18000         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
18001         and large offsets in load/store.
18002
18003 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
18004
18005         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
18006         it causes regressions.
18007
18008 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
18009
18010         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
18011         support.
18012
18013 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
18014
18015         * jit-icalls.c: remove warnings.
18016         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
18017         speedups for unsafe code.
18018
18019 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
18020
18021         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
18022
18023 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
18024
18025         * basic-calls.cs: Add new regression test.
18026
18027         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
18028         more portable.
18029
18030         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
18031
18032         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
18033         is no longer used.
18034
18035 2004-05-06      Patrik Torstensson
18036
18037         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
18038         long reg allocation in any reg (not only eax:edx) and implemented 
18039         long shl/shr ops in asm instead of helpers.
18040
18041 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
18042
18043         * mini-sparc.h: Fix warnings.
18044
18045         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
18046         stack.
18047
18048         * mini-exceptions.c (mono_handle_exception): Call the filter in a
18049         separate statement for clarity.
18050
18051         * mini-sparc.c: Update status.
18052
18053 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
18054
18055         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
18056         here.
18057
18058 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
18059
18060         * inssel-ppc.brg: another small pre-release workaround:
18061         we don't do overflow detection for long_sub_un.
18062
18063 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
18064
18065         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
18066         (also works around a weird ppc bug: 57957).
18067
18068 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
18069
18070         * tramp-ppc.c: trampoline fixes.
18071
18072 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
18073
18074         * mini-ppc.c: fixed typos.
18075
18076 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
18077
18078         * mini-ppc.c, exceptions-ppc.c: more code saves registers
18079         at the top of the stack. Fixed typos. Use a frame registers
18080         for all the methods with exception clauses.
18081
18082 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
18083
18084         * exceptions-ppc.c: restore fp registers.
18085
18086 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
18087
18088         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
18089         order from the stack top (moved the stack room to save the
18090         return value for trace after the param area). Fixed corruption
18091         in restoring registers on unwind.
18092
18093 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
18094
18095         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
18096
18097 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
18098
18099         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
18100         and prolog/epilog for methods that use it. Allow
18101         enough param area room for varargs methods. Fix miguel's
18102         breakage in exception handling.
18103
18104 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
18105
18106         * Makefile.am: run genmdesc only on current arch.
18107
18108 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18109
18110         * exceptions-x86.c:
18111         * mini-x86.h: fix the build on windows.
18112
18113 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
18114
18115         * 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.
18116
18117         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
18118
18119         * mini-exceptions.c: New file.
18120         
18121         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
18122         Move some parts of the x86 exception handling code to an 
18123         arch-independent file so it can be shared with other ports.
18124
18125 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
18126
18127         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
18128
18129 2004-04-26  David Waite  <mass@akuma.org>
18130
18131         * driver.c: remove comma from end of enumeration declaration
18132
18133 2004-04-26  Jackson Harper  <jackson@ximian.com>
18134
18135         * driver.c: parse config file before loading first assembly. This
18136         allows the user gac to be enabled/disabled. 
18137         
18138 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
18139
18140         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
18141         simpler mechanism: we do not care what is encoded initially
18142         (branch absolute or relative), we care about the code and its
18143         target.  I kept the old code for reference for now.
18144
18145         The new code tries first to determine if the jump is anywhere in
18146         the -/+32 absolute meg range, if it succeeds, it encodes using the
18147         absolute branch;  If not, it tried to find something in the
18148         relative range, if not, it uses the handle_thunk code. 
18149
18150 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
18151
18152         * exceptions-ppc.c: use the correct ip register on macosx.
18153
18154 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
18155
18156         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
18157
18158 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
18159
18160         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
18161         Raise exception on integer divide by zero by hand since the hw
18162         doesn't support it. Handle NaNs in FP compares.
18163
18164 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
18165
18166         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
18167         code reducing duplication between the platforms and enabled
18168         signal exception handling (on linux for now).
18169
18170 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
18171
18172         * exceptions-ppc.c: more macosx support.
18173
18174 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
18175
18176         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
18177
18178 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
18179
18180         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
18181
18182 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
18183
18184         * iltests.il: more tests.
18185
18186 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
18187
18188         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
18189         vars as well.
18190
18191 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
18192
18193         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
18194
18195 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
18196
18197         * liveness.c: Mark variables as volatile in all basic blocks reachable
18198         from exception clauses.
18199
18200 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
18201
18202         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
18203         inlining.
18204
18205 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
18206
18207         * iltests.il, basic.cs: more tests for regalloc.
18208
18209 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
18210
18211         * iltests.il: Some tests for register allocation modifications
18212         I have locally.
18213
18214 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
18215
18216         * exceptions.cs: Add regression test for bug #56782.
18217
18218         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
18219         original stack trace if an exception is rethrown. Fixes #56782. Oh,
18220         the beauty of fixing the same thing in 5 different files...
18221
18222 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
18223
18224         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
18225         methods.
18226
18227 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
18228
18229         * mini.c: Add support for STRWLPARRAY marshalling convention.
18230
18231 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
18232
18233         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
18234         to init the context to setup the regs pointer).
18235
18236 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
18237
18238         * exceptions-ppc.c: more exceptions work.
18239
18240 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
18241
18242         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
18243         not allowed.
18244
18245 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
18246
18247         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
18248         can use the memory directly.
18249
18250         * cpu-pentium.md: Update documentation from a post from Zoltan. 
18251
18252         add x86_add_membase, x86_sub_membase, x86_mul_membase
18253
18254 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
18255
18256         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
18257         GENERAL_REGS they were also hardcoded for all PPC ports.
18258
18259         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
18260
18261         Remove hard-coded limit for floating point registers, use
18262         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
18263
18264         Notice that in MacOS X calling conventions you can fit a lot more
18265         floating point values in registers, so I should update the PInvoke
18266         test to excercise the passing of floating point values on the
18267         stack (currently broken).
18268         
18269 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
18270
18271         * tramp-ppc.c (create_trampoline_code): Added
18272         JUMP_TRAMPOLINE_SIZE. 
18273         (ppc_magic_trampoline): Follow the pattern from
18274         x86_magic_trampoline: if code is set to zero, return. 
18275         (create_trampoline_code): Always pass MonoMethod to the jump
18276         trampoline, before it was passing a null.
18277         (mono_arch_create_jump_trampoline): Implement the jump stub, could
18278         share the code with mono_arch_create_jit_trampoline. 
18279
18280         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
18281         implemented.
18282         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
18283         implemented.  
18284
18285         * cpu-g4.md: Added length for jmp instruction, the worst case
18286         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
18287         for save_lmf).
18288
18289 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
18290
18291         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
18292
18293 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
18294
18295         * mini.c: Only set bblock->real_offset when adding a new bblock, and
18296         before each IL instruction.
18297
18298         * mini.c (CEE_BOX): Fix warnings.
18299
18300 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18301
18302         * mini.c: removed a few unused vars and extra whitespace.
18303
18304 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
18305
18306         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
18307         checks.
18308         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
18309         index.
18310         (OP_GETCHR): use the above
18311         (CEE_LDELEMA): use the above.
18312
18313         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
18314         version of the generic impl.
18315         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
18316         (CEE_LDELEMA): use the above.
18317
18318 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
18319
18320         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
18321         Fixes #56317.
18322
18323         * iltests.il: Added new regression test for #56317.
18324
18325 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
18326
18327         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
18328         under NetBSD. Fixes #56450.
18329
18330         * liveness.c (update_gen_kill_set): Fix previous patch.
18331
18332 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18333
18334         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
18335
18336 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
18337
18338         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
18339         ldsfld and ldsflda.
18340
18341         * inssel-sparc.brg: Add more optimizations.
18342
18343         * mini-sparc.c: Replace multiply/divide with shifts if possible.
18344
18345 2004-04-01  Martin Baulig  <martin@ximian.com>
18346
18347         * mini.c (handle_box): New static function; moved the
18348         implementation of CEE_BOX here.
18349         (mono_method_to_ir): Added `constrained_call' variable.
18350         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
18351         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
18352         mono_method_get_constrained() to get the method.
18353
18354 2004-04-01  Martin Baulig  <martin@ximian.com>
18355
18356         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
18357         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
18358         (mono_method_to_ir): We don't need these macros anymore since
18359         mono_class_get_full() already takes care of it. 
18360
18361 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18362
18363         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
18364         use @function (as doesn't accept #function here) and check the return
18365         value of system and stop if fails.
18366
18367 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18368
18369         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
18370
18371 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
18372
18373         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
18374
18375         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
18376
18377         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
18378         #56223.
18379
18380         * basic-long.cs: Add test for negation of Int64.MinValue.
18381
18382 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
18383
18384         * mini-sparc.c: Update status.
18385
18386         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
18387
18388         * exceptions-sparc.c: Fix return value in filters.
18389
18390         * inssel-sparc.brg: Fix register allocation in some rules.
18391
18392 2004-03-28  Martin Baulig  <martin@ximian.com>
18393
18394         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
18395         if neccessary.  
18396
18397 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
18398
18399         * mini-x86.c (mono_arch_patch_code): Fix warnings.
18400         
18401         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
18402         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
18403         remove unused conv_u4 opcode.
18404
18405         * mini-x86.c: Remove valgrind workaround since it slows down things
18406         even when mono is not run under valgrind.
18407
18408 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
18409
18410         * mini-sparc.c: Update status.
18411
18412         * inssel-sparc.brg: Add some optimizations.
18413
18414         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
18415         future delay slot filling. Add support for varargs, tail calls and JMP.
18416
18417         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
18418         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
18419
18420         * inssel.brg: Fix register allocation in OP_ARGLIST.
18421
18422         * inssel.brg: Fix warnings.
18423
18424 2004-03-25  Martin Baulig  <martin@ximian.com>
18425
18426         * mini.c (inflate_generic_field): Removed.
18427         (mini_get_method): Removed, use mono_get_method_full(),
18428         (mini_get_class): Removed, use mono_class_get_full().
18429         (mono_method_to_ir): Pass our generic context to
18430         mono_field_from_token().        
18431
18432 2004-03-25  Martin Baulig  <martin@ximian.com>
18433
18434         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
18435         of a `MonoMethod *'.
18436         (mini_get_method): Take a `MonoGenericContext *' instead
18437         of a `MonoMethod *'.
18438         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
18439         a new local variable called `generic_context' which holds the
18440         current `MonoGenericContext *'; use it to lookup things.
18441
18442 2004-03-24  Martin Baulig  <martin@ximian.com>
18443
18444         * mini.c (mini_get_class): New static method; if we're inside a
18445         generic instance, inflate the class if neccessary.
18446         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
18447
18448 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
18449
18450         * iltests.il: New regression test for #55976.
18451
18452         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
18453         #55976.
18454
18455 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
18456
18457         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
18458         output.
18459
18460 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
18461
18462         * liveness.c: Consider SSA stores as well as loads when making vars
18463         volatile.
18464
18465         * exceptions.cs: New regression tests for register allocation.
18466         
18467 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
18468
18469         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
18470         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
18471           domain lock only to protect puntual access to data structures.
18472           Added access lock for sighash, jit_icall_hash_name, 
18473           jit_icall_hash_addr and domain->code_mp.
18474
18475 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
18476
18477         * driver.c: Print SIGSEGV handling method.
18478
18479         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
18480
18481         * mini.c (setup_jit_tls_data): Handle case when this is called
18482         multiple times for a thread.
18483
18484         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
18485         is different from fbxx_un. Fixes #54303. Also use constants instead of
18486         magic numbers in a lot of places.
18487
18488 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
18489
18490         * exceptions.cs: Fix cctor test when --regression is used.
18491
18492 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
18493
18494         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
18495         for Linux/ppc.
18496
18497 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
18498
18499         * inssel-ppc.brg: fixed register assignments for some rules.
18500
18501 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
18502
18503         * exceptions.cs: Add test for exceptions in static constructors.
18504
18505         * mini.c (mono_jit_compile_method_with_out): Move the calling of
18506         static constructors outside the domain lock. Fixes #55720.
18507
18508 2004-03-17  Martin Baulig  <martin@ximian.com>
18509
18510         * mini.c (get_generic_field_inst): Removed, this'll never happen.
18511         (inflate_generic_field): Take the `MonoMethod *' instead of the
18512         `MonoClass *' and added support for generic method.
18513         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
18514         have a `field->parent->gen_params', only inflate the field if it's
18515         an open constructed type.
18516
18517 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
18518
18519         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
18520         exception object instead of the preconstructed ones.
18521
18522 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18523
18524         * mini.c: reverted changed to sigsegv_signal_handler commited
18525         accidentally in the previous patch.
18526
18527 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18528
18529         * mini.c:
18530         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
18531         running --aot with an old assembly.
18532
18533 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
18534
18535         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
18536         point values.
18537
18538         * mini-sparc.c: Add support for v9 branches with prediction.
18539
18540 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
18541
18542         * mini.c (mini_init): #warning is GNUC only
18543
18544         * mini-sparc.h: implement __builtin_frame_address
18545         and __builtin_return_address for Sun C compiler
18546
18547 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
18548
18549         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
18550
18551 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
18552
18553         * basic-calls.cs: Add test for unaligned byref long argument passing.
18554
18555         * mini-ops.h: Add sparcv9 compare and branch instructions.
18556
18557         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
18558         v9 instructions if we have a v9 cpu.
18559
18560         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
18561         registers for global allocation.
18562
18563         * exceptions-sparc.c: Fixes.
18564         
18565 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
18566
18567         * liveness.c (mono_analyze_liveness): Optimized version.
18568
18569         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
18570
18571         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
18572         sparc work.
18573
18574         * basic-float.cs basic-calls.cs: New regression tests.
18575
18576 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
18577
18578         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
18579         sigaltstack implementation.
18580
18581         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
18582         
18583         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
18584         stuff if SIGSEGV_ON_ALTSTACK is not defined.
18585
18586 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
18587
18588         * mini.c: Fix warnings.
18589         
18590         * mini.c (mono_resolve_patch_target): New function which contains the
18591         arch independent part of the patching process.
18592
18593         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
18594         patching code to a separate function.
18595
18596 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
18597
18598         * mini.c (add_signal_handler): ifdef out on Windows
18599
18600 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
18601
18602         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
18603         cpu-sparc.md: Add exception handling support + other fixes.
18604
18605         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
18606         typed GC detection in --version.
18607
18608         * basic.cs exceptions.cs: New regression tests.
18609
18610         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
18611         the arch specific code can store data during a compilation.
18612
18613         * mini-ops.h: Add OP_SETFRET.
18614
18615         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
18616         function, register a separate icall for each arity, so the icalls can
18617         get a wrapper.
18618         
18619         * mini.c (mono_print_tree): Print negative offsets in a more readable
18620         form.
18621         
18622         * mini.c: Make signal handling work on sparc.
18623         
18624         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
18625
18626         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
18627
18628         * jit-icalls.c: Emulate truncl by aintl on solaris.
18629
18630         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
18631
18632 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
18633
18634         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
18635
18636 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
18637
18638         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
18639         a MarshalByRef type, inline a method that performs the check, taking into
18640         account that the object can be a proxy. Also implemented tow new opcodes:
18641         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
18642         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
18643         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
18644
18645 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
18646
18647         * mini-ppc.c: if a relative branch displacement is too big
18648         but it points to and area reachable with an absolute branch, 
18649         avoid the thunks.
18650
18651 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
18652
18653         * mini.c: optimize small copies in cpblk.
18654
18655 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
18656
18657         * basic-calls.cs basic-float.cs: New regression tests.
18658
18659         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
18660         negative offsets from %fp. Implement localloc. Fix local register 
18661         allocation. Fix the case when the this argument needs to be saved to
18662         the stack. Implement some missing opcodes.
18663
18664 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
18665
18666         * mini.c (mini_method_compile): Reenable global regalloc in methods
18667         with exception handlers.
18668
18669         * linear-scan.c (mono_varlist_sort): Fix warning.
18670
18671         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
18672
18673         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
18674         regalloc costs.
18675
18676         * liveness.c: Make all variables uses in exception clauses volatile, to
18677         prevent them from being allocated to registers. Fixes #42136.
18678
18679 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
18680
18681         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
18682         causes regressions.
18683
18684         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
18685         argument to mono_arch_regalloc_cost.
18686
18687         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
18688         precisely.
18689
18690 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
18691
18692         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
18693         Make the cost of allocating a variable to a register arch dependent.
18694
18695         * basic-calls.cs: Fix compilation of tests.
18696         
18697         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
18698         helper function to cut back on the number of #ifdefs needed.
18699
18700         * mini-ppc.c: Fix compilation.
18701
18702         * basic-calls.cs: New regression tests.
18703
18704         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
18705
18706         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
18707         of l0 since that is callee saved.
18708
18709         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
18710         to virtual calls.
18711
18712         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
18713         of delay instruction.
18714
18715         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
18716
18717         * mini.h (MonoCallInst): Add 'virtual' flag.
18718
18719         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
18720
18721 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
18722
18723         * *.cs: New regression tests.
18724
18725         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
18726         work.
18727
18728         * mini.c (mono_runtime_install_handlers): Fix build.
18729
18730         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
18731         'signal_stack_size' members.
18732
18733         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
18734         alternate signal stack.
18735
18736         * exceptions-x86.c: Add stack overflow handling.
18737
18738         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
18739         functions to arch independent code.
18740
18741         * mini.c (mono_print_tree): Print more detailed info for load_membase
18742         opcodes.
18743         
18744 2004-02-23  Martin Baulig  <martin@ximian.com>
18745
18746         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
18747
18748 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
18749
18750         * mini-x86.c: fixed reg allocation for div/rem.
18751
18752 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
18753
18754         * driver.c (mono_main): Report some configuratio options on --version.
18755
18756 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
18757
18758         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
18759         low in the address space. Correctly flush memory in thunks where we
18760         output native code.
18761
18762 2004-02-20  Martin Baulig  <martin@ximian.com>
18763
18764         * mini.c (mini_get_method): New static method; inflate all generic
18765         methods and methods in open generic instances.
18766         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
18767         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
18768
18769 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
18770
18771         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
18772
18773         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
18774
18775 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
18776
18777         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
18778
18779         * mini-sparc.c (flushi mono_arch_output_basic_block): make
18780         it compile using Sun's compiler.
18781
18782 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
18783
18784         * 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.
18785
18786         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
18787
18788 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
18789
18790         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
18791         code.
18792         * mini-ppc.c: handle calls outside of the allowed range with thunks
18793         allocated using the code manager.
18794         * tramp-ppc.c: use the code manager to hold generated native code.
18795         Fixed the magic trampoline to just patch vtable entries.
18796
18797 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
18798
18799         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
18800         independent file.
18801
18802 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
18803
18804         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
18805         PPC.
18806
18807         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
18808         if we have a working __thread implementation.
18809
18810         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
18811         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
18812
18813 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
18814
18815         * mini-x86.c: Fix compilation under gcc 2.
18816         
18817 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
18818
18819         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
18820         contains a call to the wrapped function.
18821
18822         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
18823         OP_<CALL>_IMM opcodes, and use them under X86.
18824         
18825         * mini.c (mono_jit_find_compiled_method): Fix warning.
18826
18827         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
18828
18829         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
18830
18831         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
18832         functionality to mini.c.
18833
18834         * mini.c (mono_create_jump_trampoline): New function to create a jump
18835         trampoline. Return a compiled method instead of a trampoline if it
18836         exists. Add a cache for jump trampolines.
18837
18838         * mini.c (mono_jit_find_compiled_method): New function to return a
18839         compiled method if it exists.
18840
18841         * mini-x86.c: Call mono_create_jump_trampoline instead of 
18842         mono_arch_create_jit_trampoline.
18843
18844         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
18845         a jump trampoline. Fixes #52092.
18846         
18847 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
18848
18849         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
18850         which is not up-to-date. Add check_corlib_version () instead.
18851
18852         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
18853         have to call it.
18854         
18855         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
18856         since newer valgrind versions do not need it.
18857
18858         * mini.c (mono_jit_compile_method_with_opt): New helper function to
18859         compile a method with a given set of optimizations.
18860
18861         * mini.c: Compile icall wrappers on-demand instead of at startup.
18862
18863         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
18864         wrapper for an icall.
18865
18866 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
18867
18868         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
18869         #54063.
18870
18871         * iltests.il: Add test for non-empty stack before switch instruction.
18872
18873 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
18874
18875         * mini.c: Add support for new stringbuilder marshalling conventions.
18876
18877         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
18878
18879 2004-02-01  Martin Baulig  <martin@ximian.com>
18880
18881         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
18882         in `ginst->mtype_argv'.
18883
18884 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
18885
18886         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
18887         facilitate grepping.
18888
18889 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
18890
18891         * mini.c: fixed buglet in initobj generic implementation for references.
18892
18893 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
18894
18895         * Makefile.am: make the version script conditional.
18896         * jit-icalls.c: handle missing truncl().
18897
18898 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
18899
18900         * exceptions.cs: Add more tests for double->int conversion.
18901
18902         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
18903         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
18904
18905 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
18906
18907         * driver.c: make --verbose --version emit an error
18908         if the loaded corlib doesn't match the runtime version.
18909
18910 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
18911
18912         * mini-ppc.h: export ppc_patch().
18913         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
18914         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
18915         on par or better than on MacOSX.
18916
18917 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
18918
18919         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
18920         mono_lookup_pinvoke_call.
18921
18922         * mini-x86.c: Under windows, the default pinvoke calling convention is
18923         stdcall. Fixes #52834.
18924
18925         * mini.c (optimize_branches): Add an upper bound to the number of
18926         iterations to prevent infinite loops on strange loops. Fixes #53003.
18927
18928 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
18929
18930         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
18931         and ISINST. Fixes #52093.
18932
18933         * objects.cs (test_0_vector_array_cast): New tests.
18934         
18935 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
18936
18937         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
18938         checking in Array.Set ().
18939
18940         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
18941         #52590.
18942
18943         * object.cs (test_0_multi_array_cast): New regression test.
18944
18945 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
18946
18947         * exceptions-ppc.c: fix build on Linux/PPC.
18948
18949 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
18950
18951         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
18952         running under valgrind.
18953         (x86_magic_trampoline): Fix build bustage.
18954
18955         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
18956         negative values as well. This is needed for the encoding of the line number
18957         info, since sometimes the line numbers are not in increasing order.
18958
18959 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
18960
18961         * cpu-pentium.md (localloc): Increase the size of the localloc 
18962         instruction since it is a loop under Win32.
18963
18964         * debug-mini.c (record_line_number): Get rid of unneccesary memory
18965         allocation.
18966
18967 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
18968
18969         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
18970         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
18971         Max Horn (max@quendi.de). Fix file names in comments.
18972
18973 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
18974
18975         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
18976         avoid stack overflow.
18977         (replace_usage): Avoid uninitialized variable warnings.
18978
18979         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
18980         and taking the address of valuetype variables.
18981
18982 2004-01-03  Patrik Torstensson
18983
18984         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
18985         for other purposes than FP later on.
18986
18987 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
18988
18989         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
18990         of tail calls.
18991
18992 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
18993
18994         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
18995
18996 2003-12-30  Patrik Torstensson <p@rxc.se>
18997
18998         * mini-x86.h: Decreased number of availiable fp regs.
18999         Solves corner cases with FP spilling.
19000
19001 2003-12-23  Patrik Torstensson <p@rxc.se>
19002
19003         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
19004         for floating point stack tracking / spilling on x86. 
19005         Fixes bug #49012.
19006         
19007         * basic-float.cs: added float mul overflow test.
19008
19009 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
19010
19011         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
19012
19013 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
19014
19015         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
19016         supports for cond branches that overflow the immediate
19017         overflow offset. mcs can compile simple programs.
19018
19019 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
19020
19021         * exceptions-ppc.c: exception handling support wip:
19022         finally handlers get run on exception.
19023
19024 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
19025
19026         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
19027         profiling.
19028
19029 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
19030
19031         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
19032         initial support for stack walking and unwinding.
19033
19034 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
19035
19036         * driver.c (mono_main): Make corlib-out-of-sync message more 
19037         descriptive. Also remove verify_corlib call.
19038
19039 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
19040
19041         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
19042         not overlap with other call's arguments, too.
19043
19044 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
19045
19046         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
19047         move to arch-specific code the choice of arch-specific
19048         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
19049         * mini.c: ensure emulation calls will not interleave
19050         with other calls.
19051
19052 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
19053
19054         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
19055         the magic trampoline stack frame is dropped before executing
19056         the new method.
19057
19058 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19059
19060         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
19061         and integer to fp conversions. Added support for overflowing
19062         arguments on the stack. Reserve a couple more registers as temps.
19063         Added support for aot compilation (as output still needs to be
19064         tweaked, though).
19065
19066 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
19067
19068         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
19069         Don't overwrite return register in some corner cases.
19070
19071 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
19072
19073         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
19074         static constructors when AOT compiling.
19075
19076         * driver.c (mono_main): Call mono_check_corlib_version.
19077
19078 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
19079
19080         * cpu-g4.md, basic.cs: fixed div target register.
19081
19082 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
19083
19084         * mini-ppc.c, basic.cs: shl_imm fix with test.
19085
19086 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
19087
19088         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
19089         structures by value. Misc fixes.
19090         * objects.cs: more tests.
19091
19092 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
19093
19094         * mini-ppc.c: lconv.ovf.i implemented.
19095
19096 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19097
19098         * mini.c:
19099         (mini_init): don't error out if someone already called g_thread_init.
19100
19101 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
19102
19103         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
19104         to be any type per the spec. Fix abnormal memory usage when
19105         the same object is repeatedly thrown.
19106
19107 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
19108
19109         * mini.c: check for overruns in IL code.
19110
19111 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
19112
19113         * TODO: Add/remove some todo entries.
19114
19115 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
19116
19117         * driver.c (mono_main): Call mono_verify_corlib.
19118
19119 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
19120
19121         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
19122         This has been moved to mini.c
19123         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
19124         type being casted is marshalbyref it could be a proxy, so instead of
19125         emitting the type check code, emit a call to a runtime method that will
19126         perform the check by calling CanCastTo if needed.
19127
19128 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
19129
19130         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
19131         methods with large stack frames under Win32.
19132
19133 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
19134
19135         * Makefile.am: Distribute regression tests.
19136
19137         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
19138         at the end instead of inserting each variable into the sorted list.
19139
19140         * linear-scan.c (mono_varlist_sort): New helper function.
19141         
19142 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
19143
19144         * mini.c: ensure arguments and locals are within bounds.
19145
19146 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
19147
19148         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
19149         related fixes.
19150
19151 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
19152
19153         * mini.c (mono_cprop_copy_values): Fix crash.
19154
19155         * aot.c: Set verbosity back to 0.
19156         
19157 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
19158
19159         * regalloc.c: complete memory leak fix by Laurent Morichetti
19160         (l_m@pacbell.net).
19161
19162 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
19163
19164         * driver.c (main_thread_handler): Revert the previous patch.
19165
19166         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
19167         under valgrind.
19168
19169         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
19170         memory from the memory pool.
19171
19172         * driver.c (main_thread_handler): Turn on all optimizations when
19173         --aot is used.
19174
19175         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
19176         an array for better performance.
19177
19178         * regalloc.c (mono_regstate_assign): Fix memory leak.
19179
19180         * debug-mini.c (mono_debug_serialize_debug_info): New function to
19181         serialize the debug info.
19182
19183         * debug-mini.c (mono_debug_add_aot_method): New function to load the
19184         debug info from the serialized representation.
19185
19186         * aot.c: Save debug info into the generated file and load it when 
19187         loading a method.
19188
19189         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
19190
19191 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
19192
19193         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
19194         More FP-related fixes.
19195
19196 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
19197
19198         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
19199         and register allocation buglet. Hello world now runs.
19200
19201 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
19202
19203         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
19204         * tramp-ppc.c: fixed class init trampoline.
19205         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
19206
19207 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
19208
19209         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
19210         mini.c: more ppc changes/fixes.
19211
19212 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
19213
19214         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
19215         Also optimize the case when the arguments are the same in the caller 
19216         and in the callee.
19217
19218         * iltests.il: Add tests for tail calls with valuetype arguments.
19219
19220 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
19221
19222         * mini-ppc.c: fixes for struct return type.
19223
19224 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
19225
19226         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
19227         mono_spillvar_offset() to arch-specific code.
19228
19229 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
19230
19231         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
19232
19233 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
19234
19235         * exceptions-x86.c: Fix stack space leaks.
19236         
19237         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
19238         registers from the lmf if the method has save_lmf set.
19239
19240 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
19241
19242         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
19243         of icall wrappers into InvokeInDomain, since these are now per-domain.
19244
19245 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
19246
19247         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
19248         make some opcode emulation and intrinsic ops enabled/disabled 
19249         according to the architecture. More fixes.
19250
19251 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
19252
19253         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
19254
19255 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
19256
19257         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
19258         arch-specific handling for 'this' and struct return type to
19259         arch-specific code.
19260
19261 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19262
19263         * aot.c: prevent divide by zero error when reporting (it happened with
19264         Accessibility.dll).
19265
19266 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
19267
19268         * mini.h (inst_switch): Remove unused macro.
19269
19270 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19271
19272         * aot.c:
19273         (load_aot_module): free 'info->methods' and 'info' properly. No more
19274         "free(): invalid pointer blah" messages when you have an old aot
19275         compiled assembly.
19276
19277 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
19278
19279         * jit-icalls.c, mini.c: Added support for context static fields.
19280
19281 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
19282
19283         * mini.c (mono_method_blittable): Methods which set LastError are not 
19284         blittable either. Fixes #51108.
19285         
19286 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
19287
19288         * mini.c: flush icache.
19289         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
19290
19291 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
19292
19293         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
19294
19295 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
19296
19297         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
19298         safe on IA32.
19299
19300         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
19301         vararg calls.
19302
19303         * inssel.brg (CEE_MKREFANY): Fix AOT case.
19304
19305 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
19306
19307         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
19308         instruction when the result is discarded.
19309
19310         * iltests.il (test_0_div_regalloc): New regression test.
19311
19312         * arrays.cs: Fix compilation error.
19313
19314 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
19315
19316         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
19317         float rules to inssel-x86.brg: sane architectures with FP registers
19318         don't need to implement these rules.
19319
19320 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
19321
19322         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
19323
19324 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
19325
19326         * mini.h, inssel-long32.brg: fixed endianess issues in int64
19327         implementation of 32 bit systems.
19328
19329 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
19330
19331         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
19332         (Jeroen Zwartepoorte).
19333
19334 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
19335
19336         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
19337         the caller and the callee matches.
19338         
19339         * mini.c (mono_method_to_ir): Add comment.
19340
19341         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
19342         signbit is missing on some platforms.
19343
19344 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
19345
19346         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
19347
19348         * mini.c (setup_jit_tls_data): Call the new function.
19349         
19350         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
19351
19352         * mini-x86.c: Add experimental support for fast access to the lmf
19353         structure under NPTL/Linux 2.6.x.
19354
19355 2003-11-06  Martin Baulig  <martin@ximian.com>
19356
19357         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
19358         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
19359         the debugger.
19360
19361 2003-11-02  Martin Baulig  <martin@ximian.com>
19362
19363         * mini.c (inflate_generic_field): New static method.
19364         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
19365         generic instance and the field is declared in a generic type, call
19366         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
19367
19368 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
19369
19370         * mini.h mini.c (mono_method_same_domain): New function to return
19371         whenever the caller and the callee are in the same domain.
19372
19373         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
19374
19375 2003-10-30  Martin Baulig  <martin@ximian.com>
19376
19377         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
19378         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
19379         method parameters.
19380         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
19381         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
19382
19383 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
19384
19385         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
19386         propagation.
19387
19388         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
19389         object here, so it is in the correct appdomain etc.
19390
19391 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
19392
19393         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
19394         already done.
19395         (mono_method_to_ir): Avoid freeing the type created returned from
19396         mono_type_create_from_typespec, since it is put into an internal cache
19397         by the function. Fixes pointer.exe.
19398
19399         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
19400         trampolines for icalls and pinvokes as well. Fixes #33569.
19401
19402 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
19403
19404         * mini.c: Update after appdomain changes.
19405
19406         * mini.c (mono_jit_compile_method_inner): Allways compile native
19407         method wrappers in the root domain, since there can only be one
19408         instance of them, whose address is stored in method->info.
19409
19410 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
19411
19412         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
19413         environment variable. Instead detect automatically whenever running
19414         under valgrind using the magic macro RUNNING_ON_VALGRIND from
19415         valgrind.h.
19416
19417 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
19418
19419         * trace.c, trace.h: New files that implement the new trace option
19420         parsing. 
19421
19422         * driver.c: Document new --trace options.
19423
19424         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
19425         mini-x86.c: Apply:
19426
19427         -       if (mono_jit_trace_calls)
19428         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
19429
19430         * mini.h: prototypes.
19431         
19432 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
19433
19434         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
19435
19436         * mini.c inssel.brg: Implement typedefbyref opcodes.
19437
19438         * mini.c (mono_jit_compile_method): Remove unused local variable.
19439
19440         * mini.c (mono_jit_compile_method_inner): Ditto.
19441         
19442 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
19443
19444         * tramp-x86.c (x86_class_init_trampoline): Fix build.
19445         
19446         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
19447
19448 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
19449
19450         * mini.c (mono_no_aot): Remove unused global variable.
19451
19452         * mini.c: Thread safety fixes.
19453
19454 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
19455
19456         * mini.c (mono_create_class_init_trampoline): Add a lock around
19457         class_init_hash_addr.
19458
19459         * arrays.cs (test_0_newarr_emulation): Add new regression test for
19460         #30073.
19461
19462         * mini.c: Decompose the NEWARR instruction before decomposing its
19463         arguments. Fixes #30073.
19464
19465 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
19466
19467         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
19468         convention.
19469
19470 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
19471
19472         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
19473
19474         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
19475
19476         * driver.c: Add support for compiling icall wrappers to --compile.
19477
19478 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
19479
19480         * inssel.brg: The empty value in class->interface_offsets is -1, not
19481         0. Fixes #49287.
19482
19483 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
19484
19485         * objects.cs: New test for 'is' operator on an array of interfaces.
19486
19487 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
19488
19489         * tramp-ppc.c: update trampoline code to support jumps
19490         and class initialization.
19491
19492 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
19493
19494         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
19495
19496         * inssel.brg (OP_UNBOXCAST): Fix #46027.
19497
19498         * inssel.brg (OP_UNBOX): Remove unused rule.
19499
19500         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
19501         region instead of one for each method. Fixes #47813.
19502
19503 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
19504
19505         * exceptions.cs (test_0_nested_finally): New regression test for
19506         nested exception handlers.
19507
19508         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
19509
19510         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
19511
19512         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
19513         inlining.
19514
19515         * mini.c (mono_method_check_inlining): Make the inlining limit 
19516         configurable by an environment variable.
19517         
19518         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
19519
19520         * mini.h: Bump AOT file version.
19521
19522         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
19523         token, store the image along with the token, since the token might not 
19524         refer to the same image as the method containing the relocation, 
19525         because of inlining.
19526
19527 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
19528
19529         * mini.c (mono_precompile_assemblies): New function to compile
19530         all methods in all loaded assemblies.
19531
19532         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
19533
19534         * regalloc.h regalloc.c (MonoRegState): Change the type of 
19535         iassign and fassign to int*, since they can contain large negative
19536         values if the register is spilled. Also added some comments. Fixes
19537         #45817.
19538
19539         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
19540         under Win32. Fixes #42964.
19541
19542 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
19543
19544         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
19545
19546         * aot.c: Added support for AOT compiling methods which contain calls
19547         to wrappers. Currently, only remoting-invoke-with-check wrappers are
19548         handled.
19549         
19550         * driver.c (compile_all_methods): Run the compilation in a thread
19551         managed by mono. Fixes #44023.
19552
19553         * mini.c (mono_codegen): Print full method name in verbose output.
19554
19555         * mini-x86.c (mono_arch_patch_code): Fix warning.
19556         
19557         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
19558         jumps, since the method we are jumping to might be domain-specific.
19559
19560         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
19561
19562 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
19563
19564         * inssel.brg: string chars are unsigned.
19565
19566 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
19567
19568         * TODO: New todo item.
19569
19570         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
19571         which calls mono_runtime_class_init and patches the call site to
19572         avoid further calls.
19573         (mono_arch_create_class_init_trampoline): New arch specific function 
19574         to create a class init trampoline.
19575         (create_trampoline_code): Generalized so it can create
19576         class init trampolines as well.
19577
19578         * mini.c (helper_sig_class_init_trampoline): New helper variable.
19579         (mono_create_class_init_trampoline): New function to create and cache
19580         class init trampolines.
19581         (mono_find_class_init_trampoline_by_addr): New function to lookup the
19582         vtable given the address of a class init trampoline. Used by the
19583         patching process.
19584         (mono_codegen): Generate a call to a trampoline instead of
19585         mono_runtime_class_init in LDSFLD[A].
19586         (mono_codegen): Add relocations for the new trampoline.
19587         
19588         * mini.h mini-x86.c aot.c: Added a new relocation type: 
19589         MONO_PATCH_INFO_CLASS_INIT.
19590
19591         * mini.h: Bump AOT version number.
19592
19593         * aot.c: Create a copy of the loaded code instead of using the original
19594         so methods which call each other will be close in memory, improving
19595         cache behaviour.
19596         
19597         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
19598         patch since it breaks the regression tests.
19599         
19600         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
19601         for the register saving instruction sequence since the 
19602         frame_state_for function in glibc 2.3.2 don't seem to detect it.
19603
19604 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
19605
19606         * TODO: Fix todo item && remove another.
19607
19608 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
19609
19610         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
19611         previous checkin.
19612
19613         * aot.c: Moved the check for MONO_LASTAOT into the initialization
19614         function of the module.
19615
19616         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
19617         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
19618         --no-aot command line option.
19619
19620 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
19621
19622         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
19623         by Bernie Solomon (bernard@ugsolutions.com).
19624
19625         * inssel.brg: Refactor the interface offset table related code into
19626         its separate functions and add support for the AOT case.
19627
19628 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
19629
19630         * aot.c (mono_aot_get_method_inner): Fix memory leak.
19631         
19632         * aot.c: Added mono_aot_verbose variable and made all debugging
19633         output depend on the value of this variable.
19634
19635         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
19636         method_label and info_label.
19637
19638         * mini.h mini-x86.c aot.c: Added a new relocation type 
19639         MONO_PATCH_INFO_IID for klass->interface_id.
19640
19641         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
19642         the MonoJitInfo structure.
19643
19644         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
19645         a non-root appdomain in shared mode.
19646
19647 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
19648
19649         * aot.c: make aot loader less verbose. Remove free of unused variable.
19650
19651 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
19652
19653         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
19654
19655         * .cvsignore: Added *.dll.
19656
19657         * mini.c (mono_print_tree_nl): New function callable while debugging.
19658
19659         * mini.c (mono_print_code): Export this.
19660
19661         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
19662         patched code.
19663
19664 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
19665
19666         * mini.h (MonoCompile): Added 'jit_info' field.
19667
19668         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
19669         the cfg structure, since it is needed by the AOT compiler.
19670
19671         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
19672
19673         * aot.c: A major rewrite. Changes include:
19674         - save exception tables for methods which have them.
19675         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
19676         to g_module_symbol.
19677         - reworked the file format so it is now much smaller and needs
19678         fewer relocation entries.
19679         
19680 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
19681
19682         * aot.c (load_aot_module): Fix build bustage on platforms without
19683         Boehm GC.
19684
19685 2003-09-04  Martin Baulig  <martin@ximian.com>
19686
19687         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
19688
19689 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
19690
19691         * TODO: Some new optimization ideas.
19692
19693         * aot.c: Move AOT module loading logic here from mono_assembly_open.
19694
19695         * aot.c: Save the optimization flags used to compile the code into
19696         the AOT module.
19697
19698         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
19699         support emitting domain specific code.
19700         
19701         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
19702         no longer domain neutral. It can be made domain neutral by compiling 
19703         with --optimize=shared.
19704
19705         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
19706         between appdomains.
19707
19708         * driver.c mini.h mini.c: New --no-aot debugging option which disables
19709         loading of AOT code.
19710
19711         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
19712         
19713         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
19714         if there is no domain neutrality information.
19715
19716 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
19717
19718         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
19719         format version into the generated library.
19720
19721         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
19722         callee method into the caller since one of them could be shared.
19723
19724         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
19725         system exceptions from AOT code now works.
19726
19727         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
19728         method if it is domain neutral and the callee is not.
19729
19730         * graph.c (cfg_emit_one_loop_level): Fix warning.
19731
19732 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
19733
19734         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
19735         last checkin.
19736
19737 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
19738
19739         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
19740         is needed  by code which is executed before mono_runtime_init ().
19741         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
19742         
19743         * mini.c (mono_thread_abort): Fix warning.
19744         (mono_jit_compile_method): Call static constructor in the AOT case too.
19745
19746         * aot.c (mono_compile_assembly): Fix warning.
19747
19748 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19749
19750         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
19751
19752 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
19753
19754         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
19755
19756         * cpu-pentium.md: Fix the length of call opcodes so they include the
19757         ESP restoring instruction. Fixes #47968.
19758
19759 2003-08-28  Martin Baulig  <martin@ximian.com>
19760
19761         * mini-x86.c (mono_arch_call_opcode): Added support for
19762         MONO_TYPE_GENERICINST.
19763
19764         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
19765
19766 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
19767
19768         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
19769         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
19770
19771         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
19772         metadata_section.
19773
19774 2003-08-26  Martin Baulig  <martin@ximian.com>
19775
19776         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
19777         when reporting an error, set this to the actual error location.
19778         (mono_method_to_ir): Report the correct error location if
19779         get_basic_blocks() returned an error.
19780
19781 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
19782
19783         * mini.c (mono_type_blittable): OBJECT is not blittable.
19784         (mono_method_blittable): Methods which have marshalling descriptors
19785         are not blittable either. Fixes #47842.
19786
19787 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
19788
19789         * driver.c mini.c: Use an environment variable instead of a global 
19790         variable. Also fix the build.
19791
19792         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
19793         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
19794         reporting this. 
19795
19796         * driver.c mini.c: Added --with-valgrind option to turn off some
19797         code which prevents mono from running under valgrind.
19798
19799         * mini.c (mono_emit_call_args): Fixed warning.
19800
19801         * mini.c (mono_emulate_opcode): Fixed warning.
19802
19803 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19804
19805         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
19806         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
19807         regalloc.c, regalloc.h: specify available registers in arch-specific
19808         code and support floats in the regallocator (patch by Laurent Morichetti 
19809         <l_m@pacbell.net>)
19810
19811 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
19812
19813         * mini.c: mono_thread_current() can be called only after
19814         mono_runtime_init(): rearrange code to not call it early on.
19815
19816 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
19817
19818         * mini.c: allocate jump tables in the code mempools.
19819
19820 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19821
19822         * mini.c, mini.h: make sure per-thread data allocated by the jit is
19823         freed.
19824
19825 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
19826
19827         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
19828         12 to 16.  This fixes bug #47453.
19829
19830
19831 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
19832
19833         * mini-ppc.c: fixed indexed load and unsigned compares.
19834
19835 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
19836
19837         * mini.c: reenabled installation of handler for
19838           thread abort signal.
19839
19840 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19841
19842         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
19843         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
19844         until it's fixed and actually useful.
19845
19846 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
19847
19848         * inssel-long32.brg: couple more opcodes implemented.
19849
19850 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
19851         
19852         * mini-sparc.c: Even more opcodes implemeted.
19853
19854 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
19855
19856         * mini-sparc.c: More opcodes implemented.
19857
19858 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
19859
19860         * mini-sparc.c: More opcodes implemented.
19861
19862 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
19863
19864         * inssel-sparc.brg: Add some needed rules.  Direct
19865         copy from PPC.
19866         * Makefile.am: Use inssel-sparc.brg
19867         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
19868         an assert happy for now.
19869
19870 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
19871
19872         * mini-sparc.c: Fixed compile errors.
19873         * exceptions-sparc.c: Same.  We now produce a mono binary 
19874         on sparc-linux.  Yea.
19875
19876 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
19877
19878         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
19879         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
19880         They compile, but do not work.
19881
19882 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19883
19884         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
19885         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
19886         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
19887         (ct@gentoo.org).
19888
19889 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19890
19891         * mini.c: more opcodes implemented and better support for generics.
19892
19893 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
19894
19895         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
19896         * mini.c, mini.h: first cut at generics support: some new instructions 
19897         added and changed the behaviour of some of the existing ones.
19898
19899 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
19900
19901         * mini.c: Removed definition of metadata_shared mutex here.
19902
19903 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
19904
19905         * mini-x86.c: make vararg calls work for instance methods.
19906
19907 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
19908
19909         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
19910         returns the arguments in a separte list, now.
19911
19912 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
19913
19914         * aot.c, mini.c: updates for array type representation changes.
19915
19916 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
19917
19918         * mini.c: register function to perform jit shutdown.
19919
19920 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19921
19922         * mini.c: use a faster allocator if possible.
19923
19924 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
19925
19926         * aot.c: some cleanups and portability changes.
19927
19928 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
19929
19930         * mini.c: use faster allocation for CEE_BOX if possible.
19931
19932 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
19933
19934         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
19935         Moved inlined mempcy code to its own function so that is can be
19936         reused. Added an inline memset function as well (optimized initobj).
19937         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
19938
19939 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
19940
19941         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
19942
19943 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
19944
19945         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
19946         arch code can setup the cpu for CLR execution, if needed.
19947         We use it on x86 to set the precision of FP operations.
19948
19949 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
19950
19951         * mini.c: disable some optimizations if we can guess they'll cost too
19952         much for a given method.
19953
19954 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
19955
19956         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
19957         
19958 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
19959         * mini.h mini.c mini-x86.c: Added instruction level coverage 
19960         info collection support.
19961
19962 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
19963
19964         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
19965         is now implemented in the profiling API. Get rid of a couple of
19966         unnecessary global variables.
19967
19968 2003-06-15  Nick Drochak <ndrochak@gol.com>
19969
19970         * basic-long.cs: tests for negative values for bigmul, and unsigned.
19971         * cpu-g4.md: add op_bigmul and op_bigmul_un
19972         * cpu_pentium.md: add op_bigmul_un
19973         * inssel-long32.brg: add rule for unsigned bigmul
19974         * mini-ops.h: define OP_BIGMUL_UN
19975         * mini-x86.c: THE BUG: handle (un)signed properly
19976         * mini.c: choose unsigned opcode if needed.
19977         This set of patches fixes bug #44291
19978
19979 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
19980
19981         * mini.c (optimize_branches): improved to handle all kinds of
19982         conditional branches.
19983
19984 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
19985
19986         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
19987         don't raise exceptions.
19988
19989 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
19990
19991         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
19992         to arch-specific files.
19993
19994 2003-06-09  Martin Baulig  <martin@ximian.com>
19995
19996         * Makefile.am (libs): Added $(LIBGC_LIBS).
19997
19998 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
19999
20000         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
20001         and OP_ATAN (fixes bug#44293).
20002
20003 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
20004
20005         * Makefile.am, mini-x86.c: rename cpu description array to
20006         pentium_desc, since some compilers define the 'pentium' preprocessor
20007         symbol.
20008
20009 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
20010
20011         * mini.c (mini_select_instructions): add explicit branch if the
20012         following block is not the false target of a conditional branch -
20013         we need this with any optimization that reorder or remove bblocks
20014
20015         * mini.c (optimize_branches): bug fixes
20016
20017 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
20018
20019         * mini.c (mono_method_to_ir): inline static readonly fields
20020
20021         * ssa.c (fold_tree): start cfold support for long (very simple
20022         cases only)
20023
20024         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
20025
20026 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
20027
20028         * inssel.brg: fixed memcpy (bug #44219).
20029
20030 2003-06-05  Dick Porter  <dick@ximian.com>
20031
20032         * driver.c: Set the glib log levels to not abort if g_message
20033         recurses.
20034
20035         g_set_prgname() has to happen before mini_init() so that the
20036         process handle gets the info.
20037         
20038 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
20039
20040         * driver.c: add intrins to the default optimizations to get wider
20041         exposure.
20042
20043 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
20044
20045         * mini.h: some large basic blocks will overflow a 16-bit
20046         integers for symbolic registers.
20047
20048 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
20049
20050         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
20051         (mono_arch_output_basic_block): fix bug 43499 
20052
20053 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
20054
20055         * mini.c: kill duplicated definition of mono_debug_format.
20056
20057 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
20058
20059         * mini-x86.c, arrays.cs: fixed register allocation bug.
20060
20061 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
20062
20063         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
20064
20065         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
20066
20067 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20068
20069         * mini.c:
20070         (print_method_from_ip): also print source location information if
20071         available.
20072
20073 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
20074
20075         * mini.c (mono_find_block_region): bug fix in region code
20076         (mini_method_compile): enable removing unreachable code again, but
20077         only in methods without exception clauses.
20078
20079 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
20080
20081         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
20082         Implemented arglist opcode and handling of TypedReference type.
20083         Fixed x86 call convention when a structure is returned.
20084         Minimal support for calling static vararg methods.
20085
20086 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
20087
20088         * mini.c (mini_method_compile):  always remove unreachable code,
20089         because the code in them may be inconsistent  (access to dead
20090         variables for example).
20091
20092 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
20093
20094         * driver.c, debug-mini.c: warning fixes.
20095
20096 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
20097
20098         * Makefile.am, jit.h, mini.h: install header for embedding mono.
20099
20100 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
20101
20102         * mini.c: thread-static fields are registered in mono_class_vtable(),
20103         so ensure the function is called before checking for them.
20104
20105 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
20106
20107         * mini.c (optimize_branches): fix for bug 43586
20108
20109         * jit-icalls.c (mono_llmult_ovf): added an additional check for
20110         overflow (fixes Bug #43639)
20111
20112 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
20113
20114         * mini.c, objects.cs: allow the use of stobj for primitive types.
20115
20116 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
20117
20118         * mini.c: be less strict about argument checking until we support
20119         running the verifier.
20120
20121 2003-05-27  Nick Drochak <ndrochak@gol.com>
20122
20123         * basic-long.cs: tests for (ulong)int * (ulong)int also
20124         * mini.c: use the same trick for (ulong)int * (ulong)int
20125
20126 2003-05-27  Nick Drochak <ndrochak@gol.com>
20127
20128         * basic-long.cs: add regression test for (long)int * (long)int
20129         * cpu-pentium.md: add op_bigmul specification
20130         * inssel-long32.brg: add OP_BIGMUL rule
20131         * mini-ops.h: add OP_BIGMUL
20132         * mini-x86.c: register allocator: handle case where src1 needs to be
20133         in EAX.
20134         * mini.c: substitute special BIGMUL opcode in the tree for 
20135         (long)int * (long)int
20136
20137 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
20138
20139         * jit-icalls.c: call the type ctor on field access if needed.
20140
20141 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
20142
20143         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
20144         to a method (including results of ldelema, bug#43207).
20145
20146 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
20147
20148         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
20149         colors to show exception handler blocks.
20150
20151         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
20152         (fix for pinvoke7.cs).
20153
20154 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
20155
20156         * mini.h, mini.c: ensure correct initialization order for types that
20157         require it. Prepare for lazy compilation of jit icall wrappers.
20158         Provide a name for opcode emulation to reduce unneeded mallocing.
20159
20160 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
20161
20162         * mini-x86.c: better register restoring code and profiling
20163         support for tail calls.
20164
20165 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
20166
20167         * mini.h, driver.c: prepare for leaf methods optimization.
20168
20169 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
20170
20171         * mini.c: get targets of branches before converting a method.
20172
20173 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
20174
20175         * mini.c (optimize_branches): added some experimental code (disbaled) 
20176
20177 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
20178
20179         * mini.c (optimize_branches): fix branch to branch optimization 
20180
20181         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
20182
20183         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
20184
20185         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
20186
20187         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
20188         if needed.
20189
20190 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
20191
20192         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
20193         enable use of interface variables again.
20194
20195         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
20196         I1 to registers because there is no simply way to sign extend 8bit
20197         quantities in caller saved registers on x86.
20198
20199         * inssel-float.brg: set costs of some rules to 2 so
20200         that monobure always select the arch. specific ones if supplied,
20201         regardless of the order we pass the files to monoburg.
20202
20203 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
20204
20205         * mini.c, mini-x86.c: since the magic trampoline for jumps
20206         can't patch the code directly, we do it as soon as the
20207         method gets compiled.
20208
20209 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
20210
20211         * mini-x86.c, mini.h: introduce a new patching method
20212         to support CEE_JMP and tail calls.
20213         * mini.c: obey tail.call. Don't precompile methods target
20214         of CEE_JMP.
20215         * tramp-x86.c: new trampoline code to handle methods
20216         reached through a jump.
20217
20218 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
20219
20220         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
20221         bit values to registers
20222
20223 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
20224
20225         * mini.c (mono_compile_get_interface_var): share interface
20226         variables if possible.
20227
20228 2003-05-16  Martin Baulig  <martin@ximian.com>
20229
20230         * debug-mini.c (mono_init_debugger): New function to initialize
20231         the debugger.  This is not in the debugger since it needs to
20232         access some of mini's internals.
20233
20234 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
20235
20236         * mini.c (mono_method_to_ir): inlining fixes/cleanups
20237
20238 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
20239
20240         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
20241         for value type handling.
20242
20243 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
20244
20245         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
20246         (mono_method_check_inlining): enable inlining of all kinds of wrappers
20247
20248 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
20249
20250         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
20251           the constructor through a proxy.
20252
20253 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
20254
20255         * jit-icalls.c, inssel.brg: fixes to array element address
20256         calculations.
20257
20258 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
20259
20260         * mini-x86.c (is_regsize_var): allocate pointer to registers
20261
20262 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
20263
20264         * driver.c: fixed typo, added intrins to the set of optimizations
20265         tested with regressions.
20266
20267 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
20268
20269         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
20270         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
20271         test case.
20272
20273 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
20274
20275         * inssel.brg: remove some common pop instructions without side effects
20276
20277 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
20278
20279         * inssel-x86.brg: fixed thinko in int to double conversions.
20280
20281 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
20282
20283         * mini.c, jit-icalls.c: added runtime thread-static variable support.
20284
20285 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
20286
20287         * inssel-long32.brg: two more missing instructions.
20288
20289 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
20290
20291         * mini.c (mono_emit_call_args): set the cil_code for all arguments
20292         if not already set.
20293
20294 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
20295
20296         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
20297         correctly.
20298
20299         * basic-float.cs: Added tests for negative zero.
20300
20301 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
20302
20303         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
20304         a couple of missing operations for long casts, with test cases.
20305
20306 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20307
20308         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
20309
20310 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
20311
20312         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
20313         code size estimation.
20314
20315 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
20316
20317         * mini.c (mono_jit_create_remoting_trampoline): make it work with
20318         abstract methods (fix bug 42542)
20319
20320         * aot.c: add ability to handle array types
20321         
20322 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
20323
20324         * mini.c: Call the _specific versions of the object allocation
20325         functions if possible.
20326
20327 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
20328
20329         * driver.c: call setlocale ().
20330
20331 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
20332
20333         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
20334         windows build.
20335
20336 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
20337
20338         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
20339
20340         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
20341         wrappers (fix bug 42122)
20342
20343 2003-05-04  Martin Baulig  <martin@ximian.com>
20344
20345         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
20346
20347         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
20348         s/mini_set_defaults/mono_set_defaults/g.
20349
20350 2003-05-04  Martin Baulig  <martin@ximian.com>
20351
20352         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
20353
20354 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
20355
20356         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
20357         (reported by Don Roberts).
20358
20359 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
20360
20361         * mini.c: temporarily work around two bugs for this release.
20362
20363 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
20364
20365         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
20366         that contains -export-dynamic and it makes using the ld script
20367         useless.
20368         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
20369
20370 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
20371
20372         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
20373         specific cpu.
20374
20375 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
20376
20377         * mini.c: make sure leave calls all the needed finally blocks,
20378         even when the target jumps out of multiple exception clauses.
20379
20380 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
20381
20382         * ldscript, Makefile.am: add linker script to reduce the number of
20383         exported symbols (should also fix the issues with libwine defining
20384         some of the same symbols in io-layer).
20385
20386 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
20387
20388         * driver.c (mini_main): Avoid assertion when no file name is given on 
20389         the command line.
20390
20391 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
20392
20393         * driver.c: added --version/-V command line option.
20394         Added the inline optimization in the regression tests.
20395
20396 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
20397
20398         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
20399         to the type in the method signature (fixes bug#42134).
20400
20401 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
20402
20403         * mini.c: when inlining, check this is not null only when needed (bug #42135).
20404
20405 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
20406
20407         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
20408
20409 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20410
20411         * driver.c: fixed bug #42100.
20412
20413 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
20414
20415         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
20416
20417 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
20418
20419         * mini.c: moved most of the code required to do inlining to its own
20420         function so it can be reused. Inline also ctors if appropriate.
20421
20422 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
20423
20424         * Makefile.am: Link with -export-dynamic so shared libs loaded by
20425         the runtime can call mono API functions.
20426
20427 2003-04-27  Martin Baulig  <martin@ximian.com>
20428
20429         * debug-mini.c (mono_debug_init_method): Added
20430         `guint32 breakpoint_id' argument; if the method has a breakpoint,
20431         send a notification to the debugger.
20432
20433         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
20434         running in the Mono Debugger, just pass the breakpoint number to
20435         mono_debug_init_method().
20436
20437         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
20438
20439 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
20440
20441         * mini.c: allow some more unsafe compares.
20442
20443 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
20444
20445         * mini-x86.c, Makefile.am: make distcheck works (partially from
20446         a patch by Richard Lee <r.h.lee@attbi.com>).
20447         * regset.c, regset.h: removed, they are unused.
20448
20449 2003-04-25  Dick Porter  <dick@ximian.com>
20450
20451         * driver.c: Usage reports the name as 'mono' not 'mini'
20452         * exceptions-x86.c: Build and run on freebsd
20453
20454 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
20455
20456         * Makefile.am: install the program with the 'mono' name and
20457         the library as libmono instead of mini and libmini.
20458
20459 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
20460
20461         * driver.c: provide the APIs for the embedding interface of the old jit.
20462
20463 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
20464
20465         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
20466
20467 2003-04-23  Martin Baulig  <martin@ximian.com>
20468
20469         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
20470
20471         * driver.c: Added `--debug' command line argument to enable
20472         debugging support.
20473
20474 2003-04-23  Martin Baulig  <martin@ximian.com>
20475
20476         * debug.[ch]: Removed.  The code is now in
20477         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
20478
20479         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
20480         last six months.
20481
20482 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
20483
20484         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
20485
20486 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20487
20488         * mini.c:
20489         (mini_cleanup): moved mono_runtime_cleanup call after the call to
20490         mono_domain_finalize.
20491         (mini_method_compile): use mono_method_profile* if the the option is
20492         enabled.
20493
20494 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
20495
20496         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
20497         methods with their wrapper.
20498
20499         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
20500         methods with their wrapper.
20501
20502         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
20503         their wrapper.
20504
20505         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
20506         wrapper.
20507
20508         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
20509         methods.
20510
20511 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
20512
20513         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
20514
20515 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
20516
20517         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
20518         of the mempool. This is slightly faster and uses less memory
20519
20520 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
20521
20522         * mini.c: avoid O(n) allocation for variables.
20523
20524 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
20525
20526         * mini.c: handle items on the stack after inlining methods.
20527
20528 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
20529
20530         * mini.c: make the method->opcode optimization dependent
20531         on MONO_OPT_INSTRINS and do it lazily.
20532
20533 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
20534
20535         * driver.c: print overall results at the end of regression run.
20536
20537 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
20538
20539         * inssel.brg: don't overwrite symbolic registers.
20540
20541 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
20542
20543         * inssel-x86.brg: fix conversion from long to float.
20544
20545 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
20546
20547         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
20548
20549 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
20550
20551         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
20552
20553         * driver.c: Added --print-vtable option as in the old JIT.
20554
20555 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
20556
20557         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
20558
20559 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
20560
20561         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
20562
20563 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
20564
20565         * mini.c regalloc.c regalloc.h: Fix memory leak.
20566
20567 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
20568
20569         * aot.c (mono_aot_get_method): register all used strings
20570
20571 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
20572
20573         * mini.c: always intern strings references with ldstr at compile time.
20574
20575 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
20576
20577         * Makefile.am: add BUILT_SOURCES.
20578
20579 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
20580
20581         * driver.c: give a better error message when the assembly to execute
20582         doesn't have an entry point.
20583
20584 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
20585
20586         * Makefile.am: added hack for automake
20587
20588         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
20589         correct sematics.
20590
20591         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
20592
20593 22003-04-07  Martin Baulig  <martin@ximian.com>
20594
20595         * Makefile.am: Added Makefile.am.
20596
20597         * debugger-main.c: Removed, this is now in the debugger where it
20598         belongs.
20599
20600         * mini.pc.in: Call this package `mini' for the moment.
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615