Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
[mono.git] / mono / mini / ChangeLog
1
2 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
3
4         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
5         from embedding applications.
6
7 2008-06-02  William Holmes  <billholmes54@gmail.com>
8
9         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
10           reserving 32 bytes on the stack when making calls. 
11
12         Contributed under MIT/X11 license.
13
14 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
15
16         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
17         the linear IL branch.
18
19         * driver.c: Print out more information for --version on arm.
20
21 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
22
23         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
24         bb_exit instead, since out of line bblocks might not actually be emitted
25         out-of-line.
26         
27         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
28         maximum epilog size for out of line bblocks if tracing is enabled.
29
30         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
31
32 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
33
34         * arrays.cs: Regression tests for allocating arrays with negative sizes.
35
36 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
37
38         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
39         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
40         opcodes.
41
42 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
43
44         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
45         the 'value' to store is a constant.
46
47         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
48
49         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
50         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
51
52 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
53
54         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
55         for accessing method->generic_container.
56
57 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
58
59         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
60         
61         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
62
63         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
64
65         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
66         fails.
67
68 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
69
70         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
71
72         * mini.c: Handle the case when mono_class_vtable () fails.
73
74 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
75         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
76         the stat profiler.
77
78 2008-05-22  Mark Probst  <mark.probst@gmail.com>
79
80         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
81         together with domain sharing.
82
83 2008-05-22  Mark Probst  <mark.probst@gmail.com>
84
85         * mini.c: Treat callvirts to final methods like non-virtual calls
86         when doing generic sharing, i.e. look them up in the runtime
87         generic context.
88
89 2008-05-22  Mark Probst  <mark.probst@gmail.com>
90
91         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
92         with computed types (for generic sharing).
93
94         * mini.c: Generic sharing for mkrefany and refanyval.
95
96 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
97
98         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
99         possible.
100
101         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
102         the generic sharing code.
103         
104         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
105         when needed.
106
107 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
108
109         * mini.h: Remove the declaration of mono_aot_init_vtable ().
110
111 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
112
113         * driver.c: updated copyright date
114
115 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
116
117         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
118         needed.
119
120 2008-05-19  Martin Baulig  <martin@ximian.com>
121
122         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
123         pointing to the new `_mono_debug_using_mono_debugger' variable.
124
125         * driver.c
126         (mono_main): Check mono_debug_using_mono_debugger() rather than
127         the `MONO_INSIDE_MDB' environment variable to check whether we're
128         inside the debugger.
129
130 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
131
132         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
133         argument.
134
135 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
136
137         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
138
139         * mini.c: Added mini_assembly_can_skip_verification. This
140         function checks if the assembly requested to skip verification. 
141         Fixes part of #387274.
142
143 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
144
145         * mini.c (mini_get_method): Disable the check for open generic classes when
146         using generic sharing.
147
148         * generics.cs: Add a test #387034.
149
150         * mini.c (mini_get_method): Check whenever the method class is an open generic
151         type, and return NULL in that case, causing a verification error. Fixes
152         #384123.
153
154 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
155
156         * driver.c (mono_main): Revert r102623. The right
157         thing to do is to enable the verifier under verifiable
158         unless a --security flag was passed.
159
160         We need this non-trivial behavior for --verify-all otherwise
161         mcs-compileall won't be able to use it. As it needs everything to
162         be verified under validil.
163
164 2008-05-06  Martin Baulig  <martin@ximian.com>
165
166         Fix #383749.
167
168         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
169         (mono_debugger_thread_cleanup): Likewise.
170         (mono_debugger_extended_notification): Likewise.
171
172 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
173
174         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
175         against both inflated and non-inflated methods. We need to check against the
176         generic definition for cases where the instantiated method is not visible.
177         We need to check against the inflated types for cases where the instantiation
178         changes any super type. This fixes #382986.
179
180         Note that this doesn't need to be applied to other parts of mono_method_to_ir
181         that check for visibiliy as generic params only appears as the type subject
182         of tokens on call opcodes. Field manipulation and ldftn must always
183         target an exact type.
184
185 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
186
187         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
188         if no related --security flag is passed.
189
190 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
191
192         * mini-arch.h: Prepare support for ppc64.
193
194         Contributed under MIT/X11 license.
195
196 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
197
198         * aot-runtime.c: Prepare support for ppc64.
199
200         Contributed under MIT/X11 license.
201
202 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
203
204         * mini-ops.h: Prepare support for ppc64.
205
206         Contributed under MIT/X11 license.
207
208 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
209
210         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
211
212         Contributed under MIT/X11 license.
213
214 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
215
216         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
217         assemblies, since aot_name is not a full path, causing us to load MS.NET 
218         assemblies on windows.
219
220 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
221
222         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
223         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
224         * main.c: Use UTF-8 encoded command line instead of Windows default code
225         page on Windows to support Unicode.
226         * driver.c (DllMain): New function for mixed-mode assembly support.
227         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
228         export __stdcall functions without decoration.
229
230         Contributed under MIT/X11 license.
231
232 2008-04-28  Mark Probst  <mark.probst@gmail.com>
233
234         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
235         saving it very early.
236
237 2008-04-28  Mark Probst  <mark.probst@gmail.com>
238
239         * mini.h, mini.c: Lots of code for accessing the old RGCTX
240         deleted.  The only way to access the new RGCTX is via the
241         trampline.
242
243         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
244         vtable instead of the RGCTX to static methods.
245
246         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
247         accessing the new RGCTX.
248
249         * generic-sharing.c: There is no separation between self, type
250         arguments and other types in the RGCTX anymore.
251
252 2008-04-25  Jonathan Chambers <joncham@gmail.com>
253
254         * mini-amd64.c (add_general): Remove previous stack adjustment.
255         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
256         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
257         for 32 bytes of stack space reserved for all calls.
258         
259         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
260         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
261         adjustment.
262         
263         Code contributed under MIT/X11 license.
264
265 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
266
267         * mini.c (mini_method_verify): Only verify non-inflated methods, check
268         against the root definition, peeling out method and type instantiations.
269         Cache verify success results, code that fails verification is still
270         checked multiple times.
271
272 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
273
274         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
275
276 2008-04-23  Jonathan Chambers <joncham@gmail.com>
277
278         * mini-amd64.c (add_general): Always increment stack on Win64.
279         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
280         on Win64.
281         
282         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
283         stack based argument handling on Win64.
284         
285         Code contributed under MIT/X11 license.
286
287 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
288
289         * Makefile.am (version.h): Add support for git-svn.
290
291 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
292
293         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
294         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
295         avoiding allocations and libc functions which might deadlock.
296         
297         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
298         'no-gdb-backtrace' option is set.
299
300         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
301
302         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
303
304 2008-04-21  Martin Baulig  <martin@ximian.com>
305
306         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
307         and `get_lmf_addr'; `notification_address' is no longer a pointer.
308
309 2008-04-21  Martin Baulig  <martin@ximian.com>
310
311         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
312         `thread_vtable', `event_handler_ptr' and `event_handler'.
313
314 2008-04-21  Martin Baulig  <martin@ximian.com>
315
316         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
317         allows delayed initialization of the `executable_code_buffer' when
318         attaching.
319
320 2008-04-21  Martin Baulig  <martin@ximian.com>
321
322         * mini.h (mono_debugger_create_notification_function): Removed.
323         * tramp-*.c (mono_debugger_create_notification_function): Removed.
324
325         * mdb-debug-info64.s
326         (MONO_DEBUGGER__notification_function): Added this in the .text section.
327
328         * mdb-debug-info32.s
329         (MONO_DEBUGGER__notification_function): Added this in the .text section.
330
331         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
332         currently only works on x86 and x86_64, so don't create it on ppc.
333
334 2008-04-21  Martin Baulig  <martin@ximian.com>
335
336         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
337
338         * mini.c
339         (mini_method_compile): In the fp elimination check, check
340         `debug_options.mdb_optimizations' in addition to
341         mono_debug_using_mono_debugger().       
342
343         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
344         disable some JIT optimizations which are only disabled when
345         running inside the debugger.
346         Added `--help-debug' option to describe the debugging options.
347         (parse_debug_options): New static function to parse the `--debug'
348         options, so we can easily add more stuff in future.
349
350 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
351
352         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
353         the method has no body.
354
355 2008-04-19  Jonathan Chambers <joncham@gmail.com>
356
357         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
358         assembly is not allowed in MSVC 64-bit compiler. 
359         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
360         as we get floating point exceptions everywhere.
361         
362         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
363         correctly align arguments for call to throw_exception.
364         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
365         
366         Code contributed under MIT/X11 license.
367
368 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
369
370         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
371
372 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
373
374         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
375
376         * mini-amd64.c (NEW_INS): Set cil_code.
377
378         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
379         from mini-amd64.c so all debugger related logic is in one place.
380
381         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
382         later won't have a random ip assigned to them.
383
384 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
385
386         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
387         the arch specific function initializes code_size.
388         (mono_create_delegate_trampoline): Ditto.
389
390         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
391         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
392         platforms.
393
394         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
395         running under the debugger.
396
397         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
398         debugger.
399
400         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
401         debugger. Also move the disabling of optimizations here from driver.c.
402         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
403         debugger.
404
405         * mini.h (MonoCompile): Add a few new flags.
406
407 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
408
409         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
410         so the cil_code field of created MonoInst's is properly set.
411         (mini_select_instructions): Ditto.
412
413         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
414         (MONO_INST_NEW_CALL): Ditto.
415
416         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
417         in many places so the ins->cil_code field is properly initialized.
418
419         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
420         place.
421
422 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
423
424         * mini.c (mini_method_compile): Print a different message when compiling a 
425         shared method.
426         
427         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
428         > 1.
429
430 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
431
432         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
433         SSE2 instructions.
434
435         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
436         
437 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
438
439         * mini.c (handle_stack_args): Make this return void since its return value was
440         never used. Also set cfg->unverifiable for invalid IL instead of calling
441         G_BREAKPOINT ().
442
443 2008-04-10  Mark Probst  <mark.probst@gmail.com>
444
445         * mini.c: Make sure "this" is live in catch clauses with type
446         variables in shared generic code.
447
448 2008-04-08  Mark Probst  <mark.probst@gmail.com>
449
450         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
451         generic_class_is_reference_type() to ensure the proper behaviour
452         when sharing generic code and the type in question is a type
453         argument.
454
455 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
456
457         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
458         race conditions when printing thread dumps. Fixes #377738.
459
460 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
461         
462         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
463         shows up when both MonoInst arguments can cause aliasig.
464         There is likely no way in the current JIT to trigger this problem, but
465         it showed up in the development of generics sharing, when in a new
466         opcode both args of an OP_GROUP can be aliases (addresses of a local).
467         When the generics sharing code will be committed, its tests will be
468         valid also for this bug.
469
470 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
471
472         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
473         PATCH_INFO_METHOD.
474
475         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
476         NULL.
477
478 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
479
480         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
481         use a more detailed exception message for InvalidCastException.
482
483         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
484
485         * driver.c (mono_main): Add --debug=casts option to turn on better 
486         InvalidCastException message details.
487
488         * mini.c (mini_get_debug_options): New helper function to return the address of
489         the debug_options variable.
490
491         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
492         the jit_tls TLS variable.
493
494         * mini.c (mono_jit_tls): New TLS variable.
495
496         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
497         option is used.
498
499 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
500
501         * mini.h: Removed verifer related stuff. This code was moved to verify.c
502
503         * mini.c: Removed verifer related stuff, code moved to verify.c.
504
505         * driver.c: Using code from verify.c instead of mini.c.
506
507 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
508
509         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
510         longer valid.
511
512 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
513
514         * mini.c (check_for_method_verify): Enabling verification of
515         corlib if mono_verify_all is set. Bugs in the verifier preventing that
516         have been fixed.
517
518 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
519
520         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
521         caller saved registers as well.
522         
523         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
524         saved registers as well.
525
526 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
527
528         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
529
530         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
531         code.
532
533 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
534
535         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
536         to get_call_info.
537         (get_call_info): Take a gsctx argument instead of 'cfg'.
538
539 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
540
541         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
542         mono_verify_all is set.
543
544         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
545
546         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
547
548 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
549
550         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
551         an exception.
552
553         * driver.c mini.c mini.h: Add a --verify-all development option to test the
554         verifier and the code generated by the compiler.
555
556 2008-03-25  Mark Probst  <mark.probst@gmail.com>
557
558         * mini.c: Generic sharing of the non-nullable case of the box
559         instruction.
560
561 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
562
563         * inssel.brg: Fix the build.
564
565         * iltests.il.in: Add a test for lconv.ovf.u8.un.
566
567 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
568
569         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
570         Array:Address. Fixes #372410.
571
572         * iltests.il.in: New tests for readonly prefix.
573
574 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
575
576         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
577         mini-trampolines.c.
578
579         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
580         mini-exceptions.c.
581
582         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
583         
584         * mini.c (mono_decompose_op_imm): New helper function.
585
586         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
587         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
588         return value.
589
590         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
591         mono_arch_output_basic_block. Fix warnings.
592
593         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
594         for now.
595
596 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
597
598         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
599         since the extra frame is now detected automatically inside the loop.
600
601         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
602         opts which are now in mono_peephole_ins ().
603         
604         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
605
606         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
607         frames and skip duplicate managed-to-native frames. Fixes #367665.
608
609         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
610         opts which are now in mono_peephole_ins ().
611         (mono_arch_peephole_pass_2): Ditto.
612
613         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
614
615         * mini-codegen.c (mono_peephole_ins): New helper function containing the
616         arch independent peephole optimizations.
617
618         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
619         opts which are now in mono_peephole_ins ().
620
621         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
622         
623         * mini-s390.c (mono_arch_output_basic_block): Fix build.
624
625         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
626         pattern.
627
628         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
629         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
630         opcode. 
631
632 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
633
634         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
635         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
636         return value.
637
638         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
639         mono_arch_output_basic_block. Fix warnings.
640
641 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
642
643         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
644         conv.ovf.u.un.
645
646 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
647
648         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
649         conv.ovf.u.un.
650
651         * iltests.il: Add new tests.
652
653 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
654
655         * mini.c: Removed Windows version macros.
656
657 2008-03-20  Mark Probst  <mark.probst@gmail.com>
658
659         * generic-sharing.c: Put reflection types in the extensible part
660         of the runtime generic context.
661
662         * mini.c: Generic sharing of the GetTypeHandle special case of the
663         ldtoken instruction.
664
665 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
666
667         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
668
669         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
670         
671         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
672         consistency with the other version on the linear IR branch.
673
674         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
675
676         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
677
678         * iltests.il.in: Add new tests.
679
680 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
681
682         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
683
684         * iltests.il.in: Add new tests.
685
686 2008-03-19  Mark Probst  <mark.probst@gmail.com>
687
688         * mini.c: Two variables with the same name were declared in
689         nesting contexts and one wasn't initialized.  Fixed.
690
691 2008-03-19  Mark Probst  <mark.probst@gmail.com>
692
693         * mini.c: Generic sharing of the initobj instruction.
694
695 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
696
697         * mini.c: make the test to optimize ldtoken from typeof() more
698         precise.
699
700 2008-03-18  Mark Probst  <mark.probst@gmail.com>
701
702         * mini.c: Generic sharing of the initobj instruction for reference
703         types.
704
705 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
706
707         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
708         the mono_breakpoint_clean_code() code to perform bound checks.
709
710 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
711
712         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
713         mono_arch_patch_callsite() to include the start of the managed method
714         to be able to perform bound checks.
715
716 2008-03-17  Mark Probst  <mark.probst@gmail.com>
717
718         * mini.c: Generic sharing for the isinst instruction.
719
720 2008-03-17  Mark Probst  <mark.probst@gmail.com>
721
722         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
723         inssel-long32-mips.brg: Added opcodes for doing indirect calls
724         with the runtime generic context argument.
725
726         * mini.c: Share calls to several types of unsharable methods by
727         putting the address of the method code in the runtime generic
728         context and doing an indirect call.
729
730         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
731         to switches.
732
733 2008-03-16  Mark Probst  <mark.probst@gmail.com>
734
735         * generic-sharing.c: Change due to a change in the runtime genric
736         context API.
737
738 2008-03-15  Martin Baulig  <martin@ximian.com>
739
740         * tramp-x86.c
741         (mono_arch_nullify_class_init_trampoline): Add call to
742         mono_breakpoint_clean_code() to make things work when running
743         inside the debugger.
744
745         * tramp-amd64.c
746         (mono_arch_nullify_class_init_trampoline): Add call to
747         mono_breakpoint_clean_code() to make things work when running
748         inside the debugger.
749
750 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
751
752         * inssel-long.brg (reg): Fix 64 bit build.
753
754 2008-03-14  Mark Probst  <mark.probst@gmail.com>
755
756         * mini.c, mini.h: Share static generic code by passing it an
757         implicit argument pointing to the runtime generic context.
758
759         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
760         inssel-long32-mips.brg: New opcodes for calling shared static,
761         which need to be passed the runtime generic context.
762
763         * mini-amd64.c, mini-x86.c: Save the runtime generic context
764         argument on the stack in the prologue if needed.  New function for
765         finding the runtime generic context argument from the registers
766         saved by the trampoline.
767
768         * mini-amd64.h, mini-x86.h: Specify which register to use for the
769         runtime generic context argument.
770
771         * tramp-amd64.c: Also restore the register used for the runtime
772         generic context argument.
773
774         * mini-trampoline.c: Resolve shared static calls by consulting the
775         runtime generic context via the new argument.
776
777         * generic-sharing.c: Add an argument to sharability-checking
778         functions that specifies whether type variables should be treated
779         as sharable type arguments.
780
781         * inssel-x86.brg: Removed a superfluous, buggy rule.
782
783         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
784         to switches.
785
786 2008-03-14  Martin Baulig  <martin@ximian.com>
787
788         * debug-debugger.c (main_thread_handler): Call
789         mono_runtime_run_main() without sending any notifications.
790
791         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
792
793 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
794
795         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
796
797 2008-03-14  Mark Probst  <mark.probst@gmail.com>
798
799         * tramp-x86.c: Fixed register restore offsets in the trampoline
800         code for ECX and EDX.
801
802 2008-03-12  Geoff Norton  <gnorton@novell.com>
803
804         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
805         different ucontext_t implementations.
806         * exceptions-arm.c: Use the above defines to get exceptions working on 
807         iPhone (based on a patch by Luke Howard lukeh@padl.com)
808         * mini-arm.c: Implement iPhone icache support (based on a patch by
809         Luke Howard lukeh@padl.com)
810
811 2008-03-12  Mark Probst  <mark.probst@gmail.com>
812
813         * mini.c: Enable generic sharing of calls to non-static
814         non-interface non-generic non-value-type methods.
815
816         * mini-trampolines.c: Resolve calls from shared generic code.
817
818 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
819
820         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
821
822         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
823
824 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
825
826         * mini.c: some fixes for the AOT compiler.
827
828 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
829
830         * cpu-amd64.md: Add clob:1 to some float opcodes.
831
832 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
833
834         * mini.h: Added MiniVerifierMode enumeration.
835
836         * mini.c: Added mini_verifier_set_mode to control
837         the usage of the new verifier.
838
839         * mini.c (mono_method): Integrated the new verifier.
840
841         * driver.c: Extended --security option with validil and
842         verifiable options to activate the new verifier.
843
844 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
845
846         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
847         optimization to ctors taking 0 or 2 arguments too.
848
849         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
850         a bit.
851
852         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
853
854         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
855
856 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
857
858         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
859         non-aot case as well.
860
861         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
862
863         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
864         changes.
865
866         * aot-compiler.c (encode_patch): Ditto.
867
868         * mini.h (G_MININT32): Fix the definition of this.
869
870 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
871
872         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
873
874         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
875
876 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
877
878         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
879         methods returning vtypes in registers.
880         (mono_arch_allocate_vars): Ditto.
881
882         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
883
884         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
885
886         * generics.cs: Add a test from the linear IR branch.
887
888         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
889
890         * mini.c (inline_method): Cache failed inline attempts.
891
892 2008-03-04  Mark Probst  <mark.probst@gmail.com>
893
894         * mini.c: For shared methods of generic classes put the location
895         of "this" into the MonoGenericJitInfo.
896
897         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
898         register out of a MonoContext by register number.  Add the generic
899         sharing context as an argument to mono_arch_find_this_argument().
900
901         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
902         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
903         for new arch function.
904
905         * mini-exception.c: Handle open exception clauses in shared
906         generic code.
907
908         * mini-trampolines.c: Supply additional argument to
909         mono_arch_find_this_argument().
910
911 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
912
913         * Makefile.am (regtests): Run the bench.exe tests last.
914
915 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
916
917         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
918         a bit.
919
920 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
921
922         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
923         with MS.
924
925         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
926         
927         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
928
929         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
930         whose class has no cctor.
931
932         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
933
934 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
935
936         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
937         unverified.
938
939 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
940
941         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
942         to be in sync with the code on the linear IR branch.
943
944         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
945
946         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
947
948 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
949
950         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
951
952         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
953
954         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
955
956         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
957
958         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
959         
960         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
961         body.
962
963 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
964
965         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
966         OP_LOADR4_MEMBASE emission.
967
968         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
969         (mono_spillvar_offset_float): Ditto.
970
971         * mini-mips.c (mono_arch_emit_prolog): Ditto.
972
973         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
974         emission.
975
976         * basic-long.cs: Add regression tests for them.
977
978         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
979         use.
980         (mono_arch_allocate_vars): Fix representation of single-precision float
981         argument.
982         (mono_arch_output_basic_block): Ditto.
983
984         * inssel-mips.brg: Ditto, remove duplicate items.
985
986         * mini-mips.c (emit_load_volatile_arguments): New function to handle
987         arguments of tail calls as on other platforms.
988         (mono_arch_output_basic_block): Handle tail calls.
989
990         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
991         register.
992
993         * objects.cs (test_5_pass_static_struct): Add test for it.
994
995         Contributed under MIT/X11 license.
996
997 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
998
999         * Makefile.am: Use gmcs for compiling the regression tests.
1000
1001         * *.2.cs *.2.il: Rename to *.cs and *.il.
1002
1003 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
1004
1005         * regalloc.h: Make the vassign array smaller.
1006
1007         * mini.c (mini_method_compile): Remove an unused field in cfg.
1008
1009         * mini-codegen.c: Add a bunch of micro optimizations.
1010
1011 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
1012
1013         * regalloc.h: Remove some unused fields.
1014
1015 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
1016
1017         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
1018
1019         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
1020
1021 2008-02-22  Mark Probst  <mark.probst@gmail.com>
1022
1023         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
1024
1025         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
1026         trampoline: Fetch an entry from the runtime generic context.  If
1027         it's NULL, jump to the actual trampoline to fill the runtime
1028         generic context.  Otherwise, return it.
1029
1030         * mini.c: Call the lazy fetch trampoline to get entries out of the
1031         runtime generic context.
1032
1033         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
1034         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
1035         tramp-sparc.c: Stubs for the lazy fetch trampoline.
1036
1037 2008-02-21  Mark Probst  <mark.probst@gmail.com>
1038
1039         * mini.c: Fetch data out of the extensible part of the runtime
1040         generic context instead of calling a helper function.
1041
1042         * generic-sharing.c: Some functions moved into
1043         metadata/generic-sharing.c.  Helper function for fetching other
1044         types now checks and asserts against extensible rgctx (just for
1045         debugging purposes - the helper function isn't called anymore
1046         unless for debugging).
1047
1048 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1049
1050         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
1051         for tail calls up to the point that the tests in iltests.exe run. Also add a
1052         dummy CKFINITE implementation.
1053         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
1054         needed for trampoline LMF frames.
1055
1056         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
1057         trampoline LMF frames.
1058
1059 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
1060
1061         * mini.c (inline_method): clean any pending loader error when inlining fail.
1062         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
1063
1064 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1065
1066         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
1067
1068         * aot-runtime.c (decode_patch_info): Ditto.
1069
1070         * mini.c (mono_resolve_patch_target): Ditto.
1071         
1072         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
1073         icall wrappers.
1074
1075         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
1076         
1077         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
1078         if it references an icall address.
1079
1080 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
1081
1082         * cpu-s390x.md: Remove some more unused opcodes.
1083         
1084         * cpu-s390x.md: Remove some unused opcodes.
1085
1086         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
1087         mono_op_imm_to_op ().
1088
1089         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
1090         instead of a switch statement.
1091         
1092         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
1093         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
1094
1095         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
1096         
1097         * mini-codegen.c: Remove unused mono_regstate2_... functions.
1098
1099         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
1100         -1.
1101
1102 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
1103
1104         * driver.c (mono_main): Improve error reporting when an assembly cannot be
1105         opened. Fixes #362607.
1106
1107         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
1108
1109         * iltests.il.in: Add a test for static methods in interfaces.
1110
1111 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
1112
1113         * genmdesc.c (build_table): Fix a crash on older glib versions.
1114
1115         * cpu-sparc.md: Remove some unused opcodes.
1116         
1117         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
1118         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
1119
1120         * cpu-amd64.md: Remove some unused opcodes.
1121
1122         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
1123         like the other opcodes.
1124
1125 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
1126
1127         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
1128
1129         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
1130
1131         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
1132         variables 'cfg' instead of 'm' for consistency.
1133
1134         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
1135
1136         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
1137         argument holding the vtype return address, to avoid the ambigious use of
1138         cfg->ret for this purpose.
1139
1140         * mini.c (NEW_RETLOADA): Use vret_addr if set.
1141
1142         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
1143         
1144         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
1145         new mono_print_ins () function which only takes one argument.
1146
1147 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
1148
1149         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
1150         macro arguments.
1151
1152 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
1153
1154         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
1155
1156         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
1157
1158         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
1159         opcodes and other small changes.
1160
1161         * mini-ops.h: Add some new opcodes from the linear IR branch.
1162
1163         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
1164
1165         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
1166         opcodes, use the REG_MEMBASE opcodes instead.
1167         
1168         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
1169         opcodes, use the REG_MEMBASE opcodes instead.
1170         
1171         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
1172         linear IR branch.
1173
1174         * mini.c (mono_op_imm_to_op): New helper function.
1175
1176         * mini-ops.h: Add some opcodes from linear IR branch.
1177
1178 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
1179
1180         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
1181         <tsv@solvo.ru>.
1182
1183 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
1184
1185         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
1186         OP_ICONV_TO_R4/R8.
1187
1188         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
1189
1190 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
1191
1192         * aot-compiler.c (emit_method_code): Add an assert.
1193
1194         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
1195         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
1196         methods.
1197
1198 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
1199
1200         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
1201         some load/store opcodes so they are consistent. 
1202         (mono_arch_emit_prolog): Simplify some code.
1203
1204         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
1205
1206         * objects.cs: Add tests for large argument offsets on ARM.
1207
1208         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
1209         stack offsets. Fixes #359651.
1210
1211         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
1212
1213         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
1214
1215         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
1216
1217         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
1218
1219         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
1220
1221         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
1222         rid of CEE_CONV_R_UN.
1223
1224         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
1225
1226 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
1227
1228         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
1229
1230         * mini.c (mono_normalize_opcodes): Add some more opcodes.
1231
1232         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
1233
1234         * cpu-amd64.md: Remove some unused opcodes.
1235
1236         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
1237
1238         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
1239
1240         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
1241         arch specific functions for its parts. Call the peephole pass after local
1242         regalloc so the prolog can compute a more accurate max_offset.
1243         
1244         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
1245         the corresponding OP_I/OP_L opcodes.
1246
1247         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
1248
1249         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
1250
1251 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1252
1253         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
1254         as they are handled in mini.c.
1255
1256         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
1257         
1258         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
1259         case since it is handled in mini.c.
1260
1261         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
1262
1263         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
1264
1265         * *.c: Use the new opcodes in the IR and back end code.
1266
1267         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
1268
1269         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
1270
1271 2008-02-06  Mark Probst  <mark.probst@gmail.com>
1272
1273         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
1274         an assert because it has a race condition.
1275
1276 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1277
1278         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
1279
1280         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
1281
1282         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
1283
1284         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
1285         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
1286
1287 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
1288
1289         * cpu-amd64.md (move): Correct the maximum size of move.
1290
1291 2008-02-05  Mark Probst  <mark.probst@gmail.com>
1292
1293         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
1294         the generic class init trampoline to return quickly if the class
1295         is already inited.
1296
1297 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
1298
1299         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
1300         issues where an 32 bit callsite cannot be patched by a 64 bit address.
1301
1302 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
1303
1304         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
1305         branch.
1306
1307 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
1308
1309         * objects.cs: Add some soft-float tests.
1310
1311         * mini.c: Fix a couple more soft-float issues.
1312
1313         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
1314
1315         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
1316         avoid a REX prefix.
1317
1318 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
1319
1320         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
1321         exception happens while compiling a virtual method.
1322
1323 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
1324
1325         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
1326         
1327         * mini-sparc.c: Fix build.
1328
1329         * mini-sparc.c (get_call_info): Add support for generic sharing.
1330
1331         * mini-exceptions.c: Add a FIXME.
1332
1333 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
1334
1335         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
1336         altstack handling code.
1337
1338         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
1339         
1340         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
1341
1342         * mini-s390.c: Add support for generic sharing.
1343
1344         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1345         Fix CAS on s390.
1346         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1347
1348         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
1349
1350         * mini-s390x.c: Add support for generic sharing.
1351         
1352         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1353         Fix CAS on ia64.
1354         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1355
1356         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
1357         can be used since it takes a 16 bit signed immediate.
1358
1359         * inssel-s390x.brg: Fix OP_SETRET.
1360
1361         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
1362
1363         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
1364
1365         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
1366
1367         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
1368
1369         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
1370         in one place.
1371
1372         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
1373         stuff.
1374
1375         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
1376         of the unused mono_arch_patch_delegate_trampoline stuff.
1377
1378 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
1379
1380         * basic-long.cs: Move the fp related tests to basic-float.cs.
1381
1382         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
1383
1384         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
1385
1386         * basic-calls.cs: Add a test for proper float argument passing.
1387
1388         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
1389         if the context corresponds to an exception received through a signal.
1390
1391         * exceptions.cs: Add a test for nullref handling at the start of a try
1392         clause.
1393
1394         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
1395
1396         * jit-icalls.c (mono_break): New JIT icall.
1397
1398         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
1399
1400         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
1401
1402 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
1403
1404         * cpu-*.md: Get rid of unused opcodes.
1405
1406         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
1407
1408         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
1409         by all platforms.
1410
1411         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
1412         define.
1413
1414         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
1415         the arch independent trampoline code in mini-trampolines.c.
1416
1417         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
1418
1419         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
1420
1421         * mini-s390.h: Remove an unused define.
1422         
1423         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
1424         the arch independent trampoline code in mini-trampolines.c.
1425
1426         * mini-arm.c (mono_arch_emit_prolog): Fix build.
1427
1428 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
1429
1430         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
1431
1432         * mini-s390.c (mono_arch_emit_prolog): Fix build.
1433
1434         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
1435
1436         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
1437
1438         * cpu-amd64.md: Use smaller sizes for int opcodes.
1439
1440         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
1441
1442         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
1443         objects.cs.
1444
1445         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
1446         debugging.
1447
1448         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
1449         instead of though a pointer to save an indirection when accessing elements of
1450         the array.
1451
1452         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
1453         some typos.
1454         (NOT_IMPLEMENTED): New helper macro.
1455         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
1456         of a bb.
1457
1458         * *.c: Use the new helper macro.
1459
1460 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
1461
1462         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
1463
1464 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
1465
1466         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
1467         stack slots.
1468
1469 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
1470
1471         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
1472         profiling is enabled.
1473         
1474         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
1475         the end.
1476         (mono_arch_emit_prolog): Add more first bblock optimizations.
1477
1478         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
1479         in order if possible.
1480         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
1481         bblock, since the arguments are still in their original registers.
1482
1483         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
1484
1485 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
1486
1487         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
1488         as well.
1489
1490         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
1491         offset 0.
1492
1493         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
1494
1495         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
1496         process async exceptions received while in unmanaged code.
1497
1498         * mini.c (mini_init): Install a callback with the runtime which will be called
1499         when a thread receives an async exception while in unmanaged code.
1500
1501         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
1502
1503         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
1504
1505 2008-01-16  Wade Berrier  <wberrier@novell.com>
1506
1507         * cpu-g4.md:
1508         * cpu-arm.md:
1509         * cpu-s390x.md:
1510         fix build
1511
1512 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
1513
1514         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
1515         compilation with sun cc.
1516
1517         * cpu-*.md: Fix the build.
1518
1519         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
1520
1521         * mini-amd64.h: Add some comments to the MonoLMF structure.
1522
1523         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
1524         
1525         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
1526         in the LMF structure if possible. This saves two instructions in the
1527         managed->native wrappers.
1528
1529         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
1530
1531 2008-01-16  Mark Probst  <mark.probst@gmail.com>
1532
1533         * generic-sharing.c: New type argument lookup code which uses the
1534         runtime generic context template.
1535
1536 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
1537
1538         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
1539
1540         * mini-arm.c (add_general): Fix arm eabi parameter passing.
1541         (mono_arch_output_basic_block): Fix localloc implementation.
1542
1543         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
1544
1545         * mini-ia64.c (peephole_pass): Fix ia64 build.
1546
1547         * mini-amd64.c (peephole_pass): Fix a warning.
1548         
1549         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
1550         at a constant offset from sp/fp.
1551
1552         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
1553         instead of obtaining it from *lmf in the managed method case.
1554
1555 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
1556
1557         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
1558
1559 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
1560
1561         * mini.h (MonoInstList): New type.
1562         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
1563         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
1564         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
1565         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
1566         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
1567         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
1568         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
1569         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
1570         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
1571         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
1572         MONO_INST_LIST_FOR_EACH_ENTRY,
1573         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
1574         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
1575         mono_inst_list_first, mono_inst_list_last,
1576         mono_inst_list_next, mono_inst_list_prev): New instruction
1577         list handling interfaces.
1578         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
1579         list head 'ins_list'.
1580         (MonoInst): Replace next pointer with list head 'node'.
1581         (MonoCallInst): Make 'out_args' a MonoInstList.
1582         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
1583         (MonoCompile): Delete reverse_inst_list and
1584         reverse_inst_list_len.
1585         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
1586         mono_arch_lowering_pass, mono_arch_local_regalloc,
1587         mono_arch_output_basic_block, mono_arch_emit_prolog):
1588         Convert to new instruction lists.
1589         (insert_after_ins): Delete.
1590         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
1591         instruction lists.
1592         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
1593         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
1594         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
1595         mono_emulate_opcode, mono_emit_load_got_addr,
1596         inline_method, mono_method_to_ir, mono_print_bb_code,
1597         print_dfn, decompose_pass, nullify_basic_block,
1598         replace_out_block_in_code, remove_block_if_useless,
1599         merge_basic_blocks, move_basic_block_to_end,
1600         try_unsigned_compare, optimize_branches, mono_print_code,
1601         mini_select_instructions, remove_critical_edges): Likewise.
1602         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
1603         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
1604         mono_arch_output_basic_block, mono_arch_emit_prolog):
1605         Likewise.
1606         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
1607         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1608         mono_arch_output_basic_block): Likewise.
1609         (inst_list_prepend, insert_after_ins): Delete.
1610         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
1611         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
1612         instruction lists.
1613         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
1614         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
1615         mono_arch_emit_prolog): Likewise.
1616         * cfold.c (mono_constant_fold): Likewise.
1617         * liveness.c (visit_bb, mono_analyze_liveness,
1618         optimize_initlocals): Likewise.
1619         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
1620         * graph.c (mono_draw_code_cfg): Likewise.
1621         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
1622         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
1623         mono_ssa_cprop): Likewise.
1624         * abcremoval (get_relations_from_previous_bb, process_block):
1625         Likewise.
1626         * local-propagation (mono_cprop_invalidate_values,
1627         mono_local_cprop_bb): Likewise.
1628         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
1629         peephole_pass, mono_arch_output_basic_block,
1630         mono_arch_emit_prolog): Likewise.
1631         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
1632         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1633         mono_arch_emit_prolog): Likewise.
1634         (insert_after_ins): Delete.
1635         * aliasing.c (print_code_with_aliasing_information,
1636         mono_build_aliasing_information, mono_aliasing_deadce):
1637         Convert to new instruction lists.
1638         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
1639         peephole_pass, NEW_INS, mono_arch_lowering_pass,
1640         mono_arch_local_regalloc, mono_arch_output_basic_block):
1641         Likewise.
1642         (insert_after_ins): Delete.
1643         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
1644         peephole_pass, mono_arch_output_basic_block): Convert to
1645         new instruction lists.
1646         * mini-codegen (InstList, inst_list_prepend,
1647         insert_after_ins): Delete.
1648         (insert_before_ins, get_register_force_spilling,
1649         get_register_spilling, free_up_ireg, free_up_reg,
1650         create_copy_ins, create_spilled_store, alloc_int_reg,
1651         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
1652         to new instruction lists.
1653         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
1654         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1655         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
1656         (insert_after_ins): Delete.
1657         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
1658         mono_arch_local_regalloc, mono_arch_output_basic_block,
1659         mono_arch_call_opcode): Convert to new instruction lists.
1660         (insert_after_ins): Delete.
1661         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
1662         peephole_pass, mono_arch_output_basic_block,
1663         mono_arch_emit_prolog): Convert to new instruction lists.
1664
1665 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
1666
1667         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
1668
1669         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
1670         Fixes #353182.
1671
1672         * Makefile.am (version.h): Make this work with non-bash shells.
1673
1674 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
1675
1676         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
1677
1678 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
1679
1680         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
1681         the InitializeArray optimization.
1682
1683 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
1684
1685         * mini.c driver.c: Don't include os/gc_wrapper.h.
1686
1687 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
1688
1689         * mini.c (print_jit_stats): Print GC statistics if available.
1690
1691 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
1692
1693         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
1694
1695 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
1696
1697         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
1698
1699 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
1700
1701         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
1702         
1703         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
1704
1705         * driver.c (mono_main): Ditto.
1706
1707 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
1708
1709         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
1710
1711         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
1712         in the vtable can't be encoded.
1713         (compile_method): Ditto.
1714
1715 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
1716
1717         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
1718         defined.
1719
1720         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
1721         lmf->rbp.
1722
1723         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
1724         the top LMF entry belongs to the current method.
1725
1726         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
1727
1728 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
1729
1730         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
1731         
1732         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
1733
1734         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
1735
1736         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
1737
1738         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
1739
1740         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
1741         implementation.
1742
1743         * basic-float.cs: Add an ulong->double cast test.
1744
1745 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
1746
1747         * mini.c (mono_method_to_ir): Fix a warning.
1748
1749 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
1750
1751         * mini-ops.h: Add OP_SWITCH.
1752
1753         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
1754         CEE_SWITCH in back-end code, use OP_SWITCH instead.
1755
1756 2007-12-11  Geoff Norton  <gnorton@novell.com>
1757
1758         * mini-s390x.c: Minor change to the MAX() define to allow
1759         it to compile with other gcc versions.
1760
1761 2007-12-11  Geoff Norton  <gnorton@novell.com>
1762
1763         * cpu-s390x.md:
1764         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
1765
1766 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
1767
1768         exceptions-arm.c (mono_arch_get_restore_context): Restore
1769         the frame pointer.
1770
1771         exceptions-arm.c (throw_exception): Save the frame pointer.
1772         This is a partial fix for #323747. Only the client side is
1773         fixed.
1774
1775 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
1776
1777         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
1778         was using an unrelated variable to log the class which
1779         needed the cctor to be called. This was crashing on arm.
1780
1781 2007-12-09  Robert Jordan  <robertj@gmx.net>
1782
1783         * mini-x86.c (mono_arch_emit_epilog):
1784         Consider all kinds of 64-bit types. Fixes #323114.
1785
1786 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
1787
1788         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
1789
1790 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1791
1792         * mini-amd64.c (peephole_pass): Add a missing instruction check.
1793
1794 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
1795
1796         * mini.c: run type ctor before allocating an object, not only
1797         when running it's constructor method (fixes at least part of bug #342507).
1798
1799 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1800         
1801         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
1802         
1803         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
1804         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
1805         function.
1806
1807         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
1808         mono_generic_class_init_trampoline () the same as it is done with the other
1809         trampolines.
1810
1811         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
1812         aot-runtime.c aot-compiler.c: Implement AOT support.    
1813
1814 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1815
1816         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
1817         build for archs which don't have the vtable trampoline defined
1818         yet.
1819
1820 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1821
1822         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
1823
1824         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
1825
1826         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
1827
1828         * tramp-<ARCH>.c: Use the new helper function.
1829
1830 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1831
1832         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
1833         trampoline call, which takes a vtable argument.
1834
1835         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
1836         OP_TRAMPCALL_VTABLEs like other calls.
1837
1838         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
1839         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
1840         call.  Implemented a support function which fetches the vtable
1841         from a register set.
1842
1843         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
1844         Implemented a generic class init trampoline, using the
1845         OP_TRAMPCALL_VTABLE opcode.
1846
1847         * mini.c: Implemented static field access when sharing generic
1848         code.  This implies initing the class using the new
1849         OP_TRAMPCALL_VTABLE call.
1850
1851 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1852
1853         * mini.c: Don't compile methods with sharing enabled if their
1854         classes are disabled for sharing.
1855
1856 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
1857
1858         * inssel.brg: Add a missing sign extension to the GETCHR and array access
1859         opcodes. Fixes #346563.
1860
1861         * objects.cs: Add a new test.
1862
1863         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
1864
1865         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
1866         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
1867
1868 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
1869
1870         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
1871
1872 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
1873
1874         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
1875         code stream.
1876
1877 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
1878
1879         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
1880
1881         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
1882         optimization in the AOT case.
1883         
1884 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
1885
1886         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
1887         
1888         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
1889
1890         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
1891
1892         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
1893
1894         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
1895         is created by the inlined delegate ctor.
1896
1897         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
1898
1899         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
1900
1901 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
1902
1903         * cpu-x86.md: Fix the length of ckfinite.
1904
1905 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
1906
1907         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
1908         
1909         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
1910         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
1911
1912         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
1913
1914         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
1915         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
1916
1917 2007-11-28  Martin Baulig  <martin@ximian.com>
1918
1919         * mini-x86.c
1920         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
1921         after creating the trampoline.
1922
1923 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
1924
1925         * aot-runtime.c (load_aot_module): Check runtime version if needed.
1926
1927         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
1928         the same version.
1929
1930         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
1931         instead of the calling method to help AOT.
1932
1933         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
1934
1935 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
1936
1937         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
1938         is defined.
1939
1940 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
1941
1942         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
1943         
1944         * aot-compiler.c (compile_method): Correct check for generic method definitions.
1945         (encode_method_ref): No need to handle generic method definitions specially.
1946
1947         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1948
1949         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
1950         decode_klass_info.
1951
1952         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
1953         encode_klass_info.
1954         (compile_method): Enable generic sharing.
1955
1956 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
1957
1958         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
1959         (mini_method_compile): Add preliminary support for AOTing shared generic code.
1960
1961         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
1962         generic code.
1963
1964         * mini-trampolines.c: Fix a warning.
1965
1966         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
1967         NEW_PCONST.
1968         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
1969         (generic_class_is_reference_type): Remove unused function.
1970
1971         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
1972         in the generic vtable trampoline case.
1973
1974         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
1975         
1976         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
1977         return an AOT method based on a vtable slot.
1978
1979         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
1980
1981         * mini.c (mini_get_vtable_trampoline): Export this.
1982
1983 2007-11-22  Martin Baulig  <martin@ximian.com>
1984
1985         * debug-debugger.h
1986         (MonoDebuggerInfo): Move `debugger_version' up.
1987
1988 2007-11-22  Martin Baulig  <martin@ximian.com>
1989
1990         * mini-amd64.c
1991         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
1992
1993         * mini-trampolines.c
1994         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
1995         after compiling the method.
1996
1997 2007-11-20  Martin Baulig  <martin@ximian.com>
1998
1999         * debug-mini.c
2000         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
2001         (mono_debugger_remove_breakpoint): Likewise.
2002         (mono_debugger_check_breakpoints): Likewise.
2003
2004         * debug-debugger.c: Implement the new breakpoint interface here.
2005
2006 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
2007
2008         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
2009         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
2010
2011         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
2012
2013 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
2014
2015         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
2016
2017         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
2018         mini.c.
2019
2020         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
2021         mini.c.
2022
2023         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
2024         returning a vtype in a register.
2025
2026         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
2027         here from the arch specific code.
2028
2029         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
2030         mini.c.
2031
2032         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
2033         (mono_arch_emit_prolog): Increment maximum prolog size.
2034
2035         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
2036         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
2037
2038         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
2039         MonoGenericSharingContext.
2040
2041         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
2042         MonoGenericSharingContext. Allocate memory from the cfg mempool.
2043
2044 2007-11-15  Mark Probst  <mark.probst@gmail.com>
2045
2046         * mini.c, mini.h, generic-sharing.c: Functions for producing code
2047         which extract fields out of the runtime generic context.  Full
2048         sharing of the NEWARR opcode.
2049
2050 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
2051
2052         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
2053         --enable-minimal=ssa.
2054
2055 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
2056
2057         * mini-trampolines.c (mono_delegate_trampoline): Update after 
2058         mono_marshal_get_delegate_invoke () signature change.
2059
2060 2007-11-13  Mark Probst  <mark.probst@gmail.com>
2061
2062         * mini.c: Removed the shared context in favor of the generic
2063         sharing context.  Allocate the MonoJitInfo structure with room for
2064         the generic sharing context if it's needed.
2065
2066         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
2067         domain-internals.h now.
2068
2069         * mini-x86.c: Pass the generic sharing context to get_call_info ().
2070
2071         * generic-sharing.c: Several changes for working without a shared
2072         context and instead operating on open types instead.
2073
2074 2007-11-12  David S. Miller  <davem@davemloft.net>
2075
2076        * inssel-sparc.brg: Fix double instruction emit.
2077
2078 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
2079
2080         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
2081         Get/Set/Address methods.
2082         
2083         * mini.c debug-debugger.c mini-trampolines.c: Update after 
2084         mono_marshal_get_delegate_invoke signature change.
2085
2086 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2087
2088         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
2089         This can happens with dynamic methods. Fixes the other bug in #322722.
2090
2091 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2092
2093         * tramp-arm.c (mono_arch_patch_callsite): Support patching
2094         BX call sequence.
2095
2096         * mini-arm.c (arm_patch): Implement patching of BX call
2097         sequence. Fixes one of the bugs in #322722.
2098
2099 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
2100
2101        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
2102        under Linux.  We only need to flush every 32-byte cache line.    
2103
2104 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
2105
2106         * mini.c:
2107         move_basic_block_to_end: Add branches when needed, eventually creating
2108         a new BB.
2109         optimize_branches: added a parameter that tells if it's ok to create
2110         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
2111         and avoid calling move_basic_block_to_end when it's not ok.
2112         Fixes bug 318677.
2113
2114 2007-11-07  Mark Probst  <mark.probst@gmail.com>
2115
2116         * mini.c: Abort inlining call to InitializeArray if something
2117         looks wrong.  Let the icall handle it, which now has proper safety
2118         checks.
2119
2120 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2121
2122         * mini.c (mono_spill_call): add support for soft-float.
2123
2124         * mini.c (mono_method_to_ir): add support for soft-float
2125         to inlined functions that return float.
2126
2127         * mini.c (mono_method_to_ir): add support for soft-float
2128         to cee_stsfld opcode on float fields.
2129
2130 2007-11-05  Geoff Norton  <gnorton@novell.com>
2131
2132         * mini-x86.h: Fix the structure access for X86 Leopard.
2133
2134
2135 2007-11-05  Martin Baulig  <martin@ximian.com>
2136
2137         * mini-trampolines.c
2138         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
2139         after compiling the method to notify the debugger.
2140
2141 2007-11-05  Martin Baulig  <martin@ximian.com>
2142
2143         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
2144
2145 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
2146
2147         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
2148         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
2149
2150 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
2151
2152         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
2153         native-to-managed wrappers.
2154         
2155 2007-11-01  Geoff Norton  <gnorton@novell.com>
2156
2157         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
2158         members.
2159
2160 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
2161
2162         * mini.c, mini-x86.c: when getting back from unmanaged code
2163         to managed via a marshaled delegate we also need to set the
2164         right domain.
2165
2166 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
2167
2168         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
2169         for amd64.
2170
2171 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
2172
2173         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
2174         let the debugger or other external agents to tell the JIT when
2175         a sw breakpoint has been inserted in the code that the JIT needs
2176         to be able to inspect.
2177
2178 2007-10-31  Martin Baulig  <martin@ximian.com>
2179
2180         * debug-debugger.h
2181         (MonoDebuggerInfo): Remove `runtime_class_init'.
2182
2183 2007-10-30  Martin Baulig  <martin@ximian.com>
2184
2185         * debug-mini.h
2186         (mono_debugger_thread_created): Added `MonoThread *' argument.
2187         (mono_debugger_extended_notification): New public method.
2188         (mono_debugger_trampoline_compiled): New public method.
2189
2190         * debug-mini.c
2191         (MonoDebuggerThreadInfo): Added `thread' and
2192         `extended_notifications' fields.
2193
2194         * debug-debugger.c
2195         (debugger_executable_code_buffer): New static variable.
2196
2197         * debug-debugger.h
2198         (MonoDebuggerInfo): Added `executable_code_buffer',
2199         `executable_code_buffer_size', `breakpoint_info_area',
2200         `breakpoint_table' and `breakpoint_table_size'.
2201
2202 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
2203
2204         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
2205         that IP  either is an unused value or the vtable pointer. IMT 
2206         calls use vtable + offset now. Reduced by almost half the size
2207         of IMT entries.
2208
2209 2007-10-26  Jonathan Chambers <joncham@gmail.com>
2210
2211         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
2212         defines to access param registers. Replace long usage with
2213         gsize as sizeof(long) != sizeof(void*) on Win64.
2214
2215         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
2216         on Win64. Fix intrinsic, use _AddressOfReturnAddress
2217         instead of non-existant _GetAddressOfReturnAddress.
2218
2219         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
2220         param registers. Save/restore %rdi and %rsi in MonoLMF.
2221
2222         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
2223         param registers. Modify (throw_exception) signature to take 
2224         %rdi and %rsi on Win64. 
2225
2226         Code is contributed under MIT/X11 license.
2227
2228 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
2229
2230         * helpers.c: unlink debugging output files.
2231
2232 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
2233
2234         * mini.c: Move mono_create_ftnptr () to object.c.
2235
2236 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2237
2238         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
2239         optional. This function can now be used to disassemble code generated
2240         outside the JIT such as trampolines and IMT thunks.
2241
2242         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
2243
2244         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
2245         vtable pointer from a ldr instruction.
2246
2247         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
2248         new IMT call sequence.
2249
2250         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
2251         call sequence for interface invocations.
2252
2253         * mini-arm.c (mono_arch_emit_imt_argument): added, required
2254         for imt support. This function is empty since IMT on ARM requires no
2255         special handling on the IR side.
2256
2257         * mini-arm.c (mono_arch_find_imt_method): added, required for
2258         imt support.
2259
2260         * mini-arm.c (mono_arch_find_this_argument): added, required
2261         for imt support.
2262
2263         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
2264         a ldr instruction to load a value stored in the code stream.
2265
2266         * mini-arm.c (mono_arch_build_imt_thunk):added, required
2267         for imt support.
2268
2269
2270 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
2271
2272         * mini.c (mini_init): Install the jump trampoline callback.
2273
2274 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2275
2276         * mini-trampolines.c: handle synchronized methods with the common
2277         vtable trampoline (bug #335601).
2278
2279 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
2280
2281         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
2282
2283         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
2284         64 bit platforms.
2285
2286         * mini-ia64.h mini-ia64.c: Add support for IMT.
2287
2288         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
2289         prolog. Fixes #331958.
2290
2291 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
2292
2293         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
2294
2295 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2296
2297         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
2298         trampoline.
2299
2300 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2301
2302         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
2303         trampoline.
2304
2305 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
2306
2307         * mini-x86.c, mini-x86.h: x86 support for the common vtable
2308         trampoline.
2309
2310 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
2311
2312         * mini-trampolines.c: changed the magic rampoline to understand
2313         the common vtable trampoline method: the method to invoke is
2314         determined by the vtable displacement of the call.
2315
2316 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2317
2318         * mini.c, mini.h: register the common vtable trampoline if the
2319         architecture supports it.
2320
2321 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2322
2323         * cpu-amd64.md: use the correct max length for tls_get.
2324
2325 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
2326
2327         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
2328         CEE_STELEM_ANY. Fixes #333696.
2329
2330 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2331
2332         * exceptions-x86.c: provide more graceful handling of the case where
2333         we followed a bogus function pointer from managed code (bug #332866).
2334
2335 2007-10-11  Mark Probst  <mark.probst@gmail.com>
2336
2337         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
2338         replaces the generic_shared flag and will carry more information
2339         in the future.
2340
2341         * generic-sharing.c: Added mini_type_stack_size() which allows
2342         allows open types if given a generic sharing context.
2343         mini_get_basic_type_from_generic() takes a
2344         MonoGenericSharingContext* instead of a MonoCompile* now.
2345
2346         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
2347         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
2348         mini-sparc.c, mini-x86.c: Trivial changes required by the two
2349         changes above.  Just passing arguments through to the right
2350         places.
2351
2352 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2353
2354         * mini-arm.c: unify the call emission to emit_code_seq().
2355
2356 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
2357
2358         * tramp-arm.c: reduced the trampoline size.
2359
2360 2007-10-10  Mark Probst  <mark.probst@gmail.com>
2361
2362         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
2363         variable handling out of arch-specific code.
2364
2365 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
2366
2367         * mini-arm.c: implemented fast delegate dispatch.
2368
2369 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2370
2371         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
2372         that fp elimination is turned off if the space required by locals is too
2373         big. Fixes #331958.
2374
2375 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
2376
2377         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
2378         ARM to the new style trampoline.
2379
2380 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2381
2382         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
2383
2384         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
2385
2386 2007-10-09  Martin Baulig  <martin@ximian.com>
2387
2388         * debug-debugger.h
2389         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
2390         `field_info_offset_offset'.     
2391
2392 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
2393
2394         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
2395         removed more internal usage of the r11 register and made it available
2396         to the register allocator.
2397
2398 2007-10-08  Mark Probst  <mark.probst@gmail.com>
2399
2400         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
2401         when sharing generics and treat type variables as references.
2402
2403 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2404
2405         * mini-ppc.c: started removing the internal uses of register r11
2406         to eventually allow the register allocator to manage it as an
2407         additional available register.
2408
2409 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2410
2411         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
2412
2413 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
2414
2415         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
2416         specific trampolines as they are not performance critical as a jump
2417         target (maybe align as before only for AOT code?). This saves about
2418         200 KB of native code on x86 for monodevelop startup.
2419
2420 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
2421
2422         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
2423         monodevelop startup.
2424
2425 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
2426
2427         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
2428
2429         * mini-sparc.h mini-sparc.c: Implement IMT support.
2430
2431         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
2432         its smaller and doesn't clobber sparc_g1.
2433
2434         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
2435
2436 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
2437
2438         * mini-ppc.c: optimized the size of the IMT thunks a bit.
2439
2440 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
2441
2442         * mini-ppc.c: implemented fast delegate invocation.
2443
2444 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
2445
2446         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
2447
2448 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2449
2450         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
2451         code to the new style trampoline in preparation for IMT support.
2452
2453 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
2454
2455         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
2456         systems already. This also reduces the specific trampiline sizes and
2457         prepares for the use of r12 as the IMT identifier register.
2458
2459 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2460
2461         * mini-mips.h: endianess fix (simplified from a patch by
2462         Thomas Kunze <thommy@tabao.de>, bug #323737).
2463
2464 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2465
2466         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
2467         to access ucontext fields and enable netbsd support
2468         (partially from Magnus Henoch <mange@freemail.hu>).
2469
2470 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2471
2472         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
2473         use the preprocessor from the CPP env var if it is set.
2474
2475 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2476
2477         * mini-trampolines.c: fixed an assertion and moved it earlier in the
2478         code, before interface_offset gets used.
2479
2480 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
2481
2482         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
2483         mono_class_setup_vtable () before accessing klass->vtable.
2484
2485 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
2486
2487         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
2488         hackish.
2489
2490 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2491
2492         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
2493         IMT slots (this saves hundreds of KB of memory in programs like
2494         IronPython and Monodevelop).
2495
2496 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2497
2498         * mini.c: print the delegate counter.
2499
2500 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
2501
2502         * mini-x86.c: make it easier to enable the debugging code for IMT
2503         slots.
2504
2505 2007-09-28  Martin Baulig  <martin@ximian.com>
2506
2507         * debug-debugger.h
2508         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
2509         `mono_method_klass_offset' and `mono_method_token_offset'.
2510
2511 2007-09-20  Mark Probst  <mark.probst@gmail.com>
2512
2513         * mini.c: First generics sharing implementation.  Can only share
2514         in very simple cases.  If sharing doesn't work it falls back to
2515         dedicated compilation.
2516
2517         * mini.h: Flag in MonoCompile to specify whether generic
2518         compilation is shared.  Flags enum for marking which generic inst
2519         of a context is used.  Prototypes for helper functions.
2520
2521         * generic-sharing.c: Helper functions for generic method sharing.
2522
2523         * optflags-def.h: Optimization flag (gshared) for enabling generic
2524         method sharing added.
2525
2526         * Makefile.am: generic-sharing.c added.
2527
2528 2007-09-19 Daniel Nauck <dna@mono-project.de>
2529
2530         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
2531
2532 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
2533         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
2534         fixes bug 325507.
2535
2536 2007-09-19  Martin Baulig  <martin@ximian.com>
2537
2538         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
2539         mono_debug_cleanup() is now part of mono_cleanup().
2540
2541 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
2542
2543         * driver.c (mono_main): Fix a warning.
2544
2545 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
2546
2547         * aot-compiler.c: Optimize various parts when processing large assemblies.
2548         Fixes ##325568.
2549
2550         * mini.c (mono_patch_info_hash): Improve hash function.
2551
2552 2007-09-14  Jonathan Chambers <joncham@gmail.com>
2553
2554         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
2555         
2556         Code is contributed under MIT/X11 license.
2557
2558 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2559
2560         * mini.c (mini_init): Fix a leak.
2561
2562         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
2563
2564 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2565
2566         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
2567
2568 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2569
2570         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
2571
2572 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
2573
2574         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
2575         variance tests.
2576
2577         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
2578
2579         * mini.c (handle_alloc): Enable managed allocators in AOT code.
2580
2581         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
2582
2583         * aot-runtime.c (decode_patch_info): Ditto.
2584
2585 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2586
2587         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
2588         static case. Cache delegates in architecture specific code, 
2589         based on number of parameters.
2590         
2591         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
2592         in architecture specific code, based on number of parameters.
2593         
2594         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
2595         caching happen in architecture specific code now.
2596         
2597         Code is contributed under MIT/X11 license.
2598
2599 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2600
2601         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
2602         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
2603         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
2604
2605         Code is contributed under MIT/X11 license.
2606
2607 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
2608         * mini.c: (mono_thread_abort) Fixed bug #82416.
2609
2610 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2611
2612         * mini.: hook the new managed GC allocation feature into the JIT.
2613
2614 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2615
2616         * mini.c: implementation for the new runtime tls opcode.
2617
2618 2007-09-11  Martin Baulig  <martin@ximian.com>
2619
2620         * debug-debugger.h
2621         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
2622         `mono_method_inflated_offset'.
2623
2624 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
2625
2626         * driver.c mini.h mini.c: Add a new devel command line option for injecting
2627         async exceptions into a method.
2628
2629         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
2630         purpose of testing whenever the unwinder works at every instruction.
2631
2632 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
2633
2634         * mini.c: check accessibility of method used in ldftn (fixes
2635         bug #82635).
2636
2637 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
2638
2639         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
2640
2641         * inssel.brg: Fix a warning.
2642
2643 2007-09-03  Martin Baulig  <martin@ximian.com>
2644
2645         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
2646         now takes the `main_method' as argument.
2647
2648 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
2649
2650         * cpu-sparc.md (endfilter): Add missing src1:i argument.
2651
2652 2007-08-30  Jonathan Chambers <joncham@gmail.com>
2653
2654         * driver.c: include the cil-coff.h header on Windows.
2655         
2656         Code is contributed under MIT/X11 license.
2657
2658 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2659
2660         * mini.c, driver.c: don't include the cil-coff.h header.
2661
2662 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2663
2664         * mini.c: flag places that needs fixes fo soft-float support.
2665
2666 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
2667
2668         * mini.h, inssel-float.brg: fix soft-float constant loads on big
2669         endian systems (partially from Dean Jenkins, bug #81924).
2670
2671 2007-08-28  Mark Probst  <mark.probst@gmail.com>
2672
2673         * mini.c (check_linkdemand): Remove embedded reference object in
2674         call to LinkDemandSecurityException.
2675         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
2676         with an IntPtr instead of a reference object.
2677
2678 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
2679
2680         * mini.c (handle_initobj): Handle alignment properly.
2681
2682         * inssel.brg (mini_emit_memset): Ditto. 
2683
2684         * inssel.brg (mini_emit_memcpy): Ditto. 
2685
2686         * inssel-sparc.brg: Ditto.              
2687
2688         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
2689
2690 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
2691
2692         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
2693         exceptions raised in unmanaged code. Fixes part of #82594.
2694
2695 2007-08-24  Mark Probst  <mark.probst@gmail.com>
2696
2697         * mini.c (mono_method_to_ir), declsec.c
2698         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
2699
2700 2007-08-22  Martin Baulig  <martin@ximian.com>
2701
2702         * debug-mini.h
2703         (MonoDebuggerThreadInfo): New typedef.
2704         (mono_debugger_thread_table): New global variable.
2705         (mono_debugger_thread_created): New public function.
2706         (mono_debugger_thread_cleanup): New public function.
2707
2708         * debug-debugger.h
2709         (MonoDebuggerInfo):
2710         - removed `get_current_thread' and `lookup_assembly'.
2711         - removed `data_table'.
2712         - added `thread_table'.
2713
2714         * mini.c
2715         (mono_thread_start_cb): Call mono_debugger_thread_created().
2716         (mono_thread_attach_cb): Likewise.
2717         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
2718         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
2719         initial domain.
2720
2721         * driver.c (mono_main): Move mono_debug_init() up, before calling
2722         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
2723
2724 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
2725
2726         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
2727         together when passing several arguments of type double (gives a small
2728         speedup and saves a few bytes of generated code).
2729
2730 2007-08-20  Jb Evain  <jbevain@novell.com>
2731
2732         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
2733
2734 2007-08-20  Jb Evain  <jbevain@novell.com>
2735
2736         * mini.c (mono_method_to_ir): throw MethodAccessException
2737         and FieldAccessException instead of InvalidProgramException.
2738
2739 2007-08-20  Mark Probst  <mark.probst@gmail.com>
2740
2741         * mini.c: CoreCLR security checks.
2742
2743         * mini.h: Removed MonoSecurityMode (moved to
2744         metadata/security-manager.h) and mono_security_mode global var
2745         (replaced by set/get functions in security-manager.h).
2746
2747         * driver.c: Added "core-clr-test" security mode for testing.  Used
2748         set-function for setting security mode.
2749
2750 2007-08-17  Mark Probst  <mark.probst@gmail.com>
2751
2752         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
2753         the new jit_info_table.
2754
2755         * driver.c: Test code for the new jit_info_table (enabled by the
2756         define MONO_JIT_INFO_TABLE_TEST).
2757
2758 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
2759
2760         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
2761         detection of call <REG> instruction sequence. Fixes build on freebsd.
2762
2763 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
2764
2765         * mini-exceptions.c: Fix a warning.
2766
2767 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
2768
2769         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
2770         stack overflow handling code on amd64 too.
2771
2772         * mini-exceptions.c (mono_setup_altstack): Make this use 
2773         mono_thread_get_stack_bounds ().
2774
2775         * mini-x86.h: Disable sigaltstack on solaris x86.
2776
2777 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
2778
2779         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
2780
2781 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
2782
2783         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
2784
2785 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
2786
2787         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
2788
2789         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
2790
2791 2007-08-03  Neale Ferguson <neale@sinenomine.net>
2792
2793         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
2794         due to alignment.
2795
2796 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2797
2798         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
2799         to be emitted (bug #82281).
2800
2801 2007-08-01  Martin Baulig  <martin@ximian.com>
2802
2803         Merged the `debugger-dublin' branch.
2804
2805         * debug-debugger.h (MonoDebuggerInfo):
2806         Removed the `old_*' compatibility entries.
2807         Added `debugger_version' and `data_table'.
2808         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
2809         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
2810
2811         * debug-mini.c
2812         (MiniDebugMethodBreakpointInfo): Add `address_list'.
2813         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
2814         instead of a `gconstpointer'.
2815         (mono_debugger_insert_method_breakpoint): Return a
2816         `MonoDebugMethodAddressList *'.
2817
2818 2007-06-28  Martin Baulig  <martin@ximian.com>
2819
2820         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
2821
2822 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
2823
2824         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
2825         __builtin_frame_address () since it is broken on older gcc versions.
2826
2827 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2828
2829         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
2830         on the stack overflow handling and made the managed stack overflows
2831         catchable in most cases using soft guard pages.
2832         * exceptions-x86.c: added code to restore the protection in the soft
2833         guard pages at the end of exception handling.
2834
2835 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
2836
2837         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
2838
2839 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2840
2841         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
2842         exception handling.
2843
2844 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2845
2846         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
2847         signal handling support until it has been ported to the new mechanism.
2848         * mini.c: fixed stack overflow detection and use the new
2849         architecture code  to handle signals on the altstack.
2850
2851 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
2852
2853         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
2854         stack overflows on the alt stack.
2855
2856 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
2857
2858         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
2859         stack overflows on the alt stack.
2860
2861 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
2862
2863         * exceptions-ppc.c: cleanup preparing for altstack support.
2864
2865 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
2866
2867         * exceptions-arm.c: cleanup preparing for altstack support.
2868
2869 2007-07-27  Mark Probst  <mark.probst@gmail.com>
2870
2871         * mini.c (print_jit_stats): Output hazard pointer stats.
2872
2873 2007-07-26  Mark Probst  <mark.probst@gmail.com>
2874
2875         * driver.c, mini.c: Replaced security mode flags with a single
2876         enum variable.
2877
2878 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2879
2880         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
2881
2882 2007-07-25  Mark Probst  <mark.probst@gmail.com>
2883
2884         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
2885         (which doesn't do anything yet) for activating Core CLR
2886         (Silverlight) security.
2887
2888 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
2889
2890         * mini-codegen.c: work around a possible gcc bug on arm.
2891
2892 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2893
2894         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
2895         message for platforms that don't support AOT compilation.
2896
2897 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2898
2899         * mini.h, mini.c, driver.c: temporary smcs hack.
2900
2901 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
2902
2903         * mini-arm.h, mini-arm.c: arm EABI fixes.
2904
2905 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
2906
2907         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
2908         case.
2909
2910         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
2911         trampolines taking a method argument.
2912
2913         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
2914
2915         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
2916         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
2917
2918         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
2919         JIT compilation throws an exception. Fixes #82050.
2920
2921 2007-07-19  Mark Probst  <mark.probst@gmail.com>
2922
2923         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
2924         with the MONO_EXCEPTION_ defines.
2925
2926 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
2927
2928         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
2929         #82117.
2930         
2931         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
2932         the cause of an assertion.
2933
2934 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
2935
2936         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
2937         removed.
2938
2939 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
2940
2941         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
2942         assert. Should fix #82103.
2943
2944 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
2945
2946         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
2947         here too. Fixes #82095.
2948
2949         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
2950         addresses.
2951
2952         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
2953
2954         * mini-amd64.h: Enable IMT for amd64.
2955         
2956         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
2957
2958 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
2959
2960         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
2961
2962 2007-07-12  Mark Probst  <mark.probst@gmail.com>
2963
2964         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
2965         as soon as check_linkdemand sets an exception_type.
2966
2967 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2968
2969         * mini-x86.c: fixed offsets for IMT call sequence.
2970         * mini-x86.h: enable IMT again.
2971
2972 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
2973
2974         * trace.c (mono_trace_enter_method): Decode MonoType too.
2975
2976         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
2977
2978         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
2979
2980         * mini-amd64.c: Add preliminary IMT implementation.
2981         
2982 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
2983
2984         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
2985         understand the new IMT-base interface invocation (thanks to
2986         Daniel Nauck for the report and the remote debugging session).
2987
2988 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2989
2990         * mini-x86.c: size and speed optimizations for the IMT bsearch.
2991
2992 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
2993
2994         * Makefile.am (aotcheck): Make this actually use the AOTed code.
2995
2996 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
2997
2998         * mini-trampolines.c: implement AOT IMT support.
2999         * mini-x86.h: enable IMT support for wider testing.
3000
3001 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3002
3003         * inssel.brg (emit_imt_argument): Add aot support here.
3004
3005         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
3006
3007 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3008
3009         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
3010         of the IMT implementation, partially from massi, with my
3011         implementation of the bsearch sequence. Disabled by default until
3012         the AOT code is implemented.
3013
3014 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3015
3016         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
3017
3018         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
3019
3020 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3021
3022         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
3023         arch-independent IMT JIT code from Massimiliano
3024         Mantione (massi@ximian.com) with small cleanups from me.
3025
3026 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3027
3028         * Makefile.am: fix svn invocation to get the svn revision to be
3029         independent of the local language (build fix).
3030
3031 2007-07-09  Mark Probst  <mark.probst@gmail.com>
3032
3033         * mini.c (inline_method): Reset cfg->exception_type if the
3034         inlining is aborted.  Fixes: 82049.
3035
3036 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
3037
3038         * mini.c: remove assert from exception handling code when exception_ptr
3039         is not set.
3040
3041 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3042
3043         * mini.c (mono_codegen): Add an assert.
3044
3045         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
3046         enter and leave code.
3047         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
3048
3049 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3050
3051         * mini-ppc.c: fixed memory corruption for localloc(0)
3052         (bug #81852).
3053
3054 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3055         
3056         * mini.c: Fix warnings.
3057
3058 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
3059
3060         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
3061         to emit better double->int conversions.
3062
3063 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
3064
3065         * mini.c: the provided Min/Max optimizations are valid for unisgned
3066         ints.
3067
3068 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
3069
3070         * 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
3071
3072 2007-06-28  Miguel de Icaza  <miguel@novell.com>
3073
3074         * mini.c (mono_running_on_valgrind): Add support for reporting the
3075         method and  its boundaries to valgrind.
3076
3077 2007-06-28  Martin Baulig  <martin@ximian.com>
3078
3079         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3080
3081 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
3082
3083         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
3084
3085         * generic.2.cs: Add new test case.
3086
3087 2007-06-25  Martin Baulig  <martin@ximian.com>
3088
3089         Merged the `debugger-dublin' branch.
3090
3091         * debug-mini.c
3092         (mono_debugger_insert_method_breakpoint): New public method.
3093         (mono_debugger_remove_method_breakpoint): Likewise.
3094         (mono_debugger_check_breakpoints): New static method.
3095         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
3096
3097         * debug-debugger.h (MonoDebuggerInfo):
3098         Renamed (to keep backward compatibility in the vtable):
3099         `insert_breakpoint' -> `old_insert_breakpoint'.
3100         `remove_breakpoint' -> `old_remove_breakpoint'.
3101         `create_string' -> `old_create_string'.
3102         `lookup_class' -> `old_lookup_class'.
3103         `lookup_type' -> removed; changed into a dummy field.
3104         `lookup_assembly' -> `old_lookup_assembly'.
3105         Added (same functionality, but different signature):
3106         `create_string', `lookup_class', `lookup_assembly'
3107         Added new:
3108         `get_method_addr_or_bpt', `remove_method_breakpoint',
3109         `runtime_class_init'.
3110
3111         * debug-debugger.c: Merged the `debugger-dublin' branch.
3112
3113 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
3114
3115         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
3116         well.
3117         (peephole_pass): Likewise.
3118
3119 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
3120
3121         * driver.c: hopefully make setaffinity work also for ancient
3122         versions of linux.
3123
3124 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
3125
3126         * driver.c : win32 build fix.
3127
3128 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3129
3130         * driver.c: check for the MONO_NO_SMP env var and bind to a single
3131         processor if it is set.
3132
3133 2007-06-21  Martin Baulig  <martin@ximian.com>
3134
3135         * debug-mini.h: New file.
3136
3137         * debug-mini.c
3138         (mono_debugger_insert_breakpoint_full): Moved here from
3139         ../metadata/mono-debug-debugger.c.
3140         (mono_debugger_remove_breakpoint): Likewise.
3141         (mono_debugger_breakpoint_callback): Likewise.
3142
3143 2007-06-15  Raja R Harinath  <rharinath@novell.com>
3144
3145         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3146         changes in MonoGenericClass.
3147
3148 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
3149
3150         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
3151
3152 2007-06-14  Raja R Harinath  <rharinath@novell.com>
3153
3154         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3155         removal of MonoGenericMethod.
3156
3157 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3158
3159         * mini-exceptions.c: hooks for the exception events profiling API.
3160
3161 2007-06-14  Randolph Chung  <tausq@debian.org>
3162
3163         * Makefile.ma: Add hppa target.
3164         * mini-arch.h: Include mini-hppa.h
3165         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
3166         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
3167         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3168
3169 2007-06-14  Randolph Chung  <tausq@debian.org>
3170
3171         * inssel.brg: Add rules for "chained" compare-branch operations so that
3172         a single compare op can affect multiple branches.  Adjust cost for
3173         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
3174         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
3175         cost for some rules so that they can more easily be overridden by
3176         per-arch rules (with fixes from lupus).
3177         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3178
3179 2007-06-13  Randolph Chung  <tausq@debian.org>
3180
3181         * mini-ops.h: Reorder branch ops so that they match the order of the
3182         corresponding CEE_* ops.  The code expects them this way.
3183         Add new ops for HPPA target.
3184         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3185
3186 2007-06-13  Randolph Chung  <tausq@debian.org>
3187
3188         * mini-exceptions.c: Handle cases where the stack grows towards
3189         larger addresses.
3190         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3191
3192 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
3193
3194         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
3195         counter.
3196         * driver.c: explain where a non-matching corlib is found.
3197
3198 2007-06-13  Mark Probst  <mark.probst@gmail.com>
3199
3200         * mini.c (print_jit_stats): Output dynamic code allocation stats.
3201
3202 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
3203
3204         * mini-exceptions.c: Generate a method profile leave event during
3205         an exception to ensure that the profiler gets notified.
3206
3207 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
3208
3209         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
3210         branch.
3211
3212         * cpu-amd64.md: Add long_and/or/xor opcodes.
3213
3214 2007-06-06  Wade Berrier  <wberrier@novell.com>
3215
3216         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
3217         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
3218         length of instruction shr_imm (expected 8, got 10)
3219
3220 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
3221
3222         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
3223
3224 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3225
3226         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3227         MonoInternalHashTable again (fixed bug in the internal hash table
3228         code).
3229
3230 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3231
3232         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
3233         Have to figure out what makes it crash the SWF regression.
3234
3235 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
3236
3237         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
3238
3239 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3240
3241         * mini.c: optimize out the type check when storing null in a
3242         reference array.
3243
3244 2007-06-04  Mark Probst  <mark.probst@gmail.com>
3245
3246         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3247         MonoInternalHashTable.
3248
3249 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
3250
3251         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
3252         signed integer methods.
3253
3254 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3255
3256         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
3257         permanently since the current approach doesn't work.
3258
3259 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3260
3261         * inssel.brg (stmt): Only call delegate->invoke_impl if 
3262         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
3263
3264 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3265
3266         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
3267         the sreg2==rdx case.
3268         
3269         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
3270         account if it contains a rex prefix.
3271         (peephole_pass): Handle OP_FMOVE as well.
3272
3273 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3274
3275         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
3276         as it causes regressions.
3277
3278 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
3279
3280         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
3281         static case as well.
3282
3283         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
3284
3285         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3286         (mono_arch_get_this_arg_from_call): Ditto.
3287
3288         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
3289
3290         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
3291         invoke_impl field.
3292
3293         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3294         (mono_arch_get_this_arg_from_call): Ditto.
3295
3296         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
3297         
3298         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
3299         try to create optimized invoke code and use that for further invocations. 
3300         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
3301
3302         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
3303
3304 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
3305
3306         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
3307         sealed classes or methods.
3308         *devirtualization.cs: tests for the new optimization
3309
3310 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
3311
3312         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
3313         by the update_volatile () function.
3314
3315 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
3316
3317         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
3318         require it.
3319
3320         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
3321
3322 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
3323
3324         * mini.c: Add configure checks for header files.
3325         * mini-x86.c: Add configure checks for header files.
3326         * trace.c: Add configure checks for header files.
3327         * aot-runtime.c: Add configure checks for header files.
3328         * aot-compiler.c: Add configure checks for header files.
3329         * driver.c: Add configure checks for header files.
3330         * mini-codegen.c: Add configure checks for header files.
3331         
3332         Code is contributed under MIT/X11 license.
3333
3334 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
3335
3336         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
3337         icompare_imm -128 + op_iclt. Fixes #81703.
3338
3339 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
3340
3341         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
3342
3343 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
3344
3345         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
3346         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
3347         so that all isinst checks now use "interface_bitmap".
3348
3349 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
3350
3351         * cpu-amd64.md (jmp): Fix a warning.
3352
3353         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
3354
3355         * basic.cs: Add new regression test.
3356
3357         * basic.cs: Remove test which is now in basic-long.cs.
3358
3359         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
3360
3361         * basic-long.cs: Add new test.
3362         
3363 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
3364
3365         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
3366
3367 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
3368
3369         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
3370
3371         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
3372         places.
3373         
3374         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
3375         throwing code a bit.
3376
3377         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
3378         the exception throwing code a bit.
3379
3380         * mini-x86.c (get_call_info): Allocate result from a mempool.
3381
3382 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
3383
3384         * aot-compiler.c (find_typespec_for_class): Fix the assert.
3385
3386         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
3387
3388         * mini.h (MonoCompile): Add 'token_info_hash' field.
3389
3390         * mini.c: Save token->method associations during compilation so the AOT 
3391         compiler can use it.
3392         
3393         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
3394         which reference generic classes and methods.
3395
3396 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
3397
3398         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
3399
3400         * aot-compiler.c (compile_method): Fix a typo in a comment.
3401
3402         * aot-runtime.c (decode_cached_class_info): Skip generic types.
3403
3404         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
3405         everything generic.
3406
3407         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
3408
3409 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
3410
3411         * mini.h (MonoCompile): Add 'args' field.
3412
3413         * mini.c (mono_compile_create_vars): Store variables representing the arguments
3414         into cfg->args.
3415
3416         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
3417
3418 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
3419
3420         * mini.c (mono_compile_get_interface_var): Remove this unused function.
3421
3422         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
3423
3424         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
3425         opcodes for some opcodes.
3426
3427         * mini.h *.brg *.c: Use the new opcodes.
3428
3429 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
3430
3431         * mini.h: Bumped aot revision.
3432
3433         * inssel.brg: modified code generation of type checks for interfaces
3434         to use the new "MonoClass.interface_bitmap" instead of the old
3435         "MonoClass.interface_offsets".
3436
3437 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
3438
3439         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
3440
3441 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
3442
3443         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
3444         64 bit platforms.
3445
3446 2007-04-27  Neale Ferguson <neale@sinenomine.net>
3447
3448         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
3449
3450 2007-04-27  Wade Berrier  <wberrier@novell.com>
3451
3452         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
3453         mini.h) to fix build.
3454
3455 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
3456
3457         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
3458         
3459         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
3460         causes the corlib unit tests to fail.
3461
3462 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
3463
3464         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
3465
3466         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
3467
3468         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
3469         opcodes to the comparison relations.
3470
3471         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
3472         opcodes to their types.
3473         
3474         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
3475
3476         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
3477         it in cfg->arch.cinfo.
3478
3479         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
3480
3481         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
3482         cfg->cil_offset_to_bb.
3483
3484 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
3485
3486         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
3487         created becase of initlocals.
3488
3489 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
3490
3491         * mini-alpha.c cpu-alpha.md: More alpha port work from 
3492         Sergey Tikhonov <tsv@solvo.ru>.
3493
3494 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
3495
3496         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
3497
3498 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
3499
3500         * cpu-s390.md (break): Correct the length of break instruction.
3501
3502 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3503
3504         * mini.c: fix a couple of soft-float issues and comments.
3505
3506 2007-04-15  Miguel de Icaza  <miguel@novell.com>
3507
3508         * trace.c (is_filenamechar): - is also a filename char.
3509
3510 2007-04-15  Neale Ferguson <neale@sinenomine.net>
3511
3512         * mini-s390.c: Correct checking for enum type in return value processing.
3513
3514 2007-04-14  Raja R Harinath  <rharinath@novell.com>
3515
3516         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
3517         (version.h): Makefile is in the build directory.
3518
3519 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
3520
3521         * mini-amd64.h: fix for assertion failure on Solaris/amd64
3522
3523 2007-04-11  Martin Baulig  <martin@ximian.com>
3524
3525         * mini.c (can_access_member): Fix handling of generic classes;
3526         fixes #81259.
3527
3528 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
3529
3530         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
3531
3532 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
3533
3534         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
3535
3536 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3537
3538         * mini-codegen.c: make sure the right spill amount is
3539         used for fp or integer registers (fixes the float_sub_spill() on ppc).
3540
3541 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
3542
3543         * mini-ppc.c: fixes for the fp_branch_nan test.
3544
3545 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
3546
3547         * basic.cs: Comment out new test which still fails on ia64.
3548
3549 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3550
3551         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
3552
3553 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3554
3555         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
3556
3557 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
3558
3559         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
3560         on 64 bit machines. Fixes part of #80738.
3561
3562         * basic.cs: Add regression test.
3563
3564 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3565
3566         * inssel.brg basic.cs: Revert previous change to fix build.
3567
3568         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
3569         platforms.
3570         
3571         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
3572
3573         * basic.cs: Add new regression test.
3574
3575 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3576
3577         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
3578         many arguments.
3579
3580 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3581
3582         * cpu-s390x.md: Correct length of break instruction.
3583
3584 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3585
3586         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
3587         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
3588
3589 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
3590
3591         * *.c: Begin WIN64 port.
3592         * mini.c:  Use correct register in profiler.
3593         * mini-amd64.c: No inline assembly on Win64.
3594         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
3595         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
3596         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
3597         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
3598         mono_arch_ip_from_context for Win64.
3599         
3600         Contributed under MIT/X11 license.
3601
3602 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
3603
3604         * exceptions-amd64.c (seh_handler): Ditto.
3605
3606         * exceptions-x86.c (seh_handler): Fix a memory leak.
3607
3608 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
3609
3610         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
3611         mini-s390x.c: fixed peephole optimizations to deal
3612         correctly with 1 and 2 byte reload avoidance.
3613
3614 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
3615
3616         * cpu-s390.md, cpu-s390x.md: update localloc length.
3617
3618 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3619
3620         * cpu-g4.md: added missing descriptions.
3621
3622 2007-03-14  Miguel de Icaza  <miguel@novell.com>
3623
3624         *  Makefile.am: Add support so the tail tests are not executed on
3625         PowerPC as that is a known limitation of the PowerPC port.
3626
3627 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3628
3629         * runmdesc.bat:  Move to msvc directory.
3630         
3631 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3632
3633         * runmdesc.bat:  Run executable that was produced by the current
3634         target and sent via an argument.
3635         
3636 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
3637
3638         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
3639         #81102.
3640
3641         * generics.2.cs: Add regression test.
3642
3643 2007-03-09  Wade berrier  <wberrier@novell.com>
3644
3645         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
3646
3647 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
3648
3649         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
3650         AOT code depends on this.
3651
3652 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3653
3654         * mini.c: more precise tracking of types in the eval stack
3655         (part of fix for bug #81044).
3656
3657 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
3658
3659         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
3660
3661         * aot-compiler.c (encode_patch): Remove an obsolete comment.
3662
3663 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
3664
3665         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
3666
3667         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
3668
3669 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
3670
3671         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
3672         a pointer on 64 bit systems. Fixes #80190.
3673
3674         * iltests.il: Add new regression test.
3675
3676 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3677
3678         * mini.c: inline a constant for Environment.IsRunningOnWindows.
3679
3680 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
3681
3682         * trace.c: Remove an erroneous alignemnt check when tracing.
3683           Fixes --trace on OSX86.
3684
3685 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3686
3687         * mini-$(arch).h: initialize SP in context for all the archs.
3688
3689 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
3690
3691         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
3692         regressions in the thread tests.
3693
3694 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
3695
3696         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
3697         - fixed implementation of LOCALLOC opcode
3698         - implemented non-un compare for floats
3699         - code cleanup
3700         - implementation of FDIV and CKFINITE opcodes
3701         - fixes for latest mono updates
3702         - additional arch opcodes
3703
3704 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3705
3706         * Makefile.am: simplify and merge rules for cross-compilation.
3707
3708 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
3709
3710         * local-propagation.c: Actually *apply* the fix for bug 80591...
3711
3712 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3713
3714         * mini-exceptions.c: backuot part of the last change
3715         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
3716
3717 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
3718         * inssel.brg: Fix bug 59286.
3719
3720
3721 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
3722
3723         * mini-exceptions.c: patch from Zoltan to correctly check for
3724         stack boundaries (using the stack register, not the frame register),
3725         fixes bugs #80724, #79717.
3726
3727 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
3728
3729         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
3730         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
3731
3732         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
3733         presence of frame pointer elimination.
3734
3735 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
3736         
3737         * mini-x86.h: NetBSD UCONTEX_REG defines.
3738
3739 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
3740
3741         * inssel-amd64.brg: Fix amd64 build.
3742
3743 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
3744
3745         * mini.h: remove extern to workaround what looks likes gcc bug 26905
3746         on amd64.
3747
3748 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
3749
3750         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
3751         ends.
3752
3753         * mini-<ARCH>.c: Use mono_is_regsize_var ().
3754
3755 2007-01-30 Mark Mason <mason@broadcom.com>
3756
3757            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
3758            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
3759            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
3760            beginning support for CEE_JMP [not quite working yet]
3761            * tramp-mips.c: LMF handling now works
3762         
3763 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
3764
3765         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
3766
3767         * mini.h (NULLIFY_INS): New macro.
3768
3769 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3770
3771         * mini.c: statistical profiler fix for windows, patch
3772         from Tor Lillqvist (tml@novell.com).
3773
3774 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
3775         * local-propagation.c: Fix bug 80591.
3776
3777 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
3778
3779         * Makefile.am: put back the --export-dynamic option as with
3780         the previous gmodule flags (thanks to Robert Jordan).
3781
3782 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
3783
3784         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
3785
3786         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
3787         simplify and speed up the local register allocator. Also rename some fields
3788         like iassign->vassign.
3789         
3790         * regalloc.c: Remove some functions which are no longer used since their
3791         inlined version is in mini-codegen.c.
3792         
3793         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
3794
3795         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
3796
3797 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
3798
3799         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
3800         narrowing. Fixes #80622.
3801
3802         * iltests.il: Add new regresssion test. 
3803
3804 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3805
3806         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
3807         debug-debugger.c, debug-debugger.h: warning fixes.
3808         * driver.c: updated copyright year and made it fit in one line.
3809
3810 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
3811
3812         * aot-runtime.c: updated to use mono-dl instead of gmodule.
3813
3814 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
3815
3816         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
3817
3818         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
3819
3820         * iltests.il: Add new test for bug #80507.
3821
3822 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3823
3824         * mini-arm.h: use soft-float also on vfp for now.
3825
3826 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3827
3828         * mini.c: fix some more soft-float issues.
3829
3830 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
3831
3832         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
3833
3834 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
3835         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
3836         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
3837         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
3838
3839 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
3840
3841         * mini-arm.c: typo fix.
3842
3843 2007-01-23  Neale Ferguson <neale@sinenomine.net>
3844
3845         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
3846
3847 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
3848
3849         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
3850         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
3851
3852         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
3853
3854         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
3855
3856         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
3857         
3858         * inssel.brg: Fix a warning.
3859
3860         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
3861
3862         * abcremoval.c ssa.c ssapre.c: Update after this change.
3863         
3864         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
3865
3866         * dominators.c (df_set): Use mono_bitset_union_fast.    
3867
3868 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
3869
3870         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
3871         mini-codegen.c: reduce relocations and memory usage for the cpu
3872         description.
3873
3874 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
3875
3876         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
3877
3878         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
3879         to reduce their size.
3880
3881 2007-01-19 Mark Mason <mason@broadcom.com>
3882
3883         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
3884         * mini-mips.c: more configuration macros, support long conditional branches, additional
3885         asserts, fix epilog instrumentation.
3886         * mini-mips.h: use standard stack walk
3887         * cpu-mips.md: increase size of div, rem and conditional branches
3888         
3889 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
3890
3891         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
3892         to cpu spec data.
3893
3894 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
3895
3896         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
3897         (compile_method): Ditto.
3898
3899         * aot-runtime.c (decode_klass_info): Ditto.
3900
3901         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
3902         needed by the code generated by inssel.brg. Also fix a warning.
3903
3904 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
3905
3906         * mini.c: deal with enums that become genericinsts by
3907         being nested in a generic class (bug #79956).
3908
3909 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3910
3911         * mini.c: match the generic definition to check for
3912         private access with generic types (bug #78431).
3913
3914 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3915
3916         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
3917         to make life easier for people cross-compiling that insist on not
3918         using scratchbox.
3919
3920 2007-01-17 Mark Mason <mason@broadcom.com>
3921
3922         * inssel-long.brg: patch to deal with mips missing flags
3923         * inssel-long32-mips.brg: implement overflow checks
3924         * insset-mips.brg: implement overflow checks
3925         * mini-mips.h: implement conditional exception handling
3926         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
3927           Remove unused code, minor cleanups.
3928         * exceptions-mips.c: minor cleanups
3929         * mini-ops.h: add mips conditional exception ops
3930         * cpu-mips.md: add mips conditional exception ops
3931
3932         
3933 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
3934
3935         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
3936         to deal with mips missing of flags.
3937
3938 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
3939
3940         * exceptions-ppc.c: execute fault handlers.
3941
3942 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
3943
3944         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
3945
3946 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3947
3948         * mini.c: handle also floating point values in initialize_array.
3949
3950 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3951
3952         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
3953         array initialization and make it conditional on the intrins option.
3954
3955 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3956
3957         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
3958         relocations and put the patch info names close to the enum definition.
3959
3960 2007-01-15 Mark Mason <mason@broadcom.com>
3961
3962         * basic.cs, exceptions.cs: break up large tests to increase debugability.
3963
3964 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
3965
3966         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
3967
3968 2007-01-12  Raja R Harinath  <rharinath@novell.com>
3969
3970         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
3971
3972 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
3973
3974         * Makefile.am: distribute the mips sources.
3975
3976 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3977
3978         * mini-codegen.h: handle bug #80489 here, by excluding ecx
3979         directly.
3980
3981 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
3982
3983         * cpu-x86.md: back out for now as this triggers other regressions.
3984
3985 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3986
3987         * cpu-x86.md: force src1 and dest regpair for long shift instructions
3988         to eax:edx, so ecx can't get allocated to them (bug #80489).
3989
3990 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
3991
3992         * mini.c, mini-exceptions.c: enabled running fault handlers
3993         (bug #80469).
3994
3995 2007-01-03  Miguel de Icaza  <miguel@novell.com>
3996
3997         * driver.c: If nothing fail, do not use the string "failed",
3998         because it makes it very annoying to view test result logs on the
3999         web. 
4000
4001 2006-12-30  Miguel de Icaza  <miguel@novell.com>
4002
4003         * debug-debugger.c (mono_debugger_main): Rename "main" to
4004         "main_method" to prevent a warning.
4005
4006         Remove a warning for unused field.
4007
4008 2006-12-28  Martin Baulig  <martin@ximian.com>
4009
4010         * debug-debugger.c
4011         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
4012
4013 2006-12-22  Martin Baulig  <martin@ximian.com>
4014
4015         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
4016         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
4017         seperate `.mdb_debug_info' section, so we can access it from the
4018         debugger even if the binary is stripped.
4019
4020         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
4021         from the `.mdb_debug_info' here to prevent the linker from
4022         removing that section.
4023
4024         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
4025         mdb-debug-info64.s.
4026
4027 2006-12-19  Robert Jordan  <robertj@gmx.net>
4028
4029         * mini-x86: enable the code to return small structures in
4030         registers for FreeBSD as well. Fixes bug #80278.
4031         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
4032
4033 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4034
4035         * mini-x86.c: align the stack when calling the profiler
4036         function instrumenting the prolog (on OSX).
4037
4038 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4039
4040         * mini.c: emit a break opcode where Debugger.Break () is called.
4041
4042 2006-12-13  Miguel de Icaza  <miguel@novell.com>
4043
4044         * mini.c (mono_method_to_ir): Provide useful information on this
4045         assert, to prevent others from debugging like I did.
4046
4047 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4048
4049         * mini.c: enable code which was incorrectly commented
4050         (bug #80235).
4051
4052 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4053
4054         * mini-x86.c: enable on OSX, too, the code to return small
4055         structures in registers.
4056
4057 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4058
4059         * mini-x86.c: remove the use of the dynamic code manager here, too.
4060
4061 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4062
4063         * mini.h, debug-debugger.c, tramp-*.c: fixed 
4064         mono_debugger_create_notification_function() to use
4065         mono_global_codeman_reserve () instead of a dynamic code manager.
4066
4067 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4068
4069         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
4070         ves_array_element_address() jit icall and use a generated
4071         managed method instead (which is about 4 times faster for a rank 3
4072         array access).
4073
4074 2006-11-29  Mark Mason  <mason@broadcom.com>
4075
4076         * basic-calls.cs: additional tests for passing
4077         structures as function arguments.
4078
4079 2006-11-29  Mark Mason  <mason@broadcom.com>
4080
4081         * mini-mips.h: disable custom exception handling
4082         * mini-mips.c: throw/rethrow should use jalr to call
4083         exception stubs.  Fixed bug with passing structures
4084         by value. More support for tracing floating point
4085         functions.
4086
4087 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4088
4089         * mini.c: fixed typo in the soft-float ldind.r4 handling
4090         (bug #80086).
4091
4092 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4093
4094         * mini.c, mini.h, driver.c: added --runtime command line
4095         option to select a different runtime than the autodetected one.
4096         * jit.h: added API for embedders to initialize with a specific
4097         runtime version.
4098
4099 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
4100
4101         * mini.c: handle also boxing of r4 values (bug #80024).
4102
4103 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4104
4105         * mini-ppc.c: force indirect calls until we reserve
4106         enough address space for all the generated code.
4107
4108 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
4109
4110         * exceptions-arm.c: workaround bugs in the libc definition
4111         of struct ucontext.
4112
4113 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
4114
4115         * inssel.brg: fixes from me and Mark Mason.
4116
4117 2006-11-23  Dick Porter  <dick@ximian.com>
4118
4119         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
4120         semaphore display now we've fixed the initial value
4121
4122 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4123
4124         * inssel.brg: partially revert the last change to fix the build.
4125
4126 2006-11-21  Mark Mason  <mason@broadcom.com>
4127
4128         * inssel.brg: Add and use compare-and-branch macros to support
4129         architectures that do not have condition code registers (ie. MIPS).
4130         * *-mips.{c,brg,md}: Fix copyright statements
4131
4132 2006-11-20  Mark Mason  <mason@broadcom.com>
4133
4134         * Makefile.am: remove mini-codegen.c from list of MIPS sources
4135         * mini.c: Allow GET_CONTEXT to be specified by the arch port
4136         * mini.h: Added declaration for mono_print_ins()
4137         * mini-codegen.c: added ins_spec initializer for MIPS
4138         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
4139         vreg to be virtual and hreg to be non-virtual.
4140         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
4141         is not yet working/implemented correctly.
4142         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
4143         non-static, fixup calls to print_ins() from other parts in the file.
4144
4145 2006-11-20  Mark Mason  <mason@broadcom.com>
4146
4147         * basic-calls.cs: added tests for passing structures as arguments
4148         to calls.
4149
4150 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
4151
4152         * inssel-long32.brg: optimize signed division by power of two.
4153
4154 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4155
4156         * mini-arm.c: added support for interworking with thumb code
4157         (mono must be still be built using the ARM instruction encoding).
4158
4159 2006-11-19  Miguel de Icaza  <miguel@novell.com>
4160
4161         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
4162         verifier has different rules for it.   Fixes a few verifier issues
4163         in the test suite.
4164
4165         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
4166         at the end, so people know what happened.
4167
4168 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
4169
4170         * brach-opts.c: in optimize_exception_target() make sure we
4171         are in a catch clause (fixes bug #79871).
4172
4173 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4174
4175         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
4176         more soft-float support fixes.
4177
4178 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
4179
4180         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
4181         that are passed half on the stack and half in registers.
4182
4183 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
4184
4185         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
4186         more mips integration work from Mark E Mason 
4187         <mark.e.mason@broadcom.com>.
4188
4189 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4190
4191         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
4192         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
4193         tramp-mips.c: added sources for the mips port, not
4194         integrated in the build yet. Contributed by
4195         Mark E Mason <mark.e.mason@broadcom.com>.
4196
4197 2006-11-14  Neale Ferguson <neale@sinenomine.net>
4198
4199         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
4200
4201 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4202
4203         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
4204         put the soft-float rules in its own file since it seems to
4205         break s390 compilation.
4206
4207 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4208
4209         * mini-arm.c: fixed wrnings.
4210
4211 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
4212
4213         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
4214         inssel-arm.brg: ARM support for soft-float.
4215
4216 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4217
4218         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
4219         loads and stores of 32 bit fp values.
4220
4221 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
4222
4223         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
4224
4225         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
4226         works. Fixes #79852 and #79463.
4227
4228 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4229
4230         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
4231         more soft-float support WIP and fixes.
4232
4233 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
4234
4235         * mini-arm.c: some VFP updates.
4236
4237 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4238
4239         * mini-exceptions.c: 0 is a valid local var offset in some
4240         architectures, don't assert (bug #78508).
4241
4242 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
4243
4244         * exceptions-arm.c: fixed off by one error in stack walk code.
4245
4246 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
4247
4248         * mini.h, mini.c: more precise tracking of type load exceptions.
4249
4250 2006-11-03  Robert Jordan  <robertj@gmx.net>
4251
4252         * Makefile.am: [WIN32] Add monow.exe target.
4253         * driver.c: [WIN32] Don't detach the console when debugging.
4254         Fixes bug #79797.
4255         
4256 2006-10-30  Miguel de Icaza  <miguel@novell.com>
4257
4258         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
4259
4260 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
4261
4262         * aot-compiler.c (emit_method_info): Add a case missed earlier.
4263
4264         * driver.c (mini_regression): Fix --regression with AOT.
4265
4266         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
4267
4268 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
4269
4270         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
4271
4272         * mini-sparc.h: Don't use sigaction on sparc/linux.
4273
4274         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
4275
4276         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
4277
4278         * mini-exceptions.c: Add proper include files for getpid ().
4279
4280 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
4281
4282         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
4283         address instead of a MonoJitInfo* to avoid decoding the exception info for the
4284         method.
4285
4286         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
4287         name cache to reduce its size.
4288
4289         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
4290
4291 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
4292
4293         * mini-x86.c: Save/restore the current LMF structure more efficiently using
4294         the mono_lmf TLS variable.
4295
4296         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
4297         trampoline lmf frames.  
4298
4299         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
4300
4301 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
4302
4303         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
4304         the mono_lmf TLS variable.
4305
4306         * mini-exceptions.c: Access the LMF structure through accessors.
4307
4308         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
4309         variable instead of in jit_tls->lmf.
4310
4311         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
4312         
4313         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
4314         trampoline lmf frames.
4315
4316         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
4317
4318 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
4319
4320        * mini.c trace.c mini-x86.c: Revert these too.
4321         
4322        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
4323        signature change.
4324
4325 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
4326
4327         * genmdesc.c: removed now dead code.
4328
4329 2006-10-09  Robert Jordan <robertj@gmx.net>
4330
4331         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
4332
4333 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
4334
4335         * mini.h: do not leave gaps in the opcode values.
4336
4337 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
4338
4339         * jit-icalls.h: flag functions as internal here, too.
4340
4341 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
4342
4343         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
4344         functions with the internal attribute.
4345
4346 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
4347
4348         * aot-compiler.c: fclose the file descriptor in the profile read loop.
4349
4350 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
4351
4352         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
4353         for soft-float.
4354
4355 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
4356
4357         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
4358         tail calls as on other platforms.
4359
4360         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
4361
4362         * iltests.il: Add a few tailcall tests.
4363
4364 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4365
4366         * driver.c: fix loop for old compilers (bug #79521).
4367
4368 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
4369
4370         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
4371
4372         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
4373
4374         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
4375         metadata without any code.
4376
4377         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
4378         more precise debugging information using gdb.
4379
4380 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
4381
4382         * inssel-ia64.brg: Make the helper methods static.
4383
4384 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4385
4386         * inssel-x86.brg: make the helper methods static.
4387
4388 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
4389
4390         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
4391
4392 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4393
4394         * mini.c: updates for monoburg changes.
4395         * inssel.brg: make a few helper functions static as they should.
4396
4397 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
4398
4399         * Makefile.am: Move mini-codegen.c to common_sources.
4400
4401 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4402
4403         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
4404         instructions.
4405         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
4406         mini-ppc.h: port to use the common local register allocator.
4407
4408 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4409
4410         * mini.h: Remove the comment too then.
4411
4412 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
4413
4414         * mini.h: put back backend.data which is to be used shortly and
4415         doesn't increase the size of MonoInst. If any 64 bit arch aligned
4416         pointers on 4 byte boundaries it'd have much bigger issues running
4417         and you can ifdef it out anyway.
4418
4419 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4420
4421         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
4422         MonoInst size by 4 bytes on 64 bit machines.
4423
4424 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4425
4426         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
4427         replacement with more meaningful field names. Arch maintainers, please
4428         check the assigned names are good enough for your arch.
4429
4430 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4431
4432         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
4433         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
4434
4435 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
4436
4437         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
4438         relocations and memory requirements, put the optimization flags
4439         definitions in their own file.
4440
4441 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
4442
4443         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
4444
4445         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
4446
4447 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
4448
4449         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
4450
4451 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
4452
4453         * inssel.brg: use the correct function to get the size of an item
4454         in an array, given an element class.
4455         * aot-compiler.c: do not access class->class_size directly.
4456
4457 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4458
4459         * mini.h, debug-mini.c: added a debugging function to print
4460         info about local variables and arguments in a jitted method.
4461
4462 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
4463
4464         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4465
4466         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
4467
4468 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4469
4470         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
4471         inner and outer loops when passing vtypes.
4472
4473 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
4474
4475         * mini-ppc.c: take into account the cpu errata for cache flushing
4476         which caused some random errors (bug #79381).
4477
4478 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4479
4480         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
4481         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
4482
4483 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
4484
4485         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
4486         loaded.
4487
4488         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
4489         freebsd ports tree.
4490
4491         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
4492         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
4493
4494         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
4495         displacement.
4496
4497 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
4498
4499         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
4500
4501 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
4502
4503         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
4504         macro does not have to be changed during debugging.
4505
4506         * 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>.
4507
4508         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
4509
4510         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
4511         
4512         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
4513         MONO_ARCH_NO_EMULATE_MUL is defined.
4514
4515         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
4516
4517         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
4518
4519         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
4520
4521         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
4522         
4523 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
4524
4525         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
4526         stuff to mini-exceptions.c where it is used.
4527
4528         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
4529         setup code, the real one is in mini-exceptions.c.
4530
4531         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
4532         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
4533         some changes from the freebsd ports tree.
4534
4535         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
4536         constants.
4537         
4538         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
4539
4540 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
4541
4542         * mini.c: on Linux, check for /proc to be mounted
4543         (bug# 79351, novell bug#201204).
4544
4545 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
4546
4547         * mini.c: handle cases where pthread_attr_getstack() behaves
4548         incorrectly (bug #78096).
4549
4550 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
4551
4552         * mini-arm.c: support larger stack frames (bug #79272).
4553
4554 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
4555
4556         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
4557
4558         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
4559         tokens.
4560
4561         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
4562         mono_class_from_name () to find a class from its name.
4563
4564         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
4565
4566 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
4567
4568         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
4569
4570 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
4571
4572         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
4573
4574 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
4575
4576         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
4577         callinfo->trampoline.
4578
4579         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
4580         fixes #79271.
4581         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
4582         future.
4583
4584 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
4585
4586         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
4587
4588 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
4589
4590         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
4591         stats.method_trampolines, it is already done by the generic trampoline code.
4592
4593         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
4594         
4595 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
4596
4597         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
4598
4599         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
4600
4601         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
4602
4603         * mini.c (print_jit_stats): Print mscorlib mempool size too.
4604         
4605         * mini.c (print_jit_stats): Print new stats.
4606
4607         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4608
4609 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
4610
4611         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
4612         Address on two dimensional arrays. Fixes #78729.
4613
4614         * mini.h (MonoCompile): Add a 'skip_visibility' field.
4615
4616         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
4617         a method.
4618
4619         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
4620
4621         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
4622         #79130.
4623         
4624         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
4625         a race condition.
4626         (mini_get_ldelema_ins): Ditto.
4627
4628 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
4629
4630         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
4631         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
4632         Fixes #79213.
4633
4634 2006-08-29 Neale Ferguson <neale@sinenomine.net>
4635
4636         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
4637         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
4638
4639         * exceptions-s390x.c: Cosmetic change.
4640
4641         * tramp-s390.c: Fix warning.
4642
4643         * cpu-s390.md: Correct length of mul_imm.
4644
4645 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
4646
4647         * aot-compiler.c: added binary writer with ELF backend
4648         implementation (only on Linux/x86 for now).
4649
4650 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4651
4652         * Makefile.am: Don't run net 2.0 AOT tests.
4653
4654         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
4655         (mono_compile_assembly): Skip net 2.0 assemblies as well.
4656
4657         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
4658
4659 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
4660
4661         * aot-compiler.c: simplified and refactored the asm-writing code
4662         to allow different backends.
4663
4664 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4665
4666         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4667
4668         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
4669         little. Share patches of type TYPE_FROM_HANDLE as well.
4670
4671         * mini.c (mono_patch_info_equal): New helper function.
4672         (mono_patch_info_hash): Ditto.
4673
4674         * aot-compiler.c (emit_method_code): Fix s390 build.
4675
4676         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
4677         is not handled because it is stored as a flag and not as a type ctor. Fixes
4678         #79016.
4679
4680 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
4681
4682         * aot-compiler.c: Fix computation of GOT slot statistics.
4683         
4684         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
4685         Also remove support for not PIC AOT.
4686
4687         * mini.h: Bump AOT file format version.
4688
4689         * objects.cs: Add a test for #78990.
4690
4691         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
4692         (peter.dettman@iinet.net.au). Fixes #79087.
4693
4694         * basic-long.cs: Add a test for the above.
4695
4696 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
4697
4698         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
4699         
4700         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
4701         code somewhat.
4702
4703 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
4704
4705         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
4706         exceptions.
4707
4708 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
4709
4710         * mini.c: Don't verify COM proxy invoke calls
4711         
4712
4713 2006-08-10  Dick Porter  <dick@ximian.com>
4714
4715         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
4716         which process is holding semaphores locked.
4717
4718 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
4719
4720         * mini-ia64.c mini-amd64.c: Fix #79027.
4721
4722         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
4723
4724         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
4725
4726         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
4727         implicit arguments in a vararg call. Fixes #79027.
4728
4729 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
4730
4731         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
4732         (mono_get_array_new_va_signature): Ditto.
4733
4734 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
4735
4736         * aot-runtime.c: Call init_plt lazily.
4737
4738         * inssel-long.brg: Fix unsigned long->int conversion.
4739
4740         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
4741
4742         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
4743         that most data is now in the .rss/.data section.
4744
4745 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
4746
4747         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
4748
4749         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
4750
4751         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
4752
4753         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
4754
4755         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
4756         virtual call. Fixes #79010.
4757
4758         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
4759         and use the result as the this argument in the real call.
4760
4761         * generics.2.cs: Add a new test for #79010.
4762         
4763 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
4764
4765         * mini-x86.c: Fix a warning.
4766
4767         * aot-compiler.c: Add a bunch of statistics.
4768
4769         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
4770
4771 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
4772
4773         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
4774
4775 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
4776
4777         * 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>.
4778
4779 2006-07-13  Miguel de Icaza  <miguel@novell.com>
4780
4781         * mini.c (mono_method_to_ir): Obtain the original method in the
4782         CIL stream and use this to perform validation.
4783
4784         Fixed: #78816
4785
4786 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
4787
4788         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
4789         (mono_arch_call_opcode): Ditto.
4790
4791         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
4792         #78826.
4793
4794         * mini.c (mono_patch_info_dup_mp): New helper function.
4795         
4796         * aot-compiler.c (compile_method): Fix some of the memory allocated during
4797         compilation. Fixes #78827.
4798
4799 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
4800
4801         * declsec.c: Use original security informations for
4802           MONO_WRAPPER_MANAGED_TO_MANAGED.
4803
4804 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
4805
4806         * mini.c: Allow Com Interop methods/classes and
4807         don't verify COM wrapper calls
4808         
4809
4810 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
4811
4812         * inssel-long32.brg: Fix long->i4 checked conversion.
4813
4814         * exceptions.cs: Add a test for the above.
4815
4816 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
4817
4818         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
4819
4820         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
4821         leaks.
4822
4823         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
4824         #78775.
4825
4826 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
4827
4828         * mini.c: Fix solaris/x86 exception handling.
4829
4830         * Makefile.am: Get rid of $(ICU_LIBS).
4831
4832 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
4833
4834         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
4835         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
4836         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
4837
4838         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
4839
4840         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
4841         this function causes a SIGSEGV.
4842
4843 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
4844
4845         * mini.c: Remove unused solaris/x86 includes.
4846
4847 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
4848
4849         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
4850
4851 2006-06-20  Jb Evain  <jbevain@gmail.com>
4852
4853         * cpu-g4.md: fix max length of start_handler instruction.
4854
4855 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
4856         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
4857
4858 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
4859         * ssa.c: Fixed bug 78653 for SSA based deadce.
4860         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
4861         MonoInst.flags, used in SSA based deadce.
4862         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
4863         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
4864
4865 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
4866
4867         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
4868         it can end up using non executable memory on ppc64 systems
4869         running ppc32 userspace (fix from Johannes Berg).
4870
4871 2006-06-14  Dick Porter  <dick@ximian.com>
4872
4873         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
4874         4.1.1
4875
4876 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
4877         * mini.c: Made so that inline is locally disabled if it would
4878         trigger a .cctor, because too many apps depend on this behavior
4879         (which seems to be also the one of the MS CLR).
4880
4881 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
4882
4883         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
4884         No idea why this worked before.
4885
4886         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
4887         which branch to outer exception clauses since they could skip the
4888         inner finally clauses. Fixes #78633.
4889
4890         * exceptions.cs: Add a test for the above.
4891
4892         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
4893         Fixes #78629.
4894
4895         * iltests.il: Add a test for the above.
4896
4897 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
4898
4899         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
4900         after the end of a try bblock, to prevent asserts in mini_method_compile ().
4901
4902         * iltests.il: Add a test for the above.
4903
4904 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
4905
4906         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
4907         
4908         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
4909         methods as instrinsics.
4910
4911 2006-06-09  Wade Berrier <wberrier@novell.com>
4912
4913         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
4914         (simple-cee-ops.h ssapre-mini-ops.h)
4915
4916 2006-06-09  Neale Ferguson <neale@sinenomine.net>
4917
4918         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
4919         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
4920         instruction).
4921         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
4922         * cpu-s390x.md: Fix max. length values for a couple of instructions.
4923
4924 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
4925
4926         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
4927
4928 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
4929
4930         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
4931         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
4932         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
4933         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
4934         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
4935         of opcodes, so that bug 78549 should not happen again.
4936         * ssapre.c: Updated to use the renamed files.
4937
4938 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
4939
4940         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
4941         in OP_ATOMIC_EXCHANGE_I4.
4942
4943 2006-06-07  Wade Berrier <wberrier@novell.com>
4944
4945         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
4946         in mono_debugger_create_notification_function)
4947
4948 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
4949
4950         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
4951         
4952         * mini.c (type_from_stack_type): Disable some changes which do not
4953         seem to work.
4954
4955         * driver.c: Reenable opts.
4956
4957         * mini.h (MonoStackSlot): New structure to keep track of the verification state
4958         of the evaluation stack.
4959         
4960         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
4961         evaluation stack trace at entry to the bblock.
4962
4963         * mini.c (merge_stacks): New function to perform verification of stack merges.
4964         Turned off by default.
4965
4966         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
4967         STACK_MP.
4968         
4969 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
4970
4971         * local-propagation.c: Fixed bug 78549.
4972
4973 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
4974
4975         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
4976
4977 2006-06-02  Miguel de Icaza  <miguel@novell.com>
4978
4979         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
4980         tramp-arm.c, tramp-ia64.c
4981         (mono_debugger_create_notification_function): Update signature to
4982         new signature and use new protocol for creating the notification
4983         function.  
4984
4985         Should fix the build.
4986
4987 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
4988
4989         * exceptions-ppc.c (mono_jit_walk_stack)
4990         (ves_icall_get_frame_info): Fix the build
4991
4992 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
4993
4994         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
4995
4996 2006-05-31  Raja R Harinath  <rharinath@novell.com>
4997
4998         * il2tests.2.il: New file for generics CIL tests.  Add test for
4999         #78019.
5000         * Makefile.am: Update.
5001
5002         Fix #78019
5003         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
5004         to nullable types.
5005
5006 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
5007
5008         * aliasing.c: Fixed bug 78311.
5009
5010 2006-05-29  Martin Baulig  <martin@ximian.com>
5011
5012         * mini-exceptions.c (mono_find_jit_info): When computing the
5013         native offset, check whether we're actually inside the method's
5014         code; call mono_debug_print_stack_frame() to format the frame.
5015         (ves_icall_System_Exception_get_trace): Call
5016         mono_debug_print_stack_frame() to format the stack frame.
5017         (ves_icall_get_trace): Update to the new debugging API.
5018         (mono_jit_walk_stack_from_ctx): Likewise.
5019         (ves_icall_get_frame_info): Likewise.
5020
5021         * mini.c (get_method_from_ip): Use the new debugging API.
5022         (mono_print_method_from_ip): Likewise.
5023
5024         * exceptions-ppc.c
5025         (mono_jit_walk_stack): Use the new debugging API.
5026         (ves_icall_get_frame_info): Likewise.   
5027
5028 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
5029
5030         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
5031
5032 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
5033
5034         * mini.c: Added "limitator" to inline for debugging.
5035
5036 2006-05-24  Martin Baulig  <martin@ximian.com>
5037
5038         * debug-debugger.c (mono_debugger_init): Create a private,
5039         malloc()-based code manager for the notification function and
5040         intentionally leak it on exit.  This fixes the crash-on-exit race
5041         condition.
5042
5043         * tramp-amd64.c
5044         (mono_debugger_create_notification_function): Added
5045         `MonoCodeManager *' argument.
5046
5047         * tramp-x86.c
5048         (mono_debugger_create_notification_function): Added
5049         `MonoCodeManager *' argument.
5050
5051 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
5052
5053         * aliasing.c: Fixed 64 bit issue.
5054         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5055         default since all known bugs are fixed (one more time!).
5056
5057 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
5058
5059         * mini.c: write barrier support.
5060
5061 2006-05-23  Martin Baulig  <martin@ximian.com>
5062
5063         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
5064         check at the top of the file.
5065
5066 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
5067
5068         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
5069         reverting changes without reason and without changelog entries.
5070
5071 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
5072
5073         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
5074         to a few opcodes. Fixes #78439.
5075
5076         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
5077         consistency with other archs.
5078
5079         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
5080
5081 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5082
5083         * debug-debugger.c: fix the build.
5084
5085 2006-05-17  Martin Baulig  <martin@ximian.com>
5086
5087         * debug-debugger.c
5088         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
5089         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
5090         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
5091         (debugger_attach): Call GC_mono_debugger_add_all_threads().
5092
5093 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
5094
5095         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
5096
5097 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
5098
5099         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
5100         MONO_TYPE_GENERICINST.
5101         
5102         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
5103         MONO_TYPE_GENERICINST.
5104
5105 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
5106
5107         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
5108         #78325.
5109
5110 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
5111
5112         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
5113         mempool.
5114         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
5115
5116 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
5117
5118         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
5119         mono_trace_cleanup ().
5120
5121         * iltests.il: Fix problem with the newly added test.
5122
5123         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
5124         due to register constraints, free up the previous hreg. Fixes #78314.
5125
5126         * iltests.il: Add new test for #78314.  
5127
5128         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
5129         Interlocked.Add. Fixes #78312.
5130
5131         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
5132         
5133 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
5134
5135         * inssel.brg (mini_emit_virtual_call): Fix a warning.
5136
5137 2006-05-05  Martin Baulig  <martin@ximian.com>
5138
5139         * debug-mini.c (mono_debug_open_block): New method.
5140
5141         * mini-amd64.c
5142         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5143         the beginning of each basic block.
5144
5145         * mini-x86.c
5146         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5147         the beginning of each basic block.
5148
5149 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5150
5151         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5152         default until I understand why they break the build on amd64.
5153
5154 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
5155
5156         * mini.c (mini_cleanup): Call mono_cleanup ().
5157
5158         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
5159         errors.
5160
5161 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5162
5163         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
5164         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5165         default since all known bugs are fixed, and I cannot reproduce bug
5166         77944... I'm asking Matt Hargett to test again after this commit.
5167
5168 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
5169
5170         * mini-codegen.c: Fixed typo that thrashed inline.
5171
5172 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
5173
5174         * dominators.c (compute_dominators): Avoid using a worklist since
5175         it is not correct in some cases. Instead, iterate over all bblocks as
5176         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
5177
5178 2006-04-28  Miguel de Icaza  <miguel@novell.com>
5179
5180         * mini.c (mono_jit_compile_method_inner): Use
5181         mono_prepare_exception_from_error that resets the value
5182         internally.
5183
5184 2006-04-27  Miguel de Icaza  <miguel@novell.com>
5185
5186         * mini.c: Move the mini_loader_error_to_exception to metadata. 
5187         
5188 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5189
5190         * aliasing.c: Fixed bug 78210.
5191
5192 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5193
5194         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5195         default until all their problems (or the ones they trigger) are fixed.
5196
5197 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
5198
5199         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
5200         
5201         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
5202         as loaded only after resolving patches since that could invoke the same method.
5203
5204         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
5205
5206         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
5207         functions.
5208
5209         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
5210         AOT loader.
5211
5212         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
5213         stack.
5214
5215         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
5216         made from AOT code through the PLT table.
5217
5218         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
5219         holding the plt offset when a call is made to the aot plt trampoline.
5220         
5221 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5222
5223         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
5224         amd64 AOT support.
5225
5226         * Makefile.am (common_sources): Fix build breakage.
5227
5228         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
5229         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
5230         intra-assembly calls if possible.
5231         
5232         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
5233
5234         * mini-trampolines.c: Handle PLT entries.
5235
5236         * mini.c: Avoid creating a GOT var for calls.
5237
5238         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
5239         from mscorlib code.
5240
5241         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
5242         from mscorlib code.
5243
5244         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
5245         AOT code.       
5246
5247         * mini.h: Bump AOT file format version.
5248         
5249         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
5250         covers more cases.
5251
5252 2006-04-25  Martin Baulig  <martin@ximian.com>
5253
5254         * driver.c: Disable copyprop, consprop and inline when running
5255         inside the debugger.
5256
5257 2006-04-25  Martin Baulig  <martin@ximian.com>
5258
5259         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
5260         with `get_current_thread' and added `detach'.
5261         (MonoDebuggerMetadataInfo): Added `thread_size',
5262         `thread_tid_offset', `thread_stack_ptr_offset' and
5263         `thread_end_stack_offset'.
5264
5265 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5266
5267         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
5268         aot-runtime.c.
5269
5270         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
5271         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
5272
5273         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
5274
5275         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
5276
5277         * aot.c: Add support for ADJUSTED_IID.  
5278
5279 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
5280
5281         * aot.c (emit_method_order): Don't align method_order_end.
5282
5283         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
5284         the interface ID changes.
5285
5286 2006-04-21  Dick Porter  <dick@ximian.com>
5287
5288         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
5289         cleaning up a thread.  Fixes the new part of bug 77470.
5290
5291 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
5292
5293         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
5294         to managed wrapper.
5295                      
5296 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
5297
5298         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
5299         
5300         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
5301         SIGSEGV. Fixes #78072.
5302
5303         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
5304         unregister our SIGABRT handler.
5305
5306 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
5307
5308         * mini.c: Disabled inline where it can alter the call stack in a
5309         way visible from managed code.
5310         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
5311         default.
5312
5313 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
5314
5315         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
5316         on other platforms. Fixes #78089.
5317
5318 2006-04-13  Martin Baulig  <martin@ximian.com>
5319
5320         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
5321         determine whether we're inside the debugger.
5322
5323         * debug-debugger.h
5324         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
5325
5326 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
5327
5328         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
5329         handler clauses. Fixes #78024.
5330
5331         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
5332         in the CALL_MEMBASE opcodes. Fixes #78088.
5333         (mono_arch_get_vcall_slot_addr): Ditto.
5334
5335 2006-04-10  Martin Baulig  <martin@ximian.com>
5336
5337         * debug-debugger.c: The thread handling code has now been moved
5338         into ../metadata/threads.c.
5339
5340 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5341
5342         * driver.c (mono_main): Fix --with-gc=none build.
5343
5344         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
5345         (mono_spillvar_offset_float): Ditto.
5346         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
5347         hreg, not when its !global, since on ia64, there is a third category: stacked
5348         registers.      
5349
5350 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
5351
5352         * mini.c: set MonoInst->klass for load field address and a few other
5353         places.
5354
5355 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5356
5357         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
5358
5359 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
5360
5361         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
5362         the branch opt changes.
5363
5364 2006-04-06  Dick Porter  <dick@ximian.com>
5365
5366         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
5367         
5368         * wapihandles.c (mini_wapi_seminfo): 
5369         * driver.c (mono_main): Add semaphore info option
5370
5371 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
5372
5373         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
5374         branch optimization changes. Fixes #78009.
5375
5376 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5377
5378         * mini.c: ignore accessibility of methods in managed->native wrappers.
5379
5380 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
5381
5382         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
5383         
5384         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
5385
5386 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
5387
5388         * mini.c: Modify the branch optimizations to preserve the invariant that
5389         the entries inside the in_bb and out_bb arrays are unique.
5390         (mono_unlink_bblock): Avoid creation of new arrays.
5391
5392 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
5393
5394         * mini.c (mono_unlink_bblock): Fix regression caused by previous
5395         change (#77992).
5396
5397 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
5398
5399         * mini.c (optimize_branches): Remove the "optimizations" in
5400         the cbranch1/cbranch2 -> branch cases which were causing several
5401         problems in the past. Fixes #77986.
5402
5403 2006-03-31  Chris Toshok  <toshok@ximian.com>
5404
5405         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
5406         default optimizations :(
5407
5408 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
5409
5410         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
5411         branch.
5412
5413 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
5414
5415         * local-propagation.c: Added comments to structs and removed
5416         "Mono" prefixes from local tree mover types.
5417
5418 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
5419
5420         * Makefile.am (arch_sources): Define this for each architecture so 
5421         libmono_la_SOURCES is defined in one place.
5422
5423 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
5424
5425         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
5426         from handles/.
5427
5428 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
5429
5430         * driver.c: print the GC name supplied by configure.
5431
5432 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
5433
5434         * local-propagation.c: Added tree mover, and moved here all the
5435         local propagation code from mini.c
5436         * mini.c: Added support for treeprop, and moved all the local
5437         propagation code to local-propagation.c
5438         * mini.h: Added support for treeprop
5439         * driver.c: Added support for treeprop, enabled consprop, copyprop,
5440         treeprop, inline and deadce by default
5441         * Makefile.am: Added local-propagation.c
5442
5443 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
5444
5445         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
5446
5447 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
5448
5449         * debug-debugger.c: make it compile without the Boehm GC.
5450
5451 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
5452
5453         * mini.c: fixed issue with mismatch when an icall is registered
5454         with multiple names but same address.
5455
5456 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5457
5458         * declsec.c, mini-exceptions.c: use write barrier to set reference
5459         fields of managed objects.
5460
5461 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5462
5463         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
5464         (can_access_internals): Fix a warning.
5465
5466         * mini.c (print_method_from_ip): Rename this to 
5467         mono_print_method_from_ip so it gets exported.
5468
5469         * trace.c: Deal with strings inside StringBuilder's containing garbage
5470         and fix memory leaks. Fixes #77848.
5471
5472 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5473
5474         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
5475         fixes #77787.
5476
5477 2006-03-16 Neale Ferguson <neale@sinenomine.net>
5478         
5479         * mini-s390.c: Remove OP_X86_TEST_NULL.
5480
5481 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5482
5483         * mini.c: use the correct GetHashCode() for the moving collector.
5484
5485 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
5486
5487         * liveness.c: Regalloc spill cost tuning.
5488
5489 2006-03-15 Neale Ferguson <neale@sinenomine.net>
5490         
5491         * mini-s390x.h: Correct S390_LONG macro.
5492
5493         * mini-s390x.c: Cleanup unused code.
5494
5495 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
5496
5497         * jit-icalls.h: New file.
5498
5499         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
5500         icalls and include that instead of including jit-icalls.c.
5501
5502         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
5503         OP_X86 opcodes.
5504
5505 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
5506
5507         * mini.c: when checking for member accessibility, also check for
5508         friend assemblies and for explicit interface implementations.
5509
5510 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
5511
5512         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
5513
5514         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
5515
5516         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5517         common cases are done first.    
5518
5519         * mini-ops.h: Only define platform specific opcodes on the given platform.
5520
5521         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
5522         branch.
5523         
5524 2006-03-14  Martin Baulig  <martin@ximian.com>
5525
5526         Revert Paolo's change from r57348:
5527
5528         * mini.h: don't use gboolean for bitfields.
5529         * mini.c: verifier changes for fields and methods accessibility.
5530
5531 2006-03-13  Neale Ferguson <neale@sinenomine.net>
5532
5533         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
5534
5535         * mini-s390x.c: Fix conv_r_un.
5536
5537         * cpu-s390, cpu-s390x.md: Fix lengths.
5538
5539 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
5540
5541         * mini.c: nested types have access to all the nesting
5542         levels, not just the enclosing types.
5543
5544 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5545
5546         * mini.c: added a few more verification checks.
5547
5548 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
5549
5550         * liveness.c: Merge optimizations from the linear-il branch.
5551
5552 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5553
5554         * mini-ia64.c (emit_call): Add a comment.
5555
5556         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
5557
5558         * tramp-ia64.c: Fix some warnings.
5559
5560 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
5561
5562         * mini.h: don't use gboolean for bitfields.
5563         * mini.c: verifier changes for fields and methods accessibility.
5564
5565 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5566
5567         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
5568         lazy icall wrapper changes.
5569
5570         * dominators.c: Replace all the dominator algorithms with faster
5571         ones from the linear-il branch.
5572
5573         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
5574         the mempool.
5575
5576         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5577         common cases are done first.
5578
5579         * mini-amd64.c: Fix some warnings.
5580
5581         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
5582         from the mempool.
5583
5584         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
5585         added code.
5586
5587         * mini.h: Add a missing prototype.
5588
5589 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
5590
5591         * mini.c: Compile icall wrappers lazily.
5592
5593         * mini-codegen.c: Use printf instead of g_print since its much faster.
5594
5595         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
5596         function.
5597
5598         * mini.c (optimize_branches): Cache the negative result from 
5599         remove_block_if_useless ().
5600
5601         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
5602         Also fix some bblock linking issues.
5603
5604         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
5605         assembly files.
5606
5607         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
5608
5609         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
5610         accessed fields first, for better cache behavior.
5611         
5612 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
5613
5614         * mini.c: speedup IList<T> array accesses.
5615
5616 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
5617
5618         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
5619         inline_costs counter. Fixes #77190.
5620
5621 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
5622
5623         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
5624         trace messages. Fixes #77706.
5625
5626 2006-03-04  Martin Baulig  <martin@ximian.com>
5627
5628         * tramp-amd64.c, tramp-x86.c
5629         (mono_debugger_create_notification_function): Use
5630         mono_global_codeman_reserve() to allocate a buffer at runtime and
5631         return it.
5632
5633         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
5634
5635         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
5636         notification function at runtime and then call `initialize' in the
5637         `MONO_DEBUGGER__debugger_info' vtable.
5638
5639 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
5640
5641         * iltests.il: Fix a visibility problem.
5642
5643 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5644
5645         * driver.c, mini.c: add hooks for the counters API.
5646
5647 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5648
5649         * driver.c: show disabled options.
5650
5651 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
5652
5653         * linear-scan.c: always use cost-driven selection.
5654
5655 2006-02-28  Raja R Harinath  <rharinath@novell.com>
5656
5657         * jit-icalls.c (helper_compile_generic_method): Revert change from
5658         2006-02-24.
5659
5660 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
5661
5662         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
5663
5664 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
5665
5666         * inssel.brg: style fixes, mostly to force the updated monoburg
5667         to run for people using svn.
5668
5669 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
5670
5671         * mini.c: match monoburg changes.
5672
5673 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5674
5675         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
5676         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
5677         declaration in the header file.
5678
5679 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
5680
5681         * helpers.c: reduce relocations and mem usage.
5682
5683 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
5684
5685         * mini.h, mini-codegen.c: disable logging features if
5686         requested by configure.
5687
5688 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
5689
5690         * mini.c: tiny verifier changes.
5691
5692 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5693
5694         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
5695         cpu-pentium.md: stack alignment changes for osx/x86,
5696         partially from Geoff Norton <gnorton@customerdna.com>.
5697
5698 2006-02-24  Raja R Harinath  <harinath@gmail.com>
5699
5700         * jit-icalls.c (helper_compile_generic_method): Update to changes
5701         in metadata/class.c.
5702
5703 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
5704         
5705         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
5706         
5707         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
5708         interface calls with large offsets.
5709
5710 2006-02-23  Raja R Harinath  <rharinath@novell.com>
5711
5712         * jit-icalls.c (helper_compile_generic_method): Document the
5713         special-case we depend on so that we can inflate the method twice
5714         with the same context with no bad side-effects.
5715
5716 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
5717
5718         * mini-x86.c, mini-amd64.c: fix for case when xen support
5719         is disabled.
5720
5721 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
5722
5723         * mini-x86.c, mini-amd64.c: generate code to access tls items
5724         in a faster way for Xen systems.
5725
5726 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5727
5728         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
5729         updates and compilation fixes for the OSX/x86 port, mostly from
5730         Geoff Norton <gnorton@customerdna.com>.
5731
5732 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
5733
5734         * inssel.brg: faster interface call implementation
5735         to sync with the interface_offsets MonoVTable changes.
5736
5737 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5738
5739         * mini.c: more verification checks.
5740
5741 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
5742
5743         * mini.c: added a few more verification checks.
5744
5745 2006-02-17      Neale Ferguson <neale@sinenomine.net>
5746
5747         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
5748         facility on the processor and use it if available.
5749
5750 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5751
5752         * driver.c, aot.c, mini.c: throw exception if the IL code is
5753         invalid or unverifiable.
5754
5755 2006-02-17  Raja R Harinath  <rharinath@novell.com>
5756
5757         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
5758         m.StructField.
5759
5760 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
5761
5762         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
5763
5764 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5765
5766         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
5767         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
5768         handling of instantiated generic valuetypes.
5769
5770 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
5771
5772         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
5773         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
5774         instead.
5775
5776         * generics.2.cs: Revert the nullable reftypes tests.
5777
5778 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
5779
5780         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
5781         using __builtin_frame_address (1) as it doesn't work in the presence
5782         of optimizations. Hopefully fixes #77273.
5783
5784         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
5785         -> generics.cs change as it doesn't work with some automake versions.
5786
5787 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5788
5789         * mini.c: handle systems that sue a different way to
5790         retrieve the stack address of the current thread.
5791
5792 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
5793
5794         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
5795         it specially in the makefile.
5796
5797         * generics.2.cs: Add tests for nullable reference types.
5798
5799 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5800
5801         * mini.c: always handle the case when mono_jit_init()
5802         is called in a thread different from the main thread,
5803         confusing libgc (bug #77309).
5804
5805 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
5806
5807         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
5808
5809 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5810
5811         * mini.c: change optimize_branches () to use a single loop
5812         and introduce a new optimization to simplify some range checks.
5813
5814 2006-02-03  Martin Baulig  <martin@ximian.com>
5815
5816         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
5817         and merged with debugger_thread_manager_add_thread().
5818         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
5819         inform the debugger about the main thread.
5820
5821 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
5822
5823         * basic.cs: Add test for div.un/rem.un constant folding.
5824
5825 2006-02-03  Neale Ferguson <neale@sinenomine.net>
5826
5827         * cpu-s390x.md: correct int_xor_imm length
5828
5829 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
5830
5831         * generics.2.cs: New test for #77442.
5832
5833         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
5834         #77442.
5835
5836 2006-02-02  Martin Baulig  <martin@ximian.com>
5837
5838         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
5839         <mono/metadata/mono-debug-debugger.h>   
5840
5841         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
5842
5843 2006-02-02  Martin Baulig  <martin@ximian.com>
5844
5845         * debug-debugger.h: New header file for debug-debugger.c.
5846
5847         * debug-debugger.c: Big API cleanup; don't run the managed Main()
5848         function is a separate thread anymore; add support for attaching.
5849
5850 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
5851
5852         * tramp-x86.c: Fix a warning.
5853
5854 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
5855
5856         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
5857         on very large methods.
5858
5859         * aot.c (load_patch_info): Fix a warning.
5860
5861 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
5862
5863         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
5864         mini-ops.h: alu membase optimizations.
5865
5866 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
5867
5868         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
5869         to speedup StringBuilder.
5870
5871 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
5872
5873         * dominators.c (mono_compute_natural_loops): Fix detection of
5874         loop body start blocks.
5875
5876         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
5877
5878 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
5879
5880         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
5881         #75145.
5882
5883 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
5884
5885         * aliasing.c: Fixed aliasing issue on 64 bit archs.
5886
5887 2006-01-25  Martin Baulig  <martin@ximian.com>
5888
5889         * debug-debugger.c: Moved the `MonoDebuggerManager' and
5890         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
5891         started to cleanup this file a little bit.
5892
5893 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
5894
5895         * mini.c: optimize a codepath frequently happening in generics code.
5896
5897 2006-01-23  Martin Baulig  <martin@ximian.com>
5898
5899         * Makefile.am: Only compile debug-debugger.c on supported platforms.
5900
5901         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
5902         functions directly.
5903
5904         * driver.c: debug-debugger.c is only available if
5905         `MONO_DEBUGGER_SUPPORTED' is defined.   
5906
5907 2006-01-23  Martin Baulig  <martin@ximian.com>
5908
5909         * debug-debugger.c: Only enable this on platforms where the Mono
5910         Debugger is working (x86 and x86_64).
5911
5912 2006-01-21  Martin Baulig  <martin@ximian.com>
5913
5914         The Mono Debugger is now using the normal `mono' instead of the
5915         `mono-debugger-mini-wrapper' when executing managed code.
5916
5917         * debug-debugger.c: New file; previously known as
5918         debugger/wrapper/wrapper.c.
5919
5920         * debug-mini.c (mono_init_debugger): Removed.
5921
5922         * driver.c (mono_main): Added new `--inside-mdb' command line
5923         argument which is used when running inside the debugger.
5924
5925 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
5926
5927         * liveness.c (mono_analyze_liveness): Remove some unused data
5928         structures.
5929
5930 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
5931
5932         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
5933
5934 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
5935
5936         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
5937         depends on implementation details of monobitset.
5938
5939         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
5940         Fixes #77271.
5941
5942 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
5943
5944         * liveness.c: Update after monobitset changes.
5945
5946 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
5947
5948         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
5949
5950 2006-01-11 Neale Ferguson <neale@sinenomine.net>
5951
5952         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
5953
5954         * mini-s390x.c: Remove warning messages.
5955
5956 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
5957
5958         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
5959
5960 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
5961
5962         * generics.2.cs: Add ldelem/stelem_any test.
5963
5964 2006-01-10 Neale Ferguson <neale@sinenomine.net>
5965
5966         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
5967
5968 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
5969
5970         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
5971         
5972 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
5973
5974         * generics.2.cs: Reenable vtype tests.
5975
5976         * inssel-x86.brg: Remove an icorrect valuetype rule.
5977
5978 2006-01-06 Neale Ferguson <neale@sinenomine.net>
5979
5980         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
5981         initial support for OP_ABS.
5982
5983 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5984
5985         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
5986
5987 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5988
5989         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
5990         conversion and implement LADD/LSUB.
5991
5992         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
5993         architectures.
5994
5995 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5996
5997         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
5998
5999         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
6000         architectures.
6001
6002 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6003
6004         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
6005         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
6006         (stack walk problem).
6007
6008 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
6009
6010         * aot.c (mono_aot_load_method): Fix a warning.
6011
6012 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6013
6014         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
6015
6016 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6017
6018         * iltests.il: Add test for #77148.
6019
6020         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
6021         #77148.
6022
6023 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6024
6025         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
6026
6027 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6028
6029         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
6030         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
6031
6032         * basic-long.cs: Add lconv-to-r4/r8 tests.
6033
6034 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6035
6036         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
6037
6038         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
6039         here as on other archs.
6040
6041 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6042
6043         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
6044
6045 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6046
6047         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
6048         
6049         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
6050
6051         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
6052         instrument_prolog; Add memory_barrier instruction.
6053
6054 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
6055
6056         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
6057
6058 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
6059
6060         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
6061
6062         * aliasing.c inssel.brg: Fix warnings.
6063
6064         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
6065         could skip initialization of some parts of memory.
6066
6067         * mini.c mini-ia64.c: Fix warnings.
6068
6069         * inssel-sparc.brg: Add an implementation of lneg which actually works.
6070
6071 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
6072
6073         * aliasing.c (mono_build_aliasing_information): Add a workaround for
6074         a crash seen on sparc.
6075
6076         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
6077         
6078         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
6079
6080 2005-12-21 Neale Ferguson <neale@sinenomine.net>
6081
6082         * mini-ops.h: Add s390_backchain instruction
6083
6084         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
6085
6086         * cpu-s390.md: Add s390_backchain instruction
6087
6088         * mini-s390.c: Significant ABI changes
6089
6090         * mini-s390.h: Cater for zero length structures
6091
6092 2005-12-20 Neale Ferguson <neale@sinenomine.net>
6093
6094         * mini-s390.c: ABI fixes
6095
6096         * inssel-s390.brg: Remove debug statements
6097
6098         * cpu-s390.md: Fix length of ATOMIC_xx operations
6099
6100 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
6101
6102         * basic-float.cs: Add float<->long conversion tests.
6103
6104 2005-12-16 Neale Ferguson <neale@sinenomine.net>
6105
6106         * mini-s390.c: Fix LOCALLOC processing.
6107
6108         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
6109
6110 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
6111
6112         * iltests.il: Add tests for some opcodes not covered by the other
6113         tests.
6114
6115 2005-12-15 Neale Ferguson <neale@sinenomine.net>
6116
6117         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
6118         register loading for Tail processing; Correct trace output.
6119
6120         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
6121
6122         * cpu-s390.md: Correct size of jmp instruction. 
6123
6124 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6125
6126         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
6127
6128 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6129
6130         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
6131           Bring s390 up to current level.
6132
6133 2005-12-12  Zltan Varga  <vargaz@gmail.com>
6134
6135         * generics.2.cs: Disable the newly added tests as they do not work yet.
6136         
6137         * generics.2.cs: Add valuetype tests.
6138
6139 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
6140
6141         * basic-long.cs: Add i4->u8 test.
6142
6143         * objects.cs: Add tests for JIT intrinsic.
6144
6145         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
6146         optimizations lost by a mistake.
6147
6148 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
6149
6150         * basic-long.cs: Remove a test moved to objects.cs.
6151
6152         * arrays.cs: Add more array tests.
6153
6154 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
6155
6156         * arrays.cs: Add new tests for multi-dimensional arrays.
6157
6158 2005-12-06  Raja R Harinath  <rharinath@novell.com>
6159
6160         * Makefile.am (test_sources2): Add generics.2.cs.
6161         (EXTRA_DIST): Add test_sources2.
6162
6163 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
6164
6165         Support for boxing and unboxing nullable types as well as the
6166         isinst operation on nullables, per the CLI ammendment.
6167
6168         * inssel.brg (CEE_ISINST): Special case for nullable
6169
6170         * mini.c (handle_unbox_nullable): new method
6171         (handle_box): Special case for nullable types
6172         (mono_method_to_ir): Call handle_unbox_nullable in correct
6173         places.
6174
6175         * generics.2.cs: New test suite
6176
6177         * Makefile.am: Support for regression tests with generics.
6178
6179 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
6180
6181         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
6182         allocated to registers. Fixes #76800.
6183
6184 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
6185
6186         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
6187
6188 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
6189
6190         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
6191         of platforms.
6192
6193 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
6194
6195         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
6196         objects.cs.
6197
6198         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
6199         
6200         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
6201 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
6202
6203         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
6204         single precision before storing to a single precision location.
6205
6206 2005-11-28  Raja R Harinath  <rharinath@novell.com>
6207
6208         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
6209
6210 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
6211
6212         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
6213         correct files.
6214
6215         * basic.cs: Remove test_0_byte_compares test which was moved to
6216         objects.cs a long time ago.
6217
6218 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
6219
6220         * aliasing.c: Fixed aliasing issue on 64 bit archs.
6221
6222 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
6223
6224         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
6225         handlers are called.
6226
6227         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
6228         throwing code.
6229
6230          * mini-ia64.c: Add support for the throw->branch exception 
6231         optimization.   
6232
6233         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
6234
6235 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6236
6237         * mini.c: Enabled "fastpath" deadce :-)
6238         
6239 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6240
6241         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
6242         alias analysis pass to support it.
6243         * mini.h: Likewise.
6244         * ssa.c: Likewise.
6245         * liveness.c: Likewise (liveness computation can use aliasing
6246         information to be more accurate).
6247         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
6248         moreover made so that "--compile-all" uses the given optimization
6249         flags and not the default ones.
6250         * aliasing.c: Alias analysis (new file).
6251         * aliasing.h: Likewise.
6252         * Makefile.am: added "aliasing.c" and "aliasing.h".
6253         
6254 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
6255
6256         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
6257         OP_L opcodes.
6258
6259 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
6260
6261         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
6262         fp >= end_of_stack exit condition, as it is not needed, and it might
6263         become true for fp eliminated frames.
6264
6265 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
6266
6267         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
6268         coded offsets.
6269
6270 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
6271
6272         * mini-arm.c: fixed alignment of doubles/longs to match
6273         the C ABI (bug #76635).
6274
6275 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
6276
6277         * aot.c: fix compilation with --enable-minimal=aot.
6278
6279 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
6280
6281         * mini-arm.c: fixed compatibility with the new
6282         floating point emulator package for compares.
6283
6284 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
6285
6286         * mini.c : reverted sig->pinvoke changes (r51396-51397).
6287
6288 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
6289
6290         * mini-exceptions.c (print_stack_frame): Output to stderr.
6291         (mono_handle_native_sigsegv): Ditto.
6292
6293 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6294
6295         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
6296         OP_LCONV_TO_OVF_I implementation.
6297
6298         * mini-amd64.c: Add support for the throw->branch exception 
6299         optimization.
6300
6301         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
6302         when the catch clause catches a more general exception, i.e. Object.
6303
6304 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
6305
6306         * cpu-ia64.md: Remove unused opcodes.
6307
6308         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
6309         specific defines for architectures defining USE_SIGACTION.
6310
6311         * mini-ia64.c: Fix some warnings.
6312
6313         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
6314         version seemed to skip a frame.
6315
6316 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6317
6318         * mini.c: Clean up the usage of sig->pinvoke flag. Now
6319         only calls which are made to native code use this flag.
6320
6321 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
6322
6323         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
6324         varargs methods as well.
6325         
6326         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
6327         which have save_lmf set. Reorganize methods prologs a bit.
6328
6329         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
6330         debugger to the proper place.
6331
6332 2005-10-29  Martin Baulig  <martin@ximian.com>
6333
6334         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
6335         when running inside the debugger until the debugger has support
6336         for it.
6337
6338 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
6339
6340         * mini.h: Fix a warning.
6341
6342 2005-10-24  Miguel de Icaza  <miguel@novell.com>
6343
6344         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
6345         we expose publicly, this returns the string.
6346
6347 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
6348
6349         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
6350         with fp elimination.
6351
6352 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
6353
6354         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
6355         native stacktrace using the glibc 'backtrace' function if available.
6356
6357 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
6358
6359         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
6360
6361         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
6362         handle SIGSEGVs received while in native code.
6363
6364         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
6365         code, call mono_handle_native_sigsegv which will abort the runtime
6366         after printing some diagnostics, instead of converting it into a
6367         confusing NullReferenceException.
6368
6369 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
6370
6371         * cpu-pentium.md: Remove unused opcodes.
6372
6373 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
6374
6375         * mini-amd64.h (MonoLMF): Add rsp field.
6376
6377         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
6378         the lmf too.
6379
6380 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
6381
6382         * mini-codegen.c (get_register_spilling): Fix some warnings.
6383
6384 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
6385
6386         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
6387         elimination during exception handling. Enable fp elimination by
6388         default.
6389
6390         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
6391         elimination.
6392
6393 2005-10-16  Martin Baulig  <martin@ximian.com>
6394
6395         * mini-exceptions.c
6396         (mono_debugger_run_finally): New public method for the debugger.
6397
6398 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
6399
6400         * debug-mini.c (mono_debug_init_method): Fix warning.
6401
6402         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
6403         the 'exname' parameter const to fix some warnings.
6404
6405 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
6406
6407         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
6408         introduced by the previous patch.
6409
6410 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
6411
6412         * basic-float.cs: Add test for precision of float arithmetic.
6413
6414         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
6415         when loading/storing single values from/to memory.
6416
6417         * mini.c (mono_jit_compile_method_with_opt): Create the function
6418         pointers in the correct domain.
6419
6420 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
6421
6422         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
6423         introduced by previous patch.
6424         
6425         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
6426         when out_filter_idx is NULL.
6427
6428         * mini-exceptions.c: Don't run filter clauses twice during exception
6429         handling. Fixes #75755.
6430
6431 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
6432
6433         * aot.c: Add support for ldflda wrappers.
6434
6435         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
6436         #75902.
6437
6438 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
6439
6440         * mini.c, mini.h: do not consider exception handlers blocks when
6441         setting up interface variables.
6442
6443 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
6444
6445         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
6446
6447 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
6448
6449         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
6450         causes a regression.
6451
6452         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
6453
6454 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
6455
6456         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
6457         of the OP_P definitions.
6458
6459         * TODO: Add a proposal for dealing with the CEE/OP mess.
6460
6461         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
6462         optimizations from the x86 port.
6463
6464         * cpu-amd64.md: Ditto.
6465
6466         * basic.cs basic-long.cs: Add tests.
6467
6468 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
6469
6470         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
6471         Patrik Torstensson's implementation of my exception-handling
6472         optimization idea, when the exception object is not used
6473         (bug #62150).
6474
6475 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
6476
6477         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
6478         of the mul_imm optimizations from the old jit.
6479
6480 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
6481
6482         * mini.c, liveness.c: patch by Patrik Torstensson and
6483         Zoltan Varga to improve performance in methods with
6484         exception clauses.
6485
6486 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
6487
6488         * driver.c: Remove 'Globalization' entry from --version.
6489
6490 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
6491
6492         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
6493         there is a profiler interested in JIT events.
6494
6495         * aot.c: Load profile files produced by the AOT profiling module, and
6496         reorder methods based on the profiling info. Add a 'method_order' table
6497         to the AOT file to make mono_aot_find_jit_info work with the reordered
6498         methods.
6499
6500         * mini.h: Bump AOT file version info.
6501
6502 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
6503
6504         * mini-arm.h: work around what looks like a gcc bug when optimizations
6505         are enabled.
6506
6507 2005-09-28  Raja R Harinath  <rharinath@novell.com>
6508
6509         * Makefile.am (AM_CFLAGS): Don't use += to append inside
6510         conditionals.  Use ...
6511         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
6512
6513 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
6514
6515         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
6516         to determine the amount of memory to copy when passing valuetypes.
6517
6518         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
6519         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
6520
6521 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
6522
6523         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
6524         information about aot.
6525
6526 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
6527
6528         * *.c: Replace the use of {Enter,Leave}CriticalSection with
6529         macros. This will allow a deadlock debugger to easily be plugged
6530         in.
6531
6532 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
6533
6534         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
6535
6536 2005-09-27  Raja R Harinath  <rharinath@novell.com>
6537
6538         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
6539         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
6540         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
6541         ($(arch_built)) [CROSS_COMPILING]: Error out.
6542
6543 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
6544
6545         * aot.c: Add support for the no_special_static flag for classes.
6546
6547 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6548
6549         * Reapply reverted patches.
6550
6551         * *: Revert r50174 as well.
6552
6553         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
6554
6555 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6556
6557         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
6558
6559 2005-09-23  Miguel de Icaza  <miguel@novell.com>
6560
6561         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
6562         part of the SIG_HANDLER_SIGNATURE.  
6563
6564 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
6565
6566         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
6567         statistics.
6568
6569         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
6570         introduced by previous patch.
6571
6572 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
6573
6574         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
6575         saved registers too.
6576
6577         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
6578         upon the information returned by get_call_info ().
6579         
6580         * mini-x86.c (add_float): Fix stack size calculation.
6581         (mono_arch_call_opcode): Rewrite this so it works based up the
6582         information returned by get_call_info ().
6583         (mono_arch_get_this_vret_args): Ditto.
6584
6585 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
6586
6587         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
6588         in cinfo to determine the registers which need to be used.
6589
6590 2005-09-20  Miguel de Icaza  <miguel@novell.com>
6591
6592         * driver.c (mono_main): Add --server and --desktop flags. 
6593
6594 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
6595
6596         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
6597         registers as global registers.
6598
6599         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
6600         longer needed with the new register allocator.
6601
6602         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
6603
6604         * cpu-ia64.md: Remove unused opcodes.
6605         
6606         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
6607         
6608 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
6609
6610         * cpu-amd64.md: Remove unused opcodes.
6611
6612         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
6613         needed with the new register allocator.
6614
6615         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
6616         reg-reg moves.
6617
6618 2005-09-16  Raja R Harinath  <rharinath@novell.com>
6619
6620         * Makefile.am (check-local): Don't invoke semdel-wrapper.
6621
6622 2005-09-16  Martin Baulig  <martin@ximian.com>
6623
6624         * exceptions-amd64.c
6625         (throw_exception): Don't call mono_debugger_throw_exception() if
6626         we're a rethrow - see the FIXME in the code.
6627
6628 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
6629
6630         * mini.c (mono_init_exceptions): This only works on some architectures.
6631         
6632 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6633
6634         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
6635         on ia64.
6636
6637         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
6638
6639         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
6640         now in mini-exceptions.c.
6641
6642 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
6643
6644         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
6645         now in mini-exceptions.c.
6646
6647 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6648
6649         * exceptions-x86.c: Applied patch from Patrik Torstensson 
6650         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
6651
6652         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
6653         code into mini-exceptions.c. Add some assertions to it.
6654
6655 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
6656
6657         * aot.c (emit_section_change): Applied patch from "The Software Team" 
6658         (<software@solmersa.com>). Fix as errors on windows.
6659
6660 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6661
6662         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
6663         method info into the LMF.
6664
6665 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6666         
6667         * mini-ia64.c: Add proper unwind info for method epilogs.
6668
6669         * exceptions-ia64.c: Add some code to help debugging.
6670         
6671         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
6672
6673         * mini-exceptions.c: Fix warning.
6674
6675 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6676
6677         * mini.c: Really fix build.
6678
6679         * mini-x86.c mini-amd64.c: Fix build.
6680
6681 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6682
6683         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
6684
6685         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
6686         some Interlocked methods as intrinsics.
6687
6688         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
6689         for Thread methods as well.
6690
6691         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
6692
6693         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
6694
6695         * mini-ia64.c mini-x86.c mini-amd64.c 
6696         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
6697         OP_MEMORY_BARRIER.
6698         
6699         * mini.c (mono_init_exceptions): Fix build breakage.
6700
6701 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
6702
6703         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
6704         of instructions. Use the new ia64_unw_op macros for emitting unwind
6705         info.
6706
6707         * mini.c (mono_init_exceptions): Initialize exception handling
6708         related trampolines at startup.
6709
6710 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
6711
6712         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
6713
6714 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
6715
6716         * mini.c: Handle type loading errors gracefully during compilation and
6717         throw the appropriate exception.
6718
6719 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
6720
6721         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
6722         for the mono binary.
6723
6724 2005-09-09  Martin Baulig  <martin@ximian.com>
6725
6726         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
6727         the release.
6728
6729 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6730
6731         * mini-arm.h: use emulation for conv.r.un for the release.
6732
6733 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6734
6735         * mini-arm.c, objects.cs: more fixes and tests for them.
6736
6737 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6738
6739         * mini-arm.c: align structures to at least 4 bytes to be able
6740         to keep our current optimized memcpy.
6741
6742 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
6743
6744         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
6745
6746 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6747
6748         * mini.c: ignore SIGPIPE.
6749
6750 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
6751
6752         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
6753
6754         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
6755
6756 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
6757
6758         * mini.h: Add prototype for mono_allocate_stack_slots_full.
6759
6760 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6761
6762         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
6763         exception handling support.
6764         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
6765         patch by Brian Koropoff <briank@marakicorp.com>).
6766
6767 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
6768
6769         * mini.c: revert another 'optimization' which breaks when
6770         items on the eval stack need to be saved at a basic block end
6771         (bug #75940).
6772
6773 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
6774
6775         * jit-icalls.c: for arrays, ensure we always provide
6776         lower bounds.
6777
6778 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
6779
6780         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
6781         
6782         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
6783
6784 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
6785
6786         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
6787         arguments in their original register.
6788
6789 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
6790
6791         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
6792         memset/memcpy.
6793
6794         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
6795         when ssapre is enabled.
6796
6797         * inssel-long.brg: Fix bug in previous patch.
6798
6799         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
6800         multiplication by a constant.
6801
6802 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
6803
6804         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
6805         icc.
6806
6807         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
6808         saving registers.
6809
6810 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
6811
6812         * inssel-arm.brg: apply changes tested by Brian Koropoff
6813         <briank@marakicorp.com>.
6814
6815 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
6816
6817         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
6818         
6819 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
6820
6821         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
6822         to the same register if dreg is just a base register.
6823         (print_ins): Improve printing of membase opcodes.
6824
6825         * inssel-x86.brg: Add optimized ldind(reg) rules.
6826
6827         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
6828
6829 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
6830
6831         * mini.c: when running under valgrind, set the stack bottom for
6832         the GC at the actual approximate stack for the app (fixes running
6833         mono with valgrind).
6834
6835 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
6836
6837         * mini.c: do no break at the first valuetype to init found
6838         (fixes bug #75791).
6839
6840 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
6841
6842         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
6843
6844 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
6845
6846         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
6847
6848 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
6849
6850         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
6851
6852 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6853
6854         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
6855
6856         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
6857         code.
6858
6859         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
6860         code.
6861
6862         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
6863         methods.
6864
6865 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
6866
6867         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
6868
6869 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6870
6871         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
6872         in the tail recursion optimization.
6873
6874         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
6875         debug info into the assembly file.
6876
6877         * iltests.il: Add test for filter regions.
6878
6879         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
6880         initial stack of filter regions. Fixes #75755.
6881
6882 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
6883
6884         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
6885         stack requirements.
6886
6887 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6888
6889         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
6890         the check for an already compiled method on non-ia64 platforms.
6891         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
6892         proper domain.
6893
6894         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
6895
6896         * inssel-x86.brg: Add some optimized call rules.
6897
6898 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
6899
6900         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
6901         method here.
6902
6903         * mini.h mini-trampolines.c: Pass the trampoline argument to 
6904         mono_arch_patch_delegate_trampoline.
6905
6906         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
6907
6908         * mini-trampolines.c: Fix build.
6909
6910         * mini-amd64.h: Add delegate trampolines.
6911
6912         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
6913
6914         * inssel-amd64.brg: Add optimized call rules.
6915         
6916         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
6917
6918         * inssel-ia64.brg: Add optimized ldind(reg) rules.
6919
6920 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
6921
6922         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
6923         change.
6924
6925         * mini-ia64.c: Remove LMF fixmes.
6926
6927         * mini-ia64.h: Remove most fields from LMF.
6928
6929         * inssel-ia64.brg (stmt): Fix unaligned access errors.
6930
6931         * mini-trampolines.c: Add support for IA64 function descriptors.
6932
6933         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
6934         for IA64 function descriptors.
6935
6936 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
6937
6938         * tramp-arm.c: patch the vtable for virtual calls. Added
6939         support code to register/unregister the LMF.
6940         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
6941         more LMF work.
6942
6943 2005-08-19  Dick Porter  <dick@ximian.com>
6944
6945         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
6946         bit value if needed.
6947
6948 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
6949
6950         * mini.c (mini_get_method): Move handling of wrapper data here.
6951
6952         * mini.c (mono_method_to_ir): Add support for dynamic methods.
6953
6954         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
6955         virtual.
6956
6957         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
6958         bblock->code does not remain empty.
6959
6960 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
6961
6962         * arrays.cs: Add regression test for #75832.
6963
6964         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
6965         rules. Fixes #75832.
6966
6967         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
6968         instruction scheduling.
6969
6970 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
6971
6972         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
6973
6974 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
6975
6976         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
6977
6978         * mini-codegen.c: Fix VC build.
6979
6980         * cpu-pentium.md: Increase length of atomic_exhange_i4.
6981
6982 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6983
6984         * mini.h: fix signature for mono_register_opcode_emulation.
6985
6986 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
6987
6988         * mini.c: Get rid of most of the helper_sig_... constants using
6989         mono_create_icall_signature ().
6990
6991 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
6992
6993         * jit-icalls.c (helper_ldstr): New helper function.
6994
6995         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
6996
6997         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
6998         throw, load the string using a helper call instead of creating a string object.
6999
7000         * aot.c: Update after LDSTR changes.
7001
7002         * mini.h: Bump AOT file version.
7003         
7004         * aot.c: Save class size info into the AOT file. Print more statistics during
7005         compilation.
7006
7007         * mini.h: Bump AOT file version.
7008
7009         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
7010         ordering of disasm cases. Fixes #74957.
7011
7012 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
7013
7014         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
7015         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
7016         the generic code needed for the ARM port.
7017
7018 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
7019
7020         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
7021         inssel-arm.brg: more ARM features and fixes.
7022
7023 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
7024
7025         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
7026         ARM port work in progress.
7027
7028 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
7029
7030         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
7031
7032         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
7033
7034         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
7035
7036         * inssel.brg (mini_emit_memset): Add support for unaligned access.
7037
7038         * *-ia64.*: Ongoing IA64 work.
7039         
7040         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
7041
7042 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
7043
7044         * TODO: Remove out-of-data todo stuff.
7045
7046         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
7047         dead code.
7048
7049         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
7050
7051         * mini.h: Bump corlib version.
7052
7053 2005-07-27  Martin Baulig  <martin@ximian.com>
7054
7055         * mini-codegen.c
7056         (create_copy_ins): Added `const unsigned char *ip' argument; set
7057         `copy->cil_code' from it.
7058
7059 2005-07-27  Martin Baulig  <martin@ximian.com>
7060
7061         * mini-exceptions.c (mono_handle_exception): Don't call
7062         mono_debugger_handle_exception() for filters.
7063
7064 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
7065
7066         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
7067         as well.
7068
7069 2005-07-26  Martin Baulig  <martin@ximian.com>
7070
7071         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
7072
7073         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
7074         helper_compile_generic_method() if the method is actually virtual
7075         and non-final.
7076
7077 2005-07-26  Martin Baulig  <martin@ximian.com>
7078
7079         * mini.c
7080         (trampoline_code): Renamed to `mono_trampoline_code' and made it
7081         public; this is now accessed directly by the debugger.
7082         (mono_generic_trampoline_code): Removed.
7083
7084         * debug-mini.c
7085         (mono_debug_init_method): Also add interncalls and wrappers.
7086
7087 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
7088
7089         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
7090
7091 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
7092
7093         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
7094
7095 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
7096
7097         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
7098
7099 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7100
7101         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
7102         getting TLS offsets on AMD64 too.
7103
7104 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
7105
7106         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
7107
7108 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
7109
7110         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
7111         inssel-arm.brg, mini-arm.h: ARM port work in progress.
7112
7113 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7114
7115         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
7116
7117         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
7118         to mini.c.
7119
7120         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
7121         mono_sparc_is_virtual_call ().
7122         
7123         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
7124
7125         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
7126         trampoline parameters.
7127
7128         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
7129         
7130         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
7131         to mono_arch_get_vcall_slot_addr.
7132
7133         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
7134         trampoline code.
7135
7136         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
7137
7138 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7139
7140         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
7141
7142 2005-07-19  Martin Baulig  <martin@ximian.com>
7143
7144         * exceptions-amd64.c (throw_exception): Call
7145         mono_debugger_throw_exception() here like we're doing it on i386.
7146
7147 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7148
7149         * mini-ia64.c: Add optimized TLS access support.
7150
7151 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
7152
7153         * mini-exceptions.c: Ongoing IA64 work.
7154
7155         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
7156
7157         * mini.c: Use the default optimization set when embedding. Fixes
7158         #75194.
7159
7160 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
7161
7162         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
7163         of trampolines to a separate file.
7164
7165         * mini-trampolines.c: New file.
7166
7167         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
7168         separate file.
7169         
7170         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
7171         amd64/ia64 code.
7172
7173         * mini-codegen.c: Fix cygwin build.
7174
7175 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
7176
7177         * mini.c: Add some minor changes needed by the IA64 port.
7178
7179         * *-ia64.*: Ongoing IA64 work.
7180
7181 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
7182
7183         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
7184         trampolines into arch-independent and arch-dependent parts.
7185
7186         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
7187
7188 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
7189
7190         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
7191
7192         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
7193         the xp-regalloc-branch for amd64.
7194
7195         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
7196         xp-regalloc-branch for x86.
7197
7198 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
7199
7200         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
7201
7202 2005-07-06  Martin Baulig  <martin@ximian.com>
7203
7204         * mini.c
7205         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
7206         (mono_jit_runtime_invoke): Likewise.
7207
7208 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
7209
7210         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
7211         on x86 too.
7212         
7213         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
7214         without loading their metadata. Reorganize the file format so exception handling+
7215         debug info is kept separate from normal method info. Create MonoJitInfo 
7216         structures for methods lazily.
7217
7218         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
7219         loading metadata.
7220         (x86_class_init_trampoline): Patch AOT class init trampolines too.
7221
7222         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
7223
7224         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
7225         in AOT code.
7226
7227         * mini.h: Bump AOT file version.
7228
7229 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
7230
7231         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7232
7233 2005-07-01  Raja R Harinath  <rharinath@novell.com>
7234
7235         * Makefile.am (check-local): Call semdel-wrapper.
7236
7237 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
7238
7239         * mini-x86.c: Revert the last change as it seems to break the build..
7240
7241 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
7242
7243         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7244         
7245         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
7246
7247 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
7248
7249         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
7250         outside of the macro, so strange stuff doesn't happen with gcc4
7251         (NEW_AOTCONST_TOKEN): Likewise.
7252
7253 2005-06-28  Martin Baulig  <martin@ximian.com>
7254
7255         * mini.c (mini_class_is_system_array): New static method; use this
7256         instead of `klass->parent == mono_defaults.array_class' everywhere
7257         since this also works for the new generic array class.
7258
7259 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
7260
7261         * inssel.brg: Remove warnings.
7262
7263 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
7264
7265         * mini-ia64.c: Ongoing IA64 work.
7266
7267         * basic-float.cs: Add float->i1 conversion test.
7268
7269         * iltests.il: Add conv.u4 test.
7270
7271 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
7272
7273         * inssel-long.brg: Fix bug caused by last change.
7274
7275 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
7276
7277         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
7278         BSDs.  Allows the x86 JIT to work on OSX86
7279
7280 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
7281
7282         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
7283         u4->i8 conversion.
7284
7285         * mini-ia64.c: Ongoing IA64 work.
7286
7287 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
7288
7289         * mini-ia64.c: Ongoing IA64 work.
7290
7291         * driver.c: Clean up jit_code_hash as well when using --regression.
7292
7293         * inssel-long.brg: Fix long->i4/u4 conversion rules.
7294
7295         * basic-long.cs: Add tests for long->u4 conversion.
7296
7297 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
7298
7299         * mini.c: Take mono_get_domainvar out of macros. This makes sure
7300         that we do not depend on undefined C behavior: the order stuff
7301         gets evaluated within an expression. Fixes mono when compiled on
7302         GCC 4.
7303
7304 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
7305
7306         * *-ia64.*: Ongoing IA64 work.
7307
7308         * aot.c: Lower memory usage while loading AOT methods.
7309
7310         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
7311
7312         * mini.h: Bump AOT file format version.
7313
7314 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
7315
7316         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
7317
7318 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
7319
7320         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
7321         not on callee assembly). Fixed some comments.
7322
7323 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
7324
7325         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
7326         it gets proper disassembly.
7327         (emit_method_info): Remove some dead code.
7328
7329         * mini.c (mini_method_compile): Allways allocate the GOT var in
7330         mono_method_to_ir for emulating opcodes.
7331
7332 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
7333
7334         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
7335         before freeing the code memory. Fixes #74990.
7336
7337         * objects.cs: Add regression test for #74992.
7338
7339         * liveness.c: Extend live ranges of arguments to the beginning of the
7340         method. Fixes #74992.
7341
7342         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
7343         so it points into the faulting instruction.
7344
7345 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
7346
7347         * jit-icalls.c (mono_imul_ovf): Add exception handling.
7348
7349         * *-ia64.*: Ongoing IA64 work.
7350
7351         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
7352
7353 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
7354
7355         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
7356
7357         * *-ia64.*: Ongoing IA64 work.
7358
7359 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
7360
7361         * basic-long.cs: Add tests for add/sub.ovf.
7362
7363         * basic.cs: Add tests for sub.ovf.
7364
7365         * *-ia64.*: Ongoing IA64 work.
7366
7367 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
7368
7369         * *-ia64.*: Ongoing IA64 work.
7370
7371         * basic.cs: Add conv.ovf.i4.un test.
7372
7373 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
7374
7375         * mini.c: (remove_block_if_useless) Fixed bug 75061.
7376         
7377 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7378
7379         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
7380
7381 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
7382
7383         * *-ia64.*: Ongoing IA64 work.
7384
7385 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7386
7387         * trace.[ch]:
7388         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
7389
7390 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
7391
7392         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
7393
7394 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
7395
7396         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
7397
7398         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
7399         of a call is callable by a near call.
7400
7401 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
7402
7403         * mini-ia64.c: Ongoing IA64 work.
7404
7405 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
7406
7407         * genmdesc.c: Make the generated array non-static.
7408
7409         * inssel-long.brg: Fix LSHR_IMM rule.
7410
7411         * *-ia64.*: Ongoing IA64 work.
7412
7413         * *-ia64.*: Ongoing IA64 work.
7414
7415 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7416
7417         * *-ia64.*: Ongoing IA64 work.
7418
7419         * *-ia64.*: Ongoing IA64 work.
7420         
7421         * mini-ia64.c: Ongoing IA64 work.
7422
7423         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
7424
7425 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7426
7427         * objects.cs basic-calls.cs: Move some tests to objects.cs.
7428         
7429         * objects.cs basic-long.cs: Move some tests to objects.cs.
7430
7431 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
7432
7433         * *-ia64.*: Ongoing IA64 work.
7434
7435         * iltests.il: Add a new test.
7436
7437         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
7438         newobj. Fixes #75042.
7439
7440 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
7441
7442         * *-ia64.*: Ongoing IA64 work.
7443         
7444         * *-ia64.*: Ongoing IA64 work.
7445         
7446         * *-ia64.*: Ongoing IA64 work.
7447
7448         * basic.cs objects.cs: Move tests accessing static variables as well.
7449
7450         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
7451
7452 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
7453
7454         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
7455
7456         * driver.c: Always print failed tests.
7457
7458         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
7459         frame pointer.
7460
7461         * *ia64*: Ongoing IA64 work.
7462
7463 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
7464
7465         * basic.cs: Add tests for add.ovf. Fix warnings.
7466
7467 2005-05-18  Miguel de Icaza  <miguel@novell.com>
7468
7469         * driver.c (mono_main): Avoid crash if no argument is passed to
7470         --break;  Do not use g_error, but f_printf.   And fix all other
7471         ocurrences of the same crash.
7472
7473 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
7474
7475         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
7476         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
7477         Fixes #74742.
7478
7479 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
7480
7481         * *-ia64.*: Add beginnings of IA64 backend.
7482
7483         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
7484
7485 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
7486
7487         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
7488         Fixes #74925.
7489
7490         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
7491
7492         * mini-amd64.c: Fix a warning.
7493
7494 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
7495
7496         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
7497         in float_neg. Fixes #74897.
7498
7499         * mini-amd64.c (emit_call): Fix another near call bug.
7500
7501 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
7502
7503         * declsec.c: Keep the appdomain information in the structure. Added a 
7504         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
7505         value gets overwritten).
7506         * declsec.h: Set the default MonoArray for the the stack to 6. Added
7507         an MonoAppDomain member to MonoSecurityFrame.
7508         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
7509         used in the stack walk. Now use a MonoArray which grow (double) when
7510         it gets full.
7511
7512 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
7513
7514         * mini.c: Re-enabled runtime cleanup, since running threads should
7515         now properly stop when exiting.
7516
7517 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
7518
7519         * mini-codegen.c: New file contaning the arch-independent local
7520         register allocator. Not used by any architectures yet.
7521
7522         * mini.h linear-scan.c: Merge some changes from the 
7523         mini-xp-local-regalloc branch.
7524
7525 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
7526
7527         * mini-amd64.c (emit_call): Fix calls to native functions when the
7528         runtime is compiled as a shared library. Fixes #74756.
7529
7530         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
7531         on a literal field. Fixes #74751.
7532
7533 2005-04-25  Raja R Harinath  <rharinath@novell.com>
7534
7535         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
7536
7537 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
7538
7539         * objects.cs: Add missing null casting test.
7540
7541 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
7542
7543         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
7544         in wrapper methods. Also rename 'address' variable to 'offset'.
7545
7546 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
7547
7548         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
7549         warnings.
7550         
7551         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
7552
7553         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
7554         work on windows.
7555
7556 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
7557
7558         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
7559
7560 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7561
7562         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
7563         just the last bytes.
7564
7565 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7566
7567         * aot.c (mono_compile_assembly): Fix warning.
7568
7569         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
7570         by the _MSC_VER stuff.
7571
7572 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
7573
7574         * inssel-long.brg: Fix #74588.
7575
7576         * cpu-amd64.md: Fix #74591.
7577
7578         * iltests.il: Add new regression tests.
7579
7580 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
7581
7582         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
7583         valuetype.
7584
7585 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
7586
7587         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
7588
7589         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
7590         from Bill Middleton <flashdict@gmail.com>.
7591
7592 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
7593
7594         * arrays.cs: Add new regression test. Fix warnings.
7595
7596 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
7597
7598         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
7599         and leakage in CKFINITE.
7600
7601         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
7602         this to a null op since it is called on amd64 too.
7603
7604         * exceptions-amd64.c (get_throw_trampoline): Align stack.
7605
7606         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
7607         body since this is not used on amd64.
7608         
7609         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
7610
7611         * mini-amd64.c: Remove obsolete fixmes.
7612
7613         * mini.c (print_method_from_ip): Fix debugging support.
7614
7615 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
7616
7617         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
7618         so that expressions that don't give much gain are not reduced.
7619         * ssapre.h: Likewise.
7620
7621 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
7622
7623         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
7624
7625         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
7626
7627         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
7628
7629 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
7630
7631         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
7632
7633         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
7634
7635 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
7636
7637         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
7638         stack touching.
7639
7640         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
7641
7642         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
7643
7644         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
7645
7646         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
7647         MONO_ARCH_USE_SIGACTION. Fixes #74252.
7648
7649         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
7650
7651         * mini-x86.c: Fix up stack overflow handling.   
7652
7653         * exceptions.cs: Add new regression test.
7654
7655 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
7656
7657         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
7658         mono_jit_thread_attach.
7659
7660         * mini.c (mono_method_to_ir): Verify called method is not abstract.
7661
7662 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7663
7664         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
7665         avoid calling constructors using callvirt.
7666
7667         * inssel.brg: Fix #74073.
7668
7669 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
7670
7671         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
7672         compilation with non-GCC compilers.
7673         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
7674         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
7675
7676 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
7677
7678         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
7679         klass->interface_offsets (will likely fix bug#74073).
7680
7681 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7682
7683         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
7684
7685 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
7686
7687         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
7688         to amd64_div_reg_size ().
7689         
7690         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
7691
7692 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
7693
7694         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
7695
7696 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7697
7698         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
7699
7700 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7701
7702         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
7703         
7704         * mini.c (mono_precompile_assembly): Load and precompile referenced
7705         assemblies as well. Fixes #74015.
7706
7707 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
7708
7709         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
7710
7711 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
7712
7713         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
7714         a lot of checks and (anyway) permissions cannot work until corlib is 
7715         loaded.
7716
7717 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
7718
7719         * mini-ppc.c: fixed ABI issue on sysv/ppc.
7720
7721 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
7722
7723         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
7724         calls (fixes bug#72824).
7725
7726 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
7727
7728         * mini.c: fix tail recursion elimination (see test in bug#73936).
7729
7730 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
7731
7732         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
7733         some fp functions in sse2 mode.
7734
7735 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
7736
7737         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
7738
7739 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
7740
7741         * mini.h mini.c: Add mono_get_jit_tls_key ().
7742
7743         * mini-x86.c: Enable fast TLS support on windows.
7744
7745 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
7746
7747         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
7748         * mini.c: Check for p/invoke method when generating code. If a
7749         p/invoke method, or it's class, isn't decorated with [Suppress
7750         UnmanagedCodeSecurity] then generate code to call System.Security.
7751         UnmanagedDemand (only if the security manager is active).
7752
7753 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7754
7755         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
7756         last change as it seems to cause strange crashes.
7757         
7758 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
7759
7760         * *.c: handle unsafe function pointers where needed.
7761
7762 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7763
7764         * mini.c (mono_jit_free_method): Remove the fixme too.
7765
7766 2005-03-15  Miguel de Icaza  <miguel@novell.com>
7767
7768         * mini.c: As discussed, make the code actually free the delegate
7769         thunk now, to enable the debugging of delegate problems, use
7770         MONO_DEBUG=1 when running Mono. 
7771
7772         This takes also care of parts of the leaks as seen by Joe.
7773
7774 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
7775
7776         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
7777         thread_tls_offset calculation.
7778
7779 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
7780
7781         * declsec.c: Reworked linkdemand checks for icall. The previous code
7782         was using the declaration code (untrusted) and didn't work as expected
7783         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
7784         specific case.
7785
7786 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
7787
7788         * iltests.il: Add new localloc test.
7789
7790         * mini-amd64.c: Handle large stack allocations the same way as on
7791         windows if stack overflow handling is working.
7792         
7793         * mini-amd64.c: Allocate the signal stack using mmap.
7794
7795         * mini.c (sigsegv_signal_handler): Fix reading of context.
7796
7797         * mini-exceptions.c: Fix up stack overflow handling.
7798
7799         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
7800
7801         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
7802
7803         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
7804
7805         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
7806
7807         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
7808         tramp_init functions as they are no longer needed.
7809
7810 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
7811
7812         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
7813         
7814         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
7815
7816         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
7817         
7818         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
7819         support that now.
7820
7821         * mini-ops.h: Add OP_LMUL_IMM.
7822
7823         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
7824         long mul/div opcodes as intrinsic.
7825
7826         * mini-amd64.c (emit_call): Handle the case when the callee might be
7827         an AOT method.
7828
7829 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
7830
7831         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
7832         extra safe.
7833         
7834         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
7835
7836         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
7837
7838 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
7839
7840         * mini.c (mono_codegen): Don't leak here, to help people running
7841         monogrind.
7842
7843 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
7844
7845         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
7846         conversions in sse2 mode.
7847
7848         * basic-float.cs: Add regression test.
7849         
7850         * mini-amd64.c: Reenable sse2.
7851
7852 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
7853
7854         * mini-amd64.c: Disable sse2 until some regressions are fixed.
7855
7856 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
7857
7858         * driver.c: Copyright text should include 2005.
7859         
7860 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
7861
7862         * cpu-amd64.md (load_membase): Fix more max lengths.
7863
7864 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
7865
7866         * cpu-amd64.md (load_membase): Fix max length.
7867
7868         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
7869
7870         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
7871
7872         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
7873         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
7874
7875         * basic-float.cs: Add rounding regression test.
7876
7877         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
7878
7879 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
7880
7881         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
7882         structures in registers for pinvoke wrappers.
7883
7884 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
7885
7886         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
7887
7888 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
7889
7890         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
7891         wrapper to mono_jit_thread_attach.
7892
7893         * mini.c (mini_jit_thread_attach): New jit icall.
7894
7895         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
7896         native->managed wrappers.
7897
7898         * exceptions.cs: Add new regression test.
7899
7900         * mini.c (optimize_branches): Check regions in the cbranch to throw
7901         block case as well. Fixes #73242.
7902
7903 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7904
7905         * mini.c: thread safety fixes.
7906
7907 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
7908
7909         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
7910         patching stuff, since delegates use jump trampolines so there is
7911         no caller.
7912
7913         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
7914         jump trampolines.
7915         
7916         * tramp-amd64.c: Fix build.
7917
7918         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
7919         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
7920
7921         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
7922         Rename this to mono_arch....
7923         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
7924
7925         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
7926
7927         * mini-amd64.c (emit_call): If both the caller and the callee is
7928         guaranteed to have 32 bit addresses, emit a normal call.
7929
7930         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
7931
7932         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
7933         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
7934         method_ptr inside delegates.
7935
7936 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
7937
7938         * mini.c (mono_jit_free_method): Free the method info even if the native code is
7939         invalidated. Fixes #73001.
7940
7941         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
7942
7943         * mini-x86.c: Only use stdcall for pinvokes on windows.
7944
7945 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
7946
7947         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
7948         * mini-x86.c: remove unreliable __thread var offset detection,
7949         use the correct accessors and enable by default.
7950
7951 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
7952
7953         * mini.c (mono_jit_free_method): Fix memory leak.
7954
7955 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
7956
7957         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
7958
7959 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
7960
7961         * cpu-amd64.md: Fix lengths of atomic opcodes.
7962
7963 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
7964
7965         * driver.c: try to not imply using ICU is any good.
7966
7967 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
7968
7969         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
7970         functions as inline ops.
7971
7972         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
7973         some Interlocked functions as inline ops.
7974
7975         * mini.c (move_basic_block_to_end): Fix bug in last patch.
7976
7977         * mini.h (MonoBasicBlock): Reorganize fields a bit.
7978
7979         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
7980
7981         * mini.c: Add support for OP_NOT_TAKEN.
7982
7983         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
7984         structures in registers for pinvoke wrappers.
7985
7986         * mini-amd64.c: Fix warnings.
7987
7988 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
7989
7990         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
7991
7992         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
7993
7994         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
7995         address instead of loading the address from it.
7996
7997         * mini-x86.c: Add support for returning small structs in registers
7998         on Win32. Fixes part of #70864.
7999         
8000 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
8001
8002         * trace.c (get_token): Improve error checking.
8003
8004 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
8005
8006         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
8007
8008 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
8009  
8010         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
8011         it can be reused for MonoClass.
8012         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
8013         _LINKDEMAND.
8014
8015 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
8016
8017         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
8018         instead of a MonoReflectionMethod. The method information wasn't used
8019         when displaying SecurityException details (but will be now).
8020
8021 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
8022
8023         * Makefile.am : windows build fix.
8024
8025 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
8026
8027         * iltests.il: Add new regression test.
8028
8029         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
8030         #72522.
8031
8032 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
8033  
8034         * mini.c: Moved linkdemand check into helper function check_linkdemand
8035         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
8036         LDFTN, LDVIRTFTN).
8037
8038 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
8039
8040         * declsec.c: Added statistics counter for different kinds of 
8041         LinkDemands.
8042         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
8043         (and commented) declaration.
8044         * mini.c: Added statistics counter for security Demand code 
8045         generation. Added display of security statistics.
8046
8047 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
8048
8049         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
8050         Fix compilation errors under gcc-2.95.
8051
8052 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
8053
8054         * mini.c, driver.c: Use the new jit trampoline hashtable
8055
8056 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8057
8058         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
8059
8060 2005-02-11  Martin Baulig  <martin@ximian.com>
8061
8062         * debug-mini.c (mono_debug_close_method): Free the line number array.
8063
8064 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8065
8066         * aot.c: Break up large methods into smaller ones. Share GOT slots for
8067         icalls.
8068
8069         * mini.h: Bump AOT file format version. 
8070
8071 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
8072
8073         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
8074         APTC and P/Invoke.
8075         * declsec.h: Added macros to get/set lazyly initialized security 
8076         informations about assemblies. Added new enum for different type of
8077         possible LinkDemand violation. Added function to check LinkDemands.
8078         * mini.h: Added a field to MonoCompile to hold any security violation
8079         detected when JITting a method (so it can be thrown later).
8080         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
8081         and CEE_CALLVIRT. Added code to throw exception at the end of
8082         mini_method_compile (note: the exception is unhandled right now).
8083
8084 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
8085
8086         * mini.c, jit-icalls.c: use the managed implementation of
8087         memset for initobj and memset, to avoid managed <-> unmanaged
8088         transitions.
8089
8090 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8091
8092         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
8093         optimization if it would need a GOT var.
8094
8095         * basic.cs: Add tests for constant propagation and switch statements.
8096
8097         * ssa.c: Fix out-of-range constant propagation and switch statements.
8098
8099 2005-02-09    <vargaz@freemail.hu>
8100
8101         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
8102
8103 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
8104
8105         * cpu-amd64.md (load_membase): Fix max length of load_membase.
8106
8107 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8108
8109         * mini.c: update to new signature of mono_class_get_allocation_ftn().
8110
8111 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
8112
8113         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
8114         arithmetic operations.
8115
8116 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
8117
8118         * mini-ppc.c: add a workaround for broken user code that
8119         DllImports vararg functions with non-vararg signatures.
8120
8121 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
8122
8123         * mini.c (mono_jit_compile_method_inner): Add detection and a 
8124         meaningfull error message for assemblies written in Managed C++.
8125
8126         * tramp-amd64.c mini-amd64.h: Add support for 
8127         create_trampoline_from_token ().
8128
8129         * aot.c mini-x86.c abcremoval.c: Applied patch from
8130         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
8131
8132 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
8133
8134         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
8135         which takes a MonoImage/token as parameter instead of a MonoMethod.
8136
8137         * aot.c: Use the new trampoline for initializing vtables.
8138
8139         * aot.c: Add support for ldfld/stfld_remote wrappers.
8140
8141         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
8142         rules for compare <MEM>, IMM.
8143
8144         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
8145
8146         * aot.c: Handle inherited finalizers correctly.
8147
8148 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
8149
8150         * inssel.brg (stmt): Add a missing _setup_... ().
8151
8152         * aot.c: Save some parts of the class state to the AOT file and use it
8153         to recompute that state when a class is initialized.
8154
8155         * mini.c: Install AOT hooks into the runtime.
8156
8157         * mini.h: Bump AOT file format version.
8158         
8159         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
8160         Fixes #72148.
8161
8162         * iltests.il: Add new test.
8163
8164 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8165
8166         * mini.c: fix typo.
8167
8168 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
8169
8170         * mini.c: setup the statistical profiler in the thread attach
8171         callback to cope with the new single thread code.
8172
8173 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
8174
8175         * mini-ppc.c: ensure we have enough room for the profiler
8176         calls (fixed bug#72084).
8177
8178 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
8179
8180         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
8181         it.
8182
8183 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8184
8185         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
8186
8187 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8188
8189         * ssapre.c: Fixed an issue with down safety (this allows IronPython
8190         to succesfully execute parrotbench).
8191         * ssapre.h: Likewise.
8192
8193 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8194
8195         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
8196         variable for stores to method arguments (fixes a SSAPRE issue).
8197
8198 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8199
8200         * mini.c: handle value types in dup, fixes gen-112.cs.
8201
8202 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
8203
8204         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
8205         sequence for calls in dynamic methods to avoid thunks.
8206
8207 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
8208
8209         * mini.c: correctly remove dynamic methods from the hashtable.
8210
8211 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8212
8213         * driver.c: Disabled SSAPRE until fix the bug that appears
8214         in IronPython's parrotbench.
8215
8216 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
8217
8218         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
8219
8220         * mini.c (mono_method_to_ir): Revert the previous change.
8221         
8222         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
8223         when AOT compiling.
8224
8225         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
8226         mono_jit_info_table_find () etc. when running under valgrind.
8227
8228         * inssel.brg: Fix warnings.
8229
8230         * mini-exceptions.c: Fix warnings.
8231
8232 2005-01-31  Martin Baulig  <martin@ximian.com>
8233
8234         * driver.c (compile_all_methods_thread_main): Don't try to compile
8235         generic methods or anything which has type parameters.
8236
8237 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
8238
8239         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
8240
8241         * TestDriver.cs: Add --verbose flags.
8242
8243         * graph.c ssa.c: Fix 64 bit warnings.
8244         
8245         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
8246         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
8247         Fix 64 bit warnings.
8248
8249         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
8250         variable not spotted by gcc.
8251         
8252         * mini-amd64.c inssel-amd64.brg: Applied patch from  
8253         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
8254         X86_COMPARE_MEMBASE opcodes.
8255
8256         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
8257
8258 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
8259
8260         * *: MonoMethod->signature might be NULL now. You *MUST* use
8261         mono_method_signature.
8262
8263 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8264
8265         * driver.c (compile_all_methods_thread_main): Compile the methods
8266         without invoking cctors.
8267
8268 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8269
8270         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
8271         * basic-calls.cs: test for the above.
8272
8273 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8274
8275         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
8276         MonoJitInfo changes.
8277
8278 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
8279
8280         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
8281         eagerly if it contains dynamic methods.
8282         
8283         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
8284
8285         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
8286         trace, it is now computed by an icall from trace_ips.
8287         
8288         * mini-exceptions.c: Fix a warning.
8289
8290 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
8291
8292         * mini-exceptions.c: don't bother getting stack trace info if
8293         it's not going to be used.
8294
8295 2005-01-27  Raja R Harinath  <rharinath@novell.com>
8296
8297         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
8298         ssapre-mini-ops.h.
8299
8300 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
8301
8302         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
8303
8304         * aot.c: Avoid calling mono_method_get_header () if not needed.
8305
8306         * mini.h: Bump AOT file format version.
8307         
8308         * mini.c (mono_emit_native_call): Allocate a GOT var here.
8309
8310         * mini.c (mono_print_tree): Print more info for calls.
8311
8312 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
8313
8314         * declsec.h: Remove warning by adding missing include for marshal.h
8315
8316 2005-01-26  Martin Baulig  <martin@ximian.com>
8317
8318         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
8319         `ip' twice.
8320
8321 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
8322
8323         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
8324         flags.
8325
8326         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
8327
8328         * aot.c (mono_compile_assembly): Fix a warning.
8329
8330 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
8331
8332         * declsec.c: Look for security attributes on the original MonoMethod 
8333         (and not the wrapped one). This fix permissions on icalls.
8334
8335 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8336
8337         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8338
8339         * mini.c (mono_allocate_stack_slots): Add a fixme.
8340
8341         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8342
8343 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
8344
8345         * inssel.brg: optimize casts of sealed types (more
8346         optimizations waiting for fixes in remoting).
8347
8348 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8349
8350         * inssel.brg (stmt): Add another dummy rule.
8351
8352         * driver.c: Fix warnings.
8353
8354         * driver.c (mono_main): If running under valgrind, instruct glib to use
8355         the system allocation functions so valgrind can track the memory
8356         allocated by the g_... functions.
8357
8358         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
8359
8360         * mini-ops.h: Add OP_DUMMY_STORE opcode.
8361
8362         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
8363
8364         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
8365         variables in try regions.
8366
8367         * mini.c (mini_method_compile): Don't disable optimizations on large
8368         methods when AOT compiling.
8369
8370         * mini.c (mono_allocate_stack_slots): New arch independent method to 
8371         allocate stack slots. Not yet used.
8372
8373 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
8374
8375         * debug-mini.c (mono_debug_close_method): Plug some leaks.
8376
8377 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
8378
8379         * mini-ppc.c: make the branch info relative as the code
8380         buffer can be reallocated.
8381
8382 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
8383
8384         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
8385         * driver.c: Removed the AOT/security restriction. Now initialize the
8386         security manager (in metadata) if --security is used.
8387         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
8388         rather than the pointer to declarative security, when AOT is used.
8389
8390 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
8391
8392         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
8393         basic blocks, reduced intrinsic exception throwing code size.
8394
8395 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
8396
8397         * driver.c (mini_usage): Reorder the usage screen.
8398
8399 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
8400
8401         * mini.c (mono_resolve_patch_target): Fix warning.
8402
8403 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
8404
8405         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
8406         previous patch.
8407
8408         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8409
8410         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
8411         breaks the amd64 build.
8412
8413         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
8414         register allocation. Fixes #71454.
8415
8416         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8417
8418         * arrays.cs: Add new regression test.   
8419
8420 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8421
8422         * ssapre.c: Turned usage of snprintf to GString.
8423         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
8424         (I left it on by mistake in my previous commit).
8425
8426 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
8427
8428         * mini.c, cfold.c, basic-calls.cs: preserve side effects
8429         on cond branch optimization (fixes bug# 71515).
8430
8431 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8432
8433         * abcremoval.c: Fixed bug 71062.
8434         * abcremoval.h: Likewise.
8435
8436 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8437
8438         * mini.c: Added a new functionality to optimize_branches, the removal
8439         of useless basic blocks, and fixed some problem in the removal of
8440         critical edges; some utility functions added for both purposes.
8441         * ssapre.c: Added complex expression support, and fixed bug 70637.
8442         * ssapre.h: Likewise.
8443         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
8444         enabled in SSAPRE.
8445         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
8446         * driver.c: Re-enabled SSAPRE.
8447
8448 2005-01-19  Martin Baulig  <martin@ximian.com>
8449
8450         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
8451         the result of mono_get_method_constrained().
8452
8453 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
8454
8455         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
8456         manager.
8457
8458 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
8459
8460         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
8461         be detected.  Fixes #59296.
8462
8463 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8464
8465         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
8466         which can happen. Fixes #71361.
8467
8468 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8469
8470         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
8471         manager.
8472
8473 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8474
8475         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
8476         appdomain-unload.exe to fail.
8477         
8478         * mini.c: Fix some memory leaks.
8479
8480 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
8481
8482         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
8483         Fixed bug and sped up some codepaths.
8484
8485 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8486
8487         * mini.c: Fix some memory leaks.
8488
8489         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
8490         conversion.
8491
8492         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
8493
8494         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
8495         #71320.
8496
8497         * iltests.il: Add regression test for #71320.
8498
8499 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
8500
8501         * mini.c (mono_codegen): Fix installation of profiler hooks.
8502
8503         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
8504
8505 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8506
8507         * mini.h, mini.c, cfold.c: optimize access to enum
8508         readonly fields, too. Eval conditional branches if possible
8509         to perform unreachable code removal in more cases.
8510
8511 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
8512
8513         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
8514
8515         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
8516         code manager.
8517
8518         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
8519         WinXP DEP. Fixes #71244.
8520
8521 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
8522
8523         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
8524
8525 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
8526
8527         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
8528
8529 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
8530
8531         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
8532         changes.
8533
8534         * mini.h: Bump AOT version.
8535
8536         * mini.h (MonoCompile): Change exvar to a hash table.
8537
8538         * mini.c: Allocate a separate exvar for each handler block.
8539
8540         * mini.c: Get rid of the computation of filter_lengths, its not needed.
8541
8542         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
8543         ex var with the pending exception and only throw if the two are equal.
8544         Fixes #68552.
8545         
8546         * exceptions.cs: Add tests for rethrow and nested catch clauses.
8547
8548         * mini-x86.c: Fix warnings.
8549
8550         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
8551         used by all the ports now.
8552
8553         * aot.c: Add write-symbols and save-temps options.
8554
8555 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8556
8557         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
8558
8559 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
8560
8561         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
8562         operations.
8563
8564         * tramp-s390.c: Check vtable slot belongs to the domain.
8565
8566         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
8567         as per other platforms.
8568
8569         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
8570
8571 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
8572
8573         * driver.c: we don't run the Main() code in a subthread anymore.
8574
8575 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
8576
8577         * mini.c: added experimental rtc support in the statistical
8578         profiler: if the user has the permission, more accurate statistics
8579         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
8580         The MONO_RTC value must be restricted to what the linux rtc allows:
8581         power of two from 64 to 8192 Hz.
8582
8583 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8584
8585         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
8586
8587 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
8588
8589         * mini-ppc.c: better icache flush for smp.
8590
8591 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
8592
8593         * mini-amd64.c (emit_move_return_value): Fix memory leak.
8594
8595         * mini-x86.c (get_call_info): Add the get_call_info () code from the
8596         amd64 port, not yet used.
8597
8598 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8599
8600         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
8601         a struct type.
8602
8603 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
8604
8605         * driver.c: Added --security option to activate the security manager.
8606         Right now this will allow code generation for declarative demands and
8607         is disabled when AOT is specified.
8608         * mini.c: Add code generation for declarative security demands.
8609         * mini.h: Add mono_use_security_manager as an extern gboolean.
8610
8611 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8612
8613         * aot.c (mono_compile_assembly): Speed up compilation a bit by
8614         emitting more dense assembly code.
8615
8616         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
8617         exception throwing stuff.
8618
8619 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
8620
8621         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
8622         dead code.
8623
8624         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
8625         left in by mistake.
8626
8627         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
8628         fixed.
8629
8630         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
8631
8632         * tramp-*.c: Only patch vtable slots if the object is in the current
8633         domain. Fixes appdomain-unload.exe.
8634
8635         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
8636         
8637         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
8638         x86 branch.
8639
8640 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8641
8642         * mini.c (reverse_branch_op): New helper function.
8643
8644         * mini.c (optimize_branches): Run the new optimization only on 
8645         platforms which support it. Also reverse all kinds of branches.
8646
8647         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
8648
8649         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
8650         a throw statement.
8651
8652         * mini.c (optimize_branches): Reverse not-equals branches if the false
8653         bblock is a throw. This happens a lot of time with argument checking in
8654         corlib.
8655
8656         * mini.c (mono_codegen): Add support for placing basic blocks after
8657         the function epilogue.
8658
8659         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
8660         function epilogue.
8661         
8662 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
8663
8664         * mini.c (setup_stat_profiler): Only set this up if the platform
8665         supports ITIMER_PROF.
8666
8667 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8668
8669         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
8670         previous patch.
8671
8672         * inssel.brg: Fix a warning.
8673
8674 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
8675
8676         * mini.c: added support for statistical profiler 
8677         (run with: --profile=default:stat).
8678
8679 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
8680
8681         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
8682
8683         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
8684
8685         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
8686         related to global registers from the amd64 port.
8687
8688 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
8689
8690         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
8691
8692         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
8693         with global registers.
8694         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
8695
8696         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
8697
8698 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
8699
8700         * debug-mini.c (encode_value): Fix off-by-one.
8701
8702         * aot.c (encode_value): Likewise.
8703
8704         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
8705
8706 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
8707
8708         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
8709         AOT.
8710
8711         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
8712         
8713         * aot.c (emit_method_info): Increase size of temp buffer.
8714
8715         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
8716         the AOT case.
8717
8718 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
8719
8720         * aot.c (emit_method_info): Fix build.
8721         
8722         * aot.c: Further rework of the AOT file format to reduce the size of
8723         the method info data.
8724
8725         * mini.h: Bump AOT file format version.
8726
8727 2004-12-27  Martin Baulig  <martin@ximian.com>
8728
8729         * mini.c (mini_get_method): New static method; call
8730         mono_get_method_full() and mono_get_inflated_method().
8731         (mono_method_to_ir): Use mini_get_method() instead of
8732         mono_get_method_full(). 
8733
8734 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
8735
8736         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
8737
8738 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
8739
8740         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
8741
8742         * inssel-amd64.brg: Add some optimization rules.
8743
8744 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
8745
8746         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
8747         standard not GC'd stuff is fine.
8748
8749 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
8750
8751         * aot.c: Rework the AOT file format to get rid of most of the global
8752         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
8753
8754         * mini.h: Bump AOT file format version.
8755         
8756 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
8757
8758         * mini.h: Bump AOT file format version.
8759
8760         * aot.c (mono_aot_is_got_entry): New function to determine if an 
8761         address is inside a GOT.
8762
8763         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
8764
8765         * cpu-pentium.md: Increase the maximum size of some instructions which
8766         might involve a got access.
8767         
8768         * mini.c (get_method_from_ip): Another debug helper function.
8769
8770         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
8771         when got var accesses are created during the decompose phase.
8772
8773         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
8774
8775         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
8776         argument mini_compile_method and to MonoCompile, and use this to
8777         determine whenever a given method is compiled for AOT. This allows the
8778         other methods compiled during AOT compilation to be free of AOT stuff,
8779         so the backends does not need to add special support for them by
8780         creating a fake GOT etc.
8781
8782         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
8783         longer needed.
8784
8785 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
8786
8787         * mini.c (mono_method_to_ir): It turns out that some of the
8788         x-appdomain wrappers are lax with types, so just ignore this for
8789         all wrappers.
8790
8791         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
8792         at the vtable->klass. If it is non-shared code we can just use the
8793         vtable.
8794
8795 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
8796
8797         * mini-ppc.c: access MonoDomain from tls, too.
8798
8799 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
8800
8801         * declsec.c: Removed unused variable (and related warning ;-)
8802
8803 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
8804
8805         * iltests.il: New test for LDELEMA on an array of ref types.
8806
8807         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
8808         all ldelema's on reftypes.
8809         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
8810         it was the wrong place to put it.
8811
8812         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
8813         register to pop to make this cleaner, at the request of Paolo.
8814
8815 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8816
8817         * mini-ops.h (OP_GETHASHCODE): New op.
8818
8819         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
8820
8821         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
8822         operation.
8823
8824         For a microbenchmark, this reduces the cost of Hashtable.get_Item
8825         by 25%.
8826         
8827         * mini-x86.c (mono_arch_output_basic_block): Rather than
8828
8829         add ebp, 4
8830
8831         Emit
8832
8833         pop edx
8834
8835         The first is 3 bytes while the second is 1. This saves 36 kb on
8836         mscorlib, quite a big saving. When bootstraping mcs, I was able to
8837         see a small boost because of icache locality.
8838
8839         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
8840
8841 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
8842
8843         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
8844         started code sharing with the generic code.
8845
8846 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
8847
8848         * mini-ppc.c, cpu-g4.md: added code for direct access to
8849         tls data slots.
8850
8851 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
8852
8853         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
8854          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
8855         to OP_TLS_GET.
8856
8857 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
8858
8859         * declsec.c|h: Added functions to cache the declarative stack modifiers
8860         in MonoJitInfo and to create a security frame from a MonoJitInfo 
8861         structure.
8862         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
8863         created. Register internal calls for System.Security.SecurityFrame::
8864         _GetSecurityFrame and _GetSecurityStack.
8865         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
8866         the definitions for the new stack walk/callback mechanism.
8867         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
8868         first security frame for LinkDemands and InheritanceDemands) and
8869         GetSecurityStack for Demands. Both use the new mono_walk_stack code
8870         from lupus.
8871         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
8872         walk initialization (lupus).
8873
8874 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8875
8876         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
8877         idiom.
8878         (handle_loaded_temps): Do not create a temporary variable for
8879         things that we know are temps. They will never be modified.
8880         (mono_spill_call): Set MONO_INST_IS_TEMP
8881         (mono_emulate_opcode): ditto
8882         (emit_tree): ditto
8883         (mono_method_to_ir.CEE_DUP): ditto
8884
8885 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
8886
8887         * mini.c (type_to_eval_stack_type): Make this handle the void type
8888         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
8889         (emit_tree): use ip_in_bb to special case some common idioms
8890         Update all callers to pass in the IP.
8891         (mono_method_to_ir): Make CEE_CALL* do the above as well.
8892
8893         This gives us a nice 2% speedup in mcs bootstrap.
8894
8895         * mini-x86.c (peephole_pass): Peephole pass to make
8896         mov  [foo], eax
8897         push [foo]
8898
8899         into
8900
8901         mov [foo], eax
8902         push eax
8903
8904         * mini.c (ip_in_bb): new method.
8905         (mono_method_to_ir): use this method rather than doing the hash
8906         lookup ourselves.
8907
8908         * linear-scan.c (mono_linear_scan): When expiring actives, you
8909         don't need to keep around variables that expire on this
8910         instruction. This makes it so that:
8911              a = b + 1
8912         will turn into:
8913              store (ebx add (ebx, 1))
8914         which will become
8915              add ebx, 1
8916
8917 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
8918
8919         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
8920         combination to avoid doing two copies. Fix up problems with previous
8921         patch.
8922
8923         * mini.c: Fix 64 bit warnings.
8924
8925         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
8926
8927 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
8928
8929         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
8930         changes from the x86 code.
8931
8932         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
8933
8934 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
8935
8936         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
8937         throwing code to reduce its size, unify the AOT and non-aot code and 
8938         get rid of relocations in the AOT case.
8939
8940         * mini-x86.h mini.c exceptions-x86.c 
8941         (mono_arch_get_throw_corlib_exception): New arch specific function to 
8942         raise corlib exceptions which doesn't require relocations in the 
8943         caller.
8944
8945         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
8946
8947 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
8948
8949         * mini.c (mono_emit_method_call): Only allocate the got var when it is
8950         needed.
8951
8952         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
8953         in the AOT case.
8954
8955 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8956
8957         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
8958         with add function when used from Inc/dec atomic 
8959         functions. Re-enabled optimization on x86.
8960         * mini-ops.h: renamed atomic_add functions to
8961         allow _add to match the Interlocked::Add and
8962         _add_next to match Interlocked::Inc/Dec.
8963
8964 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
8965
8966         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
8967         linking of BBs to the end BB, and enabled SSAPRE also with
8968         consprop and copyprop (which was prevented by that bug).
8969
8970 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8971
8972         * mini-x86.c: disabling the Interlocked optimizing code. 
8973
8974 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
8975
8976         * aot.c (load_aot_module): Move reading of got_addr after the AOT
8977         file version check.
8978         
8979 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8980
8981         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
8982         interlocked optimization due lack of support on x86, rewrote 
8983         exchange to take into account that base may be in eax.
8984         
8985         xsp works again; activated Interlocked optimizing code.
8986         
8987 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
8988
8989         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8990
8991 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
8992
8993         * mini-ops.h: Add new opcodes.
8994
8995         * mini.h: Add new patch types. Add got_var to MonoCompile.
8996
8997         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
8998         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
8999         make it work with all kinds of patchable code.
9000
9001         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
9002         address of the GOT, and referencing entries in the GOT.
9003
9004         * mini.c: Add code to load the GOT address if needed by an opcode.
9005
9006         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
9007         independent AOT code on the x86 using an elf-style Global Offset Table.
9008
9009 2004-12-14  Raja R Harinath  <rharinath@novell.com>
9010
9011         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
9012
9013 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9014
9015         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
9016         when running xsp.
9017
9018 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
9019
9020         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
9021         of Interlocked:Increment/Decrement/Add as inline ops.
9022         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
9023
9024 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
9025
9026         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
9027         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
9028
9029 2004-12-12  Duncan Mak  <duncan@ximian.com>
9030
9031         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
9032         again. `patch_info->table_size' is no longer valid after Zoltan's
9033         commit #37636.
9034
9035 2004-12-12  Martin Baulig  <martin@ximian.com>
9036
9037         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
9038         if we are the "real" method, ie. not an inlined method inside it.
9039
9040 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
9041
9042         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
9043         before we look in the special fields table. This fixes
9044         ../tests/thread-static-init.cs.
9045
9046 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9047
9048         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
9049         for Array get_Rank and get_Length. Fixes bug #70465.
9050
9051 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
9052
9053         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
9054         separate structure to reduce the size of MonoJumpInfo.
9055
9056 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
9057
9058         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
9059
9060 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
9061
9062         * mini.c (mini_get_inst_for_method): Changed to allow ports
9063         to return a MonoInst instead of opcode 
9064         (renamed mini_get_opcode_for_method to better reflect the new functionality)
9065         
9066         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
9067         Allow ports to return a created MonoInst instead of op-code, will enable
9068         new optimizations.
9069         (renamed mini_get_opcode_for_method to better reflected the functionality)
9070
9071 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
9072
9073         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
9074
9075 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9076
9077         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
9078         Fixes #69985.
9079
9080 2004-12-08  Martin Baulig  <martin@ximian.com>
9081
9082         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
9083         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
9084
9085 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9086
9087         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
9088         correctly.
9089
9090         * exceptions.cs: Disable some tests which depend on properties of x86 fp
9091         arithmetic.
9092
9093 2004-12-08  Raja R Harinath  <rharinath@novell.com>
9094
9095         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
9096
9097 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
9098
9099         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
9100         bug introduced by the previous patch.
9101
9102 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9103
9104         * mini-ppc.c, objectc.cs: handle large structs passed by value
9105         (fixes bug #69972).
9106
9107 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
9108
9109         * mini-ppc.c: OP_ARGLIST implementation from
9110         Geoff Norton  <gnorton@customerdna.com>.
9111
9112 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
9113
9114         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
9115         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
9116
9117 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9118
9119         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
9120
9121 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9122
9123         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
9124         support.
9125
9126 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
9127
9128         * mini-sparc.c: Zero out localled-ed memory.
9129
9130         * iltests.il: Add tests for zeroing out localloc-ed memory.
9131
9132 2004-12-04  Martin Baulig  <martin@ximian.com>
9133
9134         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
9135         mono_method_get_signature_full().       
9136
9137 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
9138
9139         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
9140         and some utility functions (always for SSAPRE), integrated SSAPRE.
9141         * mini.h: Likewise.
9142         * driver.c: Added ssapre option.
9143         * ssa.c: Small fix on OP_ARG handling.
9144         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
9145         * Makefile.am: Likewise.
9146
9147 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
9148
9149         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
9150         now in the xp code.
9151
9152         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
9153         icall.
9154
9155 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9156
9157         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
9158         
9159         * cpu-s390.md : Increase instruction length of oparglist.
9160
9161         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
9162
9163 2004-11-30  Martin Baulig  <martin@ximian.com>
9164
9165         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
9166         virtual generic methods.  We call a special helper_compile_generic_method()
9167         icall to retrieve the method from the vtable, inflate and compile
9168         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
9169
9170         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
9171
9172 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
9173
9174         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
9175
9176 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
9177
9178         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
9179         Fixes #69929.
9180
9181 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
9182
9183         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
9184         platforms with PIC aot.
9185
9186 2004-11-28  Martin Baulig  <martin@ximian.com>
9187
9188         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
9189         Fixes gen-112.cs.
9190
9191 2004-11-28  Martin Baulig  <martin@ximian.com>
9192
9193         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
9194         the result of mono_type_get_underlying_type() to check whether
9195         we're byref.
9196
9197 2004-11-26  Martin Baulig  <martin@ximian.com>
9198
9199         * mini.c
9200         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
9201         in the g_assert().
9202
9203 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
9204
9205         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
9206         the same way as the other arguments so they won't get clobbered.
9207
9208         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
9209         calls through R11 since it is clobbered by the trampoline code.
9210
9211 2004-11-26  Raja R Harinath  <rharinath@novell.com>
9212
9213         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
9214         pick up in-tree mscorlib.dll.
9215
9216 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
9217
9218         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
9219
9220         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
9221         runtime data/code are now stored in a table similar to the GOT in ELF. 
9222         This allows the code itself to be position independent.
9223
9224         * aot.c: Fix loading of referenced assemblies after the lazy assembly
9225         loading changes.
9226
9227         * aot.c: Attach ELF type (object/function) directives to all global
9228         symbols.
9229
9230         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
9231
9232         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
9233
9234         * mini-amd64.h: Turn on PIC AOT code.
9235
9236         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
9237         returning the offset within an OP_AOTCONST instruction where the GOT
9238         offset needs to be added.
9239
9240         * mini.h: Bump AOT file format version.
9241
9242 2004-11-25  Martin Baulig  <martin@ximian.com>
9243
9244         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
9245         uninflated generic methods.
9246
9247 2004-11-25  Martin Baulig  <martin@ximian.com>
9248
9249         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
9250
9251 2004-11-24  Martin Baulig  <martin@ximian.com>
9252
9253         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
9254         original klass (this only applies for generic instances).
9255
9256 2004-11-24  Martin Baulig  <martin@ximian.com>
9257
9258         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
9259         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
9260         that array).
9261
9262 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
9263
9264         * mini.c (mono_method_to_ir): Disable inlining for methods containing
9265         localloc. Fixes #69678.
9266
9267         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
9268         
9269 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
9270
9271         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
9272         used SSE registers on pinvoke calls. Fixes #69774.
9273
9274 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
9275
9276         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
9277         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
9278
9279 2004-11-23  Raja R Harinath  <rharinath@novell.com>
9280
9281         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
9282         Refer directly to the mcs/ tree.
9283
9284 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9285
9286         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
9287         Check if a trampoline for a synchronized method is required. 
9288
9289 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
9290
9291         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
9292         with localloc if needed. Throe arithmetric exception in
9293         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
9294         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
9295
9296 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
9297
9298         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
9299         types before switching on type.  Fixes #69622.
9300
9301 2004-11-19  Raja R Harinath  <rharinath@novell.com>
9302
9303         * Makefile.am (check-local): New.  Integrate into 'make check'.
9304         (MCS,RUNTIME): Define using in-tree mono and mcs.
9305         (ILASM): New.
9306         (%.exe): Use $(ILASM).
9307
9308 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
9309
9310         * mini-ppc.c: adjust initial prolog size (bug #69691).
9311
9312 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
9313
9314         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
9315         #69664.
9316
9317 2004-11-17  Raja R Harinath  <rharinath@novell.com>
9318
9319         * Makefile.am (clean-local): Rename from 'clean'.
9320
9321 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9322
9323         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
9324         to mono_arch_is_int_overflow. 
9325         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
9326         SIGFPE events.
9327
9328 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
9329
9330         * declsec.c|h: New files to support declarative security attributes.
9331         Added function to check if a method has (applicable) security.
9332         * mini.c|h: Add check for declarative security attributes in
9333         mono_method_check_inlining.
9334         * Makefile.am: Added declsec.c and declsec.h to the build.
9335
9336 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
9337
9338         * mini.c, mini.h: update to keep dynamic code info per-domain.
9339
9340 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
9341
9342         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
9343         (mini_init): Get rid of it from here too.
9344
9345 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
9346
9347         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
9348         implemented OP_RETHROW (patch by Geoff Norton
9349         <gnorton@customerdna.com>).
9350
9351 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
9352
9353         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
9354         between appdomains.  Fixes appdomain-unload on PPC.
9355
9356 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
9357
9358         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9359         mini-exceptions.c: handle the new wrapper types.
9360         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
9361         token value as a MonoClass* when compiling a wrapper.
9362         mono_jit_create_remoting_trampoline now takes an additional
9363         MonoRemotingTarget parameter.
9364         
9365 2004-11-10  Martin Baulig  <martin@localhost>
9366
9367         * mini.c (mono_method_to_ir): Use `generic_container->context'
9368         rather than creating a new one.
9369
9370 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9371
9372         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
9373
9374         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
9375
9376 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
9377
9378         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
9379         the experimental aot cache stuff.
9380
9381 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
9382
9383         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9384         mini-exceptions.c: update to exception clause structure changes.
9385
9386 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9387
9388         * exceptions-x86.c (throw_exception): Fix warnings.
9389
9390         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
9391         for OP_RETHROW.
9392
9393 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9394
9395         * exceptions-sparc.c (get_throw_exception): Really fix this.
9396
9397 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
9398
9399         * tramp-*.c: we no longer support icalls without wrappers, so
9400         a bit of code can be removed here
9401
9402 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
9403
9404         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
9405         patch.
9406
9407         * cpu-sparc.md: Add op_rethrow.
9408
9409         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
9410
9411         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
9412
9413         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
9414         * mini-ops.h: Add OP_RETHROW.
9415
9416         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
9417
9418         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
9419
9420 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
9421         
9422         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
9423         Makes the output much easier to read
9424
9425 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
9426
9427         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
9428         prevents another huge leak when compiling with ssa. Secondly, the
9429         performance of doing this rather than freeing the lists is much
9430         better. GList does a lock every time you allocate a list link,
9431         so that it can use a memory pool. So, it is better to just use
9432         a memory pool of our own.
9433         
9434         * ssa.c, linear-scan.c: replace g_list_remove_link with
9435         g_list_delete.  The remove one does not free the GList, so we were
9436         leaking memory. On -O=all --compile-all with corlib, this cut down
9437         3 MB of allocations.
9438
9439 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
9440
9441         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
9442
9443         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
9444
9445         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
9446         into a new function mono_create_jit_trampoline ().
9447
9448 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
9449
9450         * trace.c (get_spec): Allow tracing of classes without a namespace.
9451
9452 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
9453
9454         * mini.c: Fix pointer overwrite in mini_method_compile.
9455
9456 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
9457
9458         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
9459         The darwin ABI needs some special handling for 1 and 2 byte structs
9460         Lets use lbz/lhz instead of lwz everywhere.
9461         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
9462         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
9463         Use stb/sth for the former, and put the latter always on stack instead of in
9464         argument registers.
9465
9466 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
9467
9468         * trace.c (is_filenamechar): Add '_'.
9469
9470 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
9471
9472         * mini-s390.c: Fix prolog length to allow for large trace requirements.
9473
9474         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
9475
9476 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
9477
9478         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
9479         depends on libmonogc. Fixes #68805.
9480
9481 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
9482
9483         * mini.c (mono_jit_free_method): Provide extra information for
9484         this error.  Currently this leaks, but will be turned into a
9485         developer option in the future.
9486
9487 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
9488
9489         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
9490
9491 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
9492
9493         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
9494         boundary. Fixes reading of PATCH_INFO_R4 and R8.
9495         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
9496
9497 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
9498
9499         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
9500         trampolines for AOT code.
9501
9502 2004-10-22    <vargaz@freemail.hu>
9503
9504         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
9505         constructed types. Fixes #68136.
9506
9507 2004-10-21  Martin Baulig  <martin@ximian.com>
9508
9509         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
9510         if it returns true, unwind the stack to the call instruction.
9511
9512 2004-10-21    <vargaz@freemail.hu>
9513
9514         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
9515
9516         * mini.h: Bump AOT version number.
9517
9518         * objects.cs: Add another test for unbox trampolines.
9519
9520         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
9521         valuetype methods.
9522
9523 2004-10-20    <vargaz@freemail.hu>
9524
9525         * driver.c: Add SHARED to the set of optimizations tested.
9526
9527         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
9528
9529         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
9530         used by CEE_NEWARR.
9531
9532         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
9533
9534 2004-10-20  Martin Baulig  <martin@ximian.com>
9535
9536         * mini-exceptions.c (mono_handle_exception): Call
9537         mono_debugger_handle_exception() to tell the debugger about
9538         catch/finally clauses.
9539
9540 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
9541
9542         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
9543
9544         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
9545         #68447.
9546
9547 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
9548
9549         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
9550         methods as their native size, fixed bug #57543, #57545.
9551         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
9552         This saves a temporary register and mullw call down into 1 (minor perf
9553         increase for cases like sum = sum * 5;  This use to translate into:
9554             li r11,5
9555             mullw r28,r28,r11
9556         It now translates to
9557             mulli r28,r28,5
9558
9559 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
9560
9561         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
9562         #68388.
9563
9564 2004-10-11  Martin Baulig  <martin@ximian.com>
9565
9566         * mini.c (mono_method_to_ir): If we're a generic method, get the
9567         MonoGenericContainer from our MonoMethodNormal and create a
9568         MonoGenericContext from it.
9569
9570 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
9571
9572         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
9573
9574         * basic-long.cs: Add test for checked i8->i2 cast.
9575
9576 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9577
9578         * inssel-ppc.brg: added a couple of speedup rules.
9579
9580 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
9581
9582         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
9583         to speed up rebuilds.
9584
9585 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9586
9587         * mini-s390.c: Minor fix to OP_OR_IMM.
9588
9589 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
9590
9591         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
9592         better. Fixes appdomain-unload.exe on sparc.
9593
9594 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
9595
9596         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
9597         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
9598         see bug 67324.
9599
9600 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
9601
9602         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
9603
9604 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
9605
9606         * mini.c: Always generate a field read/write wrapper for members
9607         of the class MarshalByRefObject since the actual instance could
9608         be a CBO.
9609
9610 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
9611
9612         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
9613
9614 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
9615
9616         * driver.c mini.h trace.c: Move the setting of the main assembly into
9617         a separate function called mono_trace_set_assembly () and call it after
9618         actually loading the main assembly. Fixes #66872.
9619
9620 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
9621
9622         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
9623         using the code manager.
9624
9625 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
9626
9627         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
9628
9629 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
9630
9631         * cpu-amd64.md: Fix bug in previous patch.
9632         
9633         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
9634         #66650.
9635
9636 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
9637
9638         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9639         mini-exceptions.c: updates for changed stack walk interface.
9640
9641 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9642
9643         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
9644
9645 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
9646
9647         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
9648
9649 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
9650
9651         * driver.c (mini_regression_list): Do not call mono_assembly_close 
9652         since assemblies can't be unloaded.
9653         
9654 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9655
9656         * cpu-amd64.md: Fix more instruction lengths.
9657
9658         * cpu-amd64.md: Fix lengths of some instructions.
9659
9660 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
9661
9662         * inssel.brg: Make the array ldelema check aot friendly.
9663
9664 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9665
9666         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
9667
9668         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
9669
9670 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
9671
9672         * mini-x86.c: Fix build.
9673
9674         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
9675         mono_type_get_underlying_type () helper function to simplify code.
9676         
9677 2004-09-09  Martin Baulig  <martin@ximian.com>
9678
9679         * mini-amd64.c: Don't access `type->data.klass' directly, call
9680         mono_class_from_mono_type() instead since the type may be a
9681         generic instance.
9682
9683 2004-09-09  Martin Baulig  <martin@ximian.com>
9684
9685         * mini-amd64.c (get_call_info): Fix support for generic instances.
9686         (add_valuetype): Use mono_class_from_mono_type() to get the class
9687         since we can be a generic instance.
9688
9689 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
9690
9691         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
9692
9693 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
9694
9695         * liveness.c: reset spill costs on each scan: bug 62107
9696
9697 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
9698
9699         * exceptions-sparc.c (mono_arch_find_jit_info): remove
9700         unnecessary line that doesn't compile
9701
9702 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
9703
9704         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
9705         trampolines, make them call an error function so people can fix their
9706         code.
9707
9708 2004-09-06  Martin Baulig  <martin@ximian.com>
9709
9710         * mini.c (mono_method_to_ir): When initializing locals, handle a
9711         generic instances like a valuetype if it's a valuetype and like a
9712         class if it's a class.
9713
9714 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9715
9716         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
9717         stack. Fixes #64674.
9718
9719         * exceptions.cs: Add test for unwinding of call arguments.
9720
9721 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
9722
9723         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
9724         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
9725         set the carry/borrow flag). The sparc and s390 implementations
9726         can now use optimized versions (and simplify the code). ppc bugfixes.
9727
9728 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9729
9730         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
9731
9732 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
9733
9734         * inssel-amd64.brg: Remove leftover 32 bit rule.
9735
9736         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
9737
9738 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
9739
9740         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
9741         mono_arch_find_jit_info functions into a new function. Fix a memory
9742         leak.
9743
9744         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
9745         refactored code.
9746         
9747 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9748
9749         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
9750         as well.
9751         
9752         * exceptions.cs: Add array size tests.
9753
9754         * mini.c: Allocate a separate icall wrapper for each arity of 
9755         mono_array_new_va. Fixes #59509.
9756
9757         * exceptions.cs: Add testcase for 64578.
9758
9759         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
9760
9761         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
9762         
9763 2004-09-02  Martin Baulig  <martin@ximian.com>
9764
9765         * mini.c (mono_method_to_ir): When initializing the locals, call
9766         handle_initobj() on the generic instance itself, not its
9767         underlying type.
9768
9769 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9770
9771         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
9772         MonoJitInfo for dynamic methods.
9773
9774         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
9775
9776         * mini.c: Add support for freeing JIT data for dynamic methods.
9777         
9778 2004-09-01  Martin Baulig  <martin@ximian.com>
9779
9780         * mini-x86.c (is_regsize_var): Added support for generic
9781         instances.
9782         (mono_arch_emit_prolog): Make this compile again, use
9783         `x86_push_imm_template (code)'.
9784
9785 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
9786
9787         * mini-x86.c: make all push_imm instructions that get
9788         patched always emit the long form
9789
9790 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
9791
9792         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
9793         in a per-domain hash.
9794
9795         * mini-amd64.c (merge_argument_class_from_type): Handle generic
9796         types.
9797
9798 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
9799
9800         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
9801         work.
9802         
9803         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
9804         work.
9805
9806         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
9807         Beginnings of SSE2 support.
9808
9809         * exceptions.cs: Add more tests for checked int<->uint casts.
9810
9811 2004-08-28  Martin Baulig  <martin@ximian.com>
9812
9813         * mini-x86.c (mono_arch_instrument_epilog): Added support for
9814         generic instances.
9815
9816         * mini.c
9817         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
9818         Handle generic instances recursively.
9819
9820 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9821
9822         * iltests.il: test for conv.u8 on a constant
9823
9824 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9825
9826         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
9827         LCONV_x4 (shrun_32 (membase)).
9828
9829 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9830
9831         * inssel-x86.brg: c&p rules for push/setret of long
9832
9833 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
9834
9835         * inssel-x86.brg: c&p rules for compare (base, regvar) and
9836         compare (regvar, base)
9837
9838         * inssel-x86.brg: more burg love
9839
9840         * inssel.brg: more cleanup
9841
9842         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
9843
9844 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
9845
9846         * basic-long.cs, basic-calls.cs: new tests for optimization.
9847
9848 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
9849
9850         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
9851         patch.
9852
9853 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
9854
9855         * mini-amd64.c (read_tls_offset_from_method): Add another case.
9856         
9857 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
9858
9859         * inssel.brg (mini_emit_memcpy): use 
9860         NO_UNALIGNED_ACCESS to disable memcpy optimization
9861
9862 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
9863
9864         * mini-amd64.c: Handle generic types in various places.
9865
9866         * mini.c (mono_method_to_ir): Handle generic types in init locals.
9867
9868 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
9869
9870         * mini.c (handle_box): Fix warning.
9871
9872         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
9873
9874         * mini-amd64.h: Enable the emit_state optimization.
9875
9876         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
9877
9878         * mini-amd64.c: Add some new 64 bit peephole opts.
9879
9880         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
9881
9882         * cpu-amd64.md: sreg1 of div instructions must be %rax.
9883
9884         * mini-amd64.c: Register allocator fixes.
9885
9886         * mini.c: Add an optimization to emit_state to avoid allocation of new
9887         registers on some platforms.
9888
9889 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
9890
9891         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
9892
9893         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
9894         allocation. Fixes #63085.
9895
9896         * basic-long.cs: Add new regression test.
9897
9898         * mini-amd64.c: Register allocator improvements.
9899
9900 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
9901
9902         * mini-amd64.c (read_tls_offset_from_method): Add another code
9903         sequence.
9904
9905         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
9906         instruction sequence for nullifying class init trampolines.
9907
9908         * objects.cs: Add new regalloc test.
9909
9910         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
9911
9912 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
9913
9914         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
9915         
9916         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
9917         arguments.
9918
9919         * driver.c: Fix profiling after TLS changes.
9920         
9921         * driver.c (mono_main): Set mono_stats.enabled if needed.
9922
9923         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
9924         CEE_BOX.
9925
9926 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
9927
9928         * mini-x86.c: use a 1 op rather than a 2 op tls access
9929         instruction -> faster.
9930
9931 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
9932
9933         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
9934         x86 backend.
9935
9936 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
9937
9938         * exceptions-sparc.c (throw_exception): fix typo
9939
9940 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
9941
9942         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
9943         set tree->dreg correctly with tls. Allow any
9944         register to be used.
9945
9946         * mini-x86.c (read_tls_offset_from_method): add new code
9947         generation pattern seen with GCC.
9948
9949
9950 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
9951
9952         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
9953         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9954         exceptions-sparc.c: fix some performance issues in exception
9955         handling and setting of the stack trace for exceptions that were
9956         already thrown.
9957
9958 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
9959
9960         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
9961         x86 backend.
9962         
9963         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
9964         registers.
9965
9966 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
9967
9968         This patch inlines tls access, when possible.
9969         
9970         * mini.h: new arch functions for TLS intrinsics.
9971         All platforms updated with a stub.
9972
9973         * mini.c: use the new intrinsics
9974
9975         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
9976         arch specific intrinsic for tls variables
9977
9978 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
9979
9980         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
9981         under windows.
9982
9983 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
9984
9985         * mini.c: thread local allocation
9986
9987 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
9988
9989         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
9990
9991         * Makefile.am: Link against the static version of libmonogc.
9992         
9993         * Makefile.am: Link the static versions of the convenience libraries
9994         into the mono executable.
9995
9996         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
9997
9998 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
9999
10000         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
10001         on integer overflow.
10002
10003         * mini-amd64.c: Reorganize function call code.
10004
10005         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
10006
10007 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10008
10009         * inssel-x86.brg: use xor eax,eax.
10010         
10011         * basic.cs: new tests
10012
10013 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10014
10015         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
10016         in exception throwing code.
10017         
10018 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10019
10020         * inssel-x86.brg: use xor esi,esi.
10021
10022 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10023
10024         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
10025         can trace methods compiled during mini_init () too.
10026
10027         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
10028         CEE_CONV_U4.
10029
10030 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10031
10032         * Makefile.am: static link on x86 (r=zoltan)
10033
10034 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10035
10036         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
10037         code since it causes some programs to fail.
10038
10039 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
10040
10041         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
10042
10043 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10044
10045         * mini.c: ovfops_op_map - add STACK_OBJ case for
10046         CONV_I 
10047         * basic.cs: add test_0_pin_string as test
10048         case for above.
10049
10050 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10051
10052         * Makefile.am: build C# if srcdir != builddir
10053
10054 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10055
10056         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
10057         fall-through blocks.
10058
10059 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10060
10061         * driver.c: enable loop by default again and include abcrem in -O=all.
10062
10063 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
10064
10065         * iltests.il: Add some localloc tests.
10066
10067         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
10068
10069         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
10070         Fixes #62574.
10071
10072         * inssel-amd64.brg: Add some optimizations.
10073
10074         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
10075         for gcc-3.4.
10076
10077         * Makefile.am: Statically link mono against libmono on AMD64.
10078         
10079         * mini-amd64.c inssel-amd64.brg: Optimizations.
10080
10081 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
10082
10083         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
10084
10085         * tramp-amd64.c: Patch calling code in trampolines.
10086
10087 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
10088
10089         * mini-amd64.c: pinvoke struct passing fixes.
10090
10091 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
10092
10093         * mini-sparc.c: redo change, make mono_arch_cpu_init call
10094         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
10095
10096 2004-08-05  Duncan Mak  <duncan@ximian.com>
10097
10098         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
10099         CEE_LDELEM_ANY.
10100
10101 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10102
10103         * mini-amd64.c (emit_move_return_value): Move return value for normal
10104         calls too.
10105
10106 2004-08-05  Martin Baulig  <martin@ximian.com>
10107
10108         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
10109         `type->type'; just modify `type' itself when dealing with enums
10110         and generic instances.
10111         (check_call_signature): Make `simple_type' a `MonoType *'.
10112
10113 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10114
10115         * mini.c: Use OP_PADD to add offsets to addresses.
10116
10117         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
10118
10119 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
10120
10121         * mini-sparc.c (mono_arch_emit_epilog): fix check
10122         for folding last op into restore instruction
10123
10124 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10125
10126         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
10127         helper methods using the code manager.
10128         
10129         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
10130
10131         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
10132
10133 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10134         
10135         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
10136           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
10137
10138         * mini-s390.c: fix tail processing
10139
10140 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
10141
10142         * mini-ppc.c: mul.ovf.un exception name fix.
10143
10144 2004-08-03  Martin Baulig  <martin@ximian.com>
10145
10146         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
10147         instances; before jumping to `handle_enum', also modify `ptype'.
10148
10149 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
10150
10151         * cpu-sparc.md: fcall maximal length too small.
10152
10153 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
10154
10155         * mini-amd64.c mini.h: Add initial support for passing/returning 
10156         structures to/from pinvoked methods.
10157
10158 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
10159
10160         * mini-ppc.c: reg allocator fix.
10161
10162 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
10163
10164         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
10165
10166         * inssel.brg: Optimize memset on 64 bit machines.
10167
10168         * mini-amd64.c: Fix some vararg cases.
10169
10170 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10171
10172         * mini-s390.c: Corrected macro in emit_float_to_int
10173
10174         * s390-abi.cs: Tests to exercise the s390 ABI
10175
10176 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10177
10178         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
10179         caller saved regs.
10180
10181         * basic.cs: Add a test for add.ovf.un.
10182
10183 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
10184
10185         * mini-sparc.c: add case for OP_IDIV_UN
10186
10187 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10188
10189         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
10190         
10191         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
10192
10193 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
10194
10195         * basic.cs: regression tests.
10196
10197         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
10198         regressions.
10199
10200 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10201
10202         * basic.cs: Add a new test.
10203
10204         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
10205         and AOT. Various fixes and optimizations.
10206
10207         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
10208
10209 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10210
10211         * mini-ppc.c: make sure temp regs are not used for global reg
10212         allocation.
10213
10214 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
10215
10216         * cpu-sparc.md: conv_i8 fix for 64bits
10217
10218         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
10219
10220 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
10221         
10222         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
10223         add opcode for cmp BYTE PTR [eax], imm.
10224
10225         * inssel.brg: Make memcpy and memset takes bases.
10226
10227 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10228
10229         * *-amd64.*: More AMD64 work.
10230         
10231 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10232
10233         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
10234         add a compare-not-equal opcode.
10235         
10236 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
10237
10238         * mini.c: Use mono_init_from_assembly instead of mono_init.
10239         
10240 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10241
10242         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
10243
10244         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
10245
10246         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
10247
10248         * inssel.brg: 64 bit fixes.
10249
10250         * mini.h (MonoCallInst): Add some AMD64 specific data.
10251
10252         * mini.h: Add some OP_P opcodes.
10253
10254 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10255
10256         * basic.cs: tests for 61797 and 61740
10257
10258 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10259
10260         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
10261         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
10262
10263 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
10264
10265         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
10266
10267         * *-amd64*.*: Ongoing AMD64 work.
10268
10269 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
10270
10271         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
10272
10273         * *-amd64*: Ongoing AMD64 work.
10274
10275         * mini-arch.h: Add AMD64 support.
10276
10277         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
10278
10279         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
10280
10281         * mini-ops.h: Add new opcodes.
10282
10283         * Makefile.am: Add AMD64 support.
10284
10285         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
10286         rules into the inssel-long*.brg files.
10287
10288         * *-amd64.*: Add beginnings of AMD64 backend.
10289
10290 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
10291
10292         * mini.c (print_dfn): commenting out the code that prints
10293         the cil. With -O=deadce, this makes -v -v crash.
10294         
10295         * cpu-pentium.md: make checkthis have a length of 2
10296
10297 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
10298
10299         * mini-sparc.h: fix implementations of __builtin
10300         functions for Sun compiler for V9.
10301
10302 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
10303
10304         * mini.c: use the new stelem.ref wrapper
10305         * exceptions.cs, arrays.cs: new stelem.ref tests
10306
10307 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10308
10309         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
10310         new XSP should work with these changes).
10311
10312 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
10313         
10314         * inssel-{long32,x86,}.brg: trivial optimizations.
10315         
10316 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
10317
10318         * mini.c: load value when emitting box operation in
10319         constrained calls.
10320
10321 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
10322
10323         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
10324         is one byte shorter than cmp DWORD PTR [eax], 0.
10325
10326 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10327
10328         * inssel-ppc.brg: arguments on the stack are always
10329         relative to the stack pointer (spotted by Neale Ferguson).
10330
10331 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10332
10333         * exceptions-x86.c: delay appending the method name to the trace until
10334         after mono_jit_info_table_find is called, as this gets the real
10335         MonoMethod.
10336
10337 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
10338
10339         * aot.c: register roots
10340
10341 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10342
10343         * aot.c : I could just use PLATFORM_WIN32 flag.
10344
10345 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10346
10347         * aot.c : Reverting the previous fix. This time it broke linux build.
10348
10349 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10350
10351         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
10352
10353 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
10354
10355         * mini.c (handle_stack_args): Remove some more debugging code.
10356         
10357         * mini.c (handle_stack_args): Remove debug output left in by mistake.
10358
10359         * driver.c mini.h aot.c: Allow additional options to be specified with
10360         --aot and pass them to mono_compile_assembly.
10361
10362         * aot.c: Add experimental code to AOT compile all loaded assemblies
10363         on demand and save the code into a cache in the filesystem.
10364
10365         * aot.c: Add support for more wrapper methods.
10366         
10367         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
10368         58863.
10369
10370         * cpu-*.md: Remove removed opcodes.
10371
10372         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
10373         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
10374         related icalls to marshal.c.
10375
10376 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
10377
10378         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
10379
10380         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
10381
10382         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
10383
10384 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
10385         * liveness.c: If liveness is recomputated we need to reset the information
10386         for each variable. This way, if the liveness range has been narrowed
10387         by optimizations that happened after the last computation, we can return
10388         a smaller range.
10389         
10390         For example, if you have
10391         
10392         {
10393                 int i = 0;
10394                 
10395                 // Tons of code that does not affect i
10396                 
10397                 i = foo ();
10398                 ...
10399         }
10400         
10401         i = 0 is dead code and will be removed by SSA. However, when
10402         linear scan gets to the code, i will still appear to be live
10403         throughout the entire block. This prevents good register allocation.
10404
10405 2004-07-06  Martin Baulig  <martin@ximian.com>
10406
10407         * debug-mini.c (mono_debug_init_method): Allow
10408         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
10409         (mono_debug_add_icall_wrapper): New method.
10410
10411         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
10412
10413 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
10414
10415         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
10416         optimization.
10417
10418 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
10419
10420         * aot.c (mono_aot_load_method): Fix loading of debug info.
10421
10422 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10423
10424         * aot.c: Add logging support.
10425
10426 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10427
10428         * mini.h: Add prototype for mono_print_method_from_ip.
10429
10430         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
10431
10432         * inssel.brg: 64 bit fixes.
10433
10434         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
10435         inssel-long32.brg.
10436
10437         * Makefile.am: Add SPARC64 support.
10438
10439 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10440
10441         * aot.c: Fix alignment problems on 32 bit platforms.
10442
10443 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10444
10445         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
10446         SPARC64.
10447
10448         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
10449         problems.
10450
10451         * mini.h: Bump AOT file version. Some 64 bit fixes.
10452
10453 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10454
10455         * inssel-sparc.brg: Add new rule to avoid register moves.
10456
10457         * inssel.brg: Add ldind_to_load_membase helper function.
10458
10459 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
10460
10461         * mini.c: OffsetToStringData intrinsic.
10462         
10463 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10464
10465         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
10466
10467         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
10468         regression tests.
10469
10470         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
10471 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
10472
10473         * mini.c: reinstated mono_compile_get_interface_var()
10474         on x86, too, since the change breaks the Gtk# build there as well.
10475
10476 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10477
10478         * driver.c: remove loop from the default optimizations: it seems to
10479         interact badly with some of the other options (see bug #60613).
10480
10481 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
10482
10483         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
10484         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
10485
10486 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
10487
10488         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
10489         vararg-using methods.
10490
10491 2004-06-21  Martin Baulig  <martin@ximian.com>
10492
10493         * mini/mini-exceptions.c
10494         (mono_handle_exception): Added `gpointer original_ip' argument.
10495         After calling mono_unhandled_exception(), call
10496         mono_debugger_unhandled_exception() and if that returns true,
10497         restore the context and return.
10498
10499 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10500
10501         * mini-ppc.c: prefer the use of relative branches so
10502         they won't need to be patched in aot code (patch from Patrick Beard).
10503
10504 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10505
10506         * aot.c: patch from Patrick Beard to make the output assembly
10507         more correct for the MacOSX assembler. Small tweak to
10508         generate sane images on Linux/PPC, too.
10509
10510 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10511
10512         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
10513         case until bug #59509 is fixed (shows up in #60332).
10514
10515 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10516
10517         * mini.c: make sure the needed wrappers are compiled, too, with
10518         precomp.
10519
10520 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
10521
10522         * driver.c: remove NPTL reference in --version output.
10523
10524 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10525
10526         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
10527         generate valid assembly for the Mach-O assembler.
10528
10529 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10530
10531         * driver.c: don't include abcrem in the all optimization specifier
10532         since it slows down jit compilation too much for now.
10533
10534 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
10535
10536         * mini.c: use BIGMUL only if both operands have the same signage.
10537         * iltests.il: Test for bug 60056. (errors related to signage in
10538         BIGMUL).
10539
10540         r=lupus.
10541
10542 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
10543
10544         * mini.c, aot.c: memory leak fixes.
10545
10546 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10547
10548         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
10549
10550 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
10551
10552         * Makefile.am: remove the -static hack completely, it links in
10553         statically glib as well.
10554
10555 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
10556
10557         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
10558         * exceptions.cs: make it compile with new mcs/csc.
10559
10560 2004-06-03 Massimiliano Mantione <massi@ximian.com>
10561         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
10562         and added relevant test case.
10563
10564 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10565
10566         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
10567         regressions in gtk-sharp.
10568
10569 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
10570
10571         * exceptions.cs: New regression tests.
10572
10573         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
10574
10575 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
10576
10577         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
10578
10579 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
10580
10581         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
10582
10583         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
10584
10585 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
10586
10587         * mini.c (mono_jit_runtime_invoke): Init class in this
10588         method instead of trusting mono_jit_compile_method to
10589         do the work (because wrappers can be in object class)
10590
10591 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
10592
10593         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
10594
10595         * basic-long.cs: New regression test.
10596
10597 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
10598
10599         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
10600         and div/rem checks.
10601
10602 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
10603
10604         * Makefile.am: fix miguel's change to build mono statically against
10605         libmono (track build dependencies).
10606
10607 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10608
10609         * cfold.c: Some glib versions do not have G_MININT32.
10610
10611 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
10612
10613         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
10614         with precision of tan, atan, sin and cos, and implemented related
10615         regressions tests (fixes bug 54467, but one new problem appeared and
10616         is not fixed yet).
10617
10618 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10619
10620         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
10621
10622         * exceptions.cs: Add test for constant folding && division by zero.
10623
10624         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
10625         since driver.c is in libmono too, so the optimization was useless.
10626
10627         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
10628         variable to driver.c so the compiler can emit more efficient code to
10629         access them.
10630
10631 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10632
10633         * Makefile.am: don't distribute generated inssel.[ch] files.
10634
10635 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
10636
10637         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
10638         into the default appdomain. Fixes #58707.
10639
10640         * jit-icalls.c: Remove the broken approximation for truncl, doing
10641         no conversion is better.
10642
10643         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
10644         Fixes #58863.
10645
10646 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
10647
10648         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
10649         of the mcrxr instruction which is not available on some processors
10650         even if it's documented to be. Implement add and sub overflow correctly
10651         (still not complete for long unsigned). Speed up icalls a bit.
10652
10653 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
10654
10655         * mini.c (mono_jit_compile_method_with_opt): Make sure that
10656         we run .cctor in the current domain instead of target_domain.
10657         
10658         Fixes bug #58558, .cctor not being called in -O=shared.
10659
10660 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10661
10662         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
10663
10664 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
10665
10666         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
10667         which can be done with an imm8, do it that way.
10668         (mono_arch_output_basic_block): ditto for a jmp
10669         (mono_arch_emit_prolog): Computate maximum offset of a label.
10670
10671 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
10672
10673         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
10674         now tries to allocate prefered physical reg's for virtual
10675         regs. This reduces the number of emited spills/loads with
10676         20-30% on our core assemblies.
10677
10678 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10679
10680         * jit-icalls.c: truncl() is not needed and trunc() is
10681         the correct thing to do anyway (bug #58287).
10682
10683 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
10684
10685         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
10686         if available.
10687
10688 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10689
10690         * driver.c: enable loop optimizations by default.
10691
10692 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10693
10694         * mini-x86.c: fix calc of max loop size when aligning loops start.
10695
10696 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
10697
10698         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
10699         the stack.
10700
10701 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
10702
10703         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
10704         should set carry.
10705
10706         * basic-long.cs: Add tests for add/subtract of immediates with carry.
10707
10708         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
10709         
10710         * mini.c (inline_method): Allways inline some wrappers even if the cost
10711         is too large. Fixes #58785.
10712
10713         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
10714         
10715 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
10716
10717         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
10718         (crichton@gimp.org). Beginning of support for sparc/linux.
10719
10720         * mini-sparc.c: Optimize retrieval of LMF address.
10721
10722 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
10723
10724         * exceptions-ppc.c:  handle alloca in methods with clauses.
10725
10726 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
10727
10728         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
10729
10730 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
10731
10732         * mini.c: Delegate most of the abort signal work to 
10733           mono_thread_request_interruption, which also handles Stop and Suspend
10734           states.
10735
10736 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
10737
10738         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
10739         supports the save/restore lmf opcodes.
10740
10741 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
10742
10743         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
10744         by gcc-3.4 as well.
10745
10746         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
10747
10748 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10749
10750         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
10751         methods which contain array accesses.
10752
10753         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
10754         boundaries. Fixes #58537.
10755
10756         * iltests.il: Add regression test for #58537.
10757
10758 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10759
10760         * mini-x86.c (mono_arch_local_regalloc): Last part of
10761         fix for bug #58633 (releasing register to early).
10762
10763 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
10764
10765         * basic-long.cs: Add new regression test.
10766
10767 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10768
10769         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
10770         register too early on the chain.
10771
10772 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10773
10774         * mini.c (create_helper_signature): Use a helper function to reduce
10775         the code which needs to be written. Also set the calling convention of
10776         icalls on windows. Fixes #57840.
10777
10778 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10779
10780         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
10781         exceptions-ppc.c: added helper function to get the instruction address
10782         from a signal handler context.
10783
10784 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10785
10786         * helpers.c: use g_get_tmp_dir. Invokes happyness 
10787         from gonzalo.
10788
10789 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10790
10791         * helpers.c: Add new env variable to pass args to objdump.
10792         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
10793
10794 2004-05-17  Radek Doulik  <rodo@ximian.com>
10795
10796         * Makefile.am (common_sources): added abcremoval.h so it get
10797         disted and daily mono packages on go-mono.com will build again
10798
10799 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
10800
10801         * abcremoval.c: Fixed coding style, added copyright header.
10802
10803         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
10804
10805         * mini.h: Added prototype for abc removal main function.
10806
10807         * build_relations_propagation_table.pl: Added copyright header.
10808
10809 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
10810
10811         * basic-long.cs: reg test for complex ceq_long bug.
10812
10813 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
10814
10815         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
10816         reg in long and clob case (bug #58343). Fixed/added comments.
10817
10818 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
10819
10820         * mini.c (mono_jit_runtime_invoke): Follow new convention
10821         of calling the invoke method with an function pointer.
10822
10823 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
10824
10825         * ChangeLog: Fix author of memory leak patch.
10826
10827 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
10828
10829         * Makefile.am: fix make dist as well...
10830
10831
10832 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
10833
10834         * cfold.c: Made so that conversions from pointer to int4 are no-ops
10835         on archs where pointers are 4 bytes long.
10836
10837         * Makefile.am: Added abcremoval.c source file.
10838
10839         * abcremoval.c: Added abcremoval.c.
10840
10841         * abcremoval.h: Added abcremoval.h.
10842
10843         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
10844
10845         * inssel.brg: Enabled bounds check removal.
10846
10847         * mini.c: Added support for abcrem optimization.
10848
10849         * mini.h: Added abcrem optimization label.
10850
10851         * driver.c: Added support for abcrem optimization.
10852
10853         * propagated_relations_table.def: Added propagated_relations_table.def.
10854
10855 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
10856
10857         * mini.c, cfold.c: fix style.
10858
10859 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10860
10861         * mini.c: handle issue with the low-level implementation of
10862         some long opcodes (bug #54209).
10863
10864 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
10865
10866         * basic.cs: test for my new cmov stuff.
10867
10868 2004-05-13      Patrik Torstensson
10869
10870         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
10871         opt and added peephole documentation.
10872
10873 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
10874
10875         * tramp-ppc.c: rewrote the generic trampoline code.
10876
10877 2004-05-11      Patrik Torstensson
10878
10879         * mini-x86.c: optimize long shl/shr asm code (one less branch)
10880
10881 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
10882
10883         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
10884
10885         * mini.h mini.c dominators.c: Applied patch from Derek Woo
10886         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
10887
10888         * mini.c: Add new icalls for AsAny marshalling.
10889
10890 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10891
10892         * tramp-ppc.c, mini-ppc.c: more cleanups.
10893
10894 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10895
10896         * mini.c: no warnings.
10897
10898 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10899
10900         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
10901
10902 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
10903
10904         * mini.c: In the thread abort signal handler, if the thread is in the
10905         process of being stoped, don't throw the Abort exception, just stop the
10906         thread.
10907
10908 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
10909
10910         * tramp-ppc.c: removed old code.
10911
10912 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10913
10914         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
10915         do some simple speed optimizations on ppc.
10916
10917 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10918
10919         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
10920         and large offsets in load/store.
10921
10922 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
10923
10924         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
10925         it causes regressions.
10926
10927 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
10928
10929         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
10930         support.
10931
10932 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10933
10934         * jit-icalls.c: remove warnings.
10935         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
10936         speedups for unsafe code.
10937
10938 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
10939
10940         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
10941
10942 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
10943
10944         * basic-calls.cs: Add new regression test.
10945
10946         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
10947         more portable.
10948
10949         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
10950
10951         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
10952         is no longer used.
10953
10954 2004-05-06      Patrik Torstensson
10955
10956         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
10957         long reg allocation in any reg (not only eax:edx) and implemented 
10958         long shl/shr ops in asm instead of helpers.
10959
10960 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
10961
10962         * mini-sparc.h: Fix warnings.
10963
10964         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
10965         stack.
10966
10967         * mini-exceptions.c (mono_handle_exception): Call the filter in a
10968         separate statement for clarity.
10969
10970         * mini-sparc.c: Update status.
10971
10972 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
10973
10974         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
10975         here.
10976
10977 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10978
10979         * inssel-ppc.brg: another small pre-release workaround:
10980         we don't do overflow detection for long_sub_un.
10981
10982 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10983
10984         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
10985         (also works around a weird ppc bug: 57957).
10986
10987 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
10988
10989         * tramp-ppc.c: trampoline fixes.
10990
10991 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
10992
10993         * mini-ppc.c: fixed typos.
10994
10995 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10996
10997         * mini-ppc.c, exceptions-ppc.c: more code saves registers
10998         at the top of the stack. Fixed typos. Use a frame registers
10999         for all the methods with exception clauses.
11000
11001 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11002
11003         * exceptions-ppc.c: restore fp registers.
11004
11005 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
11006
11007         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
11008         order from the stack top (moved the stack room to save the
11009         return value for trace after the param area). Fixed corruption
11010         in restoring registers on unwind.
11011
11012 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11013
11014         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
11015
11016 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11017
11018         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
11019         and prolog/epilog for methods that use it. Allow
11020         enough param area room for varargs methods. Fix miguel's
11021         breakage in exception handling.
11022
11023 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11024
11025         * Makefile.am: run genmdesc only on current arch.
11026
11027 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11028
11029         * exceptions-x86.c:
11030         * mini-x86.h: fix the build on windows.
11031
11032 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
11033
11034         * 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.
11035
11036         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
11037
11038         * mini-exceptions.c: New file.
11039         
11040         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
11041         Move some parts of the x86 exception handling code to an 
11042         arch-independent file so it can be shared with other ports.
11043
11044 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
11045
11046         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
11047
11048 2004-04-26  David Waite  <mass@akuma.org>
11049
11050         * driver.c: remove comma from end of enumeration declaration
11051
11052 2004-04-26  Jackson Harper  <jackson@ximian.com>
11053
11054         * driver.c: parse config file before loading first assembly. This
11055         allows the user gac to be enabled/disabled. 
11056         
11057 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
11058
11059         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
11060         simpler mechanism: we do not care what is encoded initially
11061         (branch absolute or relative), we care about the code and its
11062         target.  I kept the old code for reference for now.
11063
11064         The new code tries first to determine if the jump is anywhere in
11065         the -/+32 absolute meg range, if it succeeds, it encodes using the
11066         absolute branch;  If not, it tried to find something in the
11067         relative range, if not, it uses the handle_thunk code. 
11068
11069 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
11070
11071         * exceptions-ppc.c: use the correct ip register on macosx.
11072
11073 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
11074
11075         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
11076
11077 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
11078
11079         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
11080         Raise exception on integer divide by zero by hand since the hw
11081         doesn't support it. Handle NaNs in FP compares.
11082
11083 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
11084
11085         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
11086         code reducing duplication between the platforms and enabled
11087         signal exception handling (on linux for now).
11088
11089 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
11090
11091         * exceptions-ppc.c: more macosx support.
11092
11093 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11094
11095         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
11096
11097 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
11098
11099         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
11100
11101 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11102
11103         * iltests.il: more tests.
11104
11105 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11106
11107         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
11108         vars as well.
11109
11110 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11111
11112         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
11113
11114 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11115
11116         * liveness.c: Mark variables as volatile in all basic blocks reachable
11117         from exception clauses.
11118
11119 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
11120
11121         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
11122         inlining.
11123
11124 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11125
11126         * iltests.il, basic.cs: more tests for regalloc.
11127
11128 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11129
11130         * iltests.il: Some tests for register allocation modifications
11131         I have locally.
11132
11133 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
11134
11135         * exceptions.cs: Add regression test for bug #56782.
11136
11137         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
11138         original stack trace if an exception is rethrown. Fixes #56782. Oh,
11139         the beauty of fixing the same thing in 5 different files...
11140
11141 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
11142
11143         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
11144         methods.
11145
11146 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
11147
11148         * mini.c: Add support for STRWLPARRAY marshalling convention.
11149
11150 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11151
11152         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
11153         to init the context to setup the regs pointer).
11154
11155 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11156
11157         * exceptions-ppc.c: more exceptions work.
11158
11159 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11160
11161         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
11162         not allowed.
11163
11164 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11165
11166         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
11167         can use the memory directly.
11168
11169         * cpu-pentium.md: Update documentation from a post from Zoltan. 
11170
11171         add x86_add_membase, x86_sub_membase, x86_mul_membase
11172
11173 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11174
11175         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
11176         GENERAL_REGS they were also hardcoded for all PPC ports.
11177
11178         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
11179
11180         Remove hard-coded limit for floating point registers, use
11181         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
11182
11183         Notice that in MacOS X calling conventions you can fit a lot more
11184         floating point values in registers, so I should update the PInvoke
11185         test to excercise the passing of floating point values on the
11186         stack (currently broken).
11187         
11188 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
11189
11190         * tramp-ppc.c (create_trampoline_code): Added
11191         JUMP_TRAMPOLINE_SIZE. 
11192         (ppc_magic_trampoline): Follow the pattern from
11193         x86_magic_trampoline: if code is set to zero, return. 
11194         (create_trampoline_code): Always pass MonoMethod to the jump
11195         trampoline, before it was passing a null.
11196         (mono_arch_create_jump_trampoline): Implement the jump stub, could
11197         share the code with mono_arch_create_jit_trampoline. 
11198
11199         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
11200         implemented.
11201         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
11202         implemented.  
11203
11204         * cpu-g4.md: Added length for jmp instruction, the worst case
11205         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
11206         for save_lmf).
11207
11208 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
11209
11210         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
11211
11212 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
11213
11214         * mini.c: Only set bblock->real_offset when adding a new bblock, and
11215         before each IL instruction.
11216
11217         * mini.c (CEE_BOX): Fix warnings.
11218
11219 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11220
11221         * mini.c: removed a few unused vars and extra whitespace.
11222
11223 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
11224
11225         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
11226         checks.
11227         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
11228         index.
11229         (OP_GETCHR): use the above
11230         (CEE_LDELEMA): use the above.
11231
11232         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
11233         version of the generic impl.
11234         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
11235         (CEE_LDELEMA): use the above.
11236
11237 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11238
11239         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
11240         Fixes #56317.
11241
11242         * iltests.il: Added new regression test for #56317.
11243
11244 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11245
11246         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
11247         under NetBSD. Fixes #56450.
11248
11249         * liveness.c (update_gen_kill_set): Fix previous patch.
11250
11251 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11252
11253         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
11254
11255 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
11256
11257         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
11258         ldsfld and ldsflda.
11259
11260         * inssel-sparc.brg: Add more optimizations.
11261
11262         * mini-sparc.c: Replace multiply/divide with shifts if possible.
11263
11264 2004-04-01  Martin Baulig  <martin@ximian.com>
11265
11266         * mini.c (handle_box): New static function; moved the
11267         implementation of CEE_BOX here.
11268         (mono_method_to_ir): Added `constrained_call' variable.
11269         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
11270         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
11271         mono_method_get_constrained() to get the method.
11272
11273 2004-04-01  Martin Baulig  <martin@ximian.com>
11274
11275         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
11276         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
11277         (mono_method_to_ir): We don't need these macros anymore since
11278         mono_class_get_full() already takes care of it. 
11279
11280 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11281
11282         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
11283         use @function (as doesn't accept #function here) and check the return
11284         value of system and stop if fails.
11285
11286 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11287
11288         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
11289
11290 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
11291
11292         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
11293
11294         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
11295
11296         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
11297         #56223.
11298
11299         * basic-long.cs: Add test for negation of Int64.MinValue.
11300
11301 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
11302
11303         * mini-sparc.c: Update status.
11304
11305         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
11306
11307         * exceptions-sparc.c: Fix return value in filters.
11308
11309         * inssel-sparc.brg: Fix register allocation in some rules.
11310
11311 2004-03-28  Martin Baulig  <martin@ximian.com>
11312
11313         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
11314         if neccessary.  
11315
11316 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
11317
11318         * mini-x86.c (mono_arch_patch_code): Fix warnings.
11319         
11320         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
11321         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
11322         remove unused conv_u4 opcode.
11323
11324         * mini-x86.c: Remove valgrind workaround since it slows down things
11325         even when mono is not run under valgrind.
11326
11327 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
11328
11329         * mini-sparc.c: Update status.
11330
11331         * inssel-sparc.brg: Add some optimizations.
11332
11333         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
11334         future delay slot filling. Add support for varargs, tail calls and JMP.
11335
11336         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
11337         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
11338
11339         * inssel.brg: Fix register allocation in OP_ARGLIST.
11340
11341         * inssel.brg: Fix warnings.
11342
11343 2004-03-25  Martin Baulig  <martin@ximian.com>
11344
11345         * mini.c (inflate_generic_field): Removed.
11346         (mini_get_method): Removed, use mono_get_method_full(),
11347         (mini_get_class): Removed, use mono_class_get_full().
11348         (mono_method_to_ir): Pass our generic context to
11349         mono_field_from_token().        
11350
11351 2004-03-25  Martin Baulig  <martin@ximian.com>
11352
11353         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
11354         of a `MonoMethod *'.
11355         (mini_get_method): Take a `MonoGenericContext *' instead
11356         of a `MonoMethod *'.
11357         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
11358         a new local variable called `generic_context' which holds the
11359         current `MonoGenericContext *'; use it to lookup things.
11360
11361 2004-03-24  Martin Baulig  <martin@ximian.com>
11362
11363         * mini.c (mini_get_class): New static method; if we're inside a
11364         generic instance, inflate the class if neccessary.
11365         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
11366
11367 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
11368
11369         * iltests.il: New regression test for #55976.
11370
11371         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
11372         #55976.
11373
11374 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11375
11376         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
11377         output.
11378
11379 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11380
11381         * liveness.c: Consider SSA stores as well as loads when making vars
11382         volatile.
11383
11384         * exceptions.cs: New regression tests for register allocation.
11385         
11386 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
11387
11388         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
11389         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
11390           domain lock only to protect puntual access to data structures.
11391           Added access lock for sighash, jit_icall_hash_name, 
11392           jit_icall_hash_addr and domain->code_mp.
11393
11394 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
11395
11396         * driver.c: Print SIGSEGV handling method.
11397
11398         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
11399
11400         * mini.c (setup_jit_tls_data): Handle case when this is called
11401         multiple times for a thread.
11402
11403         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
11404         is different from fbxx_un. Fixes #54303. Also use constants instead of
11405         magic numbers in a lot of places.
11406
11407 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
11408
11409         * exceptions.cs: Fix cctor test when --regression is used.
11410
11411 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
11412
11413         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
11414         for Linux/ppc.
11415
11416 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11417
11418         * inssel-ppc.brg: fixed register assignments for some rules.
11419
11420 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11421
11422         * exceptions.cs: Add test for exceptions in static constructors.
11423
11424         * mini.c (mono_jit_compile_method_with_out): Move the calling of
11425         static constructors outside the domain lock. Fixes #55720.
11426
11427 2004-03-17  Martin Baulig  <martin@ximian.com>
11428
11429         * mini.c (get_generic_field_inst): Removed, this'll never happen.
11430         (inflate_generic_field): Take the `MonoMethod *' instead of the
11431         `MonoClass *' and added support for generic method.
11432         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
11433         have a `field->parent->gen_params', only inflate the field if it's
11434         an open constructed type.
11435
11436 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11437
11438         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
11439         exception object instead of the preconstructed ones.
11440
11441 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11442
11443         * mini.c: reverted changed to sigsegv_signal_handler commited
11444         accidentally in the previous patch.
11445
11446 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11447
11448         * mini.c:
11449         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
11450         running --aot with an old assembly.
11451
11452 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
11453
11454         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
11455         point values.
11456
11457         * mini-sparc.c: Add support for v9 branches with prediction.
11458
11459 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
11460
11461         * mini.c (mini_init): #warning is GNUC only
11462
11463         * mini-sparc.h: implement __builtin_frame_address
11464         and __builtin_return_address for Sun C compiler
11465
11466 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
11467
11468         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
11469
11470 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
11471
11472         * basic-calls.cs: Add test for unaligned byref long argument passing.
11473
11474         * mini-ops.h: Add sparcv9 compare and branch instructions.
11475
11476         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
11477         v9 instructions if we have a v9 cpu.
11478
11479         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
11480         registers for global allocation.
11481
11482         * exceptions-sparc.c: Fixes.
11483         
11484 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
11485
11486         * liveness.c (mono_analyze_liveness): Optimized version.
11487
11488         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
11489
11490         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
11491         sparc work.
11492
11493         * basic-float.cs basic-calls.cs: New regression tests.
11494
11495 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
11496
11497         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
11498         sigaltstack implementation.
11499
11500         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
11501         
11502         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
11503         stuff if SIGSEGV_ON_ALTSTACK is not defined.
11504
11505 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
11506
11507         * mini.c: Fix warnings.
11508         
11509         * mini.c (mono_resolve_patch_target): New function which contains the
11510         arch independent part of the patching process.
11511
11512         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
11513         patching code to a separate function.
11514
11515 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
11516
11517         * mini.c (add_signal_handler): ifdef out on Windows
11518
11519 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
11520
11521         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
11522         cpu-sparc.md: Add exception handling support + other fixes.
11523
11524         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
11525         typed GC detection in --version.
11526
11527         * basic.cs exceptions.cs: New regression tests.
11528
11529         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
11530         the arch specific code can store data during a compilation.
11531
11532         * mini-ops.h: Add OP_SETFRET.
11533
11534         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
11535         function, register a separate icall for each arity, so the icalls can
11536         get a wrapper.
11537         
11538         * mini.c (mono_print_tree): Print negative offsets in a more readable
11539         form.
11540         
11541         * mini.c: Make signal handling work on sparc.
11542         
11543         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
11544
11545         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
11546
11547         * jit-icalls.c: Emulate truncl by aintl on solaris.
11548
11549         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
11550
11551 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
11552
11553         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
11554
11555 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
11556
11557         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
11558         a MarshalByRef type, inline a method that performs the check, taking into
11559         account that the object can be a proxy. Also implemented tow new opcodes:
11560         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11561         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
11562         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11563
11564 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11565
11566         * mini-ppc.c: if a relative branch displacement is too big
11567         but it points to and area reachable with an absolute branch, 
11568         avoid the thunks.
11569
11570 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11571
11572         * mini.c: optimize small copies in cpblk.
11573
11574 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
11575
11576         * basic-calls.cs basic-float.cs: New regression tests.
11577
11578         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
11579         negative offsets from %fp. Implement localloc. Fix local register 
11580         allocation. Fix the case when the this argument needs to be saved to
11581         the stack. Implement some missing opcodes.
11582
11583 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
11584
11585         * mini.c (mini_method_compile): Reenable global regalloc in methods
11586         with exception handlers.
11587
11588         * linear-scan.c (mono_varlist_sort): Fix warning.
11589
11590         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
11591
11592         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
11593         regalloc costs.
11594
11595         * liveness.c: Make all variables uses in exception clauses volatile, to
11596         prevent them from being allocated to registers. Fixes #42136.
11597
11598 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
11599
11600         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
11601         causes regressions.
11602
11603         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
11604         argument to mono_arch_regalloc_cost.
11605
11606         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
11607         precisely.
11608
11609 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
11610
11611         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
11612         Make the cost of allocating a variable to a register arch dependent.
11613
11614         * basic-calls.cs: Fix compilation of tests.
11615         
11616         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
11617         helper function to cut back on the number of #ifdefs needed.
11618
11619         * mini-ppc.c: Fix compilation.
11620
11621         * basic-calls.cs: New regression tests.
11622
11623         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
11624
11625         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
11626         of l0 since that is callee saved.
11627
11628         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
11629         to virtual calls.
11630
11631         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
11632         of delay instruction.
11633
11634         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
11635
11636         * mini.h (MonoCallInst): Add 'virtual' flag.
11637
11638         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
11639
11640 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
11641
11642         * *.cs: New regression tests.
11643
11644         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
11645         work.
11646
11647         * mini.c (mono_runtime_install_handlers): Fix build.
11648
11649         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
11650         'signal_stack_size' members.
11651
11652         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
11653         alternate signal stack.
11654
11655         * exceptions-x86.c: Add stack overflow handling.
11656
11657         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
11658         functions to arch independent code.
11659
11660         * mini.c (mono_print_tree): Print more detailed info for load_membase
11661         opcodes.
11662         
11663 2004-02-23  Martin Baulig  <martin@ximian.com>
11664
11665         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
11666
11667 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11668
11669         * mini-x86.c: fixed reg allocation for div/rem.
11670
11671 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
11672
11673         * driver.c (mono_main): Report some configuratio options on --version.
11674
11675 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
11676
11677         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
11678         low in the address space. Correctly flush memory in thunks where we
11679         output native code.
11680
11681 2004-02-20  Martin Baulig  <martin@ximian.com>
11682
11683         * mini.c (mini_get_method): New static method; inflate all generic
11684         methods and methods in open generic instances.
11685         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
11686         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
11687
11688 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11689
11690         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
11691
11692         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
11693
11694 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
11695
11696         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
11697
11698         * mini-sparc.c (flushi mono_arch_output_basic_block): make
11699         it compile using Sun's compiler.
11700
11701 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11702
11703         * 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.
11704
11705         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
11706
11707 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11708
11709         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
11710         code.
11711         * mini-ppc.c: handle calls outside of the allowed range with thunks
11712         allocated using the code manager.
11713         * tramp-ppc.c: use the code manager to hold generated native code.
11714         Fixed the magic trampoline to just patch vtable entries.
11715
11716 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
11717
11718         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
11719         independent file.
11720
11721 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
11722
11723         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
11724         PPC.
11725
11726         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
11727         if we have a working __thread implementation.
11728
11729         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
11730         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
11731
11732 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
11733
11734         * mini-x86.c: Fix compilation under gcc 2.
11735         
11736 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
11737
11738         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
11739         contains a call to the wrapped function.
11740
11741         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
11742         OP_<CALL>_IMM opcodes, and use them under X86.
11743         
11744         * mini.c (mono_jit_find_compiled_method): Fix warning.
11745
11746         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
11747
11748         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
11749
11750         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
11751         functionality to mini.c.
11752
11753         * mini.c (mono_create_jump_trampoline): New function to create a jump
11754         trampoline. Return a compiled method instead of a trampoline if it
11755         exists. Add a cache for jump trampolines.
11756
11757         * mini.c (mono_jit_find_compiled_method): New function to return a
11758         compiled method if it exists.
11759
11760         * mini-x86.c: Call mono_create_jump_trampoline instead of 
11761         mono_arch_create_jit_trampoline.
11762
11763         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
11764         a jump trampoline. Fixes #52092.
11765         
11766 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
11767
11768         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
11769         which is not up-to-date. Add check_corlib_version () instead.
11770
11771         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
11772         have to call it.
11773         
11774         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
11775         since newer valgrind versions do not need it.
11776
11777         * mini.c (mono_jit_compile_method_with_opt): New helper function to
11778         compile a method with a given set of optimizations.
11779
11780         * mini.c: Compile icall wrappers on-demand instead of at startup.
11781
11782         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
11783         wrapper for an icall.
11784
11785 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
11786
11787         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
11788         #54063.
11789
11790         * iltests.il: Add test for non-empty stack before switch instruction.
11791
11792 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
11793
11794         * mini.c: Add support for new stringbuilder marshalling conventions.
11795
11796         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
11797
11798 2004-02-01  Martin Baulig  <martin@ximian.com>
11799
11800         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
11801         in `ginst->mtype_argv'.
11802
11803 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
11804
11805         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
11806         facilitate grepping.
11807
11808 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
11809
11810         * mini.c: fixed buglet in initobj generic implementation for references.
11811
11812 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
11813
11814         * Makefile.am: make the version script conditional.
11815         * jit-icalls.c: handle missing truncl().
11816
11817 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
11818
11819         * exceptions.cs: Add more tests for double->int conversion.
11820
11821         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
11822         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
11823
11824 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
11825
11826         * driver.c: make --verbose --version emit an error
11827         if the loaded corlib doesn't match the runtime version.
11828
11829 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
11830
11831         * mini-ppc.h: export ppc_patch().
11832         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
11833         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
11834         on par or better than on MacOSX.
11835
11836 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
11837
11838         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
11839         mono_lookup_pinvoke_call.
11840
11841         * mini-x86.c: Under windows, the default pinvoke calling convention is
11842         stdcall. Fixes #52834.
11843
11844         * mini.c (optimize_branches): Add an upper bound to the number of
11845         iterations to prevent infinite loops on strange loops. Fixes #53003.
11846
11847 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11848
11849         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
11850         and ISINST. Fixes #52093.
11851
11852         * objects.cs (test_0_vector_array_cast): New tests.
11853         
11854 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
11855
11856         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
11857         checking in Array.Set ().
11858
11859         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
11860         #52590.
11861
11862         * object.cs (test_0_multi_array_cast): New regression test.
11863
11864 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
11865
11866         * exceptions-ppc.c: fix build on Linux/PPC.
11867
11868 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
11869
11870         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
11871         running under valgrind.
11872         (x86_magic_trampoline): Fix build bustage.
11873
11874         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
11875         negative values as well. This is needed for the encoding of the line number
11876         info, since sometimes the line numbers are not in increasing order.
11877
11878 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
11879
11880         * cpu-pentium.md (localloc): Increase the size of the localloc 
11881         instruction since it is a loop under Win32.
11882
11883         * debug-mini.c (record_line_number): Get rid of unneccesary memory
11884         allocation.
11885
11886 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
11887
11888         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
11889         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
11890         Max Horn (max@quendi.de). Fix file names in comments.
11891
11892 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
11893
11894         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
11895         avoid stack overflow.
11896         (replace_usage): Avoid uninitialized variable warnings.
11897
11898         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
11899         and taking the address of valuetype variables.
11900
11901 2004-01-03  Patrik Torstensson
11902
11903         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
11904         for other purposes than FP later on.
11905
11906 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
11907
11908         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
11909         of tail calls.
11910
11911 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11912
11913         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
11914
11915 2003-12-30  Patrik Torstensson <p@rxc.se>
11916
11917         * mini-x86.h: Decreased number of availiable fp regs.
11918         Solves corner cases with FP spilling.
11919
11920 2003-12-23  Patrik Torstensson <p@rxc.se>
11921
11922         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
11923         for floating point stack tracking / spilling on x86. 
11924         Fixes bug #49012.
11925         
11926         * basic-float.cs: added float mul overflow test.
11927
11928 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
11929
11930         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
11931
11932 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11933
11934         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
11935         supports for cond branches that overflow the immediate
11936         overflow offset. mcs can compile simple programs.
11937
11938 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11939
11940         * exceptions-ppc.c: exception handling support wip:
11941         finally handlers get run on exception.
11942
11943 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
11944
11945         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
11946         profiling.
11947
11948 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
11949
11950         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
11951         initial support for stack walking and unwinding.
11952
11953 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
11954
11955         * driver.c (mono_main): Make corlib-out-of-sync message more 
11956         descriptive. Also remove verify_corlib call.
11957
11958 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
11959
11960         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
11961         not overlap with other call's arguments, too.
11962
11963 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
11964
11965         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
11966         move to arch-specific code the choice of arch-specific
11967         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
11968         * mini.c: ensure emulation calls will not interleave
11969         with other calls.
11970
11971 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
11972
11973         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
11974         the magic trampoline stack frame is dropped before executing
11975         the new method.
11976
11977 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11978
11979         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
11980         and integer to fp conversions. Added support for overflowing
11981         arguments on the stack. Reserve a couple more registers as temps.
11982         Added support for aot compilation (as output still needs to be
11983         tweaked, though).
11984
11985 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
11986
11987         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
11988         Don't overwrite return register in some corner cases.
11989
11990 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
11991
11992         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
11993         static constructors when AOT compiling.
11994
11995         * driver.c (mono_main): Call mono_check_corlib_version.
11996
11997 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
11998
11999         * cpu-g4.md, basic.cs: fixed div target register.
12000
12001 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
12002
12003         * mini-ppc.c, basic.cs: shl_imm fix with test.
12004
12005 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12006
12007         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
12008         structures by value. Misc fixes.
12009         * objects.cs: more tests.
12010
12011 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
12012
12013         * mini-ppc.c: lconv.ovf.i implemented.
12014
12015 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12016
12017         * mini.c:
12018         (mini_init): don't error out if someone already called g_thread_init.
12019
12020 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12021
12022         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
12023         to be any type per the spec. Fix abnormal memory usage when
12024         the same object is repeatedly thrown.
12025
12026 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
12027
12028         * mini.c: check for overruns in IL code.
12029
12030 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
12031
12032         * TODO: Add/remove some todo entries.
12033
12034 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
12035
12036         * driver.c (mono_main): Call mono_verify_corlib.
12037
12038 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
12039
12040         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
12041         This has been moved to mini.c
12042         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
12043         type being casted is marshalbyref it could be a proxy, so instead of
12044         emitting the type check code, emit a call to a runtime method that will
12045         perform the check by calling CanCastTo if needed.
12046
12047 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
12048
12049         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
12050         methods with large stack frames under Win32.
12051
12052 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
12053
12054         * Makefile.am: Distribute regression tests.
12055
12056         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
12057         at the end instead of inserting each variable into the sorted list.
12058
12059         * linear-scan.c (mono_varlist_sort): New helper function.
12060         
12061 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12062
12063         * mini.c: ensure arguments and locals are within bounds.
12064
12065 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12066
12067         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
12068         related fixes.
12069
12070 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12071
12072         * mini.c (mono_cprop_copy_values): Fix crash.
12073
12074         * aot.c: Set verbosity back to 0.
12075         
12076 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12077
12078         * regalloc.c: complete memory leak fix by Laurent Morichetti
12079         (l_m@pacbell.net).
12080
12081 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12082
12083         * driver.c (main_thread_handler): Revert the previous patch.
12084
12085         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
12086         under valgrind.
12087
12088         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
12089         memory from the memory pool.
12090
12091         * driver.c (main_thread_handler): Turn on all optimizations when
12092         --aot is used.
12093
12094         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
12095         an array for better performance.
12096
12097         * regalloc.c (mono_regstate_assign): Fix memory leak.
12098
12099         * debug-mini.c (mono_debug_serialize_debug_info): New function to
12100         serialize the debug info.
12101
12102         * debug-mini.c (mono_debug_add_aot_method): New function to load the
12103         debug info from the serialized representation.
12104
12105         * aot.c: Save debug info into the generated file and load it when 
12106         loading a method.
12107
12108         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12109
12110 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12111
12112         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
12113         More FP-related fixes.
12114
12115 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
12116
12117         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
12118         and register allocation buglet. Hello world now runs.
12119
12120 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12121
12122         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
12123         * tramp-ppc.c: fixed class init trampoline.
12124         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
12125
12126 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12127
12128         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
12129         mini.c: more ppc changes/fixes.
12130
12131 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12132
12133         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
12134         Also optimize the case when the arguments are the same in the caller 
12135         and in the callee.
12136
12137         * iltests.il: Add tests for tail calls with valuetype arguments.
12138
12139 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12140
12141         * mini-ppc.c: fixes for struct return type.
12142
12143 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
12144
12145         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
12146         mono_spillvar_offset() to arch-specific code.
12147
12148 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
12149
12150         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
12151
12152 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12153
12154         * exceptions-x86.c: Fix stack space leaks.
12155         
12156         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
12157         registers from the lmf if the method has save_lmf set.
12158
12159 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
12160
12161         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
12162         of icall wrappers into InvokeInDomain, since these are now per-domain.
12163
12164 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
12165
12166         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
12167         make some opcode emulation and intrinsic ops enabled/disabled 
12168         according to the architecture. More fixes.
12169
12170 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12171
12172         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
12173
12174 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12175
12176         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
12177         arch-specific handling for 'this' and struct return type to
12178         arch-specific code.
12179
12180 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12181
12182         * aot.c: prevent divide by zero error when reporting (it happened with
12183         Accessibility.dll).
12184
12185 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
12186
12187         * mini.h (inst_switch): Remove unused macro.
12188
12189 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12190
12191         * aot.c:
12192         (load_aot_module): free 'info->methods' and 'info' properly. No more
12193         "free(): invalid pointer blah" messages when you have an old aot
12194         compiled assembly.
12195
12196 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
12197
12198         * jit-icalls.c, mini.c: Added support for context static fields.
12199
12200 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12201
12202         * mini.c (mono_method_blittable): Methods which set LastError are not 
12203         blittable either. Fixes #51108.
12204         
12205 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12206
12207         * mini.c: flush icache.
12208         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
12209
12210 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12211
12212         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
12213
12214 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
12215
12216         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
12217         safe on IA32.
12218
12219         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
12220         vararg calls.
12221
12222         * inssel.brg (CEE_MKREFANY): Fix AOT case.
12223
12224 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
12225
12226         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
12227         instruction when the result is discarded.
12228
12229         * iltests.il (test_0_div_regalloc): New regression test.
12230
12231         * arrays.cs: Fix compilation error.
12232
12233 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
12234
12235         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
12236         float rules to inssel-x86.brg: sane architectures with FP registers
12237         don't need to implement these rules.
12238
12239 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12240
12241         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
12242
12243 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12244
12245         * mini.h, inssel-long32.brg: fixed endianess issues in int64
12246         implementation of 32 bit systems.
12247
12248 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12249
12250         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
12251         (Jeroen Zwartepoorte).
12252
12253 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12254
12255         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
12256         the caller and the callee matches.
12257         
12258         * mini.c (mono_method_to_ir): Add comment.
12259
12260         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
12261         signbit is missing on some platforms.
12262
12263 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
12264
12265         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
12266
12267         * mini.c (setup_jit_tls_data): Call the new function.
12268         
12269         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
12270
12271         * mini-x86.c: Add experimental support for fast access to the lmf
12272         structure under NPTL/Linux 2.6.x.
12273
12274 2003-11-06  Martin Baulig  <martin@ximian.com>
12275
12276         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
12277         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
12278         the debugger.
12279
12280 2003-11-02  Martin Baulig  <martin@ximian.com>
12281
12282         * mini.c (inflate_generic_field): New static method.
12283         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
12284         generic instance and the field is declared in a generic type, call
12285         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
12286
12287 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
12288
12289         * mini.h mini.c (mono_method_same_domain): New function to return
12290         whenever the caller and the callee are in the same domain.
12291
12292         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
12293
12294 2003-10-30  Martin Baulig  <martin@ximian.com>
12295
12296         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
12297         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
12298         method parameters.
12299         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
12300         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
12301
12302 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
12303
12304         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
12305         propagation.
12306
12307         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
12308         object here, so it is in the correct appdomain etc.
12309
12310 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
12311
12312         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
12313         already done.
12314         (mono_method_to_ir): Avoid freeing the type created returned from
12315         mono_type_create_from_typespec, since it is put into an internal cache
12316         by the function. Fixes pointer.exe.
12317
12318         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
12319         trampolines for icalls and pinvokes as well. Fixes #33569.
12320
12321 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
12322
12323         * mini.c: Update after appdomain changes.
12324
12325         * mini.c (mono_jit_compile_method_inner): Allways compile native
12326         method wrappers in the root domain, since there can only be one
12327         instance of them, whose address is stored in method->info.
12328
12329 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12330
12331         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
12332         environment variable. Instead detect automatically whenever running
12333         under valgrind using the magic macro RUNNING_ON_VALGRIND from
12334         valgrind.h.
12335
12336 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
12337
12338         * trace.c, trace.h: New files that implement the new trace option
12339         parsing. 
12340
12341         * driver.c: Document new --trace options.
12342
12343         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
12344         mini-x86.c: Apply:
12345
12346         -       if (mono_jit_trace_calls)
12347         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
12348
12349         * mini.h: prototypes.
12350         
12351 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12352
12353         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
12354
12355         * mini.c inssel.brg: Implement typedefbyref opcodes.
12356
12357         * mini.c (mono_jit_compile_method): Remove unused local variable.
12358
12359         * mini.c (mono_jit_compile_method_inner): Ditto.
12360         
12361 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
12362
12363         * tramp-x86.c (x86_class_init_trampoline): Fix build.
12364         
12365         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
12366
12367 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12368
12369         * mini.c (mono_no_aot): Remove unused global variable.
12370
12371         * mini.c: Thread safety fixes.
12372
12373 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12374
12375         * mini.c (mono_create_class_init_trampoline): Add a lock around
12376         class_init_hash_addr.
12377
12378         * arrays.cs (test_0_newarr_emulation): Add new regression test for
12379         #30073.
12380
12381         * mini.c: Decompose the NEWARR instruction before decomposing its
12382         arguments. Fixes #30073.
12383
12384 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
12385
12386         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
12387         convention.
12388
12389 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
12390
12391         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
12392
12393         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
12394
12395         * driver.c: Add support for compiling icall wrappers to --compile.
12396
12397 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
12398
12399         * inssel.brg: The empty value in class->interface_offsets is -1, not
12400         0. Fixes #49287.
12401
12402 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
12403
12404         * objects.cs: New test for 'is' operator on an array of interfaces.
12405
12406 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12407
12408         * tramp-ppc.c: update trampoline code to support jumps
12409         and class initialization.
12410
12411 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
12412
12413         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
12414
12415         * inssel.brg (OP_UNBOXCAST): Fix #46027.
12416
12417         * inssel.brg (OP_UNBOX): Remove unused rule.
12418
12419         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
12420         region instead of one for each method. Fixes #47813.
12421
12422 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
12423
12424         * exceptions.cs (test_0_nested_finally): New regression test for
12425         nested exception handlers.
12426
12427         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
12428
12429         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
12430
12431         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
12432         inlining.
12433
12434         * mini.c (mono_method_check_inlining): Make the inlining limit 
12435         configurable by an environment variable.
12436         
12437         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
12438
12439         * mini.h: Bump AOT file version.
12440
12441         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
12442         token, store the image along with the token, since the token might not 
12443         refer to the same image as the method containing the relocation, 
12444         because of inlining.
12445
12446 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
12447
12448         * mini.c (mono_precompile_assemblies): New function to compile
12449         all methods in all loaded assemblies.
12450
12451         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
12452
12453         * regalloc.h regalloc.c (MonoRegState): Change the type of 
12454         iassign and fassign to int*, since they can contain large negative
12455         values if the register is spilled. Also added some comments. Fixes
12456         #45817.
12457
12458         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
12459         under Win32. Fixes #42964.
12460
12461 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
12462
12463         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
12464
12465         * aot.c: Added support for AOT compiling methods which contain calls
12466         to wrappers. Currently, only remoting-invoke-with-check wrappers are
12467         handled.
12468         
12469         * driver.c (compile_all_methods): Run the compilation in a thread
12470         managed by mono. Fixes #44023.
12471
12472         * mini.c (mono_codegen): Print full method name in verbose output.
12473
12474         * mini-x86.c (mono_arch_patch_code): Fix warning.
12475         
12476         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
12477         jumps, since the method we are jumping to might be domain-specific.
12478
12479         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
12480
12481 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12482
12483         * inssel.brg: string chars are unsigned.
12484
12485 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
12486
12487         * TODO: New todo item.
12488
12489         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
12490         which calls mono_runtime_class_init and patches the call site to
12491         avoid further calls.
12492         (mono_arch_create_class_init_trampoline): New arch specific function 
12493         to create a class init trampoline.
12494         (create_trampoline_code): Generalized so it can create
12495         class init trampolines as well.
12496
12497         * mini.c (helper_sig_class_init_trampoline): New helper variable.
12498         (mono_create_class_init_trampoline): New function to create and cache
12499         class init trampolines.
12500         (mono_find_class_init_trampoline_by_addr): New function to lookup the
12501         vtable given the address of a class init trampoline. Used by the
12502         patching process.
12503         (mono_codegen): Generate a call to a trampoline instead of
12504         mono_runtime_class_init in LDSFLD[A].
12505         (mono_codegen): Add relocations for the new trampoline.
12506         
12507         * mini.h mini-x86.c aot.c: Added a new relocation type: 
12508         MONO_PATCH_INFO_CLASS_INIT.
12509
12510         * mini.h: Bump AOT version number.
12511
12512         * aot.c: Create a copy of the loaded code instead of using the original
12513         so methods which call each other will be close in memory, improving
12514         cache behaviour.
12515         
12516         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
12517         patch since it breaks the regression tests.
12518         
12519         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
12520         for the register saving instruction sequence since the 
12521         frame_state_for function in glibc 2.3.2 don't seem to detect it.
12522
12523 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
12524
12525         * TODO: Fix todo item && remove another.
12526
12527 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
12528
12529         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
12530         previous checkin.
12531
12532         * aot.c: Moved the check for MONO_LASTAOT into the initialization
12533         function of the module.
12534
12535         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
12536         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
12537         --no-aot command line option.
12538
12539 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
12540
12541         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
12542         by Bernie Solomon (bernard@ugsolutions.com).
12543
12544         * inssel.brg: Refactor the interface offset table related code into
12545         its separate functions and add support for the AOT case.
12546
12547 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
12548
12549         * aot.c (mono_aot_get_method_inner): Fix memory leak.
12550         
12551         * aot.c: Added mono_aot_verbose variable and made all debugging
12552         output depend on the value of this variable.
12553
12554         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
12555         method_label and info_label.
12556
12557         * mini.h mini-x86.c aot.c: Added a new relocation type 
12558         MONO_PATCH_INFO_IID for klass->interface_id.
12559
12560         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
12561         the MonoJitInfo structure.
12562
12563         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
12564         a non-root appdomain in shared mode.
12565
12566 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
12567
12568         * aot.c: make aot loader less verbose. Remove free of unused variable.
12569
12570 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
12571
12572         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
12573
12574         * .cvsignore: Added *.dll.
12575
12576         * mini.c (mono_print_tree_nl): New function callable while debugging.
12577
12578         * mini.c (mono_print_code): Export this.
12579
12580         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
12581         patched code.
12582
12583 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
12584
12585         * mini.h (MonoCompile): Added 'jit_info' field.
12586
12587         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
12588         the cfg structure, since it is needed by the AOT compiler.
12589
12590         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12591
12592         * aot.c: A major rewrite. Changes include:
12593         - save exception tables for methods which have them.
12594         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
12595         to g_module_symbol.
12596         - reworked the file format so it is now much smaller and needs
12597         fewer relocation entries.
12598         
12599 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12600
12601         * aot.c (load_aot_module): Fix build bustage on platforms without
12602         Boehm GC.
12603
12604 2003-09-04  Martin Baulig  <martin@ximian.com>
12605
12606         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
12607
12608 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12609
12610         * TODO: Some new optimization ideas.
12611
12612         * aot.c: Move AOT module loading logic here from mono_assembly_open.
12613
12614         * aot.c: Save the optimization flags used to compile the code into
12615         the AOT module.
12616
12617         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
12618         support emitting domain specific code.
12619         
12620         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
12621         no longer domain neutral. It can be made domain neutral by compiling 
12622         with --optimize=shared.
12623
12624         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
12625         between appdomains.
12626
12627         * driver.c mini.h mini.c: New --no-aot debugging option which disables
12628         loading of AOT code.
12629
12630         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
12631         
12632         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
12633         if there is no domain neutrality information.
12634
12635 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
12636
12637         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
12638         format version into the generated library.
12639
12640         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
12641         callee method into the caller since one of them could be shared.
12642
12643         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
12644         system exceptions from AOT code now works.
12645
12646         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
12647         method if it is domain neutral and the callee is not.
12648
12649         * graph.c (cfg_emit_one_loop_level): Fix warning.
12650
12651 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
12652
12653         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
12654         last checkin.
12655
12656 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
12657
12658         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
12659         is needed  by code which is executed before mono_runtime_init ().
12660         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
12661         
12662         * mini.c (mono_thread_abort): Fix warning.
12663         (mono_jit_compile_method): Call static constructor in the AOT case too.
12664
12665         * aot.c (mono_compile_assembly): Fix warning.
12666
12667 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12668
12669         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
12670
12671 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
12672
12673         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
12674
12675         * cpu-pentium.md: Fix the length of call opcodes so they include the
12676         ESP restoring instruction. Fixes #47968.
12677
12678 2003-08-28  Martin Baulig  <martin@ximian.com>
12679
12680         * mini-x86.c (mono_arch_call_opcode): Added support for
12681         MONO_TYPE_GENERICINST.
12682
12683         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
12684
12685 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
12686
12687         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
12688         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
12689
12690         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
12691         metadata_section.
12692
12693 2003-08-26  Martin Baulig  <martin@ximian.com>
12694
12695         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
12696         when reporting an error, set this to the actual error location.
12697         (mono_method_to_ir): Report the correct error location if
12698         get_basic_blocks() returned an error.
12699
12700 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
12701
12702         * mini.c (mono_type_blittable): OBJECT is not blittable.
12703         (mono_method_blittable): Methods which have marshalling descriptors
12704         are not blittable either. Fixes #47842.
12705
12706 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
12707
12708         * driver.c mini.c: Use an environment variable instead of a global 
12709         variable. Also fix the build.
12710
12711         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
12712         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
12713         reporting this. 
12714
12715         * driver.c mini.c: Added --with-valgrind option to turn off some
12716         code which prevents mono from running under valgrind.
12717
12718         * mini.c (mono_emit_call_args): Fixed warning.
12719
12720         * mini.c (mono_emulate_opcode): Fixed warning.
12721
12722 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12723
12724         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
12725         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
12726         regalloc.c, regalloc.h: specify available registers in arch-specific
12727         code and support floats in the regallocator (patch by Laurent Morichetti 
12728         <l_m@pacbell.net>)
12729
12730 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
12731
12732         * mini.c: mono_thread_current() can be called only after
12733         mono_runtime_init(): rearrange code to not call it early on.
12734
12735 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12736
12737         * mini.c: allocate jump tables in the code mempools.
12738
12739 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12740
12741         * mini.c, mini.h: make sure per-thread data allocated by the jit is
12742         freed.
12743
12744 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
12745
12746         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
12747         12 to 16.  This fixes bug #47453.
12748
12749
12750 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12751
12752         * mini-ppc.c: fixed indexed load and unsigned compares.
12753
12754 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
12755
12756         * mini.c: reenabled installation of handler for
12757           thread abort signal.
12758
12759 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12760
12761         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
12762         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
12763         until it's fixed and actually useful.
12764
12765 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
12766
12767         * inssel-long32.brg: couple more opcodes implemented.
12768
12769 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
12770         
12771         * mini-sparc.c: Even more opcodes implemeted.
12772
12773 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
12774
12775         * mini-sparc.c: More opcodes implemented.
12776
12777 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
12778
12779         * mini-sparc.c: More opcodes implemented.
12780
12781 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
12782
12783         * inssel-sparc.brg: Add some needed rules.  Direct
12784         copy from PPC.
12785         * Makefile.am: Use inssel-sparc.brg
12786         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
12787         an assert happy for now.
12788
12789 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
12790
12791         * mini-sparc.c: Fixed compile errors.
12792         * exceptions-sparc.c: Same.  We now produce a mono binary 
12793         on sparc-linux.  Yea.
12794
12795 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
12796
12797         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
12798         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
12799         They compile, but do not work.
12800
12801 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12802
12803         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
12804         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
12805         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
12806         (ct@gentoo.org).
12807
12808 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12809
12810         * mini.c: more opcodes implemented and better support for generics.
12811
12812 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
12813
12814         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
12815         * mini.c, mini.h: first cut at generics support: some new instructions 
12816         added and changed the behaviour of some of the existing ones.
12817
12818 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
12819
12820         * mini.c: Removed definition of metadata_shared mutex here.
12821
12822 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
12823
12824         * mini-x86.c: make vararg calls work for instance methods.
12825
12826 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12827
12828         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
12829         returns the arguments in a separte list, now.
12830
12831 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
12832
12833         * aot.c, mini.c: updates for array type representation changes.
12834
12835 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
12836
12837         * mini.c: register function to perform jit shutdown.
12838
12839 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12840
12841         * mini.c: use a faster allocator if possible.
12842
12843 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
12844
12845         * aot.c: some cleanups and portability changes.
12846
12847 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12848
12849         * mini.c: use faster allocation for CEE_BOX if possible.
12850
12851 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
12852
12853         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
12854         Moved inlined mempcy code to its own function so that is can be
12855         reused. Added an inline memset function as well (optimized initobj).
12856         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
12857
12858 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12859
12860         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
12861
12862 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
12863
12864         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
12865         arch code can setup the cpu for CLR execution, if needed.
12866         We use it on x86 to set the precision of FP operations.
12867
12868 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12869
12870         * mini.c: disable some optimizations if we can guess they'll cost too
12871         much for a given method.
12872
12873 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12874
12875         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
12876         
12877 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12878         * mini.h mini.c mini-x86.c: Added instruction level coverage 
12879         info collection support.
12880
12881 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12882
12883         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
12884         is now implemented in the profiling API. Get rid of a couple of
12885         unnecessary global variables.
12886
12887 2003-06-15  Nick Drochak <ndrochak@gol.com>
12888
12889         * basic-long.cs: tests for negative values for bigmul, and unsigned.
12890         * cpu-g4.md: add op_bigmul and op_bigmul_un
12891         * cpu_pentium.md: add op_bigmul_un
12892         * inssel-long32.brg: add rule for unsigned bigmul
12893         * mini-ops.h: define OP_BIGMUL_UN
12894         * mini-x86.c: THE BUG: handle (un)signed properly
12895         * mini.c: choose unsigned opcode if needed.
12896         This set of patches fixes bug #44291
12897
12898 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
12899
12900         * mini.c (optimize_branches): improved to handle all kinds of
12901         conditional branches.
12902
12903 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
12904
12905         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
12906         don't raise exceptions.
12907
12908 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12909
12910         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
12911         to arch-specific files.
12912
12913 2003-06-09  Martin Baulig  <martin@ximian.com>
12914
12915         * Makefile.am (libs): Added $(LIBGC_LIBS).
12916
12917 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
12918
12919         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
12920         and OP_ATAN (fixes bug#44293).
12921
12922 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
12923
12924         * Makefile.am, mini-x86.c: rename cpu description array to
12925         pentium_desc, since some compilers define the 'pentium' preprocessor
12926         symbol.
12927
12928 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
12929
12930         * mini.c (mini_select_instructions): add explicit branch if the
12931         following block is not the false target of a conditional branch -
12932         we need this with any optimization that reorder or remove bblocks
12933
12934         * mini.c (optimize_branches): bug fixes
12935
12936 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
12937
12938         * mini.c (mono_method_to_ir): inline static readonly fields
12939
12940         * ssa.c (fold_tree): start cfold support for long (very simple
12941         cases only)
12942
12943         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
12944
12945 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
12946
12947         * inssel.brg: fixed memcpy (bug #44219).
12948
12949 2003-06-05  Dick Porter  <dick@ximian.com>
12950
12951         * driver.c: Set the glib log levels to not abort if g_message
12952         recurses.
12953
12954         g_set_prgname() has to happen before mini_init() so that the
12955         process handle gets the info.
12956         
12957 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12958
12959         * driver.c: add intrins to the default optimizations to get wider
12960         exposure.
12961
12962 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12963
12964         * mini.h: some large basic blocks will overflow a 16-bit
12965         integers for symbolic registers.
12966
12967 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
12968
12969         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
12970         (mono_arch_output_basic_block): fix bug 43499 
12971
12972 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
12973
12974         * mini.c: kill duplicated definition of mono_debug_format.
12975
12976 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
12977
12978         * mini-x86.c, arrays.cs: fixed register allocation bug.
12979
12980 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
12981
12982         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
12983
12984         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
12985
12986 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12987
12988         * mini.c:
12989         (print_method_from_ip): also print source location information if
12990         available.
12991
12992 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
12993
12994         * mini.c (mono_find_block_region): bug fix in region code
12995         (mini_method_compile): enable removing unreachable code again, but
12996         only in methods without exception clauses.
12997
12998 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
12999
13000         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
13001         Implemented arglist opcode and handling of TypedReference type.
13002         Fixed x86 call convention when a structure is returned.
13003         Minimal support for calling static vararg methods.
13004
13005 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
13006
13007         * mini.c (mini_method_compile):  always remove unreachable code,
13008         because the code in them may be inconsistent  (access to dead
13009         variables for example).
13010
13011 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13012
13013         * driver.c, debug-mini.c: warning fixes.
13014
13015 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13016
13017         * Makefile.am, jit.h, mini.h: install header for embedding mono.
13018
13019 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
13020
13021         * mini.c: thread-static fields are registered in mono_class_vtable(),
13022         so ensure the function is called before checking for them.
13023
13024 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
13025
13026         * mini.c (optimize_branches): fix for bug 43586
13027
13028         * jit-icalls.c (mono_llmult_ovf): added an additional check for
13029         overflow (fixes Bug #43639)
13030
13031 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13032
13033         * mini.c, objects.cs: allow the use of stobj for primitive types.
13034
13035 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13036
13037         * mini.c: be less strict about argument checking until we support
13038         running the verifier.
13039
13040 2003-05-27  Nick Drochak <ndrochak@gol.com>
13041
13042         * basic-long.cs: tests for (ulong)int * (ulong)int also
13043         * mini.c: use the same trick for (ulong)int * (ulong)int
13044
13045 2003-05-27  Nick Drochak <ndrochak@gol.com>
13046
13047         * basic-long.cs: add regression test for (long)int * (long)int
13048         * cpu-pentium.md: add op_bigmul specification
13049         * inssel-long32.brg: add OP_BIGMUL rule
13050         * mini-ops.h: add OP_BIGMUL
13051         * mini-x86.c: register allocator: handle case where src1 needs to be
13052         in EAX.
13053         * mini.c: substitute special BIGMUL opcode in the tree for 
13054         (long)int * (long)int
13055
13056 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13057
13058         * jit-icalls.c: call the type ctor on field access if needed.
13059
13060 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13061
13062         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
13063         to a method (including results of ldelema, bug#43207).
13064
13065 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13066
13067         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
13068         colors to show exception handler blocks.
13069
13070         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
13071         (fix for pinvoke7.cs).
13072
13073 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13074
13075         * mini.h, mini.c: ensure correct initialization order for types that
13076         require it. Prepare for lazy compilation of jit icall wrappers.
13077         Provide a name for opcode emulation to reduce unneeded mallocing.
13078
13079 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13080
13081         * mini-x86.c: better register restoring code and profiling
13082         support for tail calls.
13083
13084 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13085
13086         * mini.h, driver.c: prepare for leaf methods optimization.
13087
13088 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13089
13090         * mini.c: get targets of branches before converting a method.
13091
13092 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
13093
13094         * mini.c (optimize_branches): added some experimental code (disbaled) 
13095
13096 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
13097
13098         * mini.c (optimize_branches): fix branch to branch optimization 
13099
13100         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
13101
13102         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
13103
13104         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
13105
13106         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
13107         if needed.
13108
13109 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13110
13111         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
13112         enable use of interface variables again.
13113
13114         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
13115         I1 to registers because there is no simply way to sign extend 8bit
13116         quantities in caller saved registers on x86.
13117
13118         * inssel-float.brg: set costs of some rules to 2 so
13119         that monobure always select the arch. specific ones if supplied,
13120         regardless of the order we pass the files to monoburg.
13121
13122 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13123
13124         * mini.c, mini-x86.c: since the magic trampoline for jumps
13125         can't patch the code directly, we do it as soon as the
13126         method gets compiled.
13127
13128 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13129
13130         * mini-x86.c, mini.h: introduce a new patching method
13131         to support CEE_JMP and tail calls.
13132         * mini.c: obey tail.call. Don't precompile methods target
13133         of CEE_JMP.
13134         * tramp-x86.c: new trampoline code to handle methods
13135         reached through a jump.
13136
13137 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
13138
13139         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
13140         bit values to registers
13141
13142 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
13143
13144         * mini.c (mono_compile_get_interface_var): share interface
13145         variables if possible.
13146
13147 2003-05-16  Martin Baulig  <martin@ximian.com>
13148
13149         * debug-mini.c (mono_init_debugger): New function to initialize
13150         the debugger.  This is not in the debugger since it needs to
13151         access some of mini's internals.
13152
13153 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13154
13155         * mini.c (mono_method_to_ir): inlining fixes/cleanups
13156
13157 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
13158
13159         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
13160         for value type handling.
13161
13162 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13163
13164         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
13165         (mono_method_check_inlining): enable inlining of all kinds of wrappers
13166
13167 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
13168
13169         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
13170           the constructor through a proxy.
13171
13172 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13173
13174         * jit-icalls.c, inssel.brg: fixes to array element address
13175         calculations.
13176
13177 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
13178
13179         * mini-x86.c (is_regsize_var): allocate pointer to registers
13180
13181 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13182
13183         * driver.c: fixed typo, added intrins to the set of optimizations
13184         tested with regressions.
13185
13186 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13187
13188         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
13189         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
13190         test case.
13191
13192 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
13193
13194         * inssel.brg: remove some common pop instructions without side effects
13195
13196 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13197
13198         * inssel-x86.brg: fixed thinko in int to double conversions.
13199
13200 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13201
13202         * mini.c, jit-icalls.c: added runtime thread-static variable support.
13203
13204 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13205
13206         * inssel-long32.brg: two more missing instructions.
13207
13208 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
13209
13210         * mini.c (mono_emit_call_args): set the cil_code for all arguments
13211         if not already set.
13212
13213 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
13214
13215         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
13216         correctly.
13217
13218         * basic-float.cs: Added tests for negative zero.
13219
13220 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13221
13222         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
13223         a couple of missing operations for long casts, with test cases.
13224
13225 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13226
13227         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
13228
13229 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
13230
13231         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
13232         code size estimation.
13233
13234 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
13235
13236         * mini.c (mono_jit_create_remoting_trampoline): make it work with
13237         abstract methods (fix bug 42542)
13238
13239         * aot.c: add ability to handle array types
13240         
13241 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
13242
13243         * mini.c: Call the _specific versions of the object allocation
13244         functions if possible.
13245
13246 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13247
13248         * driver.c: call setlocale ().
13249
13250 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13251
13252         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
13253         windows build.
13254
13255 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
13256
13257         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
13258
13259         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
13260         wrappers (fix bug 42122)
13261
13262 2003-05-04  Martin Baulig  <martin@ximian.com>
13263
13264         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
13265
13266         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
13267         s/mini_set_defaults/mono_set_defaults/g.
13268
13269 2003-05-04  Martin Baulig  <martin@ximian.com>
13270
13271         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
13272
13273 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13274
13275         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
13276         (reported by Don Roberts).
13277
13278 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
13279
13280         * mini.c: temporarily work around two bugs for this release.
13281
13282 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13283
13284         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
13285         that contains -export-dynamic and it makes using the ld script
13286         useless.
13287         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
13288
13289 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13290
13291         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
13292         specific cpu.
13293
13294 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13295
13296         * mini.c: make sure leave calls all the needed finally blocks,
13297         even when the target jumps out of multiple exception clauses.
13298
13299 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13300
13301         * ldscript, Makefile.am: add linker script to reduce the number of
13302         exported symbols (should also fix the issues with libwine defining
13303         some of the same symbols in io-layer).
13304
13305 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
13306
13307         * driver.c (mini_main): Avoid assertion when no file name is given on 
13308         the command line.
13309
13310 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
13311
13312         * driver.c: added --version/-V command line option.
13313         Added the inline optimization in the regression tests.
13314
13315 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13316
13317         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
13318         to the type in the method signature (fixes bug#42134).
13319
13320 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
13321
13322         * mini.c: when inlining, check this is not null only when needed (bug #42135).
13323
13324 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
13325
13326         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
13327
13328 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13329
13330         * driver.c: fixed bug #42100.
13331
13332 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
13333
13334         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
13335
13336 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13337
13338         * mini.c: moved most of the code required to do inlining to its own
13339         function so it can be reused. Inline also ctors if appropriate.
13340
13341 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
13342
13343         * Makefile.am: Link with -export-dynamic so shared libs loaded by
13344         the runtime can call mono API functions.
13345
13346 2003-04-27  Martin Baulig  <martin@ximian.com>
13347
13348         * debug-mini.c (mono_debug_init_method): Added
13349         `guint32 breakpoint_id' argument; if the method has a breakpoint,
13350         send a notification to the debugger.
13351
13352         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
13353         running in the Mono Debugger, just pass the breakpoint number to
13354         mono_debug_init_method().
13355
13356         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
13357
13358 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
13359
13360         * mini.c: allow some more unsafe compares.
13361
13362 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13363
13364         * mini-x86.c, Makefile.am: make distcheck works (partially from
13365         a patch by Richard Lee <r.h.lee@attbi.com>).
13366         * regset.c, regset.h: removed, they are unused.
13367
13368 2003-04-25  Dick Porter  <dick@ximian.com>
13369
13370         * driver.c: Usage reports the name as 'mono' not 'mini'
13371         * exceptions-x86.c: Build and run on freebsd
13372
13373 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13374
13375         * Makefile.am: install the program with the 'mono' name and
13376         the library as libmono instead of mini and libmini.
13377
13378 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13379
13380         * driver.c: provide the APIs for the embedding interface of the old jit.
13381
13382 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
13383
13384         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
13385
13386 2003-04-23  Martin Baulig  <martin@ximian.com>
13387
13388         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
13389
13390         * driver.c: Added `--debug' command line argument to enable
13391         debugging support.
13392
13393 2003-04-23  Martin Baulig  <martin@ximian.com>
13394
13395         * debug.[ch]: Removed.  The code is now in
13396         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
13397
13398         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
13399         last six months.
13400
13401 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
13402
13403         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
13404
13405 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13406
13407         * mini.c:
13408         (mini_cleanup): moved mono_runtime_cleanup call after the call to
13409         mono_domain_finalize.
13410         (mini_method_compile): use mono_method_profile* if the the option is
13411         enabled.
13412
13413 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
13414
13415         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13416         methods with their wrapper.
13417
13418         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13419         methods with their wrapper.
13420
13421         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
13422         their wrapper.
13423
13424         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
13425         wrapper.
13426
13427         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
13428         methods.
13429
13430 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
13431
13432         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
13433
13434 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
13435
13436         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
13437         of the mempool. This is slightly faster and uses less memory
13438
13439 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13440
13441         * mini.c: avoid O(n) allocation for variables.
13442
13443 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13444
13445         * mini.c: handle items on the stack after inlining methods.
13446
13447 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13448
13449         * mini.c: make the method->opcode optimization dependent
13450         on MONO_OPT_INSTRINS and do it lazily.
13451
13452 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13453
13454         * driver.c: print overall results at the end of regression run.
13455
13456 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13457
13458         * inssel.brg: don't overwrite symbolic registers.
13459
13460 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13461
13462         * inssel-x86.brg: fix conversion from long to float.
13463
13464 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
13465
13466         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
13467
13468 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
13469
13470         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
13471
13472         * driver.c: Added --print-vtable option as in the old JIT.
13473
13474 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13475
13476         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
13477
13478 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13479
13480         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
13481
13482 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
13483
13484         * mini.c regalloc.c regalloc.h: Fix memory leak.
13485
13486 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
13487
13488         * aot.c (mono_aot_get_method): register all used strings
13489
13490 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13491
13492         * mini.c: always intern strings references with ldstr at compile time.
13493
13494 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13495
13496         * Makefile.am: add BUILT_SOURCES.
13497
13498 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13499
13500         * driver.c: give a better error message when the assembly to execute
13501         doesn't have an entry point.
13502
13503 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
13504
13505         * Makefile.am: added hack for automake
13506
13507         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
13508         correct sematics.
13509
13510         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
13511
13512 22003-04-07  Martin Baulig  <martin@ximian.com>
13513
13514         * Makefile.am: Added Makefile.am.
13515
13516         * debugger-main.c: Removed, this is now in the debugger where it
13517         belongs.
13518
13519         * mini.pc.in: Call this package `mini' for the moment.
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529