2008-06-16 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
2
3         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
4         a widening op.
5
6 2008-06-16  Mark Probst  <mark.probst@gmail.com>
7
8         * mini.h: Removed class relations enum that's not used anymore.
9
10 2008-06-16  Mark Probst  <mark.probst@gmail.com>
11
12         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
13
14         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
15         the lazy fetch trampoline access code.
16
17 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
18
19         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
20
21 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
22
23         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
24
25         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
26
27         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
28
29 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
30
31         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
32         intrinsics.
33
34         * mini-ops.h: Add MIN/MAX_UN opcodes.
35
36         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
37         intrinsics.
38
39         * basic-math.cs: Add more min/max tests.
40
41         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
42
43 2008-06-13  Mark Probst  <mark.probst@gmail.com>
44
45         * mini.c: Small fix in the prologue of emit_castclass.
46
47 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
48
49         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
50
51         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
52         do not work even for unsigned types. Fixes #400014.
53
54         * basic-math.cs: Add regression tests for unsigned Min/Max.
55
56 2008-06-13  Mark Probst  <mark.probst@gmail.com>
57
58         * mini.c: Added additional context_used argument to several
59         functions, which will be needed for sharing generic methods.  Use
60         GET_RGCTX macro wherever appropriate.  Declare only one
61         context_used in mono_method_to_ir().
62
63 2008-06-13  Mark Probst  <mark.probst@gmail.com>
64
65         * mini.c, generic-sharing.c: Removed generic class relations.
66
67         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
68         functions due to MRGCTX changes.
69
70 2008-06-13  Mark Probst  <mark.probst@gmail.com>
71
72         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
73         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
74         with calculated IMT.
75
76         * mini.c: Generic sharing of calls via generic interfaces.
77
78         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
79         generic method with non-constant MonoGenericContext*.  Instead,
80         the context is taken out of the method itself.
81
82 2008-06-13  Mark Probst  <mark.probst@gmail.com>
83
84         * mini.c: Generic sharing of ldvirtftn.
85
86 2008-06-13  Mark Probst  <mark.probst@gmail.com>
87
88         * mini.c: Generic sharing of ldftn.
89
90 2008-06-13  Mark Probst  <mark.probst@gmail.com>
91
92         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
93
94 2008-06-13  Mark Probst  <mark.probst@gmail.com>
95
96         * mini.c: Generic sharing of the special case of ldtoken followed
97         by a call to GetTypeFromHandle.
98
99 2008-06-13  Mark Probst  <mark.probst@gmail.com>
100
101         * mini.c: Generic sharing of box for nullable types.
102
103 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
104
105         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
106         are passed on the stack. Fixes #324807.
107
108 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
109
110         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
111         for the ArgValuetypeAddrInIReg case.
112
113         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
114         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
115
116         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
117         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
118         local variable and pass the local variable by reference to the called method.
119           
120         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
121         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
122
123         Contributed under MIT/X11 license.
124
125 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
126
127         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
128
129         * debug-mini.c (mono_debug_print_vars): Release memory after printing
130         everything.
131
132 2008-06-10  Martin Baulig  <martin@ximian.com>
133
134         * debug-mini.c
135         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
136
137 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
138
139         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
140         possible error when no arguments are passed.
141
142         Contributed under MIT/X11 license.
143
144 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
145
146         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
147         where the file name is NULL.
148
149 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
150
151         * mini.c: Fix s390 build.
152
153 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
154
155         * trace.c (mono_trace_parse_options): Fix warnings.
156
157         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
158
159 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
160
161         * mini.c (remove_block_if_useless): Avoid printing the method name.
162         
163         * mini.c: Remove needless setting of ins->cil_code which is now done by 
164         MONO_INST_NEW.
165
166         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
167         LMF. Not yet used.
168
169         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
170         translated code after it has been patched.
171
172 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
173
174         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
175         avoid problems during code patching on SMP systems.
176         (emit_call): Avoid adding a patch info which is already added by 
177         emit_call_body.
178         (mono_arch_emit_exceptions): Ditto.
179
180 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
181
182         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
183         MONO_TYPE_ISSTRUCT already checks for it.
184
185 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
186
187         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
188           structs with floats on Winx64 the float registers are not used.  
189           The integer registers are always used..
190         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
191           only one register will be used and only if the size of the struct 
192           is 1,2,4, or 8 bytes.
193
194         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
195           to work for Winx64.
196
197         Contributed under MIT/X11 license.
198
199 2008-06-05  Martin Baulig  <martin@ximian.com>
200
201         * debug-debugger.c (debugger_lookup_class): Also call
202         mono_class_setup_methods() here; we're only called from RTI.
203
204 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
205
206         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
207         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
208         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
209         Post-process object files and add dtrace-generated object, if necessary.
210
211         Contributed under MIT/X11 license.
212
213 2008-06-04  Mark Probst  <mark.probst@gmail.com>
214
215         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
216         element class.
217
218         * mini.c: Generic sharing for unbox.any and castclass.
219
220 2008-06-04  Mark Probst  <mark.probst@gmail.com>
221
222         * mini.c: Ignore tailcall prefix in shared generic code and when
223         doing calls which require a vtable/rgctx argument.
224
225 2008-06-04  Mark Probst  <mark.probst@gmail.com>
226
227         * mini.c: Don't free the JIT info.
228
229         * driver.c: Changes in the JIT info table testing code.
230
231 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
232
233         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
234         interruption. Fix some warnings.
235
236         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
237         interruption_checkpoint.
238
239 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
240
241         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
242         from embedding applications.
243
244 2008-06-02  William Holmes  <billholmes54@gmail.com>
245
246         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
247           reserving 32 bytes on the stack when making calls. 
248
249         Contributed under MIT/X11 license.
250
251 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
252
253         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
254         the linear IL branch.
255
256         * driver.c: Print out more information for --version on arm.
257
258 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
259
260         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
261         bb_exit instead, since out of line bblocks might not actually be emitted
262         out-of-line.
263         
264         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
265         maximum epilog size for out of line bblocks if tracing is enabled.
266
267         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
268
269 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
270
271         * arrays.cs: Regression tests for allocating arrays with negative sizes.
272
273 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
274
275         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
276         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
277         opcodes.
278
279 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
280
281         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
282         the 'value' to store is a constant.
283
284         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
285
286         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
287         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
288
289 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
290
291         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
292         for accessing method->generic_container.
293
294 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
295
296         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
297         
298         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
299
300         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
301
302         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
303         fails.
304
305 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
306
307         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
308
309         * mini.c: Handle the case when mono_class_vtable () fails.
310
311 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
312         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
313         the stat profiler.
314
315 2008-05-22  Mark Probst  <mark.probst@gmail.com>
316
317         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
318         together with domain sharing.
319
320 2008-05-22  Mark Probst  <mark.probst@gmail.com>
321
322         * mini.c: Treat callvirts to final methods like non-virtual calls
323         when doing generic sharing, i.e. look them up in the runtime
324         generic context.
325
326 2008-05-22  Mark Probst  <mark.probst@gmail.com>
327
328         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
329         with computed types (for generic sharing).
330
331         * mini.c: Generic sharing for mkrefany and refanyval.
332
333 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
334
335         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
336         possible.
337
338         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
339         the generic sharing code.
340         
341         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
342         when needed.
343
344 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
345
346         * mini.h: Remove the declaration of mono_aot_init_vtable ().
347
348 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
349
350         * driver.c: updated copyright date
351
352 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
353
354         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
355         needed.
356
357 2008-05-19  Martin Baulig  <martin@ximian.com>
358
359         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
360         pointing to the new `_mono_debug_using_mono_debugger' variable.
361
362         * driver.c
363         (mono_main): Check mono_debug_using_mono_debugger() rather than
364         the `MONO_INSIDE_MDB' environment variable to check whether we're
365         inside the debugger.
366
367 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
368
369         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
370         argument.
371
372 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
373
374         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
375
376         * mini.c: Added mini_assembly_can_skip_verification. This
377         function checks if the assembly requested to skip verification. 
378         Fixes part of #387274.
379
380 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
381
382         * mini.c (mini_get_method): Disable the check for open generic classes when
383         using generic sharing.
384
385         * generics.cs: Add a test #387034.
386
387         * mini.c (mini_get_method): Check whenever the method class is an open generic
388         type, and return NULL in that case, causing a verification error. Fixes
389         #384123.
390
391 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
392
393         * driver.c (mono_main): Revert r102623. The right
394         thing to do is to enable the verifier under verifiable
395         unless a --security flag was passed.
396
397         We need this non-trivial behavior for --verify-all otherwise
398         mcs-compileall won't be able to use it. As it needs everything to
399         be verified under validil.
400
401 2008-05-06  Martin Baulig  <martin@ximian.com>
402
403         Fix #383749.
404
405         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
406         (mono_debugger_thread_cleanup): Likewise.
407         (mono_debugger_extended_notification): Likewise.
408
409 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
410
411         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
412         against both inflated and non-inflated methods. We need to check against the
413         generic definition for cases where the instantiated method is not visible.
414         We need to check against the inflated types for cases where the instantiation
415         changes any super type. This fixes #382986.
416
417         Note that this doesn't need to be applied to other parts of mono_method_to_ir
418         that check for visibiliy as generic params only appears as the type subject
419         of tokens on call opcodes. Field manipulation and ldftn must always
420         target an exact type.
421
422 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
423
424         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
425         if no related --security flag is passed.
426
427 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
428
429         * mini-arch.h: Prepare support for ppc64.
430
431         Contributed under MIT/X11 license.
432
433 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
434
435         * aot-runtime.c: Prepare support for ppc64.
436
437         Contributed under MIT/X11 license.
438
439 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
440
441         * mini-ops.h: Prepare support for ppc64.
442
443         Contributed under MIT/X11 license.
444
445 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
446
447         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
448
449         Contributed under MIT/X11 license.
450
451 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
452
453         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
454         assemblies, since aot_name is not a full path, causing us to load MS.NET 
455         assemblies on windows.
456
457 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
458
459         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
460         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
461         * main.c: Use UTF-8 encoded command line instead of Windows default code
462         page on Windows to support Unicode.
463         * driver.c (DllMain): New function for mixed-mode assembly support.
464         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
465         export __stdcall functions without decoration.
466
467         Contributed under MIT/X11 license.
468
469 2008-04-28  Mark Probst  <mark.probst@gmail.com>
470
471         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
472         saving it very early.
473
474 2008-04-28  Mark Probst  <mark.probst@gmail.com>
475
476         * mini.h, mini.c: Lots of code for accessing the old RGCTX
477         deleted.  The only way to access the new RGCTX is via the
478         trampline.
479
480         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
481         vtable instead of the RGCTX to static methods.
482
483         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
484         accessing the new RGCTX.
485
486         * generic-sharing.c: There is no separation between self, type
487         arguments and other types in the RGCTX anymore.
488
489 2008-04-25  Jonathan Chambers <joncham@gmail.com>
490
491         * mini-amd64.c (add_general): Remove previous stack adjustment.
492         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
493         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
494         for 32 bytes of stack space reserved for all calls.
495         
496         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
497         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
498         adjustment.
499         
500         Code contributed under MIT/X11 license.
501
502 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
503
504         * mini.c (mini_method_verify): Only verify non-inflated methods, check
505         against the root definition, peeling out method and type instantiations.
506         Cache verify success results, code that fails verification is still
507         checked multiple times.
508
509 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
510
511         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
512
513 2008-04-23  Jonathan Chambers <joncham@gmail.com>
514
515         * mini-amd64.c (add_general): Always increment stack on Win64.
516         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
517         on Win64.
518         
519         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
520         stack based argument handling on Win64.
521         
522         Code contributed under MIT/X11 license.
523
524 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
525
526         * Makefile.am (version.h): Add support for git-svn.
527
528 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
529
530         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
531         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
532         avoiding allocations and libc functions which might deadlock.
533         
534         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
535         'no-gdb-backtrace' option is set.
536
537         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
538
539         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
540
541 2008-04-21  Martin Baulig  <martin@ximian.com>
542
543         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
544         and `get_lmf_addr'; `notification_address' is no longer a pointer.
545
546 2008-04-21  Martin Baulig  <martin@ximian.com>
547
548         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
549         `thread_vtable', `event_handler_ptr' and `event_handler'.
550
551 2008-04-21  Martin Baulig  <martin@ximian.com>
552
553         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
554         allows delayed initialization of the `executable_code_buffer' when
555         attaching.
556
557 2008-04-21  Martin Baulig  <martin@ximian.com>
558
559         * mini.h (mono_debugger_create_notification_function): Removed.
560         * tramp-*.c (mono_debugger_create_notification_function): Removed.
561
562         * mdb-debug-info64.s
563         (MONO_DEBUGGER__notification_function): Added this in the .text section.
564
565         * mdb-debug-info32.s
566         (MONO_DEBUGGER__notification_function): Added this in the .text section.
567
568         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
569         currently only works on x86 and x86_64, so don't create it on ppc.
570
571 2008-04-21  Martin Baulig  <martin@ximian.com>
572
573         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
574
575         * mini.c
576         (mini_method_compile): In the fp elimination check, check
577         `debug_options.mdb_optimizations' in addition to
578         mono_debug_using_mono_debugger().       
579
580         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
581         disable some JIT optimizations which are only disabled when
582         running inside the debugger.
583         Added `--help-debug' option to describe the debugging options.
584         (parse_debug_options): New static function to parse the `--debug'
585         options, so we can easily add more stuff in future.
586
587 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
588
589         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
590         the method has no body.
591
592 2008-04-19  Jonathan Chambers <joncham@gmail.com>
593
594         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
595         assembly is not allowed in MSVC 64-bit compiler. 
596         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
597         as we get floating point exceptions everywhere.
598         
599         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
600         correctly align arguments for call to throw_exception.
601         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
602         
603         Code contributed under MIT/X11 license.
604
605 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
606
607         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
608
609 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
610
611         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
612
613         * mini-amd64.c (NEW_INS): Set cil_code.
614
615         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
616         from mini-amd64.c so all debugger related logic is in one place.
617
618         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
619         later won't have a random ip assigned to them.
620
621 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
622
623         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
624         the arch specific function initializes code_size.
625         (mono_create_delegate_trampoline): Ditto.
626
627         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
628         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
629         platforms.
630
631         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
632         running under the debugger.
633
634         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
635         debugger.
636
637         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
638         debugger. Also move the disabling of optimizations here from driver.c.
639         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
640         debugger.
641
642         * mini.h (MonoCompile): Add a few new flags.
643
644 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
645
646         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
647         so the cil_code field of created MonoInst's is properly set.
648         (mini_select_instructions): Ditto.
649
650         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
651         (MONO_INST_NEW_CALL): Ditto.
652
653         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
654         in many places so the ins->cil_code field is properly initialized.
655
656         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
657         place.
658
659 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
660
661         * mini.c (mini_method_compile): Print a different message when compiling a 
662         shared method.
663         
664         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
665         > 1.
666
667 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
668
669         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
670         SSE2 instructions.
671
672         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
673         
674 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
675
676         * mini.c (handle_stack_args): Make this return void since its return value was
677         never used. Also set cfg->unverifiable for invalid IL instead of calling
678         G_BREAKPOINT ().
679
680 2008-04-10  Mark Probst  <mark.probst@gmail.com>
681
682         * mini.c: Make sure "this" is live in catch clauses with type
683         variables in shared generic code.
684
685 2008-04-08  Mark Probst  <mark.probst@gmail.com>
686
687         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
688         generic_class_is_reference_type() to ensure the proper behaviour
689         when sharing generic code and the type in question is a type
690         argument.
691
692 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
693
694         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
695         race conditions when printing thread dumps. Fixes #377738.
696
697 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
698         
699         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
700         shows up when both MonoInst arguments can cause aliasig.
701         There is likely no way in the current JIT to trigger this problem, but
702         it showed up in the development of generics sharing, when in a new
703         opcode both args of an OP_GROUP can be aliases (addresses of a local).
704         When the generics sharing code will be committed, its tests will be
705         valid also for this bug.
706
707 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
708
709         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
710         PATCH_INFO_METHOD.
711
712         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
713         NULL.
714
715 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
716
717         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
718         use a more detailed exception message for InvalidCastException.
719
720         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
721
722         * driver.c (mono_main): Add --debug=casts option to turn on better 
723         InvalidCastException message details.
724
725         * mini.c (mini_get_debug_options): New helper function to return the address of
726         the debug_options variable.
727
728         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
729         the jit_tls TLS variable.
730
731         * mini.c (mono_jit_tls): New TLS variable.
732
733         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
734         option is used.
735
736 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
737
738         * mini.h: Removed verifer related stuff. This code was moved to verify.c
739
740         * mini.c: Removed verifer related stuff, code moved to verify.c.
741
742         * driver.c: Using code from verify.c instead of mini.c.
743
744 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
745
746         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
747         longer valid.
748
749 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
750
751         * mini.c (check_for_method_verify): Enabling verification of
752         corlib if mono_verify_all is set. Bugs in the verifier preventing that
753         have been fixed.
754
755 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
756
757         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
758         caller saved registers as well.
759         
760         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
761         saved registers as well.
762
763 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
764
765         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
766
767         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
768         code.
769
770 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
771
772         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
773         to get_call_info.
774         (get_call_info): Take a gsctx argument instead of 'cfg'.
775
776 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
777
778         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
779         mono_verify_all is set.
780
781         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
782
783         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
784
785 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
786
787         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
788         an exception.
789
790         * driver.c mini.c mini.h: Add a --verify-all development option to test the
791         verifier and the code generated by the compiler.
792
793 2008-03-25  Mark Probst  <mark.probst@gmail.com>
794
795         * mini.c: Generic sharing of the non-nullable case of the box
796         instruction.
797
798 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
799
800         * inssel.brg: Fix the build.
801
802         * iltests.il.in: Add a test for lconv.ovf.u8.un.
803
804 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
805
806         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
807         Array:Address. Fixes #372410.
808
809         * iltests.il.in: New tests for readonly prefix.
810
811 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
812
813         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
814         mini-trampolines.c.
815
816         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
817         mini-exceptions.c.
818
819         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
820         
821         * mini.c (mono_decompose_op_imm): New helper function.
822
823         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
824         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
825         return value.
826
827         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
828         mono_arch_output_basic_block. Fix warnings.
829
830         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
831         for now.
832
833 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
834
835         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
836         since the extra frame is now detected automatically inside the loop.
837
838         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
839         opts which are now in mono_peephole_ins ().
840         
841         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
842
843         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
844         frames and skip duplicate managed-to-native frames. Fixes #367665.
845
846         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
847         opts which are now in mono_peephole_ins ().
848         (mono_arch_peephole_pass_2): Ditto.
849
850         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
851
852         * mini-codegen.c (mono_peephole_ins): New helper function containing the
853         arch independent peephole optimizations.
854
855         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
856         opts which are now in mono_peephole_ins ().
857
858         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
859         
860         * mini-s390.c (mono_arch_output_basic_block): Fix build.
861
862         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
863         pattern.
864
865         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
866         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
867         opcode. 
868
869 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
870
871         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
872         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
873         return value.
874
875         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
876         mono_arch_output_basic_block. Fix warnings.
877
878 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
879
880         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
881         conv.ovf.u.un.
882
883 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
884
885         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
886         conv.ovf.u.un.
887
888         * iltests.il: Add new tests.
889
890 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
891
892         * mini.c: Removed Windows version macros.
893
894 2008-03-20  Mark Probst  <mark.probst@gmail.com>
895
896         * generic-sharing.c: Put reflection types in the extensible part
897         of the runtime generic context.
898
899         * mini.c: Generic sharing of the GetTypeHandle special case of the
900         ldtoken instruction.
901
902 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
903
904         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
905
906         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
907         
908         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
909         consistency with the other version on the linear IR branch.
910
911         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
912
913         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
914
915         * iltests.il.in: Add new tests.
916
917 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
918
919         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
920
921         * iltests.il.in: Add new tests.
922
923 2008-03-19  Mark Probst  <mark.probst@gmail.com>
924
925         * mini.c: Two variables with the same name were declared in
926         nesting contexts and one wasn't initialized.  Fixed.
927
928 2008-03-19  Mark Probst  <mark.probst@gmail.com>
929
930         * mini.c: Generic sharing of the initobj instruction.
931
932 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
933
934         * mini.c: make the test to optimize ldtoken from typeof() more
935         precise.
936
937 2008-03-18  Mark Probst  <mark.probst@gmail.com>
938
939         * mini.c: Generic sharing of the initobj instruction for reference
940         types.
941
942 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
943
944         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
945         the mono_breakpoint_clean_code() code to perform bound checks.
946
947 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
948
949         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
950         mono_arch_patch_callsite() to include the start of the managed method
951         to be able to perform bound checks.
952
953 2008-03-17  Mark Probst  <mark.probst@gmail.com>
954
955         * mini.c: Generic sharing for the isinst instruction.
956
957 2008-03-17  Mark Probst  <mark.probst@gmail.com>
958
959         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
960         inssel-long32-mips.brg: Added opcodes for doing indirect calls
961         with the runtime generic context argument.
962
963         * mini.c: Share calls to several types of unsharable methods by
964         putting the address of the method code in the runtime generic
965         context and doing an indirect call.
966
967         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
968         to switches.
969
970 2008-03-16  Mark Probst  <mark.probst@gmail.com>
971
972         * generic-sharing.c: Change due to a change in the runtime genric
973         context API.
974
975 2008-03-15  Martin Baulig  <martin@ximian.com>
976
977         * tramp-x86.c
978         (mono_arch_nullify_class_init_trampoline): Add call to
979         mono_breakpoint_clean_code() to make things work when running
980         inside the debugger.
981
982         * tramp-amd64.c
983         (mono_arch_nullify_class_init_trampoline): Add call to
984         mono_breakpoint_clean_code() to make things work when running
985         inside the debugger.
986
987 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
988
989         * inssel-long.brg (reg): Fix 64 bit build.
990
991 2008-03-14  Mark Probst  <mark.probst@gmail.com>
992
993         * mini.c, mini.h: Share static generic code by passing it an
994         implicit argument pointing to the runtime generic context.
995
996         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
997         inssel-long32-mips.brg: New opcodes for calling shared static,
998         which need to be passed the runtime generic context.
999
1000         * mini-amd64.c, mini-x86.c: Save the runtime generic context
1001         argument on the stack in the prologue if needed.  New function for
1002         finding the runtime generic context argument from the registers
1003         saved by the trampoline.
1004
1005         * mini-amd64.h, mini-x86.h: Specify which register to use for the
1006         runtime generic context argument.
1007
1008         * tramp-amd64.c: Also restore the register used for the runtime
1009         generic context argument.
1010
1011         * mini-trampoline.c: Resolve shared static calls by consulting the
1012         runtime generic context via the new argument.
1013
1014         * generic-sharing.c: Add an argument to sharability-checking
1015         functions that specifies whether type variables should be treated
1016         as sharable type arguments.
1017
1018         * inssel-x86.brg: Removed a superfluous, buggy rule.
1019
1020         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
1021         to switches.
1022
1023 2008-03-14  Martin Baulig  <martin@ximian.com>
1024
1025         * debug-debugger.c (main_thread_handler): Call
1026         mono_runtime_run_main() without sending any notifications.
1027
1028         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
1029
1030 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
1031
1032         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
1033
1034 2008-03-14  Mark Probst  <mark.probst@gmail.com>
1035
1036         * tramp-x86.c: Fixed register restore offsets in the trampoline
1037         code for ECX and EDX.
1038
1039 2008-03-12  Geoff Norton  <gnorton@novell.com>
1040
1041         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
1042         different ucontext_t implementations.
1043         * exceptions-arm.c: Use the above defines to get exceptions working on 
1044         iPhone (based on a patch by Luke Howard lukeh@padl.com)
1045         * mini-arm.c: Implement iPhone icache support (based on a patch by
1046         Luke Howard lukeh@padl.com)
1047
1048 2008-03-12  Mark Probst  <mark.probst@gmail.com>
1049
1050         * mini.c: Enable generic sharing of calls to non-static
1051         non-interface non-generic non-value-type methods.
1052
1053         * mini-trampolines.c: Resolve calls from shared generic code.
1054
1055 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
1056
1057         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
1058
1059         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
1060
1061 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
1062
1063         * mini.c: some fixes for the AOT compiler.
1064
1065 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
1066
1067         * cpu-amd64.md: Add clob:1 to some float opcodes.
1068
1069 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
1070
1071         * mini.h: Added MiniVerifierMode enumeration.
1072
1073         * mini.c: Added mini_verifier_set_mode to control
1074         the usage of the new verifier.
1075
1076         * mini.c (mono_method): Integrated the new verifier.
1077
1078         * driver.c: Extended --security option with validil and
1079         verifiable options to activate the new verifier.
1080
1081 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
1082
1083         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
1084         optimization to ctors taking 0 or 2 arguments too.
1085
1086         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
1087         a bit.
1088
1089         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
1090
1091         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
1092
1093 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
1094
1095         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
1096         non-aot case as well.
1097
1098         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
1099
1100         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
1101         changes.
1102
1103         * aot-compiler.c (encode_patch): Ditto.
1104
1105         * mini.h (G_MININT32): Fix the definition of this.
1106
1107 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
1108
1109         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
1110
1111         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
1112
1113 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
1114
1115         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
1116         methods returning vtypes in registers.
1117         (mono_arch_allocate_vars): Ditto.
1118
1119         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
1120
1121         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
1122
1123         * generics.cs: Add a test from the linear IR branch.
1124
1125         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
1126
1127         * mini.c (inline_method): Cache failed inline attempts.
1128
1129 2008-03-04  Mark Probst  <mark.probst@gmail.com>
1130
1131         * mini.c: For shared methods of generic classes put the location
1132         of "this" into the MonoGenericJitInfo.
1133
1134         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
1135         register out of a MonoContext by register number.  Add the generic
1136         sharing context as an argument to mono_arch_find_this_argument().
1137
1138         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
1139         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
1140         for new arch function.
1141
1142         * mini-exception.c: Handle open exception clauses in shared
1143         generic code.
1144
1145         * mini-trampolines.c: Supply additional argument to
1146         mono_arch_find_this_argument().
1147
1148 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
1149
1150         * Makefile.am (regtests): Run the bench.exe tests last.
1151
1152 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
1153
1154         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
1155         a bit.
1156
1157 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
1158
1159         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
1160         with MS.
1161
1162         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
1163         
1164         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
1165
1166         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
1167         whose class has no cctor.
1168
1169         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
1170
1171 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
1172
1173         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
1174         unverified.
1175
1176 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
1177
1178         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
1179         to be in sync with the code on the linear IR branch.
1180
1181         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
1182
1183         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
1184
1185 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
1186
1187         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
1188
1189         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
1190
1191         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
1192
1193         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
1194
1195         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
1196         
1197         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
1198         body.
1199
1200 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
1201
1202         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
1203         OP_LOADR4_MEMBASE emission.
1204
1205         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
1206         (mono_spillvar_offset_float): Ditto.
1207
1208         * mini-mips.c (mono_arch_emit_prolog): Ditto.
1209
1210         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
1211         emission.
1212
1213         * basic-long.cs: Add regression tests for them.
1214
1215         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
1216         use.
1217         (mono_arch_allocate_vars): Fix representation of single-precision float
1218         argument.
1219         (mono_arch_output_basic_block): Ditto.
1220
1221         * inssel-mips.brg: Ditto, remove duplicate items.
1222
1223         * mini-mips.c (emit_load_volatile_arguments): New function to handle
1224         arguments of tail calls as on other platforms.
1225         (mono_arch_output_basic_block): Handle tail calls.
1226
1227         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
1228         register.
1229
1230         * objects.cs (test_5_pass_static_struct): Add test for it.
1231
1232         Contributed under MIT/X11 license.
1233
1234 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
1235
1236         * Makefile.am: Use gmcs for compiling the regression tests.
1237
1238         * *.2.cs *.2.il: Rename to *.cs and *.il.
1239
1240 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
1241
1242         * regalloc.h: Make the vassign array smaller.
1243
1244         * mini.c (mini_method_compile): Remove an unused field in cfg.
1245
1246         * mini-codegen.c: Add a bunch of micro optimizations.
1247
1248 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
1249
1250         * regalloc.h: Remove some unused fields.
1251
1252 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
1253
1254         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
1255
1256         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
1257
1258 2008-02-22  Mark Probst  <mark.probst@gmail.com>
1259
1260         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
1261
1262         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
1263         trampoline: Fetch an entry from the runtime generic context.  If
1264         it's NULL, jump to the actual trampoline to fill the runtime
1265         generic context.  Otherwise, return it.
1266
1267         * mini.c: Call the lazy fetch trampoline to get entries out of the
1268         runtime generic context.
1269
1270         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
1271         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
1272         tramp-sparc.c: Stubs for the lazy fetch trampoline.
1273
1274 2008-02-21  Mark Probst  <mark.probst@gmail.com>
1275
1276         * mini.c: Fetch data out of the extensible part of the runtime
1277         generic context instead of calling a helper function.
1278
1279         * generic-sharing.c: Some functions moved into
1280         metadata/generic-sharing.c.  Helper function for fetching other
1281         types now checks and asserts against extensible rgctx (just for
1282         debugging purposes - the helper function isn't called anymore
1283         unless for debugging).
1284
1285 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1286
1287         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
1288         for tail calls up to the point that the tests in iltests.exe run. Also add a
1289         dummy CKFINITE implementation.
1290         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
1291         needed for trampoline LMF frames.
1292
1293         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
1294         trampoline LMF frames.
1295
1296 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
1297
1298         * mini.c (inline_method): clean any pending loader error when inlining fail.
1299         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
1300
1301 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1302
1303         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
1304
1305         * aot-runtime.c (decode_patch_info): Ditto.
1306
1307         * mini.c (mono_resolve_patch_target): Ditto.
1308         
1309         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
1310         icall wrappers.
1311
1312         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
1313         
1314         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
1315         if it references an icall address.
1316
1317 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
1318
1319         * cpu-s390x.md: Remove some more unused opcodes.
1320         
1321         * cpu-s390x.md: Remove some unused opcodes.
1322
1323         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
1324         mono_op_imm_to_op ().
1325
1326         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
1327         instead of a switch statement.
1328         
1329         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
1330         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
1331
1332         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
1333         
1334         * mini-codegen.c: Remove unused mono_regstate2_... functions.
1335
1336         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
1337         -1.
1338
1339 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
1340
1341         * driver.c (mono_main): Improve error reporting when an assembly cannot be
1342         opened. Fixes #362607.
1343
1344         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
1345
1346         * iltests.il.in: Add a test for static methods in interfaces.
1347
1348 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
1349
1350         * genmdesc.c (build_table): Fix a crash on older glib versions.
1351
1352         * cpu-sparc.md: Remove some unused opcodes.
1353         
1354         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
1355         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
1356
1357         * cpu-amd64.md: Remove some unused opcodes.
1358
1359         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
1360         like the other opcodes.
1361
1362 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
1363
1364         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
1365
1366         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
1367
1368         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
1369         variables 'cfg' instead of 'm' for consistency.
1370
1371         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
1372
1373         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
1374         argument holding the vtype return address, to avoid the ambigious use of
1375         cfg->ret for this purpose.
1376
1377         * mini.c (NEW_RETLOADA): Use vret_addr if set.
1378
1379         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
1380         
1381         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
1382         new mono_print_ins () function which only takes one argument.
1383
1384 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
1385
1386         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
1387         macro arguments.
1388
1389 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
1390
1391         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
1392
1393         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
1394
1395         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
1396         opcodes and other small changes.
1397
1398         * mini-ops.h: Add some new opcodes from the linear IR branch.
1399
1400         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
1401
1402         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
1403         opcodes, use the REG_MEMBASE opcodes instead.
1404         
1405         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
1406         opcodes, use the REG_MEMBASE opcodes instead.
1407         
1408         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
1409         linear IR branch.
1410
1411         * mini.c (mono_op_imm_to_op): New helper function.
1412
1413         * mini-ops.h: Add some opcodes from linear IR branch.
1414
1415 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
1416
1417         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
1418         <tsv@solvo.ru>.
1419
1420 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
1421
1422         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
1423         OP_ICONV_TO_R4/R8.
1424
1425         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
1426
1427 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
1428
1429         * aot-compiler.c (emit_method_code): Add an assert.
1430
1431         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
1432         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
1433         methods.
1434
1435 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
1436
1437         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
1438         some load/store opcodes so they are consistent. 
1439         (mono_arch_emit_prolog): Simplify some code.
1440
1441         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
1442
1443         * objects.cs: Add tests for large argument offsets on ARM.
1444
1445         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
1446         stack offsets. Fixes #359651.
1447
1448         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
1449
1450         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
1451
1452         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
1453
1454         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
1455
1456         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
1457
1458         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
1459         rid of CEE_CONV_R_UN.
1460
1461         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
1462
1463 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
1464
1465         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
1466
1467         * mini.c (mono_normalize_opcodes): Add some more opcodes.
1468
1469         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
1470
1471         * cpu-amd64.md: Remove some unused opcodes.
1472
1473         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
1474
1475         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
1476
1477         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
1478         arch specific functions for its parts. Call the peephole pass after local
1479         regalloc so the prolog can compute a more accurate max_offset.
1480         
1481         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
1482         the corresponding OP_I/OP_L opcodes.
1483
1484         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
1485
1486         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
1487
1488 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1489
1490         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
1491         as they are handled in mini.c.
1492
1493         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
1494         
1495         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
1496         case since it is handled in mini.c.
1497
1498         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
1499
1500         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
1501
1502         * *.c: Use the new opcodes in the IR and back end code.
1503
1504         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
1505
1506         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
1507
1508 2008-02-06  Mark Probst  <mark.probst@gmail.com>
1509
1510         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
1511         an assert because it has a race condition.
1512
1513 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1514
1515         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
1516
1517         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
1518
1519         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
1520
1521         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
1522         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
1523
1524 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
1525
1526         * cpu-amd64.md (move): Correct the maximum size of move.
1527
1528 2008-02-05  Mark Probst  <mark.probst@gmail.com>
1529
1530         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
1531         the generic class init trampoline to return quickly if the class
1532         is already inited.
1533
1534 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
1535
1536         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
1537         issues where an 32 bit callsite cannot be patched by a 64 bit address.
1538
1539 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
1540
1541         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
1542         branch.
1543
1544 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
1545
1546         * objects.cs: Add some soft-float tests.
1547
1548         * mini.c: Fix a couple more soft-float issues.
1549
1550         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
1551
1552         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
1553         avoid a REX prefix.
1554
1555 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
1556
1557         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
1558         exception happens while compiling a virtual method.
1559
1560 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
1561
1562         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
1563         
1564         * mini-sparc.c: Fix build.
1565
1566         * mini-sparc.c (get_call_info): Add support for generic sharing.
1567
1568         * mini-exceptions.c: Add a FIXME.
1569
1570 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
1571
1572         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
1573         altstack handling code.
1574
1575         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
1576         
1577         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
1578
1579         * mini-s390.c: Add support for generic sharing.
1580
1581         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1582         Fix CAS on s390.
1583         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1584
1585         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
1586
1587         * mini-s390x.c: Add support for generic sharing.
1588         
1589         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1590         Fix CAS on ia64.
1591         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1592
1593         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
1594         can be used since it takes a 16 bit signed immediate.
1595
1596         * inssel-s390x.brg: Fix OP_SETRET.
1597
1598         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
1599
1600         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
1601
1602         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
1603
1604         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
1605
1606         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
1607         in one place.
1608
1609         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
1610         stuff.
1611
1612         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
1613         of the unused mono_arch_patch_delegate_trampoline stuff.
1614
1615 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
1616
1617         * basic-long.cs: Move the fp related tests to basic-float.cs.
1618
1619         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
1620
1621         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
1622
1623         * basic-calls.cs: Add a test for proper float argument passing.
1624
1625         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
1626         if the context corresponds to an exception received through a signal.
1627
1628         * exceptions.cs: Add a test for nullref handling at the start of a try
1629         clause.
1630
1631         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
1632
1633         * jit-icalls.c (mono_break): New JIT icall.
1634
1635         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
1636
1637         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
1638
1639 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
1640
1641         * cpu-*.md: Get rid of unused opcodes.
1642
1643         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
1644
1645         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
1646         by all platforms.
1647
1648         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
1649         define.
1650
1651         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
1652         the arch independent trampoline code in mini-trampolines.c.
1653
1654         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
1655
1656         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
1657
1658         * mini-s390.h: Remove an unused define.
1659         
1660         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
1661         the arch independent trampoline code in mini-trampolines.c.
1662
1663         * mini-arm.c (mono_arch_emit_prolog): Fix build.
1664
1665 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
1666
1667         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
1668
1669         * mini-s390.c (mono_arch_emit_prolog): Fix build.
1670
1671         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
1672
1673         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
1674
1675         * cpu-amd64.md: Use smaller sizes for int opcodes.
1676
1677         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
1678
1679         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
1680         objects.cs.
1681
1682         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
1683         debugging.
1684
1685         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
1686         instead of though a pointer to save an indirection when accessing elements of
1687         the array.
1688
1689         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
1690         some typos.
1691         (NOT_IMPLEMENTED): New helper macro.
1692         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
1693         of a bb.
1694
1695         * *.c: Use the new helper macro.
1696
1697 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
1698
1699         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
1700
1701 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
1702
1703         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
1704         stack slots.
1705
1706 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
1707
1708         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
1709         profiling is enabled.
1710         
1711         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
1712         the end.
1713         (mono_arch_emit_prolog): Add more first bblock optimizations.
1714
1715         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
1716         in order if possible.
1717         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
1718         bblock, since the arguments are still in their original registers.
1719
1720         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
1721
1722 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
1723
1724         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
1725         as well.
1726
1727         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
1728         offset 0.
1729
1730         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
1731
1732         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
1733         process async exceptions received while in unmanaged code.
1734
1735         * mini.c (mini_init): Install a callback with the runtime which will be called
1736         when a thread receives an async exception while in unmanaged code.
1737
1738         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
1739
1740         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
1741
1742 2008-01-16  Wade Berrier  <wberrier@novell.com>
1743
1744         * cpu-g4.md:
1745         * cpu-arm.md:
1746         * cpu-s390x.md:
1747         fix build
1748
1749 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
1750
1751         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
1752         compilation with sun cc.
1753
1754         * cpu-*.md: Fix the build.
1755
1756         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
1757
1758         * mini-amd64.h: Add some comments to the MonoLMF structure.
1759
1760         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
1761         
1762         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
1763         in the LMF structure if possible. This saves two instructions in the
1764         managed->native wrappers.
1765
1766         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
1767
1768 2008-01-16  Mark Probst  <mark.probst@gmail.com>
1769
1770         * generic-sharing.c: New type argument lookup code which uses the
1771         runtime generic context template.
1772
1773 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
1774
1775         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
1776
1777         * mini-arm.c (add_general): Fix arm eabi parameter passing.
1778         (mono_arch_output_basic_block): Fix localloc implementation.
1779
1780         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
1781
1782         * mini-ia64.c (peephole_pass): Fix ia64 build.
1783
1784         * mini-amd64.c (peephole_pass): Fix a warning.
1785         
1786         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
1787         at a constant offset from sp/fp.
1788
1789         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
1790         instead of obtaining it from *lmf in the managed method case.
1791
1792 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
1793
1794         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
1795
1796 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
1797
1798         * mini.h (MonoInstList): New type.
1799         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
1800         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
1801         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
1802         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
1803         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
1804         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
1805         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
1806         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
1807         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
1808         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
1809         MONO_INST_LIST_FOR_EACH_ENTRY,
1810         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
1811         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
1812         mono_inst_list_first, mono_inst_list_last,
1813         mono_inst_list_next, mono_inst_list_prev): New instruction
1814         list handling interfaces.
1815         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
1816         list head 'ins_list'.
1817         (MonoInst): Replace next pointer with list head 'node'.
1818         (MonoCallInst): Make 'out_args' a MonoInstList.
1819         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
1820         (MonoCompile): Delete reverse_inst_list and
1821         reverse_inst_list_len.
1822         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
1823         mono_arch_lowering_pass, mono_arch_local_regalloc,
1824         mono_arch_output_basic_block, mono_arch_emit_prolog):
1825         Convert to new instruction lists.
1826         (insert_after_ins): Delete.
1827         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
1828         instruction lists.
1829         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
1830         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
1831         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
1832         mono_emulate_opcode, mono_emit_load_got_addr,
1833         inline_method, mono_method_to_ir, mono_print_bb_code,
1834         print_dfn, decompose_pass, nullify_basic_block,
1835         replace_out_block_in_code, remove_block_if_useless,
1836         merge_basic_blocks, move_basic_block_to_end,
1837         try_unsigned_compare, optimize_branches, mono_print_code,
1838         mini_select_instructions, remove_critical_edges): Likewise.
1839         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
1840         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
1841         mono_arch_output_basic_block, mono_arch_emit_prolog):
1842         Likewise.
1843         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
1844         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1845         mono_arch_output_basic_block): Likewise.
1846         (inst_list_prepend, insert_after_ins): Delete.
1847         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
1848         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
1849         instruction lists.
1850         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
1851         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
1852         mono_arch_emit_prolog): Likewise.
1853         * cfold.c (mono_constant_fold): Likewise.
1854         * liveness.c (visit_bb, mono_analyze_liveness,
1855         optimize_initlocals): Likewise.
1856         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
1857         * graph.c (mono_draw_code_cfg): Likewise.
1858         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
1859         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
1860         mono_ssa_cprop): Likewise.
1861         * abcremoval (get_relations_from_previous_bb, process_block):
1862         Likewise.
1863         * local-propagation (mono_cprop_invalidate_values,
1864         mono_local_cprop_bb): Likewise.
1865         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
1866         peephole_pass, mono_arch_output_basic_block,
1867         mono_arch_emit_prolog): Likewise.
1868         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
1869         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1870         mono_arch_emit_prolog): Likewise.
1871         (insert_after_ins): Delete.
1872         * aliasing.c (print_code_with_aliasing_information,
1873         mono_build_aliasing_information, mono_aliasing_deadce):
1874         Convert to new instruction lists.
1875         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
1876         peephole_pass, NEW_INS, mono_arch_lowering_pass,
1877         mono_arch_local_regalloc, mono_arch_output_basic_block):
1878         Likewise.
1879         (insert_after_ins): Delete.
1880         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
1881         peephole_pass, mono_arch_output_basic_block): Convert to
1882         new instruction lists.
1883         * mini-codegen (InstList, inst_list_prepend,
1884         insert_after_ins): Delete.
1885         (insert_before_ins, get_register_force_spilling,
1886         get_register_spilling, free_up_ireg, free_up_reg,
1887         create_copy_ins, create_spilled_store, alloc_int_reg,
1888         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
1889         to new instruction lists.
1890         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
1891         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1892         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
1893         (insert_after_ins): Delete.
1894         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
1895         mono_arch_local_regalloc, mono_arch_output_basic_block,
1896         mono_arch_call_opcode): Convert to new instruction lists.
1897         (insert_after_ins): Delete.
1898         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
1899         peephole_pass, mono_arch_output_basic_block,
1900         mono_arch_emit_prolog): Convert to new instruction lists.
1901
1902 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
1903
1904         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
1905
1906         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
1907         Fixes #353182.
1908
1909         * Makefile.am (version.h): Make this work with non-bash shells.
1910
1911 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
1912
1913         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
1914
1915 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
1916
1917         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
1918         the InitializeArray optimization.
1919
1920 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
1921
1922         * mini.c driver.c: Don't include os/gc_wrapper.h.
1923
1924 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
1925
1926         * mini.c (print_jit_stats): Print GC statistics if available.
1927
1928 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
1929
1930         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
1931
1932 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
1933
1934         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
1935
1936 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
1937
1938         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
1939         
1940         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
1941
1942         * driver.c (mono_main): Ditto.
1943
1944 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
1945
1946         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
1947
1948         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
1949         in the vtable can't be encoded.
1950         (compile_method): Ditto.
1951
1952 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
1953
1954         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
1955         defined.
1956
1957         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
1958         lmf->rbp.
1959
1960         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
1961         the top LMF entry belongs to the current method.
1962
1963         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
1964
1965 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
1966
1967         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
1968         
1969         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
1970
1971         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
1972
1973         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
1974
1975         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
1976
1977         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
1978         implementation.
1979
1980         * basic-float.cs: Add an ulong->double cast test.
1981
1982 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
1983
1984         * mini.c (mono_method_to_ir): Fix a warning.
1985
1986 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
1987
1988         * mini-ops.h: Add OP_SWITCH.
1989
1990         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
1991         CEE_SWITCH in back-end code, use OP_SWITCH instead.
1992
1993 2007-12-11  Geoff Norton  <gnorton@novell.com>
1994
1995         * mini-s390x.c: Minor change to the MAX() define to allow
1996         it to compile with other gcc versions.
1997
1998 2007-12-11  Geoff Norton  <gnorton@novell.com>
1999
2000         * cpu-s390x.md:
2001         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
2002
2003 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
2004
2005         exceptions-arm.c (mono_arch_get_restore_context): Restore
2006         the frame pointer.
2007
2008         exceptions-arm.c (throw_exception): Save the frame pointer.
2009         This is a partial fix for #323747. Only the client side is
2010         fixed.
2011
2012 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
2013
2014         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
2015         was using an unrelated variable to log the class which
2016         needed the cctor to be called. This was crashing on arm.
2017
2018 2007-12-09  Robert Jordan  <robertj@gmx.net>
2019
2020         * mini-x86.c (mono_arch_emit_epilog):
2021         Consider all kinds of 64-bit types. Fixes #323114.
2022
2023 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
2024
2025         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
2026
2027 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2028
2029         * mini-amd64.c (peephole_pass): Add a missing instruction check.
2030
2031 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2032
2033         * mini.c: run type ctor before allocating an object, not only
2034         when running it's constructor method (fixes at least part of bug #342507).
2035
2036 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2037         
2038         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
2039         
2040         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
2041         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
2042         function.
2043
2044         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
2045         mono_generic_class_init_trampoline () the same as it is done with the other
2046         trampolines.
2047
2048         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
2049         aot-runtime.c aot-compiler.c: Implement AOT support.    
2050
2051 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2052
2053         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
2054         build for archs which don't have the vtable trampoline defined
2055         yet.
2056
2057 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2058
2059         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
2060
2061         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
2062
2063         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
2064
2065         * tramp-<ARCH>.c: Use the new helper function.
2066
2067 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2068
2069         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
2070         trampoline call, which takes a vtable argument.
2071
2072         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
2073         OP_TRAMPCALL_VTABLEs like other calls.
2074
2075         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
2076         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
2077         call.  Implemented a support function which fetches the vtable
2078         from a register set.
2079
2080         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
2081         Implemented a generic class init trampoline, using the
2082         OP_TRAMPCALL_VTABLE opcode.
2083
2084         * mini.c: Implemented static field access when sharing generic
2085         code.  This implies initing the class using the new
2086         OP_TRAMPCALL_VTABLE call.
2087
2088 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2089
2090         * mini.c: Don't compile methods with sharing enabled if their
2091         classes are disabled for sharing.
2092
2093 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
2094
2095         * inssel.brg: Add a missing sign extension to the GETCHR and array access
2096         opcodes. Fixes #346563.
2097
2098         * objects.cs: Add a new test.
2099
2100         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
2101
2102         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
2103         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
2104
2105 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
2106
2107         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
2108
2109 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
2110
2111         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
2112         code stream.
2113
2114 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
2115
2116         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
2117
2118         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
2119         optimization in the AOT case.
2120         
2121 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
2122
2123         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
2124         
2125         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
2126
2127         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
2128
2129         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
2130
2131         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
2132         is created by the inlined delegate ctor.
2133
2134         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
2135
2136         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
2137
2138 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
2139
2140         * cpu-x86.md: Fix the length of ckfinite.
2141
2142 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
2143
2144         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
2145         
2146         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
2147         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
2148
2149         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
2150
2151         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
2152         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
2153
2154 2007-11-28  Martin Baulig  <martin@ximian.com>
2155
2156         * mini-x86.c
2157         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
2158         after creating the trampoline.
2159
2160 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
2161
2162         * aot-runtime.c (load_aot_module): Check runtime version if needed.
2163
2164         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
2165         the same version.
2166
2167         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
2168         instead of the calling method to help AOT.
2169
2170         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
2171
2172 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
2173
2174         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
2175         is defined.
2176
2177 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
2178
2179         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
2180         
2181         * aot-compiler.c (compile_method): Correct check for generic method definitions.
2182         (encode_method_ref): No need to handle generic method definitions specially.
2183
2184         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2185
2186         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
2187         decode_klass_info.
2188
2189         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
2190         encode_klass_info.
2191         (compile_method): Enable generic sharing.
2192
2193 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
2194
2195         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
2196         (mini_method_compile): Add preliminary support for AOTing shared generic code.
2197
2198         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
2199         generic code.
2200
2201         * mini-trampolines.c: Fix a warning.
2202
2203         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
2204         NEW_PCONST.
2205         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
2206         (generic_class_is_reference_type): Remove unused function.
2207
2208         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
2209         in the generic vtable trampoline case.
2210
2211         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
2212         
2213         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
2214         return an AOT method based on a vtable slot.
2215
2216         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
2217
2218         * mini.c (mini_get_vtable_trampoline): Export this.
2219
2220 2007-11-22  Martin Baulig  <martin@ximian.com>
2221
2222         * debug-debugger.h
2223         (MonoDebuggerInfo): Move `debugger_version' up.
2224
2225 2007-11-22  Martin Baulig  <martin@ximian.com>
2226
2227         * mini-amd64.c
2228         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
2229
2230         * mini-trampolines.c
2231         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
2232         after compiling the method.
2233
2234 2007-11-20  Martin Baulig  <martin@ximian.com>
2235
2236         * debug-mini.c
2237         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
2238         (mono_debugger_remove_breakpoint): Likewise.
2239         (mono_debugger_check_breakpoints): Likewise.
2240
2241         * debug-debugger.c: Implement the new breakpoint interface here.
2242
2243 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
2244
2245         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
2246         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
2247
2248         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
2249
2250 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
2251
2252         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
2253
2254         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
2255         mini.c.
2256
2257         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
2258         mini.c.
2259
2260         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
2261         returning a vtype in a register.
2262
2263         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
2264         here from the arch specific code.
2265
2266         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
2267         mini.c.
2268
2269         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
2270         (mono_arch_emit_prolog): Increment maximum prolog size.
2271
2272         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
2273         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
2274
2275         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
2276         MonoGenericSharingContext.
2277
2278         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
2279         MonoGenericSharingContext. Allocate memory from the cfg mempool.
2280
2281 2007-11-15  Mark Probst  <mark.probst@gmail.com>
2282
2283         * mini.c, mini.h, generic-sharing.c: Functions for producing code
2284         which extract fields out of the runtime generic context.  Full
2285         sharing of the NEWARR opcode.
2286
2287 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
2288
2289         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
2290         --enable-minimal=ssa.
2291
2292 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
2293
2294         * mini-trampolines.c (mono_delegate_trampoline): Update after 
2295         mono_marshal_get_delegate_invoke () signature change.
2296
2297 2007-11-13  Mark Probst  <mark.probst@gmail.com>
2298
2299         * mini.c: Removed the shared context in favor of the generic
2300         sharing context.  Allocate the MonoJitInfo structure with room for
2301         the generic sharing context if it's needed.
2302
2303         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
2304         domain-internals.h now.
2305
2306         * mini-x86.c: Pass the generic sharing context to get_call_info ().
2307
2308         * generic-sharing.c: Several changes for working without a shared
2309         context and instead operating on open types instead.
2310
2311 2007-11-12  David S. Miller  <davem@davemloft.net>
2312
2313        * inssel-sparc.brg: Fix double instruction emit.
2314
2315 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
2316
2317         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
2318         Get/Set/Address methods.
2319         
2320         * mini.c debug-debugger.c mini-trampolines.c: Update after 
2321         mono_marshal_get_delegate_invoke signature change.
2322
2323 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2324
2325         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
2326         This can happens with dynamic methods. Fixes the other bug in #322722.
2327
2328 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2329
2330         * tramp-arm.c (mono_arch_patch_callsite): Support patching
2331         BX call sequence.
2332
2333         * mini-arm.c (arm_patch): Implement patching of BX call
2334         sequence. Fixes one of the bugs in #322722.
2335
2336 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
2337
2338        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
2339        under Linux.  We only need to flush every 32-byte cache line.    
2340
2341 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
2342
2343         * mini.c:
2344         move_basic_block_to_end: Add branches when needed, eventually creating
2345         a new BB.
2346         optimize_branches: added a parameter that tells if it's ok to create
2347         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
2348         and avoid calling move_basic_block_to_end when it's not ok.
2349         Fixes bug 318677.
2350
2351 2007-11-07  Mark Probst  <mark.probst@gmail.com>
2352
2353         * mini.c: Abort inlining call to InitializeArray if something
2354         looks wrong.  Let the icall handle it, which now has proper safety
2355         checks.
2356
2357 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2358
2359         * mini.c (mono_spill_call): add support for soft-float.
2360
2361         * mini.c (mono_method_to_ir): add support for soft-float
2362         to inlined functions that return float.
2363
2364         * mini.c (mono_method_to_ir): add support for soft-float
2365         to cee_stsfld opcode on float fields.
2366
2367 2007-11-05  Geoff Norton  <gnorton@novell.com>
2368
2369         * mini-x86.h: Fix the structure access for X86 Leopard.
2370
2371
2372 2007-11-05  Martin Baulig  <martin@ximian.com>
2373
2374         * mini-trampolines.c
2375         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
2376         after compiling the method to notify the debugger.
2377
2378 2007-11-05  Martin Baulig  <martin@ximian.com>
2379
2380         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
2381
2382 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
2383
2384         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
2385         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
2386
2387 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
2388
2389         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
2390         native-to-managed wrappers.
2391         
2392 2007-11-01  Geoff Norton  <gnorton@novell.com>
2393
2394         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
2395         members.
2396
2397 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
2398
2399         * mini.c, mini-x86.c: when getting back from unmanaged code
2400         to managed via a marshaled delegate we also need to set the
2401         right domain.
2402
2403 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
2404
2405         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
2406         for amd64.
2407
2408 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
2409
2410         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
2411         let the debugger or other external agents to tell the JIT when
2412         a sw breakpoint has been inserted in the code that the JIT needs
2413         to be able to inspect.
2414
2415 2007-10-31  Martin Baulig  <martin@ximian.com>
2416
2417         * debug-debugger.h
2418         (MonoDebuggerInfo): Remove `runtime_class_init'.
2419
2420 2007-10-30  Martin Baulig  <martin@ximian.com>
2421
2422         * debug-mini.h
2423         (mono_debugger_thread_created): Added `MonoThread *' argument.
2424         (mono_debugger_extended_notification): New public method.
2425         (mono_debugger_trampoline_compiled): New public method.
2426
2427         * debug-mini.c
2428         (MonoDebuggerThreadInfo): Added `thread' and
2429         `extended_notifications' fields.
2430
2431         * debug-debugger.c
2432         (debugger_executable_code_buffer): New static variable.
2433
2434         * debug-debugger.h
2435         (MonoDebuggerInfo): Added `executable_code_buffer',
2436         `executable_code_buffer_size', `breakpoint_info_area',
2437         `breakpoint_table' and `breakpoint_table_size'.
2438
2439 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
2440
2441         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
2442         that IP  either is an unused value or the vtable pointer. IMT 
2443         calls use vtable + offset now. Reduced by almost half the size
2444         of IMT entries.
2445
2446 2007-10-26  Jonathan Chambers <joncham@gmail.com>
2447
2448         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
2449         defines to access param registers. Replace long usage with
2450         gsize as sizeof(long) != sizeof(void*) on Win64.
2451
2452         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
2453         on Win64. Fix intrinsic, use _AddressOfReturnAddress
2454         instead of non-existant _GetAddressOfReturnAddress.
2455
2456         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
2457         param registers. Save/restore %rdi and %rsi in MonoLMF.
2458
2459         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
2460         param registers. Modify (throw_exception) signature to take 
2461         %rdi and %rsi on Win64. 
2462
2463         Code is contributed under MIT/X11 license.
2464
2465 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
2466
2467         * helpers.c: unlink debugging output files.
2468
2469 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
2470
2471         * mini.c: Move mono_create_ftnptr () to object.c.
2472
2473 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2474
2475         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
2476         optional. This function can now be used to disassemble code generated
2477         outside the JIT such as trampolines and IMT thunks.
2478
2479         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
2480
2481         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
2482         vtable pointer from a ldr instruction.
2483
2484         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
2485         new IMT call sequence.
2486
2487         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
2488         call sequence for interface invocations.
2489
2490         * mini-arm.c (mono_arch_emit_imt_argument): added, required
2491         for imt support. This function is empty since IMT on ARM requires no
2492         special handling on the IR side.
2493
2494         * mini-arm.c (mono_arch_find_imt_method): added, required for
2495         imt support.
2496
2497         * mini-arm.c (mono_arch_find_this_argument): added, required
2498         for imt support.
2499
2500         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
2501         a ldr instruction to load a value stored in the code stream.
2502
2503         * mini-arm.c (mono_arch_build_imt_thunk):added, required
2504         for imt support.
2505
2506
2507 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
2508
2509         * mini.c (mini_init): Install the jump trampoline callback.
2510
2511 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2512
2513         * mini-trampolines.c: handle synchronized methods with the common
2514         vtable trampoline (bug #335601).
2515
2516 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
2517
2518         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
2519
2520         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
2521         64 bit platforms.
2522
2523         * mini-ia64.h mini-ia64.c: Add support for IMT.
2524
2525         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
2526         prolog. Fixes #331958.
2527
2528 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
2529
2530         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
2531
2532 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2533
2534         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
2535         trampoline.
2536
2537 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2538
2539         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
2540         trampoline.
2541
2542 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
2543
2544         * mini-x86.c, mini-x86.h: x86 support for the common vtable
2545         trampoline.
2546
2547 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
2548
2549         * mini-trampolines.c: changed the magic rampoline to understand
2550         the common vtable trampoline method: the method to invoke is
2551         determined by the vtable displacement of the call.
2552
2553 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2554
2555         * mini.c, mini.h: register the common vtable trampoline if the
2556         architecture supports it.
2557
2558 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2559
2560         * cpu-amd64.md: use the correct max length for tls_get.
2561
2562 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
2563
2564         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
2565         CEE_STELEM_ANY. Fixes #333696.
2566
2567 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2568
2569         * exceptions-x86.c: provide more graceful handling of the case where
2570         we followed a bogus function pointer from managed code (bug #332866).
2571
2572 2007-10-11  Mark Probst  <mark.probst@gmail.com>
2573
2574         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
2575         replaces the generic_shared flag and will carry more information
2576         in the future.
2577
2578         * generic-sharing.c: Added mini_type_stack_size() which allows
2579         allows open types if given a generic sharing context.
2580         mini_get_basic_type_from_generic() takes a
2581         MonoGenericSharingContext* instead of a MonoCompile* now.
2582
2583         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
2584         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
2585         mini-sparc.c, mini-x86.c: Trivial changes required by the two
2586         changes above.  Just passing arguments through to the right
2587         places.
2588
2589 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2590
2591         * mini-arm.c: unify the call emission to emit_code_seq().
2592
2593 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
2594
2595         * tramp-arm.c: reduced the trampoline size.
2596
2597 2007-10-10  Mark Probst  <mark.probst@gmail.com>
2598
2599         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
2600         variable handling out of arch-specific code.
2601
2602 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
2603
2604         * mini-arm.c: implemented fast delegate dispatch.
2605
2606 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2607
2608         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
2609         that fp elimination is turned off if the space required by locals is too
2610         big. Fixes #331958.
2611
2612 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
2613
2614         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
2615         ARM to the new style trampoline.
2616
2617 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2618
2619         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
2620
2621         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
2622
2623 2007-10-09  Martin Baulig  <martin@ximian.com>
2624
2625         * debug-debugger.h
2626         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
2627         `field_info_offset_offset'.     
2628
2629 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
2630
2631         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
2632         removed more internal usage of the r11 register and made it available
2633         to the register allocator.
2634
2635 2007-10-08  Mark Probst  <mark.probst@gmail.com>
2636
2637         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
2638         when sharing generics and treat type variables as references.
2639
2640 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2641
2642         * mini-ppc.c: started removing the internal uses of register r11
2643         to eventually allow the register allocator to manage it as an
2644         additional available register.
2645
2646 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2647
2648         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
2649
2650 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
2651
2652         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
2653         specific trampolines as they are not performance critical as a jump
2654         target (maybe align as before only for AOT code?). This saves about
2655         200 KB of native code on x86 for monodevelop startup.
2656
2657 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
2658
2659         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
2660         monodevelop startup.
2661
2662 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
2663
2664         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
2665
2666         * mini-sparc.h mini-sparc.c: Implement IMT support.
2667
2668         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
2669         its smaller and doesn't clobber sparc_g1.
2670
2671         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
2672
2673 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
2674
2675         * mini-ppc.c: optimized the size of the IMT thunks a bit.
2676
2677 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
2678
2679         * mini-ppc.c: implemented fast delegate invocation.
2680
2681 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
2682
2683         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
2684
2685 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2686
2687         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
2688         code to the new style trampoline in preparation for IMT support.
2689
2690 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
2691
2692         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
2693         systems already. This also reduces the specific trampiline sizes and
2694         prepares for the use of r12 as the IMT identifier register.
2695
2696 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2697
2698         * mini-mips.h: endianess fix (simplified from a patch by
2699         Thomas Kunze <thommy@tabao.de>, bug #323737).
2700
2701 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2702
2703         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
2704         to access ucontext fields and enable netbsd support
2705         (partially from Magnus Henoch <mange@freemail.hu>).
2706
2707 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2708
2709         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
2710         use the preprocessor from the CPP env var if it is set.
2711
2712 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2713
2714         * mini-trampolines.c: fixed an assertion and moved it earlier in the
2715         code, before interface_offset gets used.
2716
2717 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
2718
2719         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
2720         mono_class_setup_vtable () before accessing klass->vtable.
2721
2722 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
2723
2724         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
2725         hackish.
2726
2727 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2728
2729         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
2730         IMT slots (this saves hundreds of KB of memory in programs like
2731         IronPython and Monodevelop).
2732
2733 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2734
2735         * mini.c: print the delegate counter.
2736
2737 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
2738
2739         * mini-x86.c: make it easier to enable the debugging code for IMT
2740         slots.
2741
2742 2007-09-28  Martin Baulig  <martin@ximian.com>
2743
2744         * debug-debugger.h
2745         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
2746         `mono_method_klass_offset' and `mono_method_token_offset'.
2747
2748 2007-09-20  Mark Probst  <mark.probst@gmail.com>
2749
2750         * mini.c: First generics sharing implementation.  Can only share
2751         in very simple cases.  If sharing doesn't work it falls back to
2752         dedicated compilation.
2753
2754         * mini.h: Flag in MonoCompile to specify whether generic
2755         compilation is shared.  Flags enum for marking which generic inst
2756         of a context is used.  Prototypes for helper functions.
2757
2758         * generic-sharing.c: Helper functions for generic method sharing.
2759
2760         * optflags-def.h: Optimization flag (gshared) for enabling generic
2761         method sharing added.
2762
2763         * Makefile.am: generic-sharing.c added.
2764
2765 2007-09-19 Daniel Nauck <dna@mono-project.de>
2766
2767         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
2768
2769 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
2770         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
2771         fixes bug 325507.
2772
2773 2007-09-19  Martin Baulig  <martin@ximian.com>
2774
2775         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
2776         mono_debug_cleanup() is now part of mono_cleanup().
2777
2778 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
2779
2780         * driver.c (mono_main): Fix a warning.
2781
2782 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
2783
2784         * aot-compiler.c: Optimize various parts when processing large assemblies.
2785         Fixes ##325568.
2786
2787         * mini.c (mono_patch_info_hash): Improve hash function.
2788
2789 2007-09-14  Jonathan Chambers <joncham@gmail.com>
2790
2791         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
2792         
2793         Code is contributed under MIT/X11 license.
2794
2795 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2796
2797         * mini.c (mini_init): Fix a leak.
2798
2799         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
2800
2801 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2802
2803         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
2804
2805 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2806
2807         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
2808
2809 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
2810
2811         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
2812         variance tests.
2813
2814         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
2815
2816         * mini.c (handle_alloc): Enable managed allocators in AOT code.
2817
2818         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
2819
2820         * aot-runtime.c (decode_patch_info): Ditto.
2821
2822 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2823
2824         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
2825         static case. Cache delegates in architecture specific code, 
2826         based on number of parameters.
2827         
2828         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
2829         in architecture specific code, based on number of parameters.
2830         
2831         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
2832         caching happen in architecture specific code now.
2833         
2834         Code is contributed under MIT/X11 license.
2835
2836 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2837
2838         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
2839         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
2840         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
2841
2842         Code is contributed under MIT/X11 license.
2843
2844 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
2845         * mini.c: (mono_thread_abort) Fixed bug #82416.
2846
2847 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2848
2849         * mini.: hook the new managed GC allocation feature into the JIT.
2850
2851 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2852
2853         * mini.c: implementation for the new runtime tls opcode.
2854
2855 2007-09-11  Martin Baulig  <martin@ximian.com>
2856
2857         * debug-debugger.h
2858         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
2859         `mono_method_inflated_offset'.
2860
2861 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
2862
2863         * driver.c mini.h mini.c: Add a new devel command line option for injecting
2864         async exceptions into a method.
2865
2866         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
2867         purpose of testing whenever the unwinder works at every instruction.
2868
2869 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
2870
2871         * mini.c: check accessibility of method used in ldftn (fixes
2872         bug #82635).
2873
2874 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
2875
2876         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
2877
2878         * inssel.brg: Fix a warning.
2879
2880 2007-09-03  Martin Baulig  <martin@ximian.com>
2881
2882         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
2883         now takes the `main_method' as argument.
2884
2885 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
2886
2887         * cpu-sparc.md (endfilter): Add missing src1:i argument.
2888
2889 2007-08-30  Jonathan Chambers <joncham@gmail.com>
2890
2891         * driver.c: include the cil-coff.h header on Windows.
2892         
2893         Code is contributed under MIT/X11 license.
2894
2895 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2896
2897         * mini.c, driver.c: don't include the cil-coff.h header.
2898
2899 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2900
2901         * mini.c: flag places that needs fixes fo soft-float support.
2902
2903 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
2904
2905         * mini.h, inssel-float.brg: fix soft-float constant loads on big
2906         endian systems (partially from Dean Jenkins, bug #81924).
2907
2908 2007-08-28  Mark Probst  <mark.probst@gmail.com>
2909
2910         * mini.c (check_linkdemand): Remove embedded reference object in
2911         call to LinkDemandSecurityException.
2912         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
2913         with an IntPtr instead of a reference object.
2914
2915 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
2916
2917         * mini.c (handle_initobj): Handle alignment properly.
2918
2919         * inssel.brg (mini_emit_memset): Ditto. 
2920
2921         * inssel.brg (mini_emit_memcpy): Ditto. 
2922
2923         * inssel-sparc.brg: Ditto.              
2924
2925         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
2926
2927 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
2928
2929         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
2930         exceptions raised in unmanaged code. Fixes part of #82594.
2931
2932 2007-08-24  Mark Probst  <mark.probst@gmail.com>
2933
2934         * mini.c (mono_method_to_ir), declsec.c
2935         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
2936
2937 2007-08-22  Martin Baulig  <martin@ximian.com>
2938
2939         * debug-mini.h
2940         (MonoDebuggerThreadInfo): New typedef.
2941         (mono_debugger_thread_table): New global variable.
2942         (mono_debugger_thread_created): New public function.
2943         (mono_debugger_thread_cleanup): New public function.
2944
2945         * debug-debugger.h
2946         (MonoDebuggerInfo):
2947         - removed `get_current_thread' and `lookup_assembly'.
2948         - removed `data_table'.
2949         - added `thread_table'.
2950
2951         * mini.c
2952         (mono_thread_start_cb): Call mono_debugger_thread_created().
2953         (mono_thread_attach_cb): Likewise.
2954         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
2955         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
2956         initial domain.
2957
2958         * driver.c (mono_main): Move mono_debug_init() up, before calling
2959         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
2960
2961 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
2962
2963         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
2964         together when passing several arguments of type double (gives a small
2965         speedup and saves a few bytes of generated code).
2966
2967 2007-08-20  Jb Evain  <jbevain@novell.com>
2968
2969         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
2970
2971 2007-08-20  Jb Evain  <jbevain@novell.com>
2972
2973         * mini.c (mono_method_to_ir): throw MethodAccessException
2974         and FieldAccessException instead of InvalidProgramException.
2975
2976 2007-08-20  Mark Probst  <mark.probst@gmail.com>
2977
2978         * mini.c: CoreCLR security checks.
2979
2980         * mini.h: Removed MonoSecurityMode (moved to
2981         metadata/security-manager.h) and mono_security_mode global var
2982         (replaced by set/get functions in security-manager.h).
2983
2984         * driver.c: Added "core-clr-test" security mode for testing.  Used
2985         set-function for setting security mode.
2986
2987 2007-08-17  Mark Probst  <mark.probst@gmail.com>
2988
2989         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
2990         the new jit_info_table.
2991
2992         * driver.c: Test code for the new jit_info_table (enabled by the
2993         define MONO_JIT_INFO_TABLE_TEST).
2994
2995 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
2996
2997         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
2998         detection of call <REG> instruction sequence. Fixes build on freebsd.
2999
3000 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
3001
3002         * mini-exceptions.c: Fix a warning.
3003
3004 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
3005
3006         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
3007         stack overflow handling code on amd64 too.
3008
3009         * mini-exceptions.c (mono_setup_altstack): Make this use 
3010         mono_thread_get_stack_bounds ().
3011
3012         * mini-x86.h: Disable sigaltstack on solaris x86.
3013
3014 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
3015
3016         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
3017
3018 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
3019
3020         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
3021
3022 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
3023
3024         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
3025
3026         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
3027
3028 2007-08-03  Neale Ferguson <neale@sinenomine.net>
3029
3030         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
3031         due to alignment.
3032
3033 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
3034
3035         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
3036         to be emitted (bug #82281).
3037
3038 2007-08-01  Martin Baulig  <martin@ximian.com>
3039
3040         Merged the `debugger-dublin' branch.
3041
3042         * debug-debugger.h (MonoDebuggerInfo):
3043         Removed the `old_*' compatibility entries.
3044         Added `debugger_version' and `data_table'.
3045         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
3046         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
3047
3048         * debug-mini.c
3049         (MiniDebugMethodBreakpointInfo): Add `address_list'.
3050         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
3051         instead of a `gconstpointer'.
3052         (mono_debugger_insert_method_breakpoint): Return a
3053         `MonoDebugMethodAddressList *'.
3054
3055 2007-06-28  Martin Baulig  <martin@ximian.com>
3056
3057         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3058
3059 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
3060
3061         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
3062         __builtin_frame_address () since it is broken on older gcc versions.
3063
3064 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3065
3066         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
3067         on the stack overflow handling and made the managed stack overflows
3068         catchable in most cases using soft guard pages.
3069         * exceptions-x86.c: added code to restore the protection in the soft
3070         guard pages at the end of exception handling.
3071
3072 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
3073
3074         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
3075
3076 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3077
3078         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
3079         exception handling.
3080
3081 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3082
3083         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
3084         signal handling support until it has been ported to the new mechanism.
3085         * mini.c: fixed stack overflow detection and use the new
3086         architecture code  to handle signals on the altstack.
3087
3088 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
3089
3090         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
3091         stack overflows on the alt stack.
3092
3093 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
3094
3095         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
3096         stack overflows on the alt stack.
3097
3098 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
3099
3100         * exceptions-ppc.c: cleanup preparing for altstack support.
3101
3102 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3103
3104         * exceptions-arm.c: cleanup preparing for altstack support.
3105
3106 2007-07-27  Mark Probst  <mark.probst@gmail.com>
3107
3108         * mini.c (print_jit_stats): Output hazard pointer stats.
3109
3110 2007-07-26  Mark Probst  <mark.probst@gmail.com>
3111
3112         * driver.c, mini.c: Replaced security mode flags with a single
3113         enum variable.
3114
3115 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3116
3117         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
3118
3119 2007-07-25  Mark Probst  <mark.probst@gmail.com>
3120
3121         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
3122         (which doesn't do anything yet) for activating Core CLR
3123         (Silverlight) security.
3124
3125 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
3126
3127         * mini-codegen.c: work around a possible gcc bug on arm.
3128
3129 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
3130
3131         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
3132         message for platforms that don't support AOT compilation.
3133
3134 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
3135
3136         * mini.h, mini.c, driver.c: temporary smcs hack.
3137
3138 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
3139
3140         * mini-arm.h, mini-arm.c: arm EABI fixes.
3141
3142 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
3143
3144         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
3145         case.
3146
3147         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
3148         trampolines taking a method argument.
3149
3150         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
3151
3152         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
3153         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
3154
3155         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
3156         JIT compilation throws an exception. Fixes #82050.
3157
3158 2007-07-19  Mark Probst  <mark.probst@gmail.com>
3159
3160         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
3161         with the MONO_EXCEPTION_ defines.
3162
3163 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
3164
3165         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
3166         #82117.
3167         
3168         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
3169         the cause of an assertion.
3170
3171 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
3172
3173         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
3174         removed.
3175
3176 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
3177
3178         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
3179         assert. Should fix #82103.
3180
3181 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
3182
3183         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
3184         here too. Fixes #82095.
3185
3186         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
3187         addresses.
3188
3189         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
3190
3191         * mini-amd64.h: Enable IMT for amd64.
3192         
3193         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
3194
3195 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
3196
3197         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
3198
3199 2007-07-12  Mark Probst  <mark.probst@gmail.com>
3200
3201         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
3202         as soon as check_linkdemand sets an exception_type.
3203
3204 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
3205
3206         * mini-x86.c: fixed offsets for IMT call sequence.
3207         * mini-x86.h: enable IMT again.
3208
3209 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
3210
3211         * trace.c (mono_trace_enter_method): Decode MonoType too.
3212
3213         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
3214
3215         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
3216
3217         * mini-amd64.c: Add preliminary IMT implementation.
3218         
3219 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
3220
3221         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
3222         understand the new IMT-base interface invocation (thanks to
3223         Daniel Nauck for the report and the remote debugging session).
3224
3225 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
3226
3227         * mini-x86.c: size and speed optimizations for the IMT bsearch.
3228
3229 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
3230
3231         * Makefile.am (aotcheck): Make this actually use the AOTed code.
3232
3233 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
3234
3235         * mini-trampolines.c: implement AOT IMT support.
3236         * mini-x86.h: enable IMT support for wider testing.
3237
3238 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3239
3240         * inssel.brg (emit_imt_argument): Add aot support here.
3241
3242         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
3243
3244 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3245
3246         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
3247         of the IMT implementation, partially from massi, with my
3248         implementation of the bsearch sequence. Disabled by default until
3249         the AOT code is implemented.
3250
3251 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3252
3253         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
3254
3255         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
3256
3257 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3258
3259         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
3260         arch-independent IMT JIT code from Massimiliano
3261         Mantione (massi@ximian.com) with small cleanups from me.
3262
3263 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3264
3265         * Makefile.am: fix svn invocation to get the svn revision to be
3266         independent of the local language (build fix).
3267
3268 2007-07-09  Mark Probst  <mark.probst@gmail.com>
3269
3270         * mini.c (inline_method): Reset cfg->exception_type if the
3271         inlining is aborted.  Fixes: 82049.
3272
3273 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
3274
3275         * mini.c: remove assert from exception handling code when exception_ptr
3276         is not set.
3277
3278 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3279
3280         * mini.c (mono_codegen): Add an assert.
3281
3282         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
3283         enter and leave code.
3284         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
3285
3286 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3287
3288         * mini-ppc.c: fixed memory corruption for localloc(0)
3289         (bug #81852).
3290
3291 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3292         
3293         * mini.c: Fix warnings.
3294
3295 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
3296
3297         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
3298         to emit better double->int conversions.
3299
3300 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
3301
3302         * mini.c: the provided Min/Max optimizations are valid for unisgned
3303         ints.
3304
3305 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
3306
3307         * 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
3308
3309 2007-06-28  Miguel de Icaza  <miguel@novell.com>
3310
3311         * mini.c (mono_running_on_valgrind): Add support for reporting the
3312         method and  its boundaries to valgrind.
3313
3314 2007-06-28  Martin Baulig  <martin@ximian.com>
3315
3316         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3317
3318 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
3319
3320         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
3321
3322         * generic.2.cs: Add new test case.
3323
3324 2007-06-25  Martin Baulig  <martin@ximian.com>
3325
3326         Merged the `debugger-dublin' branch.
3327
3328         * debug-mini.c
3329         (mono_debugger_insert_method_breakpoint): New public method.
3330         (mono_debugger_remove_method_breakpoint): Likewise.
3331         (mono_debugger_check_breakpoints): New static method.
3332         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
3333
3334         * debug-debugger.h (MonoDebuggerInfo):
3335         Renamed (to keep backward compatibility in the vtable):
3336         `insert_breakpoint' -> `old_insert_breakpoint'.
3337         `remove_breakpoint' -> `old_remove_breakpoint'.
3338         `create_string' -> `old_create_string'.
3339         `lookup_class' -> `old_lookup_class'.
3340         `lookup_type' -> removed; changed into a dummy field.
3341         `lookup_assembly' -> `old_lookup_assembly'.
3342         Added (same functionality, but different signature):
3343         `create_string', `lookup_class', `lookup_assembly'
3344         Added new:
3345         `get_method_addr_or_bpt', `remove_method_breakpoint',
3346         `runtime_class_init'.
3347
3348         * debug-debugger.c: Merged the `debugger-dublin' branch.
3349
3350 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
3351
3352         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
3353         well.
3354         (peephole_pass): Likewise.
3355
3356 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
3357
3358         * driver.c: hopefully make setaffinity work also for ancient
3359         versions of linux.
3360
3361 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
3362
3363         * driver.c : win32 build fix.
3364
3365 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3366
3367         * driver.c: check for the MONO_NO_SMP env var and bind to a single
3368         processor if it is set.
3369
3370 2007-06-21  Martin Baulig  <martin@ximian.com>
3371
3372         * debug-mini.h: New file.
3373
3374         * debug-mini.c
3375         (mono_debugger_insert_breakpoint_full): Moved here from
3376         ../metadata/mono-debug-debugger.c.
3377         (mono_debugger_remove_breakpoint): Likewise.
3378         (mono_debugger_breakpoint_callback): Likewise.
3379
3380 2007-06-15  Raja R Harinath  <rharinath@novell.com>
3381
3382         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3383         changes in MonoGenericClass.
3384
3385 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
3386
3387         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
3388
3389 2007-06-14  Raja R Harinath  <rharinath@novell.com>
3390
3391         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3392         removal of MonoGenericMethod.
3393
3394 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3395
3396         * mini-exceptions.c: hooks for the exception events profiling API.
3397
3398 2007-06-14  Randolph Chung  <tausq@debian.org>
3399
3400         * Makefile.ma: Add hppa target.
3401         * mini-arch.h: Include mini-hppa.h
3402         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
3403         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
3404         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3405
3406 2007-06-14  Randolph Chung  <tausq@debian.org>
3407
3408         * inssel.brg: Add rules for "chained" compare-branch operations so that
3409         a single compare op can affect multiple branches.  Adjust cost for
3410         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
3411         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
3412         cost for some rules so that they can more easily be overridden by
3413         per-arch rules (with fixes from lupus).
3414         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3415
3416 2007-06-13  Randolph Chung  <tausq@debian.org>
3417
3418         * mini-ops.h: Reorder branch ops so that they match the order of the
3419         corresponding CEE_* ops.  The code expects them this way.
3420         Add new ops for HPPA target.
3421         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3422
3423 2007-06-13  Randolph Chung  <tausq@debian.org>
3424
3425         * mini-exceptions.c: Handle cases where the stack grows towards
3426         larger addresses.
3427         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3428
3429 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
3430
3431         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
3432         counter.
3433         * driver.c: explain where a non-matching corlib is found.
3434
3435 2007-06-13  Mark Probst  <mark.probst@gmail.com>
3436
3437         * mini.c (print_jit_stats): Output dynamic code allocation stats.
3438
3439 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
3440
3441         * mini-exceptions.c: Generate a method profile leave event during
3442         an exception to ensure that the profiler gets notified.
3443
3444 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
3445
3446         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
3447         branch.
3448
3449         * cpu-amd64.md: Add long_and/or/xor opcodes.
3450
3451 2007-06-06  Wade Berrier  <wberrier@novell.com>
3452
3453         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
3454         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
3455         length of instruction shr_imm (expected 8, got 10)
3456
3457 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
3458
3459         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
3460
3461 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3462
3463         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3464         MonoInternalHashTable again (fixed bug in the internal hash table
3465         code).
3466
3467 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3468
3469         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
3470         Have to figure out what makes it crash the SWF regression.
3471
3472 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
3473
3474         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
3475
3476 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3477
3478         * mini.c: optimize out the type check when storing null in a
3479         reference array.
3480
3481 2007-06-04  Mark Probst  <mark.probst@gmail.com>
3482
3483         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3484         MonoInternalHashTable.
3485
3486 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
3487
3488         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
3489         signed integer methods.
3490
3491 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3492
3493         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
3494         permanently since the current approach doesn't work.
3495
3496 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3497
3498         * inssel.brg (stmt): Only call delegate->invoke_impl if 
3499         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
3500
3501 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3502
3503         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
3504         the sreg2==rdx case.
3505         
3506         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
3507         account if it contains a rex prefix.
3508         (peephole_pass): Handle OP_FMOVE as well.
3509
3510 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3511
3512         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
3513         as it causes regressions.
3514
3515 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
3516
3517         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
3518         static case as well.
3519
3520         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
3521
3522         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3523         (mono_arch_get_this_arg_from_call): Ditto.
3524
3525         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
3526
3527         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
3528         invoke_impl field.
3529
3530         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3531         (mono_arch_get_this_arg_from_call): Ditto.
3532
3533         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
3534         
3535         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
3536         try to create optimized invoke code and use that for further invocations. 
3537         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
3538
3539         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
3540
3541 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
3542
3543         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
3544         sealed classes or methods.
3545         *devirtualization.cs: tests for the new optimization
3546
3547 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
3548
3549         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
3550         by the update_volatile () function.
3551
3552 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
3553
3554         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
3555         require it.
3556
3557         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
3558
3559 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
3560
3561         * mini.c: Add configure checks for header files.
3562         * mini-x86.c: Add configure checks for header files.
3563         * trace.c: Add configure checks for header files.
3564         * aot-runtime.c: Add configure checks for header files.
3565         * aot-compiler.c: Add configure checks for header files.
3566         * driver.c: Add configure checks for header files.
3567         * mini-codegen.c: Add configure checks for header files.
3568         
3569         Code is contributed under MIT/X11 license.
3570
3571 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
3572
3573         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
3574         icompare_imm -128 + op_iclt. Fixes #81703.
3575
3576 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
3577
3578         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
3579
3580 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
3581
3582         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
3583         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
3584         so that all isinst checks now use "interface_bitmap".
3585
3586 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
3587
3588         * cpu-amd64.md (jmp): Fix a warning.
3589
3590         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
3591
3592         * basic.cs: Add new regression test.
3593
3594         * basic.cs: Remove test which is now in basic-long.cs.
3595
3596         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
3597
3598         * basic-long.cs: Add new test.
3599         
3600 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
3601
3602         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
3603
3604 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
3605
3606         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
3607
3608         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
3609         places.
3610         
3611         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
3612         throwing code a bit.
3613
3614         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
3615         the exception throwing code a bit.
3616
3617         * mini-x86.c (get_call_info): Allocate result from a mempool.
3618
3619 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
3620
3621         * aot-compiler.c (find_typespec_for_class): Fix the assert.
3622
3623         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
3624
3625         * mini.h (MonoCompile): Add 'token_info_hash' field.
3626
3627         * mini.c: Save token->method associations during compilation so the AOT 
3628         compiler can use it.
3629         
3630         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
3631         which reference generic classes and methods.
3632
3633 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
3634
3635         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
3636
3637         * aot-compiler.c (compile_method): Fix a typo in a comment.
3638
3639         * aot-runtime.c (decode_cached_class_info): Skip generic types.
3640
3641         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
3642         everything generic.
3643
3644         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
3645
3646 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
3647
3648         * mini.h (MonoCompile): Add 'args' field.
3649
3650         * mini.c (mono_compile_create_vars): Store variables representing the arguments
3651         into cfg->args.
3652
3653         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
3654
3655 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
3656
3657         * mini.c (mono_compile_get_interface_var): Remove this unused function.
3658
3659         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
3660
3661         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
3662         opcodes for some opcodes.
3663
3664         * mini.h *.brg *.c: Use the new opcodes.
3665
3666 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
3667
3668         * mini.h: Bumped aot revision.
3669
3670         * inssel.brg: modified code generation of type checks for interfaces
3671         to use the new "MonoClass.interface_bitmap" instead of the old
3672         "MonoClass.interface_offsets".
3673
3674 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
3675
3676         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
3677
3678 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
3679
3680         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
3681         64 bit platforms.
3682
3683 2007-04-27  Neale Ferguson <neale@sinenomine.net>
3684
3685         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
3686
3687 2007-04-27  Wade Berrier  <wberrier@novell.com>
3688
3689         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
3690         mini.h) to fix build.
3691
3692 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
3693
3694         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
3695         
3696         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
3697         causes the corlib unit tests to fail.
3698
3699 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
3700
3701         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
3702
3703         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
3704
3705         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
3706         opcodes to the comparison relations.
3707
3708         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
3709         opcodes to their types.
3710         
3711         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
3712
3713         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
3714         it in cfg->arch.cinfo.
3715
3716         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
3717
3718         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
3719         cfg->cil_offset_to_bb.
3720
3721 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
3722
3723         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
3724         created becase of initlocals.
3725
3726 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
3727
3728         * mini-alpha.c cpu-alpha.md: More alpha port work from 
3729         Sergey Tikhonov <tsv@solvo.ru>.
3730
3731 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
3732
3733         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
3734
3735 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
3736
3737         * cpu-s390.md (break): Correct the length of break instruction.
3738
3739 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3740
3741         * mini.c: fix a couple of soft-float issues and comments.
3742
3743 2007-04-15  Miguel de Icaza  <miguel@novell.com>
3744
3745         * trace.c (is_filenamechar): - is also a filename char.
3746
3747 2007-04-15  Neale Ferguson <neale@sinenomine.net>
3748
3749         * mini-s390.c: Correct checking for enum type in return value processing.
3750
3751 2007-04-14  Raja R Harinath  <rharinath@novell.com>
3752
3753         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
3754         (version.h): Makefile is in the build directory.
3755
3756 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
3757
3758         * mini-amd64.h: fix for assertion failure on Solaris/amd64
3759
3760 2007-04-11  Martin Baulig  <martin@ximian.com>
3761
3762         * mini.c (can_access_member): Fix handling of generic classes;
3763         fixes #81259.
3764
3765 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
3766
3767         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
3768
3769 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
3770
3771         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
3772
3773 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3774
3775         * mini-codegen.c: make sure the right spill amount is
3776         used for fp or integer registers (fixes the float_sub_spill() on ppc).
3777
3778 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
3779
3780         * mini-ppc.c: fixes for the fp_branch_nan test.
3781
3782 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
3783
3784         * basic.cs: Comment out new test which still fails on ia64.
3785
3786 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3787
3788         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
3789
3790 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3791
3792         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
3793
3794 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
3795
3796         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
3797         on 64 bit machines. Fixes part of #80738.
3798
3799         * basic.cs: Add regression test.
3800
3801 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3802
3803         * inssel.brg basic.cs: Revert previous change to fix build.
3804
3805         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
3806         platforms.
3807         
3808         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
3809
3810         * basic.cs: Add new regression test.
3811
3812 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3813
3814         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
3815         many arguments.
3816
3817 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3818
3819         * cpu-s390x.md: Correct length of break instruction.
3820
3821 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3822
3823         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
3824         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
3825
3826 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
3827
3828         * *.c: Begin WIN64 port.
3829         * mini.c:  Use correct register in profiler.
3830         * mini-amd64.c: No inline assembly on Win64.
3831         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
3832         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
3833         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
3834         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
3835         mono_arch_ip_from_context for Win64.
3836         
3837         Contributed under MIT/X11 license.
3838
3839 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
3840
3841         * exceptions-amd64.c (seh_handler): Ditto.
3842
3843         * exceptions-x86.c (seh_handler): Fix a memory leak.
3844
3845 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
3846
3847         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
3848         mini-s390x.c: fixed peephole optimizations to deal
3849         correctly with 1 and 2 byte reload avoidance.
3850
3851 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
3852
3853         * cpu-s390.md, cpu-s390x.md: update localloc length.
3854
3855 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3856
3857         * cpu-g4.md: added missing descriptions.
3858
3859 2007-03-14  Miguel de Icaza  <miguel@novell.com>
3860
3861         *  Makefile.am: Add support so the tail tests are not executed on
3862         PowerPC as that is a known limitation of the PowerPC port.
3863
3864 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3865
3866         * runmdesc.bat:  Move to msvc directory.
3867         
3868 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3869
3870         * runmdesc.bat:  Run executable that was produced by the current
3871         target and sent via an argument.
3872         
3873 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
3874
3875         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
3876         #81102.
3877
3878         * generics.2.cs: Add regression test.
3879
3880 2007-03-09  Wade berrier  <wberrier@novell.com>
3881
3882         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
3883
3884 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
3885
3886         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
3887         AOT code depends on this.
3888
3889 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3890
3891         * mini.c: more precise tracking of types in the eval stack
3892         (part of fix for bug #81044).
3893
3894 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
3895
3896         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
3897
3898         * aot-compiler.c (encode_patch): Remove an obsolete comment.
3899
3900 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
3901
3902         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
3903
3904         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
3905
3906 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
3907
3908         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
3909         a pointer on 64 bit systems. Fixes #80190.
3910
3911         * iltests.il: Add new regression test.
3912
3913 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3914
3915         * mini.c: inline a constant for Environment.IsRunningOnWindows.
3916
3917 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
3918
3919         * trace.c: Remove an erroneous alignemnt check when tracing.
3920           Fixes --trace on OSX86.
3921
3922 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3923
3924         * mini-$(arch).h: initialize SP in context for all the archs.
3925
3926 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
3927
3928         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
3929         regressions in the thread tests.
3930
3931 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
3932
3933         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
3934         - fixed implementation of LOCALLOC opcode
3935         - implemented non-un compare for floats
3936         - code cleanup
3937         - implementation of FDIV and CKFINITE opcodes
3938         - fixes for latest mono updates
3939         - additional arch opcodes
3940
3941 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3942
3943         * Makefile.am: simplify and merge rules for cross-compilation.
3944
3945 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
3946
3947         * local-propagation.c: Actually *apply* the fix for bug 80591...
3948
3949 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3950
3951         * mini-exceptions.c: backuot part of the last change
3952         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
3953
3954 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
3955         * inssel.brg: Fix bug 59286.
3956
3957
3958 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
3959
3960         * mini-exceptions.c: patch from Zoltan to correctly check for
3961         stack boundaries (using the stack register, not the frame register),
3962         fixes bugs #80724, #79717.
3963
3964 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
3965
3966         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
3967         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
3968
3969         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
3970         presence of frame pointer elimination.
3971
3972 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
3973         
3974         * mini-x86.h: NetBSD UCONTEX_REG defines.
3975
3976 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
3977
3978         * inssel-amd64.brg: Fix amd64 build.
3979
3980 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
3981
3982         * mini.h: remove extern to workaround what looks likes gcc bug 26905
3983         on amd64.
3984
3985 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
3986
3987         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
3988         ends.
3989
3990         * mini-<ARCH>.c: Use mono_is_regsize_var ().
3991
3992 2007-01-30 Mark Mason <mason@broadcom.com>
3993
3994            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
3995            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
3996            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
3997            beginning support for CEE_JMP [not quite working yet]
3998            * tramp-mips.c: LMF handling now works
3999         
4000 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
4001
4002         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
4003
4004         * mini.h (NULLIFY_INS): New macro.
4005
4006 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4007
4008         * mini.c: statistical profiler fix for windows, patch
4009         from Tor Lillqvist (tml@novell.com).
4010
4011 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
4012         * local-propagation.c: Fix bug 80591.
4013
4014 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
4015
4016         * Makefile.am: put back the --export-dynamic option as with
4017         the previous gmodule flags (thanks to Robert Jordan).
4018
4019 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
4020
4021         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
4022
4023         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
4024         simplify and speed up the local register allocator. Also rename some fields
4025         like iassign->vassign.
4026         
4027         * regalloc.c: Remove some functions which are no longer used since their
4028         inlined version is in mini-codegen.c.
4029         
4030         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
4031
4032         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
4033
4034 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
4035
4036         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
4037         narrowing. Fixes #80622.
4038
4039         * iltests.il: Add new regresssion test. 
4040
4041 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
4042
4043         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
4044         debug-debugger.c, debug-debugger.h: warning fixes.
4045         * driver.c: updated copyright year and made it fit in one line.
4046
4047 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
4048
4049         * aot-runtime.c: updated to use mono-dl instead of gmodule.
4050
4051 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
4052
4053         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
4054
4055         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
4056
4057         * iltests.il: Add new test for bug #80507.
4058
4059 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4060
4061         * mini-arm.h: use soft-float also on vfp for now.
4062
4063 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
4064
4065         * mini.c: fix some more soft-float issues.
4066
4067 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
4068
4069         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
4070
4071 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
4072         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
4073         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
4074         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
4075
4076 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
4077
4078         * mini-arm.c: typo fix.
4079
4080 2007-01-23  Neale Ferguson <neale@sinenomine.net>
4081
4082         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
4083
4084 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
4085
4086         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
4087         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
4088
4089         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
4090
4091         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
4092
4093         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
4094         
4095         * inssel.brg: Fix a warning.
4096
4097         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
4098
4099         * abcremoval.c ssa.c ssapre.c: Update after this change.
4100         
4101         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
4102
4103         * dominators.c (df_set): Use mono_bitset_union_fast.    
4104
4105 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
4106
4107         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
4108         mini-codegen.c: reduce relocations and memory usage for the cpu
4109         description.
4110
4111 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
4112
4113         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
4114
4115         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
4116         to reduce their size.
4117
4118 2007-01-19 Mark Mason <mason@broadcom.com>
4119
4120         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
4121         * mini-mips.c: more configuration macros, support long conditional branches, additional
4122         asserts, fix epilog instrumentation.
4123         * mini-mips.h: use standard stack walk
4124         * cpu-mips.md: increase size of div, rem and conditional branches
4125         
4126 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
4127
4128         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
4129         to cpu spec data.
4130
4131 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
4132
4133         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
4134         (compile_method): Ditto.
4135
4136         * aot-runtime.c (decode_klass_info): Ditto.
4137
4138         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
4139         needed by the code generated by inssel.brg. Also fix a warning.
4140
4141 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
4142
4143         * mini.c: deal with enums that become genericinsts by
4144         being nested in a generic class (bug #79956).
4145
4146 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
4147
4148         * mini.c: match the generic definition to check for
4149         private access with generic types (bug #78431).
4150
4151 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
4152
4153         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
4154         to make life easier for people cross-compiling that insist on not
4155         using scratchbox.
4156
4157 2007-01-17 Mark Mason <mason@broadcom.com>
4158
4159         * inssel-long.brg: patch to deal with mips missing flags
4160         * inssel-long32-mips.brg: implement overflow checks
4161         * insset-mips.brg: implement overflow checks
4162         * mini-mips.h: implement conditional exception handling
4163         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
4164           Remove unused code, minor cleanups.
4165         * exceptions-mips.c: minor cleanups
4166         * mini-ops.h: add mips conditional exception ops
4167         * cpu-mips.md: add mips conditional exception ops
4168
4169         
4170 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
4171
4172         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
4173         to deal with mips missing of flags.
4174
4175 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
4176
4177         * exceptions-ppc.c: execute fault handlers.
4178
4179 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
4180
4181         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
4182
4183 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
4184
4185         * mini.c: handle also floating point values in initialize_array.
4186
4187 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
4188
4189         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
4190         array initialization and make it conditional on the intrins option.
4191
4192 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
4193
4194         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
4195         relocations and put the patch info names close to the enum definition.
4196
4197 2007-01-15 Mark Mason <mason@broadcom.com>
4198
4199         * basic.cs, exceptions.cs: break up large tests to increase debugability.
4200
4201 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4202
4203         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
4204
4205 2007-01-12  Raja R Harinath  <rharinath@novell.com>
4206
4207         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
4208
4209 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
4210
4211         * Makefile.am: distribute the mips sources.
4212
4213 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4214
4215         * mini-codegen.h: handle bug #80489 here, by excluding ecx
4216         directly.
4217
4218 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
4219
4220         * cpu-x86.md: back out for now as this triggers other regressions.
4221
4222 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
4223
4224         * cpu-x86.md: force src1 and dest regpair for long shift instructions
4225         to eax:edx, so ecx can't get allocated to them (bug #80489).
4226
4227 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
4228
4229         * mini.c, mini-exceptions.c: enabled running fault handlers
4230         (bug #80469).
4231
4232 2007-01-03  Miguel de Icaza  <miguel@novell.com>
4233
4234         * driver.c: If nothing fail, do not use the string "failed",
4235         because it makes it very annoying to view test result logs on the
4236         web. 
4237
4238 2006-12-30  Miguel de Icaza  <miguel@novell.com>
4239
4240         * debug-debugger.c (mono_debugger_main): Rename "main" to
4241         "main_method" to prevent a warning.
4242
4243         Remove a warning for unused field.
4244
4245 2006-12-28  Martin Baulig  <martin@ximian.com>
4246
4247         * debug-debugger.c
4248         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
4249
4250 2006-12-22  Martin Baulig  <martin@ximian.com>
4251
4252         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
4253         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
4254         seperate `.mdb_debug_info' section, so we can access it from the
4255         debugger even if the binary is stripped.
4256
4257         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
4258         from the `.mdb_debug_info' here to prevent the linker from
4259         removing that section.
4260
4261         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
4262         mdb-debug-info64.s.
4263
4264 2006-12-19  Robert Jordan  <robertj@gmx.net>
4265
4266         * mini-x86: enable the code to return small structures in
4267         registers for FreeBSD as well. Fixes bug #80278.
4268         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
4269
4270 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4271
4272         * mini-x86.c: align the stack when calling the profiler
4273         function instrumenting the prolog (on OSX).
4274
4275 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4276
4277         * mini.c: emit a break opcode where Debugger.Break () is called.
4278
4279 2006-12-13  Miguel de Icaza  <miguel@novell.com>
4280
4281         * mini.c (mono_method_to_ir): Provide useful information on this
4282         assert, to prevent others from debugging like I did.
4283
4284 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4285
4286         * mini.c: enable code which was incorrectly commented
4287         (bug #80235).
4288
4289 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4290
4291         * mini-x86.c: enable on OSX, too, the code to return small
4292         structures in registers.
4293
4294 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4295
4296         * mini-x86.c: remove the use of the dynamic code manager here, too.
4297
4298 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4299
4300         * mini.h, debug-debugger.c, tramp-*.c: fixed 
4301         mono_debugger_create_notification_function() to use
4302         mono_global_codeman_reserve () instead of a dynamic code manager.
4303
4304 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4305
4306         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
4307         ves_array_element_address() jit icall and use a generated
4308         managed method instead (which is about 4 times faster for a rank 3
4309         array access).
4310
4311 2006-11-29  Mark Mason  <mason@broadcom.com>
4312
4313         * basic-calls.cs: additional tests for passing
4314         structures as function arguments.
4315
4316 2006-11-29  Mark Mason  <mason@broadcom.com>
4317
4318         * mini-mips.h: disable custom exception handling
4319         * mini-mips.c: throw/rethrow should use jalr to call
4320         exception stubs.  Fixed bug with passing structures
4321         by value. More support for tracing floating point
4322         functions.
4323
4324 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4325
4326         * mini.c: fixed typo in the soft-float ldind.r4 handling
4327         (bug #80086).
4328
4329 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4330
4331         * mini.c, mini.h, driver.c: added --runtime command line
4332         option to select a different runtime than the autodetected one.
4333         * jit.h: added API for embedders to initialize with a specific
4334         runtime version.
4335
4336 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
4337
4338         * mini.c: handle also boxing of r4 values (bug #80024).
4339
4340 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4341
4342         * mini-ppc.c: force indirect calls until we reserve
4343         enough address space for all the generated code.
4344
4345 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
4346
4347         * exceptions-arm.c: workaround bugs in the libc definition
4348         of struct ucontext.
4349
4350 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
4351
4352         * inssel.brg: fixes from me and Mark Mason.
4353
4354 2006-11-23  Dick Porter  <dick@ximian.com>
4355
4356         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
4357         semaphore display now we've fixed the initial value
4358
4359 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4360
4361         * inssel.brg: partially revert the last change to fix the build.
4362
4363 2006-11-21  Mark Mason  <mason@broadcom.com>
4364
4365         * inssel.brg: Add and use compare-and-branch macros to support
4366         architectures that do not have condition code registers (ie. MIPS).
4367         * *-mips.{c,brg,md}: Fix copyright statements
4368
4369 2006-11-20  Mark Mason  <mason@broadcom.com>
4370
4371         * Makefile.am: remove mini-codegen.c from list of MIPS sources
4372         * mini.c: Allow GET_CONTEXT to be specified by the arch port
4373         * mini.h: Added declaration for mono_print_ins()
4374         * mini-codegen.c: added ins_spec initializer for MIPS
4375         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
4376         vreg to be virtual and hreg to be non-virtual.
4377         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
4378         is not yet working/implemented correctly.
4379         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
4380         non-static, fixup calls to print_ins() from other parts in the file.
4381
4382 2006-11-20  Mark Mason  <mason@broadcom.com>
4383
4384         * basic-calls.cs: added tests for passing structures as arguments
4385         to calls.
4386
4387 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
4388
4389         * inssel-long32.brg: optimize signed division by power of two.
4390
4391 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4392
4393         * mini-arm.c: added support for interworking with thumb code
4394         (mono must be still be built using the ARM instruction encoding).
4395
4396 2006-11-19  Miguel de Icaza  <miguel@novell.com>
4397
4398         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
4399         verifier has different rules for it.   Fixes a few verifier issues
4400         in the test suite.
4401
4402         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
4403         at the end, so people know what happened.
4404
4405 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
4406
4407         * brach-opts.c: in optimize_exception_target() make sure we
4408         are in a catch clause (fixes bug #79871).
4409
4410 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4411
4412         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
4413         more soft-float support fixes.
4414
4415 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
4416
4417         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
4418         that are passed half on the stack and half in registers.
4419
4420 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
4421
4422         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
4423         more mips integration work from Mark E Mason 
4424         <mark.e.mason@broadcom.com>.
4425
4426 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4427
4428         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
4429         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
4430         tramp-mips.c: added sources for the mips port, not
4431         integrated in the build yet. Contributed by
4432         Mark E Mason <mark.e.mason@broadcom.com>.
4433
4434 2006-11-14  Neale Ferguson <neale@sinenomine.net>
4435
4436         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
4437
4438 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4439
4440         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
4441         put the soft-float rules in its own file since it seems to
4442         break s390 compilation.
4443
4444 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4445
4446         * mini-arm.c: fixed wrnings.
4447
4448 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
4449
4450         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
4451         inssel-arm.brg: ARM support for soft-float.
4452
4453 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4454
4455         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
4456         loads and stores of 32 bit fp values.
4457
4458 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
4459
4460         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
4461
4462         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
4463         works. Fixes #79852 and #79463.
4464
4465 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4466
4467         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
4468         more soft-float support WIP and fixes.
4469
4470 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
4471
4472         * mini-arm.c: some VFP updates.
4473
4474 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4475
4476         * mini-exceptions.c: 0 is a valid local var offset in some
4477         architectures, don't assert (bug #78508).
4478
4479 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
4480
4481         * exceptions-arm.c: fixed off by one error in stack walk code.
4482
4483 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
4484
4485         * mini.h, mini.c: more precise tracking of type load exceptions.
4486
4487 2006-11-03  Robert Jordan  <robertj@gmx.net>
4488
4489         * Makefile.am: [WIN32] Add monow.exe target.
4490         * driver.c: [WIN32] Don't detach the console when debugging.
4491         Fixes bug #79797.
4492         
4493 2006-10-30  Miguel de Icaza  <miguel@novell.com>
4494
4495         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
4496
4497 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
4498
4499         * aot-compiler.c (emit_method_info): Add a case missed earlier.
4500
4501         * driver.c (mini_regression): Fix --regression with AOT.
4502
4503         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
4504
4505 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
4506
4507         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
4508
4509         * mini-sparc.h: Don't use sigaction on sparc/linux.
4510
4511         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
4512
4513         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
4514
4515         * mini-exceptions.c: Add proper include files for getpid ().
4516
4517 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
4518
4519         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
4520         address instead of a MonoJitInfo* to avoid decoding the exception info for the
4521         method.
4522
4523         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
4524         name cache to reduce its size.
4525
4526         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
4527
4528 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
4529
4530         * mini-x86.c: Save/restore the current LMF structure more efficiently using
4531         the mono_lmf TLS variable.
4532
4533         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
4534         trampoline lmf frames.  
4535
4536         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
4537
4538 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
4539
4540         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
4541         the mono_lmf TLS variable.
4542
4543         * mini-exceptions.c: Access the LMF structure through accessors.
4544
4545         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
4546         variable instead of in jit_tls->lmf.
4547
4548         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
4549         
4550         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
4551         trampoline lmf frames.
4552
4553         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
4554
4555 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
4556
4557        * mini.c trace.c mini-x86.c: Revert these too.
4558         
4559        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
4560        signature change.
4561
4562 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
4563
4564         * genmdesc.c: removed now dead code.
4565
4566 2006-10-09  Robert Jordan <robertj@gmx.net>
4567
4568         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
4569
4570 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
4571
4572         * mini.h: do not leave gaps in the opcode values.
4573
4574 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
4575
4576         * jit-icalls.h: flag functions as internal here, too.
4577
4578 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
4579
4580         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
4581         functions with the internal attribute.
4582
4583 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
4584
4585         * aot-compiler.c: fclose the file descriptor in the profile read loop.
4586
4587 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
4588
4589         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
4590         for soft-float.
4591
4592 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
4593
4594         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
4595         tail calls as on other platforms.
4596
4597         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
4598
4599         * iltests.il: Add a few tailcall tests.
4600
4601 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4602
4603         * driver.c: fix loop for old compilers (bug #79521).
4604
4605 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
4606
4607         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
4608
4609         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
4610
4611         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
4612         metadata without any code.
4613
4614         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
4615         more precise debugging information using gdb.
4616
4617 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
4618
4619         * inssel-ia64.brg: Make the helper methods static.
4620
4621 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4622
4623         * inssel-x86.brg: make the helper methods static.
4624
4625 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
4626
4627         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
4628
4629 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4630
4631         * mini.c: updates for monoburg changes.
4632         * inssel.brg: make a few helper functions static as they should.
4633
4634 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
4635
4636         * Makefile.am: Move mini-codegen.c to common_sources.
4637
4638 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4639
4640         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
4641         instructions.
4642         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
4643         mini-ppc.h: port to use the common local register allocator.
4644
4645 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4646
4647         * mini.h: Remove the comment too then.
4648
4649 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
4650
4651         * mini.h: put back backend.data which is to be used shortly and
4652         doesn't increase the size of MonoInst. If any 64 bit arch aligned
4653         pointers on 4 byte boundaries it'd have much bigger issues running
4654         and you can ifdef it out anyway.
4655
4656 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4657
4658         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
4659         MonoInst size by 4 bytes on 64 bit machines.
4660
4661 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4662
4663         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
4664         replacement with more meaningful field names. Arch maintainers, please
4665         check the assigned names are good enough for your arch.
4666
4667 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4668
4669         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
4670         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
4671
4672 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
4673
4674         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
4675         relocations and memory requirements, put the optimization flags
4676         definitions in their own file.
4677
4678 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
4679
4680         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
4681
4682         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
4683
4684 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
4685
4686         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
4687
4688 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
4689
4690         * inssel.brg: use the correct function to get the size of an item
4691         in an array, given an element class.
4692         * aot-compiler.c: do not access class->class_size directly.
4693
4694 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4695
4696         * mini.h, debug-mini.c: added a debugging function to print
4697         info about local variables and arguments in a jitted method.
4698
4699 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
4700
4701         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4702
4703         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
4704
4705 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4706
4707         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
4708         inner and outer loops when passing vtypes.
4709
4710 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
4711
4712         * mini-ppc.c: take into account the cpu errata for cache flushing
4713         which caused some random errors (bug #79381).
4714
4715 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4716
4717         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
4718         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
4719
4720 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
4721
4722         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
4723         loaded.
4724
4725         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
4726         freebsd ports tree.
4727
4728         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
4729         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
4730
4731         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
4732         displacement.
4733
4734 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
4735
4736         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
4737
4738 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
4739
4740         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
4741         macro does not have to be changed during debugging.
4742
4743         * 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>.
4744
4745         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
4746
4747         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
4748         
4749         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
4750         MONO_ARCH_NO_EMULATE_MUL is defined.
4751
4752         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
4753
4754         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
4755
4756         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
4757
4758         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
4759         
4760 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
4761
4762         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
4763         stuff to mini-exceptions.c where it is used.
4764
4765         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
4766         setup code, the real one is in mini-exceptions.c.
4767
4768         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
4769         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
4770         some changes from the freebsd ports tree.
4771
4772         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
4773         constants.
4774         
4775         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
4776
4777 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
4778
4779         * mini.c: on Linux, check for /proc to be mounted
4780         (bug# 79351, novell bug#201204).
4781
4782 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
4783
4784         * mini.c: handle cases where pthread_attr_getstack() behaves
4785         incorrectly (bug #78096).
4786
4787 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
4788
4789         * mini-arm.c: support larger stack frames (bug #79272).
4790
4791 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
4792
4793         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
4794
4795         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
4796         tokens.
4797
4798         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
4799         mono_class_from_name () to find a class from its name.
4800
4801         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
4802
4803 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
4804
4805         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
4806
4807 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
4808
4809         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
4810
4811 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
4812
4813         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
4814         callinfo->trampoline.
4815
4816         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
4817         fixes #79271.
4818         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
4819         future.
4820
4821 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
4822
4823         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
4824
4825 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
4826
4827         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
4828         stats.method_trampolines, it is already done by the generic trampoline code.
4829
4830         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
4831         
4832 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
4833
4834         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
4835
4836         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
4837
4838         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
4839
4840         * mini.c (print_jit_stats): Print mscorlib mempool size too.
4841         
4842         * mini.c (print_jit_stats): Print new stats.
4843
4844         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4845
4846 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
4847
4848         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
4849         Address on two dimensional arrays. Fixes #78729.
4850
4851         * mini.h (MonoCompile): Add a 'skip_visibility' field.
4852
4853         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
4854         a method.
4855
4856         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
4857
4858         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
4859         #79130.
4860         
4861         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
4862         a race condition.
4863         (mini_get_ldelema_ins): Ditto.
4864
4865 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
4866
4867         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
4868         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
4869         Fixes #79213.
4870
4871 2006-08-29 Neale Ferguson <neale@sinenomine.net>
4872
4873         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
4874         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
4875
4876         * exceptions-s390x.c: Cosmetic change.
4877
4878         * tramp-s390.c: Fix warning.
4879
4880         * cpu-s390.md: Correct length of mul_imm.
4881
4882 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
4883
4884         * aot-compiler.c: added binary writer with ELF backend
4885         implementation (only on Linux/x86 for now).
4886
4887 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4888
4889         * Makefile.am: Don't run net 2.0 AOT tests.
4890
4891         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
4892         (mono_compile_assembly): Skip net 2.0 assemblies as well.
4893
4894         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
4895
4896 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
4897
4898         * aot-compiler.c: simplified and refactored the asm-writing code
4899         to allow different backends.
4900
4901 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4902
4903         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4904
4905         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
4906         little. Share patches of type TYPE_FROM_HANDLE as well.
4907
4908         * mini.c (mono_patch_info_equal): New helper function.
4909         (mono_patch_info_hash): Ditto.
4910
4911         * aot-compiler.c (emit_method_code): Fix s390 build.
4912
4913         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
4914         is not handled because it is stored as a flag and not as a type ctor. Fixes
4915         #79016.
4916
4917 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
4918
4919         * aot-compiler.c: Fix computation of GOT slot statistics.
4920         
4921         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
4922         Also remove support for not PIC AOT.
4923
4924         * mini.h: Bump AOT file format version.
4925
4926         * objects.cs: Add a test for #78990.
4927
4928         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
4929         (peter.dettman@iinet.net.au). Fixes #79087.
4930
4931         * basic-long.cs: Add a test for the above.
4932
4933 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
4934
4935         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
4936         
4937         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
4938         code somewhat.
4939
4940 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
4941
4942         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
4943         exceptions.
4944
4945 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
4946
4947         * mini.c: Don't verify COM proxy invoke calls
4948         
4949
4950 2006-08-10  Dick Porter  <dick@ximian.com>
4951
4952         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
4953         which process is holding semaphores locked.
4954
4955 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
4956
4957         * mini-ia64.c mini-amd64.c: Fix #79027.
4958
4959         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
4960
4961         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
4962
4963         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
4964         implicit arguments in a vararg call. Fixes #79027.
4965
4966 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
4967
4968         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
4969         (mono_get_array_new_va_signature): Ditto.
4970
4971 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
4972
4973         * aot-runtime.c: Call init_plt lazily.
4974
4975         * inssel-long.brg: Fix unsigned long->int conversion.
4976
4977         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
4978
4979         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
4980         that most data is now in the .rss/.data section.
4981
4982 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
4983
4984         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
4985
4986         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
4987
4988         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
4989
4990         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
4991
4992         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
4993         virtual call. Fixes #79010.
4994
4995         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
4996         and use the result as the this argument in the real call.
4997
4998         * generics.2.cs: Add a new test for #79010.
4999         
5000 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
5001
5002         * mini-x86.c: Fix a warning.
5003
5004         * aot-compiler.c: Add a bunch of statistics.
5005
5006         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
5007
5008 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
5009
5010         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
5011
5012 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
5013
5014         * 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>.
5015
5016 2006-07-13  Miguel de Icaza  <miguel@novell.com>
5017
5018         * mini.c (mono_method_to_ir): Obtain the original method in the
5019         CIL stream and use this to perform validation.
5020
5021         Fixed: #78816
5022
5023 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
5024
5025         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
5026         (mono_arch_call_opcode): Ditto.
5027
5028         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
5029         #78826.
5030
5031         * mini.c (mono_patch_info_dup_mp): New helper function.
5032         
5033         * aot-compiler.c (compile_method): Fix some of the memory allocated during
5034         compilation. Fixes #78827.
5035
5036 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
5037
5038         * declsec.c: Use original security informations for
5039           MONO_WRAPPER_MANAGED_TO_MANAGED.
5040
5041 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
5042
5043         * mini.c: Allow Com Interop methods/classes and
5044         don't verify COM wrapper calls
5045         
5046
5047 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
5048
5049         * inssel-long32.brg: Fix long->i4 checked conversion.
5050
5051         * exceptions.cs: Add a test for the above.
5052
5053 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
5054
5055         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
5056
5057         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
5058         leaks.
5059
5060         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
5061         #78775.
5062
5063 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
5064
5065         * mini.c: Fix solaris/x86 exception handling.
5066
5067         * Makefile.am: Get rid of $(ICU_LIBS).
5068
5069 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
5070
5071         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
5072         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
5073         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
5074
5075         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
5076
5077         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
5078         this function causes a SIGSEGV.
5079
5080 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
5081
5082         * mini.c: Remove unused solaris/x86 includes.
5083
5084 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
5085
5086         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
5087
5088 2006-06-20  Jb Evain  <jbevain@gmail.com>
5089
5090         * cpu-g4.md: fix max length of start_handler instruction.
5091
5092 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
5093         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
5094
5095 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
5096         * ssa.c: Fixed bug 78653 for SSA based deadce.
5097         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
5098         MonoInst.flags, used in SSA based deadce.
5099         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
5100         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
5101
5102 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
5103
5104         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
5105         it can end up using non executable memory on ppc64 systems
5106         running ppc32 userspace (fix from Johannes Berg).
5107
5108 2006-06-14  Dick Porter  <dick@ximian.com>
5109
5110         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
5111         4.1.1
5112
5113 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
5114         * mini.c: Made so that inline is locally disabled if it would
5115         trigger a .cctor, because too many apps depend on this behavior
5116         (which seems to be also the one of the MS CLR).
5117
5118 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
5119
5120         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
5121         No idea why this worked before.
5122
5123         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
5124         which branch to outer exception clauses since they could skip the
5125         inner finally clauses. Fixes #78633.
5126
5127         * exceptions.cs: Add a test for the above.
5128
5129         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
5130         Fixes #78629.
5131
5132         * iltests.il: Add a test for the above.
5133
5134 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
5135
5136         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
5137         after the end of a try bblock, to prevent asserts in mini_method_compile ().
5138
5139         * iltests.il: Add a test for the above.
5140
5141 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
5142
5143         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
5144         
5145         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
5146         methods as instrinsics.
5147
5148 2006-06-09  Wade Berrier <wberrier@novell.com>
5149
5150         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
5151         (simple-cee-ops.h ssapre-mini-ops.h)
5152
5153 2006-06-09  Neale Ferguson <neale@sinenomine.net>
5154
5155         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
5156         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
5157         instruction).
5158         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
5159         * cpu-s390x.md: Fix max. length values for a couple of instructions.
5160
5161 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
5162
5163         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
5164
5165 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
5166
5167         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
5168         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
5169         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
5170         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
5171         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
5172         of opcodes, so that bug 78549 should not happen again.
5173         * ssapre.c: Updated to use the renamed files.
5174
5175 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
5176
5177         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
5178         in OP_ATOMIC_EXCHANGE_I4.
5179
5180 2006-06-07  Wade Berrier <wberrier@novell.com>
5181
5182         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
5183         in mono_debugger_create_notification_function)
5184
5185 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
5186
5187         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
5188         
5189         * mini.c (type_from_stack_type): Disable some changes which do not
5190         seem to work.
5191
5192         * driver.c: Reenable opts.
5193
5194         * mini.h (MonoStackSlot): New structure to keep track of the verification state
5195         of the evaluation stack.
5196         
5197         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
5198         evaluation stack trace at entry to the bblock.
5199
5200         * mini.c (merge_stacks): New function to perform verification of stack merges.
5201         Turned off by default.
5202
5203         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
5204         STACK_MP.
5205         
5206 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
5207
5208         * local-propagation.c: Fixed bug 78549.
5209
5210 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
5211
5212         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
5213
5214 2006-06-02  Miguel de Icaza  <miguel@novell.com>
5215
5216         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
5217         tramp-arm.c, tramp-ia64.c
5218         (mono_debugger_create_notification_function): Update signature to
5219         new signature and use new protocol for creating the notification
5220         function.  
5221
5222         Should fix the build.
5223
5224 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
5225
5226         * exceptions-ppc.c (mono_jit_walk_stack)
5227         (ves_icall_get_frame_info): Fix the build
5228
5229 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
5230
5231         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
5232
5233 2006-05-31  Raja R Harinath  <rharinath@novell.com>
5234
5235         * il2tests.2.il: New file for generics CIL tests.  Add test for
5236         #78019.
5237         * Makefile.am: Update.
5238
5239         Fix #78019
5240         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
5241         to nullable types.
5242
5243 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
5244
5245         * aliasing.c: Fixed bug 78311.
5246
5247 2006-05-29  Martin Baulig  <martin@ximian.com>
5248
5249         * mini-exceptions.c (mono_find_jit_info): When computing the
5250         native offset, check whether we're actually inside the method's
5251         code; call mono_debug_print_stack_frame() to format the frame.
5252         (ves_icall_System_Exception_get_trace): Call
5253         mono_debug_print_stack_frame() to format the stack frame.
5254         (ves_icall_get_trace): Update to the new debugging API.
5255         (mono_jit_walk_stack_from_ctx): Likewise.
5256         (ves_icall_get_frame_info): Likewise.
5257
5258         * mini.c (get_method_from_ip): Use the new debugging API.
5259         (mono_print_method_from_ip): Likewise.
5260
5261         * exceptions-ppc.c
5262         (mono_jit_walk_stack): Use the new debugging API.
5263         (ves_icall_get_frame_info): Likewise.   
5264
5265 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
5266
5267         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
5268
5269 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
5270
5271         * mini.c: Added "limitator" to inline for debugging.
5272
5273 2006-05-24  Martin Baulig  <martin@ximian.com>
5274
5275         * debug-debugger.c (mono_debugger_init): Create a private,
5276         malloc()-based code manager for the notification function and
5277         intentionally leak it on exit.  This fixes the crash-on-exit race
5278         condition.
5279
5280         * tramp-amd64.c
5281         (mono_debugger_create_notification_function): Added
5282         `MonoCodeManager *' argument.
5283
5284         * tramp-x86.c
5285         (mono_debugger_create_notification_function): Added
5286         `MonoCodeManager *' argument.
5287
5288 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
5289
5290         * aliasing.c: Fixed 64 bit issue.
5291         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5292         default since all known bugs are fixed (one more time!).
5293
5294 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
5295
5296         * mini.c: write barrier support.
5297
5298 2006-05-23  Martin Baulig  <martin@ximian.com>
5299
5300         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
5301         check at the top of the file.
5302
5303 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
5304
5305         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
5306         reverting changes without reason and without changelog entries.
5307
5308 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
5309
5310         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
5311         to a few opcodes. Fixes #78439.
5312
5313         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
5314         consistency with other archs.
5315
5316         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
5317
5318 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5319
5320         * debug-debugger.c: fix the build.
5321
5322 2006-05-17  Martin Baulig  <martin@ximian.com>
5323
5324         * debug-debugger.c
5325         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
5326         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
5327         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
5328         (debugger_attach): Call GC_mono_debugger_add_all_threads().
5329
5330 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
5331
5332         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
5333
5334 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
5335
5336         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
5337         MONO_TYPE_GENERICINST.
5338         
5339         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
5340         MONO_TYPE_GENERICINST.
5341
5342 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
5343
5344         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
5345         #78325.
5346
5347 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
5348
5349         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
5350         mempool.
5351         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
5352
5353 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
5354
5355         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
5356         mono_trace_cleanup ().
5357
5358         * iltests.il: Fix problem with the newly added test.
5359
5360         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
5361         due to register constraints, free up the previous hreg. Fixes #78314.
5362
5363         * iltests.il: Add new test for #78314.  
5364
5365         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
5366         Interlocked.Add. Fixes #78312.
5367
5368         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
5369         
5370 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
5371
5372         * inssel.brg (mini_emit_virtual_call): Fix a warning.
5373
5374 2006-05-05  Martin Baulig  <martin@ximian.com>
5375
5376         * debug-mini.c (mono_debug_open_block): New method.
5377
5378         * mini-amd64.c
5379         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5380         the beginning of each basic block.
5381
5382         * mini-x86.c
5383         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5384         the beginning of each basic block.
5385
5386 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5387
5388         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5389         default until I understand why they break the build on amd64.
5390
5391 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
5392
5393         * mini.c (mini_cleanup): Call mono_cleanup ().
5394
5395         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
5396         errors.
5397
5398 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5399
5400         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
5401         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5402         default since all known bugs are fixed, and I cannot reproduce bug
5403         77944... I'm asking Matt Hargett to test again after this commit.
5404
5405 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
5406
5407         * mini-codegen.c: Fixed typo that thrashed inline.
5408
5409 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
5410
5411         * dominators.c (compute_dominators): Avoid using a worklist since
5412         it is not correct in some cases. Instead, iterate over all bblocks as
5413         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
5414
5415 2006-04-28  Miguel de Icaza  <miguel@novell.com>
5416
5417         * mini.c (mono_jit_compile_method_inner): Use
5418         mono_prepare_exception_from_error that resets the value
5419         internally.
5420
5421 2006-04-27  Miguel de Icaza  <miguel@novell.com>
5422
5423         * mini.c: Move the mini_loader_error_to_exception to metadata. 
5424         
5425 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5426
5427         * aliasing.c: Fixed bug 78210.
5428
5429 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5430
5431         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5432         default until all their problems (or the ones they trigger) are fixed.
5433
5434 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
5435
5436         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
5437         
5438         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
5439         as loaded only after resolving patches since that could invoke the same method.
5440
5441         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
5442
5443         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
5444         functions.
5445
5446         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
5447         AOT loader.
5448
5449         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
5450         stack.
5451
5452         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
5453         made from AOT code through the PLT table.
5454
5455         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
5456         holding the plt offset when a call is made to the aot plt trampoline.
5457         
5458 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5459
5460         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
5461         amd64 AOT support.
5462
5463         * Makefile.am (common_sources): Fix build breakage.
5464
5465         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
5466         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
5467         intra-assembly calls if possible.
5468         
5469         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
5470
5471         * mini-trampolines.c: Handle PLT entries.
5472
5473         * mini.c: Avoid creating a GOT var for calls.
5474
5475         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
5476         from mscorlib code.
5477
5478         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
5479         from mscorlib code.
5480
5481         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
5482         AOT code.       
5483
5484         * mini.h: Bump AOT file format version.
5485         
5486         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
5487         covers more cases.
5488
5489 2006-04-25  Martin Baulig  <martin@ximian.com>
5490
5491         * driver.c: Disable copyprop, consprop and inline when running
5492         inside the debugger.
5493
5494 2006-04-25  Martin Baulig  <martin@ximian.com>
5495
5496         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
5497         with `get_current_thread' and added `detach'.
5498         (MonoDebuggerMetadataInfo): Added `thread_size',
5499         `thread_tid_offset', `thread_stack_ptr_offset' and
5500         `thread_end_stack_offset'.
5501
5502 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5503
5504         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
5505         aot-runtime.c.
5506
5507         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
5508         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
5509
5510         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
5511
5512         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
5513
5514         * aot.c: Add support for ADJUSTED_IID.  
5515
5516 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
5517
5518         * aot.c (emit_method_order): Don't align method_order_end.
5519
5520         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
5521         the interface ID changes.
5522
5523 2006-04-21  Dick Porter  <dick@ximian.com>
5524
5525         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
5526         cleaning up a thread.  Fixes the new part of bug 77470.
5527
5528 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
5529
5530         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
5531         to managed wrapper.
5532                      
5533 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
5534
5535         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
5536         
5537         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
5538         SIGSEGV. Fixes #78072.
5539
5540         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
5541         unregister our SIGABRT handler.
5542
5543 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
5544
5545         * mini.c: Disabled inline where it can alter the call stack in a
5546         way visible from managed code.
5547         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
5548         default.
5549
5550 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
5551
5552         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
5553         on other platforms. Fixes #78089.
5554
5555 2006-04-13  Martin Baulig  <martin@ximian.com>
5556
5557         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
5558         determine whether we're inside the debugger.
5559
5560         * debug-debugger.h
5561         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
5562
5563 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
5564
5565         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
5566         handler clauses. Fixes #78024.
5567
5568         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
5569         in the CALL_MEMBASE opcodes. Fixes #78088.
5570         (mono_arch_get_vcall_slot_addr): Ditto.
5571
5572 2006-04-10  Martin Baulig  <martin@ximian.com>
5573
5574         * debug-debugger.c: The thread handling code has now been moved
5575         into ../metadata/threads.c.
5576
5577 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5578
5579         * driver.c (mono_main): Fix --with-gc=none build.
5580
5581         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
5582         (mono_spillvar_offset_float): Ditto.
5583         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
5584         hreg, not when its !global, since on ia64, there is a third category: stacked
5585         registers.      
5586
5587 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
5588
5589         * mini.c: set MonoInst->klass for load field address and a few other
5590         places.
5591
5592 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5593
5594         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
5595
5596 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
5597
5598         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
5599         the branch opt changes.
5600
5601 2006-04-06  Dick Porter  <dick@ximian.com>
5602
5603         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
5604         
5605         * wapihandles.c (mini_wapi_seminfo): 
5606         * driver.c (mono_main): Add semaphore info option
5607
5608 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
5609
5610         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
5611         branch optimization changes. Fixes #78009.
5612
5613 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5614
5615         * mini.c: ignore accessibility of methods in managed->native wrappers.
5616
5617 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
5618
5619         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
5620         
5621         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
5622
5623 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
5624
5625         * mini.c: Modify the branch optimizations to preserve the invariant that
5626         the entries inside the in_bb and out_bb arrays are unique.
5627         (mono_unlink_bblock): Avoid creation of new arrays.
5628
5629 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
5630
5631         * mini.c (mono_unlink_bblock): Fix regression caused by previous
5632         change (#77992).
5633
5634 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
5635
5636         * mini.c (optimize_branches): Remove the "optimizations" in
5637         the cbranch1/cbranch2 -> branch cases which were causing several
5638         problems in the past. Fixes #77986.
5639
5640 2006-03-31  Chris Toshok  <toshok@ximian.com>
5641
5642         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
5643         default optimizations :(
5644
5645 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
5646
5647         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
5648         branch.
5649
5650 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
5651
5652         * local-propagation.c: Added comments to structs and removed
5653         "Mono" prefixes from local tree mover types.
5654
5655 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
5656
5657         * Makefile.am (arch_sources): Define this for each architecture so 
5658         libmono_la_SOURCES is defined in one place.
5659
5660 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
5661
5662         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
5663         from handles/.
5664
5665 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
5666
5667         * driver.c: print the GC name supplied by configure.
5668
5669 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
5670
5671         * local-propagation.c: Added tree mover, and moved here all the
5672         local propagation code from mini.c
5673         * mini.c: Added support for treeprop, and moved all the local
5674         propagation code to local-propagation.c
5675         * mini.h: Added support for treeprop
5676         * driver.c: Added support for treeprop, enabled consprop, copyprop,
5677         treeprop, inline and deadce by default
5678         * Makefile.am: Added local-propagation.c
5679
5680 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
5681
5682         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
5683
5684 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
5685
5686         * debug-debugger.c: make it compile without the Boehm GC.
5687
5688 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
5689
5690         * mini.c: fixed issue with mismatch when an icall is registered
5691         with multiple names but same address.
5692
5693 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5694
5695         * declsec.c, mini-exceptions.c: use write barrier to set reference
5696         fields of managed objects.
5697
5698 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5699
5700         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
5701         (can_access_internals): Fix a warning.
5702
5703         * mini.c (print_method_from_ip): Rename this to 
5704         mono_print_method_from_ip so it gets exported.
5705
5706         * trace.c: Deal with strings inside StringBuilder's containing garbage
5707         and fix memory leaks. Fixes #77848.
5708
5709 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5710
5711         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
5712         fixes #77787.
5713
5714 2006-03-16 Neale Ferguson <neale@sinenomine.net>
5715         
5716         * mini-s390.c: Remove OP_X86_TEST_NULL.
5717
5718 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5719
5720         * mini.c: use the correct GetHashCode() for the moving collector.
5721
5722 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
5723
5724         * liveness.c: Regalloc spill cost tuning.
5725
5726 2006-03-15 Neale Ferguson <neale@sinenomine.net>
5727         
5728         * mini-s390x.h: Correct S390_LONG macro.
5729
5730         * mini-s390x.c: Cleanup unused code.
5731
5732 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
5733
5734         * jit-icalls.h: New file.
5735
5736         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
5737         icalls and include that instead of including jit-icalls.c.
5738
5739         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
5740         OP_X86 opcodes.
5741
5742 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
5743
5744         * mini.c: when checking for member accessibility, also check for
5745         friend assemblies and for explicit interface implementations.
5746
5747 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
5748
5749         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
5750
5751         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
5752
5753         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5754         common cases are done first.    
5755
5756         * mini-ops.h: Only define platform specific opcodes on the given platform.
5757
5758         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
5759         branch.
5760         
5761 2006-03-14  Martin Baulig  <martin@ximian.com>
5762
5763         Revert Paolo's change from r57348:
5764
5765         * mini.h: don't use gboolean for bitfields.
5766         * mini.c: verifier changes for fields and methods accessibility.
5767
5768 2006-03-13  Neale Ferguson <neale@sinenomine.net>
5769
5770         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
5771
5772         * mini-s390x.c: Fix conv_r_un.
5773
5774         * cpu-s390, cpu-s390x.md: Fix lengths.
5775
5776 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
5777
5778         * mini.c: nested types have access to all the nesting
5779         levels, not just the enclosing types.
5780
5781 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5782
5783         * mini.c: added a few more verification checks.
5784
5785 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
5786
5787         * liveness.c: Merge optimizations from the linear-il branch.
5788
5789 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5790
5791         * mini-ia64.c (emit_call): Add a comment.
5792
5793         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
5794
5795         * tramp-ia64.c: Fix some warnings.
5796
5797 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
5798
5799         * mini.h: don't use gboolean for bitfields.
5800         * mini.c: verifier changes for fields and methods accessibility.
5801
5802 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5803
5804         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
5805         lazy icall wrapper changes.
5806
5807         * dominators.c: Replace all the dominator algorithms with faster
5808         ones from the linear-il branch.
5809
5810         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
5811         the mempool.
5812
5813         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5814         common cases are done first.
5815
5816         * mini-amd64.c: Fix some warnings.
5817
5818         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
5819         from the mempool.
5820
5821         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
5822         added code.
5823
5824         * mini.h: Add a missing prototype.
5825
5826 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
5827
5828         * mini.c: Compile icall wrappers lazily.
5829
5830         * mini-codegen.c: Use printf instead of g_print since its much faster.
5831
5832         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
5833         function.
5834
5835         * mini.c (optimize_branches): Cache the negative result from 
5836         remove_block_if_useless ().
5837
5838         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
5839         Also fix some bblock linking issues.
5840
5841         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
5842         assembly files.
5843
5844         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
5845
5846         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
5847         accessed fields first, for better cache behavior.
5848         
5849 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
5850
5851         * mini.c: speedup IList<T> array accesses.
5852
5853 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
5854
5855         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
5856         inline_costs counter. Fixes #77190.
5857
5858 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
5859
5860         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
5861         trace messages. Fixes #77706.
5862
5863 2006-03-04  Martin Baulig  <martin@ximian.com>
5864
5865         * tramp-amd64.c, tramp-x86.c
5866         (mono_debugger_create_notification_function): Use
5867         mono_global_codeman_reserve() to allocate a buffer at runtime and
5868         return it.
5869
5870         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
5871
5872         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
5873         notification function at runtime and then call `initialize' in the
5874         `MONO_DEBUGGER__debugger_info' vtable.
5875
5876 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
5877
5878         * iltests.il: Fix a visibility problem.
5879
5880 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5881
5882         * driver.c, mini.c: add hooks for the counters API.
5883
5884 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5885
5886         * driver.c: show disabled options.
5887
5888 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
5889
5890         * linear-scan.c: always use cost-driven selection.
5891
5892 2006-02-28  Raja R Harinath  <rharinath@novell.com>
5893
5894         * jit-icalls.c (helper_compile_generic_method): Revert change from
5895         2006-02-24.
5896
5897 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
5898
5899         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
5900
5901 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
5902
5903         * inssel.brg: style fixes, mostly to force the updated monoburg
5904         to run for people using svn.
5905
5906 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
5907
5908         * mini.c: match monoburg changes.
5909
5910 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5911
5912         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
5913         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
5914         declaration in the header file.
5915
5916 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
5917
5918         * helpers.c: reduce relocations and mem usage.
5919
5920 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
5921
5922         * mini.h, mini-codegen.c: disable logging features if
5923         requested by configure.
5924
5925 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
5926
5927         * mini.c: tiny verifier changes.
5928
5929 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5930
5931         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
5932         cpu-pentium.md: stack alignment changes for osx/x86,
5933         partially from Geoff Norton <gnorton@customerdna.com>.
5934
5935 2006-02-24  Raja R Harinath  <harinath@gmail.com>
5936
5937         * jit-icalls.c (helper_compile_generic_method): Update to changes
5938         in metadata/class.c.
5939
5940 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
5941         
5942         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
5943         
5944         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
5945         interface calls with large offsets.
5946
5947 2006-02-23  Raja R Harinath  <rharinath@novell.com>
5948
5949         * jit-icalls.c (helper_compile_generic_method): Document the
5950         special-case we depend on so that we can inflate the method twice
5951         with the same context with no bad side-effects.
5952
5953 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
5954
5955         * mini-x86.c, mini-amd64.c: fix for case when xen support
5956         is disabled.
5957
5958 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
5959
5960         * mini-x86.c, mini-amd64.c: generate code to access tls items
5961         in a faster way for Xen systems.
5962
5963 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5964
5965         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
5966         updates and compilation fixes for the OSX/x86 port, mostly from
5967         Geoff Norton <gnorton@customerdna.com>.
5968
5969 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
5970
5971         * inssel.brg: faster interface call implementation
5972         to sync with the interface_offsets MonoVTable changes.
5973
5974 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5975
5976         * mini.c: more verification checks.
5977
5978 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
5979
5980         * mini.c: added a few more verification checks.
5981
5982 2006-02-17      Neale Ferguson <neale@sinenomine.net>
5983
5984         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
5985         facility on the processor and use it if available.
5986
5987 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5988
5989         * driver.c, aot.c, mini.c: throw exception if the IL code is
5990         invalid or unverifiable.
5991
5992 2006-02-17  Raja R Harinath  <rharinath@novell.com>
5993
5994         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
5995         m.StructField.
5996
5997 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
5998
5999         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
6000
6001 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6002
6003         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
6004         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
6005         handling of instantiated generic valuetypes.
6006
6007 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
6008
6009         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
6010         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
6011         instead.
6012
6013         * generics.2.cs: Revert the nullable reftypes tests.
6014
6015 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
6016
6017         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
6018         using __builtin_frame_address (1) as it doesn't work in the presence
6019         of optimizations. Hopefully fixes #77273.
6020
6021         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
6022         -> generics.cs change as it doesn't work with some automake versions.
6023
6024 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6025
6026         * mini.c: handle systems that sue a different way to
6027         retrieve the stack address of the current thread.
6028
6029 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
6030
6031         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
6032         it specially in the makefile.
6033
6034         * generics.2.cs: Add tests for nullable reference types.
6035
6036 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6037
6038         * mini.c: always handle the case when mono_jit_init()
6039         is called in a thread different from the main thread,
6040         confusing libgc (bug #77309).
6041
6042 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
6043
6044         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
6045
6046 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6047
6048         * mini.c: change optimize_branches () to use a single loop
6049         and introduce a new optimization to simplify some range checks.
6050
6051 2006-02-03  Martin Baulig  <martin@ximian.com>
6052
6053         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
6054         and merged with debugger_thread_manager_add_thread().
6055         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
6056         inform the debugger about the main thread.
6057
6058 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
6059
6060         * basic.cs: Add test for div.un/rem.un constant folding.
6061
6062 2006-02-03  Neale Ferguson <neale@sinenomine.net>
6063
6064         * cpu-s390x.md: correct int_xor_imm length
6065
6066 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
6067
6068         * generics.2.cs: New test for #77442.
6069
6070         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
6071         #77442.
6072
6073 2006-02-02  Martin Baulig  <martin@ximian.com>
6074
6075         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
6076         <mono/metadata/mono-debug-debugger.h>   
6077
6078         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
6079
6080 2006-02-02  Martin Baulig  <martin@ximian.com>
6081
6082         * debug-debugger.h: New header file for debug-debugger.c.
6083
6084         * debug-debugger.c: Big API cleanup; don't run the managed Main()
6085         function is a separate thread anymore; add support for attaching.
6086
6087 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
6088
6089         * tramp-x86.c: Fix a warning.
6090
6091 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
6092
6093         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
6094         on very large methods.
6095
6096         * aot.c (load_patch_info): Fix a warning.
6097
6098 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
6099
6100         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
6101         mini-ops.h: alu membase optimizations.
6102
6103 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
6104
6105         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
6106         to speedup StringBuilder.
6107
6108 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
6109
6110         * dominators.c (mono_compute_natural_loops): Fix detection of
6111         loop body start blocks.
6112
6113         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
6114
6115 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
6116
6117         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
6118         #75145.
6119
6120 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
6121
6122         * aliasing.c: Fixed aliasing issue on 64 bit archs.
6123
6124 2006-01-25  Martin Baulig  <martin@ximian.com>
6125
6126         * debug-debugger.c: Moved the `MonoDebuggerManager' and
6127         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
6128         started to cleanup this file a little bit.
6129
6130 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
6131
6132         * mini.c: optimize a codepath frequently happening in generics code.
6133
6134 2006-01-23  Martin Baulig  <martin@ximian.com>
6135
6136         * Makefile.am: Only compile debug-debugger.c on supported platforms.
6137
6138         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
6139         functions directly.
6140
6141         * driver.c: debug-debugger.c is only available if
6142         `MONO_DEBUGGER_SUPPORTED' is defined.   
6143
6144 2006-01-23  Martin Baulig  <martin@ximian.com>
6145
6146         * debug-debugger.c: Only enable this on platforms where the Mono
6147         Debugger is working (x86 and x86_64).
6148
6149 2006-01-21  Martin Baulig  <martin@ximian.com>
6150
6151         The Mono Debugger is now using the normal `mono' instead of the
6152         `mono-debugger-mini-wrapper' when executing managed code.
6153
6154         * debug-debugger.c: New file; previously known as
6155         debugger/wrapper/wrapper.c.
6156
6157         * debug-mini.c (mono_init_debugger): Removed.
6158
6159         * driver.c (mono_main): Added new `--inside-mdb' command line
6160         argument which is used when running inside the debugger.
6161
6162 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
6163
6164         * liveness.c (mono_analyze_liveness): Remove some unused data
6165         structures.
6166
6167 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
6168
6169         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
6170
6171 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
6172
6173         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
6174         depends on implementation details of monobitset.
6175
6176         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
6177         Fixes #77271.
6178
6179 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
6180
6181         * liveness.c: Update after monobitset changes.
6182
6183 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
6184
6185         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
6186
6187 2006-01-11 Neale Ferguson <neale@sinenomine.net>
6188
6189         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
6190
6191         * mini-s390x.c: Remove warning messages.
6192
6193 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
6194
6195         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
6196
6197 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
6198
6199         * generics.2.cs: Add ldelem/stelem_any test.
6200
6201 2006-01-10 Neale Ferguson <neale@sinenomine.net>
6202
6203         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
6204
6205 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
6206
6207         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
6208         
6209 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
6210
6211         * generics.2.cs: Reenable vtype tests.
6212
6213         * inssel-x86.brg: Remove an icorrect valuetype rule.
6214
6215 2006-01-06 Neale Ferguson <neale@sinenomine.net>
6216
6217         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
6218         initial support for OP_ABS.
6219
6220 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6221
6222         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
6223
6224 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6225
6226         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
6227         conversion and implement LADD/LSUB.
6228
6229         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
6230         architectures.
6231
6232 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6233
6234         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
6235
6236         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
6237         architectures.
6238
6239 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6240
6241         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
6242         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
6243         (stack walk problem).
6244
6245 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
6246
6247         * aot.c (mono_aot_load_method): Fix a warning.
6248
6249 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6250
6251         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
6252
6253 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6254
6255         * iltests.il: Add test for #77148.
6256
6257         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
6258         #77148.
6259
6260 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6261
6262         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
6263
6264 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6265
6266         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
6267         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
6268
6269         * basic-long.cs: Add lconv-to-r4/r8 tests.
6270
6271 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6272
6273         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
6274
6275         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
6276         here as on other archs.
6277
6278 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6279
6280         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
6281
6282 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6283
6284         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
6285         
6286         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
6287
6288         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
6289         instrument_prolog; Add memory_barrier instruction.
6290
6291 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
6292
6293         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
6294
6295 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
6296
6297         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
6298
6299         * aliasing.c inssel.brg: Fix warnings.
6300
6301         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
6302         could skip initialization of some parts of memory.
6303
6304         * mini.c mini-ia64.c: Fix warnings.
6305
6306         * inssel-sparc.brg: Add an implementation of lneg which actually works.
6307
6308 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
6309
6310         * aliasing.c (mono_build_aliasing_information): Add a workaround for
6311         a crash seen on sparc.
6312
6313         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
6314         
6315         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
6316
6317 2005-12-21 Neale Ferguson <neale@sinenomine.net>
6318
6319         * mini-ops.h: Add s390_backchain instruction
6320
6321         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
6322
6323         * cpu-s390.md: Add s390_backchain instruction
6324
6325         * mini-s390.c: Significant ABI changes
6326
6327         * mini-s390.h: Cater for zero length structures
6328
6329 2005-12-20 Neale Ferguson <neale@sinenomine.net>
6330
6331         * mini-s390.c: ABI fixes
6332
6333         * inssel-s390.brg: Remove debug statements
6334
6335         * cpu-s390.md: Fix length of ATOMIC_xx operations
6336
6337 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
6338
6339         * basic-float.cs: Add float<->long conversion tests.
6340
6341 2005-12-16 Neale Ferguson <neale@sinenomine.net>
6342
6343         * mini-s390.c: Fix LOCALLOC processing.
6344
6345         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
6346
6347 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
6348
6349         * iltests.il: Add tests for some opcodes not covered by the other
6350         tests.
6351
6352 2005-12-15 Neale Ferguson <neale@sinenomine.net>
6353
6354         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
6355         register loading for Tail processing; Correct trace output.
6356
6357         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
6358
6359         * cpu-s390.md: Correct size of jmp instruction. 
6360
6361 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6362
6363         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
6364
6365 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6366
6367         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
6368           Bring s390 up to current level.
6369
6370 2005-12-12  Zltan Varga  <vargaz@gmail.com>
6371
6372         * generics.2.cs: Disable the newly added tests as they do not work yet.
6373         
6374         * generics.2.cs: Add valuetype tests.
6375
6376 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
6377
6378         * basic-long.cs: Add i4->u8 test.
6379
6380         * objects.cs: Add tests for JIT intrinsic.
6381
6382         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
6383         optimizations lost by a mistake.
6384
6385 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
6386
6387         * basic-long.cs: Remove a test moved to objects.cs.
6388
6389         * arrays.cs: Add more array tests.
6390
6391 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
6392
6393         * arrays.cs: Add new tests for multi-dimensional arrays.
6394
6395 2005-12-06  Raja R Harinath  <rharinath@novell.com>
6396
6397         * Makefile.am (test_sources2): Add generics.2.cs.
6398         (EXTRA_DIST): Add test_sources2.
6399
6400 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
6401
6402         Support for boxing and unboxing nullable types as well as the
6403         isinst operation on nullables, per the CLI ammendment.
6404
6405         * inssel.brg (CEE_ISINST): Special case for nullable
6406
6407         * mini.c (handle_unbox_nullable): new method
6408         (handle_box): Special case for nullable types
6409         (mono_method_to_ir): Call handle_unbox_nullable in correct
6410         places.
6411
6412         * generics.2.cs: New test suite
6413
6414         * Makefile.am: Support for regression tests with generics.
6415
6416 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
6417
6418         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
6419         allocated to registers. Fixes #76800.
6420
6421 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
6422
6423         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
6424
6425 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
6426
6427         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
6428         of platforms.
6429
6430 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
6431
6432         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
6433         objects.cs.
6434
6435         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
6436         
6437         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
6438 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
6439
6440         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
6441         single precision before storing to a single precision location.
6442
6443 2005-11-28  Raja R Harinath  <rharinath@novell.com>
6444
6445         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
6446
6447 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
6448
6449         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
6450         correct files.
6451
6452         * basic.cs: Remove test_0_byte_compares test which was moved to
6453         objects.cs a long time ago.
6454
6455 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
6456
6457         * aliasing.c: Fixed aliasing issue on 64 bit archs.
6458
6459 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
6460
6461         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
6462         handlers are called.
6463
6464         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
6465         throwing code.
6466
6467          * mini-ia64.c: Add support for the throw->branch exception 
6468         optimization.   
6469
6470         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
6471
6472 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6473
6474         * mini.c: Enabled "fastpath" deadce :-)
6475         
6476 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6477
6478         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
6479         alias analysis pass to support it.
6480         * mini.h: Likewise.
6481         * ssa.c: Likewise.
6482         * liveness.c: Likewise (liveness computation can use aliasing
6483         information to be more accurate).
6484         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
6485         moreover made so that "--compile-all" uses the given optimization
6486         flags and not the default ones.
6487         * aliasing.c: Alias analysis (new file).
6488         * aliasing.h: Likewise.
6489         * Makefile.am: added "aliasing.c" and "aliasing.h".
6490         
6491 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
6492
6493         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
6494         OP_L opcodes.
6495
6496 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
6497
6498         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
6499         fp >= end_of_stack exit condition, as it is not needed, and it might
6500         become true for fp eliminated frames.
6501
6502 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
6503
6504         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
6505         coded offsets.
6506
6507 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
6508
6509         * mini-arm.c: fixed alignment of doubles/longs to match
6510         the C ABI (bug #76635).
6511
6512 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
6513
6514         * aot.c: fix compilation with --enable-minimal=aot.
6515
6516 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
6517
6518         * mini-arm.c: fixed compatibility with the new
6519         floating point emulator package for compares.
6520
6521 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
6522
6523         * mini.c : reverted sig->pinvoke changes (r51396-51397).
6524
6525 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
6526
6527         * mini-exceptions.c (print_stack_frame): Output to stderr.
6528         (mono_handle_native_sigsegv): Ditto.
6529
6530 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6531
6532         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
6533         OP_LCONV_TO_OVF_I implementation.
6534
6535         * mini-amd64.c: Add support for the throw->branch exception 
6536         optimization.
6537
6538         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
6539         when the catch clause catches a more general exception, i.e. Object.
6540
6541 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
6542
6543         * cpu-ia64.md: Remove unused opcodes.
6544
6545         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
6546         specific defines for architectures defining USE_SIGACTION.
6547
6548         * mini-ia64.c: Fix some warnings.
6549
6550         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
6551         version seemed to skip a frame.
6552
6553 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6554
6555         * mini.c: Clean up the usage of sig->pinvoke flag. Now
6556         only calls which are made to native code use this flag.
6557
6558 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
6559
6560         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
6561         varargs methods as well.
6562         
6563         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
6564         which have save_lmf set. Reorganize methods prologs a bit.
6565
6566         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
6567         debugger to the proper place.
6568
6569 2005-10-29  Martin Baulig  <martin@ximian.com>
6570
6571         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
6572         when running inside the debugger until the debugger has support
6573         for it.
6574
6575 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
6576
6577         * mini.h: Fix a warning.
6578
6579 2005-10-24  Miguel de Icaza  <miguel@novell.com>
6580
6581         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
6582         we expose publicly, this returns the string.
6583
6584 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
6585
6586         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
6587         with fp elimination.
6588
6589 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
6590
6591         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
6592         native stacktrace using the glibc 'backtrace' function if available.
6593
6594 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
6595
6596         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
6597
6598         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
6599         handle SIGSEGVs received while in native code.
6600
6601         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
6602         code, call mono_handle_native_sigsegv which will abort the runtime
6603         after printing some diagnostics, instead of converting it into a
6604         confusing NullReferenceException.
6605
6606 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
6607
6608         * cpu-pentium.md: Remove unused opcodes.
6609
6610 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
6611
6612         * mini-amd64.h (MonoLMF): Add rsp field.
6613
6614         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
6615         the lmf too.
6616
6617 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
6618
6619         * mini-codegen.c (get_register_spilling): Fix some warnings.
6620
6621 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
6622
6623         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
6624         elimination during exception handling. Enable fp elimination by
6625         default.
6626
6627         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
6628         elimination.
6629
6630 2005-10-16  Martin Baulig  <martin@ximian.com>
6631
6632         * mini-exceptions.c
6633         (mono_debugger_run_finally): New public method for the debugger.
6634
6635 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
6636
6637         * debug-mini.c (mono_debug_init_method): Fix warning.
6638
6639         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
6640         the 'exname' parameter const to fix some warnings.
6641
6642 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
6643
6644         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
6645         introduced by the previous patch.
6646
6647 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
6648
6649         * basic-float.cs: Add test for precision of float arithmetic.
6650
6651         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
6652         when loading/storing single values from/to memory.
6653
6654         * mini.c (mono_jit_compile_method_with_opt): Create the function
6655         pointers in the correct domain.
6656
6657 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
6658
6659         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
6660         introduced by previous patch.
6661         
6662         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
6663         when out_filter_idx is NULL.
6664
6665         * mini-exceptions.c: Don't run filter clauses twice during exception
6666         handling. Fixes #75755.
6667
6668 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
6669
6670         * aot.c: Add support for ldflda wrappers.
6671
6672         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
6673         #75902.
6674
6675 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
6676
6677         * mini.c, mini.h: do not consider exception handlers blocks when
6678         setting up interface variables.
6679
6680 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
6681
6682         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
6683
6684 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
6685
6686         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
6687         causes a regression.
6688
6689         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
6690
6691 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
6692
6693         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
6694         of the OP_P definitions.
6695
6696         * TODO: Add a proposal for dealing with the CEE/OP mess.
6697
6698         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
6699         optimizations from the x86 port.
6700
6701         * cpu-amd64.md: Ditto.
6702
6703         * basic.cs basic-long.cs: Add tests.
6704
6705 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
6706
6707         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
6708         Patrik Torstensson's implementation of my exception-handling
6709         optimization idea, when the exception object is not used
6710         (bug #62150).
6711
6712 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
6713
6714         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
6715         of the mul_imm optimizations from the old jit.
6716
6717 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
6718
6719         * mini.c, liveness.c: patch by Patrik Torstensson and
6720         Zoltan Varga to improve performance in methods with
6721         exception clauses.
6722
6723 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
6724
6725         * driver.c: Remove 'Globalization' entry from --version.
6726
6727 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
6728
6729         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
6730         there is a profiler interested in JIT events.
6731
6732         * aot.c: Load profile files produced by the AOT profiling module, and
6733         reorder methods based on the profiling info. Add a 'method_order' table
6734         to the AOT file to make mono_aot_find_jit_info work with the reordered
6735         methods.
6736
6737         * mini.h: Bump AOT file version info.
6738
6739 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
6740
6741         * mini-arm.h: work around what looks like a gcc bug when optimizations
6742         are enabled.
6743
6744 2005-09-28  Raja R Harinath  <rharinath@novell.com>
6745
6746         * Makefile.am (AM_CFLAGS): Don't use += to append inside
6747         conditionals.  Use ...
6748         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
6749
6750 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
6751
6752         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
6753         to determine the amount of memory to copy when passing valuetypes.
6754
6755         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
6756         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
6757
6758 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
6759
6760         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
6761         information about aot.
6762
6763 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
6764
6765         * *.c: Replace the use of {Enter,Leave}CriticalSection with
6766         macros. This will allow a deadlock debugger to easily be plugged
6767         in.
6768
6769 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
6770
6771         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
6772
6773 2005-09-27  Raja R Harinath  <rharinath@novell.com>
6774
6775         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
6776         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
6777         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
6778         ($(arch_built)) [CROSS_COMPILING]: Error out.
6779
6780 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
6781
6782         * aot.c: Add support for the no_special_static flag for classes.
6783
6784 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6785
6786         * Reapply reverted patches.
6787
6788         * *: Revert r50174 as well.
6789
6790         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
6791
6792 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6793
6794         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
6795
6796 2005-09-23  Miguel de Icaza  <miguel@novell.com>
6797
6798         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
6799         part of the SIG_HANDLER_SIGNATURE.  
6800
6801 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
6802
6803         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
6804         statistics.
6805
6806         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
6807         introduced by previous patch.
6808
6809 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
6810
6811         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
6812         saved registers too.
6813
6814         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
6815         upon the information returned by get_call_info ().
6816         
6817         * mini-x86.c (add_float): Fix stack size calculation.
6818         (mono_arch_call_opcode): Rewrite this so it works based up the
6819         information returned by get_call_info ().
6820         (mono_arch_get_this_vret_args): Ditto.
6821
6822 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
6823
6824         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
6825         in cinfo to determine the registers which need to be used.
6826
6827 2005-09-20  Miguel de Icaza  <miguel@novell.com>
6828
6829         * driver.c (mono_main): Add --server and --desktop flags. 
6830
6831 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
6832
6833         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
6834         registers as global registers.
6835
6836         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
6837         longer needed with the new register allocator.
6838
6839         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
6840
6841         * cpu-ia64.md: Remove unused opcodes.
6842         
6843         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
6844         
6845 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
6846
6847         * cpu-amd64.md: Remove unused opcodes.
6848
6849         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
6850         needed with the new register allocator.
6851
6852         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
6853         reg-reg moves.
6854
6855 2005-09-16  Raja R Harinath  <rharinath@novell.com>
6856
6857         * Makefile.am (check-local): Don't invoke semdel-wrapper.
6858
6859 2005-09-16  Martin Baulig  <martin@ximian.com>
6860
6861         * exceptions-amd64.c
6862         (throw_exception): Don't call mono_debugger_throw_exception() if
6863         we're a rethrow - see the FIXME in the code.
6864
6865 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
6866
6867         * mini.c (mono_init_exceptions): This only works on some architectures.
6868         
6869 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6870
6871         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
6872         on ia64.
6873
6874         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
6875
6876         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
6877         now in mini-exceptions.c.
6878
6879 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
6880
6881         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
6882         now in mini-exceptions.c.
6883
6884 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6885
6886         * exceptions-x86.c: Applied patch from Patrik Torstensson 
6887         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
6888
6889         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
6890         code into mini-exceptions.c. Add some assertions to it.
6891
6892 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
6893
6894         * aot.c (emit_section_change): Applied patch from "The Software Team" 
6895         (<software@solmersa.com>). Fix as errors on windows.
6896
6897 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6898
6899         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
6900         method info into the LMF.
6901
6902 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6903         
6904         * mini-ia64.c: Add proper unwind info for method epilogs.
6905
6906         * exceptions-ia64.c: Add some code to help debugging.
6907         
6908         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
6909
6910         * mini-exceptions.c: Fix warning.
6911
6912 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6913
6914         * mini.c: Really fix build.
6915
6916         * mini-x86.c mini-amd64.c: Fix build.
6917
6918 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6919
6920         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
6921
6922         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
6923         some Interlocked methods as intrinsics.
6924
6925         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
6926         for Thread methods as well.
6927
6928         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
6929
6930         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
6931
6932         * mini-ia64.c mini-x86.c mini-amd64.c 
6933         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
6934         OP_MEMORY_BARRIER.
6935         
6936         * mini.c (mono_init_exceptions): Fix build breakage.
6937
6938 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
6939
6940         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
6941         of instructions. Use the new ia64_unw_op macros for emitting unwind
6942         info.
6943
6944         * mini.c (mono_init_exceptions): Initialize exception handling
6945         related trampolines at startup.
6946
6947 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
6948
6949         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
6950
6951 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
6952
6953         * mini.c: Handle type loading errors gracefully during compilation and
6954         throw the appropriate exception.
6955
6956 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
6957
6958         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
6959         for the mono binary.
6960
6961 2005-09-09  Martin Baulig  <martin@ximian.com>
6962
6963         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
6964         the release.
6965
6966 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6967
6968         * mini-arm.h: use emulation for conv.r.un for the release.
6969
6970 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6971
6972         * mini-arm.c, objects.cs: more fixes and tests for them.
6973
6974 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6975
6976         * mini-arm.c: align structures to at least 4 bytes to be able
6977         to keep our current optimized memcpy.
6978
6979 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
6980
6981         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
6982
6983 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6984
6985         * mini.c: ignore SIGPIPE.
6986
6987 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
6988
6989         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
6990
6991         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
6992
6993 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
6994
6995         * mini.h: Add prototype for mono_allocate_stack_slots_full.
6996
6997 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6998
6999         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
7000         exception handling support.
7001         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
7002         patch by Brian Koropoff <briank@marakicorp.com>).
7003
7004 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
7005
7006         * mini.c: revert another 'optimization' which breaks when
7007         items on the eval stack need to be saved at a basic block end
7008         (bug #75940).
7009
7010 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
7011
7012         * jit-icalls.c: for arrays, ensure we always provide
7013         lower bounds.
7014
7015 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
7016
7017         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
7018         
7019         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
7020
7021 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
7022
7023         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
7024         arguments in their original register.
7025
7026 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
7027
7028         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
7029         memset/memcpy.
7030
7031         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
7032         when ssapre is enabled.
7033
7034         * inssel-long.brg: Fix bug in previous patch.
7035
7036         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
7037         multiplication by a constant.
7038
7039 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
7040
7041         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
7042         icc.
7043
7044         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
7045         saving registers.
7046
7047 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
7048
7049         * inssel-arm.brg: apply changes tested by Brian Koropoff
7050         <briank@marakicorp.com>.
7051
7052 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
7053
7054         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
7055         
7056 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
7057
7058         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
7059         to the same register if dreg is just a base register.
7060         (print_ins): Improve printing of membase opcodes.
7061
7062         * inssel-x86.brg: Add optimized ldind(reg) rules.
7063
7064         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
7065
7066 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
7067
7068         * mini.c: when running under valgrind, set the stack bottom for
7069         the GC at the actual approximate stack for the app (fixes running
7070         mono with valgrind).
7071
7072 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
7073
7074         * mini.c: do no break at the first valuetype to init found
7075         (fixes bug #75791).
7076
7077 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
7078
7079         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
7080
7081 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
7082
7083         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
7084
7085 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
7086
7087         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
7088
7089 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7090
7091         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
7092
7093         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
7094         code.
7095
7096         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
7097         code.
7098
7099         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
7100         methods.
7101
7102 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
7103
7104         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
7105
7106 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7107
7108         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
7109         in the tail recursion optimization.
7110
7111         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
7112         debug info into the assembly file.
7113
7114         * iltests.il: Add test for filter regions.
7115
7116         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
7117         initial stack of filter regions. Fixes #75755.
7118
7119 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
7120
7121         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
7122         stack requirements.
7123
7124 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7125
7126         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
7127         the check for an already compiled method on non-ia64 platforms.
7128         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
7129         proper domain.
7130
7131         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
7132
7133         * inssel-x86.brg: Add some optimized call rules.
7134
7135 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
7136
7137         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
7138         method here.
7139
7140         * mini.h mini-trampolines.c: Pass the trampoline argument to 
7141         mono_arch_patch_delegate_trampoline.
7142
7143         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
7144
7145         * mini-trampolines.c: Fix build.
7146
7147         * mini-amd64.h: Add delegate trampolines.
7148
7149         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
7150
7151         * inssel-amd64.brg: Add optimized call rules.
7152         
7153         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
7154
7155         * inssel-ia64.brg: Add optimized ldind(reg) rules.
7156
7157 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
7158
7159         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
7160         change.
7161
7162         * mini-ia64.c: Remove LMF fixmes.
7163
7164         * mini-ia64.h: Remove most fields from LMF.
7165
7166         * inssel-ia64.brg (stmt): Fix unaligned access errors.
7167
7168         * mini-trampolines.c: Add support for IA64 function descriptors.
7169
7170         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
7171         for IA64 function descriptors.
7172
7173 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
7174
7175         * tramp-arm.c: patch the vtable for virtual calls. Added
7176         support code to register/unregister the LMF.
7177         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
7178         more LMF work.
7179
7180 2005-08-19  Dick Porter  <dick@ximian.com>
7181
7182         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
7183         bit value if needed.
7184
7185 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
7186
7187         * mini.c (mini_get_method): Move handling of wrapper data here.
7188
7189         * mini.c (mono_method_to_ir): Add support for dynamic methods.
7190
7191         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
7192         virtual.
7193
7194         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
7195         bblock->code does not remain empty.
7196
7197 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
7198
7199         * arrays.cs: Add regression test for #75832.
7200
7201         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
7202         rules. Fixes #75832.
7203
7204         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
7205         instruction scheduling.
7206
7207 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
7208
7209         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
7210
7211 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
7212
7213         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
7214
7215         * mini-codegen.c: Fix VC build.
7216
7217         * cpu-pentium.md: Increase length of atomic_exhange_i4.
7218
7219 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7220
7221         * mini.h: fix signature for mono_register_opcode_emulation.
7222
7223 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
7224
7225         * mini.c: Get rid of most of the helper_sig_... constants using
7226         mono_create_icall_signature ().
7227
7228 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
7229
7230         * jit-icalls.c (helper_ldstr): New helper function.
7231
7232         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
7233
7234         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
7235         throw, load the string using a helper call instead of creating a string object.
7236
7237         * aot.c: Update after LDSTR changes.
7238
7239         * mini.h: Bump AOT file version.
7240         
7241         * aot.c: Save class size info into the AOT file. Print more statistics during
7242         compilation.
7243
7244         * mini.h: Bump AOT file version.
7245
7246         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
7247         ordering of disasm cases. Fixes #74957.
7248
7249 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
7250
7251         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
7252         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
7253         the generic code needed for the ARM port.
7254
7255 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
7256
7257         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
7258         inssel-arm.brg: more ARM features and fixes.
7259
7260 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
7261
7262         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
7263         ARM port work in progress.
7264
7265 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
7266
7267         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
7268
7269         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
7270
7271         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
7272
7273         * inssel.brg (mini_emit_memset): Add support for unaligned access.
7274
7275         * *-ia64.*: Ongoing IA64 work.
7276         
7277         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
7278
7279 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
7280
7281         * TODO: Remove out-of-data todo stuff.
7282
7283         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
7284         dead code.
7285
7286         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
7287
7288         * mini.h: Bump corlib version.
7289
7290 2005-07-27  Martin Baulig  <martin@ximian.com>
7291
7292         * mini-codegen.c
7293         (create_copy_ins): Added `const unsigned char *ip' argument; set
7294         `copy->cil_code' from it.
7295
7296 2005-07-27  Martin Baulig  <martin@ximian.com>
7297
7298         * mini-exceptions.c (mono_handle_exception): Don't call
7299         mono_debugger_handle_exception() for filters.
7300
7301 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
7302
7303         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
7304         as well.
7305
7306 2005-07-26  Martin Baulig  <martin@ximian.com>
7307
7308         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
7309
7310         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
7311         helper_compile_generic_method() if the method is actually virtual
7312         and non-final.
7313
7314 2005-07-26  Martin Baulig  <martin@ximian.com>
7315
7316         * mini.c
7317         (trampoline_code): Renamed to `mono_trampoline_code' and made it
7318         public; this is now accessed directly by the debugger.
7319         (mono_generic_trampoline_code): Removed.
7320
7321         * debug-mini.c
7322         (mono_debug_init_method): Also add interncalls and wrappers.
7323
7324 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
7325
7326         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
7327
7328 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
7329
7330         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
7331
7332 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
7333
7334         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
7335
7336 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7337
7338         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
7339         getting TLS offsets on AMD64 too.
7340
7341 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
7342
7343         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
7344
7345 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
7346
7347         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
7348         inssel-arm.brg, mini-arm.h: ARM port work in progress.
7349
7350 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7351
7352         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
7353
7354         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
7355         to mini.c.
7356
7357         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
7358         mono_sparc_is_virtual_call ().
7359         
7360         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
7361
7362         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
7363         trampoline parameters.
7364
7365         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
7366         
7367         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
7368         to mono_arch_get_vcall_slot_addr.
7369
7370         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
7371         trampoline code.
7372
7373         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
7374
7375 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7376
7377         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
7378
7379 2005-07-19  Martin Baulig  <martin@ximian.com>
7380
7381         * exceptions-amd64.c (throw_exception): Call
7382         mono_debugger_throw_exception() here like we're doing it on i386.
7383
7384 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7385
7386         * mini-ia64.c: Add optimized TLS access support.
7387
7388 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
7389
7390         * mini-exceptions.c: Ongoing IA64 work.
7391
7392         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
7393
7394         * mini.c: Use the default optimization set when embedding. Fixes
7395         #75194.
7396
7397 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
7398
7399         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
7400         of trampolines to a separate file.
7401
7402         * mini-trampolines.c: New file.
7403
7404         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
7405         separate file.
7406         
7407         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
7408         amd64/ia64 code.
7409
7410         * mini-codegen.c: Fix cygwin build.
7411
7412 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
7413
7414         * mini.c: Add some minor changes needed by the IA64 port.
7415
7416         * *-ia64.*: Ongoing IA64 work.
7417
7418 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
7419
7420         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
7421         trampolines into arch-independent and arch-dependent parts.
7422
7423         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
7424
7425 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
7426
7427         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
7428
7429         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
7430         the xp-regalloc-branch for amd64.
7431
7432         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
7433         xp-regalloc-branch for x86.
7434
7435 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
7436
7437         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
7438
7439 2005-07-06  Martin Baulig  <martin@ximian.com>
7440
7441         * mini.c
7442         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
7443         (mono_jit_runtime_invoke): Likewise.
7444
7445 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
7446
7447         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
7448         on x86 too.
7449         
7450         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
7451         without loading their metadata. Reorganize the file format so exception handling+
7452         debug info is kept separate from normal method info. Create MonoJitInfo 
7453         structures for methods lazily.
7454
7455         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
7456         loading metadata.
7457         (x86_class_init_trampoline): Patch AOT class init trampolines too.
7458
7459         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
7460
7461         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
7462         in AOT code.
7463
7464         * mini.h: Bump AOT file version.
7465
7466 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
7467
7468         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7469
7470 2005-07-01  Raja R Harinath  <rharinath@novell.com>
7471
7472         * Makefile.am (check-local): Call semdel-wrapper.
7473
7474 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
7475
7476         * mini-x86.c: Revert the last change as it seems to break the build..
7477
7478 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
7479
7480         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7481         
7482         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
7483
7484 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
7485
7486         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
7487         outside of the macro, so strange stuff doesn't happen with gcc4
7488         (NEW_AOTCONST_TOKEN): Likewise.
7489
7490 2005-06-28  Martin Baulig  <martin@ximian.com>
7491
7492         * mini.c (mini_class_is_system_array): New static method; use this
7493         instead of `klass->parent == mono_defaults.array_class' everywhere
7494         since this also works for the new generic array class.
7495
7496 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
7497
7498         * inssel.brg: Remove warnings.
7499
7500 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
7501
7502         * mini-ia64.c: Ongoing IA64 work.
7503
7504         * basic-float.cs: Add float->i1 conversion test.
7505
7506         * iltests.il: Add conv.u4 test.
7507
7508 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
7509
7510         * inssel-long.brg: Fix bug caused by last change.
7511
7512 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
7513
7514         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
7515         BSDs.  Allows the x86 JIT to work on OSX86
7516
7517 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
7518
7519         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
7520         u4->i8 conversion.
7521
7522         * mini-ia64.c: Ongoing IA64 work.
7523
7524 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
7525
7526         * mini-ia64.c: Ongoing IA64 work.
7527
7528         * driver.c: Clean up jit_code_hash as well when using --regression.
7529
7530         * inssel-long.brg: Fix long->i4/u4 conversion rules.
7531
7532         * basic-long.cs: Add tests for long->u4 conversion.
7533
7534 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
7535
7536         * mini.c: Take mono_get_domainvar out of macros. This makes sure
7537         that we do not depend on undefined C behavior: the order stuff
7538         gets evaluated within an expression. Fixes mono when compiled on
7539         GCC 4.
7540
7541 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
7542
7543         * *-ia64.*: Ongoing IA64 work.
7544
7545         * aot.c: Lower memory usage while loading AOT methods.
7546
7547         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
7548
7549         * mini.h: Bump AOT file format version.
7550
7551 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
7552
7553         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
7554
7555 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
7556
7557         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
7558         not on callee assembly). Fixed some comments.
7559
7560 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
7561
7562         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
7563         it gets proper disassembly.
7564         (emit_method_info): Remove some dead code.
7565
7566         * mini.c (mini_method_compile): Allways allocate the GOT var in
7567         mono_method_to_ir for emulating opcodes.
7568
7569 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
7570
7571         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
7572         before freeing the code memory. Fixes #74990.
7573
7574         * objects.cs: Add regression test for #74992.
7575
7576         * liveness.c: Extend live ranges of arguments to the beginning of the
7577         method. Fixes #74992.
7578
7579         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
7580         so it points into the faulting instruction.
7581
7582 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
7583
7584         * jit-icalls.c (mono_imul_ovf): Add exception handling.
7585
7586         * *-ia64.*: Ongoing IA64 work.
7587
7588         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
7589
7590 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
7591
7592         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
7593
7594         * *-ia64.*: Ongoing IA64 work.
7595
7596 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
7597
7598         * basic-long.cs: Add tests for add/sub.ovf.
7599
7600         * basic.cs: Add tests for sub.ovf.
7601
7602         * *-ia64.*: Ongoing IA64 work.
7603
7604 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
7605
7606         * *-ia64.*: Ongoing IA64 work.
7607
7608         * basic.cs: Add conv.ovf.i4.un test.
7609
7610 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
7611
7612         * mini.c: (remove_block_if_useless) Fixed bug 75061.
7613         
7614 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7615
7616         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
7617
7618 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
7619
7620         * *-ia64.*: Ongoing IA64 work.
7621
7622 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7623
7624         * trace.[ch]:
7625         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
7626
7627 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
7628
7629         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
7630
7631 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
7632
7633         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
7634
7635         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
7636         of a call is callable by a near call.
7637
7638 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
7639
7640         * mini-ia64.c: Ongoing IA64 work.
7641
7642 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
7643
7644         * genmdesc.c: Make the generated array non-static.
7645
7646         * inssel-long.brg: Fix LSHR_IMM rule.
7647
7648         * *-ia64.*: Ongoing IA64 work.
7649
7650         * *-ia64.*: Ongoing IA64 work.
7651
7652 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7653
7654         * *-ia64.*: Ongoing IA64 work.
7655
7656         * *-ia64.*: Ongoing IA64 work.
7657         
7658         * mini-ia64.c: Ongoing IA64 work.
7659
7660         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
7661
7662 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7663
7664         * objects.cs basic-calls.cs: Move some tests to objects.cs.
7665         
7666         * objects.cs basic-long.cs: Move some tests to objects.cs.
7667
7668 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
7669
7670         * *-ia64.*: Ongoing IA64 work.
7671
7672         * iltests.il: Add a new test.
7673
7674         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
7675         newobj. Fixes #75042.
7676
7677 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
7678
7679         * *-ia64.*: Ongoing IA64 work.
7680         
7681         * *-ia64.*: Ongoing IA64 work.
7682         
7683         * *-ia64.*: Ongoing IA64 work.
7684
7685         * basic.cs objects.cs: Move tests accessing static variables as well.
7686
7687         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
7688
7689 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
7690
7691         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
7692
7693         * driver.c: Always print failed tests.
7694
7695         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
7696         frame pointer.
7697
7698         * *ia64*: Ongoing IA64 work.
7699
7700 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
7701
7702         * basic.cs: Add tests for add.ovf. Fix warnings.
7703
7704 2005-05-18  Miguel de Icaza  <miguel@novell.com>
7705
7706         * driver.c (mono_main): Avoid crash if no argument is passed to
7707         --break;  Do not use g_error, but f_printf.   And fix all other
7708         ocurrences of the same crash.
7709
7710 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
7711
7712         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
7713         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
7714         Fixes #74742.
7715
7716 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
7717
7718         * *-ia64.*: Add beginnings of IA64 backend.
7719
7720         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
7721
7722 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
7723
7724         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
7725         Fixes #74925.
7726
7727         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
7728
7729         * mini-amd64.c: Fix a warning.
7730
7731 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
7732
7733         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
7734         in float_neg. Fixes #74897.
7735
7736         * mini-amd64.c (emit_call): Fix another near call bug.
7737
7738 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
7739
7740         * declsec.c: Keep the appdomain information in the structure. Added a 
7741         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
7742         value gets overwritten).
7743         * declsec.h: Set the default MonoArray for the the stack to 6. Added
7744         an MonoAppDomain member to MonoSecurityFrame.
7745         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
7746         used in the stack walk. Now use a MonoArray which grow (double) when
7747         it gets full.
7748
7749 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
7750
7751         * mini.c: Re-enabled runtime cleanup, since running threads should
7752         now properly stop when exiting.
7753
7754 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
7755
7756         * mini-codegen.c: New file contaning the arch-independent local
7757         register allocator. Not used by any architectures yet.
7758
7759         * mini.h linear-scan.c: Merge some changes from the 
7760         mini-xp-local-regalloc branch.
7761
7762 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
7763
7764         * mini-amd64.c (emit_call): Fix calls to native functions when the
7765         runtime is compiled as a shared library. Fixes #74756.
7766
7767         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
7768         on a literal field. Fixes #74751.
7769
7770 2005-04-25  Raja R Harinath  <rharinath@novell.com>
7771
7772         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
7773
7774 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
7775
7776         * objects.cs: Add missing null casting test.
7777
7778 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
7779
7780         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
7781         in wrapper methods. Also rename 'address' variable to 'offset'.
7782
7783 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
7784
7785         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
7786         warnings.
7787         
7788         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
7789
7790         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
7791         work on windows.
7792
7793 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
7794
7795         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
7796
7797 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7798
7799         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
7800         just the last bytes.
7801
7802 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7803
7804         * aot.c (mono_compile_assembly): Fix warning.
7805
7806         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
7807         by the _MSC_VER stuff.
7808
7809 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
7810
7811         * inssel-long.brg: Fix #74588.
7812
7813         * cpu-amd64.md: Fix #74591.
7814
7815         * iltests.il: Add new regression tests.
7816
7817 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
7818
7819         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
7820         valuetype.
7821
7822 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
7823
7824         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
7825
7826         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
7827         from Bill Middleton <flashdict@gmail.com>.
7828
7829 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
7830
7831         * arrays.cs: Add new regression test. Fix warnings.
7832
7833 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
7834
7835         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
7836         and leakage in CKFINITE.
7837
7838         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
7839         this to a null op since it is called on amd64 too.
7840
7841         * exceptions-amd64.c (get_throw_trampoline): Align stack.
7842
7843         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
7844         body since this is not used on amd64.
7845         
7846         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
7847
7848         * mini-amd64.c: Remove obsolete fixmes.
7849
7850         * mini.c (print_method_from_ip): Fix debugging support.
7851
7852 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
7853
7854         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
7855         so that expressions that don't give much gain are not reduced.
7856         * ssapre.h: Likewise.
7857
7858 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
7859
7860         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
7861
7862         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
7863
7864         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
7865
7866 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
7867
7868         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
7869
7870         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
7871
7872 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
7873
7874         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
7875         stack touching.
7876
7877         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
7878
7879         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
7880
7881         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
7882
7883         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
7884         MONO_ARCH_USE_SIGACTION. Fixes #74252.
7885
7886         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
7887
7888         * mini-x86.c: Fix up stack overflow handling.   
7889
7890         * exceptions.cs: Add new regression test.
7891
7892 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
7893
7894         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
7895         mono_jit_thread_attach.
7896
7897         * mini.c (mono_method_to_ir): Verify called method is not abstract.
7898
7899 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7900
7901         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
7902         avoid calling constructors using callvirt.
7903
7904         * inssel.brg: Fix #74073.
7905
7906 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
7907
7908         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
7909         compilation with non-GCC compilers.
7910         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
7911         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
7912
7913 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
7914
7915         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
7916         klass->interface_offsets (will likely fix bug#74073).
7917
7918 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7919
7920         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
7921
7922 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
7923
7924         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
7925         to amd64_div_reg_size ().
7926         
7927         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
7928
7929 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
7930
7931         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
7932
7933 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7934
7935         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
7936
7937 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7938
7939         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
7940         
7941         * mini.c (mono_precompile_assembly): Load and precompile referenced
7942         assemblies as well. Fixes #74015.
7943
7944 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
7945
7946         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
7947
7948 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
7949
7950         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
7951         a lot of checks and (anyway) permissions cannot work until corlib is 
7952         loaded.
7953
7954 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
7955
7956         * mini-ppc.c: fixed ABI issue on sysv/ppc.
7957
7958 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
7959
7960         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
7961         calls (fixes bug#72824).
7962
7963 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
7964
7965         * mini.c: fix tail recursion elimination (see test in bug#73936).
7966
7967 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
7968
7969         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
7970         some fp functions in sse2 mode.
7971
7972 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
7973
7974         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
7975
7976 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
7977
7978         * mini.h mini.c: Add mono_get_jit_tls_key ().
7979
7980         * mini-x86.c: Enable fast TLS support on windows.
7981
7982 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
7983
7984         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
7985         * mini.c: Check for p/invoke method when generating code. If a
7986         p/invoke method, or it's class, isn't decorated with [Suppress
7987         UnmanagedCodeSecurity] then generate code to call System.Security.
7988         UnmanagedDemand (only if the security manager is active).
7989
7990 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7991
7992         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
7993         last change as it seems to cause strange crashes.
7994         
7995 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
7996
7997         * *.c: handle unsafe function pointers where needed.
7998
7999 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
8000
8001         * mini.c (mono_jit_free_method): Remove the fixme too.
8002
8003 2005-03-15  Miguel de Icaza  <miguel@novell.com>
8004
8005         * mini.c: As discussed, make the code actually free the delegate
8006         thunk now, to enable the debugging of delegate problems, use
8007         MONO_DEBUG=1 when running Mono. 
8008
8009         This takes also care of parts of the leaks as seen by Joe.
8010
8011 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
8012
8013         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
8014         thread_tls_offset calculation.
8015
8016 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
8017
8018         * declsec.c: Reworked linkdemand checks for icall. The previous code
8019         was using the declaration code (untrusted) and didn't work as expected
8020         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
8021         specific case.
8022
8023 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
8024
8025         * iltests.il: Add new localloc test.
8026
8027         * mini-amd64.c: Handle large stack allocations the same way as on
8028         windows if stack overflow handling is working.
8029         
8030         * mini-amd64.c: Allocate the signal stack using mmap.
8031
8032         * mini.c (sigsegv_signal_handler): Fix reading of context.
8033
8034         * mini-exceptions.c: Fix up stack overflow handling.
8035
8036         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
8037
8038         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
8039
8040         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
8041
8042         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
8043
8044         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
8045         tramp_init functions as they are no longer needed.
8046
8047 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
8048
8049         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
8050         
8051         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
8052
8053         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
8054         
8055         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
8056         support that now.
8057
8058         * mini-ops.h: Add OP_LMUL_IMM.
8059
8060         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
8061         long mul/div opcodes as intrinsic.
8062
8063         * mini-amd64.c (emit_call): Handle the case when the callee might be
8064         an AOT method.
8065
8066 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
8067
8068         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
8069         extra safe.
8070         
8071         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
8072
8073         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
8074
8075 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
8076
8077         * mini.c (mono_codegen): Don't leak here, to help people running
8078         monogrind.
8079
8080 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
8081
8082         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
8083         conversions in sse2 mode.
8084
8085         * basic-float.cs: Add regression test.
8086         
8087         * mini-amd64.c: Reenable sse2.
8088
8089 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
8090
8091         * mini-amd64.c: Disable sse2 until some regressions are fixed.
8092
8093 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
8094
8095         * driver.c: Copyright text should include 2005.
8096         
8097 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
8098
8099         * cpu-amd64.md (load_membase): Fix more max lengths.
8100
8101 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
8102
8103         * cpu-amd64.md (load_membase): Fix max length.
8104
8105         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
8106
8107         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
8108
8109         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
8110         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
8111
8112         * basic-float.cs: Add rounding regression test.
8113
8114         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
8115
8116 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
8117
8118         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
8119         structures in registers for pinvoke wrappers.
8120
8121 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
8122
8123         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
8124
8125 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
8126
8127         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
8128         wrapper to mono_jit_thread_attach.
8129
8130         * mini.c (mini_jit_thread_attach): New jit icall.
8131
8132         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
8133         native->managed wrappers.
8134
8135         * exceptions.cs: Add new regression test.
8136
8137         * mini.c (optimize_branches): Check regions in the cbranch to throw
8138         block case as well. Fixes #73242.
8139
8140 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
8141
8142         * mini.c: thread safety fixes.
8143
8144 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
8145
8146         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
8147         patching stuff, since delegates use jump trampolines so there is
8148         no caller.
8149
8150         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
8151         jump trampolines.
8152         
8153         * tramp-amd64.c: Fix build.
8154
8155         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
8156         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
8157
8158         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
8159         Rename this to mono_arch....
8160         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
8161
8162         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
8163
8164         * mini-amd64.c (emit_call): If both the caller and the callee is
8165         guaranteed to have 32 bit addresses, emit a normal call.
8166
8167         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
8168
8169         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
8170         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
8171         method_ptr inside delegates.
8172
8173 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
8174
8175         * mini.c (mono_jit_free_method): Free the method info even if the native code is
8176         invalidated. Fixes #73001.
8177
8178         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
8179
8180         * mini-x86.c: Only use stdcall for pinvokes on windows.
8181
8182 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
8183
8184         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
8185         * mini-x86.c: remove unreliable __thread var offset detection,
8186         use the correct accessors and enable by default.
8187
8188 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
8189
8190         * mini.c (mono_jit_free_method): Fix memory leak.
8191
8192 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
8193
8194         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
8195
8196 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
8197
8198         * cpu-amd64.md: Fix lengths of atomic opcodes.
8199
8200 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
8201
8202         * driver.c: try to not imply using ICU is any good.
8203
8204 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
8205
8206         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
8207         functions as inline ops.
8208
8209         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
8210         some Interlocked functions as inline ops.
8211
8212         * mini.c (move_basic_block_to_end): Fix bug in last patch.
8213
8214         * mini.h (MonoBasicBlock): Reorganize fields a bit.
8215
8216         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
8217
8218         * mini.c: Add support for OP_NOT_TAKEN.
8219
8220         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
8221         structures in registers for pinvoke wrappers.
8222
8223         * mini-amd64.c: Fix warnings.
8224
8225 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
8226
8227         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
8228
8229         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
8230
8231         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
8232         address instead of loading the address from it.
8233
8234         * mini-x86.c: Add support for returning small structs in registers
8235         on Win32. Fixes part of #70864.
8236         
8237 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
8238
8239         * trace.c (get_token): Improve error checking.
8240
8241 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
8242
8243         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
8244
8245 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
8246  
8247         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
8248         it can be reused for MonoClass.
8249         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
8250         _LINKDEMAND.
8251
8252 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
8253
8254         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
8255         instead of a MonoReflectionMethod. The method information wasn't used
8256         when displaying SecurityException details (but will be now).
8257
8258 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
8259
8260         * Makefile.am : windows build fix.
8261
8262 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
8263
8264         * iltests.il: Add new regression test.
8265
8266         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
8267         #72522.
8268
8269 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
8270  
8271         * mini.c: Moved linkdemand check into helper function check_linkdemand
8272         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
8273         LDFTN, LDVIRTFTN).
8274
8275 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
8276
8277         * declsec.c: Added statistics counter for different kinds of 
8278         LinkDemands.
8279         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
8280         (and commented) declaration.
8281         * mini.c: Added statistics counter for security Demand code 
8282         generation. Added display of security statistics.
8283
8284 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
8285
8286         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
8287         Fix compilation errors under gcc-2.95.
8288
8289 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
8290
8291         * mini.c, driver.c: Use the new jit trampoline hashtable
8292
8293 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8294
8295         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
8296
8297 2005-02-11  Martin Baulig  <martin@ximian.com>
8298
8299         * debug-mini.c (mono_debug_close_method): Free the line number array.
8300
8301 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8302
8303         * aot.c: Break up large methods into smaller ones. Share GOT slots for
8304         icalls.
8305
8306         * mini.h: Bump AOT file format version. 
8307
8308 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
8309
8310         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
8311         APTC and P/Invoke.
8312         * declsec.h: Added macros to get/set lazyly initialized security 
8313         informations about assemblies. Added new enum for different type of
8314         possible LinkDemand violation. Added function to check LinkDemands.
8315         * mini.h: Added a field to MonoCompile to hold any security violation
8316         detected when JITting a method (so it can be thrown later).
8317         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
8318         and CEE_CALLVIRT. Added code to throw exception at the end of
8319         mini_method_compile (note: the exception is unhandled right now).
8320
8321 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
8322
8323         * mini.c, jit-icalls.c: use the managed implementation of
8324         memset for initobj and memset, to avoid managed <-> unmanaged
8325         transitions.
8326
8327 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8328
8329         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
8330         optimization if it would need a GOT var.
8331
8332         * basic.cs: Add tests for constant propagation and switch statements.
8333
8334         * ssa.c: Fix out-of-range constant propagation and switch statements.
8335
8336 2005-02-09    <vargaz@freemail.hu>
8337
8338         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
8339
8340 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
8341
8342         * cpu-amd64.md (load_membase): Fix max length of load_membase.
8343
8344 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8345
8346         * mini.c: update to new signature of mono_class_get_allocation_ftn().
8347
8348 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
8349
8350         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
8351         arithmetic operations.
8352
8353 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
8354
8355         * mini-ppc.c: add a workaround for broken user code that
8356         DllImports vararg functions with non-vararg signatures.
8357
8358 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
8359
8360         * mini.c (mono_jit_compile_method_inner): Add detection and a 
8361         meaningfull error message for assemblies written in Managed C++.
8362
8363         * tramp-amd64.c mini-amd64.h: Add support for 
8364         create_trampoline_from_token ().
8365
8366         * aot.c mini-x86.c abcremoval.c: Applied patch from
8367         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
8368
8369 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
8370
8371         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
8372         which takes a MonoImage/token as parameter instead of a MonoMethod.
8373
8374         * aot.c: Use the new trampoline for initializing vtables.
8375
8376         * aot.c: Add support for ldfld/stfld_remote wrappers.
8377
8378         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
8379         rules for compare <MEM>, IMM.
8380
8381         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
8382
8383         * aot.c: Handle inherited finalizers correctly.
8384
8385 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
8386
8387         * inssel.brg (stmt): Add a missing _setup_... ().
8388
8389         * aot.c: Save some parts of the class state to the AOT file and use it
8390         to recompute that state when a class is initialized.
8391
8392         * mini.c: Install AOT hooks into the runtime.
8393
8394         * mini.h: Bump AOT file format version.
8395         
8396         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
8397         Fixes #72148.
8398
8399         * iltests.il: Add new test.
8400
8401 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8402
8403         * mini.c: fix typo.
8404
8405 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
8406
8407         * mini.c: setup the statistical profiler in the thread attach
8408         callback to cope with the new single thread code.
8409
8410 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
8411
8412         * mini-ppc.c: ensure we have enough room for the profiler
8413         calls (fixed bug#72084).
8414
8415 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
8416
8417         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
8418         it.
8419
8420 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8421
8422         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
8423
8424 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8425
8426         * ssapre.c: Fixed an issue with down safety (this allows IronPython
8427         to succesfully execute parrotbench).
8428         * ssapre.h: Likewise.
8429
8430 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8431
8432         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
8433         variable for stores to method arguments (fixes a SSAPRE issue).
8434
8435 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8436
8437         * mini.c: handle value types in dup, fixes gen-112.cs.
8438
8439 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
8440
8441         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
8442         sequence for calls in dynamic methods to avoid thunks.
8443
8444 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
8445
8446         * mini.c: correctly remove dynamic methods from the hashtable.
8447
8448 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8449
8450         * driver.c: Disabled SSAPRE until fix the bug that appears
8451         in IronPython's parrotbench.
8452
8453 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
8454
8455         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
8456
8457         * mini.c (mono_method_to_ir): Revert the previous change.
8458         
8459         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
8460         when AOT compiling.
8461
8462         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
8463         mono_jit_info_table_find () etc. when running under valgrind.
8464
8465         * inssel.brg: Fix warnings.
8466
8467         * mini-exceptions.c: Fix warnings.
8468
8469 2005-01-31  Martin Baulig  <martin@ximian.com>
8470
8471         * driver.c (compile_all_methods_thread_main): Don't try to compile
8472         generic methods or anything which has type parameters.
8473
8474 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
8475
8476         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
8477
8478         * TestDriver.cs: Add --verbose flags.
8479
8480         * graph.c ssa.c: Fix 64 bit warnings.
8481         
8482         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
8483         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
8484         Fix 64 bit warnings.
8485
8486         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
8487         variable not spotted by gcc.
8488         
8489         * mini-amd64.c inssel-amd64.brg: Applied patch from  
8490         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
8491         X86_COMPARE_MEMBASE opcodes.
8492
8493         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
8494
8495 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
8496
8497         * *: MonoMethod->signature might be NULL now. You *MUST* use
8498         mono_method_signature.
8499
8500 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8501
8502         * driver.c (compile_all_methods_thread_main): Compile the methods
8503         without invoking cctors.
8504
8505 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8506
8507         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
8508         * basic-calls.cs: test for the above.
8509
8510 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8511
8512         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
8513         MonoJitInfo changes.
8514
8515 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
8516
8517         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
8518         eagerly if it contains dynamic methods.
8519         
8520         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
8521
8522         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
8523         trace, it is now computed by an icall from trace_ips.
8524         
8525         * mini-exceptions.c: Fix a warning.
8526
8527 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
8528
8529         * mini-exceptions.c: don't bother getting stack trace info if
8530         it's not going to be used.
8531
8532 2005-01-27  Raja R Harinath  <rharinath@novell.com>
8533
8534         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
8535         ssapre-mini-ops.h.
8536
8537 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
8538
8539         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
8540
8541         * aot.c: Avoid calling mono_method_get_header () if not needed.
8542
8543         * mini.h: Bump AOT file format version.
8544         
8545         * mini.c (mono_emit_native_call): Allocate a GOT var here.
8546
8547         * mini.c (mono_print_tree): Print more info for calls.
8548
8549 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
8550
8551         * declsec.h: Remove warning by adding missing include for marshal.h
8552
8553 2005-01-26  Martin Baulig  <martin@ximian.com>
8554
8555         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
8556         `ip' twice.
8557
8558 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
8559
8560         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
8561         flags.
8562
8563         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
8564
8565         * aot.c (mono_compile_assembly): Fix a warning.
8566
8567 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
8568
8569         * declsec.c: Look for security attributes on the original MonoMethod 
8570         (and not the wrapped one). This fix permissions on icalls.
8571
8572 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8573
8574         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8575
8576         * mini.c (mono_allocate_stack_slots): Add a fixme.
8577
8578         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8579
8580 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
8581
8582         * inssel.brg: optimize casts of sealed types (more
8583         optimizations waiting for fixes in remoting).
8584
8585 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8586
8587         * inssel.brg (stmt): Add another dummy rule.
8588
8589         * driver.c: Fix warnings.
8590
8591         * driver.c (mono_main): If running under valgrind, instruct glib to use
8592         the system allocation functions so valgrind can track the memory
8593         allocated by the g_... functions.
8594
8595         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
8596
8597         * mini-ops.h: Add OP_DUMMY_STORE opcode.
8598
8599         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
8600
8601         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
8602         variables in try regions.
8603
8604         * mini.c (mini_method_compile): Don't disable optimizations on large
8605         methods when AOT compiling.
8606
8607         * mini.c (mono_allocate_stack_slots): New arch independent method to 
8608         allocate stack slots. Not yet used.
8609
8610 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
8611
8612         * debug-mini.c (mono_debug_close_method): Plug some leaks.
8613
8614 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
8615
8616         * mini-ppc.c: make the branch info relative as the code
8617         buffer can be reallocated.
8618
8619 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
8620
8621         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
8622         * driver.c: Removed the AOT/security restriction. Now initialize the
8623         security manager (in metadata) if --security is used.
8624         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
8625         rather than the pointer to declarative security, when AOT is used.
8626
8627 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
8628
8629         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
8630         basic blocks, reduced intrinsic exception throwing code size.
8631
8632 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
8633
8634         * driver.c (mini_usage): Reorder the usage screen.
8635
8636 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
8637
8638         * mini.c (mono_resolve_patch_target): Fix warning.
8639
8640 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
8641
8642         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
8643         previous patch.
8644
8645         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8646
8647         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
8648         breaks the amd64 build.
8649
8650         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
8651         register allocation. Fixes #71454.
8652
8653         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8654
8655         * arrays.cs: Add new regression test.   
8656
8657 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8658
8659         * ssapre.c: Turned usage of snprintf to GString.
8660         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
8661         (I left it on by mistake in my previous commit).
8662
8663 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
8664
8665         * mini.c, cfold.c, basic-calls.cs: preserve side effects
8666         on cond branch optimization (fixes bug# 71515).
8667
8668 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8669
8670         * abcremoval.c: Fixed bug 71062.
8671         * abcremoval.h: Likewise.
8672
8673 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8674
8675         * mini.c: Added a new functionality to optimize_branches, the removal
8676         of useless basic blocks, and fixed some problem in the removal of
8677         critical edges; some utility functions added for both purposes.
8678         * ssapre.c: Added complex expression support, and fixed bug 70637.
8679         * ssapre.h: Likewise.
8680         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
8681         enabled in SSAPRE.
8682         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
8683         * driver.c: Re-enabled SSAPRE.
8684
8685 2005-01-19  Martin Baulig  <martin@ximian.com>
8686
8687         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
8688         the result of mono_get_method_constrained().
8689
8690 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
8691
8692         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
8693         manager.
8694
8695 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
8696
8697         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
8698         be detected.  Fixes #59296.
8699
8700 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8701
8702         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
8703         which can happen. Fixes #71361.
8704
8705 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8706
8707         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
8708         manager.
8709
8710 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8711
8712         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
8713         appdomain-unload.exe to fail.
8714         
8715         * mini.c: Fix some memory leaks.
8716
8717 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
8718
8719         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
8720         Fixed bug and sped up some codepaths.
8721
8722 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8723
8724         * mini.c: Fix some memory leaks.
8725
8726         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
8727         conversion.
8728
8729         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
8730
8731         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
8732         #71320.
8733
8734         * iltests.il: Add regression test for #71320.
8735
8736 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
8737
8738         * mini.c (mono_codegen): Fix installation of profiler hooks.
8739
8740         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
8741
8742 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8743
8744         * mini.h, mini.c, cfold.c: optimize access to enum
8745         readonly fields, too. Eval conditional branches if possible
8746         to perform unreachable code removal in more cases.
8747
8748 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
8749
8750         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
8751
8752         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
8753         code manager.
8754
8755         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
8756         WinXP DEP. Fixes #71244.
8757
8758 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
8759
8760         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
8761
8762 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
8763
8764         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
8765
8766 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
8767
8768         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
8769         changes.
8770
8771         * mini.h: Bump AOT version.
8772
8773         * mini.h (MonoCompile): Change exvar to a hash table.
8774
8775         * mini.c: Allocate a separate exvar for each handler block.
8776
8777         * mini.c: Get rid of the computation of filter_lengths, its not needed.
8778
8779         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
8780         ex var with the pending exception and only throw if the two are equal.
8781         Fixes #68552.
8782         
8783         * exceptions.cs: Add tests for rethrow and nested catch clauses.
8784
8785         * mini-x86.c: Fix warnings.
8786
8787         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
8788         used by all the ports now.
8789
8790         * aot.c: Add write-symbols and save-temps options.
8791
8792 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8793
8794         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
8795
8796 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
8797
8798         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
8799         operations.
8800
8801         * tramp-s390.c: Check vtable slot belongs to the domain.
8802
8803         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
8804         as per other platforms.
8805
8806         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
8807
8808 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
8809
8810         * driver.c: we don't run the Main() code in a subthread anymore.
8811
8812 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
8813
8814         * mini.c: added experimental rtc support in the statistical
8815         profiler: if the user has the permission, more accurate statistics
8816         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
8817         The MONO_RTC value must be restricted to what the linux rtc allows:
8818         power of two from 64 to 8192 Hz.
8819
8820 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8821
8822         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
8823
8824 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
8825
8826         * mini-ppc.c: better icache flush for smp.
8827
8828 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
8829
8830         * mini-amd64.c (emit_move_return_value): Fix memory leak.
8831
8832         * mini-x86.c (get_call_info): Add the get_call_info () code from the
8833         amd64 port, not yet used.
8834
8835 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8836
8837         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
8838         a struct type.
8839
8840 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
8841
8842         * driver.c: Added --security option to activate the security manager.
8843         Right now this will allow code generation for declarative demands and
8844         is disabled when AOT is specified.
8845         * mini.c: Add code generation for declarative security demands.
8846         * mini.h: Add mono_use_security_manager as an extern gboolean.
8847
8848 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8849
8850         * aot.c (mono_compile_assembly): Speed up compilation a bit by
8851         emitting more dense assembly code.
8852
8853         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
8854         exception throwing stuff.
8855
8856 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
8857
8858         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
8859         dead code.
8860
8861         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
8862         left in by mistake.
8863
8864         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
8865         fixed.
8866
8867         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
8868
8869         * tramp-*.c: Only patch vtable slots if the object is in the current
8870         domain. Fixes appdomain-unload.exe.
8871
8872         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
8873         
8874         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
8875         x86 branch.
8876
8877 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8878
8879         * mini.c (reverse_branch_op): New helper function.
8880
8881         * mini.c (optimize_branches): Run the new optimization only on 
8882         platforms which support it. Also reverse all kinds of branches.
8883
8884         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
8885
8886         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
8887         a throw statement.
8888
8889         * mini.c (optimize_branches): Reverse not-equals branches if the false
8890         bblock is a throw. This happens a lot of time with argument checking in
8891         corlib.
8892
8893         * mini.c (mono_codegen): Add support for placing basic blocks after
8894         the function epilogue.
8895
8896         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
8897         function epilogue.
8898         
8899 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
8900
8901         * mini.c (setup_stat_profiler): Only set this up if the platform
8902         supports ITIMER_PROF.
8903
8904 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8905
8906         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
8907         previous patch.
8908
8909         * inssel.brg: Fix a warning.
8910
8911 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
8912
8913         * mini.c: added support for statistical profiler 
8914         (run with: --profile=default:stat).
8915
8916 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
8917
8918         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
8919
8920         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
8921
8922         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
8923         related to global registers from the amd64 port.
8924
8925 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
8926
8927         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
8928
8929         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
8930         with global registers.
8931         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
8932
8933         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
8934
8935 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
8936
8937         * debug-mini.c (encode_value): Fix off-by-one.
8938
8939         * aot.c (encode_value): Likewise.
8940
8941         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
8942
8943 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
8944
8945         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
8946         AOT.
8947
8948         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
8949         
8950         * aot.c (emit_method_info): Increase size of temp buffer.
8951
8952         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
8953         the AOT case.
8954
8955 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
8956
8957         * aot.c (emit_method_info): Fix build.
8958         
8959         * aot.c: Further rework of the AOT file format to reduce the size of
8960         the method info data.
8961
8962         * mini.h: Bump AOT file format version.
8963
8964 2004-12-27  Martin Baulig  <martin@ximian.com>
8965
8966         * mini.c (mini_get_method): New static method; call
8967         mono_get_method_full() and mono_get_inflated_method().
8968         (mono_method_to_ir): Use mini_get_method() instead of
8969         mono_get_method_full(). 
8970
8971 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
8972
8973         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
8974
8975 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
8976
8977         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
8978
8979         * inssel-amd64.brg: Add some optimization rules.
8980
8981 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
8982
8983         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
8984         standard not GC'd stuff is fine.
8985
8986 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
8987
8988         * aot.c: Rework the AOT file format to get rid of most of the global
8989         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
8990
8991         * mini.h: Bump AOT file format version.
8992         
8993 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
8994
8995         * mini.h: Bump AOT file format version.
8996
8997         * aot.c (mono_aot_is_got_entry): New function to determine if an 
8998         address is inside a GOT.
8999
9000         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
9001
9002         * cpu-pentium.md: Increase the maximum size of some instructions which
9003         might involve a got access.
9004         
9005         * mini.c (get_method_from_ip): Another debug helper function.
9006
9007         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
9008         when got var accesses are created during the decompose phase.
9009
9010         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
9011
9012         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
9013         argument mini_compile_method and to MonoCompile, and use this to
9014         determine whenever a given method is compiled for AOT. This allows the
9015         other methods compiled during AOT compilation to be free of AOT stuff,
9016         so the backends does not need to add special support for them by
9017         creating a fake GOT etc.
9018
9019         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
9020         longer needed.
9021
9022 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
9023
9024         * mini.c (mono_method_to_ir): It turns out that some of the
9025         x-appdomain wrappers are lax with types, so just ignore this for
9026         all wrappers.
9027
9028         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
9029         at the vtable->klass. If it is non-shared code we can just use the
9030         vtable.
9031
9032 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
9033
9034         * mini-ppc.c: access MonoDomain from tls, too.
9035
9036 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
9037
9038         * declsec.c: Removed unused variable (and related warning ;-)
9039
9040 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
9041
9042         * iltests.il: New test for LDELEMA on an array of ref types.
9043
9044         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
9045         all ldelema's on reftypes.
9046         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
9047         it was the wrong place to put it.
9048
9049         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
9050         register to pop to make this cleaner, at the request of Paolo.
9051
9052 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
9053
9054         * mini-ops.h (OP_GETHASHCODE): New op.
9055
9056         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
9057
9058         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
9059         operation.
9060
9061         For a microbenchmark, this reduces the cost of Hashtable.get_Item
9062         by 25%.
9063         
9064         * mini-x86.c (mono_arch_output_basic_block): Rather than
9065
9066         add ebp, 4
9067
9068         Emit
9069
9070         pop edx
9071
9072         The first is 3 bytes while the second is 1. This saves 36 kb on
9073         mscorlib, quite a big saving. When bootstraping mcs, I was able to
9074         see a small boost because of icache locality.
9075
9076         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
9077
9078 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
9079
9080         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
9081         started code sharing with the generic code.
9082
9083 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
9084
9085         * mini-ppc.c, cpu-g4.md: added code for direct access to
9086         tls data slots.
9087
9088 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
9089
9090         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
9091          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
9092         to OP_TLS_GET.
9093
9094 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
9095
9096         * declsec.c|h: Added functions to cache the declarative stack modifiers
9097         in MonoJitInfo and to create a security frame from a MonoJitInfo 
9098         structure.
9099         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
9100         created. Register internal calls for System.Security.SecurityFrame::
9101         _GetSecurityFrame and _GetSecurityStack.
9102         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
9103         the definitions for the new stack walk/callback mechanism.
9104         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
9105         first security frame for LinkDemands and InheritanceDemands) and
9106         GetSecurityStack for Demands. Both use the new mono_walk_stack code
9107         from lupus.
9108         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
9109         walk initialization (lupus).
9110
9111 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
9112
9113         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
9114         idiom.
9115         (handle_loaded_temps): Do not create a temporary variable for
9116         things that we know are temps. They will never be modified.
9117         (mono_spill_call): Set MONO_INST_IS_TEMP
9118         (mono_emulate_opcode): ditto
9119         (emit_tree): ditto
9120         (mono_method_to_ir.CEE_DUP): ditto
9121
9122 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
9123
9124         * mini.c (type_to_eval_stack_type): Make this handle the void type
9125         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
9126         (emit_tree): use ip_in_bb to special case some common idioms
9127         Update all callers to pass in the IP.
9128         (mono_method_to_ir): Make CEE_CALL* do the above as well.
9129
9130         This gives us a nice 2% speedup in mcs bootstrap.
9131
9132         * mini-x86.c (peephole_pass): Peephole pass to make
9133         mov  [foo], eax
9134         push [foo]
9135
9136         into
9137
9138         mov [foo], eax
9139         push eax
9140
9141         * mini.c (ip_in_bb): new method.
9142         (mono_method_to_ir): use this method rather than doing the hash
9143         lookup ourselves.
9144
9145         * linear-scan.c (mono_linear_scan): When expiring actives, you
9146         don't need to keep around variables that expire on this
9147         instruction. This makes it so that:
9148              a = b + 1
9149         will turn into:
9150              store (ebx add (ebx, 1))
9151         which will become
9152              add ebx, 1
9153
9154 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
9155
9156         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
9157         combination to avoid doing two copies. Fix up problems with previous
9158         patch.
9159
9160         * mini.c: Fix 64 bit warnings.
9161
9162         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
9163
9164 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
9165
9166         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
9167         changes from the x86 code.
9168
9169         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
9170
9171 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
9172
9173         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
9174         throwing code to reduce its size, unify the AOT and non-aot code and 
9175         get rid of relocations in the AOT case.
9176
9177         * mini-x86.h mini.c exceptions-x86.c 
9178         (mono_arch_get_throw_corlib_exception): New arch specific function to 
9179         raise corlib exceptions which doesn't require relocations in the 
9180         caller.
9181
9182         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
9183
9184 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
9185
9186         * mini.c (mono_emit_method_call): Only allocate the got var when it is
9187         needed.
9188
9189         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
9190         in the AOT case.
9191
9192 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9193
9194         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
9195         with add function when used from Inc/dec atomic 
9196         functions. Re-enabled optimization on x86.
9197         * mini-ops.h: renamed atomic_add functions to
9198         allow _add to match the Interlocked::Add and
9199         _add_next to match Interlocked::Inc/Dec.
9200
9201 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
9202
9203         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
9204         linking of BBs to the end BB, and enabled SSAPRE also with
9205         consprop and copyprop (which was prevented by that bug).
9206
9207 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9208
9209         * mini-x86.c: disabling the Interlocked optimizing code. 
9210
9211 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
9212
9213         * aot.c (load_aot_module): Move reading of got_addr after the AOT
9214         file version check.
9215         
9216 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9217
9218         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
9219         interlocked optimization due lack of support on x86, rewrote 
9220         exchange to take into account that base may be in eax.
9221         
9222         xsp works again; activated Interlocked optimizing code.
9223         
9224 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
9225
9226         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
9227
9228 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
9229
9230         * mini-ops.h: Add new opcodes.
9231
9232         * mini.h: Add new patch types. Add got_var to MonoCompile.
9233
9234         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
9235         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
9236         make it work with all kinds of patchable code.
9237
9238         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
9239         address of the GOT, and referencing entries in the GOT.
9240
9241         * mini.c: Add code to load the GOT address if needed by an opcode.
9242
9243         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
9244         independent AOT code on the x86 using an elf-style Global Offset Table.
9245
9246 2004-12-14  Raja R Harinath  <rharinath@novell.com>
9247
9248         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
9249
9250 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9251
9252         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
9253         when running xsp.
9254
9255 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
9256
9257         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
9258         of Interlocked:Increment/Decrement/Add as inline ops.
9259         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
9260
9261 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
9262
9263         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
9264         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
9265
9266 2004-12-12  Duncan Mak  <duncan@ximian.com>
9267
9268         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
9269         again. `patch_info->table_size' is no longer valid after Zoltan's
9270         commit #37636.
9271
9272 2004-12-12  Martin Baulig  <martin@ximian.com>
9273
9274         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
9275         if we are the "real" method, ie. not an inlined method inside it.
9276
9277 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
9278
9279         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
9280         before we look in the special fields table. This fixes
9281         ../tests/thread-static-init.cs.
9282
9283 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9284
9285         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
9286         for Array get_Rank and get_Length. Fixes bug #70465.
9287
9288 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
9289
9290         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
9291         separate structure to reduce the size of MonoJumpInfo.
9292
9293 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
9294
9295         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
9296
9297 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
9298
9299         * mini.c (mini_get_inst_for_method): Changed to allow ports
9300         to return a MonoInst instead of opcode 
9301         (renamed mini_get_opcode_for_method to better reflect the new functionality)
9302         
9303         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
9304         Allow ports to return a created MonoInst instead of op-code, will enable
9305         new optimizations.
9306         (renamed mini_get_opcode_for_method to better reflected the functionality)
9307
9308 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
9309
9310         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
9311
9312 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9313
9314         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
9315         Fixes #69985.
9316
9317 2004-12-08  Martin Baulig  <martin@ximian.com>
9318
9319         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
9320         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
9321
9322 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9323
9324         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
9325         correctly.
9326
9327         * exceptions.cs: Disable some tests which depend on properties of x86 fp
9328         arithmetic.
9329
9330 2004-12-08  Raja R Harinath  <rharinath@novell.com>
9331
9332         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
9333
9334 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
9335
9336         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
9337         bug introduced by the previous patch.
9338
9339 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9340
9341         * mini-ppc.c, objectc.cs: handle large structs passed by value
9342         (fixes bug #69972).
9343
9344 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
9345
9346         * mini-ppc.c: OP_ARGLIST implementation from
9347         Geoff Norton  <gnorton@customerdna.com>.
9348
9349 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
9350
9351         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
9352         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
9353
9354 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9355
9356         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
9357
9358 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9359
9360         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
9361         support.
9362
9363 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
9364
9365         * mini-sparc.c: Zero out localled-ed memory.
9366
9367         * iltests.il: Add tests for zeroing out localloc-ed memory.
9368
9369 2004-12-04  Martin Baulig  <martin@ximian.com>
9370
9371         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
9372         mono_method_get_signature_full().       
9373
9374 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
9375
9376         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
9377         and some utility functions (always for SSAPRE), integrated SSAPRE.
9378         * mini.h: Likewise.
9379         * driver.c: Added ssapre option.
9380         * ssa.c: Small fix on OP_ARG handling.
9381         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
9382         * Makefile.am: Likewise.
9383
9384 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
9385
9386         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
9387         now in the xp code.
9388
9389         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
9390         icall.
9391
9392 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9393
9394         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
9395         
9396         * cpu-s390.md : Increase instruction length of oparglist.
9397
9398         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
9399
9400 2004-11-30  Martin Baulig  <martin@ximian.com>
9401
9402         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
9403         virtual generic methods.  We call a special helper_compile_generic_method()
9404         icall to retrieve the method from the vtable, inflate and compile
9405         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
9406
9407         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
9408
9409 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
9410
9411         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
9412
9413 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
9414
9415         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
9416         Fixes #69929.
9417
9418 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
9419
9420         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
9421         platforms with PIC aot.
9422
9423 2004-11-28  Martin Baulig  <martin@ximian.com>
9424
9425         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
9426         Fixes gen-112.cs.
9427
9428 2004-11-28  Martin Baulig  <martin@ximian.com>
9429
9430         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
9431         the result of mono_type_get_underlying_type() to check whether
9432         we're byref.
9433
9434 2004-11-26  Martin Baulig  <martin@ximian.com>
9435
9436         * mini.c
9437         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
9438         in the g_assert().
9439
9440 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
9441
9442         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
9443         the same way as the other arguments so they won't get clobbered.
9444
9445         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
9446         calls through R11 since it is clobbered by the trampoline code.
9447
9448 2004-11-26  Raja R Harinath  <rharinath@novell.com>
9449
9450         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
9451         pick up in-tree mscorlib.dll.
9452
9453 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
9454
9455         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
9456
9457         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
9458         runtime data/code are now stored in a table similar to the GOT in ELF. 
9459         This allows the code itself to be position independent.
9460
9461         * aot.c: Fix loading of referenced assemblies after the lazy assembly
9462         loading changes.
9463
9464         * aot.c: Attach ELF type (object/function) directives to all global
9465         symbols.
9466
9467         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
9468
9469         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
9470
9471         * mini-amd64.h: Turn on PIC AOT code.
9472
9473         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
9474         returning the offset within an OP_AOTCONST instruction where the GOT
9475         offset needs to be added.
9476
9477         * mini.h: Bump AOT file format version.
9478
9479 2004-11-25  Martin Baulig  <martin@ximian.com>
9480
9481         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
9482         uninflated generic methods.
9483
9484 2004-11-25  Martin Baulig  <martin@ximian.com>
9485
9486         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
9487
9488 2004-11-24  Martin Baulig  <martin@ximian.com>
9489
9490         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
9491         original klass (this only applies for generic instances).
9492
9493 2004-11-24  Martin Baulig  <martin@ximian.com>
9494
9495         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
9496         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
9497         that array).
9498
9499 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
9500
9501         * mini.c (mono_method_to_ir): Disable inlining for methods containing
9502         localloc. Fixes #69678.
9503
9504         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
9505         
9506 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
9507
9508         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
9509         used SSE registers on pinvoke calls. Fixes #69774.
9510
9511 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
9512
9513         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
9514         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
9515
9516 2004-11-23  Raja R Harinath  <rharinath@novell.com>
9517
9518         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
9519         Refer directly to the mcs/ tree.
9520
9521 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9522
9523         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
9524         Check if a trampoline for a synchronized method is required. 
9525
9526 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
9527
9528         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
9529         with localloc if needed. Throe arithmetric exception in
9530         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
9531         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
9532
9533 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
9534
9535         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
9536         types before switching on type.  Fixes #69622.
9537
9538 2004-11-19  Raja R Harinath  <rharinath@novell.com>
9539
9540         * Makefile.am (check-local): New.  Integrate into 'make check'.
9541         (MCS,RUNTIME): Define using in-tree mono and mcs.
9542         (ILASM): New.
9543         (%.exe): Use $(ILASM).
9544
9545 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
9546
9547         * mini-ppc.c: adjust initial prolog size (bug #69691).
9548
9549 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
9550
9551         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
9552         #69664.
9553
9554 2004-11-17  Raja R Harinath  <rharinath@novell.com>
9555
9556         * Makefile.am (clean-local): Rename from 'clean'.
9557
9558 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9559
9560         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
9561         to mono_arch_is_int_overflow. 
9562         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
9563         SIGFPE events.
9564
9565 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
9566
9567         * declsec.c|h: New files to support declarative security attributes.
9568         Added function to check if a method has (applicable) security.
9569         * mini.c|h: Add check for declarative security attributes in
9570         mono_method_check_inlining.
9571         * Makefile.am: Added declsec.c and declsec.h to the build.
9572
9573 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
9574
9575         * mini.c, mini.h: update to keep dynamic code info per-domain.
9576
9577 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
9578
9579         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
9580         (mini_init): Get rid of it from here too.
9581
9582 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
9583
9584         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
9585         implemented OP_RETHROW (patch by Geoff Norton
9586         <gnorton@customerdna.com>).
9587
9588 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
9589
9590         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
9591         between appdomains.  Fixes appdomain-unload on PPC.
9592
9593 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
9594
9595         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9596         mini-exceptions.c: handle the new wrapper types.
9597         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
9598         token value as a MonoClass* when compiling a wrapper.
9599         mono_jit_create_remoting_trampoline now takes an additional
9600         MonoRemotingTarget parameter.
9601         
9602 2004-11-10  Martin Baulig  <martin@localhost>
9603
9604         * mini.c (mono_method_to_ir): Use `generic_container->context'
9605         rather than creating a new one.
9606
9607 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9608
9609         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
9610
9611         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
9612
9613 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
9614
9615         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
9616         the experimental aot cache stuff.
9617
9618 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
9619
9620         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9621         mini-exceptions.c: update to exception clause structure changes.
9622
9623 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9624
9625         * exceptions-x86.c (throw_exception): Fix warnings.
9626
9627         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
9628         for OP_RETHROW.
9629
9630 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9631
9632         * exceptions-sparc.c (get_throw_exception): Really fix this.
9633
9634 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
9635
9636         * tramp-*.c: we no longer support icalls without wrappers, so
9637         a bit of code can be removed here
9638
9639 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
9640
9641         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
9642         patch.
9643
9644         * cpu-sparc.md: Add op_rethrow.
9645
9646         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
9647
9648         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
9649
9650         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
9651         * mini-ops.h: Add OP_RETHROW.
9652
9653         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
9654
9655         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
9656
9657 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
9658         
9659         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
9660         Makes the output much easier to read
9661
9662 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
9663
9664         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
9665         prevents another huge leak when compiling with ssa. Secondly, the
9666         performance of doing this rather than freeing the lists is much
9667         better. GList does a lock every time you allocate a list link,
9668         so that it can use a memory pool. So, it is better to just use
9669         a memory pool of our own.
9670         
9671         * ssa.c, linear-scan.c: replace g_list_remove_link with
9672         g_list_delete.  The remove one does not free the GList, so we were
9673         leaking memory. On -O=all --compile-all with corlib, this cut down
9674         3 MB of allocations.
9675
9676 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
9677
9678         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
9679
9680         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
9681
9682         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
9683         into a new function mono_create_jit_trampoline ().
9684
9685 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
9686
9687         * trace.c (get_spec): Allow tracing of classes without a namespace.
9688
9689 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
9690
9691         * mini.c: Fix pointer overwrite in mini_method_compile.
9692
9693 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
9694
9695         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
9696         The darwin ABI needs some special handling for 1 and 2 byte structs
9697         Lets use lbz/lhz instead of lwz everywhere.
9698         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
9699         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
9700         Use stb/sth for the former, and put the latter always on stack instead of in
9701         argument registers.
9702
9703 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
9704
9705         * trace.c (is_filenamechar): Add '_'.
9706
9707 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
9708
9709         * mini-s390.c: Fix prolog length to allow for large trace requirements.
9710
9711         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
9712
9713 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
9714
9715         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
9716         depends on libmonogc. Fixes #68805.
9717
9718 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
9719
9720         * mini.c (mono_jit_free_method): Provide extra information for
9721         this error.  Currently this leaks, but will be turned into a
9722         developer option in the future.
9723
9724 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
9725
9726         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
9727
9728 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
9729
9730         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
9731         boundary. Fixes reading of PATCH_INFO_R4 and R8.
9732         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
9733
9734 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
9735
9736         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
9737         trampolines for AOT code.
9738
9739 2004-10-22    <vargaz@freemail.hu>
9740
9741         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
9742         constructed types. Fixes #68136.
9743
9744 2004-10-21  Martin Baulig  <martin@ximian.com>
9745
9746         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
9747         if it returns true, unwind the stack to the call instruction.
9748
9749 2004-10-21    <vargaz@freemail.hu>
9750
9751         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
9752
9753         * mini.h: Bump AOT version number.
9754
9755         * objects.cs: Add another test for unbox trampolines.
9756
9757         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
9758         valuetype methods.
9759
9760 2004-10-20    <vargaz@freemail.hu>
9761
9762         * driver.c: Add SHARED to the set of optimizations tested.
9763
9764         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
9765
9766         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
9767         used by CEE_NEWARR.
9768
9769         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
9770
9771 2004-10-20  Martin Baulig  <martin@ximian.com>
9772
9773         * mini-exceptions.c (mono_handle_exception): Call
9774         mono_debugger_handle_exception() to tell the debugger about
9775         catch/finally clauses.
9776
9777 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
9778
9779         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
9780
9781         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
9782         #68447.
9783
9784 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
9785
9786         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
9787         methods as their native size, fixed bug #57543, #57545.
9788         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
9789         This saves a temporary register and mullw call down into 1 (minor perf
9790         increase for cases like sum = sum * 5;  This use to translate into:
9791             li r11,5
9792             mullw r28,r28,r11
9793         It now translates to
9794             mulli r28,r28,5
9795
9796 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
9797
9798         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
9799         #68388.
9800
9801 2004-10-11  Martin Baulig  <martin@ximian.com>
9802
9803         * mini.c (mono_method_to_ir): If we're a generic method, get the
9804         MonoGenericContainer from our MonoMethodNormal and create a
9805         MonoGenericContext from it.
9806
9807 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
9808
9809         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
9810
9811         * basic-long.cs: Add test for checked i8->i2 cast.
9812
9813 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9814
9815         * inssel-ppc.brg: added a couple of speedup rules.
9816
9817 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
9818
9819         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
9820         to speed up rebuilds.
9821
9822 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9823
9824         * mini-s390.c: Minor fix to OP_OR_IMM.
9825
9826 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
9827
9828         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
9829         better. Fixes appdomain-unload.exe on sparc.
9830
9831 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
9832
9833         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
9834         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
9835         see bug 67324.
9836
9837 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
9838
9839         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
9840
9841 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
9842
9843         * mini.c: Always generate a field read/write wrapper for members
9844         of the class MarshalByRefObject since the actual instance could
9845         be a CBO.
9846
9847 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
9848
9849         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
9850
9851 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
9852
9853         * driver.c mini.h trace.c: Move the setting of the main assembly into
9854         a separate function called mono_trace_set_assembly () and call it after
9855         actually loading the main assembly. Fixes #66872.
9856
9857 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
9858
9859         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
9860         using the code manager.
9861
9862 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
9863
9864         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
9865
9866 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
9867
9868         * cpu-amd64.md: Fix bug in previous patch.
9869         
9870         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
9871         #66650.
9872
9873 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
9874
9875         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9876         mini-exceptions.c: updates for changed stack walk interface.
9877
9878 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9879
9880         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
9881
9882 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
9883
9884         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
9885
9886 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
9887
9888         * driver.c (mini_regression_list): Do not call mono_assembly_close 
9889         since assemblies can't be unloaded.
9890         
9891 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9892
9893         * cpu-amd64.md: Fix more instruction lengths.
9894
9895         * cpu-amd64.md: Fix lengths of some instructions.
9896
9897 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
9898
9899         * inssel.brg: Make the array ldelema check aot friendly.
9900
9901 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9902
9903         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
9904
9905         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
9906
9907 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
9908
9909         * mini-x86.c: Fix build.
9910
9911         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
9912         mono_type_get_underlying_type () helper function to simplify code.
9913         
9914 2004-09-09  Martin Baulig  <martin@ximian.com>
9915
9916         * mini-amd64.c: Don't access `type->data.klass' directly, call
9917         mono_class_from_mono_type() instead since the type may be a
9918         generic instance.
9919
9920 2004-09-09  Martin Baulig  <martin@ximian.com>
9921
9922         * mini-amd64.c (get_call_info): Fix support for generic instances.
9923         (add_valuetype): Use mono_class_from_mono_type() to get the class
9924         since we can be a generic instance.
9925
9926 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
9927
9928         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
9929
9930 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
9931
9932         * liveness.c: reset spill costs on each scan: bug 62107
9933
9934 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
9935
9936         * exceptions-sparc.c (mono_arch_find_jit_info): remove
9937         unnecessary line that doesn't compile
9938
9939 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
9940
9941         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
9942         trampolines, make them call an error function so people can fix their
9943         code.
9944
9945 2004-09-06  Martin Baulig  <martin@ximian.com>
9946
9947         * mini.c (mono_method_to_ir): When initializing locals, handle a
9948         generic instances like a valuetype if it's a valuetype and like a
9949         class if it's a class.
9950
9951 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9952
9953         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
9954         stack. Fixes #64674.
9955
9956         * exceptions.cs: Add test for unwinding of call arguments.
9957
9958 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
9959
9960         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
9961         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
9962         set the carry/borrow flag). The sparc and s390 implementations
9963         can now use optimized versions (and simplify the code). ppc bugfixes.
9964
9965 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9966
9967         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
9968
9969 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
9970
9971         * inssel-amd64.brg: Remove leftover 32 bit rule.
9972
9973         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
9974
9975 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
9976
9977         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
9978         mono_arch_find_jit_info functions into a new function. Fix a memory
9979         leak.
9980
9981         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
9982         refactored code.
9983         
9984 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9985
9986         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
9987         as well.
9988         
9989         * exceptions.cs: Add array size tests.
9990
9991         * mini.c: Allocate a separate icall wrapper for each arity of 
9992         mono_array_new_va. Fixes #59509.
9993
9994         * exceptions.cs: Add testcase for 64578.
9995
9996         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
9997
9998         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
9999         
10000 2004-09-02  Martin Baulig  <martin@ximian.com>
10001
10002         * mini.c (mono_method_to_ir): When initializing the locals, call
10003         handle_initobj() on the generic instance itself, not its
10004         underlying type.
10005
10006 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
10007
10008         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
10009         MonoJitInfo for dynamic methods.
10010
10011         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
10012
10013         * mini.c: Add support for freeing JIT data for dynamic methods.
10014         
10015 2004-09-01  Martin Baulig  <martin@ximian.com>
10016
10017         * mini-x86.c (is_regsize_var): Added support for generic
10018         instances.
10019         (mono_arch_emit_prolog): Make this compile again, use
10020         `x86_push_imm_template (code)'.
10021
10022 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
10023
10024         * mini-x86.c: make all push_imm instructions that get
10025         patched always emit the long form
10026
10027 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
10028
10029         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
10030         in a per-domain hash.
10031
10032         * mini-amd64.c (merge_argument_class_from_type): Handle generic
10033         types.
10034
10035 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
10036
10037         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
10038         work.
10039         
10040         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
10041         work.
10042
10043         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
10044         Beginnings of SSE2 support.
10045
10046         * exceptions.cs: Add more tests for checked int<->uint casts.
10047
10048 2004-08-28  Martin Baulig  <martin@ximian.com>
10049
10050         * mini-x86.c (mono_arch_instrument_epilog): Added support for
10051         generic instances.
10052
10053         * mini.c
10054         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
10055         Handle generic instances recursively.
10056
10057 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10058
10059         * iltests.il: test for conv.u8 on a constant
10060
10061 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10062
10063         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
10064         LCONV_x4 (shrun_32 (membase)).
10065
10066 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10067
10068         * inssel-x86.brg: c&p rules for push/setret of long
10069
10070 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
10071
10072         * inssel-x86.brg: c&p rules for compare (base, regvar) and
10073         compare (regvar, base)
10074
10075         * inssel-x86.brg: more burg love
10076
10077         * inssel.brg: more cleanup
10078
10079         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
10080
10081 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
10082
10083         * basic-long.cs, basic-calls.cs: new tests for optimization.
10084
10085 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
10086
10087         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
10088         patch.
10089
10090 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
10091
10092         * mini-amd64.c (read_tls_offset_from_method): Add another case.
10093         
10094 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
10095
10096         * inssel.brg (mini_emit_memcpy): use 
10097         NO_UNALIGNED_ACCESS to disable memcpy optimization
10098
10099 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
10100
10101         * mini-amd64.c: Handle generic types in various places.
10102
10103         * mini.c (mono_method_to_ir): Handle generic types in init locals.
10104
10105 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
10106
10107         * mini.c (handle_box): Fix warning.
10108
10109         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
10110
10111         * mini-amd64.h: Enable the emit_state optimization.
10112
10113         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
10114
10115         * mini-amd64.c: Add some new 64 bit peephole opts.
10116
10117         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
10118
10119         * cpu-amd64.md: sreg1 of div instructions must be %rax.
10120
10121         * mini-amd64.c: Register allocator fixes.
10122
10123         * mini.c: Add an optimization to emit_state to avoid allocation of new
10124         registers on some platforms.
10125
10126 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
10127
10128         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
10129
10130         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
10131         allocation. Fixes #63085.
10132
10133         * basic-long.cs: Add new regression test.
10134
10135         * mini-amd64.c: Register allocator improvements.
10136
10137 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
10138
10139         * mini-amd64.c (read_tls_offset_from_method): Add another code
10140         sequence.
10141
10142         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
10143         instruction sequence for nullifying class init trampolines.
10144
10145         * objects.cs: Add new regalloc test.
10146
10147         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
10148
10149 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
10150
10151         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
10152         
10153         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
10154         arguments.
10155
10156         * driver.c: Fix profiling after TLS changes.
10157         
10158         * driver.c (mono_main): Set mono_stats.enabled if needed.
10159
10160         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
10161         CEE_BOX.
10162
10163 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
10164
10165         * mini-x86.c: use a 1 op rather than a 2 op tls access
10166         instruction -> faster.
10167
10168 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
10169
10170         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
10171         x86 backend.
10172
10173 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
10174
10175         * exceptions-sparc.c (throw_exception): fix typo
10176
10177 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
10178
10179         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
10180         set tree->dreg correctly with tls. Allow any
10181         register to be used.
10182
10183         * mini-x86.c (read_tls_offset_from_method): add new code
10184         generation pattern seen with GCC.
10185
10186
10187 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
10188
10189         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
10190         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10191         exceptions-sparc.c: fix some performance issues in exception
10192         handling and setting of the stack trace for exceptions that were
10193         already thrown.
10194
10195 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
10196
10197         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
10198         x86 backend.
10199         
10200         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
10201         registers.
10202
10203 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
10204
10205         This patch inlines tls access, when possible.
10206         
10207         * mini.h: new arch functions for TLS intrinsics.
10208         All platforms updated with a stub.
10209
10210         * mini.c: use the new intrinsics
10211
10212         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
10213         arch specific intrinsic for tls variables
10214
10215 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
10216
10217         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
10218         under windows.
10219
10220 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10221
10222         * mini.c: thread local allocation
10223
10224 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
10225
10226         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
10227
10228         * Makefile.am: Link against the static version of libmonogc.
10229         
10230         * Makefile.am: Link the static versions of the convenience libraries
10231         into the mono executable.
10232
10233         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
10234
10235 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
10236
10237         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
10238         on integer overflow.
10239
10240         * mini-amd64.c: Reorganize function call code.
10241
10242         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
10243
10244 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10245
10246         * inssel-x86.brg: use xor eax,eax.
10247         
10248         * basic.cs: new tests
10249
10250 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10251
10252         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
10253         in exception throwing code.
10254         
10255 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10256
10257         * inssel-x86.brg: use xor esi,esi.
10258
10259 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10260
10261         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
10262         can trace methods compiled during mini_init () too.
10263
10264         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
10265         CEE_CONV_U4.
10266
10267 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10268
10269         * Makefile.am: static link on x86 (r=zoltan)
10270
10271 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10272
10273         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
10274         code since it causes some programs to fail.
10275
10276 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
10277
10278         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
10279
10280 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10281
10282         * mini.c: ovfops_op_map - add STACK_OBJ case for
10283         CONV_I 
10284         * basic.cs: add test_0_pin_string as test
10285         case for above.
10286
10287 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10288
10289         * Makefile.am: build C# if srcdir != builddir
10290
10291 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10292
10293         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
10294         fall-through blocks.
10295
10296 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10297
10298         * driver.c: enable loop by default again and include abcrem in -O=all.
10299
10300 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
10301
10302         * iltests.il: Add some localloc tests.
10303
10304         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
10305
10306         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
10307         Fixes #62574.
10308
10309         * inssel-amd64.brg: Add some optimizations.
10310
10311         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
10312         for gcc-3.4.
10313
10314         * Makefile.am: Statically link mono against libmono on AMD64.
10315         
10316         * mini-amd64.c inssel-amd64.brg: Optimizations.
10317
10318 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
10319
10320         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
10321
10322         * tramp-amd64.c: Patch calling code in trampolines.
10323
10324 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
10325
10326         * mini-amd64.c: pinvoke struct passing fixes.
10327
10328 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
10329
10330         * mini-sparc.c: redo change, make mono_arch_cpu_init call
10331         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
10332
10333 2004-08-05  Duncan Mak  <duncan@ximian.com>
10334
10335         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
10336         CEE_LDELEM_ANY.
10337
10338 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10339
10340         * mini-amd64.c (emit_move_return_value): Move return value for normal
10341         calls too.
10342
10343 2004-08-05  Martin Baulig  <martin@ximian.com>
10344
10345         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
10346         `type->type'; just modify `type' itself when dealing with enums
10347         and generic instances.
10348         (check_call_signature): Make `simple_type' a `MonoType *'.
10349
10350 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10351
10352         * mini.c: Use OP_PADD to add offsets to addresses.
10353
10354         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
10355
10356 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
10357
10358         * mini-sparc.c (mono_arch_emit_epilog): fix check
10359         for folding last op into restore instruction
10360
10361 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10362
10363         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
10364         helper methods using the code manager.
10365         
10366         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
10367
10368         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
10369
10370 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10371         
10372         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
10373           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
10374
10375         * mini-s390.c: fix tail processing
10376
10377 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
10378
10379         * mini-ppc.c: mul.ovf.un exception name fix.
10380
10381 2004-08-03  Martin Baulig  <martin@ximian.com>
10382
10383         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
10384         instances; before jumping to `handle_enum', also modify `ptype'.
10385
10386 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
10387
10388         * cpu-sparc.md: fcall maximal length too small.
10389
10390 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
10391
10392         * mini-amd64.c mini.h: Add initial support for passing/returning 
10393         structures to/from pinvoked methods.
10394
10395 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
10396
10397         * mini-ppc.c: reg allocator fix.
10398
10399 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
10400
10401         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
10402
10403         * inssel.brg: Optimize memset on 64 bit machines.
10404
10405         * mini-amd64.c: Fix some vararg cases.
10406
10407 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10408
10409         * mini-s390.c: Corrected macro in emit_float_to_int
10410
10411         * s390-abi.cs: Tests to exercise the s390 ABI
10412
10413 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10414
10415         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
10416         caller saved regs.
10417
10418         * basic.cs: Add a test for add.ovf.un.
10419
10420 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
10421
10422         * mini-sparc.c: add case for OP_IDIV_UN
10423
10424 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10425
10426         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
10427         
10428         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
10429
10430 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
10431
10432         * basic.cs: regression tests.
10433
10434         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
10435         regressions.
10436
10437 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10438
10439         * basic.cs: Add a new test.
10440
10441         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
10442         and AOT. Various fixes and optimizations.
10443
10444         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
10445
10446 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10447
10448         * mini-ppc.c: make sure temp regs are not used for global reg
10449         allocation.
10450
10451 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
10452
10453         * cpu-sparc.md: conv_i8 fix for 64bits
10454
10455         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
10456
10457 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
10458         
10459         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
10460         add opcode for cmp BYTE PTR [eax], imm.
10461
10462         * inssel.brg: Make memcpy and memset takes bases.
10463
10464 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10465
10466         * *-amd64.*: More AMD64 work.
10467         
10468 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10469
10470         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
10471         add a compare-not-equal opcode.
10472         
10473 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
10474
10475         * mini.c: Use mono_init_from_assembly instead of mono_init.
10476         
10477 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10478
10479         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
10480
10481         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
10482
10483         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
10484
10485         * inssel.brg: 64 bit fixes.
10486
10487         * mini.h (MonoCallInst): Add some AMD64 specific data.
10488
10489         * mini.h: Add some OP_P opcodes.
10490
10491 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10492
10493         * basic.cs: tests for 61797 and 61740
10494
10495 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10496
10497         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
10498         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
10499
10500 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
10501
10502         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
10503
10504         * *-amd64*.*: Ongoing AMD64 work.
10505
10506 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
10507
10508         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
10509
10510         * *-amd64*: Ongoing AMD64 work.
10511
10512         * mini-arch.h: Add AMD64 support.
10513
10514         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
10515
10516         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
10517
10518         * mini-ops.h: Add new opcodes.
10519
10520         * Makefile.am: Add AMD64 support.
10521
10522         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
10523         rules into the inssel-long*.brg files.
10524
10525         * *-amd64.*: Add beginnings of AMD64 backend.
10526
10527 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
10528
10529         * mini.c (print_dfn): commenting out the code that prints
10530         the cil. With -O=deadce, this makes -v -v crash.
10531         
10532         * cpu-pentium.md: make checkthis have a length of 2
10533
10534 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
10535
10536         * mini-sparc.h: fix implementations of __builtin
10537         functions for Sun compiler for V9.
10538
10539 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
10540
10541         * mini.c: use the new stelem.ref wrapper
10542         * exceptions.cs, arrays.cs: new stelem.ref tests
10543
10544 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10545
10546         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
10547         new XSP should work with these changes).
10548
10549 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
10550         
10551         * inssel-{long32,x86,}.brg: trivial optimizations.
10552         
10553 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
10554
10555         * mini.c: load value when emitting box operation in
10556         constrained calls.
10557
10558 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
10559
10560         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
10561         is one byte shorter than cmp DWORD PTR [eax], 0.
10562
10563 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10564
10565         * inssel-ppc.brg: arguments on the stack are always
10566         relative to the stack pointer (spotted by Neale Ferguson).
10567
10568 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10569
10570         * exceptions-x86.c: delay appending the method name to the trace until
10571         after mono_jit_info_table_find is called, as this gets the real
10572         MonoMethod.
10573
10574 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
10575
10576         * aot.c: register roots
10577
10578 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10579
10580         * aot.c : I could just use PLATFORM_WIN32 flag.
10581
10582 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10583
10584         * aot.c : Reverting the previous fix. This time it broke linux build.
10585
10586 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10587
10588         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
10589
10590 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
10591
10592         * mini.c (handle_stack_args): Remove some more debugging code.
10593         
10594         * mini.c (handle_stack_args): Remove debug output left in by mistake.
10595
10596         * driver.c mini.h aot.c: Allow additional options to be specified with
10597         --aot and pass them to mono_compile_assembly.
10598
10599         * aot.c: Add experimental code to AOT compile all loaded assemblies
10600         on demand and save the code into a cache in the filesystem.
10601
10602         * aot.c: Add support for more wrapper methods.
10603         
10604         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
10605         58863.
10606
10607         * cpu-*.md: Remove removed opcodes.
10608
10609         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
10610         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
10611         related icalls to marshal.c.
10612
10613 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
10614
10615         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
10616
10617         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
10618
10619         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
10620
10621 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
10622         * liveness.c: If liveness is recomputated we need to reset the information
10623         for each variable. This way, if the liveness range has been narrowed
10624         by optimizations that happened after the last computation, we can return
10625         a smaller range.
10626         
10627         For example, if you have
10628         
10629         {
10630                 int i = 0;
10631                 
10632                 // Tons of code that does not affect i
10633                 
10634                 i = foo ();
10635                 ...
10636         }
10637         
10638         i = 0 is dead code and will be removed by SSA. However, when
10639         linear scan gets to the code, i will still appear to be live
10640         throughout the entire block. This prevents good register allocation.
10641
10642 2004-07-06  Martin Baulig  <martin@ximian.com>
10643
10644         * debug-mini.c (mono_debug_init_method): Allow
10645         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
10646         (mono_debug_add_icall_wrapper): New method.
10647
10648         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
10649
10650 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
10651
10652         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
10653         optimization.
10654
10655 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
10656
10657         * aot.c (mono_aot_load_method): Fix loading of debug info.
10658
10659 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10660
10661         * aot.c: Add logging support.
10662
10663 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10664
10665         * mini.h: Add prototype for mono_print_method_from_ip.
10666
10667         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
10668
10669         * inssel.brg: 64 bit fixes.
10670
10671         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
10672         inssel-long32.brg.
10673
10674         * Makefile.am: Add SPARC64 support.
10675
10676 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10677
10678         * aot.c: Fix alignment problems on 32 bit platforms.
10679
10680 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10681
10682         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
10683         SPARC64.
10684
10685         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
10686         problems.
10687
10688         * mini.h: Bump AOT file version. Some 64 bit fixes.
10689
10690 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10691
10692         * inssel-sparc.brg: Add new rule to avoid register moves.
10693
10694         * inssel.brg: Add ldind_to_load_membase helper function.
10695
10696 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
10697
10698         * mini.c: OffsetToStringData intrinsic.
10699         
10700 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10701
10702         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
10703
10704         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
10705         regression tests.
10706
10707         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
10708 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
10709
10710         * mini.c: reinstated mono_compile_get_interface_var()
10711         on x86, too, since the change breaks the Gtk# build there as well.
10712
10713 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10714
10715         * driver.c: remove loop from the default optimizations: it seems to
10716         interact badly with some of the other options (see bug #60613).
10717
10718 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
10719
10720         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
10721         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
10722
10723 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
10724
10725         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
10726         vararg-using methods.
10727
10728 2004-06-21  Martin Baulig  <martin@ximian.com>
10729
10730         * mini/mini-exceptions.c
10731         (mono_handle_exception): Added `gpointer original_ip' argument.
10732         After calling mono_unhandled_exception(), call
10733         mono_debugger_unhandled_exception() and if that returns true,
10734         restore the context and return.
10735
10736 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10737
10738         * mini-ppc.c: prefer the use of relative branches so
10739         they won't need to be patched in aot code (patch from Patrick Beard).
10740
10741 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10742
10743         * aot.c: patch from Patrick Beard to make the output assembly
10744         more correct for the MacOSX assembler. Small tweak to
10745         generate sane images on Linux/PPC, too.
10746
10747 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10748
10749         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
10750         case until bug #59509 is fixed (shows up in #60332).
10751
10752 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10753
10754         * mini.c: make sure the needed wrappers are compiled, too, with
10755         precomp.
10756
10757 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
10758
10759         * driver.c: remove NPTL reference in --version output.
10760
10761 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10762
10763         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
10764         generate valid assembly for the Mach-O assembler.
10765
10766 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10767
10768         * driver.c: don't include abcrem in the all optimization specifier
10769         since it slows down jit compilation too much for now.
10770
10771 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
10772
10773         * mini.c: use BIGMUL only if both operands have the same signage.
10774         * iltests.il: Test for bug 60056. (errors related to signage in
10775         BIGMUL).
10776
10777         r=lupus.
10778
10779 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
10780
10781         * mini.c, aot.c: memory leak fixes.
10782
10783 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10784
10785         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
10786
10787 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
10788
10789         * Makefile.am: remove the -static hack completely, it links in
10790         statically glib as well.
10791
10792 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
10793
10794         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
10795         * exceptions.cs: make it compile with new mcs/csc.
10796
10797 2004-06-03 Massimiliano Mantione <massi@ximian.com>
10798         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
10799         and added relevant test case.
10800
10801 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10802
10803         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
10804         regressions in gtk-sharp.
10805
10806 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
10807
10808         * exceptions.cs: New regression tests.
10809
10810         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
10811
10812 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
10813
10814         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
10815
10816 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
10817
10818         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
10819
10820         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
10821
10822 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
10823
10824         * mini.c (mono_jit_runtime_invoke): Init class in this
10825         method instead of trusting mono_jit_compile_method to
10826         do the work (because wrappers can be in object class)
10827
10828 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
10829
10830         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
10831
10832         * basic-long.cs: New regression test.
10833
10834 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
10835
10836         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
10837         and div/rem checks.
10838
10839 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
10840
10841         * Makefile.am: fix miguel's change to build mono statically against
10842         libmono (track build dependencies).
10843
10844 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10845
10846         * cfold.c: Some glib versions do not have G_MININT32.
10847
10848 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
10849
10850         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
10851         with precision of tan, atan, sin and cos, and implemented related
10852         regressions tests (fixes bug 54467, but one new problem appeared and
10853         is not fixed yet).
10854
10855 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10856
10857         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
10858
10859         * exceptions.cs: Add test for constant folding && division by zero.
10860
10861         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
10862         since driver.c is in libmono too, so the optimization was useless.
10863
10864         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
10865         variable to driver.c so the compiler can emit more efficient code to
10866         access them.
10867
10868 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10869
10870         * Makefile.am: don't distribute generated inssel.[ch] files.
10871
10872 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
10873
10874         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
10875         into the default appdomain. Fixes #58707.
10876
10877         * jit-icalls.c: Remove the broken approximation for truncl, doing
10878         no conversion is better.
10879
10880         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
10881         Fixes #58863.
10882
10883 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
10884
10885         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
10886         of the mcrxr instruction which is not available on some processors
10887         even if it's documented to be. Implement add and sub overflow correctly
10888         (still not complete for long unsigned). Speed up icalls a bit.
10889
10890 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
10891
10892         * mini.c (mono_jit_compile_method_with_opt): Make sure that
10893         we run .cctor in the current domain instead of target_domain.
10894         
10895         Fixes bug #58558, .cctor not being called in -O=shared.
10896
10897 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10898
10899         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
10900
10901 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
10902
10903         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
10904         which can be done with an imm8, do it that way.
10905         (mono_arch_output_basic_block): ditto for a jmp
10906         (mono_arch_emit_prolog): Computate maximum offset of a label.
10907
10908 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
10909
10910         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
10911         now tries to allocate prefered physical reg's for virtual
10912         regs. This reduces the number of emited spills/loads with
10913         20-30% on our core assemblies.
10914
10915 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10916
10917         * jit-icalls.c: truncl() is not needed and trunc() is
10918         the correct thing to do anyway (bug #58287).
10919
10920 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
10921
10922         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
10923         if available.
10924
10925 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10926
10927         * driver.c: enable loop optimizations by default.
10928
10929 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10930
10931         * mini-x86.c: fix calc of max loop size when aligning loops start.
10932
10933 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
10934
10935         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
10936         the stack.
10937
10938 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
10939
10940         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
10941         should set carry.
10942
10943         * basic-long.cs: Add tests for add/subtract of immediates with carry.
10944
10945         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
10946         
10947         * mini.c (inline_method): Allways inline some wrappers even if the cost
10948         is too large. Fixes #58785.
10949
10950         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
10951         
10952 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
10953
10954         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
10955         (crichton@gimp.org). Beginning of support for sparc/linux.
10956
10957         * mini-sparc.c: Optimize retrieval of LMF address.
10958
10959 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
10960
10961         * exceptions-ppc.c:  handle alloca in methods with clauses.
10962
10963 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
10964
10965         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
10966
10967 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
10968
10969         * mini.c: Delegate most of the abort signal work to 
10970           mono_thread_request_interruption, which also handles Stop and Suspend
10971           states.
10972
10973 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
10974
10975         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
10976         supports the save/restore lmf opcodes.
10977
10978 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
10979
10980         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
10981         by gcc-3.4 as well.
10982
10983         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
10984
10985 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10986
10987         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
10988         methods which contain array accesses.
10989
10990         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
10991         boundaries. Fixes #58537.
10992
10993         * iltests.il: Add regression test for #58537.
10994
10995 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10996
10997         * mini-x86.c (mono_arch_local_regalloc): Last part of
10998         fix for bug #58633 (releasing register to early).
10999
11000 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
11001
11002         * basic-long.cs: Add new regression test.
11003
11004 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
11005
11006         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
11007         register too early on the chain.
11008
11009 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
11010
11011         * mini.c (create_helper_signature): Use a helper function to reduce
11012         the code which needs to be written. Also set the calling convention of
11013         icalls on windows. Fixes #57840.
11014
11015 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
11016
11017         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
11018         exceptions-ppc.c: added helper function to get the instruction address
11019         from a signal handler context.
11020
11021 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11022
11023         * helpers.c: use g_get_tmp_dir. Invokes happyness 
11024         from gonzalo.
11025
11026 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11027
11028         * helpers.c: Add new env variable to pass args to objdump.
11029         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
11030
11031 2004-05-17  Radek Doulik  <rodo@ximian.com>
11032
11033         * Makefile.am (common_sources): added abcremoval.h so it get
11034         disted and daily mono packages on go-mono.com will build again
11035
11036 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
11037
11038         * abcremoval.c: Fixed coding style, added copyright header.
11039
11040         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
11041
11042         * mini.h: Added prototype for abc removal main function.
11043
11044         * build_relations_propagation_table.pl: Added copyright header.
11045
11046 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
11047
11048         * basic-long.cs: reg test for complex ceq_long bug.
11049
11050 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
11051
11052         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
11053         reg in long and clob case (bug #58343). Fixed/added comments.
11054
11055 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
11056
11057         * mini.c (mono_jit_runtime_invoke): Follow new convention
11058         of calling the invoke method with an function pointer.
11059
11060 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
11061
11062         * ChangeLog: Fix author of memory leak patch.
11063
11064 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
11065
11066         * Makefile.am: fix make dist as well...
11067
11068
11069 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
11070
11071         * cfold.c: Made so that conversions from pointer to int4 are no-ops
11072         on archs where pointers are 4 bytes long.
11073
11074         * Makefile.am: Added abcremoval.c source file.
11075
11076         * abcremoval.c: Added abcremoval.c.
11077
11078         * abcremoval.h: Added abcremoval.h.
11079
11080         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
11081
11082         * inssel.brg: Enabled bounds check removal.
11083
11084         * mini.c: Added support for abcrem optimization.
11085
11086         * mini.h: Added abcrem optimization label.
11087
11088         * driver.c: Added support for abcrem optimization.
11089
11090         * propagated_relations_table.def: Added propagated_relations_table.def.
11091
11092 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
11093
11094         * mini.c, cfold.c: fix style.
11095
11096 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11097
11098         * mini.c: handle issue with the low-level implementation of
11099         some long opcodes (bug #54209).
11100
11101 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
11102
11103         * basic.cs: test for my new cmov stuff.
11104
11105 2004-05-13      Patrik Torstensson
11106
11107         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
11108         opt and added peephole documentation.
11109
11110 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
11111
11112         * tramp-ppc.c: rewrote the generic trampoline code.
11113
11114 2004-05-11      Patrik Torstensson
11115
11116         * mini-x86.c: optimize long shl/shr asm code (one less branch)
11117
11118 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
11119
11120         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
11121
11122         * mini.h mini.c dominators.c: Applied patch from Derek Woo
11123         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
11124
11125         * mini.c: Add new icalls for AsAny marshalling.
11126
11127 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
11128
11129         * tramp-ppc.c, mini-ppc.c: more cleanups.
11130
11131 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11132
11133         * mini.c: no warnings.
11134
11135 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11136
11137         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
11138
11139 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
11140
11141         * mini.c: In the thread abort signal handler, if the thread is in the
11142         process of being stoped, don't throw the Abort exception, just stop the
11143         thread.
11144
11145 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
11146
11147         * tramp-ppc.c: removed old code.
11148
11149 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11150
11151         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
11152         do some simple speed optimizations on ppc.
11153
11154 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
11155
11156         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
11157         and large offsets in load/store.
11158
11159 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
11160
11161         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
11162         it causes regressions.
11163
11164 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
11165
11166         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
11167         support.
11168
11169 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
11170
11171         * jit-icalls.c: remove warnings.
11172         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
11173         speedups for unsafe code.
11174
11175 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
11176
11177         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
11178
11179 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
11180
11181         * basic-calls.cs: Add new regression test.
11182
11183         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
11184         more portable.
11185
11186         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
11187
11188         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
11189         is no longer used.
11190
11191 2004-05-06      Patrik Torstensson
11192
11193         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
11194         long reg allocation in any reg (not only eax:edx) and implemented 
11195         long shl/shr ops in asm instead of helpers.
11196
11197 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
11198
11199         * mini-sparc.h: Fix warnings.
11200
11201         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
11202         stack.
11203
11204         * mini-exceptions.c (mono_handle_exception): Call the filter in a
11205         separate statement for clarity.
11206
11207         * mini-sparc.c: Update status.
11208
11209 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
11210
11211         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
11212         here.
11213
11214 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11215
11216         * inssel-ppc.brg: another small pre-release workaround:
11217         we don't do overflow detection for long_sub_un.
11218
11219 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11220
11221         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
11222         (also works around a weird ppc bug: 57957).
11223
11224 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
11225
11226         * tramp-ppc.c: trampoline fixes.
11227
11228 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
11229
11230         * mini-ppc.c: fixed typos.
11231
11232 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11233
11234         * mini-ppc.c, exceptions-ppc.c: more code saves registers
11235         at the top of the stack. Fixed typos. Use a frame registers
11236         for all the methods with exception clauses.
11237
11238 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11239
11240         * exceptions-ppc.c: restore fp registers.
11241
11242 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
11243
11244         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
11245         order from the stack top (moved the stack room to save the
11246         return value for trace after the param area). Fixed corruption
11247         in restoring registers on unwind.
11248
11249 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11250
11251         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
11252
11253 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11254
11255         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
11256         and prolog/epilog for methods that use it. Allow
11257         enough param area room for varargs methods. Fix miguel's
11258         breakage in exception handling.
11259
11260 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11261
11262         * Makefile.am: run genmdesc only on current arch.
11263
11264 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11265
11266         * exceptions-x86.c:
11267         * mini-x86.h: fix the build on windows.
11268
11269 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
11270
11271         * 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.
11272
11273         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
11274
11275         * mini-exceptions.c: New file.
11276         
11277         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
11278         Move some parts of the x86 exception handling code to an 
11279         arch-independent file so it can be shared with other ports.
11280
11281 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
11282
11283         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
11284
11285 2004-04-26  David Waite  <mass@akuma.org>
11286
11287         * driver.c: remove comma from end of enumeration declaration
11288
11289 2004-04-26  Jackson Harper  <jackson@ximian.com>
11290
11291         * driver.c: parse config file before loading first assembly. This
11292         allows the user gac to be enabled/disabled. 
11293         
11294 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
11295
11296         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
11297         simpler mechanism: we do not care what is encoded initially
11298         (branch absolute or relative), we care about the code and its
11299         target.  I kept the old code for reference for now.
11300
11301         The new code tries first to determine if the jump is anywhere in
11302         the -/+32 absolute meg range, if it succeeds, it encodes using the
11303         absolute branch;  If not, it tried to find something in the
11304         relative range, if not, it uses the handle_thunk code. 
11305
11306 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
11307
11308         * exceptions-ppc.c: use the correct ip register on macosx.
11309
11310 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
11311
11312         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
11313
11314 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
11315
11316         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
11317         Raise exception on integer divide by zero by hand since the hw
11318         doesn't support it. Handle NaNs in FP compares.
11319
11320 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
11321
11322         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
11323         code reducing duplication between the platforms and enabled
11324         signal exception handling (on linux for now).
11325
11326 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
11327
11328         * exceptions-ppc.c: more macosx support.
11329
11330 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11331
11332         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
11333
11334 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
11335
11336         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
11337
11338 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11339
11340         * iltests.il: more tests.
11341
11342 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11343
11344         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
11345         vars as well.
11346
11347 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11348
11349         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
11350
11351 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11352
11353         * liveness.c: Mark variables as volatile in all basic blocks reachable
11354         from exception clauses.
11355
11356 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
11357
11358         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
11359         inlining.
11360
11361 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11362
11363         * iltests.il, basic.cs: more tests for regalloc.
11364
11365 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11366
11367         * iltests.il: Some tests for register allocation modifications
11368         I have locally.
11369
11370 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
11371
11372         * exceptions.cs: Add regression test for bug #56782.
11373
11374         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
11375         original stack trace if an exception is rethrown. Fixes #56782. Oh,
11376         the beauty of fixing the same thing in 5 different files...
11377
11378 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
11379
11380         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
11381         methods.
11382
11383 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
11384
11385         * mini.c: Add support for STRWLPARRAY marshalling convention.
11386
11387 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11388
11389         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
11390         to init the context to setup the regs pointer).
11391
11392 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11393
11394         * exceptions-ppc.c: more exceptions work.
11395
11396 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11397
11398         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
11399         not allowed.
11400
11401 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11402
11403         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
11404         can use the memory directly.
11405
11406         * cpu-pentium.md: Update documentation from a post from Zoltan. 
11407
11408         add x86_add_membase, x86_sub_membase, x86_mul_membase
11409
11410 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11411
11412         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
11413         GENERAL_REGS they were also hardcoded for all PPC ports.
11414
11415         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
11416
11417         Remove hard-coded limit for floating point registers, use
11418         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
11419
11420         Notice that in MacOS X calling conventions you can fit a lot more
11421         floating point values in registers, so I should update the PInvoke
11422         test to excercise the passing of floating point values on the
11423         stack (currently broken).
11424         
11425 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
11426
11427         * tramp-ppc.c (create_trampoline_code): Added
11428         JUMP_TRAMPOLINE_SIZE. 
11429         (ppc_magic_trampoline): Follow the pattern from
11430         x86_magic_trampoline: if code is set to zero, return. 
11431         (create_trampoline_code): Always pass MonoMethod to the jump
11432         trampoline, before it was passing a null.
11433         (mono_arch_create_jump_trampoline): Implement the jump stub, could
11434         share the code with mono_arch_create_jit_trampoline. 
11435
11436         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
11437         implemented.
11438         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
11439         implemented.  
11440
11441         * cpu-g4.md: Added length for jmp instruction, the worst case
11442         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
11443         for save_lmf).
11444
11445 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
11446
11447         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
11448
11449 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
11450
11451         * mini.c: Only set bblock->real_offset when adding a new bblock, and
11452         before each IL instruction.
11453
11454         * mini.c (CEE_BOX): Fix warnings.
11455
11456 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11457
11458         * mini.c: removed a few unused vars and extra whitespace.
11459
11460 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
11461
11462         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
11463         checks.
11464         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
11465         index.
11466         (OP_GETCHR): use the above
11467         (CEE_LDELEMA): use the above.
11468
11469         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
11470         version of the generic impl.
11471         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
11472         (CEE_LDELEMA): use the above.
11473
11474 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11475
11476         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
11477         Fixes #56317.
11478
11479         * iltests.il: Added new regression test for #56317.
11480
11481 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11482
11483         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
11484         under NetBSD. Fixes #56450.
11485
11486         * liveness.c (update_gen_kill_set): Fix previous patch.
11487
11488 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11489
11490         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
11491
11492 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
11493
11494         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
11495         ldsfld and ldsflda.
11496
11497         * inssel-sparc.brg: Add more optimizations.
11498
11499         * mini-sparc.c: Replace multiply/divide with shifts if possible.
11500
11501 2004-04-01  Martin Baulig  <martin@ximian.com>
11502
11503         * mini.c (handle_box): New static function; moved the
11504         implementation of CEE_BOX here.
11505         (mono_method_to_ir): Added `constrained_call' variable.
11506         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
11507         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
11508         mono_method_get_constrained() to get the method.
11509
11510 2004-04-01  Martin Baulig  <martin@ximian.com>
11511
11512         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
11513         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
11514         (mono_method_to_ir): We don't need these macros anymore since
11515         mono_class_get_full() already takes care of it. 
11516
11517 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11518
11519         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
11520         use @function (as doesn't accept #function here) and check the return
11521         value of system and stop if fails.
11522
11523 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11524
11525         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
11526
11527 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
11528
11529         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
11530
11531         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
11532
11533         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
11534         #56223.
11535
11536         * basic-long.cs: Add test for negation of Int64.MinValue.
11537
11538 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
11539
11540         * mini-sparc.c: Update status.
11541
11542         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
11543
11544         * exceptions-sparc.c: Fix return value in filters.
11545
11546         * inssel-sparc.brg: Fix register allocation in some rules.
11547
11548 2004-03-28  Martin Baulig  <martin@ximian.com>
11549
11550         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
11551         if neccessary.  
11552
11553 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
11554
11555         * mini-x86.c (mono_arch_patch_code): Fix warnings.
11556         
11557         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
11558         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
11559         remove unused conv_u4 opcode.
11560
11561         * mini-x86.c: Remove valgrind workaround since it slows down things
11562         even when mono is not run under valgrind.
11563
11564 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
11565
11566         * mini-sparc.c: Update status.
11567
11568         * inssel-sparc.brg: Add some optimizations.
11569
11570         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
11571         future delay slot filling. Add support for varargs, tail calls and JMP.
11572
11573         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
11574         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
11575
11576         * inssel.brg: Fix register allocation in OP_ARGLIST.
11577
11578         * inssel.brg: Fix warnings.
11579
11580 2004-03-25  Martin Baulig  <martin@ximian.com>
11581
11582         * mini.c (inflate_generic_field): Removed.
11583         (mini_get_method): Removed, use mono_get_method_full(),
11584         (mini_get_class): Removed, use mono_class_get_full().
11585         (mono_method_to_ir): Pass our generic context to
11586         mono_field_from_token().        
11587
11588 2004-03-25  Martin Baulig  <martin@ximian.com>
11589
11590         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
11591         of a `MonoMethod *'.
11592         (mini_get_method): Take a `MonoGenericContext *' instead
11593         of a `MonoMethod *'.
11594         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
11595         a new local variable called `generic_context' which holds the
11596         current `MonoGenericContext *'; use it to lookup things.
11597
11598 2004-03-24  Martin Baulig  <martin@ximian.com>
11599
11600         * mini.c (mini_get_class): New static method; if we're inside a
11601         generic instance, inflate the class if neccessary.
11602         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
11603
11604 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
11605
11606         * iltests.il: New regression test for #55976.
11607
11608         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
11609         #55976.
11610
11611 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11612
11613         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
11614         output.
11615
11616 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11617
11618         * liveness.c: Consider SSA stores as well as loads when making vars
11619         volatile.
11620
11621         * exceptions.cs: New regression tests for register allocation.
11622         
11623 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
11624
11625         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
11626         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
11627           domain lock only to protect puntual access to data structures.
11628           Added access lock for sighash, jit_icall_hash_name, 
11629           jit_icall_hash_addr and domain->code_mp.
11630
11631 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
11632
11633         * driver.c: Print SIGSEGV handling method.
11634
11635         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
11636
11637         * mini.c (setup_jit_tls_data): Handle case when this is called
11638         multiple times for a thread.
11639
11640         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
11641         is different from fbxx_un. Fixes #54303. Also use constants instead of
11642         magic numbers in a lot of places.
11643
11644 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
11645
11646         * exceptions.cs: Fix cctor test when --regression is used.
11647
11648 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
11649
11650         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
11651         for Linux/ppc.
11652
11653 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11654
11655         * inssel-ppc.brg: fixed register assignments for some rules.
11656
11657 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11658
11659         * exceptions.cs: Add test for exceptions in static constructors.
11660
11661         * mini.c (mono_jit_compile_method_with_out): Move the calling of
11662         static constructors outside the domain lock. Fixes #55720.
11663
11664 2004-03-17  Martin Baulig  <martin@ximian.com>
11665
11666         * mini.c (get_generic_field_inst): Removed, this'll never happen.
11667         (inflate_generic_field): Take the `MonoMethod *' instead of the
11668         `MonoClass *' and added support for generic method.
11669         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
11670         have a `field->parent->gen_params', only inflate the field if it's
11671         an open constructed type.
11672
11673 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11674
11675         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
11676         exception object instead of the preconstructed ones.
11677
11678 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11679
11680         * mini.c: reverted changed to sigsegv_signal_handler commited
11681         accidentally in the previous patch.
11682
11683 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11684
11685         * mini.c:
11686         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
11687         running --aot with an old assembly.
11688
11689 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
11690
11691         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
11692         point values.
11693
11694         * mini-sparc.c: Add support for v9 branches with prediction.
11695
11696 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
11697
11698         * mini.c (mini_init): #warning is GNUC only
11699
11700         * mini-sparc.h: implement __builtin_frame_address
11701         and __builtin_return_address for Sun C compiler
11702
11703 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
11704
11705         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
11706
11707 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
11708
11709         * basic-calls.cs: Add test for unaligned byref long argument passing.
11710
11711         * mini-ops.h: Add sparcv9 compare and branch instructions.
11712
11713         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
11714         v9 instructions if we have a v9 cpu.
11715
11716         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
11717         registers for global allocation.
11718
11719         * exceptions-sparc.c: Fixes.
11720         
11721 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
11722
11723         * liveness.c (mono_analyze_liveness): Optimized version.
11724
11725         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
11726
11727         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
11728         sparc work.
11729
11730         * basic-float.cs basic-calls.cs: New regression tests.
11731
11732 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
11733
11734         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
11735         sigaltstack implementation.
11736
11737         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
11738         
11739         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
11740         stuff if SIGSEGV_ON_ALTSTACK is not defined.
11741
11742 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
11743
11744         * mini.c: Fix warnings.
11745         
11746         * mini.c (mono_resolve_patch_target): New function which contains the
11747         arch independent part of the patching process.
11748
11749         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
11750         patching code to a separate function.
11751
11752 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
11753
11754         * mini.c (add_signal_handler): ifdef out on Windows
11755
11756 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
11757
11758         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
11759         cpu-sparc.md: Add exception handling support + other fixes.
11760
11761         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
11762         typed GC detection in --version.
11763
11764         * basic.cs exceptions.cs: New regression tests.
11765
11766         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
11767         the arch specific code can store data during a compilation.
11768
11769         * mini-ops.h: Add OP_SETFRET.
11770
11771         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
11772         function, register a separate icall for each arity, so the icalls can
11773         get a wrapper.
11774         
11775         * mini.c (mono_print_tree): Print negative offsets in a more readable
11776         form.
11777         
11778         * mini.c: Make signal handling work on sparc.
11779         
11780         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
11781
11782         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
11783
11784         * jit-icalls.c: Emulate truncl by aintl on solaris.
11785
11786         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
11787
11788 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
11789
11790         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
11791
11792 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
11793
11794         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
11795         a MarshalByRef type, inline a method that performs the check, taking into
11796         account that the object can be a proxy. Also implemented tow new opcodes:
11797         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11798         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
11799         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11800
11801 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11802
11803         * mini-ppc.c: if a relative branch displacement is too big
11804         but it points to and area reachable with an absolute branch, 
11805         avoid the thunks.
11806
11807 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11808
11809         * mini.c: optimize small copies in cpblk.
11810
11811 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
11812
11813         * basic-calls.cs basic-float.cs: New regression tests.
11814
11815         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
11816         negative offsets from %fp. Implement localloc. Fix local register 
11817         allocation. Fix the case when the this argument needs to be saved to
11818         the stack. Implement some missing opcodes.
11819
11820 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
11821
11822         * mini.c (mini_method_compile): Reenable global regalloc in methods
11823         with exception handlers.
11824
11825         * linear-scan.c (mono_varlist_sort): Fix warning.
11826
11827         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
11828
11829         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
11830         regalloc costs.
11831
11832         * liveness.c: Make all variables uses in exception clauses volatile, to
11833         prevent them from being allocated to registers. Fixes #42136.
11834
11835 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
11836
11837         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
11838         causes regressions.
11839
11840         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
11841         argument to mono_arch_regalloc_cost.
11842
11843         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
11844         precisely.
11845
11846 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
11847
11848         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
11849         Make the cost of allocating a variable to a register arch dependent.
11850
11851         * basic-calls.cs: Fix compilation of tests.
11852         
11853         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
11854         helper function to cut back on the number of #ifdefs needed.
11855
11856         * mini-ppc.c: Fix compilation.
11857
11858         * basic-calls.cs: New regression tests.
11859
11860         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
11861
11862         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
11863         of l0 since that is callee saved.
11864
11865         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
11866         to virtual calls.
11867
11868         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
11869         of delay instruction.
11870
11871         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
11872
11873         * mini.h (MonoCallInst): Add 'virtual' flag.
11874
11875         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
11876
11877 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
11878
11879         * *.cs: New regression tests.
11880
11881         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
11882         work.
11883
11884         * mini.c (mono_runtime_install_handlers): Fix build.
11885
11886         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
11887         'signal_stack_size' members.
11888
11889         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
11890         alternate signal stack.
11891
11892         * exceptions-x86.c: Add stack overflow handling.
11893
11894         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
11895         functions to arch independent code.
11896
11897         * mini.c (mono_print_tree): Print more detailed info for load_membase
11898         opcodes.
11899         
11900 2004-02-23  Martin Baulig  <martin@ximian.com>
11901
11902         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
11903
11904 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11905
11906         * mini-x86.c: fixed reg allocation for div/rem.
11907
11908 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
11909
11910         * driver.c (mono_main): Report some configuratio options on --version.
11911
11912 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
11913
11914         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
11915         low in the address space. Correctly flush memory in thunks where we
11916         output native code.
11917
11918 2004-02-20  Martin Baulig  <martin@ximian.com>
11919
11920         * mini.c (mini_get_method): New static method; inflate all generic
11921         methods and methods in open generic instances.
11922         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
11923         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
11924
11925 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11926
11927         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
11928
11929         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
11930
11931 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
11932
11933         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
11934
11935         * mini-sparc.c (flushi mono_arch_output_basic_block): make
11936         it compile using Sun's compiler.
11937
11938 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11939
11940         * 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.
11941
11942         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
11943
11944 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11945
11946         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
11947         code.
11948         * mini-ppc.c: handle calls outside of the allowed range with thunks
11949         allocated using the code manager.
11950         * tramp-ppc.c: use the code manager to hold generated native code.
11951         Fixed the magic trampoline to just patch vtable entries.
11952
11953 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
11954
11955         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
11956         independent file.
11957
11958 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
11959
11960         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
11961         PPC.
11962
11963         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
11964         if we have a working __thread implementation.
11965
11966         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
11967         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
11968
11969 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
11970
11971         * mini-x86.c: Fix compilation under gcc 2.
11972         
11973 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
11974
11975         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
11976         contains a call to the wrapped function.
11977
11978         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
11979         OP_<CALL>_IMM opcodes, and use them under X86.
11980         
11981         * mini.c (mono_jit_find_compiled_method): Fix warning.
11982
11983         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
11984
11985         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
11986
11987         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
11988         functionality to mini.c.
11989
11990         * mini.c (mono_create_jump_trampoline): New function to create a jump
11991         trampoline. Return a compiled method instead of a trampoline if it
11992         exists. Add a cache for jump trampolines.
11993
11994         * mini.c (mono_jit_find_compiled_method): New function to return a
11995         compiled method if it exists.
11996
11997         * mini-x86.c: Call mono_create_jump_trampoline instead of 
11998         mono_arch_create_jit_trampoline.
11999
12000         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
12001         a jump trampoline. Fixes #52092.
12002         
12003 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
12004
12005         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
12006         which is not up-to-date. Add check_corlib_version () instead.
12007
12008         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
12009         have to call it.
12010         
12011         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
12012         since newer valgrind versions do not need it.
12013
12014         * mini.c (mono_jit_compile_method_with_opt): New helper function to
12015         compile a method with a given set of optimizations.
12016
12017         * mini.c: Compile icall wrappers on-demand instead of at startup.
12018
12019         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
12020         wrapper for an icall.
12021
12022 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
12023
12024         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
12025         #54063.
12026
12027         * iltests.il: Add test for non-empty stack before switch instruction.
12028
12029 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
12030
12031         * mini.c: Add support for new stringbuilder marshalling conventions.
12032
12033         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
12034
12035 2004-02-01  Martin Baulig  <martin@ximian.com>
12036
12037         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
12038         in `ginst->mtype_argv'.
12039
12040 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
12041
12042         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
12043         facilitate grepping.
12044
12045 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
12046
12047         * mini.c: fixed buglet in initobj generic implementation for references.
12048
12049 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
12050
12051         * Makefile.am: make the version script conditional.
12052         * jit-icalls.c: handle missing truncl().
12053
12054 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
12055
12056         * exceptions.cs: Add more tests for double->int conversion.
12057
12058         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
12059         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
12060
12061 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
12062
12063         * driver.c: make --verbose --version emit an error
12064         if the loaded corlib doesn't match the runtime version.
12065
12066 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
12067
12068         * mini-ppc.h: export ppc_patch().
12069         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
12070         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
12071         on par or better than on MacOSX.
12072
12073 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
12074
12075         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
12076         mono_lookup_pinvoke_call.
12077
12078         * mini-x86.c: Under windows, the default pinvoke calling convention is
12079         stdcall. Fixes #52834.
12080
12081         * mini.c (optimize_branches): Add an upper bound to the number of
12082         iterations to prevent infinite loops on strange loops. Fixes #53003.
12083
12084 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
12085
12086         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
12087         and ISINST. Fixes #52093.
12088
12089         * objects.cs (test_0_vector_array_cast): New tests.
12090         
12091 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
12092
12093         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
12094         checking in Array.Set ().
12095
12096         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
12097         #52590.
12098
12099         * object.cs (test_0_multi_array_cast): New regression test.
12100
12101 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
12102
12103         * exceptions-ppc.c: fix build on Linux/PPC.
12104
12105 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
12106
12107         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
12108         running under valgrind.
12109         (x86_magic_trampoline): Fix build bustage.
12110
12111         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
12112         negative values as well. This is needed for the encoding of the line number
12113         info, since sometimes the line numbers are not in increasing order.
12114
12115 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
12116
12117         * cpu-pentium.md (localloc): Increase the size of the localloc 
12118         instruction since it is a loop under Win32.
12119
12120         * debug-mini.c (record_line_number): Get rid of unneccesary memory
12121         allocation.
12122
12123 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
12124
12125         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
12126         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
12127         Max Horn (max@quendi.de). Fix file names in comments.
12128
12129 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
12130
12131         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
12132         avoid stack overflow.
12133         (replace_usage): Avoid uninitialized variable warnings.
12134
12135         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
12136         and taking the address of valuetype variables.
12137
12138 2004-01-03  Patrik Torstensson
12139
12140         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
12141         for other purposes than FP later on.
12142
12143 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
12144
12145         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
12146         of tail calls.
12147
12148 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12149
12150         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
12151
12152 2003-12-30  Patrik Torstensson <p@rxc.se>
12153
12154         * mini-x86.h: Decreased number of availiable fp regs.
12155         Solves corner cases with FP spilling.
12156
12157 2003-12-23  Patrik Torstensson <p@rxc.se>
12158
12159         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
12160         for floating point stack tracking / spilling on x86. 
12161         Fixes bug #49012.
12162         
12163         * basic-float.cs: added float mul overflow test.
12164
12165 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
12166
12167         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
12168
12169 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12170
12171         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
12172         supports for cond branches that overflow the immediate
12173         overflow offset. mcs can compile simple programs.
12174
12175 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12176
12177         * exceptions-ppc.c: exception handling support wip:
12178         finally handlers get run on exception.
12179
12180 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
12181
12182         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
12183         profiling.
12184
12185 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12186
12187         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
12188         initial support for stack walking and unwinding.
12189
12190 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
12191
12192         * driver.c (mono_main): Make corlib-out-of-sync message more 
12193         descriptive. Also remove verify_corlib call.
12194
12195 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12196
12197         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
12198         not overlap with other call's arguments, too.
12199
12200 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
12201
12202         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
12203         move to arch-specific code the choice of arch-specific
12204         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
12205         * mini.c: ensure emulation calls will not interleave
12206         with other calls.
12207
12208 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
12209
12210         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
12211         the magic trampoline stack frame is dropped before executing
12212         the new method.
12213
12214 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
12215
12216         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
12217         and integer to fp conversions. Added support for overflowing
12218         arguments on the stack. Reserve a couple more registers as temps.
12219         Added support for aot compilation (as output still needs to be
12220         tweaked, though).
12221
12222 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12223
12224         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
12225         Don't overwrite return register in some corner cases.
12226
12227 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
12228
12229         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
12230         static constructors when AOT compiling.
12231
12232         * driver.c (mono_main): Call mono_check_corlib_version.
12233
12234 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12235
12236         * cpu-g4.md, basic.cs: fixed div target register.
12237
12238 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
12239
12240         * mini-ppc.c, basic.cs: shl_imm fix with test.
12241
12242 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12243
12244         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
12245         structures by value. Misc fixes.
12246         * objects.cs: more tests.
12247
12248 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
12249
12250         * mini-ppc.c: lconv.ovf.i implemented.
12251
12252 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12253
12254         * mini.c:
12255         (mini_init): don't error out if someone already called g_thread_init.
12256
12257 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12258
12259         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
12260         to be any type per the spec. Fix abnormal memory usage when
12261         the same object is repeatedly thrown.
12262
12263 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
12264
12265         * mini.c: check for overruns in IL code.
12266
12267 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
12268
12269         * TODO: Add/remove some todo entries.
12270
12271 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
12272
12273         * driver.c (mono_main): Call mono_verify_corlib.
12274
12275 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
12276
12277         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
12278         This has been moved to mini.c
12279         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
12280         type being casted is marshalbyref it could be a proxy, so instead of
12281         emitting the type check code, emit a call to a runtime method that will
12282         perform the check by calling CanCastTo if needed.
12283
12284 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
12285
12286         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
12287         methods with large stack frames under Win32.
12288
12289 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
12290
12291         * Makefile.am: Distribute regression tests.
12292
12293         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
12294         at the end instead of inserting each variable into the sorted list.
12295
12296         * linear-scan.c (mono_varlist_sort): New helper function.
12297         
12298 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12299
12300         * mini.c: ensure arguments and locals are within bounds.
12301
12302 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12303
12304         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
12305         related fixes.
12306
12307 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12308
12309         * mini.c (mono_cprop_copy_values): Fix crash.
12310
12311         * aot.c: Set verbosity back to 0.
12312         
12313 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12314
12315         * regalloc.c: complete memory leak fix by Laurent Morichetti
12316         (l_m@pacbell.net).
12317
12318 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12319
12320         * driver.c (main_thread_handler): Revert the previous patch.
12321
12322         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
12323         under valgrind.
12324
12325         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
12326         memory from the memory pool.
12327
12328         * driver.c (main_thread_handler): Turn on all optimizations when
12329         --aot is used.
12330
12331         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
12332         an array for better performance.
12333
12334         * regalloc.c (mono_regstate_assign): Fix memory leak.
12335
12336         * debug-mini.c (mono_debug_serialize_debug_info): New function to
12337         serialize the debug info.
12338
12339         * debug-mini.c (mono_debug_add_aot_method): New function to load the
12340         debug info from the serialized representation.
12341
12342         * aot.c: Save debug info into the generated file and load it when 
12343         loading a method.
12344
12345         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12346
12347 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12348
12349         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
12350         More FP-related fixes.
12351
12352 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
12353
12354         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
12355         and register allocation buglet. Hello world now runs.
12356
12357 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12358
12359         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
12360         * tramp-ppc.c: fixed class init trampoline.
12361         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
12362
12363 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12364
12365         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
12366         mini.c: more ppc changes/fixes.
12367
12368 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12369
12370         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
12371         Also optimize the case when the arguments are the same in the caller 
12372         and in the callee.
12373
12374         * iltests.il: Add tests for tail calls with valuetype arguments.
12375
12376 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12377
12378         * mini-ppc.c: fixes for struct return type.
12379
12380 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
12381
12382         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
12383         mono_spillvar_offset() to arch-specific code.
12384
12385 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
12386
12387         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
12388
12389 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12390
12391         * exceptions-x86.c: Fix stack space leaks.
12392         
12393         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
12394         registers from the lmf if the method has save_lmf set.
12395
12396 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
12397
12398         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
12399         of icall wrappers into InvokeInDomain, since these are now per-domain.
12400
12401 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
12402
12403         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
12404         make some opcode emulation and intrinsic ops enabled/disabled 
12405         according to the architecture. More fixes.
12406
12407 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12408
12409         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
12410
12411 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12412
12413         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
12414         arch-specific handling for 'this' and struct return type to
12415         arch-specific code.
12416
12417 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12418
12419         * aot.c: prevent divide by zero error when reporting (it happened with
12420         Accessibility.dll).
12421
12422 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
12423
12424         * mini.h (inst_switch): Remove unused macro.
12425
12426 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12427
12428         * aot.c:
12429         (load_aot_module): free 'info->methods' and 'info' properly. No more
12430         "free(): invalid pointer blah" messages when you have an old aot
12431         compiled assembly.
12432
12433 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
12434
12435         * jit-icalls.c, mini.c: Added support for context static fields.
12436
12437 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12438
12439         * mini.c (mono_method_blittable): Methods which set LastError are not 
12440         blittable either. Fixes #51108.
12441         
12442 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12443
12444         * mini.c: flush icache.
12445         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
12446
12447 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12448
12449         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
12450
12451 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
12452
12453         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
12454         safe on IA32.
12455
12456         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
12457         vararg calls.
12458
12459         * inssel.brg (CEE_MKREFANY): Fix AOT case.
12460
12461 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
12462
12463         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
12464         instruction when the result is discarded.
12465
12466         * iltests.il (test_0_div_regalloc): New regression test.
12467
12468         * arrays.cs: Fix compilation error.
12469
12470 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
12471
12472         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
12473         float rules to inssel-x86.brg: sane architectures with FP registers
12474         don't need to implement these rules.
12475
12476 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12477
12478         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
12479
12480 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12481
12482         * mini.h, inssel-long32.brg: fixed endianess issues in int64
12483         implementation of 32 bit systems.
12484
12485 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12486
12487         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
12488         (Jeroen Zwartepoorte).
12489
12490 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12491
12492         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
12493         the caller and the callee matches.
12494         
12495         * mini.c (mono_method_to_ir): Add comment.
12496
12497         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
12498         signbit is missing on some platforms.
12499
12500 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
12501
12502         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
12503
12504         * mini.c (setup_jit_tls_data): Call the new function.
12505         
12506         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
12507
12508         * mini-x86.c: Add experimental support for fast access to the lmf
12509         structure under NPTL/Linux 2.6.x.
12510
12511 2003-11-06  Martin Baulig  <martin@ximian.com>
12512
12513         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
12514         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
12515         the debugger.
12516
12517 2003-11-02  Martin Baulig  <martin@ximian.com>
12518
12519         * mini.c (inflate_generic_field): New static method.
12520         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
12521         generic instance and the field is declared in a generic type, call
12522         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
12523
12524 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
12525
12526         * mini.h mini.c (mono_method_same_domain): New function to return
12527         whenever the caller and the callee are in the same domain.
12528
12529         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
12530
12531 2003-10-30  Martin Baulig  <martin@ximian.com>
12532
12533         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
12534         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
12535         method parameters.
12536         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
12537         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
12538
12539 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
12540
12541         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
12542         propagation.
12543
12544         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
12545         object here, so it is in the correct appdomain etc.
12546
12547 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
12548
12549         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
12550         already done.
12551         (mono_method_to_ir): Avoid freeing the type created returned from
12552         mono_type_create_from_typespec, since it is put into an internal cache
12553         by the function. Fixes pointer.exe.
12554
12555         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
12556         trampolines for icalls and pinvokes as well. Fixes #33569.
12557
12558 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
12559
12560         * mini.c: Update after appdomain changes.
12561
12562         * mini.c (mono_jit_compile_method_inner): Allways compile native
12563         method wrappers in the root domain, since there can only be one
12564         instance of them, whose address is stored in method->info.
12565
12566 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12567
12568         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
12569         environment variable. Instead detect automatically whenever running
12570         under valgrind using the magic macro RUNNING_ON_VALGRIND from
12571         valgrind.h.
12572
12573 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
12574
12575         * trace.c, trace.h: New files that implement the new trace option
12576         parsing. 
12577
12578         * driver.c: Document new --trace options.
12579
12580         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
12581         mini-x86.c: Apply:
12582
12583         -       if (mono_jit_trace_calls)
12584         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
12585
12586         * mini.h: prototypes.
12587         
12588 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12589
12590         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
12591
12592         * mini.c inssel.brg: Implement typedefbyref opcodes.
12593
12594         * mini.c (mono_jit_compile_method): Remove unused local variable.
12595
12596         * mini.c (mono_jit_compile_method_inner): Ditto.
12597         
12598 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
12599
12600         * tramp-x86.c (x86_class_init_trampoline): Fix build.
12601         
12602         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
12603
12604 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12605
12606         * mini.c (mono_no_aot): Remove unused global variable.
12607
12608         * mini.c: Thread safety fixes.
12609
12610 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12611
12612         * mini.c (mono_create_class_init_trampoline): Add a lock around
12613         class_init_hash_addr.
12614
12615         * arrays.cs (test_0_newarr_emulation): Add new regression test for
12616         #30073.
12617
12618         * mini.c: Decompose the NEWARR instruction before decomposing its
12619         arguments. Fixes #30073.
12620
12621 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
12622
12623         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
12624         convention.
12625
12626 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
12627
12628         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
12629
12630         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
12631
12632         * driver.c: Add support for compiling icall wrappers to --compile.
12633
12634 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
12635
12636         * inssel.brg: The empty value in class->interface_offsets is -1, not
12637         0. Fixes #49287.
12638
12639 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
12640
12641         * objects.cs: New test for 'is' operator on an array of interfaces.
12642
12643 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12644
12645         * tramp-ppc.c: update trampoline code to support jumps
12646         and class initialization.
12647
12648 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
12649
12650         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
12651
12652         * inssel.brg (OP_UNBOXCAST): Fix #46027.
12653
12654         * inssel.brg (OP_UNBOX): Remove unused rule.
12655
12656         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
12657         region instead of one for each method. Fixes #47813.
12658
12659 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
12660
12661         * exceptions.cs (test_0_nested_finally): New regression test for
12662         nested exception handlers.
12663
12664         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
12665
12666         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
12667
12668         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
12669         inlining.
12670
12671         * mini.c (mono_method_check_inlining): Make the inlining limit 
12672         configurable by an environment variable.
12673         
12674         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
12675
12676         * mini.h: Bump AOT file version.
12677
12678         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
12679         token, store the image along with the token, since the token might not 
12680         refer to the same image as the method containing the relocation, 
12681         because of inlining.
12682
12683 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
12684
12685         * mini.c (mono_precompile_assemblies): New function to compile
12686         all methods in all loaded assemblies.
12687
12688         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
12689
12690         * regalloc.h regalloc.c (MonoRegState): Change the type of 
12691         iassign and fassign to int*, since they can contain large negative
12692         values if the register is spilled. Also added some comments. Fixes
12693         #45817.
12694
12695         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
12696         under Win32. Fixes #42964.
12697
12698 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
12699
12700         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
12701
12702         * aot.c: Added support for AOT compiling methods which contain calls
12703         to wrappers. Currently, only remoting-invoke-with-check wrappers are
12704         handled.
12705         
12706         * driver.c (compile_all_methods): Run the compilation in a thread
12707         managed by mono. Fixes #44023.
12708
12709         * mini.c (mono_codegen): Print full method name in verbose output.
12710
12711         * mini-x86.c (mono_arch_patch_code): Fix warning.
12712         
12713         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
12714         jumps, since the method we are jumping to might be domain-specific.
12715
12716         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
12717
12718 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12719
12720         * inssel.brg: string chars are unsigned.
12721
12722 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
12723
12724         * TODO: New todo item.
12725
12726         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
12727         which calls mono_runtime_class_init and patches the call site to
12728         avoid further calls.
12729         (mono_arch_create_class_init_trampoline): New arch specific function 
12730         to create a class init trampoline.
12731         (create_trampoline_code): Generalized so it can create
12732         class init trampolines as well.
12733
12734         * mini.c (helper_sig_class_init_trampoline): New helper variable.
12735         (mono_create_class_init_trampoline): New function to create and cache
12736         class init trampolines.
12737         (mono_find_class_init_trampoline_by_addr): New function to lookup the
12738         vtable given the address of a class init trampoline. Used by the
12739         patching process.
12740         (mono_codegen): Generate a call to a trampoline instead of
12741         mono_runtime_class_init in LDSFLD[A].
12742         (mono_codegen): Add relocations for the new trampoline.
12743         
12744         * mini.h mini-x86.c aot.c: Added a new relocation type: 
12745         MONO_PATCH_INFO_CLASS_INIT.
12746
12747         * mini.h: Bump AOT version number.
12748
12749         * aot.c: Create a copy of the loaded code instead of using the original
12750         so methods which call each other will be close in memory, improving
12751         cache behaviour.
12752         
12753         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
12754         patch since it breaks the regression tests.
12755         
12756         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
12757         for the register saving instruction sequence since the 
12758         frame_state_for function in glibc 2.3.2 don't seem to detect it.
12759
12760 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
12761
12762         * TODO: Fix todo item && remove another.
12763
12764 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
12765
12766         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
12767         previous checkin.
12768
12769         * aot.c: Moved the check for MONO_LASTAOT into the initialization
12770         function of the module.
12771
12772         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
12773         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
12774         --no-aot command line option.
12775
12776 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
12777
12778         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
12779         by Bernie Solomon (bernard@ugsolutions.com).
12780
12781         * inssel.brg: Refactor the interface offset table related code into
12782         its separate functions and add support for the AOT case.
12783
12784 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
12785
12786         * aot.c (mono_aot_get_method_inner): Fix memory leak.
12787         
12788         * aot.c: Added mono_aot_verbose variable and made all debugging
12789         output depend on the value of this variable.
12790
12791         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
12792         method_label and info_label.
12793
12794         * mini.h mini-x86.c aot.c: Added a new relocation type 
12795         MONO_PATCH_INFO_IID for klass->interface_id.
12796
12797         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
12798         the MonoJitInfo structure.
12799
12800         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
12801         a non-root appdomain in shared mode.
12802
12803 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
12804
12805         * aot.c: make aot loader less verbose. Remove free of unused variable.
12806
12807 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
12808
12809         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
12810
12811         * .cvsignore: Added *.dll.
12812
12813         * mini.c (mono_print_tree_nl): New function callable while debugging.
12814
12815         * mini.c (mono_print_code): Export this.
12816
12817         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
12818         patched code.
12819
12820 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
12821
12822         * mini.h (MonoCompile): Added 'jit_info' field.
12823
12824         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
12825         the cfg structure, since it is needed by the AOT compiler.
12826
12827         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12828
12829         * aot.c: A major rewrite. Changes include:
12830         - save exception tables for methods which have them.
12831         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
12832         to g_module_symbol.
12833         - reworked the file format so it is now much smaller and needs
12834         fewer relocation entries.
12835         
12836 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12837
12838         * aot.c (load_aot_module): Fix build bustage on platforms without
12839         Boehm GC.
12840
12841 2003-09-04  Martin Baulig  <martin@ximian.com>
12842
12843         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
12844
12845 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12846
12847         * TODO: Some new optimization ideas.
12848
12849         * aot.c: Move AOT module loading logic here from mono_assembly_open.
12850
12851         * aot.c: Save the optimization flags used to compile the code into
12852         the AOT module.
12853
12854         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
12855         support emitting domain specific code.
12856         
12857         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
12858         no longer domain neutral. It can be made domain neutral by compiling 
12859         with --optimize=shared.
12860
12861         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
12862         between appdomains.
12863
12864         * driver.c mini.h mini.c: New --no-aot debugging option which disables
12865         loading of AOT code.
12866
12867         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
12868         
12869         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
12870         if there is no domain neutrality information.
12871
12872 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
12873
12874         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
12875         format version into the generated library.
12876
12877         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
12878         callee method into the caller since one of them could be shared.
12879
12880         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
12881         system exceptions from AOT code now works.
12882
12883         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
12884         method if it is domain neutral and the callee is not.
12885
12886         * graph.c (cfg_emit_one_loop_level): Fix warning.
12887
12888 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
12889
12890         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
12891         last checkin.
12892
12893 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
12894
12895         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
12896         is needed  by code which is executed before mono_runtime_init ().
12897         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
12898         
12899         * mini.c (mono_thread_abort): Fix warning.
12900         (mono_jit_compile_method): Call static constructor in the AOT case too.
12901
12902         * aot.c (mono_compile_assembly): Fix warning.
12903
12904 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12905
12906         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
12907
12908 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
12909
12910         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
12911
12912         * cpu-pentium.md: Fix the length of call opcodes so they include the
12913         ESP restoring instruction. Fixes #47968.
12914
12915 2003-08-28  Martin Baulig  <martin@ximian.com>
12916
12917         * mini-x86.c (mono_arch_call_opcode): Added support for
12918         MONO_TYPE_GENERICINST.
12919
12920         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
12921
12922 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
12923
12924         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
12925         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
12926
12927         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
12928         metadata_section.
12929
12930 2003-08-26  Martin Baulig  <martin@ximian.com>
12931
12932         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
12933         when reporting an error, set this to the actual error location.
12934         (mono_method_to_ir): Report the correct error location if
12935         get_basic_blocks() returned an error.
12936
12937 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
12938
12939         * mini.c (mono_type_blittable): OBJECT is not blittable.
12940         (mono_method_blittable): Methods which have marshalling descriptors
12941         are not blittable either. Fixes #47842.
12942
12943 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
12944
12945         * driver.c mini.c: Use an environment variable instead of a global 
12946         variable. Also fix the build.
12947
12948         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
12949         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
12950         reporting this. 
12951
12952         * driver.c mini.c: Added --with-valgrind option to turn off some
12953         code which prevents mono from running under valgrind.
12954
12955         * mini.c (mono_emit_call_args): Fixed warning.
12956
12957         * mini.c (mono_emulate_opcode): Fixed warning.
12958
12959 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12960
12961         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
12962         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
12963         regalloc.c, regalloc.h: specify available registers in arch-specific
12964         code and support floats in the regallocator (patch by Laurent Morichetti 
12965         <l_m@pacbell.net>)
12966
12967 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
12968
12969         * mini.c: mono_thread_current() can be called only after
12970         mono_runtime_init(): rearrange code to not call it early on.
12971
12972 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12973
12974         * mini.c: allocate jump tables in the code mempools.
12975
12976 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12977
12978         * mini.c, mini.h: make sure per-thread data allocated by the jit is
12979         freed.
12980
12981 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
12982
12983         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
12984         12 to 16.  This fixes bug #47453.
12985
12986
12987 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12988
12989         * mini-ppc.c: fixed indexed load and unsigned compares.
12990
12991 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
12992
12993         * mini.c: reenabled installation of handler for
12994           thread abort signal.
12995
12996 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12997
12998         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
12999         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
13000         until it's fixed and actually useful.
13001
13002 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13003
13004         * inssel-long32.brg: couple more opcodes implemented.
13005
13006 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
13007         
13008         * mini-sparc.c: Even more opcodes implemeted.
13009
13010 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
13011
13012         * mini-sparc.c: More opcodes implemented.
13013
13014 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
13015
13016         * mini-sparc.c: More opcodes implemented.
13017
13018 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
13019
13020         * inssel-sparc.brg: Add some needed rules.  Direct
13021         copy from PPC.
13022         * Makefile.am: Use inssel-sparc.brg
13023         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
13024         an assert happy for now.
13025
13026 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
13027
13028         * mini-sparc.c: Fixed compile errors.
13029         * exceptions-sparc.c: Same.  We now produce a mono binary 
13030         on sparc-linux.  Yea.
13031
13032 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
13033
13034         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
13035         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
13036         They compile, but do not work.
13037
13038 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13039
13040         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
13041         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
13042         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
13043         (ct@gentoo.org).
13044
13045 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13046
13047         * mini.c: more opcodes implemented and better support for generics.
13048
13049 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
13050
13051         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
13052         * mini.c, mini.h: first cut at generics support: some new instructions 
13053         added and changed the behaviour of some of the existing ones.
13054
13055 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
13056
13057         * mini.c: Removed definition of metadata_shared mutex here.
13058
13059 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
13060
13061         * mini-x86.c: make vararg calls work for instance methods.
13062
13063 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13064
13065         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
13066         returns the arguments in a separte list, now.
13067
13068 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13069
13070         * aot.c, mini.c: updates for array type representation changes.
13071
13072 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
13073
13074         * mini.c: register function to perform jit shutdown.
13075
13076 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13077
13078         * mini.c: use a faster allocator if possible.
13079
13080 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13081
13082         * aot.c: some cleanups and portability changes.
13083
13084 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13085
13086         * mini.c: use faster allocation for CEE_BOX if possible.
13087
13088 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13089
13090         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
13091         Moved inlined mempcy code to its own function so that is can be
13092         reused. Added an inline memset function as well (optimized initobj).
13093         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
13094
13095 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13096
13097         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
13098
13099 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13100
13101         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
13102         arch code can setup the cpu for CLR execution, if needed.
13103         We use it on x86 to set the precision of FP operations.
13104
13105 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13106
13107         * mini.c: disable some optimizations if we can guess they'll cost too
13108         much for a given method.
13109
13110 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13111
13112         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
13113         
13114 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13115         * mini.h mini.c mini-x86.c: Added instruction level coverage 
13116         info collection support.
13117
13118 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13119
13120         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
13121         is now implemented in the profiling API. Get rid of a couple of
13122         unnecessary global variables.
13123
13124 2003-06-15  Nick Drochak <ndrochak@gol.com>
13125
13126         * basic-long.cs: tests for negative values for bigmul, and unsigned.
13127         * cpu-g4.md: add op_bigmul and op_bigmul_un
13128         * cpu_pentium.md: add op_bigmul_un
13129         * inssel-long32.brg: add rule for unsigned bigmul
13130         * mini-ops.h: define OP_BIGMUL_UN
13131         * mini-x86.c: THE BUG: handle (un)signed properly
13132         * mini.c: choose unsigned opcode if needed.
13133         This set of patches fixes bug #44291
13134
13135 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
13136
13137         * mini.c (optimize_branches): improved to handle all kinds of
13138         conditional branches.
13139
13140 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13141
13142         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
13143         don't raise exceptions.
13144
13145 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13146
13147         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
13148         to arch-specific files.
13149
13150 2003-06-09  Martin Baulig  <martin@ximian.com>
13151
13152         * Makefile.am (libs): Added $(LIBGC_LIBS).
13153
13154 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
13155
13156         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
13157         and OP_ATAN (fixes bug#44293).
13158
13159 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
13160
13161         * Makefile.am, mini-x86.c: rename cpu description array to
13162         pentium_desc, since some compilers define the 'pentium' preprocessor
13163         symbol.
13164
13165 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
13166
13167         * mini.c (mini_select_instructions): add explicit branch if the
13168         following block is not the false target of a conditional branch -
13169         we need this with any optimization that reorder or remove bblocks
13170
13171         * mini.c (optimize_branches): bug fixes
13172
13173 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
13174
13175         * mini.c (mono_method_to_ir): inline static readonly fields
13176
13177         * ssa.c (fold_tree): start cfold support for long (very simple
13178         cases only)
13179
13180         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
13181
13182 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13183
13184         * inssel.brg: fixed memcpy (bug #44219).
13185
13186 2003-06-05  Dick Porter  <dick@ximian.com>
13187
13188         * driver.c: Set the glib log levels to not abort if g_message
13189         recurses.
13190
13191         g_set_prgname() has to happen before mini_init() so that the
13192         process handle gets the info.
13193         
13194 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13195
13196         * driver.c: add intrins to the default optimizations to get wider
13197         exposure.
13198
13199 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13200
13201         * mini.h: some large basic blocks will overflow a 16-bit
13202         integers for symbolic registers.
13203
13204 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13205
13206         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
13207         (mono_arch_output_basic_block): fix bug 43499 
13208
13209 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13210
13211         * mini.c: kill duplicated definition of mono_debug_format.
13212
13213 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13214
13215         * mini-x86.c, arrays.cs: fixed register allocation bug.
13216
13217 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13218
13219         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
13220
13221         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
13222
13223 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13224
13225         * mini.c:
13226         (print_method_from_ip): also print source location information if
13227         available.
13228
13229 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
13230
13231         * mini.c (mono_find_block_region): bug fix in region code
13232         (mini_method_compile): enable removing unreachable code again, but
13233         only in methods without exception clauses.
13234
13235 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
13236
13237         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
13238         Implemented arglist opcode and handling of TypedReference type.
13239         Fixed x86 call convention when a structure is returned.
13240         Minimal support for calling static vararg methods.
13241
13242 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
13243
13244         * mini.c (mini_method_compile):  always remove unreachable code,
13245         because the code in them may be inconsistent  (access to dead
13246         variables for example).
13247
13248 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13249
13250         * driver.c, debug-mini.c: warning fixes.
13251
13252 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13253
13254         * Makefile.am, jit.h, mini.h: install header for embedding mono.
13255
13256 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
13257
13258         * mini.c: thread-static fields are registered in mono_class_vtable(),
13259         so ensure the function is called before checking for them.
13260
13261 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
13262
13263         * mini.c (optimize_branches): fix for bug 43586
13264
13265         * jit-icalls.c (mono_llmult_ovf): added an additional check for
13266         overflow (fixes Bug #43639)
13267
13268 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13269
13270         * mini.c, objects.cs: allow the use of stobj for primitive types.
13271
13272 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13273
13274         * mini.c: be less strict about argument checking until we support
13275         running the verifier.
13276
13277 2003-05-27  Nick Drochak <ndrochak@gol.com>
13278
13279         * basic-long.cs: tests for (ulong)int * (ulong)int also
13280         * mini.c: use the same trick for (ulong)int * (ulong)int
13281
13282 2003-05-27  Nick Drochak <ndrochak@gol.com>
13283
13284         * basic-long.cs: add regression test for (long)int * (long)int
13285         * cpu-pentium.md: add op_bigmul specification
13286         * inssel-long32.brg: add OP_BIGMUL rule
13287         * mini-ops.h: add OP_BIGMUL
13288         * mini-x86.c: register allocator: handle case where src1 needs to be
13289         in EAX.
13290         * mini.c: substitute special BIGMUL opcode in the tree for 
13291         (long)int * (long)int
13292
13293 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13294
13295         * jit-icalls.c: call the type ctor on field access if needed.
13296
13297 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13298
13299         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
13300         to a method (including results of ldelema, bug#43207).
13301
13302 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13303
13304         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
13305         colors to show exception handler blocks.
13306
13307         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
13308         (fix for pinvoke7.cs).
13309
13310 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13311
13312         * mini.h, mini.c: ensure correct initialization order for types that
13313         require it. Prepare for lazy compilation of jit icall wrappers.
13314         Provide a name for opcode emulation to reduce unneeded mallocing.
13315
13316 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13317
13318         * mini-x86.c: better register restoring code and profiling
13319         support for tail calls.
13320
13321 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13322
13323         * mini.h, driver.c: prepare for leaf methods optimization.
13324
13325 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13326
13327         * mini.c: get targets of branches before converting a method.
13328
13329 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
13330
13331         * mini.c (optimize_branches): added some experimental code (disbaled) 
13332
13333 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
13334
13335         * mini.c (optimize_branches): fix branch to branch optimization 
13336
13337         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
13338
13339         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
13340
13341         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
13342
13343         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
13344         if needed.
13345
13346 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13347
13348         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
13349         enable use of interface variables again.
13350
13351         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
13352         I1 to registers because there is no simply way to sign extend 8bit
13353         quantities in caller saved registers on x86.
13354
13355         * inssel-float.brg: set costs of some rules to 2 so
13356         that monobure always select the arch. specific ones if supplied,
13357         regardless of the order we pass the files to monoburg.
13358
13359 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13360
13361         * mini.c, mini-x86.c: since the magic trampoline for jumps
13362         can't patch the code directly, we do it as soon as the
13363         method gets compiled.
13364
13365 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13366
13367         * mini-x86.c, mini.h: introduce a new patching method
13368         to support CEE_JMP and tail calls.
13369         * mini.c: obey tail.call. Don't precompile methods target
13370         of CEE_JMP.
13371         * tramp-x86.c: new trampoline code to handle methods
13372         reached through a jump.
13373
13374 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
13375
13376         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
13377         bit values to registers
13378
13379 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
13380
13381         * mini.c (mono_compile_get_interface_var): share interface
13382         variables if possible.
13383
13384 2003-05-16  Martin Baulig  <martin@ximian.com>
13385
13386         * debug-mini.c (mono_init_debugger): New function to initialize
13387         the debugger.  This is not in the debugger since it needs to
13388         access some of mini's internals.
13389
13390 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13391
13392         * mini.c (mono_method_to_ir): inlining fixes/cleanups
13393
13394 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
13395
13396         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
13397         for value type handling.
13398
13399 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13400
13401         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
13402         (mono_method_check_inlining): enable inlining of all kinds of wrappers
13403
13404 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
13405
13406         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
13407           the constructor through a proxy.
13408
13409 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13410
13411         * jit-icalls.c, inssel.brg: fixes to array element address
13412         calculations.
13413
13414 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
13415
13416         * mini-x86.c (is_regsize_var): allocate pointer to registers
13417
13418 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13419
13420         * driver.c: fixed typo, added intrins to the set of optimizations
13421         tested with regressions.
13422
13423 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13424
13425         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
13426         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
13427         test case.
13428
13429 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
13430
13431         * inssel.brg: remove some common pop instructions without side effects
13432
13433 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13434
13435         * inssel-x86.brg: fixed thinko in int to double conversions.
13436
13437 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13438
13439         * mini.c, jit-icalls.c: added runtime thread-static variable support.
13440
13441 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13442
13443         * inssel-long32.brg: two more missing instructions.
13444
13445 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
13446
13447         * mini.c (mono_emit_call_args): set the cil_code for all arguments
13448         if not already set.
13449
13450 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
13451
13452         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
13453         correctly.
13454
13455         * basic-float.cs: Added tests for negative zero.
13456
13457 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13458
13459         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
13460         a couple of missing operations for long casts, with test cases.
13461
13462 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13463
13464         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
13465
13466 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
13467
13468         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
13469         code size estimation.
13470
13471 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
13472
13473         * mini.c (mono_jit_create_remoting_trampoline): make it work with
13474         abstract methods (fix bug 42542)
13475
13476         * aot.c: add ability to handle array types
13477         
13478 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
13479
13480         * mini.c: Call the _specific versions of the object allocation
13481         functions if possible.
13482
13483 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13484
13485         * driver.c: call setlocale ().
13486
13487 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13488
13489         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
13490         windows build.
13491
13492 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
13493
13494         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
13495
13496         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
13497         wrappers (fix bug 42122)
13498
13499 2003-05-04  Martin Baulig  <martin@ximian.com>
13500
13501         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
13502
13503         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
13504         s/mini_set_defaults/mono_set_defaults/g.
13505
13506 2003-05-04  Martin Baulig  <martin@ximian.com>
13507
13508         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
13509
13510 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13511
13512         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
13513         (reported by Don Roberts).
13514
13515 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
13516
13517         * mini.c: temporarily work around two bugs for this release.
13518
13519 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13520
13521         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
13522         that contains -export-dynamic and it makes using the ld script
13523         useless.
13524         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
13525
13526 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13527
13528         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
13529         specific cpu.
13530
13531 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13532
13533         * mini.c: make sure leave calls all the needed finally blocks,
13534         even when the target jumps out of multiple exception clauses.
13535
13536 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13537
13538         * ldscript, Makefile.am: add linker script to reduce the number of
13539         exported symbols (should also fix the issues with libwine defining
13540         some of the same symbols in io-layer).
13541
13542 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
13543
13544         * driver.c (mini_main): Avoid assertion when no file name is given on 
13545         the command line.
13546
13547 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
13548
13549         * driver.c: added --version/-V command line option.
13550         Added the inline optimization in the regression tests.
13551
13552 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13553
13554         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
13555         to the type in the method signature (fixes bug#42134).
13556
13557 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
13558
13559         * mini.c: when inlining, check this is not null only when needed (bug #42135).
13560
13561 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
13562
13563         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
13564
13565 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13566
13567         * driver.c: fixed bug #42100.
13568
13569 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
13570
13571         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
13572
13573 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13574
13575         * mini.c: moved most of the code required to do inlining to its own
13576         function so it can be reused. Inline also ctors if appropriate.
13577
13578 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
13579
13580         * Makefile.am: Link with -export-dynamic so shared libs loaded by
13581         the runtime can call mono API functions.
13582
13583 2003-04-27  Martin Baulig  <martin@ximian.com>
13584
13585         * debug-mini.c (mono_debug_init_method): Added
13586         `guint32 breakpoint_id' argument; if the method has a breakpoint,
13587         send a notification to the debugger.
13588
13589         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
13590         running in the Mono Debugger, just pass the breakpoint number to
13591         mono_debug_init_method().
13592
13593         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
13594
13595 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
13596
13597         * mini.c: allow some more unsafe compares.
13598
13599 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13600
13601         * mini-x86.c, Makefile.am: make distcheck works (partially from
13602         a patch by Richard Lee <r.h.lee@attbi.com>).
13603         * regset.c, regset.h: removed, they are unused.
13604
13605 2003-04-25  Dick Porter  <dick@ximian.com>
13606
13607         * driver.c: Usage reports the name as 'mono' not 'mini'
13608         * exceptions-x86.c: Build and run on freebsd
13609
13610 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13611
13612         * Makefile.am: install the program with the 'mono' name and
13613         the library as libmono instead of mini and libmini.
13614
13615 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13616
13617         * driver.c: provide the APIs for the embedding interface of the old jit.
13618
13619 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
13620
13621         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
13622
13623 2003-04-23  Martin Baulig  <martin@ximian.com>
13624
13625         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
13626
13627         * driver.c: Added `--debug' command line argument to enable
13628         debugging support.
13629
13630 2003-04-23  Martin Baulig  <martin@ximian.com>
13631
13632         * debug.[ch]: Removed.  The code is now in
13633         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
13634
13635         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
13636         last six months.
13637
13638 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
13639
13640         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
13641
13642 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13643
13644         * mini.c:
13645         (mini_cleanup): moved mono_runtime_cleanup call after the call to
13646         mono_domain_finalize.
13647         (mini_method_compile): use mono_method_profile* if the the option is
13648         enabled.
13649
13650 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
13651
13652         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13653         methods with their wrapper.
13654
13655         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13656         methods with their wrapper.
13657
13658         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
13659         their wrapper.
13660
13661         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
13662         wrapper.
13663
13664         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
13665         methods.
13666
13667 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
13668
13669         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
13670
13671 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
13672
13673         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
13674         of the mempool. This is slightly faster and uses less memory
13675
13676 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13677
13678         * mini.c: avoid O(n) allocation for variables.
13679
13680 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13681
13682         * mini.c: handle items on the stack after inlining methods.
13683
13684 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13685
13686         * mini.c: make the method->opcode optimization dependent
13687         on MONO_OPT_INSTRINS and do it lazily.
13688
13689 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13690
13691         * driver.c: print overall results at the end of regression run.
13692
13693 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13694
13695         * inssel.brg: don't overwrite symbolic registers.
13696
13697 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13698
13699         * inssel-x86.brg: fix conversion from long to float.
13700
13701 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
13702
13703         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
13704
13705 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
13706
13707         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
13708
13709         * driver.c: Added --print-vtable option as in the old JIT.
13710
13711 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13712
13713         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
13714
13715 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13716
13717         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
13718
13719 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
13720
13721         * mini.c regalloc.c regalloc.h: Fix memory leak.
13722
13723 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
13724
13725         * aot.c (mono_aot_get_method): register all used strings
13726
13727 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13728
13729         * mini.c: always intern strings references with ldstr at compile time.
13730
13731 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13732
13733         * Makefile.am: add BUILT_SOURCES.
13734
13735 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13736
13737         * driver.c: give a better error message when the assembly to execute
13738         doesn't have an entry point.
13739
13740 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
13741
13742         * Makefile.am: added hack for automake
13743
13744         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
13745         correct sematics.
13746
13747         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
13748
13749 22003-04-07  Martin Baulig  <martin@ximian.com>
13750
13751         * Makefile.am: Added Makefile.am.
13752
13753         * debugger-main.c: Removed, this is now in the debugger where it
13754         belongs.
13755
13756         * mini.pc.in: Call this package `mini' for the moment.
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766