2008-06-03 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
2
3         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
4         interruption. Fix some warnings.
5
6         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
7         interruption_checkpoint.
8
9 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
10
11         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
12         from embedding applications.
13
14 2008-06-02  William Holmes  <billholmes54@gmail.com>
15
16         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
17           reserving 32 bytes on the stack when making calls. 
18
19         Contributed under MIT/X11 license.
20
21 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
22
23         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
24         the linear IL branch.
25
26         * driver.c: Print out more information for --version on arm.
27
28 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
29
30         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
31         bb_exit instead, since out of line bblocks might not actually be emitted
32         out-of-line.
33         
34         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
35         maximum epilog size for out of line bblocks if tracing is enabled.
36
37         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
38
39 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
40
41         * arrays.cs: Regression tests for allocating arrays with negative sizes.
42
43 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
44
45         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
46         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
47         opcodes.
48
49 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
50
51         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
52         the 'value' to store is a constant.
53
54         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
55
56         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
57         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
58
59 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
60
61         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
62         for accessing method->generic_container.
63
64 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
65
66         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
67         
68         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
69
70         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
71
72         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
73         fails.
74
75 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
76
77         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
78
79         * mini.c: Handle the case when mono_class_vtable () fails.
80
81 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
82         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
83         the stat profiler.
84
85 2008-05-22  Mark Probst  <mark.probst@gmail.com>
86
87         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
88         together with domain sharing.
89
90 2008-05-22  Mark Probst  <mark.probst@gmail.com>
91
92         * mini.c: Treat callvirts to final methods like non-virtual calls
93         when doing generic sharing, i.e. look them up in the runtime
94         generic context.
95
96 2008-05-22  Mark Probst  <mark.probst@gmail.com>
97
98         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
99         with computed types (for generic sharing).
100
101         * mini.c: Generic sharing for mkrefany and refanyval.
102
103 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
104
105         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
106         possible.
107
108         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
109         the generic sharing code.
110         
111         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
112         when needed.
113
114 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
115
116         * mini.h: Remove the declaration of mono_aot_init_vtable ().
117
118 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
119
120         * driver.c: updated copyright date
121
122 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
123
124         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
125         needed.
126
127 2008-05-19  Martin Baulig  <martin@ximian.com>
128
129         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
130         pointing to the new `_mono_debug_using_mono_debugger' variable.
131
132         * driver.c
133         (mono_main): Check mono_debug_using_mono_debugger() rather than
134         the `MONO_INSIDE_MDB' environment variable to check whether we're
135         inside the debugger.
136
137 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
138
139         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
140         argument.
141
142 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
143
144         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
145
146         * mini.c: Added mini_assembly_can_skip_verification. This
147         function checks if the assembly requested to skip verification. 
148         Fixes part of #387274.
149
150 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
151
152         * mini.c (mini_get_method): Disable the check for open generic classes when
153         using generic sharing.
154
155         * generics.cs: Add a test #387034.
156
157         * mini.c (mini_get_method): Check whenever the method class is an open generic
158         type, and return NULL in that case, causing a verification error. Fixes
159         #384123.
160
161 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
162
163         * driver.c (mono_main): Revert r102623. The right
164         thing to do is to enable the verifier under verifiable
165         unless a --security flag was passed.
166
167         We need this non-trivial behavior for --verify-all otherwise
168         mcs-compileall won't be able to use it. As it needs everything to
169         be verified under validil.
170
171 2008-05-06  Martin Baulig  <martin@ximian.com>
172
173         Fix #383749.
174
175         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
176         (mono_debugger_thread_cleanup): Likewise.
177         (mono_debugger_extended_notification): Likewise.
178
179 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
180
181         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
182         against both inflated and non-inflated methods. We need to check against the
183         generic definition for cases where the instantiated method is not visible.
184         We need to check against the inflated types for cases where the instantiation
185         changes any super type. This fixes #382986.
186
187         Note that this doesn't need to be applied to other parts of mono_method_to_ir
188         that check for visibiliy as generic params only appears as the type subject
189         of tokens on call opcodes. Field manipulation and ldftn must always
190         target an exact type.
191
192 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
193
194         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
195         if no related --security flag is passed.
196
197 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
198
199         * mini-arch.h: Prepare support for ppc64.
200
201         Contributed under MIT/X11 license.
202
203 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
204
205         * aot-runtime.c: Prepare support for ppc64.
206
207         Contributed under MIT/X11 license.
208
209 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
210
211         * mini-ops.h: Prepare support for ppc64.
212
213         Contributed under MIT/X11 license.
214
215 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
216
217         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
218
219         Contributed under MIT/X11 license.
220
221 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
222
223         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
224         assemblies, since aot_name is not a full path, causing us to load MS.NET 
225         assemblies on windows.
226
227 2008-04-28  KornĂ©l Pál  <kornelpal@gmail.com>
228
229         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
230         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
231         * main.c: Use UTF-8 encoded command line instead of Windows default code
232         page on Windows to support Unicode.
233         * driver.c (DllMain): New function for mixed-mode assembly support.
234         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
235         export __stdcall functions without decoration.
236
237         Contributed under MIT/X11 license.
238
239 2008-04-28  Mark Probst  <mark.probst@gmail.com>
240
241         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
242         saving it very early.
243
244 2008-04-28  Mark Probst  <mark.probst@gmail.com>
245
246         * mini.h, mini.c: Lots of code for accessing the old RGCTX
247         deleted.  The only way to access the new RGCTX is via the
248         trampline.
249
250         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
251         vtable instead of the RGCTX to static methods.
252
253         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
254         accessing the new RGCTX.
255
256         * generic-sharing.c: There is no separation between self, type
257         arguments and other types in the RGCTX anymore.
258
259 2008-04-25  Jonathan Chambers <joncham@gmail.com>
260
261         * mini-amd64.c (add_general): Remove previous stack adjustment.
262         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
263         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
264         for 32 bytes of stack space reserved for all calls.
265         
266         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
267         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
268         adjustment.
269         
270         Code contributed under MIT/X11 license.
271
272 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
273
274         * mini.c (mini_method_verify): Only verify non-inflated methods, check
275         against the root definition, peeling out method and type instantiations.
276         Cache verify success results, code that fails verification is still
277         checked multiple times.
278
279 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
280
281         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
282
283 2008-04-23  Jonathan Chambers <joncham@gmail.com>
284
285         * mini-amd64.c (add_general): Always increment stack on Win64.
286         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
287         on Win64.
288         
289         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
290         stack based argument handling on Win64.
291         
292         Code contributed under MIT/X11 license.
293
294 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
295
296         * Makefile.am (version.h): Add support for git-svn.
297
298 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
299
300         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
301         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
302         avoiding allocations and libc functions which might deadlock.
303         
304         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
305         'no-gdb-backtrace' option is set.
306
307         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
308
309         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
310
311 2008-04-21  Martin Baulig  <martin@ximian.com>
312
313         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
314         and `get_lmf_addr'; `notification_address' is no longer a pointer.
315
316 2008-04-21  Martin Baulig  <martin@ximian.com>
317
318         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
319         `thread_vtable', `event_handler_ptr' and `event_handler'.
320
321 2008-04-21  Martin Baulig  <martin@ximian.com>
322
323         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
324         allows delayed initialization of the `executable_code_buffer' when
325         attaching.
326
327 2008-04-21  Martin Baulig  <martin@ximian.com>
328
329         * mini.h (mono_debugger_create_notification_function): Removed.
330         * tramp-*.c (mono_debugger_create_notification_function): Removed.
331
332         * mdb-debug-info64.s
333         (MONO_DEBUGGER__notification_function): Added this in the .text section.
334
335         * mdb-debug-info32.s
336         (MONO_DEBUGGER__notification_function): Added this in the .text section.
337
338         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
339         currently only works on x86 and x86_64, so don't create it on ppc.
340
341 2008-04-21  Martin Baulig  <martin@ximian.com>
342
343         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
344
345         * mini.c
346         (mini_method_compile): In the fp elimination check, check
347         `debug_options.mdb_optimizations' in addition to
348         mono_debug_using_mono_debugger().       
349
350         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
351         disable some JIT optimizations which are only disabled when
352         running inside the debugger.
353         Added `--help-debug' option to describe the debugging options.
354         (parse_debug_options): New static function to parse the `--debug'
355         options, so we can easily add more stuff in future.
356
357 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
358
359         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
360         the method has no body.
361
362 2008-04-19  Jonathan Chambers <joncham@gmail.com>
363
364         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
365         assembly is not allowed in MSVC 64-bit compiler. 
366         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
367         as we get floating point exceptions everywhere.
368         
369         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
370         correctly align arguments for call to throw_exception.
371         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
372         
373         Code contributed under MIT/X11 license.
374
375 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
376
377         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
378
379 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
380
381         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
382
383         * mini-amd64.c (NEW_INS): Set cil_code.
384
385         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
386         from mini-amd64.c so all debugger related logic is in one place.
387
388         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
389         later won't have a random ip assigned to them.
390
391 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
392
393         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
394         the arch specific function initializes code_size.
395         (mono_create_delegate_trampoline): Ditto.
396
397         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
398         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
399         platforms.
400
401         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
402         running under the debugger.
403
404         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
405         debugger.
406
407         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
408         debugger. Also move the disabling of optimizations here from driver.c.
409         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
410         debugger.
411
412         * mini.h (MonoCompile): Add a few new flags.
413
414 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
415
416         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
417         so the cil_code field of created MonoInst's is properly set.
418         (mini_select_instructions): Ditto.
419
420         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
421         (MONO_INST_NEW_CALL): Ditto.
422
423         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
424         in many places so the ins->cil_code field is properly initialized.
425
426         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
427         place.
428
429 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
430
431         * mini.c (mini_method_compile): Print a different message when compiling a 
432         shared method.
433         
434         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
435         > 1.
436
437 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
438
439         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
440         SSE2 instructions.
441
442         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
443         
444 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
445
446         * mini.c (handle_stack_args): Make this return void since its return value was
447         never used. Also set cfg->unverifiable for invalid IL instead of calling
448         G_BREAKPOINT ().
449
450 2008-04-10  Mark Probst  <mark.probst@gmail.com>
451
452         * mini.c: Make sure "this" is live in catch clauses with type
453         variables in shared generic code.
454
455 2008-04-08  Mark Probst  <mark.probst@gmail.com>
456
457         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
458         generic_class_is_reference_type() to ensure the proper behaviour
459         when sharing generic code and the type in question is a type
460         argument.
461
462 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
463
464         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
465         race conditions when printing thread dumps. Fixes #377738.
466
467 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
468         
469         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
470         shows up when both MonoInst arguments can cause aliasig.
471         There is likely no way in the current JIT to trigger this problem, but
472         it showed up in the development of generics sharing, when in a new
473         opcode both args of an OP_GROUP can be aliases (addresses of a local).
474         When the generics sharing code will be committed, its tests will be
475         valid also for this bug.
476
477 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
478
479         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
480         PATCH_INFO_METHOD.
481
482         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
483         NULL.
484
485 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
486
487         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
488         use a more detailed exception message for InvalidCastException.
489
490         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
491
492         * driver.c (mono_main): Add --debug=casts option to turn on better 
493         InvalidCastException message details.
494
495         * mini.c (mini_get_debug_options): New helper function to return the address of
496         the debug_options variable.
497
498         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
499         the jit_tls TLS variable.
500
501         * mini.c (mono_jit_tls): New TLS variable.
502
503         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
504         option is used.
505
506 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
507
508         * mini.h: Removed verifer related stuff. This code was moved to verify.c
509
510         * mini.c: Removed verifer related stuff, code moved to verify.c.
511
512         * driver.c: Using code from verify.c instead of mini.c.
513
514 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
515
516         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
517         longer valid.
518
519 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
520
521         * mini.c (check_for_method_verify): Enabling verification of
522         corlib if mono_verify_all is set. Bugs in the verifier preventing that
523         have been fixed.
524
525 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
526
527         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
528         caller saved registers as well.
529         
530         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
531         saved registers as well.
532
533 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
534
535         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
536
537         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
538         code.
539
540 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
541
542         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
543         to get_call_info.
544         (get_call_info): Take a gsctx argument instead of 'cfg'.
545
546 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
547
548         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
549         mono_verify_all is set.
550
551         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
552
553         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
554
555 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
556
557         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
558         an exception.
559
560         * driver.c mini.c mini.h: Add a --verify-all development option to test the
561         verifier and the code generated by the compiler.
562
563 2008-03-25  Mark Probst  <mark.probst@gmail.com>
564
565         * mini.c: Generic sharing of the non-nullable case of the box
566         instruction.
567
568 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
569
570         * inssel.brg: Fix the build.
571
572         * iltests.il.in: Add a test for lconv.ovf.u8.un.
573
574 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
575
576         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
577         Array:Address. Fixes #372410.
578
579         * iltests.il.in: New tests for readonly prefix.
580
581 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
582
583         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
584         mini-trampolines.c.
585
586         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
587         mini-exceptions.c.
588
589         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
590         
591         * mini.c (mono_decompose_op_imm): New helper function.
592
593         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
594         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
595         return value.
596
597         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
598         mono_arch_output_basic_block. Fix warnings.
599
600         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
601         for now.
602
603 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
604
605         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
606         since the extra frame is now detected automatically inside the loop.
607
608         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
609         opts which are now in mono_peephole_ins ().
610         
611         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
612
613         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
614         frames and skip duplicate managed-to-native frames. Fixes #367665.
615
616         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
617         opts which are now in mono_peephole_ins ().
618         (mono_arch_peephole_pass_2): Ditto.
619
620         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
621
622         * mini-codegen.c (mono_peephole_ins): New helper function containing the
623         arch independent peephole optimizations.
624
625         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
626         opts which are now in mono_peephole_ins ().
627
628         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
629         
630         * mini-s390.c (mono_arch_output_basic_block): Fix build.
631
632         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
633         pattern.
634
635         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
636         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
637         opcode. 
638
639 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
640
641         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
642         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
643         return value.
644
645         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
646         mono_arch_output_basic_block. Fix warnings.
647
648 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
649
650         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
651         conv.ovf.u.un.
652
653 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
654
655         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
656         conv.ovf.u.un.
657
658         * iltests.il: Add new tests.
659
660 2008-03-20  KornĂ©l Pál  <kornelpal@gmail.com>
661
662         * mini.c: Removed Windows version macros.
663
664 2008-03-20  Mark Probst  <mark.probst@gmail.com>
665
666         * generic-sharing.c: Put reflection types in the extensible part
667         of the runtime generic context.
668
669         * mini.c: Generic sharing of the GetTypeHandle special case of the
670         ldtoken instruction.
671
672 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
673
674         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
675
676         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
677         
678         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
679         consistency with the other version on the linear IR branch.
680
681         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
682
683         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
684
685         * iltests.il.in: Add new tests.
686
687 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
688
689         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
690
691         * iltests.il.in: Add new tests.
692
693 2008-03-19  Mark Probst  <mark.probst@gmail.com>
694
695         * mini.c: Two variables with the same name were declared in
696         nesting contexts and one wasn't initialized.  Fixed.
697
698 2008-03-19  Mark Probst  <mark.probst@gmail.com>
699
700         * mini.c: Generic sharing of the initobj instruction.
701
702 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
703
704         * mini.c: make the test to optimize ldtoken from typeof() more
705         precise.
706
707 2008-03-18  Mark Probst  <mark.probst@gmail.com>
708
709         * mini.c: Generic sharing of the initobj instruction for reference
710         types.
711
712 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
713
714         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
715         the mono_breakpoint_clean_code() code to perform bound checks.
716
717 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
718
719         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
720         mono_arch_patch_callsite() to include the start of the managed method
721         to be able to perform bound checks.
722
723 2008-03-17  Mark Probst  <mark.probst@gmail.com>
724
725         * mini.c: Generic sharing for the isinst instruction.
726
727 2008-03-17  Mark Probst  <mark.probst@gmail.com>
728
729         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
730         inssel-long32-mips.brg: Added opcodes for doing indirect calls
731         with the runtime generic context argument.
732
733         * mini.c: Share calls to several types of unsharable methods by
734         putting the address of the method code in the runtime generic
735         context and doing an indirect call.
736
737         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
738         to switches.
739
740 2008-03-16  Mark Probst  <mark.probst@gmail.com>
741
742         * generic-sharing.c: Change due to a change in the runtime genric
743         context API.
744
745 2008-03-15  Martin Baulig  <martin@ximian.com>
746
747         * tramp-x86.c
748         (mono_arch_nullify_class_init_trampoline): Add call to
749         mono_breakpoint_clean_code() to make things work when running
750         inside the debugger.
751
752         * tramp-amd64.c
753         (mono_arch_nullify_class_init_trampoline): Add call to
754         mono_breakpoint_clean_code() to make things work when running
755         inside the debugger.
756
757 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
758
759         * inssel-long.brg (reg): Fix 64 bit build.
760
761 2008-03-14  Mark Probst  <mark.probst@gmail.com>
762
763         * mini.c, mini.h: Share static generic code by passing it an
764         implicit argument pointing to the runtime generic context.
765
766         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
767         inssel-long32-mips.brg: New opcodes for calling shared static,
768         which need to be passed the runtime generic context.
769
770         * mini-amd64.c, mini-x86.c: Save the runtime generic context
771         argument on the stack in the prologue if needed.  New function for
772         finding the runtime generic context argument from the registers
773         saved by the trampoline.
774
775         * mini-amd64.h, mini-x86.h: Specify which register to use for the
776         runtime generic context argument.
777
778         * tramp-amd64.c: Also restore the register used for the runtime
779         generic context argument.
780
781         * mini-trampoline.c: Resolve shared static calls by consulting the
782         runtime generic context via the new argument.
783
784         * generic-sharing.c: Add an argument to sharability-checking
785         functions that specifies whether type variables should be treated
786         as sharable type arguments.
787
788         * inssel-x86.brg: Removed a superfluous, buggy rule.
789
790         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
791         to switches.
792
793 2008-03-14  Martin Baulig  <martin@ximian.com>
794
795         * debug-debugger.c (main_thread_handler): Call
796         mono_runtime_run_main() without sending any notifications.
797
798         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
799
800 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
801
802         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
803
804 2008-03-14  Mark Probst  <mark.probst@gmail.com>
805
806         * tramp-x86.c: Fixed register restore offsets in the trampoline
807         code for ECX and EDX.
808
809 2008-03-12  Geoff Norton  <gnorton@novell.com>
810
811         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
812         different ucontext_t implementations.
813         * exceptions-arm.c: Use the above defines to get exceptions working on 
814         iPhone (based on a patch by Luke Howard lukeh@padl.com)
815         * mini-arm.c: Implement iPhone icache support (based on a patch by
816         Luke Howard lukeh@padl.com)
817
818 2008-03-12  Mark Probst  <mark.probst@gmail.com>
819
820         * mini.c: Enable generic sharing of calls to non-static
821         non-interface non-generic non-value-type methods.
822
823         * mini-trampolines.c: Resolve calls from shared generic code.
824
825 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
826
827         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
828
829         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
830
831 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
832
833         * mini.c: some fixes for the AOT compiler.
834
835 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
836
837         * cpu-amd64.md: Add clob:1 to some float opcodes.
838
839 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
840
841         * mini.h: Added MiniVerifierMode enumeration.
842
843         * mini.c: Added mini_verifier_set_mode to control
844         the usage of the new verifier.
845
846         * mini.c (mono_method): Integrated the new verifier.
847
848         * driver.c: Extended --security option with validil and
849         verifiable options to activate the new verifier.
850
851 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
852
853         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
854         optimization to ctors taking 0 or 2 arguments too.
855
856         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
857         a bit.
858
859         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
860
861         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
862
863 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
864
865         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
866         non-aot case as well.
867
868         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
869
870         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
871         changes.
872
873         * aot-compiler.c (encode_patch): Ditto.
874
875         * mini.h (G_MININT32): Fix the definition of this.
876
877 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
878
879         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
880
881         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
882
883 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
884
885         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
886         methods returning vtypes in registers.
887         (mono_arch_allocate_vars): Ditto.
888
889         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
890
891         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
892
893         * generics.cs: Add a test from the linear IR branch.
894
895         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
896
897         * mini.c (inline_method): Cache failed inline attempts.
898
899 2008-03-04  Mark Probst  <mark.probst@gmail.com>
900
901         * mini.c: For shared methods of generic classes put the location
902         of "this" into the MonoGenericJitInfo.
903
904         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
905         register out of a MonoContext by register number.  Add the generic
906         sharing context as an argument to mono_arch_find_this_argument().
907
908         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
909         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
910         for new arch function.
911
912         * mini-exception.c: Handle open exception clauses in shared
913         generic code.
914
915         * mini-trampolines.c: Supply additional argument to
916         mono_arch_find_this_argument().
917
918 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
919
920         * Makefile.am (regtests): Run the bench.exe tests last.
921
922 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
923
924         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
925         a bit.
926
927 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
928
929         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
930         with MS.
931
932         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
933         
934         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
935
936         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
937         whose class has no cctor.
938
939         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
940
941 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
942
943         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
944         unverified.
945
946 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
947
948         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
949         to be in sync with the code on the linear IR branch.
950
951         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
952
953         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
954
955 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
956
957         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
958
959         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
960
961         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
962
963         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
964
965         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
966         
967         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
968         body.
969
970 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
971
972         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
973         OP_LOADR4_MEMBASE emission.
974
975         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
976         (mono_spillvar_offset_float): Ditto.
977
978         * mini-mips.c (mono_arch_emit_prolog): Ditto.
979
980         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
981         emission.
982
983         * basic-long.cs: Add regression tests for them.
984
985         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
986         use.
987         (mono_arch_allocate_vars): Fix representation of single-precision float
988         argument.
989         (mono_arch_output_basic_block): Ditto.
990
991         * inssel-mips.brg: Ditto, remove duplicate items.
992
993         * mini-mips.c (emit_load_volatile_arguments): New function to handle
994         arguments of tail calls as on other platforms.
995         (mono_arch_output_basic_block): Handle tail calls.
996
997         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
998         register.
999
1000         * objects.cs (test_5_pass_static_struct): Add test for it.
1001
1002         Contributed under MIT/X11 license.
1003
1004 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
1005
1006         * Makefile.am: Use gmcs for compiling the regression tests.
1007
1008         * *.2.cs *.2.il: Rename to *.cs and *.il.
1009
1010 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
1011
1012         * regalloc.h: Make the vassign array smaller.
1013
1014         * mini.c (mini_method_compile): Remove an unused field in cfg.
1015
1016         * mini-codegen.c: Add a bunch of micro optimizations.
1017
1018 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
1019
1020         * regalloc.h: Remove some unused fields.
1021
1022 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
1023
1024         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
1025
1026         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
1027
1028 2008-02-22  Mark Probst  <mark.probst@gmail.com>
1029
1030         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
1031
1032         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
1033         trampoline: Fetch an entry from the runtime generic context.  If
1034         it's NULL, jump to the actual trampoline to fill the runtime
1035         generic context.  Otherwise, return it.
1036
1037         * mini.c: Call the lazy fetch trampoline to get entries out of the
1038         runtime generic context.
1039
1040         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
1041         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
1042         tramp-sparc.c: Stubs for the lazy fetch trampoline.
1043
1044 2008-02-21  Mark Probst  <mark.probst@gmail.com>
1045
1046         * mini.c: Fetch data out of the extensible part of the runtime
1047         generic context instead of calling a helper function.
1048
1049         * generic-sharing.c: Some functions moved into
1050         metadata/generic-sharing.c.  Helper function for fetching other
1051         types now checks and asserts against extensible rgctx (just for
1052         debugging purposes - the helper function isn't called anymore
1053         unless for debugging).
1054
1055 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1056
1057         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
1058         for tail calls up to the point that the tests in iltests.exe run. Also add a
1059         dummy CKFINITE implementation.
1060         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
1061         needed for trampoline LMF frames.
1062
1063         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
1064         trampoline LMF frames.
1065
1066 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
1067
1068         * mini.c (inline_method): clean any pending loader error when inlining fail.
1069         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
1070
1071 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1072
1073         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
1074
1075         * aot-runtime.c (decode_patch_info): Ditto.
1076
1077         * mini.c (mono_resolve_patch_target): Ditto.
1078         
1079         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
1080         icall wrappers.
1081
1082         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
1083         
1084         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
1085         if it references an icall address.
1086
1087 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
1088
1089         * cpu-s390x.md: Remove some more unused opcodes.
1090         
1091         * cpu-s390x.md: Remove some unused opcodes.
1092
1093         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
1094         mono_op_imm_to_op ().
1095
1096         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
1097         instead of a switch statement.
1098         
1099         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
1100         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
1101
1102         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
1103         
1104         * mini-codegen.c: Remove unused mono_regstate2_... functions.
1105
1106         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
1107         -1.
1108
1109 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
1110
1111         * driver.c (mono_main): Improve error reporting when an assembly cannot be
1112         opened. Fixes #362607.
1113
1114         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
1115
1116         * iltests.il.in: Add a test for static methods in interfaces.
1117
1118 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
1119
1120         * genmdesc.c (build_table): Fix a crash on older glib versions.
1121
1122         * cpu-sparc.md: Remove some unused opcodes.
1123         
1124         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
1125         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
1126
1127         * cpu-amd64.md: Remove some unused opcodes.
1128
1129         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
1130         like the other opcodes.
1131
1132 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
1133
1134         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
1135
1136         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
1137
1138         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
1139         variables 'cfg' instead of 'm' for consistency.
1140
1141         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
1142
1143         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
1144         argument holding the vtype return address, to avoid the ambigious use of
1145         cfg->ret for this purpose.
1146
1147         * mini.c (NEW_RETLOADA): Use vret_addr if set.
1148
1149         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
1150         
1151         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
1152         new mono_print_ins () function which only takes one argument.
1153
1154 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
1155
1156         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
1157         macro arguments.
1158
1159 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
1160
1161         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
1162
1163         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
1164
1165         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
1166         opcodes and other small changes.
1167
1168         * mini-ops.h: Add some new opcodes from the linear IR branch.
1169
1170         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
1171
1172         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
1173         opcodes, use the REG_MEMBASE opcodes instead.
1174         
1175         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
1176         opcodes, use the REG_MEMBASE opcodes instead.
1177         
1178         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
1179         linear IR branch.
1180
1181         * mini.c (mono_op_imm_to_op): New helper function.
1182
1183         * mini-ops.h: Add some opcodes from linear IR branch.
1184
1185 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
1186
1187         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
1188         <tsv@solvo.ru>.
1189
1190 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
1191
1192         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
1193         OP_ICONV_TO_R4/R8.
1194
1195         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
1196
1197 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
1198
1199         * aot-compiler.c (emit_method_code): Add an assert.
1200
1201         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
1202         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
1203         methods.
1204
1205 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
1206
1207         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
1208         some load/store opcodes so they are consistent. 
1209         (mono_arch_emit_prolog): Simplify some code.
1210
1211         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
1212
1213         * objects.cs: Add tests for large argument offsets on ARM.
1214
1215         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
1216         stack offsets. Fixes #359651.
1217
1218         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
1219
1220         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
1221
1222         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
1223
1224         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
1225
1226         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
1227
1228         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
1229         rid of CEE_CONV_R_UN.
1230
1231         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
1232
1233 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
1234
1235         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
1236
1237         * mini.c (mono_normalize_opcodes): Add some more opcodes.
1238
1239         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
1240
1241         * cpu-amd64.md: Remove some unused opcodes.
1242
1243         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
1244
1245         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
1246
1247         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
1248         arch specific functions for its parts. Call the peephole pass after local
1249         regalloc so the prolog can compute a more accurate max_offset.
1250         
1251         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
1252         the corresponding OP_I/OP_L opcodes.
1253
1254         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
1255
1256         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
1257
1258 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1259
1260         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
1261         as they are handled in mini.c.
1262
1263         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
1264         
1265         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
1266         case since it is handled in mini.c.
1267
1268         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
1269
1270         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
1271
1272         * *.c: Use the new opcodes in the IR and back end code.
1273
1274         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
1275
1276         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
1277
1278 2008-02-06  Mark Probst  <mark.probst@gmail.com>
1279
1280         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
1281         an assert because it has a race condition.
1282
1283 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1284
1285         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
1286
1287         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
1288
1289         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
1290
1291         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
1292         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
1293
1294 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
1295
1296         * cpu-amd64.md (move): Correct the maximum size of move.
1297
1298 2008-02-05  Mark Probst  <mark.probst@gmail.com>
1299
1300         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
1301         the generic class init trampoline to return quickly if the class
1302         is already inited.
1303
1304 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
1305
1306         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
1307         issues where an 32 bit callsite cannot be patched by a 64 bit address.
1308
1309 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
1310
1311         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
1312         branch.
1313
1314 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
1315
1316         * objects.cs: Add some soft-float tests.
1317
1318         * mini.c: Fix a couple more soft-float issues.
1319
1320         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
1321
1322         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
1323         avoid a REX prefix.
1324
1325 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
1326
1327         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
1328         exception happens while compiling a virtual method.
1329
1330 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
1331
1332         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
1333         
1334         * mini-sparc.c: Fix build.
1335
1336         * mini-sparc.c (get_call_info): Add support for generic sharing.
1337
1338         * mini-exceptions.c: Add a FIXME.
1339
1340 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
1341
1342         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
1343         altstack handling code.
1344
1345         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
1346         
1347         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
1348
1349         * mini-s390.c: Add support for generic sharing.
1350
1351         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1352         Fix CAS on s390.
1353         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1354
1355         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
1356
1357         * mini-s390x.c: Add support for generic sharing.
1358         
1359         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1360         Fix CAS on ia64.
1361         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1362
1363         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
1364         can be used since it takes a 16 bit signed immediate.
1365
1366         * inssel-s390x.brg: Fix OP_SETRET.
1367
1368         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
1369
1370         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
1371
1372         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
1373
1374         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
1375
1376         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
1377         in one place.
1378
1379         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
1380         stuff.
1381
1382         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
1383         of the unused mono_arch_patch_delegate_trampoline stuff.
1384
1385 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
1386
1387         * basic-long.cs: Move the fp related tests to basic-float.cs.
1388
1389         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
1390
1391         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
1392
1393         * basic-calls.cs: Add a test for proper float argument passing.
1394
1395         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
1396         if the context corresponds to an exception received through a signal.
1397
1398         * exceptions.cs: Add a test for nullref handling at the start of a try
1399         clause.
1400
1401         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
1402
1403         * jit-icalls.c (mono_break): New JIT icall.
1404
1405         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
1406
1407         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
1408
1409 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
1410
1411         * cpu-*.md: Get rid of unused opcodes.
1412
1413         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
1414
1415         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
1416         by all platforms.
1417
1418         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
1419         define.
1420
1421         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
1422         the arch independent trampoline code in mini-trampolines.c.
1423
1424         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
1425
1426         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
1427
1428         * mini-s390.h: Remove an unused define.
1429         
1430         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
1431         the arch independent trampoline code in mini-trampolines.c.
1432
1433         * mini-arm.c (mono_arch_emit_prolog): Fix build.
1434
1435 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
1436
1437         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
1438
1439         * mini-s390.c (mono_arch_emit_prolog): Fix build.
1440
1441         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
1442
1443         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
1444
1445         * cpu-amd64.md: Use smaller sizes for int opcodes.
1446
1447         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
1448
1449         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
1450         objects.cs.
1451
1452         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
1453         debugging.
1454
1455         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
1456         instead of though a pointer to save an indirection when accessing elements of
1457         the array.
1458
1459         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
1460         some typos.
1461         (NOT_IMPLEMENTED): New helper macro.
1462         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
1463         of a bb.
1464
1465         * *.c: Use the new helper macro.
1466
1467 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
1468
1469         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
1470
1471 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
1472
1473         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
1474         stack slots.
1475
1476 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
1477
1478         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
1479         profiling is enabled.
1480         
1481         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
1482         the end.
1483         (mono_arch_emit_prolog): Add more first bblock optimizations.
1484
1485         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
1486         in order if possible.
1487         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
1488         bblock, since the arguments are still in their original registers.
1489
1490         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
1491
1492 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
1493
1494         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
1495         as well.
1496
1497         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
1498         offset 0.
1499
1500         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
1501
1502         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
1503         process async exceptions received while in unmanaged code.
1504
1505         * mini.c (mini_init): Install a callback with the runtime which will be called
1506         when a thread receives an async exception while in unmanaged code.
1507
1508         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
1509
1510         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
1511
1512 2008-01-16  Wade Berrier  <wberrier@novell.com>
1513
1514         * cpu-g4.md:
1515         * cpu-arm.md:
1516         * cpu-s390x.md:
1517         fix build
1518
1519 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
1520
1521         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
1522         compilation with sun cc.
1523
1524         * cpu-*.md: Fix the build.
1525
1526         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
1527
1528         * mini-amd64.h: Add some comments to the MonoLMF structure.
1529
1530         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
1531         
1532         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
1533         in the LMF structure if possible. This saves two instructions in the
1534         managed->native wrappers.
1535
1536         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
1537
1538 2008-01-16  Mark Probst  <mark.probst@gmail.com>
1539
1540         * generic-sharing.c: New type argument lookup code which uses the
1541         runtime generic context template.
1542
1543 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
1544
1545         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
1546
1547         * mini-arm.c (add_general): Fix arm eabi parameter passing.
1548         (mono_arch_output_basic_block): Fix localloc implementation.
1549
1550         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
1551
1552         * mini-ia64.c (peephole_pass): Fix ia64 build.
1553
1554         * mini-amd64.c (peephole_pass): Fix a warning.
1555         
1556         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
1557         at a constant offset from sp/fp.
1558
1559         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
1560         instead of obtaining it from *lmf in the managed method case.
1561
1562 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
1563
1564         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
1565
1566 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
1567
1568         * mini.h (MonoInstList): New type.
1569         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
1570         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
1571         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
1572         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
1573         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
1574         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
1575         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
1576         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
1577         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
1578         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
1579         MONO_INST_LIST_FOR_EACH_ENTRY,
1580         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
1581         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
1582         mono_inst_list_first, mono_inst_list_last,
1583         mono_inst_list_next, mono_inst_list_prev): New instruction
1584         list handling interfaces.
1585         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
1586         list head 'ins_list'.
1587         (MonoInst): Replace next pointer with list head 'node'.
1588         (MonoCallInst): Make 'out_args' a MonoInstList.
1589         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
1590         (MonoCompile): Delete reverse_inst_list and
1591         reverse_inst_list_len.
1592         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
1593         mono_arch_lowering_pass, mono_arch_local_regalloc,
1594         mono_arch_output_basic_block, mono_arch_emit_prolog):
1595         Convert to new instruction lists.
1596         (insert_after_ins): Delete.
1597         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
1598         instruction lists.
1599         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
1600         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
1601         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
1602         mono_emulate_opcode, mono_emit_load_got_addr,
1603         inline_method, mono_method_to_ir, mono_print_bb_code,
1604         print_dfn, decompose_pass, nullify_basic_block,
1605         replace_out_block_in_code, remove_block_if_useless,
1606         merge_basic_blocks, move_basic_block_to_end,
1607         try_unsigned_compare, optimize_branches, mono_print_code,
1608         mini_select_instructions, remove_critical_edges): Likewise.
1609         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
1610         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
1611         mono_arch_output_basic_block, mono_arch_emit_prolog):
1612         Likewise.
1613         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
1614         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1615         mono_arch_output_basic_block): Likewise.
1616         (inst_list_prepend, insert_after_ins): Delete.
1617         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
1618         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
1619         instruction lists.
1620         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
1621         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
1622         mono_arch_emit_prolog): Likewise.
1623         * cfold.c (mono_constant_fold): Likewise.
1624         * liveness.c (visit_bb, mono_analyze_liveness,
1625         optimize_initlocals): Likewise.
1626         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
1627         * graph.c (mono_draw_code_cfg): Likewise.
1628         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
1629         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
1630         mono_ssa_cprop): Likewise.
1631         * abcremoval (get_relations_from_previous_bb, process_block):
1632         Likewise.
1633         * local-propagation (mono_cprop_invalidate_values,
1634         mono_local_cprop_bb): Likewise.
1635         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
1636         peephole_pass, mono_arch_output_basic_block,
1637         mono_arch_emit_prolog): Likewise.
1638         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
1639         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1640         mono_arch_emit_prolog): Likewise.
1641         (insert_after_ins): Delete.
1642         * aliasing.c (print_code_with_aliasing_information,
1643         mono_build_aliasing_information, mono_aliasing_deadce):
1644         Convert to new instruction lists.
1645         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
1646         peephole_pass, NEW_INS, mono_arch_lowering_pass,
1647         mono_arch_local_regalloc, mono_arch_output_basic_block):
1648         Likewise.
1649         (insert_after_ins): Delete.
1650         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
1651         peephole_pass, mono_arch_output_basic_block): Convert to
1652         new instruction lists.
1653         * mini-codegen (InstList, inst_list_prepend,
1654         insert_after_ins): Delete.
1655         (insert_before_ins, get_register_force_spilling,
1656         get_register_spilling, free_up_ireg, free_up_reg,
1657         create_copy_ins, create_spilled_store, alloc_int_reg,
1658         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
1659         to new instruction lists.
1660         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
1661         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1662         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
1663         (insert_after_ins): Delete.
1664         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
1665         mono_arch_local_regalloc, mono_arch_output_basic_block,
1666         mono_arch_call_opcode): Convert to new instruction lists.
1667         (insert_after_ins): Delete.
1668         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
1669         peephole_pass, mono_arch_output_basic_block,
1670         mono_arch_emit_prolog): Convert to new instruction lists.
1671
1672 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
1673
1674         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
1675
1676         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
1677         Fixes #353182.
1678
1679         * Makefile.am (version.h): Make this work with non-bash shells.
1680
1681 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
1682
1683         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
1684
1685 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
1686
1687         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
1688         the InitializeArray optimization.
1689
1690 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
1691
1692         * mini.c driver.c: Don't include os/gc_wrapper.h.
1693
1694 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
1695
1696         * mini.c (print_jit_stats): Print GC statistics if available.
1697
1698 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
1699
1700         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
1701
1702 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
1703
1704         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
1705
1706 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
1707
1708         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
1709         
1710         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
1711
1712         * driver.c (mono_main): Ditto.
1713
1714 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
1715
1716         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
1717
1718         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
1719         in the vtable can't be encoded.
1720         (compile_method): Ditto.
1721
1722 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
1723
1724         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
1725         defined.
1726
1727         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
1728         lmf->rbp.
1729
1730         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
1731         the top LMF entry belongs to the current method.
1732
1733         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
1734
1735 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
1736
1737         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
1738         
1739         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
1740
1741         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
1742
1743         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
1744
1745         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
1746
1747         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
1748         implementation.
1749
1750         * basic-float.cs: Add an ulong->double cast test.
1751
1752 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
1753
1754         * mini.c (mono_method_to_ir): Fix a warning.
1755
1756 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
1757
1758         * mini-ops.h: Add OP_SWITCH.
1759
1760         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
1761         CEE_SWITCH in back-end code, use OP_SWITCH instead.
1762
1763 2007-12-11  Geoff Norton  <gnorton@novell.com>
1764
1765         * mini-s390x.c: Minor change to the MAX() define to allow
1766         it to compile with other gcc versions.
1767
1768 2007-12-11  Geoff Norton  <gnorton@novell.com>
1769
1770         * cpu-s390x.md:
1771         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
1772
1773 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
1774
1775         exceptions-arm.c (mono_arch_get_restore_context): Restore
1776         the frame pointer.
1777
1778         exceptions-arm.c (throw_exception): Save the frame pointer.
1779         This is a partial fix for #323747. Only the client side is
1780         fixed.
1781
1782 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
1783
1784         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
1785         was using an unrelated variable to log the class which
1786         needed the cctor to be called. This was crashing on arm.
1787
1788 2007-12-09  Robert Jordan  <robertj@gmx.net>
1789
1790         * mini-x86.c (mono_arch_emit_epilog):
1791         Consider all kinds of 64-bit types. Fixes #323114.
1792
1793 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
1794
1795         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
1796
1797 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1798
1799         * mini-amd64.c (peephole_pass): Add a missing instruction check.
1800
1801 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
1802
1803         * mini.c: run type ctor before allocating an object, not only
1804         when running it's constructor method (fixes at least part of bug #342507).
1805
1806 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1807         
1808         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
1809         
1810         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
1811         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
1812         function.
1813
1814         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
1815         mono_generic_class_init_trampoline () the same as it is done with the other
1816         trampolines.
1817
1818         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
1819         aot-runtime.c aot-compiler.c: Implement AOT support.    
1820
1821 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1822
1823         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
1824         build for archs which don't have the vtable trampoline defined
1825         yet.
1826
1827 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1828
1829         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
1830
1831         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
1832
1833         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
1834
1835         * tramp-<ARCH>.c: Use the new helper function.
1836
1837 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1838
1839         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
1840         trampoline call, which takes a vtable argument.
1841
1842         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
1843         OP_TRAMPCALL_VTABLEs like other calls.
1844
1845         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
1846         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
1847         call.  Implemented a support function which fetches the vtable
1848         from a register set.
1849
1850         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
1851         Implemented a generic class init trampoline, using the
1852         OP_TRAMPCALL_VTABLE opcode.
1853
1854         * mini.c: Implemented static field access when sharing generic
1855         code.  This implies initing the class using the new
1856         OP_TRAMPCALL_VTABLE call.
1857
1858 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1859
1860         * mini.c: Don't compile methods with sharing enabled if their
1861         classes are disabled for sharing.
1862
1863 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
1864
1865         * inssel.brg: Add a missing sign extension to the GETCHR and array access
1866         opcodes. Fixes #346563.
1867
1868         * objects.cs: Add a new test.
1869
1870         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
1871
1872         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
1873         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
1874
1875 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
1876
1877         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
1878
1879 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
1880
1881         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
1882         code stream.
1883
1884 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
1885
1886         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
1887
1888         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
1889         optimization in the AOT case.
1890         
1891 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
1892
1893         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
1894         
1895         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
1896
1897         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
1898
1899         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
1900
1901         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
1902         is created by the inlined delegate ctor.
1903
1904         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
1905
1906         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
1907
1908 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
1909
1910         * cpu-x86.md: Fix the length of ckfinite.
1911
1912 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
1913
1914         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
1915         
1916         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
1917         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
1918
1919         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
1920
1921         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
1922         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
1923
1924 2007-11-28  Martin Baulig  <martin@ximian.com>
1925
1926         * mini-x86.c
1927         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
1928         after creating the trampoline.
1929
1930 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
1931
1932         * aot-runtime.c (load_aot_module): Check runtime version if needed.
1933
1934         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
1935         the same version.
1936
1937         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
1938         instead of the calling method to help AOT.
1939
1940         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
1941
1942 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
1943
1944         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
1945         is defined.
1946
1947 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
1948
1949         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
1950         
1951         * aot-compiler.c (compile_method): Correct check for generic method definitions.
1952         (encode_method_ref): No need to handle generic method definitions specially.
1953
1954         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1955
1956         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
1957         decode_klass_info.
1958
1959         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
1960         encode_klass_info.
1961         (compile_method): Enable generic sharing.
1962
1963 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
1964
1965         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
1966         (mini_method_compile): Add preliminary support for AOTing shared generic code.
1967
1968         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
1969         generic code.
1970
1971         * mini-trampolines.c: Fix a warning.
1972
1973         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
1974         NEW_PCONST.
1975         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
1976         (generic_class_is_reference_type): Remove unused function.
1977
1978         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
1979         in the generic vtable trampoline case.
1980
1981         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
1982         
1983         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
1984         return an AOT method based on a vtable slot.
1985
1986         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
1987
1988         * mini.c (mini_get_vtable_trampoline): Export this.
1989
1990 2007-11-22  Martin Baulig  <martin@ximian.com>
1991
1992         * debug-debugger.h
1993         (MonoDebuggerInfo): Move `debugger_version' up.
1994
1995 2007-11-22  Martin Baulig  <martin@ximian.com>
1996
1997         * mini-amd64.c
1998         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
1999
2000         * mini-trampolines.c
2001         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
2002         after compiling the method.
2003
2004 2007-11-20  Martin Baulig  <martin@ximian.com>
2005
2006         * debug-mini.c
2007         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
2008         (mono_debugger_remove_breakpoint): Likewise.
2009         (mono_debugger_check_breakpoints): Likewise.
2010
2011         * debug-debugger.c: Implement the new breakpoint interface here.
2012
2013 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
2014
2015         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
2016         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
2017
2018         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
2019
2020 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
2021
2022         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
2023
2024         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
2025         mini.c.
2026
2027         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
2028         mini.c.
2029
2030         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
2031         returning a vtype in a register.
2032
2033         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
2034         here from the arch specific code.
2035
2036         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
2037         mini.c.
2038
2039         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
2040         (mono_arch_emit_prolog): Increment maximum prolog size.
2041
2042         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
2043         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
2044
2045         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
2046         MonoGenericSharingContext.
2047
2048         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
2049         MonoGenericSharingContext. Allocate memory from the cfg mempool.
2050
2051 2007-11-15  Mark Probst  <mark.probst@gmail.com>
2052
2053         * mini.c, mini.h, generic-sharing.c: Functions for producing code
2054         which extract fields out of the runtime generic context.  Full
2055         sharing of the NEWARR opcode.
2056
2057 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
2058
2059         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
2060         --enable-minimal=ssa.
2061
2062 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
2063
2064         * mini-trampolines.c (mono_delegate_trampoline): Update after 
2065         mono_marshal_get_delegate_invoke () signature change.
2066
2067 2007-11-13  Mark Probst  <mark.probst@gmail.com>
2068
2069         * mini.c: Removed the shared context in favor of the generic
2070         sharing context.  Allocate the MonoJitInfo structure with room for
2071         the generic sharing context if it's needed.
2072
2073         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
2074         domain-internals.h now.
2075
2076         * mini-x86.c: Pass the generic sharing context to get_call_info ().
2077
2078         * generic-sharing.c: Several changes for working without a shared
2079         context and instead operating on open types instead.
2080
2081 2007-11-12  David S. Miller  <davem@davemloft.net>
2082
2083        * inssel-sparc.brg: Fix double instruction emit.
2084
2085 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
2086
2087         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
2088         Get/Set/Address methods.
2089         
2090         * mini.c debug-debugger.c mini-trampolines.c: Update after 
2091         mono_marshal_get_delegate_invoke signature change.
2092
2093 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2094
2095         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
2096         This can happens with dynamic methods. Fixes the other bug in #322722.
2097
2098 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2099
2100         * tramp-arm.c (mono_arch_patch_callsite): Support patching
2101         BX call sequence.
2102
2103         * mini-arm.c (arm_patch): Implement patching of BX call
2104         sequence. Fixes one of the bugs in #322722.
2105
2106 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
2107
2108        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
2109        under Linux.  We only need to flush every 32-byte cache line.    
2110
2111 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
2112
2113         * mini.c:
2114         move_basic_block_to_end: Add branches when needed, eventually creating
2115         a new BB.
2116         optimize_branches: added a parameter that tells if it's ok to create
2117         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
2118         and avoid calling move_basic_block_to_end when it's not ok.
2119         Fixes bug 318677.
2120
2121 2007-11-07  Mark Probst  <mark.probst@gmail.com>
2122
2123         * mini.c: Abort inlining call to InitializeArray if something
2124         looks wrong.  Let the icall handle it, which now has proper safety
2125         checks.
2126
2127 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2128
2129         * mini.c (mono_spill_call): add support for soft-float.
2130
2131         * mini.c (mono_method_to_ir): add support for soft-float
2132         to inlined functions that return float.
2133
2134         * mini.c (mono_method_to_ir): add support for soft-float
2135         to cee_stsfld opcode on float fields.
2136
2137 2007-11-05  Geoff Norton  <gnorton@novell.com>
2138
2139         * mini-x86.h: Fix the structure access for X86 Leopard.
2140
2141
2142 2007-11-05  Martin Baulig  <martin@ximian.com>
2143
2144         * mini-trampolines.c
2145         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
2146         after compiling the method to notify the debugger.
2147
2148 2007-11-05  Martin Baulig  <martin@ximian.com>
2149
2150         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
2151
2152 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
2153
2154         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
2155         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
2156
2157 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
2158
2159         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
2160         native-to-managed wrappers.
2161         
2162 2007-11-01  Geoff Norton  <gnorton@novell.com>
2163
2164         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
2165         members.
2166
2167 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
2168
2169         * mini.c, mini-x86.c: when getting back from unmanaged code
2170         to managed via a marshaled delegate we also need to set the
2171         right domain.
2172
2173 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
2174
2175         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
2176         for amd64.
2177
2178 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
2179
2180         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
2181         let the debugger or other external agents to tell the JIT when
2182         a sw breakpoint has been inserted in the code that the JIT needs
2183         to be able to inspect.
2184
2185 2007-10-31  Martin Baulig  <martin@ximian.com>
2186
2187         * debug-debugger.h
2188         (MonoDebuggerInfo): Remove `runtime_class_init'.
2189
2190 2007-10-30  Martin Baulig  <martin@ximian.com>
2191
2192         * debug-mini.h
2193         (mono_debugger_thread_created): Added `MonoThread *' argument.
2194         (mono_debugger_extended_notification): New public method.
2195         (mono_debugger_trampoline_compiled): New public method.
2196
2197         * debug-mini.c
2198         (MonoDebuggerThreadInfo): Added `thread' and
2199         `extended_notifications' fields.
2200
2201         * debug-debugger.c
2202         (debugger_executable_code_buffer): New static variable.
2203
2204         * debug-debugger.h
2205         (MonoDebuggerInfo): Added `executable_code_buffer',
2206         `executable_code_buffer_size', `breakpoint_info_area',
2207         `breakpoint_table' and `breakpoint_table_size'.
2208
2209 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
2210
2211         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
2212         that IP  either is an unused value or the vtable pointer. IMT 
2213         calls use vtable + offset now. Reduced by almost half the size
2214         of IMT entries.
2215
2216 2007-10-26  Jonathan Chambers <joncham@gmail.com>
2217
2218         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
2219         defines to access param registers. Replace long usage with
2220         gsize as sizeof(long) != sizeof(void*) on Win64.
2221
2222         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
2223         on Win64. Fix intrinsic, use _AddressOfReturnAddress
2224         instead of non-existant _GetAddressOfReturnAddress.
2225
2226         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
2227         param registers. Save/restore %rdi and %rsi in MonoLMF.
2228
2229         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
2230         param registers. Modify (throw_exception) signature to take 
2231         %rdi and %rsi on Win64. 
2232
2233         Code is contributed under MIT/X11 license.
2234
2235 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
2236
2237         * helpers.c: unlink debugging output files.
2238
2239 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
2240
2241         * mini.c: Move mono_create_ftnptr () to object.c.
2242
2243 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2244
2245         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
2246         optional. This function can now be used to disassemble code generated
2247         outside the JIT such as trampolines and IMT thunks.
2248
2249         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
2250
2251         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
2252         vtable pointer from a ldr instruction.
2253
2254         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
2255         new IMT call sequence.
2256
2257         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
2258         call sequence for interface invocations.
2259
2260         * mini-arm.c (mono_arch_emit_imt_argument): added, required
2261         for imt support. This function is empty since IMT on ARM requires no
2262         special handling on the IR side.
2263
2264         * mini-arm.c (mono_arch_find_imt_method): added, required for
2265         imt support.
2266
2267         * mini-arm.c (mono_arch_find_this_argument): added, required
2268         for imt support.
2269
2270         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
2271         a ldr instruction to load a value stored in the code stream.
2272
2273         * mini-arm.c (mono_arch_build_imt_thunk):added, required
2274         for imt support.
2275
2276
2277 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
2278
2279         * mini.c (mini_init): Install the jump trampoline callback.
2280
2281 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2282
2283         * mini-trampolines.c: handle synchronized methods with the common
2284         vtable trampoline (bug #335601).
2285
2286 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
2287
2288         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
2289
2290         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
2291         64 bit platforms.
2292
2293         * mini-ia64.h mini-ia64.c: Add support for IMT.
2294
2295         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
2296         prolog. Fixes #331958.
2297
2298 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
2299
2300         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
2301
2302 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2303
2304         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
2305         trampoline.
2306
2307 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2308
2309         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
2310         trampoline.
2311
2312 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
2313
2314         * mini-x86.c, mini-x86.h: x86 support for the common vtable
2315         trampoline.
2316
2317 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
2318
2319         * mini-trampolines.c: changed the magic rampoline to understand
2320         the common vtable trampoline method: the method to invoke is
2321         determined by the vtable displacement of the call.
2322
2323 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2324
2325         * mini.c, mini.h: register the common vtable trampoline if the
2326         architecture supports it.
2327
2328 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2329
2330         * cpu-amd64.md: use the correct max length for tls_get.
2331
2332 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
2333
2334         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
2335         CEE_STELEM_ANY. Fixes #333696.
2336
2337 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2338
2339         * exceptions-x86.c: provide more graceful handling of the case where
2340         we followed a bogus function pointer from managed code (bug #332866).
2341
2342 2007-10-11  Mark Probst  <mark.probst@gmail.com>
2343
2344         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
2345         replaces the generic_shared flag and will carry more information
2346         in the future.
2347
2348         * generic-sharing.c: Added mini_type_stack_size() which allows
2349         allows open types if given a generic sharing context.
2350         mini_get_basic_type_from_generic() takes a
2351         MonoGenericSharingContext* instead of a MonoCompile* now.
2352
2353         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
2354         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
2355         mini-sparc.c, mini-x86.c: Trivial changes required by the two
2356         changes above.  Just passing arguments through to the right
2357         places.
2358
2359 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2360
2361         * mini-arm.c: unify the call emission to emit_code_seq().
2362
2363 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
2364
2365         * tramp-arm.c: reduced the trampoline size.
2366
2367 2007-10-10  Mark Probst  <mark.probst@gmail.com>
2368
2369         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
2370         variable handling out of arch-specific code.
2371
2372 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
2373
2374         * mini-arm.c: implemented fast delegate dispatch.
2375
2376 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2377
2378         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
2379         that fp elimination is turned off if the space required by locals is too
2380         big. Fixes #331958.
2381
2382 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
2383
2384         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
2385         ARM to the new style trampoline.
2386
2387 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2388
2389         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
2390
2391         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
2392
2393 2007-10-09  Martin Baulig  <martin@ximian.com>
2394
2395         * debug-debugger.h
2396         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
2397         `field_info_offset_offset'.     
2398
2399 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
2400
2401         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
2402         removed more internal usage of the r11 register and made it available
2403         to the register allocator.
2404
2405 2007-10-08  Mark Probst  <mark.probst@gmail.com>
2406
2407         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
2408         when sharing generics and treat type variables as references.
2409
2410 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2411
2412         * mini-ppc.c: started removing the internal uses of register r11
2413         to eventually allow the register allocator to manage it as an
2414         additional available register.
2415
2416 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2417
2418         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
2419
2420 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
2421
2422         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
2423         specific trampolines as they are not performance critical as a jump
2424         target (maybe align as before only for AOT code?). This saves about
2425         200 KB of native code on x86 for monodevelop startup.
2426
2427 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
2428
2429         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
2430         monodevelop startup.
2431
2432 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
2433
2434         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
2435
2436         * mini-sparc.h mini-sparc.c: Implement IMT support.
2437
2438         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
2439         its smaller and doesn't clobber sparc_g1.
2440
2441         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
2442
2443 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
2444
2445         * mini-ppc.c: optimized the size of the IMT thunks a bit.
2446
2447 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
2448
2449         * mini-ppc.c: implemented fast delegate invocation.
2450
2451 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
2452
2453         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
2454
2455 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2456
2457         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
2458         code to the new style trampoline in preparation for IMT support.
2459
2460 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
2461
2462         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
2463         systems already. This also reduces the specific trampiline sizes and
2464         prepares for the use of r12 as the IMT identifier register.
2465
2466 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2467
2468         * mini-mips.h: endianess fix (simplified from a patch by
2469         Thomas Kunze <thommy@tabao.de>, bug #323737).
2470
2471 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2472
2473         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
2474         to access ucontext fields and enable netbsd support
2475         (partially from Magnus Henoch <mange@freemail.hu>).
2476
2477 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2478
2479         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
2480         use the preprocessor from the CPP env var if it is set.
2481
2482 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2483
2484         * mini-trampolines.c: fixed an assertion and moved it earlier in the
2485         code, before interface_offset gets used.
2486
2487 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
2488
2489         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
2490         mono_class_setup_vtable () before accessing klass->vtable.
2491
2492 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
2493
2494         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
2495         hackish.
2496
2497 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2498
2499         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
2500         IMT slots (this saves hundreds of KB of memory in programs like
2501         IronPython and Monodevelop).
2502
2503 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2504
2505         * mini.c: print the delegate counter.
2506
2507 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
2508
2509         * mini-x86.c: make it easier to enable the debugging code for IMT
2510         slots.
2511
2512 2007-09-28  Martin Baulig  <martin@ximian.com>
2513
2514         * debug-debugger.h
2515         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
2516         `mono_method_klass_offset' and `mono_method_token_offset'.
2517
2518 2007-09-20  Mark Probst  <mark.probst@gmail.com>
2519
2520         * mini.c: First generics sharing implementation.  Can only share
2521         in very simple cases.  If sharing doesn't work it falls back to
2522         dedicated compilation.
2523
2524         * mini.h: Flag in MonoCompile to specify whether generic
2525         compilation is shared.  Flags enum for marking which generic inst
2526         of a context is used.  Prototypes for helper functions.
2527
2528         * generic-sharing.c: Helper functions for generic method sharing.
2529
2530         * optflags-def.h: Optimization flag (gshared) for enabling generic
2531         method sharing added.
2532
2533         * Makefile.am: generic-sharing.c added.
2534
2535 2007-09-19 Daniel Nauck <dna@mono-project.de>
2536
2537         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
2538
2539 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
2540         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
2541         fixes bug 325507.
2542
2543 2007-09-19  Martin Baulig  <martin@ximian.com>
2544
2545         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
2546         mono_debug_cleanup() is now part of mono_cleanup().
2547
2548 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
2549
2550         * driver.c (mono_main): Fix a warning.
2551
2552 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
2553
2554         * aot-compiler.c: Optimize various parts when processing large assemblies.
2555         Fixes ##325568.
2556
2557         * mini.c (mono_patch_info_hash): Improve hash function.
2558
2559 2007-09-14  Jonathan Chambers <joncham@gmail.com>
2560
2561         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
2562         
2563         Code is contributed under MIT/X11 license.
2564
2565 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2566
2567         * mini.c (mini_init): Fix a leak.
2568
2569         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
2570
2571 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2572
2573         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
2574
2575 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2576
2577         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
2578
2579 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
2580
2581         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
2582         variance tests.
2583
2584         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
2585
2586         * mini.c (handle_alloc): Enable managed allocators in AOT code.
2587
2588         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
2589
2590         * aot-runtime.c (decode_patch_info): Ditto.
2591
2592 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2593
2594         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
2595         static case. Cache delegates in architecture specific code, 
2596         based on number of parameters.
2597         
2598         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
2599         in architecture specific code, based on number of parameters.
2600         
2601         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
2602         caching happen in architecture specific code now.
2603         
2604         Code is contributed under MIT/X11 license.
2605
2606 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2607
2608         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
2609         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
2610         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
2611
2612         Code is contributed under MIT/X11 license.
2613
2614 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
2615         * mini.c: (mono_thread_abort) Fixed bug #82416.
2616
2617 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2618
2619         * mini.: hook the new managed GC allocation feature into the JIT.
2620
2621 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2622
2623         * mini.c: implementation for the new runtime tls opcode.
2624
2625 2007-09-11  Martin Baulig  <martin@ximian.com>
2626
2627         * debug-debugger.h
2628         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
2629         `mono_method_inflated_offset'.
2630
2631 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
2632
2633         * driver.c mini.h mini.c: Add a new devel command line option for injecting
2634         async exceptions into a method.
2635
2636         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
2637         purpose of testing whenever the unwinder works at every instruction.
2638
2639 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
2640
2641         * mini.c: check accessibility of method used in ldftn (fixes
2642         bug #82635).
2643
2644 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
2645
2646         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
2647
2648         * inssel.brg: Fix a warning.
2649
2650 2007-09-03  Martin Baulig  <martin@ximian.com>
2651
2652         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
2653         now takes the `main_method' as argument.
2654
2655 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
2656
2657         * cpu-sparc.md (endfilter): Add missing src1:i argument.
2658
2659 2007-08-30  Jonathan Chambers <joncham@gmail.com>
2660
2661         * driver.c: include the cil-coff.h header on Windows.
2662         
2663         Code is contributed under MIT/X11 license.
2664
2665 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2666
2667         * mini.c, driver.c: don't include the cil-coff.h header.
2668
2669 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2670
2671         * mini.c: flag places that needs fixes fo soft-float support.
2672
2673 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
2674
2675         * mini.h, inssel-float.brg: fix soft-float constant loads on big
2676         endian systems (partially from Dean Jenkins, bug #81924).
2677
2678 2007-08-28  Mark Probst  <mark.probst@gmail.com>
2679
2680         * mini.c (check_linkdemand): Remove embedded reference object in
2681         call to LinkDemandSecurityException.
2682         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
2683         with an IntPtr instead of a reference object.
2684
2685 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
2686
2687         * mini.c (handle_initobj): Handle alignment properly.
2688
2689         * inssel.brg (mini_emit_memset): Ditto. 
2690
2691         * inssel.brg (mini_emit_memcpy): Ditto. 
2692
2693         * inssel-sparc.brg: Ditto.              
2694
2695         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
2696
2697 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
2698
2699         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
2700         exceptions raised in unmanaged code. Fixes part of #82594.
2701
2702 2007-08-24  Mark Probst  <mark.probst@gmail.com>
2703
2704         * mini.c (mono_method_to_ir), declsec.c
2705         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
2706
2707 2007-08-22  Martin Baulig  <martin@ximian.com>
2708
2709         * debug-mini.h
2710         (MonoDebuggerThreadInfo): New typedef.
2711         (mono_debugger_thread_table): New global variable.
2712         (mono_debugger_thread_created): New public function.
2713         (mono_debugger_thread_cleanup): New public function.
2714
2715         * debug-debugger.h
2716         (MonoDebuggerInfo):
2717         - removed `get_current_thread' and `lookup_assembly'.
2718         - removed `data_table'.
2719         - added `thread_table'.
2720
2721         * mini.c
2722         (mono_thread_start_cb): Call mono_debugger_thread_created().
2723         (mono_thread_attach_cb): Likewise.
2724         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
2725         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
2726         initial domain.
2727
2728         * driver.c (mono_main): Move mono_debug_init() up, before calling
2729         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
2730
2731 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
2732
2733         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
2734         together when passing several arguments of type double (gives a small
2735         speedup and saves a few bytes of generated code).
2736
2737 2007-08-20  Jb Evain  <jbevain@novell.com>
2738
2739         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
2740
2741 2007-08-20  Jb Evain  <jbevain@novell.com>
2742
2743         * mini.c (mono_method_to_ir): throw MethodAccessException
2744         and FieldAccessException instead of InvalidProgramException.
2745
2746 2007-08-20  Mark Probst  <mark.probst@gmail.com>
2747
2748         * mini.c: CoreCLR security checks.
2749
2750         * mini.h: Removed MonoSecurityMode (moved to
2751         metadata/security-manager.h) and mono_security_mode global var
2752         (replaced by set/get functions in security-manager.h).
2753
2754         * driver.c: Added "core-clr-test" security mode for testing.  Used
2755         set-function for setting security mode.
2756
2757 2007-08-17  Mark Probst  <mark.probst@gmail.com>
2758
2759         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
2760         the new jit_info_table.
2761
2762         * driver.c: Test code for the new jit_info_table (enabled by the
2763         define MONO_JIT_INFO_TABLE_TEST).
2764
2765 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
2766
2767         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
2768         detection of call <REG> instruction sequence. Fixes build on freebsd.
2769
2770 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
2771
2772         * mini-exceptions.c: Fix a warning.
2773
2774 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
2775
2776         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
2777         stack overflow handling code on amd64 too.
2778
2779         * mini-exceptions.c (mono_setup_altstack): Make this use 
2780         mono_thread_get_stack_bounds ().
2781
2782         * mini-x86.h: Disable sigaltstack on solaris x86.
2783
2784 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
2785
2786         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
2787
2788 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
2789
2790         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
2791
2792 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
2793
2794         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
2795
2796         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
2797
2798 2007-08-03  Neale Ferguson <neale@sinenomine.net>
2799
2800         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
2801         due to alignment.
2802
2803 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2804
2805         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
2806         to be emitted (bug #82281).
2807
2808 2007-08-01  Martin Baulig  <martin@ximian.com>
2809
2810         Merged the `debugger-dublin' branch.
2811
2812         * debug-debugger.h (MonoDebuggerInfo):
2813         Removed the `old_*' compatibility entries.
2814         Added `debugger_version' and `data_table'.
2815         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
2816         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
2817
2818         * debug-mini.c
2819         (MiniDebugMethodBreakpointInfo): Add `address_list'.
2820         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
2821         instead of a `gconstpointer'.
2822         (mono_debugger_insert_method_breakpoint): Return a
2823         `MonoDebugMethodAddressList *'.
2824
2825 2007-06-28  Martin Baulig  <martin@ximian.com>
2826
2827         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
2828
2829 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
2830
2831         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
2832         __builtin_frame_address () since it is broken on older gcc versions.
2833
2834 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2835
2836         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
2837         on the stack overflow handling and made the managed stack overflows
2838         catchable in most cases using soft guard pages.
2839         * exceptions-x86.c: added code to restore the protection in the soft
2840         guard pages at the end of exception handling.
2841
2842 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
2843
2844         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
2845
2846 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2847
2848         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
2849         exception handling.
2850
2851 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2852
2853         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
2854         signal handling support until it has been ported to the new mechanism.
2855         * mini.c: fixed stack overflow detection and use the new
2856         architecture code  to handle signals on the altstack.
2857
2858 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
2859
2860         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
2861         stack overflows on the alt stack.
2862
2863 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
2864
2865         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
2866         stack overflows on the alt stack.
2867
2868 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
2869
2870         * exceptions-ppc.c: cleanup preparing for altstack support.
2871
2872 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
2873
2874         * exceptions-arm.c: cleanup preparing for altstack support.
2875
2876 2007-07-27  Mark Probst  <mark.probst@gmail.com>
2877
2878         * mini.c (print_jit_stats): Output hazard pointer stats.
2879
2880 2007-07-26  Mark Probst  <mark.probst@gmail.com>
2881
2882         * driver.c, mini.c: Replaced security mode flags with a single
2883         enum variable.
2884
2885 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2886
2887         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
2888
2889 2007-07-25  Mark Probst  <mark.probst@gmail.com>
2890
2891         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
2892         (which doesn't do anything yet) for activating Core CLR
2893         (Silverlight) security.
2894
2895 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
2896
2897         * mini-codegen.c: work around a possible gcc bug on arm.
2898
2899 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2900
2901         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
2902         message for platforms that don't support AOT compilation.
2903
2904 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2905
2906         * mini.h, mini.c, driver.c: temporary smcs hack.
2907
2908 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
2909
2910         * mini-arm.h, mini-arm.c: arm EABI fixes.
2911
2912 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
2913
2914         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
2915         case.
2916
2917         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
2918         trampolines taking a method argument.
2919
2920         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
2921
2922         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
2923         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
2924
2925         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
2926         JIT compilation throws an exception. Fixes #82050.
2927
2928 2007-07-19  Mark Probst  <mark.probst@gmail.com>
2929
2930         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
2931         with the MONO_EXCEPTION_ defines.
2932
2933 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
2934
2935         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
2936         #82117.
2937         
2938         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
2939         the cause of an assertion.
2940
2941 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
2942
2943         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
2944         removed.
2945
2946 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
2947
2948         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
2949         assert. Should fix #82103.
2950
2951 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
2952
2953         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
2954         here too. Fixes #82095.
2955
2956         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
2957         addresses.
2958
2959         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
2960
2961         * mini-amd64.h: Enable IMT for amd64.
2962         
2963         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
2964
2965 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
2966
2967         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
2968
2969 2007-07-12  Mark Probst  <mark.probst@gmail.com>
2970
2971         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
2972         as soon as check_linkdemand sets an exception_type.
2973
2974 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2975
2976         * mini-x86.c: fixed offsets for IMT call sequence.
2977         * mini-x86.h: enable IMT again.
2978
2979 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
2980
2981         * trace.c (mono_trace_enter_method): Decode MonoType too.
2982
2983         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
2984
2985         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
2986
2987         * mini-amd64.c: Add preliminary IMT implementation.
2988         
2989 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
2990
2991         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
2992         understand the new IMT-base interface invocation (thanks to
2993         Daniel Nauck for the report and the remote debugging session).
2994
2995 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2996
2997         * mini-x86.c: size and speed optimizations for the IMT bsearch.
2998
2999 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
3000
3001         * Makefile.am (aotcheck): Make this actually use the AOTed code.
3002
3003 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
3004
3005         * mini-trampolines.c: implement AOT IMT support.
3006         * mini-x86.h: enable IMT support for wider testing.
3007
3008 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3009
3010         * inssel.brg (emit_imt_argument): Add aot support here.
3011
3012         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
3013
3014 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3015
3016         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
3017         of the IMT implementation, partially from massi, with my
3018         implementation of the bsearch sequence. Disabled by default until
3019         the AOT code is implemented.
3020
3021 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3022
3023         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
3024
3025         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
3026
3027 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3028
3029         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
3030         arch-independent IMT JIT code from Massimiliano
3031         Mantione (massi@ximian.com) with small cleanups from me.
3032
3033 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3034
3035         * Makefile.am: fix svn invocation to get the svn revision to be
3036         independent of the local language (build fix).
3037
3038 2007-07-09  Mark Probst  <mark.probst@gmail.com>
3039
3040         * mini.c (inline_method): Reset cfg->exception_type if the
3041         inlining is aborted.  Fixes: 82049.
3042
3043 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
3044
3045         * mini.c: remove assert from exception handling code when exception_ptr
3046         is not set.
3047
3048 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3049
3050         * mini.c (mono_codegen): Add an assert.
3051
3052         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
3053         enter and leave code.
3054         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
3055
3056 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3057
3058         * mini-ppc.c: fixed memory corruption for localloc(0)
3059         (bug #81852).
3060
3061 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3062         
3063         * mini.c: Fix warnings.
3064
3065 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
3066
3067         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
3068         to emit better double->int conversions.
3069
3070 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
3071
3072         * mini.c: the provided Min/Max optimizations are valid for unisgned
3073         ints.
3074
3075 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
3076
3077         * 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
3078
3079 2007-06-28  Miguel de Icaza  <miguel@novell.com>
3080
3081         * mini.c (mono_running_on_valgrind): Add support for reporting the
3082         method and  its boundaries to valgrind.
3083
3084 2007-06-28  Martin Baulig  <martin@ximian.com>
3085
3086         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3087
3088 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
3089
3090         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
3091
3092         * generic.2.cs: Add new test case.
3093
3094 2007-06-25  Martin Baulig  <martin@ximian.com>
3095
3096         Merged the `debugger-dublin' branch.
3097
3098         * debug-mini.c
3099         (mono_debugger_insert_method_breakpoint): New public method.
3100         (mono_debugger_remove_method_breakpoint): Likewise.
3101         (mono_debugger_check_breakpoints): New static method.
3102         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
3103
3104         * debug-debugger.h (MonoDebuggerInfo):
3105         Renamed (to keep backward compatibility in the vtable):
3106         `insert_breakpoint' -> `old_insert_breakpoint'.
3107         `remove_breakpoint' -> `old_remove_breakpoint'.
3108         `create_string' -> `old_create_string'.
3109         `lookup_class' -> `old_lookup_class'.
3110         `lookup_type' -> removed; changed into a dummy field.
3111         `lookup_assembly' -> `old_lookup_assembly'.
3112         Added (same functionality, but different signature):
3113         `create_string', `lookup_class', `lookup_assembly'
3114         Added new:
3115         `get_method_addr_or_bpt', `remove_method_breakpoint',
3116         `runtime_class_init'.
3117
3118         * debug-debugger.c: Merged the `debugger-dublin' branch.
3119
3120 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
3121
3122         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
3123         well.
3124         (peephole_pass): Likewise.
3125
3126 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
3127
3128         * driver.c: hopefully make setaffinity work also for ancient
3129         versions of linux.
3130
3131 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
3132
3133         * driver.c : win32 build fix.
3134
3135 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3136
3137         * driver.c: check for the MONO_NO_SMP env var and bind to a single
3138         processor if it is set.
3139
3140 2007-06-21  Martin Baulig  <martin@ximian.com>
3141
3142         * debug-mini.h: New file.
3143
3144         * debug-mini.c
3145         (mono_debugger_insert_breakpoint_full): Moved here from
3146         ../metadata/mono-debug-debugger.c.
3147         (mono_debugger_remove_breakpoint): Likewise.
3148         (mono_debugger_breakpoint_callback): Likewise.
3149
3150 2007-06-15  Raja R Harinath  <rharinath@novell.com>
3151
3152         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3153         changes in MonoGenericClass.
3154
3155 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
3156
3157         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
3158
3159 2007-06-14  Raja R Harinath  <rharinath@novell.com>
3160
3161         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3162         removal of MonoGenericMethod.
3163
3164 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3165
3166         * mini-exceptions.c: hooks for the exception events profiling API.
3167
3168 2007-06-14  Randolph Chung  <tausq@debian.org>
3169
3170         * Makefile.ma: Add hppa target.
3171         * mini-arch.h: Include mini-hppa.h
3172         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
3173         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
3174         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3175
3176 2007-06-14  Randolph Chung  <tausq@debian.org>
3177
3178         * inssel.brg: Add rules for "chained" compare-branch operations so that
3179         a single compare op can affect multiple branches.  Adjust cost for
3180         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
3181         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
3182         cost for some rules so that they can more easily be overridden by
3183         per-arch rules (with fixes from lupus).
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-ops.h: Reorder branch ops so that they match the order of the
3189         corresponding CEE_* ops.  The code expects them this way.
3190         Add new ops for HPPA target.
3191         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3192
3193 2007-06-13  Randolph Chung  <tausq@debian.org>
3194
3195         * mini-exceptions.c: Handle cases where the stack grows towards
3196         larger addresses.
3197         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3198
3199 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
3200
3201         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
3202         counter.
3203         * driver.c: explain where a non-matching corlib is found.
3204
3205 2007-06-13  Mark Probst  <mark.probst@gmail.com>
3206
3207         * mini.c (print_jit_stats): Output dynamic code allocation stats.
3208
3209 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
3210
3211         * mini-exceptions.c: Generate a method profile leave event during
3212         an exception to ensure that the profiler gets notified.
3213
3214 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
3215
3216         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
3217         branch.
3218
3219         * cpu-amd64.md: Add long_and/or/xor opcodes.
3220
3221 2007-06-06  Wade Berrier  <wberrier@novell.com>
3222
3223         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
3224         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
3225         length of instruction shr_imm (expected 8, got 10)
3226
3227 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
3228
3229         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
3230
3231 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3232
3233         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3234         MonoInternalHashTable again (fixed bug in the internal hash table
3235         code).
3236
3237 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3238
3239         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
3240         Have to figure out what makes it crash the SWF regression.
3241
3242 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
3243
3244         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
3245
3246 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3247
3248         * mini.c: optimize out the type check when storing null in a
3249         reference array.
3250
3251 2007-06-04  Mark Probst  <mark.probst@gmail.com>
3252
3253         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3254         MonoInternalHashTable.
3255
3256 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
3257
3258         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
3259         signed integer methods.
3260
3261 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3262
3263         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
3264         permanently since the current approach doesn't work.
3265
3266 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3267
3268         * inssel.brg (stmt): Only call delegate->invoke_impl if 
3269         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
3270
3271 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3272
3273         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
3274         the sreg2==rdx case.
3275         
3276         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
3277         account if it contains a rex prefix.
3278         (peephole_pass): Handle OP_FMOVE as well.
3279
3280 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3281
3282         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
3283         as it causes regressions.
3284
3285 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
3286
3287         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
3288         static case as well.
3289
3290         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
3291
3292         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3293         (mono_arch_get_this_arg_from_call): Ditto.
3294
3295         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
3296
3297         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
3298         invoke_impl field.
3299
3300         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3301         (mono_arch_get_this_arg_from_call): Ditto.
3302
3303         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
3304         
3305         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
3306         try to create optimized invoke code and use that for further invocations. 
3307         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
3308
3309         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
3310
3311 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
3312
3313         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
3314         sealed classes or methods.
3315         *devirtualization.cs: tests for the new optimization
3316
3317 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
3318
3319         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
3320         by the update_volatile () function.
3321
3322 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
3323
3324         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
3325         require it.
3326
3327         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
3328
3329 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
3330
3331         * mini.c: Add configure checks for header files.
3332         * mini-x86.c: Add configure checks for header files.
3333         * trace.c: Add configure checks for header files.
3334         * aot-runtime.c: Add configure checks for header files.
3335         * aot-compiler.c: Add configure checks for header files.
3336         * driver.c: Add configure checks for header files.
3337         * mini-codegen.c: Add configure checks for header files.
3338         
3339         Code is contributed under MIT/X11 license.
3340
3341 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
3342
3343         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
3344         icompare_imm -128 + op_iclt. Fixes #81703.
3345
3346 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
3347
3348         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
3349
3350 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
3351
3352         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
3353         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
3354         so that all isinst checks now use "interface_bitmap".
3355
3356 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
3357
3358         * cpu-amd64.md (jmp): Fix a warning.
3359
3360         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
3361
3362         * basic.cs: Add new regression test.
3363
3364         * basic.cs: Remove test which is now in basic-long.cs.
3365
3366         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
3367
3368         * basic-long.cs: Add new test.
3369         
3370 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
3371
3372         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
3373
3374 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
3375
3376         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
3377
3378         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
3379         places.
3380         
3381         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
3382         throwing code a bit.
3383
3384         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
3385         the exception throwing code a bit.
3386
3387         * mini-x86.c (get_call_info): Allocate result from a mempool.
3388
3389 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
3390
3391         * aot-compiler.c (find_typespec_for_class): Fix the assert.
3392
3393         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
3394
3395         * mini.h (MonoCompile): Add 'token_info_hash' field.
3396
3397         * mini.c: Save token->method associations during compilation so the AOT 
3398         compiler can use it.
3399         
3400         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
3401         which reference generic classes and methods.
3402
3403 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
3404
3405         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
3406
3407         * aot-compiler.c (compile_method): Fix a typo in a comment.
3408
3409         * aot-runtime.c (decode_cached_class_info): Skip generic types.
3410
3411         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
3412         everything generic.
3413
3414         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
3415
3416 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
3417
3418         * mini.h (MonoCompile): Add 'args' field.
3419
3420         * mini.c (mono_compile_create_vars): Store variables representing the arguments
3421         into cfg->args.
3422
3423         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
3424
3425 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
3426
3427         * mini.c (mono_compile_get_interface_var): Remove this unused function.
3428
3429         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
3430
3431         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
3432         opcodes for some opcodes.
3433
3434         * mini.h *.brg *.c: Use the new opcodes.
3435
3436 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
3437
3438         * mini.h: Bumped aot revision.
3439
3440         * inssel.brg: modified code generation of type checks for interfaces
3441         to use the new "MonoClass.interface_bitmap" instead of the old
3442         "MonoClass.interface_offsets".
3443
3444 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
3445
3446         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
3447
3448 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
3449
3450         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
3451         64 bit platforms.
3452
3453 2007-04-27  Neale Ferguson <neale@sinenomine.net>
3454
3455         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
3456
3457 2007-04-27  Wade Berrier  <wberrier@novell.com>
3458
3459         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
3460         mini.h) to fix build.
3461
3462 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
3463
3464         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
3465         
3466         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
3467         causes the corlib unit tests to fail.
3468
3469 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
3470
3471         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
3472
3473         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
3474
3475         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
3476         opcodes to the comparison relations.
3477
3478         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
3479         opcodes to their types.
3480         
3481         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
3482
3483         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
3484         it in cfg->arch.cinfo.
3485
3486         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
3487
3488         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
3489         cfg->cil_offset_to_bb.
3490
3491 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
3492
3493         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
3494         created becase of initlocals.
3495
3496 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
3497
3498         * mini-alpha.c cpu-alpha.md: More alpha port work from 
3499         Sergey Tikhonov <tsv@solvo.ru>.
3500
3501 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
3502
3503         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
3504
3505 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
3506
3507         * cpu-s390.md (break): Correct the length of break instruction.
3508
3509 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3510
3511         * mini.c: fix a couple of soft-float issues and comments.
3512
3513 2007-04-15  Miguel de Icaza  <miguel@novell.com>
3514
3515         * trace.c (is_filenamechar): - is also a filename char.
3516
3517 2007-04-15  Neale Ferguson <neale@sinenomine.net>
3518
3519         * mini-s390.c: Correct checking for enum type in return value processing.
3520
3521 2007-04-14  Raja R Harinath  <rharinath@novell.com>
3522
3523         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
3524         (version.h): Makefile is in the build directory.
3525
3526 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
3527
3528         * mini-amd64.h: fix for assertion failure on Solaris/amd64
3529
3530 2007-04-11  Martin Baulig  <martin@ximian.com>
3531
3532         * mini.c (can_access_member): Fix handling of generic classes;
3533         fixes #81259.
3534
3535 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
3536
3537         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
3538
3539 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
3540
3541         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
3542
3543 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3544
3545         * mini-codegen.c: make sure the right spill amount is
3546         used for fp or integer registers (fixes the float_sub_spill() on ppc).
3547
3548 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
3549
3550         * mini-ppc.c: fixes for the fp_branch_nan test.
3551
3552 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
3553
3554         * basic.cs: Comment out new test which still fails on ia64.
3555
3556 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3557
3558         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
3559
3560 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3561
3562         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
3563
3564 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
3565
3566         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
3567         on 64 bit machines. Fixes part of #80738.
3568
3569         * basic.cs: Add regression test.
3570
3571 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3572
3573         * inssel.brg basic.cs: Revert previous change to fix build.
3574
3575         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
3576         platforms.
3577         
3578         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
3579
3580         * basic.cs: Add new regression test.
3581
3582 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3583
3584         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
3585         many arguments.
3586
3587 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3588
3589         * cpu-s390x.md: Correct length of break instruction.
3590
3591 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3592
3593         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
3594         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
3595
3596 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
3597
3598         * *.c: Begin WIN64 port.
3599         * mini.c:  Use correct register in profiler.
3600         * mini-amd64.c: No inline assembly on Win64.
3601         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
3602         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
3603         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
3604         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
3605         mono_arch_ip_from_context for Win64.
3606         
3607         Contributed under MIT/X11 license.
3608
3609 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
3610
3611         * exceptions-amd64.c (seh_handler): Ditto.
3612
3613         * exceptions-x86.c (seh_handler): Fix a memory leak.
3614
3615 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
3616
3617         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
3618         mini-s390x.c: fixed peephole optimizations to deal
3619         correctly with 1 and 2 byte reload avoidance.
3620
3621 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
3622
3623         * cpu-s390.md, cpu-s390x.md: update localloc length.
3624
3625 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3626
3627         * cpu-g4.md: added missing descriptions.
3628
3629 2007-03-14  Miguel de Icaza  <miguel@novell.com>
3630
3631         *  Makefile.am: Add support so the tail tests are not executed on
3632         PowerPC as that is a known limitation of the PowerPC port.
3633
3634 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3635
3636         * runmdesc.bat:  Move to msvc directory.
3637         
3638 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3639
3640         * runmdesc.bat:  Run executable that was produced by the current
3641         target and sent via an argument.
3642         
3643 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
3644
3645         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
3646         #81102.
3647
3648         * generics.2.cs: Add regression test.
3649
3650 2007-03-09  Wade berrier  <wberrier@novell.com>
3651
3652         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
3653
3654 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
3655
3656         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
3657         AOT code depends on this.
3658
3659 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3660
3661         * mini.c: more precise tracking of types in the eval stack
3662         (part of fix for bug #81044).
3663
3664 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
3665
3666         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
3667
3668         * aot-compiler.c (encode_patch): Remove an obsolete comment.
3669
3670 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
3671
3672         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
3673
3674         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
3675
3676 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
3677
3678         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
3679         a pointer on 64 bit systems. Fixes #80190.
3680
3681         * iltests.il: Add new regression test.
3682
3683 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3684
3685         * mini.c: inline a constant for Environment.IsRunningOnWindows.
3686
3687 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
3688
3689         * trace.c: Remove an erroneous alignemnt check when tracing.
3690           Fixes --trace on OSX86.
3691
3692 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3693
3694         * mini-$(arch).h: initialize SP in context for all the archs.
3695
3696 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
3697
3698         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
3699         regressions in the thread tests.
3700
3701 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
3702
3703         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
3704         - fixed implementation of LOCALLOC opcode
3705         - implemented non-un compare for floats
3706         - code cleanup
3707         - implementation of FDIV and CKFINITE opcodes
3708         - fixes for latest mono updates
3709         - additional arch opcodes
3710
3711 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3712
3713         * Makefile.am: simplify and merge rules for cross-compilation.
3714
3715 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
3716
3717         * local-propagation.c: Actually *apply* the fix for bug 80591...
3718
3719 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3720
3721         * mini-exceptions.c: backuot part of the last change
3722         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
3723
3724 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
3725         * inssel.brg: Fix bug 59286.
3726
3727
3728 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
3729
3730         * mini-exceptions.c: patch from Zoltan to correctly check for
3731         stack boundaries (using the stack register, not the frame register),
3732         fixes bugs #80724, #79717.
3733
3734 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
3735
3736         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
3737         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
3738
3739         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
3740         presence of frame pointer elimination.
3741
3742 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
3743         
3744         * mini-x86.h: NetBSD UCONTEX_REG defines.
3745
3746 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
3747
3748         * inssel-amd64.brg: Fix amd64 build.
3749
3750 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
3751
3752         * mini.h: remove extern to workaround what looks likes gcc bug 26905
3753         on amd64.
3754
3755 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
3756
3757         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
3758         ends.
3759
3760         * mini-<ARCH>.c: Use mono_is_regsize_var ().
3761
3762 2007-01-30 Mark Mason <mason@broadcom.com>
3763
3764            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
3765            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
3766            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
3767            beginning support for CEE_JMP [not quite working yet]
3768            * tramp-mips.c: LMF handling now works
3769         
3770 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
3771
3772         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
3773
3774         * mini.h (NULLIFY_INS): New macro.
3775
3776 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3777
3778         * mini.c: statistical profiler fix for windows, patch
3779         from Tor Lillqvist (tml@novell.com).
3780
3781 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
3782         * local-propagation.c: Fix bug 80591.
3783
3784 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
3785
3786         * Makefile.am: put back the --export-dynamic option as with
3787         the previous gmodule flags (thanks to Robert Jordan).
3788
3789 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
3790
3791         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
3792
3793         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
3794         simplify and speed up the local register allocator. Also rename some fields
3795         like iassign->vassign.
3796         
3797         * regalloc.c: Remove some functions which are no longer used since their
3798         inlined version is in mini-codegen.c.
3799         
3800         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
3801
3802         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
3803
3804 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
3805
3806         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
3807         narrowing. Fixes #80622.
3808
3809         * iltests.il: Add new regresssion test. 
3810
3811 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3812
3813         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
3814         debug-debugger.c, debug-debugger.h: warning fixes.
3815         * driver.c: updated copyright year and made it fit in one line.
3816
3817 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
3818
3819         * aot-runtime.c: updated to use mono-dl instead of gmodule.
3820
3821 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
3822
3823         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
3824
3825         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
3826
3827         * iltests.il: Add new test for bug #80507.
3828
3829 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3830
3831         * mini-arm.h: use soft-float also on vfp for now.
3832
3833 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3834
3835         * mini.c: fix some more soft-float issues.
3836
3837 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
3838
3839         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
3840
3841 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
3842         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
3843         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
3844         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
3845
3846 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
3847
3848         * mini-arm.c: typo fix.
3849
3850 2007-01-23  Neale Ferguson <neale@sinenomine.net>
3851
3852         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
3853
3854 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
3855
3856         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
3857         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
3858
3859         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
3860
3861         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
3862
3863         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
3864         
3865         * inssel.brg: Fix a warning.
3866
3867         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
3868
3869         * abcremoval.c ssa.c ssapre.c: Update after this change.
3870         
3871         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
3872
3873         * dominators.c (df_set): Use mono_bitset_union_fast.    
3874
3875 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
3876
3877         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
3878         mini-codegen.c: reduce relocations and memory usage for the cpu
3879         description.
3880
3881 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
3882
3883         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
3884
3885         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
3886         to reduce their size.
3887
3888 2007-01-19 Mark Mason <mason@broadcom.com>
3889
3890         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
3891         * mini-mips.c: more configuration macros, support long conditional branches, additional
3892         asserts, fix epilog instrumentation.
3893         * mini-mips.h: use standard stack walk
3894         * cpu-mips.md: increase size of div, rem and conditional branches
3895         
3896 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
3897
3898         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
3899         to cpu spec data.
3900
3901 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
3902
3903         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
3904         (compile_method): Ditto.
3905
3906         * aot-runtime.c (decode_klass_info): Ditto.
3907
3908         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
3909         needed by the code generated by inssel.brg. Also fix a warning.
3910
3911 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
3912
3913         * mini.c: deal with enums that become genericinsts by
3914         being nested in a generic class (bug #79956).
3915
3916 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3917
3918         * mini.c: match the generic definition to check for
3919         private access with generic types (bug #78431).
3920
3921 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3922
3923         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
3924         to make life easier for people cross-compiling that insist on not
3925         using scratchbox.
3926
3927 2007-01-17 Mark Mason <mason@broadcom.com>
3928
3929         * inssel-long.brg: patch to deal with mips missing flags
3930         * inssel-long32-mips.brg: implement overflow checks
3931         * insset-mips.brg: implement overflow checks
3932         * mini-mips.h: implement conditional exception handling
3933         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
3934           Remove unused code, minor cleanups.
3935         * exceptions-mips.c: minor cleanups
3936         * mini-ops.h: add mips conditional exception ops
3937         * cpu-mips.md: add mips conditional exception ops
3938
3939         
3940 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
3941
3942         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
3943         to deal with mips missing of flags.
3944
3945 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
3946
3947         * exceptions-ppc.c: execute fault handlers.
3948
3949 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
3950
3951         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
3952
3953 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3954
3955         * mini.c: handle also floating point values in initialize_array.
3956
3957 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3958
3959         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
3960         array initialization and make it conditional on the intrins option.
3961
3962 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3963
3964         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
3965         relocations and put the patch info names close to the enum definition.
3966
3967 2007-01-15 Mark Mason <mason@broadcom.com>
3968
3969         * basic.cs, exceptions.cs: break up large tests to increase debugability.
3970
3971 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
3972
3973         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
3974
3975 2007-01-12  Raja R Harinath  <rharinath@novell.com>
3976
3977         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
3978
3979 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
3980
3981         * Makefile.am: distribute the mips sources.
3982
3983 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3984
3985         * mini-codegen.h: handle bug #80489 here, by excluding ecx
3986         directly.
3987
3988 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
3989
3990         * cpu-x86.md: back out for now as this triggers other regressions.
3991
3992 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3993
3994         * cpu-x86.md: force src1 and dest regpair for long shift instructions
3995         to eax:edx, so ecx can't get allocated to them (bug #80489).
3996
3997 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
3998
3999         * mini.c, mini-exceptions.c: enabled running fault handlers
4000         (bug #80469).
4001
4002 2007-01-03  Miguel de Icaza  <miguel@novell.com>
4003
4004         * driver.c: If nothing fail, do not use the string "failed",
4005         because it makes it very annoying to view test result logs on the
4006         web. 
4007
4008 2006-12-30  Miguel de Icaza  <miguel@novell.com>
4009
4010         * debug-debugger.c (mono_debugger_main): Rename "main" to
4011         "main_method" to prevent a warning.
4012
4013         Remove a warning for unused field.
4014
4015 2006-12-28  Martin Baulig  <martin@ximian.com>
4016
4017         * debug-debugger.c
4018         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
4019
4020 2006-12-22  Martin Baulig  <martin@ximian.com>
4021
4022         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
4023         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
4024         seperate `.mdb_debug_info' section, so we can access it from the
4025         debugger even if the binary is stripped.
4026
4027         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
4028         from the `.mdb_debug_info' here to prevent the linker from
4029         removing that section.
4030
4031         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
4032         mdb-debug-info64.s.
4033
4034 2006-12-19  Robert Jordan  <robertj@gmx.net>
4035
4036         * mini-x86: enable the code to return small structures in
4037         registers for FreeBSD as well. Fixes bug #80278.
4038         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
4039
4040 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4041
4042         * mini-x86.c: align the stack when calling the profiler
4043         function instrumenting the prolog (on OSX).
4044
4045 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4046
4047         * mini.c: emit a break opcode where Debugger.Break () is called.
4048
4049 2006-12-13  Miguel de Icaza  <miguel@novell.com>
4050
4051         * mini.c (mono_method_to_ir): Provide useful information on this
4052         assert, to prevent others from debugging like I did.
4053
4054 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4055
4056         * mini.c: enable code which was incorrectly commented
4057         (bug #80235).
4058
4059 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4060
4061         * mini-x86.c: enable on OSX, too, the code to return small
4062         structures in registers.
4063
4064 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4065
4066         * mini-x86.c: remove the use of the dynamic code manager here, too.
4067
4068 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4069
4070         * mini.h, debug-debugger.c, tramp-*.c: fixed 
4071         mono_debugger_create_notification_function() to use
4072         mono_global_codeman_reserve () instead of a dynamic code manager.
4073
4074 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4075
4076         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
4077         ves_array_element_address() jit icall and use a generated
4078         managed method instead (which is about 4 times faster for a rank 3
4079         array access).
4080
4081 2006-11-29  Mark Mason  <mason@broadcom.com>
4082
4083         * basic-calls.cs: additional tests for passing
4084         structures as function arguments.
4085
4086 2006-11-29  Mark Mason  <mason@broadcom.com>
4087
4088         * mini-mips.h: disable custom exception handling
4089         * mini-mips.c: throw/rethrow should use jalr to call
4090         exception stubs.  Fixed bug with passing structures
4091         by value. More support for tracing floating point
4092         functions.
4093
4094 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4095
4096         * mini.c: fixed typo in the soft-float ldind.r4 handling
4097         (bug #80086).
4098
4099 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4100
4101         * mini.c, mini.h, driver.c: added --runtime command line
4102         option to select a different runtime than the autodetected one.
4103         * jit.h: added API for embedders to initialize with a specific
4104         runtime version.
4105
4106 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
4107
4108         * mini.c: handle also boxing of r4 values (bug #80024).
4109
4110 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4111
4112         * mini-ppc.c: force indirect calls until we reserve
4113         enough address space for all the generated code.
4114
4115 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
4116
4117         * exceptions-arm.c: workaround bugs in the libc definition
4118         of struct ucontext.
4119
4120 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
4121
4122         * inssel.brg: fixes from me and Mark Mason.
4123
4124 2006-11-23  Dick Porter  <dick@ximian.com>
4125
4126         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
4127         semaphore display now we've fixed the initial value
4128
4129 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4130
4131         * inssel.brg: partially revert the last change to fix the build.
4132
4133 2006-11-21  Mark Mason  <mason@broadcom.com>
4134
4135         * inssel.brg: Add and use compare-and-branch macros to support
4136         architectures that do not have condition code registers (ie. MIPS).
4137         * *-mips.{c,brg,md}: Fix copyright statements
4138
4139 2006-11-20  Mark Mason  <mason@broadcom.com>
4140
4141         * Makefile.am: remove mini-codegen.c from list of MIPS sources
4142         * mini.c: Allow GET_CONTEXT to be specified by the arch port
4143         * mini.h: Added declaration for mono_print_ins()
4144         * mini-codegen.c: added ins_spec initializer for MIPS
4145         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
4146         vreg to be virtual and hreg to be non-virtual.
4147         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
4148         is not yet working/implemented correctly.
4149         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
4150         non-static, fixup calls to print_ins() from other parts in the file.
4151
4152 2006-11-20  Mark Mason  <mason@broadcom.com>
4153
4154         * basic-calls.cs: added tests for passing structures as arguments
4155         to calls.
4156
4157 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
4158
4159         * inssel-long32.brg: optimize signed division by power of two.
4160
4161 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4162
4163         * mini-arm.c: added support for interworking with thumb code
4164         (mono must be still be built using the ARM instruction encoding).
4165
4166 2006-11-19  Miguel de Icaza  <miguel@novell.com>
4167
4168         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
4169         verifier has different rules for it.   Fixes a few verifier issues
4170         in the test suite.
4171
4172         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
4173         at the end, so people know what happened.
4174
4175 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
4176
4177         * brach-opts.c: in optimize_exception_target() make sure we
4178         are in a catch clause (fixes bug #79871).
4179
4180 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4181
4182         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
4183         more soft-float support fixes.
4184
4185 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
4186
4187         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
4188         that are passed half on the stack and half in registers.
4189
4190 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
4191
4192         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
4193         more mips integration work from Mark E Mason 
4194         <mark.e.mason@broadcom.com>.
4195
4196 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4197
4198         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
4199         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
4200         tramp-mips.c: added sources for the mips port, not
4201         integrated in the build yet. Contributed by
4202         Mark E Mason <mark.e.mason@broadcom.com>.
4203
4204 2006-11-14  Neale Ferguson <neale@sinenomine.net>
4205
4206         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
4207
4208 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4209
4210         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
4211         put the soft-float rules in its own file since it seems to
4212         break s390 compilation.
4213
4214 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4215
4216         * mini-arm.c: fixed wrnings.
4217
4218 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
4219
4220         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
4221         inssel-arm.brg: ARM support for soft-float.
4222
4223 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4224
4225         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
4226         loads and stores of 32 bit fp values.
4227
4228 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
4229
4230         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
4231
4232         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
4233         works. Fixes #79852 and #79463.
4234
4235 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4236
4237         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
4238         more soft-float support WIP and fixes.
4239
4240 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
4241
4242         * mini-arm.c: some VFP updates.
4243
4244 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4245
4246         * mini-exceptions.c: 0 is a valid local var offset in some
4247         architectures, don't assert (bug #78508).
4248
4249 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
4250
4251         * exceptions-arm.c: fixed off by one error in stack walk code.
4252
4253 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
4254
4255         * mini.h, mini.c: more precise tracking of type load exceptions.
4256
4257 2006-11-03  Robert Jordan  <robertj@gmx.net>
4258
4259         * Makefile.am: [WIN32] Add monow.exe target.
4260         * driver.c: [WIN32] Don't detach the console when debugging.
4261         Fixes bug #79797.
4262         
4263 2006-10-30  Miguel de Icaza  <miguel@novell.com>
4264
4265         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
4266
4267 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
4268
4269         * aot-compiler.c (emit_method_info): Add a case missed earlier.
4270
4271         * driver.c (mini_regression): Fix --regression with AOT.
4272
4273         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
4274
4275 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
4276
4277         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
4278
4279         * mini-sparc.h: Don't use sigaction on sparc/linux.
4280
4281         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
4282
4283         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
4284
4285         * mini-exceptions.c: Add proper include files for getpid ().
4286
4287 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
4288
4289         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
4290         address instead of a MonoJitInfo* to avoid decoding the exception info for the
4291         method.
4292
4293         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
4294         name cache to reduce its size.
4295
4296         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
4297
4298 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
4299
4300         * mini-x86.c: Save/restore the current LMF structure more efficiently using
4301         the mono_lmf TLS variable.
4302
4303         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
4304         trampoline lmf frames.  
4305
4306         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
4307
4308 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
4309
4310         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
4311         the mono_lmf TLS variable.
4312
4313         * mini-exceptions.c: Access the LMF structure through accessors.
4314
4315         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
4316         variable instead of in jit_tls->lmf.
4317
4318         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
4319         
4320         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
4321         trampoline lmf frames.
4322
4323         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
4324
4325 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
4326
4327        * mini.c trace.c mini-x86.c: Revert these too.
4328         
4329        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
4330        signature change.
4331
4332 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
4333
4334         * genmdesc.c: removed now dead code.
4335
4336 2006-10-09  Robert Jordan <robertj@gmx.net>
4337
4338         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
4339
4340 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
4341
4342         * mini.h: do not leave gaps in the opcode values.
4343
4344 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
4345
4346         * jit-icalls.h: flag functions as internal here, too.
4347
4348 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
4349
4350         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
4351         functions with the internal attribute.
4352
4353 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
4354
4355         * aot-compiler.c: fclose the file descriptor in the profile read loop.
4356
4357 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
4358
4359         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
4360         for soft-float.
4361
4362 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
4363
4364         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
4365         tail calls as on other platforms.
4366
4367         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
4368
4369         * iltests.il: Add a few tailcall tests.
4370
4371 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4372
4373         * driver.c: fix loop for old compilers (bug #79521).
4374
4375 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
4376
4377         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
4378
4379         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
4380
4381         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
4382         metadata without any code.
4383
4384         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
4385         more precise debugging information using gdb.
4386
4387 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
4388
4389         * inssel-ia64.brg: Make the helper methods static.
4390
4391 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4392
4393         * inssel-x86.brg: make the helper methods static.
4394
4395 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
4396
4397         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
4398
4399 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4400
4401         * mini.c: updates for monoburg changes.
4402         * inssel.brg: make a few helper functions static as they should.
4403
4404 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
4405
4406         * Makefile.am: Move mini-codegen.c to common_sources.
4407
4408 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4409
4410         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
4411         instructions.
4412         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
4413         mini-ppc.h: port to use the common local register allocator.
4414
4415 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4416
4417         * mini.h: Remove the comment too then.
4418
4419 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
4420
4421         * mini.h: put back backend.data which is to be used shortly and
4422         doesn't increase the size of MonoInst. If any 64 bit arch aligned
4423         pointers on 4 byte boundaries it'd have much bigger issues running
4424         and you can ifdef it out anyway.
4425
4426 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4427
4428         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
4429         MonoInst size by 4 bytes on 64 bit machines.
4430
4431 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4432
4433         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
4434         replacement with more meaningful field names. Arch maintainers, please
4435         check the assigned names are good enough for your arch.
4436
4437 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4438
4439         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
4440         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
4441
4442 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
4443
4444         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
4445         relocations and memory requirements, put the optimization flags
4446         definitions in their own file.
4447
4448 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
4449
4450         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
4451
4452         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
4453
4454 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
4455
4456         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
4457
4458 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
4459
4460         * inssel.brg: use the correct function to get the size of an item
4461         in an array, given an element class.
4462         * aot-compiler.c: do not access class->class_size directly.
4463
4464 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4465
4466         * mini.h, debug-mini.c: added a debugging function to print
4467         info about local variables and arguments in a jitted method.
4468
4469 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
4470
4471         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4472
4473         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
4474
4475 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4476
4477         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
4478         inner and outer loops when passing vtypes.
4479
4480 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
4481
4482         * mini-ppc.c: take into account the cpu errata for cache flushing
4483         which caused some random errors (bug #79381).
4484
4485 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4486
4487         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
4488         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
4489
4490 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
4491
4492         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
4493         loaded.
4494
4495         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
4496         freebsd ports tree.
4497
4498         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
4499         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
4500
4501         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
4502         displacement.
4503
4504 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
4505
4506         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
4507
4508 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
4509
4510         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
4511         macro does not have to be changed during debugging.
4512
4513         * 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>.
4514
4515         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
4516
4517         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
4518         
4519         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
4520         MONO_ARCH_NO_EMULATE_MUL is defined.
4521
4522         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
4523
4524         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
4525
4526         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
4527
4528         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
4529         
4530 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
4531
4532         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
4533         stuff to mini-exceptions.c where it is used.
4534
4535         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
4536         setup code, the real one is in mini-exceptions.c.
4537
4538         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
4539         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
4540         some changes from the freebsd ports tree.
4541
4542         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
4543         constants.
4544         
4545         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
4546
4547 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
4548
4549         * mini.c: on Linux, check for /proc to be mounted
4550         (bug# 79351, novell bug#201204).
4551
4552 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
4553
4554         * mini.c: handle cases where pthread_attr_getstack() behaves
4555         incorrectly (bug #78096).
4556
4557 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
4558
4559         * mini-arm.c: support larger stack frames (bug #79272).
4560
4561 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
4562
4563         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
4564
4565         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
4566         tokens.
4567
4568         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
4569         mono_class_from_name () to find a class from its name.
4570
4571         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
4572
4573 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
4574
4575         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
4576
4577 2006-09-05  KornĂ©l Pál  <kornelpal@gmail.com>
4578
4579         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
4580
4581 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
4582
4583         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
4584         callinfo->trampoline.
4585
4586         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
4587         fixes #79271.
4588         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
4589         future.
4590
4591 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
4592
4593         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
4594
4595 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
4596
4597         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
4598         stats.method_trampolines, it is already done by the generic trampoline code.
4599
4600         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
4601         
4602 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
4603
4604         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
4605
4606         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
4607
4608         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
4609
4610         * mini.c (print_jit_stats): Print mscorlib mempool size too.
4611         
4612         * mini.c (print_jit_stats): Print new stats.
4613
4614         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4615
4616 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
4617
4618         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
4619         Address on two dimensional arrays. Fixes #78729.
4620
4621         * mini.h (MonoCompile): Add a 'skip_visibility' field.
4622
4623         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
4624         a method.
4625
4626         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
4627
4628         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
4629         #79130.
4630         
4631         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
4632         a race condition.
4633         (mini_get_ldelema_ins): Ditto.
4634
4635 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
4636
4637         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
4638         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
4639         Fixes #79213.
4640
4641 2006-08-29 Neale Ferguson <neale@sinenomine.net>
4642
4643         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
4644         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
4645
4646         * exceptions-s390x.c: Cosmetic change.
4647
4648         * tramp-s390.c: Fix warning.
4649
4650         * cpu-s390.md: Correct length of mul_imm.
4651
4652 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
4653
4654         * aot-compiler.c: added binary writer with ELF backend
4655         implementation (only on Linux/x86 for now).
4656
4657 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4658
4659         * Makefile.am: Don't run net 2.0 AOT tests.
4660
4661         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
4662         (mono_compile_assembly): Skip net 2.0 assemblies as well.
4663
4664         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
4665
4666 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
4667
4668         * aot-compiler.c: simplified and refactored the asm-writing code
4669         to allow different backends.
4670
4671 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4672
4673         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4674
4675         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
4676         little. Share patches of type TYPE_FROM_HANDLE as well.
4677
4678         * mini.c (mono_patch_info_equal): New helper function.
4679         (mono_patch_info_hash): Ditto.
4680
4681         * aot-compiler.c (emit_method_code): Fix s390 build.
4682
4683         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
4684         is not handled because it is stored as a flag and not as a type ctor. Fixes
4685         #79016.
4686
4687 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
4688
4689         * aot-compiler.c: Fix computation of GOT slot statistics.
4690         
4691         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
4692         Also remove support for not PIC AOT.
4693
4694         * mini.h: Bump AOT file format version.
4695
4696         * objects.cs: Add a test for #78990.
4697
4698         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
4699         (peter.dettman@iinet.net.au). Fixes #79087.
4700
4701         * basic-long.cs: Add a test for the above.
4702
4703 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
4704
4705         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
4706         
4707         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
4708         code somewhat.
4709
4710 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
4711
4712         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
4713         exceptions.
4714
4715 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
4716
4717         * mini.c: Don't verify COM proxy invoke calls
4718         
4719
4720 2006-08-10  Dick Porter  <dick@ximian.com>
4721
4722         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
4723         which process is holding semaphores locked.
4724
4725 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
4726
4727         * mini-ia64.c mini-amd64.c: Fix #79027.
4728
4729         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
4730
4731         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
4732
4733         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
4734         implicit arguments in a vararg call. Fixes #79027.
4735
4736 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
4737
4738         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
4739         (mono_get_array_new_va_signature): Ditto.
4740
4741 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
4742
4743         * aot-runtime.c: Call init_plt lazily.
4744
4745         * inssel-long.brg: Fix unsigned long->int conversion.
4746
4747         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
4748
4749         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
4750         that most data is now in the .rss/.data section.
4751
4752 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
4753
4754         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
4755
4756         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
4757
4758         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
4759
4760         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
4761
4762         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
4763         virtual call. Fixes #79010.
4764
4765         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
4766         and use the result as the this argument in the real call.
4767
4768         * generics.2.cs: Add a new test for #79010.
4769         
4770 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
4771
4772         * mini-x86.c: Fix a warning.
4773
4774         * aot-compiler.c: Add a bunch of statistics.
4775
4776         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
4777
4778 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
4779
4780         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
4781
4782 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
4783
4784         * 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>.
4785
4786 2006-07-13  Miguel de Icaza  <miguel@novell.com>
4787
4788         * mini.c (mono_method_to_ir): Obtain the original method in the
4789         CIL stream and use this to perform validation.
4790
4791         Fixed: #78816
4792
4793 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
4794
4795         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
4796         (mono_arch_call_opcode): Ditto.
4797
4798         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
4799         #78826.
4800
4801         * mini.c (mono_patch_info_dup_mp): New helper function.
4802         
4803         * aot-compiler.c (compile_method): Fix some of the memory allocated during
4804         compilation. Fixes #78827.
4805
4806 2006-07-18  KornĂ©l Pál  <kornelpal@gmail.com>
4807
4808         * declsec.c: Use original security informations for
4809           MONO_WRAPPER_MANAGED_TO_MANAGED.
4810
4811 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
4812
4813         * mini.c: Allow Com Interop methods/classes and
4814         don't verify COM wrapper calls
4815         
4816
4817 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
4818
4819         * inssel-long32.brg: Fix long->i4 checked conversion.
4820
4821         * exceptions.cs: Add a test for the above.
4822
4823 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
4824
4825         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
4826
4827         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
4828         leaks.
4829
4830         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
4831         #78775.
4832
4833 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
4834
4835         * mini.c: Fix solaris/x86 exception handling.
4836
4837         * Makefile.am: Get rid of $(ICU_LIBS).
4838
4839 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
4840
4841         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
4842         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
4843         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
4844
4845         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
4846
4847         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
4848         this function causes a SIGSEGV.
4849
4850 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
4851
4852         * mini.c: Remove unused solaris/x86 includes.
4853
4854 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
4855
4856         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
4857
4858 2006-06-20  Jb Evain  <jbevain@gmail.com>
4859
4860         * cpu-g4.md: fix max length of start_handler instruction.
4861
4862 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
4863         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
4864
4865 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
4866         * ssa.c: Fixed bug 78653 for SSA based deadce.
4867         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
4868         MonoInst.flags, used in SSA based deadce.
4869         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
4870         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
4871
4872 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
4873
4874         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
4875         it can end up using non executable memory on ppc64 systems
4876         running ppc32 userspace (fix from Johannes Berg).
4877
4878 2006-06-14  Dick Porter  <dick@ximian.com>
4879
4880         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
4881         4.1.1
4882
4883 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
4884         * mini.c: Made so that inline is locally disabled if it would
4885         trigger a .cctor, because too many apps depend on this behavior
4886         (which seems to be also the one of the MS CLR).
4887
4888 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
4889
4890         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
4891         No idea why this worked before.
4892
4893         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
4894         which branch to outer exception clauses since they could skip the
4895         inner finally clauses. Fixes #78633.
4896
4897         * exceptions.cs: Add a test for the above.
4898
4899         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
4900         Fixes #78629.
4901
4902         * iltests.il: Add a test for the above.
4903
4904 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
4905
4906         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
4907         after the end of a try bblock, to prevent asserts in mini_method_compile ().
4908
4909         * iltests.il: Add a test for the above.
4910
4911 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
4912
4913         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
4914         
4915         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
4916         methods as instrinsics.
4917
4918 2006-06-09  Wade Berrier <wberrier@novell.com>
4919
4920         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
4921         (simple-cee-ops.h ssapre-mini-ops.h)
4922
4923 2006-06-09  Neale Ferguson <neale@sinenomine.net>
4924
4925         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
4926         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
4927         instruction).
4928         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
4929         * cpu-s390x.md: Fix max. length values for a couple of instructions.
4930
4931 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
4932
4933         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
4934
4935 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
4936
4937         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
4938         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
4939         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
4940         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
4941         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
4942         of opcodes, so that bug 78549 should not happen again.
4943         * ssapre.c: Updated to use the renamed files.
4944
4945 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
4946
4947         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
4948         in OP_ATOMIC_EXCHANGE_I4.
4949
4950 2006-06-07  Wade Berrier <wberrier@novell.com>
4951
4952         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
4953         in mono_debugger_create_notification_function)
4954
4955 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
4956
4957         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
4958         
4959         * mini.c (type_from_stack_type): Disable some changes which do not
4960         seem to work.
4961
4962         * driver.c: Reenable opts.
4963
4964         * mini.h (MonoStackSlot): New structure to keep track of the verification state
4965         of the evaluation stack.
4966         
4967         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
4968         evaluation stack trace at entry to the bblock.
4969
4970         * mini.c (merge_stacks): New function to perform verification of stack merges.
4971         Turned off by default.
4972
4973         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
4974         STACK_MP.
4975         
4976 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
4977
4978         * local-propagation.c: Fixed bug 78549.
4979
4980 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
4981
4982         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
4983
4984 2006-06-02  Miguel de Icaza  <miguel@novell.com>
4985
4986         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
4987         tramp-arm.c, tramp-ia64.c
4988         (mono_debugger_create_notification_function): Update signature to
4989         new signature and use new protocol for creating the notification
4990         function.  
4991
4992         Should fix the build.
4993
4994 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
4995
4996         * exceptions-ppc.c (mono_jit_walk_stack)
4997         (ves_icall_get_frame_info): Fix the build
4998
4999 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
5000
5001         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
5002
5003 2006-05-31  Raja R Harinath  <rharinath@novell.com>
5004
5005         * il2tests.2.il: New file for generics CIL tests.  Add test for
5006         #78019.
5007         * Makefile.am: Update.
5008
5009         Fix #78019
5010         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
5011         to nullable types.
5012
5013 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
5014
5015         * aliasing.c: Fixed bug 78311.
5016
5017 2006-05-29  Martin Baulig  <martin@ximian.com>
5018
5019         * mini-exceptions.c (mono_find_jit_info): When computing the
5020         native offset, check whether we're actually inside the method's
5021         code; call mono_debug_print_stack_frame() to format the frame.
5022         (ves_icall_System_Exception_get_trace): Call
5023         mono_debug_print_stack_frame() to format the stack frame.
5024         (ves_icall_get_trace): Update to the new debugging API.
5025         (mono_jit_walk_stack_from_ctx): Likewise.
5026         (ves_icall_get_frame_info): Likewise.
5027
5028         * mini.c (get_method_from_ip): Use the new debugging API.
5029         (mono_print_method_from_ip): Likewise.
5030
5031         * exceptions-ppc.c
5032         (mono_jit_walk_stack): Use the new debugging API.
5033         (ves_icall_get_frame_info): Likewise.   
5034
5035 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
5036
5037         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
5038
5039 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
5040
5041         * mini.c: Added "limitator" to inline for debugging.
5042
5043 2006-05-24  Martin Baulig  <martin@ximian.com>
5044
5045         * debug-debugger.c (mono_debugger_init): Create a private,
5046         malloc()-based code manager for the notification function and
5047         intentionally leak it on exit.  This fixes the crash-on-exit race
5048         condition.
5049
5050         * tramp-amd64.c
5051         (mono_debugger_create_notification_function): Added
5052         `MonoCodeManager *' argument.
5053
5054         * tramp-x86.c
5055         (mono_debugger_create_notification_function): Added
5056         `MonoCodeManager *' argument.
5057
5058 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
5059
5060         * aliasing.c: Fixed 64 bit issue.
5061         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5062         default since all known bugs are fixed (one more time!).
5063
5064 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
5065
5066         * mini.c: write barrier support.
5067
5068 2006-05-23  Martin Baulig  <martin@ximian.com>
5069
5070         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
5071         check at the top of the file.
5072
5073 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
5074
5075         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
5076         reverting changes without reason and without changelog entries.
5077
5078 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
5079
5080         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
5081         to a few opcodes. Fixes #78439.
5082
5083         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
5084         consistency with other archs.
5085
5086         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
5087
5088 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5089
5090         * debug-debugger.c: fix the build.
5091
5092 2006-05-17  Martin Baulig  <martin@ximian.com>
5093
5094         * debug-debugger.c
5095         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
5096         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
5097         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
5098         (debugger_attach): Call GC_mono_debugger_add_all_threads().
5099
5100 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
5101
5102         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
5103
5104 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
5105
5106         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
5107         MONO_TYPE_GENERICINST.
5108         
5109         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
5110         MONO_TYPE_GENERICINST.
5111
5112 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
5113
5114         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
5115         #78325.
5116
5117 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
5118
5119         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
5120         mempool.
5121         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
5122
5123 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
5124
5125         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
5126         mono_trace_cleanup ().
5127
5128         * iltests.il: Fix problem with the newly added test.
5129
5130         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
5131         due to register constraints, free up the previous hreg. Fixes #78314.
5132
5133         * iltests.il: Add new test for #78314.  
5134
5135         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
5136         Interlocked.Add. Fixes #78312.
5137
5138         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
5139         
5140 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
5141
5142         * inssel.brg (mini_emit_virtual_call): Fix a warning.
5143
5144 2006-05-05  Martin Baulig  <martin@ximian.com>
5145
5146         * debug-mini.c (mono_debug_open_block): New method.
5147
5148         * mini-amd64.c
5149         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5150         the beginning of each basic block.
5151
5152         * mini-x86.c
5153         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5154         the beginning of each basic block.
5155
5156 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5157
5158         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5159         default until I understand why they break the build on amd64.
5160
5161 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
5162
5163         * mini.c (mini_cleanup): Call mono_cleanup ().
5164
5165         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
5166         errors.
5167
5168 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5169
5170         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
5171         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5172         default since all known bugs are fixed, and I cannot reproduce bug
5173         77944... I'm asking Matt Hargett to test again after this commit.
5174
5175 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
5176
5177         * mini-codegen.c: Fixed typo that thrashed inline.
5178
5179 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
5180
5181         * dominators.c (compute_dominators): Avoid using a worklist since
5182         it is not correct in some cases. Instead, iterate over all bblocks as
5183         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
5184
5185 2006-04-28  Miguel de Icaza  <miguel@novell.com>
5186
5187         * mini.c (mono_jit_compile_method_inner): Use
5188         mono_prepare_exception_from_error that resets the value
5189         internally.
5190
5191 2006-04-27  Miguel de Icaza  <miguel@novell.com>
5192
5193         * mini.c: Move the mini_loader_error_to_exception to metadata. 
5194         
5195 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5196
5197         * aliasing.c: Fixed bug 78210.
5198
5199 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5200
5201         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5202         default until all their problems (or the ones they trigger) are fixed.
5203
5204 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
5205
5206         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
5207         
5208         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
5209         as loaded only after resolving patches since that could invoke the same method.
5210
5211         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
5212
5213         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
5214         functions.
5215
5216         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
5217         AOT loader.
5218
5219         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
5220         stack.
5221
5222         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
5223         made from AOT code through the PLT table.
5224
5225         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
5226         holding the plt offset when a call is made to the aot plt trampoline.
5227         
5228 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5229
5230         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
5231         amd64 AOT support.
5232
5233         * Makefile.am (common_sources): Fix build breakage.
5234
5235         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
5236         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
5237         intra-assembly calls if possible.
5238         
5239         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
5240
5241         * mini-trampolines.c: Handle PLT entries.
5242
5243         * mini.c: Avoid creating a GOT var for calls.
5244
5245         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
5246         from mscorlib code.
5247
5248         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
5249         from mscorlib code.
5250
5251         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
5252         AOT code.       
5253
5254         * mini.h: Bump AOT file format version.
5255         
5256         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
5257         covers more cases.
5258
5259 2006-04-25  Martin Baulig  <martin@ximian.com>
5260
5261         * driver.c: Disable copyprop, consprop and inline when running
5262         inside the debugger.
5263
5264 2006-04-25  Martin Baulig  <martin@ximian.com>
5265
5266         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
5267         with `get_current_thread' and added `detach'.
5268         (MonoDebuggerMetadataInfo): Added `thread_size',
5269         `thread_tid_offset', `thread_stack_ptr_offset' and
5270         `thread_end_stack_offset'.
5271
5272 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5273
5274         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
5275         aot-runtime.c.
5276
5277         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
5278         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
5279
5280         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
5281
5282         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
5283
5284         * aot.c: Add support for ADJUSTED_IID.  
5285
5286 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
5287
5288         * aot.c (emit_method_order): Don't align method_order_end.
5289
5290         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
5291         the interface ID changes.
5292
5293 2006-04-21  Dick Porter  <dick@ximian.com>
5294
5295         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
5296         cleaning up a thread.  Fixes the new part of bug 77470.
5297
5298 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
5299
5300         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
5301         to managed wrapper.
5302                      
5303 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
5304
5305         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
5306         
5307         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
5308         SIGSEGV. Fixes #78072.
5309
5310         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
5311         unregister our SIGABRT handler.
5312
5313 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
5314
5315         * mini.c: Disabled inline where it can alter the call stack in a
5316         way visible from managed code.
5317         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
5318         default.
5319
5320 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
5321
5322         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
5323         on other platforms. Fixes #78089.
5324
5325 2006-04-13  Martin Baulig  <martin@ximian.com>
5326
5327         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
5328         determine whether we're inside the debugger.
5329
5330         * debug-debugger.h
5331         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
5332
5333 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
5334
5335         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
5336         handler clauses. Fixes #78024.
5337
5338         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
5339         in the CALL_MEMBASE opcodes. Fixes #78088.
5340         (mono_arch_get_vcall_slot_addr): Ditto.
5341
5342 2006-04-10  Martin Baulig  <martin@ximian.com>
5343
5344         * debug-debugger.c: The thread handling code has now been moved
5345         into ../metadata/threads.c.
5346
5347 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5348
5349         * driver.c (mono_main): Fix --with-gc=none build.
5350
5351         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
5352         (mono_spillvar_offset_float): Ditto.
5353         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
5354         hreg, not when its !global, since on ia64, there is a third category: stacked
5355         registers.      
5356
5357 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
5358
5359         * mini.c: set MonoInst->klass for load field address and a few other
5360         places.
5361
5362 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5363
5364         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
5365
5366 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
5367
5368         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
5369         the branch opt changes.
5370
5371 2006-04-06  Dick Porter  <dick@ximian.com>
5372
5373         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
5374         
5375         * wapihandles.c (mini_wapi_seminfo): 
5376         * driver.c (mono_main): Add semaphore info option
5377
5378 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
5379
5380         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
5381         branch optimization changes. Fixes #78009.
5382
5383 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5384
5385         * mini.c: ignore accessibility of methods in managed->native wrappers.
5386
5387 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
5388
5389         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
5390         
5391         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
5392
5393 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
5394
5395         * mini.c: Modify the branch optimizations to preserve the invariant that
5396         the entries inside the in_bb and out_bb arrays are unique.
5397         (mono_unlink_bblock): Avoid creation of new arrays.
5398
5399 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
5400
5401         * mini.c (mono_unlink_bblock): Fix regression caused by previous
5402         change (#77992).
5403
5404 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
5405
5406         * mini.c (optimize_branches): Remove the "optimizations" in
5407         the cbranch1/cbranch2 -> branch cases which were causing several
5408         problems in the past. Fixes #77986.
5409
5410 2006-03-31  Chris Toshok  <toshok@ximian.com>
5411
5412         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
5413         default optimizations :(
5414
5415 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
5416
5417         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
5418         branch.
5419
5420 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
5421
5422         * local-propagation.c: Added comments to structs and removed
5423         "Mono" prefixes from local tree mover types.
5424
5425 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
5426
5427         * Makefile.am (arch_sources): Define this for each architecture so 
5428         libmono_la_SOURCES is defined in one place.
5429
5430 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
5431
5432         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
5433         from handles/.
5434
5435 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
5436
5437         * driver.c: print the GC name supplied by configure.
5438
5439 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
5440
5441         * local-propagation.c: Added tree mover, and moved here all the
5442         local propagation code from mini.c
5443         * mini.c: Added support for treeprop, and moved all the local
5444         propagation code to local-propagation.c
5445         * mini.h: Added support for treeprop
5446         * driver.c: Added support for treeprop, enabled consprop, copyprop,
5447         treeprop, inline and deadce by default
5448         * Makefile.am: Added local-propagation.c
5449
5450 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
5451
5452         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
5453
5454 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
5455
5456         * debug-debugger.c: make it compile without the Boehm GC.
5457
5458 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
5459
5460         * mini.c: fixed issue with mismatch when an icall is registered
5461         with multiple names but same address.
5462
5463 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5464
5465         * declsec.c, mini-exceptions.c: use write barrier to set reference
5466         fields of managed objects.
5467
5468 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5469
5470         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
5471         (can_access_internals): Fix a warning.
5472
5473         * mini.c (print_method_from_ip): Rename this to 
5474         mono_print_method_from_ip so it gets exported.
5475
5476         * trace.c: Deal with strings inside StringBuilder's containing garbage
5477         and fix memory leaks. Fixes #77848.
5478
5479 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5480
5481         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
5482         fixes #77787.
5483
5484 2006-03-16 Neale Ferguson <neale@sinenomine.net>
5485         
5486         * mini-s390.c: Remove OP_X86_TEST_NULL.
5487
5488 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5489
5490         * mini.c: use the correct GetHashCode() for the moving collector.
5491
5492 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
5493
5494         * liveness.c: Regalloc spill cost tuning.
5495
5496 2006-03-15 Neale Ferguson <neale@sinenomine.net>
5497         
5498         * mini-s390x.h: Correct S390_LONG macro.
5499
5500         * mini-s390x.c: Cleanup unused code.
5501
5502 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
5503
5504         * jit-icalls.h: New file.
5505
5506         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
5507         icalls and include that instead of including jit-icalls.c.
5508
5509         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
5510         OP_X86 opcodes.
5511
5512 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
5513
5514         * mini.c: when checking for member accessibility, also check for
5515         friend assemblies and for explicit interface implementations.
5516
5517 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
5518
5519         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
5520
5521         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
5522
5523         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5524         common cases are done first.    
5525
5526         * mini-ops.h: Only define platform specific opcodes on the given platform.
5527
5528         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
5529         branch.
5530         
5531 2006-03-14  Martin Baulig  <martin@ximian.com>
5532
5533         Revert Paolo's change from r57348:
5534
5535         * mini.h: don't use gboolean for bitfields.
5536         * mini.c: verifier changes for fields and methods accessibility.
5537
5538 2006-03-13  Neale Ferguson <neale@sinenomine.net>
5539
5540         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
5541
5542         * mini-s390x.c: Fix conv_r_un.
5543
5544         * cpu-s390, cpu-s390x.md: Fix lengths.
5545
5546 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
5547
5548         * mini.c: nested types have access to all the nesting
5549         levels, not just the enclosing types.
5550
5551 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5552
5553         * mini.c: added a few more verification checks.
5554
5555 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
5556
5557         * liveness.c: Merge optimizations from the linear-il branch.
5558
5559 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5560
5561         * mini-ia64.c (emit_call): Add a comment.
5562
5563         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
5564
5565         * tramp-ia64.c: Fix some warnings.
5566
5567 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
5568
5569         * mini.h: don't use gboolean for bitfields.
5570         * mini.c: verifier changes for fields and methods accessibility.
5571
5572 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5573
5574         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
5575         lazy icall wrapper changes.
5576
5577         * dominators.c: Replace all the dominator algorithms with faster
5578         ones from the linear-il branch.
5579
5580         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
5581         the mempool.
5582
5583         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5584         common cases are done first.
5585
5586         * mini-amd64.c: Fix some warnings.
5587
5588         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
5589         from the mempool.
5590
5591         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
5592         added code.
5593
5594         * mini.h: Add a missing prototype.
5595
5596 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
5597
5598         * mini.c: Compile icall wrappers lazily.
5599
5600         * mini-codegen.c: Use printf instead of g_print since its much faster.
5601
5602         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
5603         function.
5604
5605         * mini.c (optimize_branches): Cache the negative result from 
5606         remove_block_if_useless ().
5607
5608         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
5609         Also fix some bblock linking issues.
5610
5611         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
5612         assembly files.
5613
5614         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
5615
5616         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
5617         accessed fields first, for better cache behavior.
5618         
5619 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
5620
5621         * mini.c: speedup IList<T> array accesses.
5622
5623 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
5624
5625         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
5626         inline_costs counter. Fixes #77190.
5627
5628 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
5629
5630         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
5631         trace messages. Fixes #77706.
5632
5633 2006-03-04  Martin Baulig  <martin@ximian.com>
5634
5635         * tramp-amd64.c, tramp-x86.c
5636         (mono_debugger_create_notification_function): Use
5637         mono_global_codeman_reserve() to allocate a buffer at runtime and
5638         return it.
5639
5640         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
5641
5642         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
5643         notification function at runtime and then call `initialize' in the
5644         `MONO_DEBUGGER__debugger_info' vtable.
5645
5646 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
5647
5648         * iltests.il: Fix a visibility problem.
5649
5650 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5651
5652         * driver.c, mini.c: add hooks for the counters API.
5653
5654 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5655
5656         * driver.c: show disabled options.
5657
5658 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
5659
5660         * linear-scan.c: always use cost-driven selection.
5661
5662 2006-02-28  Raja R Harinath  <rharinath@novell.com>
5663
5664         * jit-icalls.c (helper_compile_generic_method): Revert change from
5665         2006-02-24.
5666
5667 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
5668
5669         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
5670
5671 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
5672
5673         * inssel.brg: style fixes, mostly to force the updated monoburg
5674         to run for people using svn.
5675
5676 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
5677
5678         * mini.c: match monoburg changes.
5679
5680 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5681
5682         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
5683         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
5684         declaration in the header file.
5685
5686 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
5687
5688         * helpers.c: reduce relocations and mem usage.
5689
5690 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
5691
5692         * mini.h, mini-codegen.c: disable logging features if
5693         requested by configure.
5694
5695 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
5696
5697         * mini.c: tiny verifier changes.
5698
5699 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5700
5701         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
5702         cpu-pentium.md: stack alignment changes for osx/x86,
5703         partially from Geoff Norton <gnorton@customerdna.com>.
5704
5705 2006-02-24  Raja R Harinath  <harinath@gmail.com>
5706
5707         * jit-icalls.c (helper_compile_generic_method): Update to changes
5708         in metadata/class.c.
5709
5710 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
5711         
5712         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
5713         
5714         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
5715         interface calls with large offsets.
5716
5717 2006-02-23  Raja R Harinath  <rharinath@novell.com>
5718
5719         * jit-icalls.c (helper_compile_generic_method): Document the
5720         special-case we depend on so that we can inflate the method twice
5721         with the same context with no bad side-effects.
5722
5723 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
5724
5725         * mini-x86.c, mini-amd64.c: fix for case when xen support
5726         is disabled.
5727
5728 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
5729
5730         * mini-x86.c, mini-amd64.c: generate code to access tls items
5731         in a faster way for Xen systems.
5732
5733 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5734
5735         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
5736         updates and compilation fixes for the OSX/x86 port, mostly from
5737         Geoff Norton <gnorton@customerdna.com>.
5738
5739 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
5740
5741         * inssel.brg: faster interface call implementation
5742         to sync with the interface_offsets MonoVTable changes.
5743
5744 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5745
5746         * mini.c: more verification checks.
5747
5748 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
5749
5750         * mini.c: added a few more verification checks.
5751
5752 2006-02-17      Neale Ferguson <neale@sinenomine.net>
5753
5754         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
5755         facility on the processor and use it if available.
5756
5757 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5758
5759         * driver.c, aot.c, mini.c: throw exception if the IL code is
5760         invalid or unverifiable.
5761
5762 2006-02-17  Raja R Harinath  <rharinath@novell.com>
5763
5764         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
5765         m.StructField.
5766
5767 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
5768
5769         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
5770
5771 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5772
5773         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
5774         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
5775         handling of instantiated generic valuetypes.
5776
5777 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
5778
5779         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
5780         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
5781         instead.
5782
5783         * generics.2.cs: Revert the nullable reftypes tests.
5784
5785 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
5786
5787         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
5788         using __builtin_frame_address (1) as it doesn't work in the presence
5789         of optimizations. Hopefully fixes #77273.
5790
5791         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
5792         -> generics.cs change as it doesn't work with some automake versions.
5793
5794 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5795
5796         * mini.c: handle systems that sue a different way to
5797         retrieve the stack address of the current thread.
5798
5799 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
5800
5801         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
5802         it specially in the makefile.
5803
5804         * generics.2.cs: Add tests for nullable reference types.
5805
5806 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5807
5808         * mini.c: always handle the case when mono_jit_init()
5809         is called in a thread different from the main thread,
5810         confusing libgc (bug #77309).
5811
5812 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
5813
5814         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
5815
5816 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5817
5818         * mini.c: change optimize_branches () to use a single loop
5819         and introduce a new optimization to simplify some range checks.
5820
5821 2006-02-03  Martin Baulig  <martin@ximian.com>
5822
5823         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
5824         and merged with debugger_thread_manager_add_thread().
5825         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
5826         inform the debugger about the main thread.
5827
5828 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
5829
5830         * basic.cs: Add test for div.un/rem.un constant folding.
5831
5832 2006-02-03  Neale Ferguson <neale@sinenomine.net>
5833
5834         * cpu-s390x.md: correct int_xor_imm length
5835
5836 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
5837
5838         * generics.2.cs: New test for #77442.
5839
5840         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
5841         #77442.
5842
5843 2006-02-02  Martin Baulig  <martin@ximian.com>
5844
5845         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
5846         <mono/metadata/mono-debug-debugger.h>   
5847
5848         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
5849
5850 2006-02-02  Martin Baulig  <martin@ximian.com>
5851
5852         * debug-debugger.h: New header file for debug-debugger.c.
5853
5854         * debug-debugger.c: Big API cleanup; don't run the managed Main()
5855         function is a separate thread anymore; add support for attaching.
5856
5857 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
5858
5859         * tramp-x86.c: Fix a warning.
5860
5861 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
5862
5863         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
5864         on very large methods.
5865
5866         * aot.c (load_patch_info): Fix a warning.
5867
5868 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
5869
5870         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
5871         mini-ops.h: alu membase optimizations.
5872
5873 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
5874
5875         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
5876         to speedup StringBuilder.
5877
5878 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
5879
5880         * dominators.c (mono_compute_natural_loops): Fix detection of
5881         loop body start blocks.
5882
5883         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
5884
5885 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
5886
5887         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
5888         #75145.
5889
5890 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
5891
5892         * aliasing.c: Fixed aliasing issue on 64 bit archs.
5893
5894 2006-01-25  Martin Baulig  <martin@ximian.com>
5895
5896         * debug-debugger.c: Moved the `MonoDebuggerManager' and
5897         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
5898         started to cleanup this file a little bit.
5899
5900 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
5901
5902         * mini.c: optimize a codepath frequently happening in generics code.
5903
5904 2006-01-23  Martin Baulig  <martin@ximian.com>
5905
5906         * Makefile.am: Only compile debug-debugger.c on supported platforms.
5907
5908         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
5909         functions directly.
5910
5911         * driver.c: debug-debugger.c is only available if
5912         `MONO_DEBUGGER_SUPPORTED' is defined.   
5913
5914 2006-01-23  Martin Baulig  <martin@ximian.com>
5915
5916         * debug-debugger.c: Only enable this on platforms where the Mono
5917         Debugger is working (x86 and x86_64).
5918
5919 2006-01-21  Martin Baulig  <martin@ximian.com>
5920
5921         The Mono Debugger is now using the normal `mono' instead of the
5922         `mono-debugger-mini-wrapper' when executing managed code.
5923
5924         * debug-debugger.c: New file; previously known as
5925         debugger/wrapper/wrapper.c.
5926
5927         * debug-mini.c (mono_init_debugger): Removed.
5928
5929         * driver.c (mono_main): Added new `--inside-mdb' command line
5930         argument which is used when running inside the debugger.
5931
5932 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
5933
5934         * liveness.c (mono_analyze_liveness): Remove some unused data
5935         structures.
5936
5937 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
5938
5939         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
5940
5941 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
5942
5943         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
5944         depends on implementation details of monobitset.
5945
5946         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
5947         Fixes #77271.
5948
5949 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
5950
5951         * liveness.c: Update after monobitset changes.
5952
5953 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
5954
5955         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
5956
5957 2006-01-11 Neale Ferguson <neale@sinenomine.net>
5958
5959         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
5960
5961         * mini-s390x.c: Remove warning messages.
5962
5963 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
5964
5965         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
5966
5967 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
5968
5969         * generics.2.cs: Add ldelem/stelem_any test.
5970
5971 2006-01-10 Neale Ferguson <neale@sinenomine.net>
5972
5973         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
5974
5975 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
5976
5977         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
5978         
5979 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
5980
5981         * generics.2.cs: Reenable vtype tests.
5982
5983         * inssel-x86.brg: Remove an icorrect valuetype rule.
5984
5985 2006-01-06 Neale Ferguson <neale@sinenomine.net>
5986
5987         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
5988         initial support for OP_ABS.
5989
5990 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5991
5992         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
5993
5994 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5995
5996         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
5997         conversion and implement LADD/LSUB.
5998
5999         * exceptions-s390.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: Fix r8 to unsigned int conversion.
6005
6006         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
6007         architectures.
6008
6009 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6010
6011         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
6012         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
6013         (stack walk problem).
6014
6015 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
6016
6017         * aot.c (mono_aot_load_method): Fix a warning.
6018
6019 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6020
6021         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
6022
6023 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6024
6025         * iltests.il: Add test for #77148.
6026
6027         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
6028         #77148.
6029
6030 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6031
6032         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
6033
6034 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6035
6036         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
6037         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
6038
6039         * basic-long.cs: Add lconv-to-r4/r8 tests.
6040
6041 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6042
6043         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
6044
6045         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
6046         here as on other archs.
6047
6048 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6049
6050         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
6051
6052 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6053
6054         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
6055         
6056         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
6057
6058         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
6059         instrument_prolog; Add memory_barrier instruction.
6060
6061 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
6062
6063         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
6064
6065 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
6066
6067         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
6068
6069         * aliasing.c inssel.brg: Fix warnings.
6070
6071         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
6072         could skip initialization of some parts of memory.
6073
6074         * mini.c mini-ia64.c: Fix warnings.
6075
6076         * inssel-sparc.brg: Add an implementation of lneg which actually works.
6077
6078 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
6079
6080         * aliasing.c (mono_build_aliasing_information): Add a workaround for
6081         a crash seen on sparc.
6082
6083         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
6084         
6085         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
6086
6087 2005-12-21 Neale Ferguson <neale@sinenomine.net>
6088
6089         * mini-ops.h: Add s390_backchain instruction
6090
6091         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
6092
6093         * cpu-s390.md: Add s390_backchain instruction
6094
6095         * mini-s390.c: Significant ABI changes
6096
6097         * mini-s390.h: Cater for zero length structures
6098
6099 2005-12-20 Neale Ferguson <neale@sinenomine.net>
6100
6101         * mini-s390.c: ABI fixes
6102
6103         * inssel-s390.brg: Remove debug statements
6104
6105         * cpu-s390.md: Fix length of ATOMIC_xx operations
6106
6107 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
6108
6109         * basic-float.cs: Add float<->long conversion tests.
6110
6111 2005-12-16 Neale Ferguson <neale@sinenomine.net>
6112
6113         * mini-s390.c: Fix LOCALLOC processing.
6114
6115         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
6116
6117 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
6118
6119         * iltests.il: Add tests for some opcodes not covered by the other
6120         tests.
6121
6122 2005-12-15 Neale Ferguson <neale@sinenomine.net>
6123
6124         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
6125         register loading for Tail processing; Correct trace output.
6126
6127         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
6128
6129         * cpu-s390.md: Correct size of jmp instruction. 
6130
6131 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6132
6133         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
6134
6135 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6136
6137         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
6138           Bring s390 up to current level.
6139
6140 2005-12-12  Zltan Varga  <vargaz@gmail.com>
6141
6142         * generics.2.cs: Disable the newly added tests as they do not work yet.
6143         
6144         * generics.2.cs: Add valuetype tests.
6145
6146 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
6147
6148         * basic-long.cs: Add i4->u8 test.
6149
6150         * objects.cs: Add tests for JIT intrinsic.
6151
6152         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
6153         optimizations lost by a mistake.
6154
6155 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
6156
6157         * basic-long.cs: Remove a test moved to objects.cs.
6158
6159         * arrays.cs: Add more array tests.
6160
6161 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
6162
6163         * arrays.cs: Add new tests for multi-dimensional arrays.
6164
6165 2005-12-06  Raja R Harinath  <rharinath@novell.com>
6166
6167         * Makefile.am (test_sources2): Add generics.2.cs.
6168         (EXTRA_DIST): Add test_sources2.
6169
6170 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
6171
6172         Support for boxing and unboxing nullable types as well as the
6173         isinst operation on nullables, per the CLI ammendment.
6174
6175         * inssel.brg (CEE_ISINST): Special case for nullable
6176
6177         * mini.c (handle_unbox_nullable): new method
6178         (handle_box): Special case for nullable types
6179         (mono_method_to_ir): Call handle_unbox_nullable in correct
6180         places.
6181
6182         * generics.2.cs: New test suite
6183
6184         * Makefile.am: Support for regression tests with generics.
6185
6186 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
6187
6188         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
6189         allocated to registers. Fixes #76800.
6190
6191 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
6192
6193         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
6194
6195 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
6196
6197         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
6198         of platforms.
6199
6200 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
6201
6202         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
6203         objects.cs.
6204
6205         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
6206         
6207         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
6208 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
6209
6210         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
6211         single precision before storing to a single precision location.
6212
6213 2005-11-28  Raja R Harinath  <rharinath@novell.com>
6214
6215         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
6216
6217 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
6218
6219         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
6220         correct files.
6221
6222         * basic.cs: Remove test_0_byte_compares test which was moved to
6223         objects.cs a long time ago.
6224
6225 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
6226
6227         * aliasing.c: Fixed aliasing issue on 64 bit archs.
6228
6229 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
6230
6231         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
6232         handlers are called.
6233
6234         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
6235         throwing code.
6236
6237          * mini-ia64.c: Add support for the throw->branch exception 
6238         optimization.   
6239
6240         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
6241
6242 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6243
6244         * mini.c: Enabled "fastpath" deadce :-)
6245         
6246 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6247
6248         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
6249         alias analysis pass to support it.
6250         * mini.h: Likewise.
6251         * ssa.c: Likewise.
6252         * liveness.c: Likewise (liveness computation can use aliasing
6253         information to be more accurate).
6254         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
6255         moreover made so that "--compile-all" uses the given optimization
6256         flags and not the default ones.
6257         * aliasing.c: Alias analysis (new file).
6258         * aliasing.h: Likewise.
6259         * Makefile.am: added "aliasing.c" and "aliasing.h".
6260         
6261 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
6262
6263         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
6264         OP_L opcodes.
6265
6266 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
6267
6268         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
6269         fp >= end_of_stack exit condition, as it is not needed, and it might
6270         become true for fp eliminated frames.
6271
6272 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
6273
6274         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
6275         coded offsets.
6276
6277 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
6278
6279         * mini-arm.c: fixed alignment of doubles/longs to match
6280         the C ABI (bug #76635).
6281
6282 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
6283
6284         * aot.c: fix compilation with --enable-minimal=aot.
6285
6286 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
6287
6288         * mini-arm.c: fixed compatibility with the new
6289         floating point emulator package for compares.
6290
6291 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
6292
6293         * mini.c : reverted sig->pinvoke changes (r51396-51397).
6294
6295 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
6296
6297         * mini-exceptions.c (print_stack_frame): Output to stderr.
6298         (mono_handle_native_sigsegv): Ditto.
6299
6300 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6301
6302         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
6303         OP_LCONV_TO_OVF_I implementation.
6304
6305         * mini-amd64.c: Add support for the throw->branch exception 
6306         optimization.
6307
6308         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
6309         when the catch clause catches a more general exception, i.e. Object.
6310
6311 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
6312
6313         * cpu-ia64.md: Remove unused opcodes.
6314
6315         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
6316         specific defines for architectures defining USE_SIGACTION.
6317
6318         * mini-ia64.c: Fix some warnings.
6319
6320         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
6321         version seemed to skip a frame.
6322
6323 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6324
6325         * mini.c: Clean up the usage of sig->pinvoke flag. Now
6326         only calls which are made to native code use this flag.
6327
6328 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
6329
6330         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
6331         varargs methods as well.
6332         
6333         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
6334         which have save_lmf set. Reorganize methods prologs a bit.
6335
6336         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
6337         debugger to the proper place.
6338
6339 2005-10-29  Martin Baulig  <martin@ximian.com>
6340
6341         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
6342         when running inside the debugger until the debugger has support
6343         for it.
6344
6345 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
6346
6347         * mini.h: Fix a warning.
6348
6349 2005-10-24  Miguel de Icaza  <miguel@novell.com>
6350
6351         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
6352         we expose publicly, this returns the string.
6353
6354 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
6355
6356         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
6357         with fp elimination.
6358
6359 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
6360
6361         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
6362         native stacktrace using the glibc 'backtrace' function if available.
6363
6364 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
6365
6366         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
6367
6368         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
6369         handle SIGSEGVs received while in native code.
6370
6371         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
6372         code, call mono_handle_native_sigsegv which will abort the runtime
6373         after printing some diagnostics, instead of converting it into a
6374         confusing NullReferenceException.
6375
6376 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
6377
6378         * cpu-pentium.md: Remove unused opcodes.
6379
6380 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
6381
6382         * mini-amd64.h (MonoLMF): Add rsp field.
6383
6384         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
6385         the lmf too.
6386
6387 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
6388
6389         * mini-codegen.c (get_register_spilling): Fix some warnings.
6390
6391 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
6392
6393         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
6394         elimination during exception handling. Enable fp elimination by
6395         default.
6396
6397         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
6398         elimination.
6399
6400 2005-10-16  Martin Baulig  <martin@ximian.com>
6401
6402         * mini-exceptions.c
6403         (mono_debugger_run_finally): New public method for the debugger.
6404
6405 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
6406
6407         * debug-mini.c (mono_debug_init_method): Fix warning.
6408
6409         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
6410         the 'exname' parameter const to fix some warnings.
6411
6412 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
6413
6414         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
6415         introduced by the previous patch.
6416
6417 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
6418
6419         * basic-float.cs: Add test for precision of float arithmetic.
6420
6421         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
6422         when loading/storing single values from/to memory.
6423
6424         * mini.c (mono_jit_compile_method_with_opt): Create the function
6425         pointers in the correct domain.
6426
6427 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
6428
6429         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
6430         introduced by previous patch.
6431         
6432         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
6433         when out_filter_idx is NULL.
6434
6435         * mini-exceptions.c: Don't run filter clauses twice during exception
6436         handling. Fixes #75755.
6437
6438 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
6439
6440         * aot.c: Add support for ldflda wrappers.
6441
6442         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
6443         #75902.
6444
6445 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
6446
6447         * mini.c, mini.h: do not consider exception handlers blocks when
6448         setting up interface variables.
6449
6450 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
6451
6452         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
6453
6454 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
6455
6456         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
6457         causes a regression.
6458
6459         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
6460
6461 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
6462
6463         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
6464         of the OP_P definitions.
6465
6466         * TODO: Add a proposal for dealing with the CEE/OP mess.
6467
6468         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
6469         optimizations from the x86 port.
6470
6471         * cpu-amd64.md: Ditto.
6472
6473         * basic.cs basic-long.cs: Add tests.
6474
6475 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
6476
6477         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
6478         Patrik Torstensson's implementation of my exception-handling
6479         optimization idea, when the exception object is not used
6480         (bug #62150).
6481
6482 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
6483
6484         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
6485         of the mul_imm optimizations from the old jit.
6486
6487 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
6488
6489         * mini.c, liveness.c: patch by Patrik Torstensson and
6490         Zoltan Varga to improve performance in methods with
6491         exception clauses.
6492
6493 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
6494
6495         * driver.c: Remove 'Globalization' entry from --version.
6496
6497 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
6498
6499         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
6500         there is a profiler interested in JIT events.
6501
6502         * aot.c: Load profile files produced by the AOT profiling module, and
6503         reorder methods based on the profiling info. Add a 'method_order' table
6504         to the AOT file to make mono_aot_find_jit_info work with the reordered
6505         methods.
6506
6507         * mini.h: Bump AOT file version info.
6508
6509 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
6510
6511         * mini-arm.h: work around what looks like a gcc bug when optimizations
6512         are enabled.
6513
6514 2005-09-28  Raja R Harinath  <rharinath@novell.com>
6515
6516         * Makefile.am (AM_CFLAGS): Don't use += to append inside
6517         conditionals.  Use ...
6518         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
6519
6520 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
6521
6522         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
6523         to determine the amount of memory to copy when passing valuetypes.
6524
6525         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
6526         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
6527
6528 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
6529
6530         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
6531         information about aot.
6532
6533 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
6534
6535         * *.c: Replace the use of {Enter,Leave}CriticalSection with
6536         macros. This will allow a deadlock debugger to easily be plugged
6537         in.
6538
6539 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
6540
6541         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
6542
6543 2005-09-27  Raja R Harinath  <rharinath@novell.com>
6544
6545         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
6546         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
6547         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
6548         ($(arch_built)) [CROSS_COMPILING]: Error out.
6549
6550 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
6551
6552         * aot.c: Add support for the no_special_static flag for classes.
6553
6554 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6555
6556         * Reapply reverted patches.
6557
6558         * *: Revert r50174 as well.
6559
6560         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
6561
6562 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6563
6564         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
6565
6566 2005-09-23  Miguel de Icaza  <miguel@novell.com>
6567
6568         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
6569         part of the SIG_HANDLER_SIGNATURE.  
6570
6571 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
6572
6573         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
6574         statistics.
6575
6576         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
6577         introduced by previous patch.
6578
6579 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
6580
6581         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
6582         saved registers too.
6583
6584         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
6585         upon the information returned by get_call_info ().
6586         
6587         * mini-x86.c (add_float): Fix stack size calculation.
6588         (mono_arch_call_opcode): Rewrite this so it works based up the
6589         information returned by get_call_info ().
6590         (mono_arch_get_this_vret_args): Ditto.
6591
6592 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
6593
6594         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
6595         in cinfo to determine the registers which need to be used.
6596
6597 2005-09-20  Miguel de Icaza  <miguel@novell.com>
6598
6599         * driver.c (mono_main): Add --server and --desktop flags. 
6600
6601 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
6602
6603         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
6604         registers as global registers.
6605
6606         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
6607         longer needed with the new register allocator.
6608
6609         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
6610
6611         * cpu-ia64.md: Remove unused opcodes.
6612         
6613         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
6614         
6615 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
6616
6617         * cpu-amd64.md: Remove unused opcodes.
6618
6619         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
6620         needed with the new register allocator.
6621
6622         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
6623         reg-reg moves.
6624
6625 2005-09-16  Raja R Harinath  <rharinath@novell.com>
6626
6627         * Makefile.am (check-local): Don't invoke semdel-wrapper.
6628
6629 2005-09-16  Martin Baulig  <martin@ximian.com>
6630
6631         * exceptions-amd64.c
6632         (throw_exception): Don't call mono_debugger_throw_exception() if
6633         we're a rethrow - see the FIXME in the code.
6634
6635 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
6636
6637         * mini.c (mono_init_exceptions): This only works on some architectures.
6638         
6639 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6640
6641         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
6642         on ia64.
6643
6644         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
6645
6646         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
6647         now in mini-exceptions.c.
6648
6649 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
6650
6651         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
6652         now in mini-exceptions.c.
6653
6654 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6655
6656         * exceptions-x86.c: Applied patch from Patrik Torstensson 
6657         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
6658
6659         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
6660         code into mini-exceptions.c. Add some assertions to it.
6661
6662 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
6663
6664         * aot.c (emit_section_change): Applied patch from "The Software Team" 
6665         (<software@solmersa.com>). Fix as errors on windows.
6666
6667 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6668
6669         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
6670         method info into the LMF.
6671
6672 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6673         
6674         * mini-ia64.c: Add proper unwind info for method epilogs.
6675
6676         * exceptions-ia64.c: Add some code to help debugging.
6677         
6678         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
6679
6680         * mini-exceptions.c: Fix warning.
6681
6682 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6683
6684         * mini.c: Really fix build.
6685
6686         * mini-x86.c mini-amd64.c: Fix build.
6687
6688 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6689
6690         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
6691
6692         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
6693         some Interlocked methods as intrinsics.
6694
6695         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
6696         for Thread methods as well.
6697
6698         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
6699
6700         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
6701
6702         * mini-ia64.c mini-x86.c mini-amd64.c 
6703         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
6704         OP_MEMORY_BARRIER.
6705         
6706         * mini.c (mono_init_exceptions): Fix build breakage.
6707
6708 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
6709
6710         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
6711         of instructions. Use the new ia64_unw_op macros for emitting unwind
6712         info.
6713
6714         * mini.c (mono_init_exceptions): Initialize exception handling
6715         related trampolines at startup.
6716
6717 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
6718
6719         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
6720
6721 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
6722
6723         * mini.c: Handle type loading errors gracefully during compilation and
6724         throw the appropriate exception.
6725
6726 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
6727
6728         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
6729         for the mono binary.
6730
6731 2005-09-09  Martin Baulig  <martin@ximian.com>
6732
6733         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
6734         the release.
6735
6736 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6737
6738         * mini-arm.h: use emulation for conv.r.un for the release.
6739
6740 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6741
6742         * mini-arm.c, objects.cs: more fixes and tests for them.
6743
6744 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6745
6746         * mini-arm.c: align structures to at least 4 bytes to be able
6747         to keep our current optimized memcpy.
6748
6749 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
6750
6751         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
6752
6753 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6754
6755         * mini.c: ignore SIGPIPE.
6756
6757 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
6758
6759         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
6760
6761         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
6762
6763 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
6764
6765         * mini.h: Add prototype for mono_allocate_stack_slots_full.
6766
6767 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6768
6769         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
6770         exception handling support.
6771         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
6772         patch by Brian Koropoff <briank@marakicorp.com>).
6773
6774 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
6775
6776         * mini.c: revert another 'optimization' which breaks when
6777         items on the eval stack need to be saved at a basic block end
6778         (bug #75940).
6779
6780 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
6781
6782         * jit-icalls.c: for arrays, ensure we always provide
6783         lower bounds.
6784
6785 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
6786
6787         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
6788         
6789         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
6790
6791 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
6792
6793         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
6794         arguments in their original register.
6795
6796 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
6797
6798         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
6799         memset/memcpy.
6800
6801         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
6802         when ssapre is enabled.
6803
6804         * inssel-long.brg: Fix bug in previous patch.
6805
6806         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
6807         multiplication by a constant.
6808
6809 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
6810
6811         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
6812         icc.
6813
6814         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
6815         saving registers.
6816
6817 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
6818
6819         * inssel-arm.brg: apply changes tested by Brian Koropoff
6820         <briank@marakicorp.com>.
6821
6822 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
6823
6824         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
6825         
6826 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
6827
6828         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
6829         to the same register if dreg is just a base register.
6830         (print_ins): Improve printing of membase opcodes.
6831
6832         * inssel-x86.brg: Add optimized ldind(reg) rules.
6833
6834         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
6835
6836 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
6837
6838         * mini.c: when running under valgrind, set the stack bottom for
6839         the GC at the actual approximate stack for the app (fixes running
6840         mono with valgrind).
6841
6842 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
6843
6844         * mini.c: do no break at the first valuetype to init found
6845         (fixes bug #75791).
6846
6847 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
6848
6849         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
6850
6851 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
6852
6853         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
6854
6855 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
6856
6857         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
6858
6859 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6860
6861         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
6862
6863         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
6864         code.
6865
6866         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
6867         code.
6868
6869         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
6870         methods.
6871
6872 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
6873
6874         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
6875
6876 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6877
6878         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
6879         in the tail recursion optimization.
6880
6881         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
6882         debug info into the assembly file.
6883
6884         * iltests.il: Add test for filter regions.
6885
6886         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
6887         initial stack of filter regions. Fixes #75755.
6888
6889 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
6890
6891         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
6892         stack requirements.
6893
6894 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6895
6896         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
6897         the check for an already compiled method on non-ia64 platforms.
6898         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
6899         proper domain.
6900
6901         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
6902
6903         * inssel-x86.brg: Add some optimized call rules.
6904
6905 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
6906
6907         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
6908         method here.
6909
6910         * mini.h mini-trampolines.c: Pass the trampoline argument to 
6911         mono_arch_patch_delegate_trampoline.
6912
6913         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
6914
6915         * mini-trampolines.c: Fix build.
6916
6917         * mini-amd64.h: Add delegate trampolines.
6918
6919         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
6920
6921         * inssel-amd64.brg: Add optimized call rules.
6922         
6923         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
6924
6925         * inssel-ia64.brg: Add optimized ldind(reg) rules.
6926
6927 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
6928
6929         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
6930         change.
6931
6932         * mini-ia64.c: Remove LMF fixmes.
6933
6934         * mini-ia64.h: Remove most fields from LMF.
6935
6936         * inssel-ia64.brg (stmt): Fix unaligned access errors.
6937
6938         * mini-trampolines.c: Add support for IA64 function descriptors.
6939
6940         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
6941         for IA64 function descriptors.
6942
6943 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
6944
6945         * tramp-arm.c: patch the vtable for virtual calls. Added
6946         support code to register/unregister the LMF.
6947         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
6948         more LMF work.
6949
6950 2005-08-19  Dick Porter  <dick@ximian.com>
6951
6952         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
6953         bit value if needed.
6954
6955 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
6956
6957         * mini.c (mini_get_method): Move handling of wrapper data here.
6958
6959         * mini.c (mono_method_to_ir): Add support for dynamic methods.
6960
6961         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
6962         virtual.
6963
6964         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
6965         bblock->code does not remain empty.
6966
6967 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
6968
6969         * arrays.cs: Add regression test for #75832.
6970
6971         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
6972         rules. Fixes #75832.
6973
6974         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
6975         instruction scheduling.
6976
6977 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
6978
6979         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
6980
6981 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
6982
6983         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
6984
6985         * mini-codegen.c: Fix VC build.
6986
6987         * cpu-pentium.md: Increase length of atomic_exhange_i4.
6988
6989 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6990
6991         * mini.h: fix signature for mono_register_opcode_emulation.
6992
6993 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
6994
6995         * mini.c: Get rid of most of the helper_sig_... constants using
6996         mono_create_icall_signature ().
6997
6998 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
6999
7000         * jit-icalls.c (helper_ldstr): New helper function.
7001
7002         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
7003
7004         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
7005         throw, load the string using a helper call instead of creating a string object.
7006
7007         * aot.c: Update after LDSTR changes.
7008
7009         * mini.h: Bump AOT file version.
7010         
7011         * aot.c: Save class size info into the AOT file. Print more statistics during
7012         compilation.
7013
7014         * mini.h: Bump AOT file version.
7015
7016         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
7017         ordering of disasm cases. Fixes #74957.
7018
7019 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
7020
7021         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
7022         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
7023         the generic code needed for the ARM port.
7024
7025 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
7026
7027         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
7028         inssel-arm.brg: more ARM features and fixes.
7029
7030 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
7031
7032         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
7033         ARM port work in progress.
7034
7035 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
7036
7037         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
7038
7039         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
7040
7041         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
7042
7043         * inssel.brg (mini_emit_memset): Add support for unaligned access.
7044
7045         * *-ia64.*: Ongoing IA64 work.
7046         
7047         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
7048
7049 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
7050
7051         * TODO: Remove out-of-data todo stuff.
7052
7053         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
7054         dead code.
7055
7056         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
7057
7058         * mini.h: Bump corlib version.
7059
7060 2005-07-27  Martin Baulig  <martin@ximian.com>
7061
7062         * mini-codegen.c
7063         (create_copy_ins): Added `const unsigned char *ip' argument; set
7064         `copy->cil_code' from it.
7065
7066 2005-07-27  Martin Baulig  <martin@ximian.com>
7067
7068         * mini-exceptions.c (mono_handle_exception): Don't call
7069         mono_debugger_handle_exception() for filters.
7070
7071 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
7072
7073         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
7074         as well.
7075
7076 2005-07-26  Martin Baulig  <martin@ximian.com>
7077
7078         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
7079
7080         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
7081         helper_compile_generic_method() if the method is actually virtual
7082         and non-final.
7083
7084 2005-07-26  Martin Baulig  <martin@ximian.com>
7085
7086         * mini.c
7087         (trampoline_code): Renamed to `mono_trampoline_code' and made it
7088         public; this is now accessed directly by the debugger.
7089         (mono_generic_trampoline_code): Removed.
7090
7091         * debug-mini.c
7092         (mono_debug_init_method): Also add interncalls and wrappers.
7093
7094 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
7095
7096         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
7097
7098 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
7099
7100         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
7101
7102 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
7103
7104         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
7105
7106 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7107
7108         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
7109         getting TLS offsets on AMD64 too.
7110
7111 2005-07-20  KornĂ©l Pál <kornelpal@hotmail.com>
7112
7113         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
7114
7115 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
7116
7117         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
7118         inssel-arm.brg, mini-arm.h: ARM port work in progress.
7119
7120 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7121
7122         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
7123
7124         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
7125         to mini.c.
7126
7127         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
7128         mono_sparc_is_virtual_call ().
7129         
7130         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
7131
7132         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
7133         trampoline parameters.
7134
7135         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
7136         
7137         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
7138         to mono_arch_get_vcall_slot_addr.
7139
7140         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
7141         trampoline code.
7142
7143         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
7144
7145 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7146
7147         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
7148
7149 2005-07-19  Martin Baulig  <martin@ximian.com>
7150
7151         * exceptions-amd64.c (throw_exception): Call
7152         mono_debugger_throw_exception() here like we're doing it on i386.
7153
7154 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7155
7156         * mini-ia64.c: Add optimized TLS access support.
7157
7158 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
7159
7160         * mini-exceptions.c: Ongoing IA64 work.
7161
7162         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
7163
7164         * mini.c: Use the default optimization set when embedding. Fixes
7165         #75194.
7166
7167 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
7168
7169         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
7170         of trampolines to a separate file.
7171
7172         * mini-trampolines.c: New file.
7173
7174         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
7175         separate file.
7176         
7177         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
7178         amd64/ia64 code.
7179
7180         * mini-codegen.c: Fix cygwin build.
7181
7182 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
7183
7184         * mini.c: Add some minor changes needed by the IA64 port.
7185
7186         * *-ia64.*: Ongoing IA64 work.
7187
7188 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
7189
7190         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
7191         trampolines into arch-independent and arch-dependent parts.
7192
7193         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
7194
7195 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
7196
7197         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
7198
7199         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
7200         the xp-regalloc-branch for amd64.
7201
7202         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
7203         xp-regalloc-branch for x86.
7204
7205 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
7206
7207         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
7208
7209 2005-07-06  Martin Baulig  <martin@ximian.com>
7210
7211         * mini.c
7212         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
7213         (mono_jit_runtime_invoke): Likewise.
7214
7215 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
7216
7217         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
7218         on x86 too.
7219         
7220         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
7221         without loading their metadata. Reorganize the file format so exception handling+
7222         debug info is kept separate from normal method info. Create MonoJitInfo 
7223         structures for methods lazily.
7224
7225         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
7226         loading metadata.
7227         (x86_class_init_trampoline): Patch AOT class init trampolines too.
7228
7229         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
7230
7231         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
7232         in AOT code.
7233
7234         * mini.h: Bump AOT file version.
7235
7236 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
7237
7238         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7239
7240 2005-07-01  Raja R Harinath  <rharinath@novell.com>
7241
7242         * Makefile.am (check-local): Call semdel-wrapper.
7243
7244 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
7245
7246         * mini-x86.c: Revert the last change as it seems to break the build..
7247
7248 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
7249
7250         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7251         
7252         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
7253
7254 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
7255
7256         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
7257         outside of the macro, so strange stuff doesn't happen with gcc4
7258         (NEW_AOTCONST_TOKEN): Likewise.
7259
7260 2005-06-28  Martin Baulig  <martin@ximian.com>
7261
7262         * mini.c (mini_class_is_system_array): New static method; use this
7263         instead of `klass->parent == mono_defaults.array_class' everywhere
7264         since this also works for the new generic array class.
7265
7266 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
7267
7268         * inssel.brg: Remove warnings.
7269
7270 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
7271
7272         * mini-ia64.c: Ongoing IA64 work.
7273
7274         * basic-float.cs: Add float->i1 conversion test.
7275
7276         * iltests.il: Add conv.u4 test.
7277
7278 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
7279
7280         * inssel-long.brg: Fix bug caused by last change.
7281
7282 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
7283
7284         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
7285         BSDs.  Allows the x86 JIT to work on OSX86
7286
7287 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
7288
7289         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
7290         u4->i8 conversion.
7291
7292         * mini-ia64.c: Ongoing IA64 work.
7293
7294 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
7295
7296         * mini-ia64.c: Ongoing IA64 work.
7297
7298         * driver.c: Clean up jit_code_hash as well when using --regression.
7299
7300         * inssel-long.brg: Fix long->i4/u4 conversion rules.
7301
7302         * basic-long.cs: Add tests for long->u4 conversion.
7303
7304 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
7305
7306         * mini.c: Take mono_get_domainvar out of macros. This makes sure
7307         that we do not depend on undefined C behavior: the order stuff
7308         gets evaluated within an expression. Fixes mono when compiled on
7309         GCC 4.
7310
7311 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
7312
7313         * *-ia64.*: Ongoing IA64 work.
7314
7315         * aot.c: Lower memory usage while loading AOT methods.
7316
7317         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
7318
7319         * mini.h: Bump AOT file format version.
7320
7321 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
7322
7323         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
7324
7325 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
7326
7327         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
7328         not on callee assembly). Fixed some comments.
7329
7330 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
7331
7332         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
7333         it gets proper disassembly.
7334         (emit_method_info): Remove some dead code.
7335
7336         * mini.c (mini_method_compile): Allways allocate the GOT var in
7337         mono_method_to_ir for emulating opcodes.
7338
7339 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
7340
7341         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
7342         before freeing the code memory. Fixes #74990.
7343
7344         * objects.cs: Add regression test for #74992.
7345
7346         * liveness.c: Extend live ranges of arguments to the beginning of the
7347         method. Fixes #74992.
7348
7349         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
7350         so it points into the faulting instruction.
7351
7352 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
7353
7354         * jit-icalls.c (mono_imul_ovf): Add exception handling.
7355
7356         * *-ia64.*: Ongoing IA64 work.
7357
7358         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
7359
7360 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
7361
7362         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
7363
7364         * *-ia64.*: Ongoing IA64 work.
7365
7366 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
7367
7368         * basic-long.cs: Add tests for add/sub.ovf.
7369
7370         * basic.cs: Add tests for sub.ovf.
7371
7372         * *-ia64.*: Ongoing IA64 work.
7373
7374 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
7375
7376         * *-ia64.*: Ongoing IA64 work.
7377
7378         * basic.cs: Add conv.ovf.i4.un test.
7379
7380 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
7381
7382         * mini.c: (remove_block_if_useless) Fixed bug 75061.
7383         
7384 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7385
7386         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
7387
7388 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
7389
7390         * *-ia64.*: Ongoing IA64 work.
7391
7392 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7393
7394         * trace.[ch]:
7395         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
7396
7397 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
7398
7399         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
7400
7401 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
7402
7403         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
7404
7405         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
7406         of a call is callable by a near call.
7407
7408 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
7409
7410         * mini-ia64.c: Ongoing IA64 work.
7411
7412 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
7413
7414         * genmdesc.c: Make the generated array non-static.
7415
7416         * inssel-long.brg: Fix LSHR_IMM rule.
7417
7418         * *-ia64.*: Ongoing IA64 work.
7419
7420         * *-ia64.*: Ongoing IA64 work.
7421
7422 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7423
7424         * *-ia64.*: Ongoing IA64 work.
7425
7426         * *-ia64.*: Ongoing IA64 work.
7427         
7428         * mini-ia64.c: Ongoing IA64 work.
7429
7430         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
7431
7432 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7433
7434         * objects.cs basic-calls.cs: Move some tests to objects.cs.
7435         
7436         * objects.cs basic-long.cs: Move some tests to objects.cs.
7437
7438 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
7439
7440         * *-ia64.*: Ongoing IA64 work.
7441
7442         * iltests.il: Add a new test.
7443
7444         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
7445         newobj. Fixes #75042.
7446
7447 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
7448
7449         * *-ia64.*: Ongoing IA64 work.
7450         
7451         * *-ia64.*: Ongoing IA64 work.
7452         
7453         * *-ia64.*: Ongoing IA64 work.
7454
7455         * basic.cs objects.cs: Move tests accessing static variables as well.
7456
7457         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
7458
7459 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
7460
7461         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
7462
7463         * driver.c: Always print failed tests.
7464
7465         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
7466         frame pointer.
7467
7468         * *ia64*: Ongoing IA64 work.
7469
7470 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
7471
7472         * basic.cs: Add tests for add.ovf. Fix warnings.
7473
7474 2005-05-18  Miguel de Icaza  <miguel@novell.com>
7475
7476         * driver.c (mono_main): Avoid crash if no argument is passed to
7477         --break;  Do not use g_error, but f_printf.   And fix all other
7478         ocurrences of the same crash.
7479
7480 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
7481
7482         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
7483         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
7484         Fixes #74742.
7485
7486 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
7487
7488         * *-ia64.*: Add beginnings of IA64 backend.
7489
7490         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
7491
7492 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
7493
7494         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
7495         Fixes #74925.
7496
7497         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
7498
7499         * mini-amd64.c: Fix a warning.
7500
7501 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
7502
7503         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
7504         in float_neg. Fixes #74897.
7505
7506         * mini-amd64.c (emit_call): Fix another near call bug.
7507
7508 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
7509
7510         * declsec.c: Keep the appdomain information in the structure. Added a 
7511         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
7512         value gets overwritten).
7513         * declsec.h: Set the default MonoArray for the the stack to 6. Added
7514         an MonoAppDomain member to MonoSecurityFrame.
7515         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
7516         used in the stack walk. Now use a MonoArray which grow (double) when
7517         it gets full.
7518
7519 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
7520
7521         * mini.c: Re-enabled runtime cleanup, since running threads should
7522         now properly stop when exiting.
7523
7524 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
7525
7526         * mini-codegen.c: New file contaning the arch-independent local
7527         register allocator. Not used by any architectures yet.
7528
7529         * mini.h linear-scan.c: Merge some changes from the 
7530         mini-xp-local-regalloc branch.
7531
7532 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
7533
7534         * mini-amd64.c (emit_call): Fix calls to native functions when the
7535         runtime is compiled as a shared library. Fixes #74756.
7536
7537         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
7538         on a literal field. Fixes #74751.
7539
7540 2005-04-25  Raja R Harinath  <rharinath@novell.com>
7541
7542         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
7543
7544 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
7545
7546         * objects.cs: Add missing null casting test.
7547
7548 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
7549
7550         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
7551         in wrapper methods. Also rename 'address' variable to 'offset'.
7552
7553 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
7554
7555         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
7556         warnings.
7557         
7558         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
7559
7560         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
7561         work on windows.
7562
7563 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
7564
7565         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
7566
7567 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7568
7569         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
7570         just the last bytes.
7571
7572 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7573
7574         * aot.c (mono_compile_assembly): Fix warning.
7575
7576         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
7577         by the _MSC_VER stuff.
7578
7579 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
7580
7581         * inssel-long.brg: Fix #74588.
7582
7583         * cpu-amd64.md: Fix #74591.
7584
7585         * iltests.il: Add new regression tests.
7586
7587 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
7588
7589         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
7590         valuetype.
7591
7592 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
7593
7594         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
7595
7596         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
7597         from Bill Middleton <flashdict@gmail.com>.
7598
7599 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
7600
7601         * arrays.cs: Add new regression test. Fix warnings.
7602
7603 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
7604
7605         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
7606         and leakage in CKFINITE.
7607
7608         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
7609         this to a null op since it is called on amd64 too.
7610
7611         * exceptions-amd64.c (get_throw_trampoline): Align stack.
7612
7613         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
7614         body since this is not used on amd64.
7615         
7616         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
7617
7618         * mini-amd64.c: Remove obsolete fixmes.
7619
7620         * mini.c (print_method_from_ip): Fix debugging support.
7621
7622 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
7623
7624         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
7625         so that expressions that don't give much gain are not reduced.
7626         * ssapre.h: Likewise.
7627
7628 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
7629
7630         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
7631
7632         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
7633
7634         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
7635
7636 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
7637
7638         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
7639
7640         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
7641
7642 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
7643
7644         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
7645         stack touching.
7646
7647         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
7648
7649         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
7650
7651         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
7652
7653         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
7654         MONO_ARCH_USE_SIGACTION. Fixes #74252.
7655
7656         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
7657
7658         * mini-x86.c: Fix up stack overflow handling.   
7659
7660         * exceptions.cs: Add new regression test.
7661
7662 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
7663
7664         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
7665         mono_jit_thread_attach.
7666
7667         * mini.c (mono_method_to_ir): Verify called method is not abstract.
7668
7669 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7670
7671         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
7672         avoid calling constructors using callvirt.
7673
7674         * inssel.brg: Fix #74073.
7675
7676 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
7677
7678         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
7679         compilation with non-GCC compilers.
7680         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
7681         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
7682
7683 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
7684
7685         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
7686         klass->interface_offsets (will likely fix bug#74073).
7687
7688 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7689
7690         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
7691
7692 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
7693
7694         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
7695         to amd64_div_reg_size ().
7696         
7697         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
7698
7699 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
7700
7701         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
7702
7703 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7704
7705         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
7706
7707 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7708
7709         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
7710         
7711         * mini.c (mono_precompile_assembly): Load and precompile referenced
7712         assemblies as well. Fixes #74015.
7713
7714 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
7715
7716         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
7717
7718 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
7719
7720         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
7721         a lot of checks and (anyway) permissions cannot work until corlib is 
7722         loaded.
7723
7724 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
7725
7726         * mini-ppc.c: fixed ABI issue on sysv/ppc.
7727
7728 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
7729
7730         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
7731         calls (fixes bug#72824).
7732
7733 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
7734
7735         * mini.c: fix tail recursion elimination (see test in bug#73936).
7736
7737 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
7738
7739         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
7740         some fp functions in sse2 mode.
7741
7742 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
7743
7744         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
7745
7746 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
7747
7748         * mini.h mini.c: Add mono_get_jit_tls_key ().
7749
7750         * mini-x86.c: Enable fast TLS support on windows.
7751
7752 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
7753
7754         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
7755         * mini.c: Check for p/invoke method when generating code. If a
7756         p/invoke method, or it's class, isn't decorated with [Suppress
7757         UnmanagedCodeSecurity] then generate code to call System.Security.
7758         UnmanagedDemand (only if the security manager is active).
7759
7760 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7761
7762         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
7763         last change as it seems to cause strange crashes.
7764         
7765 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
7766
7767         * *.c: handle unsafe function pointers where needed.
7768
7769 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7770
7771         * mini.c (mono_jit_free_method): Remove the fixme too.
7772
7773 2005-03-15  Miguel de Icaza  <miguel@novell.com>
7774
7775         * mini.c: As discussed, make the code actually free the delegate
7776         thunk now, to enable the debugging of delegate problems, use
7777         MONO_DEBUG=1 when running Mono. 
7778
7779         This takes also care of parts of the leaks as seen by Joe.
7780
7781 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
7782
7783         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
7784         thread_tls_offset calculation.
7785
7786 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
7787
7788         * declsec.c: Reworked linkdemand checks for icall. The previous code
7789         was using the declaration code (untrusted) and didn't work as expected
7790         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
7791         specific case.
7792
7793 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
7794
7795         * iltests.il: Add new localloc test.
7796
7797         * mini-amd64.c: Handle large stack allocations the same way as on
7798         windows if stack overflow handling is working.
7799         
7800         * mini-amd64.c: Allocate the signal stack using mmap.
7801
7802         * mini.c (sigsegv_signal_handler): Fix reading of context.
7803
7804         * mini-exceptions.c: Fix up stack overflow handling.
7805
7806         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
7807
7808         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
7809
7810         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
7811
7812         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
7813
7814         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
7815         tramp_init functions as they are no longer needed.
7816
7817 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
7818
7819         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
7820         
7821         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
7822
7823         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
7824         
7825         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
7826         support that now.
7827
7828         * mini-ops.h: Add OP_LMUL_IMM.
7829
7830         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
7831         long mul/div opcodes as intrinsic.
7832
7833         * mini-amd64.c (emit_call): Handle the case when the callee might be
7834         an AOT method.
7835
7836 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
7837
7838         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
7839         extra safe.
7840         
7841         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
7842
7843         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
7844
7845 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
7846
7847         * mini.c (mono_codegen): Don't leak here, to help people running
7848         monogrind.
7849
7850 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
7851
7852         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
7853         conversions in sse2 mode.
7854
7855         * basic-float.cs: Add regression test.
7856         
7857         * mini-amd64.c: Reenable sse2.
7858
7859 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
7860
7861         * mini-amd64.c: Disable sse2 until some regressions are fixed.
7862
7863 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
7864
7865         * driver.c: Copyright text should include 2005.
7866         
7867 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
7868
7869         * cpu-amd64.md (load_membase): Fix more max lengths.
7870
7871 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
7872
7873         * cpu-amd64.md (load_membase): Fix max length.
7874
7875         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
7876
7877         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
7878
7879         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
7880         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
7881
7882         * basic-float.cs: Add rounding regression test.
7883
7884         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
7885
7886 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
7887
7888         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
7889         structures in registers for pinvoke wrappers.
7890
7891 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
7892
7893         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
7894
7895 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
7896
7897         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
7898         wrapper to mono_jit_thread_attach.
7899
7900         * mini.c (mini_jit_thread_attach): New jit icall.
7901
7902         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
7903         native->managed wrappers.
7904
7905         * exceptions.cs: Add new regression test.
7906
7907         * mini.c (optimize_branches): Check regions in the cbranch to throw
7908         block case as well. Fixes #73242.
7909
7910 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7911
7912         * mini.c: thread safety fixes.
7913
7914 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
7915
7916         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
7917         patching stuff, since delegates use jump trampolines so there is
7918         no caller.
7919
7920         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
7921         jump trampolines.
7922         
7923         * tramp-amd64.c: Fix build.
7924
7925         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
7926         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
7927
7928         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
7929         Rename this to mono_arch....
7930         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
7931
7932         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
7933
7934         * mini-amd64.c (emit_call): If both the caller and the callee is
7935         guaranteed to have 32 bit addresses, emit a normal call.
7936
7937         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
7938
7939         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
7940         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
7941         method_ptr inside delegates.
7942
7943 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
7944
7945         * mini.c (mono_jit_free_method): Free the method info even if the native code is
7946         invalidated. Fixes #73001.
7947
7948         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
7949
7950         * mini-x86.c: Only use stdcall for pinvokes on windows.
7951
7952 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
7953
7954         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
7955         * mini-x86.c: remove unreliable __thread var offset detection,
7956         use the correct accessors and enable by default.
7957
7958 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
7959
7960         * mini.c (mono_jit_free_method): Fix memory leak.
7961
7962 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
7963
7964         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
7965
7966 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
7967
7968         * cpu-amd64.md: Fix lengths of atomic opcodes.
7969
7970 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
7971
7972         * driver.c: try to not imply using ICU is any good.
7973
7974 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
7975
7976         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
7977         functions as inline ops.
7978
7979         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
7980         some Interlocked functions as inline ops.
7981
7982         * mini.c (move_basic_block_to_end): Fix bug in last patch.
7983
7984         * mini.h (MonoBasicBlock): Reorganize fields a bit.
7985
7986         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
7987
7988         * mini.c: Add support for OP_NOT_TAKEN.
7989
7990         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
7991         structures in registers for pinvoke wrappers.
7992
7993         * mini-amd64.c: Fix warnings.
7994
7995 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
7996
7997         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
7998
7999         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
8000
8001         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
8002         address instead of loading the address from it.
8003
8004         * mini-x86.c: Add support for returning small structs in registers
8005         on Win32. Fixes part of #70864.
8006         
8007 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
8008
8009         * trace.c (get_token): Improve error checking.
8010
8011 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
8012
8013         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
8014
8015 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
8016  
8017         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
8018         it can be reused for MonoClass.
8019         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
8020         _LINKDEMAND.
8021
8022 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
8023
8024         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
8025         instead of a MonoReflectionMethod. The method information wasn't used
8026         when displaying SecurityException details (but will be now).
8027
8028 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
8029
8030         * Makefile.am : windows build fix.
8031
8032 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
8033
8034         * iltests.il: Add new regression test.
8035
8036         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
8037         #72522.
8038
8039 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
8040  
8041         * mini.c: Moved linkdemand check into helper function check_linkdemand
8042         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
8043         LDFTN, LDVIRTFTN).
8044
8045 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
8046
8047         * declsec.c: Added statistics counter for different kinds of 
8048         LinkDemands.
8049         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
8050         (and commented) declaration.
8051         * mini.c: Added statistics counter for security Demand code 
8052         generation. Added display of security statistics.
8053
8054 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
8055
8056         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
8057         Fix compilation errors under gcc-2.95.
8058
8059 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
8060
8061         * mini.c, driver.c: Use the new jit trampoline hashtable
8062
8063 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8064
8065         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
8066
8067 2005-02-11  Martin Baulig  <martin@ximian.com>
8068
8069         * debug-mini.c (mono_debug_close_method): Free the line number array.
8070
8071 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8072
8073         * aot.c: Break up large methods into smaller ones. Share GOT slots for
8074         icalls.
8075
8076         * mini.h: Bump AOT file format version. 
8077
8078 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
8079
8080         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
8081         APTC and P/Invoke.
8082         * declsec.h: Added macros to get/set lazyly initialized security 
8083         informations about assemblies. Added new enum for different type of
8084         possible LinkDemand violation. Added function to check LinkDemands.
8085         * mini.h: Added a field to MonoCompile to hold any security violation
8086         detected when JITting a method (so it can be thrown later).
8087         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
8088         and CEE_CALLVIRT. Added code to throw exception at the end of
8089         mini_method_compile (note: the exception is unhandled right now).
8090
8091 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
8092
8093         * mini.c, jit-icalls.c: use the managed implementation of
8094         memset for initobj and memset, to avoid managed <-> unmanaged
8095         transitions.
8096
8097 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8098
8099         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
8100         optimization if it would need a GOT var.
8101
8102         * basic.cs: Add tests for constant propagation and switch statements.
8103
8104         * ssa.c: Fix out-of-range constant propagation and switch statements.
8105
8106 2005-02-09    <vargaz@freemail.hu>
8107
8108         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
8109
8110 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
8111
8112         * cpu-amd64.md (load_membase): Fix max length of load_membase.
8113
8114 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8115
8116         * mini.c: update to new signature of mono_class_get_allocation_ftn().
8117
8118 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
8119
8120         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
8121         arithmetic operations.
8122
8123 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
8124
8125         * mini-ppc.c: add a workaround for broken user code that
8126         DllImports vararg functions with non-vararg signatures.
8127
8128 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
8129
8130         * mini.c (mono_jit_compile_method_inner): Add detection and a 
8131         meaningfull error message for assemblies written in Managed C++.
8132
8133         * tramp-amd64.c mini-amd64.h: Add support for 
8134         create_trampoline_from_token ().
8135
8136         * aot.c mini-x86.c abcremoval.c: Applied patch from
8137         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
8138
8139 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
8140
8141         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
8142         which takes a MonoImage/token as parameter instead of a MonoMethod.
8143
8144         * aot.c: Use the new trampoline for initializing vtables.
8145
8146         * aot.c: Add support for ldfld/stfld_remote wrappers.
8147
8148         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
8149         rules for compare <MEM>, IMM.
8150
8151         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
8152
8153         * aot.c: Handle inherited finalizers correctly.
8154
8155 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
8156
8157         * inssel.brg (stmt): Add a missing _setup_... ().
8158
8159         * aot.c: Save some parts of the class state to the AOT file and use it
8160         to recompute that state when a class is initialized.
8161
8162         * mini.c: Install AOT hooks into the runtime.
8163
8164         * mini.h: Bump AOT file format version.
8165         
8166         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
8167         Fixes #72148.
8168
8169         * iltests.il: Add new test.
8170
8171 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8172
8173         * mini.c: fix typo.
8174
8175 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
8176
8177         * mini.c: setup the statistical profiler in the thread attach
8178         callback to cope with the new single thread code.
8179
8180 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
8181
8182         * mini-ppc.c: ensure we have enough room for the profiler
8183         calls (fixed bug#72084).
8184
8185 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
8186
8187         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
8188         it.
8189
8190 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8191
8192         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
8193
8194 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8195
8196         * ssapre.c: Fixed an issue with down safety (this allows IronPython
8197         to succesfully execute parrotbench).
8198         * ssapre.h: Likewise.
8199
8200 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8201
8202         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
8203         variable for stores to method arguments (fixes a SSAPRE issue).
8204
8205 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8206
8207         * mini.c: handle value types in dup, fixes gen-112.cs.
8208
8209 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
8210
8211         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
8212         sequence for calls in dynamic methods to avoid thunks.
8213
8214 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
8215
8216         * mini.c: correctly remove dynamic methods from the hashtable.
8217
8218 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8219
8220         * driver.c: Disabled SSAPRE until fix the bug that appears
8221         in IronPython's parrotbench.
8222
8223 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
8224
8225         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
8226
8227         * mini.c (mono_method_to_ir): Revert the previous change.
8228         
8229         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
8230         when AOT compiling.
8231
8232         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
8233         mono_jit_info_table_find () etc. when running under valgrind.
8234
8235         * inssel.brg: Fix warnings.
8236
8237         * mini-exceptions.c: Fix warnings.
8238
8239 2005-01-31  Martin Baulig  <martin@ximian.com>
8240
8241         * driver.c (compile_all_methods_thread_main): Don't try to compile
8242         generic methods or anything which has type parameters.
8243
8244 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
8245
8246         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
8247
8248         * TestDriver.cs: Add --verbose flags.
8249
8250         * graph.c ssa.c: Fix 64 bit warnings.
8251         
8252         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
8253         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
8254         Fix 64 bit warnings.
8255
8256         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
8257         variable not spotted by gcc.
8258         
8259         * mini-amd64.c inssel-amd64.brg: Applied patch from  
8260         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
8261         X86_COMPARE_MEMBASE opcodes.
8262
8263         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
8264
8265 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
8266
8267         * *: MonoMethod->signature might be NULL now. You *MUST* use
8268         mono_method_signature.
8269
8270 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8271
8272         * driver.c (compile_all_methods_thread_main): Compile the methods
8273         without invoking cctors.
8274
8275 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8276
8277         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
8278         * basic-calls.cs: test for the above.
8279
8280 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8281
8282         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
8283         MonoJitInfo changes.
8284
8285 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
8286
8287         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
8288         eagerly if it contains dynamic methods.
8289         
8290         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
8291
8292         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
8293         trace, it is now computed by an icall from trace_ips.
8294         
8295         * mini-exceptions.c: Fix a warning.
8296
8297 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
8298
8299         * mini-exceptions.c: don't bother getting stack trace info if
8300         it's not going to be used.
8301
8302 2005-01-27  Raja R Harinath  <rharinath@novell.com>
8303
8304         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
8305         ssapre-mini-ops.h.
8306
8307 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
8308
8309         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
8310
8311         * aot.c: Avoid calling mono_method_get_header () if not needed.
8312
8313         * mini.h: Bump AOT file format version.
8314         
8315         * mini.c (mono_emit_native_call): Allocate a GOT var here.
8316
8317         * mini.c (mono_print_tree): Print more info for calls.
8318
8319 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
8320
8321         * declsec.h: Remove warning by adding missing include for marshal.h
8322
8323 2005-01-26  Martin Baulig  <martin@ximian.com>
8324
8325         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
8326         `ip' twice.
8327
8328 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
8329
8330         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
8331         flags.
8332
8333         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
8334
8335         * aot.c (mono_compile_assembly): Fix a warning.
8336
8337 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
8338
8339         * declsec.c: Look for security attributes on the original MonoMethod 
8340         (and not the wrapped one). This fix permissions on icalls.
8341
8342 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8343
8344         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8345
8346         * mini.c (mono_allocate_stack_slots): Add a fixme.
8347
8348         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8349
8350 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
8351
8352         * inssel.brg: optimize casts of sealed types (more
8353         optimizations waiting for fixes in remoting).
8354
8355 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8356
8357         * inssel.brg (stmt): Add another dummy rule.
8358
8359         * driver.c: Fix warnings.
8360
8361         * driver.c (mono_main): If running under valgrind, instruct glib to use
8362         the system allocation functions so valgrind can track the memory
8363         allocated by the g_... functions.
8364
8365         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
8366
8367         * mini-ops.h: Add OP_DUMMY_STORE opcode.
8368
8369         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
8370
8371         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
8372         variables in try regions.
8373
8374         * mini.c (mini_method_compile): Don't disable optimizations on large
8375         methods when AOT compiling.
8376
8377         * mini.c (mono_allocate_stack_slots): New arch independent method to 
8378         allocate stack slots. Not yet used.
8379
8380 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
8381
8382         * debug-mini.c (mono_debug_close_method): Plug some leaks.
8383
8384 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
8385
8386         * mini-ppc.c: make the branch info relative as the code
8387         buffer can be reallocated.
8388
8389 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
8390
8391         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
8392         * driver.c: Removed the AOT/security restriction. Now initialize the
8393         security manager (in metadata) if --security is used.
8394         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
8395         rather than the pointer to declarative security, when AOT is used.
8396
8397 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
8398
8399         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
8400         basic blocks, reduced intrinsic exception throwing code size.
8401
8402 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
8403
8404         * driver.c (mini_usage): Reorder the usage screen.
8405
8406 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
8407
8408         * mini.c (mono_resolve_patch_target): Fix warning.
8409
8410 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
8411
8412         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
8413         previous patch.
8414
8415         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8416
8417         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
8418         breaks the amd64 build.
8419
8420         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
8421         register allocation. Fixes #71454.
8422
8423         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8424
8425         * arrays.cs: Add new regression test.   
8426
8427 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8428
8429         * ssapre.c: Turned usage of snprintf to GString.
8430         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
8431         (I left it on by mistake in my previous commit).
8432
8433 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
8434
8435         * mini.c, cfold.c, basic-calls.cs: preserve side effects
8436         on cond branch optimization (fixes bug# 71515).
8437
8438 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8439
8440         * abcremoval.c: Fixed bug 71062.
8441         * abcremoval.h: Likewise.
8442
8443 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8444
8445         * mini.c: Added a new functionality to optimize_branches, the removal
8446         of useless basic blocks, and fixed some problem in the removal of
8447         critical edges; some utility functions added for both purposes.
8448         * ssapre.c: Added complex expression support, and fixed bug 70637.
8449         * ssapre.h: Likewise.
8450         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
8451         enabled in SSAPRE.
8452         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
8453         * driver.c: Re-enabled SSAPRE.
8454
8455 2005-01-19  Martin Baulig  <martin@ximian.com>
8456
8457         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
8458         the result of mono_get_method_constrained().
8459
8460 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
8461
8462         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
8463         manager.
8464
8465 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
8466
8467         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
8468         be detected.  Fixes #59296.
8469
8470 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8471
8472         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
8473         which can happen. Fixes #71361.
8474
8475 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8476
8477         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
8478         manager.
8479
8480 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8481
8482         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
8483         appdomain-unload.exe to fail.
8484         
8485         * mini.c: Fix some memory leaks.
8486
8487 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
8488
8489         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
8490         Fixed bug and sped up some codepaths.
8491
8492 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8493
8494         * mini.c: Fix some memory leaks.
8495
8496         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
8497         conversion.
8498
8499         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
8500
8501         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
8502         #71320.
8503
8504         * iltests.il: Add regression test for #71320.
8505
8506 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
8507
8508         * mini.c (mono_codegen): Fix installation of profiler hooks.
8509
8510         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
8511
8512 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8513
8514         * mini.h, mini.c, cfold.c: optimize access to enum
8515         readonly fields, too. Eval conditional branches if possible
8516         to perform unreachable code removal in more cases.
8517
8518 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
8519
8520         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
8521
8522         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
8523         code manager.
8524
8525         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
8526         WinXP DEP. Fixes #71244.
8527
8528 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
8529
8530         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
8531
8532 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
8533
8534         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
8535
8536 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
8537
8538         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
8539         changes.
8540
8541         * mini.h: Bump AOT version.
8542
8543         * mini.h (MonoCompile): Change exvar to a hash table.
8544
8545         * mini.c: Allocate a separate exvar for each handler block.
8546
8547         * mini.c: Get rid of the computation of filter_lengths, its not needed.
8548
8549         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
8550         ex var with the pending exception and only throw if the two are equal.
8551         Fixes #68552.
8552         
8553         * exceptions.cs: Add tests for rethrow and nested catch clauses.
8554
8555         * mini-x86.c: Fix warnings.
8556
8557         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
8558         used by all the ports now.
8559
8560         * aot.c: Add write-symbols and save-temps options.
8561
8562 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8563
8564         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
8565
8566 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
8567
8568         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
8569         operations.
8570
8571         * tramp-s390.c: Check vtable slot belongs to the domain.
8572
8573         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
8574         as per other platforms.
8575
8576         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
8577
8578 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
8579
8580         * driver.c: we don't run the Main() code in a subthread anymore.
8581
8582 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
8583
8584         * mini.c: added experimental rtc support in the statistical
8585         profiler: if the user has the permission, more accurate statistics
8586         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
8587         The MONO_RTC value must be restricted to what the linux rtc allows:
8588         power of two from 64 to 8192 Hz.
8589
8590 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8591
8592         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
8593
8594 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
8595
8596         * mini-ppc.c: better icache flush for smp.
8597
8598 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
8599
8600         * mini-amd64.c (emit_move_return_value): Fix memory leak.
8601
8602         * mini-x86.c (get_call_info): Add the get_call_info () code from the
8603         amd64 port, not yet used.
8604
8605 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8606
8607         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
8608         a struct type.
8609
8610 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
8611
8612         * driver.c: Added --security option to activate the security manager.
8613         Right now this will allow code generation for declarative demands and
8614         is disabled when AOT is specified.
8615         * mini.c: Add code generation for declarative security demands.
8616         * mini.h: Add mono_use_security_manager as an extern gboolean.
8617
8618 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8619
8620         * aot.c (mono_compile_assembly): Speed up compilation a bit by
8621         emitting more dense assembly code.
8622
8623         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
8624         exception throwing stuff.
8625
8626 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
8627
8628         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
8629         dead code.
8630
8631         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
8632         left in by mistake.
8633
8634         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
8635         fixed.
8636
8637         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
8638
8639         * tramp-*.c: Only patch vtable slots if the object is in the current
8640         domain. Fixes appdomain-unload.exe.
8641
8642         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
8643         
8644         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
8645         x86 branch.
8646
8647 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8648
8649         * mini.c (reverse_branch_op): New helper function.
8650
8651         * mini.c (optimize_branches): Run the new optimization only on 
8652         platforms which support it. Also reverse all kinds of branches.
8653
8654         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
8655
8656         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
8657         a throw statement.
8658
8659         * mini.c (optimize_branches): Reverse not-equals branches if the false
8660         bblock is a throw. This happens a lot of time with argument checking in
8661         corlib.
8662
8663         * mini.c (mono_codegen): Add support for placing basic blocks after
8664         the function epilogue.
8665
8666         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
8667         function epilogue.
8668         
8669 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
8670
8671         * mini.c (setup_stat_profiler): Only set this up if the platform
8672         supports ITIMER_PROF.
8673
8674 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8675
8676         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
8677         previous patch.
8678
8679         * inssel.brg: Fix a warning.
8680
8681 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
8682
8683         * mini.c: added support for statistical profiler 
8684         (run with: --profile=default:stat).
8685
8686 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
8687
8688         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
8689
8690         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
8691
8692         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
8693         related to global registers from the amd64 port.
8694
8695 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
8696
8697         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
8698
8699         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
8700         with global registers.
8701         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
8702
8703         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
8704
8705 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
8706
8707         * debug-mini.c (encode_value): Fix off-by-one.
8708
8709         * aot.c (encode_value): Likewise.
8710
8711         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
8712
8713 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
8714
8715         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
8716         AOT.
8717
8718         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
8719         
8720         * aot.c (emit_method_info): Increase size of temp buffer.
8721
8722         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
8723         the AOT case.
8724
8725 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
8726
8727         * aot.c (emit_method_info): Fix build.
8728         
8729         * aot.c: Further rework of the AOT file format to reduce the size of
8730         the method info data.
8731
8732         * mini.h: Bump AOT file format version.
8733
8734 2004-12-27  Martin Baulig  <martin@ximian.com>
8735
8736         * mini.c (mini_get_method): New static method; call
8737         mono_get_method_full() and mono_get_inflated_method().
8738         (mono_method_to_ir): Use mini_get_method() instead of
8739         mono_get_method_full(). 
8740
8741 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
8742
8743         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
8744
8745 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
8746
8747         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
8748
8749         * inssel-amd64.brg: Add some optimization rules.
8750
8751 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
8752
8753         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
8754         standard not GC'd stuff is fine.
8755
8756 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
8757
8758         * aot.c: Rework the AOT file format to get rid of most of the global
8759         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
8760
8761         * mini.h: Bump AOT file format version.
8762         
8763 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
8764
8765         * mini.h: Bump AOT file format version.
8766
8767         * aot.c (mono_aot_is_got_entry): New function to determine if an 
8768         address is inside a GOT.
8769
8770         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
8771
8772         * cpu-pentium.md: Increase the maximum size of some instructions which
8773         might involve a got access.
8774         
8775         * mini.c (get_method_from_ip): Another debug helper function.
8776
8777         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
8778         when got var accesses are created during the decompose phase.
8779
8780         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
8781
8782         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
8783         argument mini_compile_method and to MonoCompile, and use this to
8784         determine whenever a given method is compiled for AOT. This allows the
8785         other methods compiled during AOT compilation to be free of AOT stuff,
8786         so the backends does not need to add special support for them by
8787         creating a fake GOT etc.
8788
8789         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
8790         longer needed.
8791
8792 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
8793
8794         * mini.c (mono_method_to_ir): It turns out that some of the
8795         x-appdomain wrappers are lax with types, so just ignore this for
8796         all wrappers.
8797
8798         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
8799         at the vtable->klass. If it is non-shared code we can just use the
8800         vtable.
8801
8802 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
8803
8804         * mini-ppc.c: access MonoDomain from tls, too.
8805
8806 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
8807
8808         * declsec.c: Removed unused variable (and related warning ;-)
8809
8810 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
8811
8812         * iltests.il: New test for LDELEMA on an array of ref types.
8813
8814         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
8815         all ldelema's on reftypes.
8816         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
8817         it was the wrong place to put it.
8818
8819         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
8820         register to pop to make this cleaner, at the request of Paolo.
8821
8822 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8823
8824         * mini-ops.h (OP_GETHASHCODE): New op.
8825
8826         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
8827
8828         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
8829         operation.
8830
8831         For a microbenchmark, this reduces the cost of Hashtable.get_Item
8832         by 25%.
8833         
8834         * mini-x86.c (mono_arch_output_basic_block): Rather than
8835
8836         add ebp, 4
8837
8838         Emit
8839
8840         pop edx
8841
8842         The first is 3 bytes while the second is 1. This saves 36 kb on
8843         mscorlib, quite a big saving. When bootstraping mcs, I was able to
8844         see a small boost because of icache locality.
8845
8846         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
8847
8848 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
8849
8850         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
8851         started code sharing with the generic code.
8852
8853 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
8854
8855         * mini-ppc.c, cpu-g4.md: added code for direct access to
8856         tls data slots.
8857
8858 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
8859
8860         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
8861          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
8862         to OP_TLS_GET.
8863
8864 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
8865
8866         * declsec.c|h: Added functions to cache the declarative stack modifiers
8867         in MonoJitInfo and to create a security frame from a MonoJitInfo 
8868         structure.
8869         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
8870         created. Register internal calls for System.Security.SecurityFrame::
8871         _GetSecurityFrame and _GetSecurityStack.
8872         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
8873         the definitions for the new stack walk/callback mechanism.
8874         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
8875         first security frame for LinkDemands and InheritanceDemands) and
8876         GetSecurityStack for Demands. Both use the new mono_walk_stack code
8877         from lupus.
8878         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
8879         walk initialization (lupus).
8880
8881 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8882
8883         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
8884         idiom.
8885         (handle_loaded_temps): Do not create a temporary variable for
8886         things that we know are temps. They will never be modified.
8887         (mono_spill_call): Set MONO_INST_IS_TEMP
8888         (mono_emulate_opcode): ditto
8889         (emit_tree): ditto
8890         (mono_method_to_ir.CEE_DUP): ditto
8891
8892 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
8893
8894         * mini.c (type_to_eval_stack_type): Make this handle the void type
8895         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
8896         (emit_tree): use ip_in_bb to special case some common idioms
8897         Update all callers to pass in the IP.
8898         (mono_method_to_ir): Make CEE_CALL* do the above as well.
8899
8900         This gives us a nice 2% speedup in mcs bootstrap.
8901
8902         * mini-x86.c (peephole_pass): Peephole pass to make
8903         mov  [foo], eax
8904         push [foo]
8905
8906         into
8907
8908         mov [foo], eax
8909         push eax
8910
8911         * mini.c (ip_in_bb): new method.
8912         (mono_method_to_ir): use this method rather than doing the hash
8913         lookup ourselves.
8914
8915         * linear-scan.c (mono_linear_scan): When expiring actives, you
8916         don't need to keep around variables that expire on this
8917         instruction. This makes it so that:
8918              a = b + 1
8919         will turn into:
8920              store (ebx add (ebx, 1))
8921         which will become
8922              add ebx, 1
8923
8924 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
8925
8926         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
8927         combination to avoid doing two copies. Fix up problems with previous
8928         patch.
8929
8930         * mini.c: Fix 64 bit warnings.
8931
8932         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
8933
8934 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
8935
8936         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
8937         changes from the x86 code.
8938
8939         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
8940
8941 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
8942
8943         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
8944         throwing code to reduce its size, unify the AOT and non-aot code and 
8945         get rid of relocations in the AOT case.
8946
8947         * mini-x86.h mini.c exceptions-x86.c 
8948         (mono_arch_get_throw_corlib_exception): New arch specific function to 
8949         raise corlib exceptions which doesn't require relocations in the 
8950         caller.
8951
8952         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
8953
8954 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
8955
8956         * mini.c (mono_emit_method_call): Only allocate the got var when it is
8957         needed.
8958
8959         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
8960         in the AOT case.
8961
8962 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8963
8964         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
8965         with add function when used from Inc/dec atomic 
8966         functions. Re-enabled optimization on x86.
8967         * mini-ops.h: renamed atomic_add functions to
8968         allow _add to match the Interlocked::Add and
8969         _add_next to match Interlocked::Inc/Dec.
8970
8971 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
8972
8973         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
8974         linking of BBs to the end BB, and enabled SSAPRE also with
8975         consprop and copyprop (which was prevented by that bug).
8976
8977 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8978
8979         * mini-x86.c: disabling the Interlocked optimizing code. 
8980
8981 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
8982
8983         * aot.c (load_aot_module): Move reading of got_addr after the AOT
8984         file version check.
8985         
8986 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8987
8988         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
8989         interlocked optimization due lack of support on x86, rewrote 
8990         exchange to take into account that base may be in eax.
8991         
8992         xsp works again; activated Interlocked optimizing code.
8993         
8994 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
8995
8996         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8997
8998 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
8999
9000         * mini-ops.h: Add new opcodes.
9001
9002         * mini.h: Add new patch types. Add got_var to MonoCompile.
9003
9004         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
9005         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
9006         make it work with all kinds of patchable code.
9007
9008         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
9009         address of the GOT, and referencing entries in the GOT.
9010
9011         * mini.c: Add code to load the GOT address if needed by an opcode.
9012
9013         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
9014         independent AOT code on the x86 using an elf-style Global Offset Table.
9015
9016 2004-12-14  Raja R Harinath  <rharinath@novell.com>
9017
9018         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
9019
9020 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9021
9022         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
9023         when running xsp.
9024
9025 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
9026
9027         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
9028         of Interlocked:Increment/Decrement/Add as inline ops.
9029         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
9030
9031 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
9032
9033         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
9034         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
9035
9036 2004-12-12  Duncan Mak  <duncan@ximian.com>
9037
9038         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
9039         again. `patch_info->table_size' is no longer valid after Zoltan's
9040         commit #37636.
9041
9042 2004-12-12  Martin Baulig  <martin@ximian.com>
9043
9044         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
9045         if we are the "real" method, ie. not an inlined method inside it.
9046
9047 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
9048
9049         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
9050         before we look in the special fields table. This fixes
9051         ../tests/thread-static-init.cs.
9052
9053 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9054
9055         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
9056         for Array get_Rank and get_Length. Fixes bug #70465.
9057
9058 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
9059
9060         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
9061         separate structure to reduce the size of MonoJumpInfo.
9062
9063 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
9064
9065         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
9066
9067 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
9068
9069         * mini.c (mini_get_inst_for_method): Changed to allow ports
9070         to return a MonoInst instead of opcode 
9071         (renamed mini_get_opcode_for_method to better reflect the new functionality)
9072         
9073         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
9074         Allow ports to return a created MonoInst instead of op-code, will enable
9075         new optimizations.
9076         (renamed mini_get_opcode_for_method to better reflected the functionality)
9077
9078 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
9079
9080         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
9081
9082 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9083
9084         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
9085         Fixes #69985.
9086
9087 2004-12-08  Martin Baulig  <martin@ximian.com>
9088
9089         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
9090         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
9091
9092 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9093
9094         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
9095         correctly.
9096
9097         * exceptions.cs: Disable some tests which depend on properties of x86 fp
9098         arithmetic.
9099
9100 2004-12-08  Raja R Harinath  <rharinath@novell.com>
9101
9102         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
9103
9104 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
9105
9106         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
9107         bug introduced by the previous patch.
9108
9109 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9110
9111         * mini-ppc.c, objectc.cs: handle large structs passed by value
9112         (fixes bug #69972).
9113
9114 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
9115
9116         * mini-ppc.c: OP_ARGLIST implementation from
9117         Geoff Norton  <gnorton@customerdna.com>.
9118
9119 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
9120
9121         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
9122         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
9123
9124 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9125
9126         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
9127
9128 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9129
9130         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
9131         support.
9132
9133 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
9134
9135         * mini-sparc.c: Zero out localled-ed memory.
9136
9137         * iltests.il: Add tests for zeroing out localloc-ed memory.
9138
9139 2004-12-04  Martin Baulig  <martin@ximian.com>
9140
9141         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
9142         mono_method_get_signature_full().       
9143
9144 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
9145
9146         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
9147         and some utility functions (always for SSAPRE), integrated SSAPRE.
9148         * mini.h: Likewise.
9149         * driver.c: Added ssapre option.
9150         * ssa.c: Small fix on OP_ARG handling.
9151         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
9152         * Makefile.am: Likewise.
9153
9154 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
9155
9156         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
9157         now in the xp code.
9158
9159         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
9160         icall.
9161
9162 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9163
9164         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
9165         
9166         * cpu-s390.md : Increase instruction length of oparglist.
9167
9168         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
9169
9170 2004-11-30  Martin Baulig  <martin@ximian.com>
9171
9172         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
9173         virtual generic methods.  We call a special helper_compile_generic_method()
9174         icall to retrieve the method from the vtable, inflate and compile
9175         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
9176
9177         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
9178
9179 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
9180
9181         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
9182
9183 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
9184
9185         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
9186         Fixes #69929.
9187
9188 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
9189
9190         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
9191         platforms with PIC aot.
9192
9193 2004-11-28  Martin Baulig  <martin@ximian.com>
9194
9195         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
9196         Fixes gen-112.cs.
9197
9198 2004-11-28  Martin Baulig  <martin@ximian.com>
9199
9200         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
9201         the result of mono_type_get_underlying_type() to check whether
9202         we're byref.
9203
9204 2004-11-26  Martin Baulig  <martin@ximian.com>
9205
9206         * mini.c
9207         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
9208         in the g_assert().
9209
9210 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
9211
9212         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
9213         the same way as the other arguments so they won't get clobbered.
9214
9215         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
9216         calls through R11 since it is clobbered by the trampoline code.
9217
9218 2004-11-26  Raja R Harinath  <rharinath@novell.com>
9219
9220         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
9221         pick up in-tree mscorlib.dll.
9222
9223 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
9224
9225         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
9226
9227         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
9228         runtime data/code are now stored in a table similar to the GOT in ELF. 
9229         This allows the code itself to be position independent.
9230
9231         * aot.c: Fix loading of referenced assemblies after the lazy assembly
9232         loading changes.
9233
9234         * aot.c: Attach ELF type (object/function) directives to all global
9235         symbols.
9236
9237         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
9238
9239         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
9240
9241         * mini-amd64.h: Turn on PIC AOT code.
9242
9243         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
9244         returning the offset within an OP_AOTCONST instruction where the GOT
9245         offset needs to be added.
9246
9247         * mini.h: Bump AOT file format version.
9248
9249 2004-11-25  Martin Baulig  <martin@ximian.com>
9250
9251         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
9252         uninflated generic methods.
9253
9254 2004-11-25  Martin Baulig  <martin@ximian.com>
9255
9256         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
9257
9258 2004-11-24  Martin Baulig  <martin@ximian.com>
9259
9260         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
9261         original klass (this only applies for generic instances).
9262
9263 2004-11-24  Martin Baulig  <martin@ximian.com>
9264
9265         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
9266         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
9267         that array).
9268
9269 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
9270
9271         * mini.c (mono_method_to_ir): Disable inlining for methods containing
9272         localloc. Fixes #69678.
9273
9274         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
9275         
9276 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
9277
9278         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
9279         used SSE registers on pinvoke calls. Fixes #69774.
9280
9281 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
9282
9283         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
9284         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
9285
9286 2004-11-23  Raja R Harinath  <rharinath@novell.com>
9287
9288         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
9289         Refer directly to the mcs/ tree.
9290
9291 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9292
9293         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
9294         Check if a trampoline for a synchronized method is required. 
9295
9296 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
9297
9298         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
9299         with localloc if needed. Throe arithmetric exception in
9300         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
9301         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
9302
9303 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
9304
9305         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
9306         types before switching on type.  Fixes #69622.
9307
9308 2004-11-19  Raja R Harinath  <rharinath@novell.com>
9309
9310         * Makefile.am (check-local): New.  Integrate into 'make check'.
9311         (MCS,RUNTIME): Define using in-tree mono and mcs.
9312         (ILASM): New.
9313         (%.exe): Use $(ILASM).
9314
9315 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
9316
9317         * mini-ppc.c: adjust initial prolog size (bug #69691).
9318
9319 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
9320
9321         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
9322         #69664.
9323
9324 2004-11-17  Raja R Harinath  <rharinath@novell.com>
9325
9326         * Makefile.am (clean-local): Rename from 'clean'.
9327
9328 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9329
9330         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
9331         to mono_arch_is_int_overflow. 
9332         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
9333         SIGFPE events.
9334
9335 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
9336
9337         * declsec.c|h: New files to support declarative security attributes.
9338         Added function to check if a method has (applicable) security.
9339         * mini.c|h: Add check for declarative security attributes in
9340         mono_method_check_inlining.
9341         * Makefile.am: Added declsec.c and declsec.h to the build.
9342
9343 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
9344
9345         * mini.c, mini.h: update to keep dynamic code info per-domain.
9346
9347 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
9348
9349         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
9350         (mini_init): Get rid of it from here too.
9351
9352 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
9353
9354         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
9355         implemented OP_RETHROW (patch by Geoff Norton
9356         <gnorton@customerdna.com>).
9357
9358 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
9359
9360         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
9361         between appdomains.  Fixes appdomain-unload on PPC.
9362
9363 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
9364
9365         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9366         mini-exceptions.c: handle the new wrapper types.
9367         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
9368         token value as a MonoClass* when compiling a wrapper.
9369         mono_jit_create_remoting_trampoline now takes an additional
9370         MonoRemotingTarget parameter.
9371         
9372 2004-11-10  Martin Baulig  <martin@localhost>
9373
9374         * mini.c (mono_method_to_ir): Use `generic_container->context'
9375         rather than creating a new one.
9376
9377 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9378
9379         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
9380
9381         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
9382
9383 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
9384
9385         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
9386         the experimental aot cache stuff.
9387
9388 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
9389
9390         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9391         mini-exceptions.c: update to exception clause structure changes.
9392
9393 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9394
9395         * exceptions-x86.c (throw_exception): Fix warnings.
9396
9397         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
9398         for OP_RETHROW.
9399
9400 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9401
9402         * exceptions-sparc.c (get_throw_exception): Really fix this.
9403
9404 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
9405
9406         * tramp-*.c: we no longer support icalls without wrappers, so
9407         a bit of code can be removed here
9408
9409 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
9410
9411         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
9412         patch.
9413
9414         * cpu-sparc.md: Add op_rethrow.
9415
9416         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
9417
9418         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
9419
9420         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
9421         * mini-ops.h: Add OP_RETHROW.
9422
9423         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
9424
9425         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
9426
9427 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
9428         
9429         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
9430         Makes the output much easier to read
9431
9432 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
9433
9434         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
9435         prevents another huge leak when compiling with ssa. Secondly, the
9436         performance of doing this rather than freeing the lists is much
9437         better. GList does a lock every time you allocate a list link,
9438         so that it can use a memory pool. So, it is better to just use
9439         a memory pool of our own.
9440         
9441         * ssa.c, linear-scan.c: replace g_list_remove_link with
9442         g_list_delete.  The remove one does not free the GList, so we were
9443         leaking memory. On -O=all --compile-all with corlib, this cut down
9444         3 MB of allocations.
9445
9446 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
9447
9448         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
9449
9450         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
9451
9452         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
9453         into a new function mono_create_jit_trampoline ().
9454
9455 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
9456
9457         * trace.c (get_spec): Allow tracing of classes without a namespace.
9458
9459 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
9460
9461         * mini.c: Fix pointer overwrite in mini_method_compile.
9462
9463 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
9464
9465         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
9466         The darwin ABI needs some special handling for 1 and 2 byte structs
9467         Lets use lbz/lhz instead of lwz everywhere.
9468         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
9469         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
9470         Use stb/sth for the former, and put the latter always on stack instead of in
9471         argument registers.
9472
9473 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
9474
9475         * trace.c (is_filenamechar): Add '_'.
9476
9477 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
9478
9479         * mini-s390.c: Fix prolog length to allow for large trace requirements.
9480
9481         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
9482
9483 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
9484
9485         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
9486         depends on libmonogc. Fixes #68805.
9487
9488 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
9489
9490         * mini.c (mono_jit_free_method): Provide extra information for
9491         this error.  Currently this leaks, but will be turned into a
9492         developer option in the future.
9493
9494 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
9495
9496         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
9497
9498 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
9499
9500         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
9501         boundary. Fixes reading of PATCH_INFO_R4 and R8.
9502         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
9503
9504 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
9505
9506         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
9507         trampolines for AOT code.
9508
9509 2004-10-22    <vargaz@freemail.hu>
9510
9511         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
9512         constructed types. Fixes #68136.
9513
9514 2004-10-21  Martin Baulig  <martin@ximian.com>
9515
9516         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
9517         if it returns true, unwind the stack to the call instruction.
9518
9519 2004-10-21    <vargaz@freemail.hu>
9520
9521         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
9522
9523         * mini.h: Bump AOT version number.
9524
9525         * objects.cs: Add another test for unbox trampolines.
9526
9527         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
9528         valuetype methods.
9529
9530 2004-10-20    <vargaz@freemail.hu>
9531
9532         * driver.c: Add SHARED to the set of optimizations tested.
9533
9534         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
9535
9536         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
9537         used by CEE_NEWARR.
9538
9539         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
9540
9541 2004-10-20  Martin Baulig  <martin@ximian.com>
9542
9543         * mini-exceptions.c (mono_handle_exception): Call
9544         mono_debugger_handle_exception() to tell the debugger about
9545         catch/finally clauses.
9546
9547 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
9548
9549         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
9550
9551         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
9552         #68447.
9553
9554 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
9555
9556         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
9557         methods as their native size, fixed bug #57543, #57545.
9558         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
9559         This saves a temporary register and mullw call down into 1 (minor perf
9560         increase for cases like sum = sum * 5;  This use to translate into:
9561             li r11,5
9562             mullw r28,r28,r11
9563         It now translates to
9564             mulli r28,r28,5
9565
9566 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
9567
9568         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
9569         #68388.
9570
9571 2004-10-11  Martin Baulig  <martin@ximian.com>
9572
9573         * mini.c (mono_method_to_ir): If we're a generic method, get the
9574         MonoGenericContainer from our MonoMethodNormal and create a
9575         MonoGenericContext from it.
9576
9577 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
9578
9579         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
9580
9581         * basic-long.cs: Add test for checked i8->i2 cast.
9582
9583 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9584
9585         * inssel-ppc.brg: added a couple of speedup rules.
9586
9587 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
9588
9589         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
9590         to speed up rebuilds.
9591
9592 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9593
9594         * mini-s390.c: Minor fix to OP_OR_IMM.
9595
9596 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
9597
9598         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
9599         better. Fixes appdomain-unload.exe on sparc.
9600
9601 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
9602
9603         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
9604         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
9605         see bug 67324.
9606
9607 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
9608
9609         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
9610
9611 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
9612
9613         * mini.c: Always generate a field read/write wrapper for members
9614         of the class MarshalByRefObject since the actual instance could
9615         be a CBO.
9616
9617 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
9618
9619         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
9620
9621 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
9622
9623         * driver.c mini.h trace.c: Move the setting of the main assembly into
9624         a separate function called mono_trace_set_assembly () and call it after
9625         actually loading the main assembly. Fixes #66872.
9626
9627 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
9628
9629         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
9630         using the code manager.
9631
9632 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
9633
9634         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
9635
9636 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
9637
9638         * cpu-amd64.md: Fix bug in previous patch.
9639         
9640         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
9641         #66650.
9642
9643 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
9644
9645         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9646         mini-exceptions.c: updates for changed stack walk interface.
9647
9648 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9649
9650         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
9651
9652 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
9653
9654         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
9655
9656 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
9657
9658         * driver.c (mini_regression_list): Do not call mono_assembly_close 
9659         since assemblies can't be unloaded.
9660         
9661 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9662
9663         * cpu-amd64.md: Fix more instruction lengths.
9664
9665         * cpu-amd64.md: Fix lengths of some instructions.
9666
9667 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
9668
9669         * inssel.brg: Make the array ldelema check aot friendly.
9670
9671 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9672
9673         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
9674
9675         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
9676
9677 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
9678
9679         * mini-x86.c: Fix build.
9680
9681         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
9682         mono_type_get_underlying_type () helper function to simplify code.
9683         
9684 2004-09-09  Martin Baulig  <martin@ximian.com>
9685
9686         * mini-amd64.c: Don't access `type->data.klass' directly, call
9687         mono_class_from_mono_type() instead since the type may be a
9688         generic instance.
9689
9690 2004-09-09  Martin Baulig  <martin@ximian.com>
9691
9692         * mini-amd64.c (get_call_info): Fix support for generic instances.
9693         (add_valuetype): Use mono_class_from_mono_type() to get the class
9694         since we can be a generic instance.
9695
9696 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
9697
9698         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
9699
9700 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
9701
9702         * liveness.c: reset spill costs on each scan: bug 62107
9703
9704 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
9705
9706         * exceptions-sparc.c (mono_arch_find_jit_info): remove
9707         unnecessary line that doesn't compile
9708
9709 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
9710
9711         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
9712         trampolines, make them call an error function so people can fix their
9713         code.
9714
9715 2004-09-06  Martin Baulig  <martin@ximian.com>
9716
9717         * mini.c (mono_method_to_ir): When initializing locals, handle a
9718         generic instances like a valuetype if it's a valuetype and like a
9719         class if it's a class.
9720
9721 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9722
9723         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
9724         stack. Fixes #64674.
9725
9726         * exceptions.cs: Add test for unwinding of call arguments.
9727
9728 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
9729
9730         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
9731         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
9732         set the carry/borrow flag). The sparc and s390 implementations
9733         can now use optimized versions (and simplify the code). ppc bugfixes.
9734
9735 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9736
9737         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
9738
9739 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
9740
9741         * inssel-amd64.brg: Remove leftover 32 bit rule.
9742
9743         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
9744
9745 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
9746
9747         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
9748         mono_arch_find_jit_info functions into a new function. Fix a memory
9749         leak.
9750
9751         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
9752         refactored code.
9753         
9754 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9755
9756         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
9757         as well.
9758         
9759         * exceptions.cs: Add array size tests.
9760
9761         * mini.c: Allocate a separate icall wrapper for each arity of 
9762         mono_array_new_va. Fixes #59509.
9763
9764         * exceptions.cs: Add testcase for 64578.
9765
9766         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
9767
9768         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
9769         
9770 2004-09-02  Martin Baulig  <martin@ximian.com>
9771
9772         * mini.c (mono_method_to_ir): When initializing the locals, call
9773         handle_initobj() on the generic instance itself, not its
9774         underlying type.
9775
9776 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9777
9778         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
9779         MonoJitInfo for dynamic methods.
9780
9781         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
9782
9783         * mini.c: Add support for freeing JIT data for dynamic methods.
9784         
9785 2004-09-01  Martin Baulig  <martin@ximian.com>
9786
9787         * mini-x86.c (is_regsize_var): Added support for generic
9788         instances.
9789         (mono_arch_emit_prolog): Make this compile again, use
9790         `x86_push_imm_template (code)'.
9791
9792 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
9793
9794         * mini-x86.c: make all push_imm instructions that get
9795         patched always emit the long form
9796
9797 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
9798
9799         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
9800         in a per-domain hash.
9801
9802         * mini-amd64.c (merge_argument_class_from_type): Handle generic
9803         types.
9804
9805 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
9806
9807         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
9808         work.
9809         
9810         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
9811         work.
9812
9813         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
9814         Beginnings of SSE2 support.
9815
9816         * exceptions.cs: Add more tests for checked int<->uint casts.
9817
9818 2004-08-28  Martin Baulig  <martin@ximian.com>
9819
9820         * mini-x86.c (mono_arch_instrument_epilog): Added support for
9821         generic instances.
9822
9823         * mini.c
9824         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
9825         Handle generic instances recursively.
9826
9827 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9828
9829         * iltests.il: test for conv.u8 on a constant
9830
9831 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9832
9833         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
9834         LCONV_x4 (shrun_32 (membase)).
9835
9836 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9837
9838         * inssel-x86.brg: c&p rules for push/setret of long
9839
9840 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
9841
9842         * inssel-x86.brg: c&p rules for compare (base, regvar) and
9843         compare (regvar, base)
9844
9845         * inssel-x86.brg: more burg love
9846
9847         * inssel.brg: more cleanup
9848
9849         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
9850
9851 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
9852
9853         * basic-long.cs, basic-calls.cs: new tests for optimization.
9854
9855 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
9856
9857         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
9858         patch.
9859
9860 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
9861
9862         * mini-amd64.c (read_tls_offset_from_method): Add another case.
9863         
9864 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
9865
9866         * inssel.brg (mini_emit_memcpy): use 
9867         NO_UNALIGNED_ACCESS to disable memcpy optimization
9868
9869 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
9870
9871         * mini-amd64.c: Handle generic types in various places.
9872
9873         * mini.c (mono_method_to_ir): Handle generic types in init locals.
9874
9875 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
9876
9877         * mini.c (handle_box): Fix warning.
9878
9879         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
9880
9881         * mini-amd64.h: Enable the emit_state optimization.
9882
9883         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
9884
9885         * mini-amd64.c: Add some new 64 bit peephole opts.
9886
9887         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
9888
9889         * cpu-amd64.md: sreg1 of div instructions must be %rax.
9890
9891         * mini-amd64.c: Register allocator fixes.
9892
9893         * mini.c: Add an optimization to emit_state to avoid allocation of new
9894         registers on some platforms.
9895
9896 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
9897
9898         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
9899
9900         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
9901         allocation. Fixes #63085.
9902
9903         * basic-long.cs: Add new regression test.
9904
9905         * mini-amd64.c: Register allocator improvements.
9906
9907 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
9908
9909         * mini-amd64.c (read_tls_offset_from_method): Add another code
9910         sequence.
9911
9912         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
9913         instruction sequence for nullifying class init trampolines.
9914
9915         * objects.cs: Add new regalloc test.
9916
9917         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
9918
9919 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
9920
9921         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
9922         
9923         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
9924         arguments.
9925
9926         * driver.c: Fix profiling after TLS changes.
9927         
9928         * driver.c (mono_main): Set mono_stats.enabled if needed.
9929
9930         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
9931         CEE_BOX.
9932
9933 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
9934
9935         * mini-x86.c: use a 1 op rather than a 2 op tls access
9936         instruction -> faster.
9937
9938 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
9939
9940         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
9941         x86 backend.
9942
9943 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
9944
9945         * exceptions-sparc.c (throw_exception): fix typo
9946
9947 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
9948
9949         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
9950         set tree->dreg correctly with tls. Allow any
9951         register to be used.
9952
9953         * mini-x86.c (read_tls_offset_from_method): add new code
9954         generation pattern seen with GCC.
9955
9956
9957 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
9958
9959         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
9960         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9961         exceptions-sparc.c: fix some performance issues in exception
9962         handling and setting of the stack trace for exceptions that were
9963         already thrown.
9964
9965 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
9966
9967         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
9968         x86 backend.
9969         
9970         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
9971         registers.
9972
9973 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
9974
9975         This patch inlines tls access, when possible.
9976         
9977         * mini.h: new arch functions for TLS intrinsics.
9978         All platforms updated with a stub.
9979
9980         * mini.c: use the new intrinsics
9981
9982         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
9983         arch specific intrinsic for tls variables
9984
9985 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
9986
9987         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
9988         under windows.
9989
9990 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
9991
9992         * mini.c: thread local allocation
9993
9994 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
9995
9996         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
9997
9998         * Makefile.am: Link against the static version of libmonogc.
9999         
10000         * Makefile.am: Link the static versions of the convenience libraries
10001         into the mono executable.
10002
10003         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
10004
10005 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
10006
10007         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
10008         on integer overflow.
10009
10010         * mini-amd64.c: Reorganize function call code.
10011
10012         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
10013
10014 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10015
10016         * inssel-x86.brg: use xor eax,eax.
10017         
10018         * basic.cs: new tests
10019
10020 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10021
10022         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
10023         in exception throwing code.
10024         
10025 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10026
10027         * inssel-x86.brg: use xor esi,esi.
10028
10029 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10030
10031         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
10032         can trace methods compiled during mini_init () too.
10033
10034         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
10035         CEE_CONV_U4.
10036
10037 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10038
10039         * Makefile.am: static link on x86 (r=zoltan)
10040
10041 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10042
10043         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
10044         code since it causes some programs to fail.
10045
10046 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
10047
10048         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
10049
10050 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10051
10052         * mini.c: ovfops_op_map - add STACK_OBJ case for
10053         CONV_I 
10054         * basic.cs: add test_0_pin_string as test
10055         case for above.
10056
10057 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10058
10059         * Makefile.am: build C# if srcdir != builddir
10060
10061 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10062
10063         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
10064         fall-through blocks.
10065
10066 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10067
10068         * driver.c: enable loop by default again and include abcrem in -O=all.
10069
10070 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
10071
10072         * iltests.il: Add some localloc tests.
10073
10074         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
10075
10076         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
10077         Fixes #62574.
10078
10079         * inssel-amd64.brg: Add some optimizations.
10080
10081         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
10082         for gcc-3.4.
10083
10084         * Makefile.am: Statically link mono against libmono on AMD64.
10085         
10086         * mini-amd64.c inssel-amd64.brg: Optimizations.
10087
10088 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
10089
10090         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
10091
10092         * tramp-amd64.c: Patch calling code in trampolines.
10093
10094 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
10095
10096         * mini-amd64.c: pinvoke struct passing fixes.
10097
10098 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
10099
10100         * mini-sparc.c: redo change, make mono_arch_cpu_init call
10101         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
10102
10103 2004-08-05  Duncan Mak  <duncan@ximian.com>
10104
10105         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
10106         CEE_LDELEM_ANY.
10107
10108 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10109
10110         * mini-amd64.c (emit_move_return_value): Move return value for normal
10111         calls too.
10112
10113 2004-08-05  Martin Baulig  <martin@ximian.com>
10114
10115         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
10116         `type->type'; just modify `type' itself when dealing with enums
10117         and generic instances.
10118         (check_call_signature): Make `simple_type' a `MonoType *'.
10119
10120 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10121
10122         * mini.c: Use OP_PADD to add offsets to addresses.
10123
10124         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
10125
10126 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
10127
10128         * mini-sparc.c (mono_arch_emit_epilog): fix check
10129         for folding last op into restore instruction
10130
10131 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10132
10133         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
10134         helper methods using the code manager.
10135         
10136         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
10137
10138         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
10139
10140 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10141         
10142         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
10143           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
10144
10145         * mini-s390.c: fix tail processing
10146
10147 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
10148
10149         * mini-ppc.c: mul.ovf.un exception name fix.
10150
10151 2004-08-03  Martin Baulig  <martin@ximian.com>
10152
10153         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
10154         instances; before jumping to `handle_enum', also modify `ptype'.
10155
10156 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
10157
10158         * cpu-sparc.md: fcall maximal length too small.
10159
10160 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
10161
10162         * mini-amd64.c mini.h: Add initial support for passing/returning 
10163         structures to/from pinvoked methods.
10164
10165 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
10166
10167         * mini-ppc.c: reg allocator fix.
10168
10169 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
10170
10171         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
10172
10173         * inssel.brg: Optimize memset on 64 bit machines.
10174
10175         * mini-amd64.c: Fix some vararg cases.
10176
10177 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10178
10179         * mini-s390.c: Corrected macro in emit_float_to_int
10180
10181         * s390-abi.cs: Tests to exercise the s390 ABI
10182
10183 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10184
10185         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
10186         caller saved regs.
10187
10188         * basic.cs: Add a test for add.ovf.un.
10189
10190 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
10191
10192         * mini-sparc.c: add case for OP_IDIV_UN
10193
10194 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10195
10196         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
10197         
10198         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
10199
10200 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
10201
10202         * basic.cs: regression tests.
10203
10204         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
10205         regressions.
10206
10207 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10208
10209         * basic.cs: Add a new test.
10210
10211         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
10212         and AOT. Various fixes and optimizations.
10213
10214         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
10215
10216 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10217
10218         * mini-ppc.c: make sure temp regs are not used for global reg
10219         allocation.
10220
10221 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
10222
10223         * cpu-sparc.md: conv_i8 fix for 64bits
10224
10225         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
10226
10227 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
10228         
10229         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
10230         add opcode for cmp BYTE PTR [eax], imm.
10231
10232         * inssel.brg: Make memcpy and memset takes bases.
10233
10234 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10235
10236         * *-amd64.*: More AMD64 work.
10237         
10238 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10239
10240         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
10241         add a compare-not-equal opcode.
10242         
10243 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
10244
10245         * mini.c: Use mono_init_from_assembly instead of mono_init.
10246         
10247 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10248
10249         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
10250
10251         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
10252
10253         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
10254
10255         * inssel.brg: 64 bit fixes.
10256
10257         * mini.h (MonoCallInst): Add some AMD64 specific data.
10258
10259         * mini.h: Add some OP_P opcodes.
10260
10261 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10262
10263         * basic.cs: tests for 61797 and 61740
10264
10265 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10266
10267         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
10268         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
10269
10270 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
10271
10272         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
10273
10274         * *-amd64*.*: Ongoing AMD64 work.
10275
10276 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
10277
10278         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
10279
10280         * *-amd64*: Ongoing AMD64 work.
10281
10282         * mini-arch.h: Add AMD64 support.
10283
10284         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
10285
10286         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
10287
10288         * mini-ops.h: Add new opcodes.
10289
10290         * Makefile.am: Add AMD64 support.
10291
10292         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
10293         rules into the inssel-long*.brg files.
10294
10295         * *-amd64.*: Add beginnings of AMD64 backend.
10296
10297 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
10298
10299         * mini.c (print_dfn): commenting out the code that prints
10300         the cil. With -O=deadce, this makes -v -v crash.
10301         
10302         * cpu-pentium.md: make checkthis have a length of 2
10303
10304 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
10305
10306         * mini-sparc.h: fix implementations of __builtin
10307         functions for Sun compiler for V9.
10308
10309 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
10310
10311         * mini.c: use the new stelem.ref wrapper
10312         * exceptions.cs, arrays.cs: new stelem.ref tests
10313
10314 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10315
10316         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
10317         new XSP should work with these changes).
10318
10319 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
10320         
10321         * inssel-{long32,x86,}.brg: trivial optimizations.
10322         
10323 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
10324
10325         * mini.c: load value when emitting box operation in
10326         constrained calls.
10327
10328 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
10329
10330         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
10331         is one byte shorter than cmp DWORD PTR [eax], 0.
10332
10333 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10334
10335         * inssel-ppc.brg: arguments on the stack are always
10336         relative to the stack pointer (spotted by Neale Ferguson).
10337
10338 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10339
10340         * exceptions-x86.c: delay appending the method name to the trace until
10341         after mono_jit_info_table_find is called, as this gets the real
10342         MonoMethod.
10343
10344 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
10345
10346         * aot.c: register roots
10347
10348 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10349
10350         * aot.c : I could just use PLATFORM_WIN32 flag.
10351
10352 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10353
10354         * aot.c : Reverting the previous fix. This time it broke linux build.
10355
10356 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10357
10358         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
10359
10360 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
10361
10362         * mini.c (handle_stack_args): Remove some more debugging code.
10363         
10364         * mini.c (handle_stack_args): Remove debug output left in by mistake.
10365
10366         * driver.c mini.h aot.c: Allow additional options to be specified with
10367         --aot and pass them to mono_compile_assembly.
10368
10369         * aot.c: Add experimental code to AOT compile all loaded assemblies
10370         on demand and save the code into a cache in the filesystem.
10371
10372         * aot.c: Add support for more wrapper methods.
10373         
10374         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
10375         58863.
10376
10377         * cpu-*.md: Remove removed opcodes.
10378
10379         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
10380         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
10381         related icalls to marshal.c.
10382
10383 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
10384
10385         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
10386
10387         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
10388
10389         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
10390
10391 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
10392         * liveness.c: If liveness is recomputated we need to reset the information
10393         for each variable. This way, if the liveness range has been narrowed
10394         by optimizations that happened after the last computation, we can return
10395         a smaller range.
10396         
10397         For example, if you have
10398         
10399         {
10400                 int i = 0;
10401                 
10402                 // Tons of code that does not affect i
10403                 
10404                 i = foo ();
10405                 ...
10406         }
10407         
10408         i = 0 is dead code and will be removed by SSA. However, when
10409         linear scan gets to the code, i will still appear to be live
10410         throughout the entire block. This prevents good register allocation.
10411
10412 2004-07-06  Martin Baulig  <martin@ximian.com>
10413
10414         * debug-mini.c (mono_debug_init_method): Allow
10415         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
10416         (mono_debug_add_icall_wrapper): New method.
10417
10418         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
10419
10420 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
10421
10422         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
10423         optimization.
10424
10425 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
10426
10427         * aot.c (mono_aot_load_method): Fix loading of debug info.
10428
10429 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10430
10431         * aot.c: Add logging support.
10432
10433 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10434
10435         * mini.h: Add prototype for mono_print_method_from_ip.
10436
10437         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
10438
10439         * inssel.brg: 64 bit fixes.
10440
10441         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
10442         inssel-long32.brg.
10443
10444         * Makefile.am: Add SPARC64 support.
10445
10446 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10447
10448         * aot.c: Fix alignment problems on 32 bit platforms.
10449
10450 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10451
10452         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
10453         SPARC64.
10454
10455         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
10456         problems.
10457
10458         * mini.h: Bump AOT file version. Some 64 bit fixes.
10459
10460 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10461
10462         * inssel-sparc.brg: Add new rule to avoid register moves.
10463
10464         * inssel.brg: Add ldind_to_load_membase helper function.
10465
10466 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
10467
10468         * mini.c: OffsetToStringData intrinsic.
10469         
10470 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10471
10472         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
10473
10474         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
10475         regression tests.
10476
10477         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
10478 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
10479
10480         * mini.c: reinstated mono_compile_get_interface_var()
10481         on x86, too, since the change breaks the Gtk# build there as well.
10482
10483 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10484
10485         * driver.c: remove loop from the default optimizations: it seems to
10486         interact badly with some of the other options (see bug #60613).
10487
10488 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
10489
10490         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
10491         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
10492
10493 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
10494
10495         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
10496         vararg-using methods.
10497
10498 2004-06-21  Martin Baulig  <martin@ximian.com>
10499
10500         * mini/mini-exceptions.c
10501         (mono_handle_exception): Added `gpointer original_ip' argument.
10502         After calling mono_unhandled_exception(), call
10503         mono_debugger_unhandled_exception() and if that returns true,
10504         restore the context and return.
10505
10506 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10507
10508         * mini-ppc.c: prefer the use of relative branches so
10509         they won't need to be patched in aot code (patch from Patrick Beard).
10510
10511 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10512
10513         * aot.c: patch from Patrick Beard to make the output assembly
10514         more correct for the MacOSX assembler. Small tweak to
10515         generate sane images on Linux/PPC, too.
10516
10517 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10518
10519         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
10520         case until bug #59509 is fixed (shows up in #60332).
10521
10522 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10523
10524         * mini.c: make sure the needed wrappers are compiled, too, with
10525         precomp.
10526
10527 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
10528
10529         * driver.c: remove NPTL reference in --version output.
10530
10531 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10532
10533         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
10534         generate valid assembly for the Mach-O assembler.
10535
10536 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10537
10538         * driver.c: don't include abcrem in the all optimization specifier
10539         since it slows down jit compilation too much for now.
10540
10541 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
10542
10543         * mini.c: use BIGMUL only if both operands have the same signage.
10544         * iltests.il: Test for bug 60056. (errors related to signage in
10545         BIGMUL).
10546
10547         r=lupus.
10548
10549 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
10550
10551         * mini.c, aot.c: memory leak fixes.
10552
10553 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10554
10555         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
10556
10557 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
10558
10559         * Makefile.am: remove the -static hack completely, it links in
10560         statically glib as well.
10561
10562 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
10563
10564         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
10565         * exceptions.cs: make it compile with new mcs/csc.
10566
10567 2004-06-03 Massimiliano Mantione <massi@ximian.com>
10568         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
10569         and added relevant test case.
10570
10571 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10572
10573         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
10574         regressions in gtk-sharp.
10575
10576 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
10577
10578         * exceptions.cs: New regression tests.
10579
10580         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
10581
10582 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
10583
10584         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
10585
10586 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
10587
10588         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
10589
10590         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
10591
10592 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
10593
10594         * mini.c (mono_jit_runtime_invoke): Init class in this
10595         method instead of trusting mono_jit_compile_method to
10596         do the work (because wrappers can be in object class)
10597
10598 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
10599
10600         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
10601
10602         * basic-long.cs: New regression test.
10603
10604 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
10605
10606         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
10607         and div/rem checks.
10608
10609 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
10610
10611         * Makefile.am: fix miguel's change to build mono statically against
10612         libmono (track build dependencies).
10613
10614 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10615
10616         * cfold.c: Some glib versions do not have G_MININT32.
10617
10618 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
10619
10620         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
10621         with precision of tan, atan, sin and cos, and implemented related
10622         regressions tests (fixes bug 54467, but one new problem appeared and
10623         is not fixed yet).
10624
10625 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10626
10627         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
10628
10629         * exceptions.cs: Add test for constant folding && division by zero.
10630
10631         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
10632         since driver.c is in libmono too, so the optimization was useless.
10633
10634         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
10635         variable to driver.c so the compiler can emit more efficient code to
10636         access them.
10637
10638 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10639
10640         * Makefile.am: don't distribute generated inssel.[ch] files.
10641
10642 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
10643
10644         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
10645         into the default appdomain. Fixes #58707.
10646
10647         * jit-icalls.c: Remove the broken approximation for truncl, doing
10648         no conversion is better.
10649
10650         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
10651         Fixes #58863.
10652
10653 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
10654
10655         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
10656         of the mcrxr instruction which is not available on some processors
10657         even if it's documented to be. Implement add and sub overflow correctly
10658         (still not complete for long unsigned). Speed up icalls a bit.
10659
10660 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
10661
10662         * mini.c (mono_jit_compile_method_with_opt): Make sure that
10663         we run .cctor in the current domain instead of target_domain.
10664         
10665         Fixes bug #58558, .cctor not being called in -O=shared.
10666
10667 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10668
10669         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
10670
10671 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
10672
10673         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
10674         which can be done with an imm8, do it that way.
10675         (mono_arch_output_basic_block): ditto for a jmp
10676         (mono_arch_emit_prolog): Computate maximum offset of a label.
10677
10678 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
10679
10680         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
10681         now tries to allocate prefered physical reg's for virtual
10682         regs. This reduces the number of emited spills/loads with
10683         20-30% on our core assemblies.
10684
10685 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10686
10687         * jit-icalls.c: truncl() is not needed and trunc() is
10688         the correct thing to do anyway (bug #58287).
10689
10690 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
10691
10692         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
10693         if available.
10694
10695 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10696
10697         * driver.c: enable loop optimizations by default.
10698
10699 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10700
10701         * mini-x86.c: fix calc of max loop size when aligning loops start.
10702
10703 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
10704
10705         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
10706         the stack.
10707
10708 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
10709
10710         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
10711         should set carry.
10712
10713         * basic-long.cs: Add tests for add/subtract of immediates with carry.
10714
10715         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
10716         
10717         * mini.c (inline_method): Allways inline some wrappers even if the cost
10718         is too large. Fixes #58785.
10719
10720         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
10721         
10722 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
10723
10724         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
10725         (crichton@gimp.org). Beginning of support for sparc/linux.
10726
10727         * mini-sparc.c: Optimize retrieval of LMF address.
10728
10729 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
10730
10731         * exceptions-ppc.c:  handle alloca in methods with clauses.
10732
10733 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
10734
10735         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
10736
10737 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
10738
10739         * mini.c: Delegate most of the abort signal work to 
10740           mono_thread_request_interruption, which also handles Stop and Suspend
10741           states.
10742
10743 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
10744
10745         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
10746         supports the save/restore lmf opcodes.
10747
10748 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
10749
10750         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
10751         by gcc-3.4 as well.
10752
10753         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
10754
10755 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10756
10757         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
10758         methods which contain array accesses.
10759
10760         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
10761         boundaries. Fixes #58537.
10762
10763         * iltests.il: Add regression test for #58537.
10764
10765 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10766
10767         * mini-x86.c (mono_arch_local_regalloc): Last part of
10768         fix for bug #58633 (releasing register to early).
10769
10770 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
10771
10772         * basic-long.cs: Add new regression test.
10773
10774 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10775
10776         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
10777         register too early on the chain.
10778
10779 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10780
10781         * mini.c (create_helper_signature): Use a helper function to reduce
10782         the code which needs to be written. Also set the calling convention of
10783         icalls on windows. Fixes #57840.
10784
10785 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10786
10787         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
10788         exceptions-ppc.c: added helper function to get the instruction address
10789         from a signal handler context.
10790
10791 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10792
10793         * helpers.c: use g_get_tmp_dir. Invokes happyness 
10794         from gonzalo.
10795
10796 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10797
10798         * helpers.c: Add new env variable to pass args to objdump.
10799         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
10800
10801 2004-05-17  Radek Doulik  <rodo@ximian.com>
10802
10803         * Makefile.am (common_sources): added abcremoval.h so it get
10804         disted and daily mono packages on go-mono.com will build again
10805
10806 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
10807
10808         * abcremoval.c: Fixed coding style, added copyright header.
10809
10810         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
10811
10812         * mini.h: Added prototype for abc removal main function.
10813
10814         * build_relations_propagation_table.pl: Added copyright header.
10815
10816 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
10817
10818         * basic-long.cs: reg test for complex ceq_long bug.
10819
10820 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
10821
10822         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
10823         reg in long and clob case (bug #58343). Fixed/added comments.
10824
10825 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
10826
10827         * mini.c (mono_jit_runtime_invoke): Follow new convention
10828         of calling the invoke method with an function pointer.
10829
10830 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
10831
10832         * ChangeLog: Fix author of memory leak patch.
10833
10834 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
10835
10836         * Makefile.am: fix make dist as well...
10837
10838
10839 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
10840
10841         * cfold.c: Made so that conversions from pointer to int4 are no-ops
10842         on archs where pointers are 4 bytes long.
10843
10844         * Makefile.am: Added abcremoval.c source file.
10845
10846         * abcremoval.c: Added abcremoval.c.
10847
10848         * abcremoval.h: Added abcremoval.h.
10849
10850         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
10851
10852         * inssel.brg: Enabled bounds check removal.
10853
10854         * mini.c: Added support for abcrem optimization.
10855
10856         * mini.h: Added abcrem optimization label.
10857
10858         * driver.c: Added support for abcrem optimization.
10859
10860         * propagated_relations_table.def: Added propagated_relations_table.def.
10861
10862 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
10863
10864         * mini.c, cfold.c: fix style.
10865
10866 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10867
10868         * mini.c: handle issue with the low-level implementation of
10869         some long opcodes (bug #54209).
10870
10871 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
10872
10873         * basic.cs: test for my new cmov stuff.
10874
10875 2004-05-13      Patrik Torstensson
10876
10877         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
10878         opt and added peephole documentation.
10879
10880 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
10881
10882         * tramp-ppc.c: rewrote the generic trampoline code.
10883
10884 2004-05-11      Patrik Torstensson
10885
10886         * mini-x86.c: optimize long shl/shr asm code (one less branch)
10887
10888 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
10889
10890         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
10891
10892         * mini.h mini.c dominators.c: Applied patch from Derek Woo
10893         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
10894
10895         * mini.c: Add new icalls for AsAny marshalling.
10896
10897 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10898
10899         * tramp-ppc.c, mini-ppc.c: more cleanups.
10900
10901 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10902
10903         * mini.c: no warnings.
10904
10905 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10906
10907         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
10908
10909 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
10910
10911         * mini.c: In the thread abort signal handler, if the thread is in the
10912         process of being stoped, don't throw the Abort exception, just stop the
10913         thread.
10914
10915 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
10916
10917         * tramp-ppc.c: removed old code.
10918
10919 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10920
10921         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
10922         do some simple speed optimizations on ppc.
10923
10924 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10925
10926         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
10927         and large offsets in load/store.
10928
10929 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
10930
10931         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
10932         it causes regressions.
10933
10934 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
10935
10936         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
10937         support.
10938
10939 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10940
10941         * jit-icalls.c: remove warnings.
10942         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
10943         speedups for unsafe code.
10944
10945 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
10946
10947         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
10948
10949 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
10950
10951         * basic-calls.cs: Add new regression test.
10952
10953         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
10954         more portable.
10955
10956         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
10957
10958         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
10959         is no longer used.
10960
10961 2004-05-06      Patrik Torstensson
10962
10963         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
10964         long reg allocation in any reg (not only eax:edx) and implemented 
10965         long shl/shr ops in asm instead of helpers.
10966
10967 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
10968
10969         * mini-sparc.h: Fix warnings.
10970
10971         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
10972         stack.
10973
10974         * mini-exceptions.c (mono_handle_exception): Call the filter in a
10975         separate statement for clarity.
10976
10977         * mini-sparc.c: Update status.
10978
10979 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
10980
10981         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
10982         here.
10983
10984 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10985
10986         * inssel-ppc.brg: another small pre-release workaround:
10987         we don't do overflow detection for long_sub_un.
10988
10989 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10990
10991         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
10992         (also works around a weird ppc bug: 57957).
10993
10994 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
10995
10996         * tramp-ppc.c: trampoline fixes.
10997
10998 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
10999
11000         * mini-ppc.c: fixed typos.
11001
11002 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11003
11004         * mini-ppc.c, exceptions-ppc.c: more code saves registers
11005         at the top of the stack. Fixed typos. Use a frame registers
11006         for all the methods with exception clauses.
11007
11008 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11009
11010         * exceptions-ppc.c: restore fp registers.
11011
11012 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
11013
11014         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
11015         order from the stack top (moved the stack room to save the
11016         return value for trace after the param area). Fixed corruption
11017         in restoring registers on unwind.
11018
11019 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11020
11021         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
11022
11023 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11024
11025         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
11026         and prolog/epilog for methods that use it. Allow
11027         enough param area room for varargs methods. Fix miguel's
11028         breakage in exception handling.
11029
11030 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11031
11032         * Makefile.am: run genmdesc only on current arch.
11033
11034 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11035
11036         * exceptions-x86.c:
11037         * mini-x86.h: fix the build on windows.
11038
11039 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
11040
11041         * 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.
11042
11043         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
11044
11045         * mini-exceptions.c: New file.
11046         
11047         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
11048         Move some parts of the x86 exception handling code to an 
11049         arch-independent file so it can be shared with other ports.
11050
11051 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
11052
11053         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
11054
11055 2004-04-26  David Waite  <mass@akuma.org>
11056
11057         * driver.c: remove comma from end of enumeration declaration
11058
11059 2004-04-26  Jackson Harper  <jackson@ximian.com>
11060
11061         * driver.c: parse config file before loading first assembly. This
11062         allows the user gac to be enabled/disabled. 
11063         
11064 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
11065
11066         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
11067         simpler mechanism: we do not care what is encoded initially
11068         (branch absolute or relative), we care about the code and its
11069         target.  I kept the old code for reference for now.
11070
11071         The new code tries first to determine if the jump is anywhere in
11072         the -/+32 absolute meg range, if it succeeds, it encodes using the
11073         absolute branch;  If not, it tried to find something in the
11074         relative range, if not, it uses the handle_thunk code. 
11075
11076 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
11077
11078         * exceptions-ppc.c: use the correct ip register on macosx.
11079
11080 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
11081
11082         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
11083
11084 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
11085
11086         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
11087         Raise exception on integer divide by zero by hand since the hw
11088         doesn't support it. Handle NaNs in FP compares.
11089
11090 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
11091
11092         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
11093         code reducing duplication between the platforms and enabled
11094         signal exception handling (on linux for now).
11095
11096 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
11097
11098         * exceptions-ppc.c: more macosx support.
11099
11100 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11101
11102         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
11103
11104 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
11105
11106         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
11107
11108 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11109
11110         * iltests.il: more tests.
11111
11112 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11113
11114         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
11115         vars as well.
11116
11117 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11118
11119         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
11120
11121 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11122
11123         * liveness.c: Mark variables as volatile in all basic blocks reachable
11124         from exception clauses.
11125
11126 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
11127
11128         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
11129         inlining.
11130
11131 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11132
11133         * iltests.il, basic.cs: more tests for regalloc.
11134
11135 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11136
11137         * iltests.il: Some tests for register allocation modifications
11138         I have locally.
11139
11140 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
11141
11142         * exceptions.cs: Add regression test for bug #56782.
11143
11144         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
11145         original stack trace if an exception is rethrown. Fixes #56782. Oh,
11146         the beauty of fixing the same thing in 5 different files...
11147
11148 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
11149
11150         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
11151         methods.
11152
11153 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
11154
11155         * mini.c: Add support for STRWLPARRAY marshalling convention.
11156
11157 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11158
11159         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
11160         to init the context to setup the regs pointer).
11161
11162 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11163
11164         * exceptions-ppc.c: more exceptions work.
11165
11166 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11167
11168         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
11169         not allowed.
11170
11171 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11172
11173         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
11174         can use the memory directly.
11175
11176         * cpu-pentium.md: Update documentation from a post from Zoltan. 
11177
11178         add x86_add_membase, x86_sub_membase, x86_mul_membase
11179
11180 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11181
11182         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
11183         GENERAL_REGS they were also hardcoded for all PPC ports.
11184
11185         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
11186
11187         Remove hard-coded limit for floating point registers, use
11188         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
11189
11190         Notice that in MacOS X calling conventions you can fit a lot more
11191         floating point values in registers, so I should update the PInvoke
11192         test to excercise the passing of floating point values on the
11193         stack (currently broken).
11194         
11195 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
11196
11197         * tramp-ppc.c (create_trampoline_code): Added
11198         JUMP_TRAMPOLINE_SIZE. 
11199         (ppc_magic_trampoline): Follow the pattern from
11200         x86_magic_trampoline: if code is set to zero, return. 
11201         (create_trampoline_code): Always pass MonoMethod to the jump
11202         trampoline, before it was passing a null.
11203         (mono_arch_create_jump_trampoline): Implement the jump stub, could
11204         share the code with mono_arch_create_jit_trampoline. 
11205
11206         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
11207         implemented.
11208         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
11209         implemented.  
11210
11211         * cpu-g4.md: Added length for jmp instruction, the worst case
11212         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
11213         for save_lmf).
11214
11215 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
11216
11217         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
11218
11219 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
11220
11221         * mini.c: Only set bblock->real_offset when adding a new bblock, and
11222         before each IL instruction.
11223
11224         * mini.c (CEE_BOX): Fix warnings.
11225
11226 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11227
11228         * mini.c: removed a few unused vars and extra whitespace.
11229
11230 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
11231
11232         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
11233         checks.
11234         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
11235         index.
11236         (OP_GETCHR): use the above
11237         (CEE_LDELEMA): use the above.
11238
11239         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
11240         version of the generic impl.
11241         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
11242         (CEE_LDELEMA): use the above.
11243
11244 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11245
11246         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
11247         Fixes #56317.
11248
11249         * iltests.il: Added new regression test for #56317.
11250
11251 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11252
11253         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
11254         under NetBSD. Fixes #56450.
11255
11256         * liveness.c (update_gen_kill_set): Fix previous patch.
11257
11258 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11259
11260         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
11261
11262 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
11263
11264         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
11265         ldsfld and ldsflda.
11266
11267         * inssel-sparc.brg: Add more optimizations.
11268
11269         * mini-sparc.c: Replace multiply/divide with shifts if possible.
11270
11271 2004-04-01  Martin Baulig  <martin@ximian.com>
11272
11273         * mini.c (handle_box): New static function; moved the
11274         implementation of CEE_BOX here.
11275         (mono_method_to_ir): Added `constrained_call' variable.
11276         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
11277         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
11278         mono_method_get_constrained() to get the method.
11279
11280 2004-04-01  Martin Baulig  <martin@ximian.com>
11281
11282         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
11283         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
11284         (mono_method_to_ir): We don't need these macros anymore since
11285         mono_class_get_full() already takes care of it. 
11286
11287 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11288
11289         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
11290         use @function (as doesn't accept #function here) and check the return
11291         value of system and stop if fails.
11292
11293 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11294
11295         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
11296
11297 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
11298
11299         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
11300
11301         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
11302
11303         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
11304         #56223.
11305
11306         * basic-long.cs: Add test for negation of Int64.MinValue.
11307
11308 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
11309
11310         * mini-sparc.c: Update status.
11311
11312         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
11313
11314         * exceptions-sparc.c: Fix return value in filters.
11315
11316         * inssel-sparc.brg: Fix register allocation in some rules.
11317
11318 2004-03-28  Martin Baulig  <martin@ximian.com>
11319
11320         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
11321         if neccessary.  
11322
11323 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
11324
11325         * mini-x86.c (mono_arch_patch_code): Fix warnings.
11326         
11327         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
11328         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
11329         remove unused conv_u4 opcode.
11330
11331         * mini-x86.c: Remove valgrind workaround since it slows down things
11332         even when mono is not run under valgrind.
11333
11334 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
11335
11336         * mini-sparc.c: Update status.
11337
11338         * inssel-sparc.brg: Add some optimizations.
11339
11340         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
11341         future delay slot filling. Add support for varargs, tail calls and JMP.
11342
11343         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
11344         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
11345
11346         * inssel.brg: Fix register allocation in OP_ARGLIST.
11347
11348         * inssel.brg: Fix warnings.
11349
11350 2004-03-25  Martin Baulig  <martin@ximian.com>
11351
11352         * mini.c (inflate_generic_field): Removed.
11353         (mini_get_method): Removed, use mono_get_method_full(),
11354         (mini_get_class): Removed, use mono_class_get_full().
11355         (mono_method_to_ir): Pass our generic context to
11356         mono_field_from_token().        
11357
11358 2004-03-25  Martin Baulig  <martin@ximian.com>
11359
11360         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
11361         of a `MonoMethod *'.
11362         (mini_get_method): Take a `MonoGenericContext *' instead
11363         of a `MonoMethod *'.
11364         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
11365         a new local variable called `generic_context' which holds the
11366         current `MonoGenericContext *'; use it to lookup things.
11367
11368 2004-03-24  Martin Baulig  <martin@ximian.com>
11369
11370         * mini.c (mini_get_class): New static method; if we're inside a
11371         generic instance, inflate the class if neccessary.
11372         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
11373
11374 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
11375
11376         * iltests.il: New regression test for #55976.
11377
11378         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
11379         #55976.
11380
11381 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11382
11383         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
11384         output.
11385
11386 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11387
11388         * liveness.c: Consider SSA stores as well as loads when making vars
11389         volatile.
11390
11391         * exceptions.cs: New regression tests for register allocation.
11392         
11393 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
11394
11395         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
11396         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
11397           domain lock only to protect puntual access to data structures.
11398           Added access lock for sighash, jit_icall_hash_name, 
11399           jit_icall_hash_addr and domain->code_mp.
11400
11401 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
11402
11403         * driver.c: Print SIGSEGV handling method.
11404
11405         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
11406
11407         * mini.c (setup_jit_tls_data): Handle case when this is called
11408         multiple times for a thread.
11409
11410         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
11411         is different from fbxx_un. Fixes #54303. Also use constants instead of
11412         magic numbers in a lot of places.
11413
11414 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
11415
11416         * exceptions.cs: Fix cctor test when --regression is used.
11417
11418 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
11419
11420         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
11421         for Linux/ppc.
11422
11423 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11424
11425         * inssel-ppc.brg: fixed register assignments for some rules.
11426
11427 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11428
11429         * exceptions.cs: Add test for exceptions in static constructors.
11430
11431         * mini.c (mono_jit_compile_method_with_out): Move the calling of
11432         static constructors outside the domain lock. Fixes #55720.
11433
11434 2004-03-17  Martin Baulig  <martin@ximian.com>
11435
11436         * mini.c (get_generic_field_inst): Removed, this'll never happen.
11437         (inflate_generic_field): Take the `MonoMethod *' instead of the
11438         `MonoClass *' and added support for generic method.
11439         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
11440         have a `field->parent->gen_params', only inflate the field if it's
11441         an open constructed type.
11442
11443 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11444
11445         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
11446         exception object instead of the preconstructed ones.
11447
11448 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11449
11450         * mini.c: reverted changed to sigsegv_signal_handler commited
11451         accidentally in the previous patch.
11452
11453 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11454
11455         * mini.c:
11456         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
11457         running --aot with an old assembly.
11458
11459 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
11460
11461         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
11462         point values.
11463
11464         * mini-sparc.c: Add support for v9 branches with prediction.
11465
11466 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
11467
11468         * mini.c (mini_init): #warning is GNUC only
11469
11470         * mini-sparc.h: implement __builtin_frame_address
11471         and __builtin_return_address for Sun C compiler
11472
11473 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
11474
11475         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
11476
11477 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
11478
11479         * basic-calls.cs: Add test for unaligned byref long argument passing.
11480
11481         * mini-ops.h: Add sparcv9 compare and branch instructions.
11482
11483         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
11484         v9 instructions if we have a v9 cpu.
11485
11486         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
11487         registers for global allocation.
11488
11489         * exceptions-sparc.c: Fixes.
11490         
11491 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
11492
11493         * liveness.c (mono_analyze_liveness): Optimized version.
11494
11495         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
11496
11497         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
11498         sparc work.
11499
11500         * basic-float.cs basic-calls.cs: New regression tests.
11501
11502 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
11503
11504         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
11505         sigaltstack implementation.
11506
11507         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
11508         
11509         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
11510         stuff if SIGSEGV_ON_ALTSTACK is not defined.
11511
11512 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
11513
11514         * mini.c: Fix warnings.
11515         
11516         * mini.c (mono_resolve_patch_target): New function which contains the
11517         arch independent part of the patching process.
11518
11519         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
11520         patching code to a separate function.
11521
11522 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
11523
11524         * mini.c (add_signal_handler): ifdef out on Windows
11525
11526 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
11527
11528         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
11529         cpu-sparc.md: Add exception handling support + other fixes.
11530
11531         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
11532         typed GC detection in --version.
11533
11534         * basic.cs exceptions.cs: New regression tests.
11535
11536         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
11537         the arch specific code can store data during a compilation.
11538
11539         * mini-ops.h: Add OP_SETFRET.
11540
11541         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
11542         function, register a separate icall for each arity, so the icalls can
11543         get a wrapper.
11544         
11545         * mini.c (mono_print_tree): Print negative offsets in a more readable
11546         form.
11547         
11548         * mini.c: Make signal handling work on sparc.
11549         
11550         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
11551
11552         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
11553
11554         * jit-icalls.c: Emulate truncl by aintl on solaris.
11555
11556         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
11557
11558 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
11559
11560         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
11561
11562 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
11563
11564         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
11565         a MarshalByRef type, inline a method that performs the check, taking into
11566         account that the object can be a proxy. Also implemented tow new opcodes:
11567         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11568         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
11569         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11570
11571 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11572
11573         * mini-ppc.c: if a relative branch displacement is too big
11574         but it points to and area reachable with an absolute branch, 
11575         avoid the thunks.
11576
11577 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11578
11579         * mini.c: optimize small copies in cpblk.
11580
11581 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
11582
11583         * basic-calls.cs basic-float.cs: New regression tests.
11584
11585         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
11586         negative offsets from %fp. Implement localloc. Fix local register 
11587         allocation. Fix the case when the this argument needs to be saved to
11588         the stack. Implement some missing opcodes.
11589
11590 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
11591
11592         * mini.c (mini_method_compile): Reenable global regalloc in methods
11593         with exception handlers.
11594
11595         * linear-scan.c (mono_varlist_sort): Fix warning.
11596
11597         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
11598
11599         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
11600         regalloc costs.
11601
11602         * liveness.c: Make all variables uses in exception clauses volatile, to
11603         prevent them from being allocated to registers. Fixes #42136.
11604
11605 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
11606
11607         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
11608         causes regressions.
11609
11610         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
11611         argument to mono_arch_regalloc_cost.
11612
11613         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
11614         precisely.
11615
11616 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
11617
11618         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
11619         Make the cost of allocating a variable to a register arch dependent.
11620
11621         * basic-calls.cs: Fix compilation of tests.
11622         
11623         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
11624         helper function to cut back on the number of #ifdefs needed.
11625
11626         * mini-ppc.c: Fix compilation.
11627
11628         * basic-calls.cs: New regression tests.
11629
11630         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
11631
11632         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
11633         of l0 since that is callee saved.
11634
11635         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
11636         to virtual calls.
11637
11638         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
11639         of delay instruction.
11640
11641         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
11642
11643         * mini.h (MonoCallInst): Add 'virtual' flag.
11644
11645         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
11646
11647 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
11648
11649         * *.cs: New regression tests.
11650
11651         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
11652         work.
11653
11654         * mini.c (mono_runtime_install_handlers): Fix build.
11655
11656         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
11657         'signal_stack_size' members.
11658
11659         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
11660         alternate signal stack.
11661
11662         * exceptions-x86.c: Add stack overflow handling.
11663
11664         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
11665         functions to arch independent code.
11666
11667         * mini.c (mono_print_tree): Print more detailed info for load_membase
11668         opcodes.
11669         
11670 2004-02-23  Martin Baulig  <martin@ximian.com>
11671
11672         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
11673
11674 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11675
11676         * mini-x86.c: fixed reg allocation for div/rem.
11677
11678 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
11679
11680         * driver.c (mono_main): Report some configuratio options on --version.
11681
11682 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
11683
11684         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
11685         low in the address space. Correctly flush memory in thunks where we
11686         output native code.
11687
11688 2004-02-20  Martin Baulig  <martin@ximian.com>
11689
11690         * mini.c (mini_get_method): New static method; inflate all generic
11691         methods and methods in open generic instances.
11692         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
11693         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
11694
11695 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11696
11697         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
11698
11699         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
11700
11701 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
11702
11703         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
11704
11705         * mini-sparc.c (flushi mono_arch_output_basic_block): make
11706         it compile using Sun's compiler.
11707
11708 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11709
11710         * 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.
11711
11712         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
11713
11714 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11715
11716         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
11717         code.
11718         * mini-ppc.c: handle calls outside of the allowed range with thunks
11719         allocated using the code manager.
11720         * tramp-ppc.c: use the code manager to hold generated native code.
11721         Fixed the magic trampoline to just patch vtable entries.
11722
11723 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
11724
11725         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
11726         independent file.
11727
11728 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
11729
11730         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
11731         PPC.
11732
11733         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
11734         if we have a working __thread implementation.
11735
11736         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
11737         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
11738
11739 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
11740
11741         * mini-x86.c: Fix compilation under gcc 2.
11742         
11743 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
11744
11745         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
11746         contains a call to the wrapped function.
11747
11748         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
11749         OP_<CALL>_IMM opcodes, and use them under X86.
11750         
11751         * mini.c (mono_jit_find_compiled_method): Fix warning.
11752
11753         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
11754
11755         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
11756
11757         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
11758         functionality to mini.c.
11759
11760         * mini.c (mono_create_jump_trampoline): New function to create a jump
11761         trampoline. Return a compiled method instead of a trampoline if it
11762         exists. Add a cache for jump trampolines.
11763
11764         * mini.c (mono_jit_find_compiled_method): New function to return a
11765         compiled method if it exists.
11766
11767         * mini-x86.c: Call mono_create_jump_trampoline instead of 
11768         mono_arch_create_jit_trampoline.
11769
11770         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
11771         a jump trampoline. Fixes #52092.
11772         
11773 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
11774
11775         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
11776         which is not up-to-date. Add check_corlib_version () instead.
11777
11778         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
11779         have to call it.
11780         
11781         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
11782         since newer valgrind versions do not need it.
11783
11784         * mini.c (mono_jit_compile_method_with_opt): New helper function to
11785         compile a method with a given set of optimizations.
11786
11787         * mini.c: Compile icall wrappers on-demand instead of at startup.
11788
11789         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
11790         wrapper for an icall.
11791
11792 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
11793
11794         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
11795         #54063.
11796
11797         * iltests.il: Add test for non-empty stack before switch instruction.
11798
11799 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
11800
11801         * mini.c: Add support for new stringbuilder marshalling conventions.
11802
11803         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
11804
11805 2004-02-01  Martin Baulig  <martin@ximian.com>
11806
11807         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
11808         in `ginst->mtype_argv'.
11809
11810 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
11811
11812         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
11813         facilitate grepping.
11814
11815 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
11816
11817         * mini.c: fixed buglet in initobj generic implementation for references.
11818
11819 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
11820
11821         * Makefile.am: make the version script conditional.
11822         * jit-icalls.c: handle missing truncl().
11823
11824 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
11825
11826         * exceptions.cs: Add more tests for double->int conversion.
11827
11828         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
11829         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
11830
11831 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
11832
11833         * driver.c: make --verbose --version emit an error
11834         if the loaded corlib doesn't match the runtime version.
11835
11836 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
11837
11838         * mini-ppc.h: export ppc_patch().
11839         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
11840         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
11841         on par or better than on MacOSX.
11842
11843 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
11844
11845         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
11846         mono_lookup_pinvoke_call.
11847
11848         * mini-x86.c: Under windows, the default pinvoke calling convention is
11849         stdcall. Fixes #52834.
11850
11851         * mini.c (optimize_branches): Add an upper bound to the number of
11852         iterations to prevent infinite loops on strange loops. Fixes #53003.
11853
11854 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11855
11856         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
11857         and ISINST. Fixes #52093.
11858
11859         * objects.cs (test_0_vector_array_cast): New tests.
11860         
11861 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
11862
11863         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
11864         checking in Array.Set ().
11865
11866         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
11867         #52590.
11868
11869         * object.cs (test_0_multi_array_cast): New regression test.
11870
11871 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
11872
11873         * exceptions-ppc.c: fix build on Linux/PPC.
11874
11875 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
11876
11877         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
11878         running under valgrind.
11879         (x86_magic_trampoline): Fix build bustage.
11880
11881         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
11882         negative values as well. This is needed for the encoding of the line number
11883         info, since sometimes the line numbers are not in increasing order.
11884
11885 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
11886
11887         * cpu-pentium.md (localloc): Increase the size of the localloc 
11888         instruction since it is a loop under Win32.
11889
11890         * debug-mini.c (record_line_number): Get rid of unneccesary memory
11891         allocation.
11892
11893 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
11894
11895         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
11896         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
11897         Max Horn (max@quendi.de). Fix file names in comments.
11898
11899 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
11900
11901         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
11902         avoid stack overflow.
11903         (replace_usage): Avoid uninitialized variable warnings.
11904
11905         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
11906         and taking the address of valuetype variables.
11907
11908 2004-01-03  Patrik Torstensson
11909
11910         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
11911         for other purposes than FP later on.
11912
11913 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
11914
11915         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
11916         of tail calls.
11917
11918 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11919
11920         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
11921
11922 2003-12-30  Patrik Torstensson <p@rxc.se>
11923
11924         * mini-x86.h: Decreased number of availiable fp regs.
11925         Solves corner cases with FP spilling.
11926
11927 2003-12-23  Patrik Torstensson <p@rxc.se>
11928
11929         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
11930         for floating point stack tracking / spilling on x86. 
11931         Fixes bug #49012.
11932         
11933         * basic-float.cs: added float mul overflow test.
11934
11935 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
11936
11937         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
11938
11939 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11940
11941         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
11942         supports for cond branches that overflow the immediate
11943         overflow offset. mcs can compile simple programs.
11944
11945 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11946
11947         * exceptions-ppc.c: exception handling support wip:
11948         finally handlers get run on exception.
11949
11950 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
11951
11952         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
11953         profiling.
11954
11955 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
11956
11957         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
11958         initial support for stack walking and unwinding.
11959
11960 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
11961
11962         * driver.c (mono_main): Make corlib-out-of-sync message more 
11963         descriptive. Also remove verify_corlib call.
11964
11965 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
11966
11967         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
11968         not overlap with other call's arguments, too.
11969
11970 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
11971
11972         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
11973         move to arch-specific code the choice of arch-specific
11974         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
11975         * mini.c: ensure emulation calls will not interleave
11976         with other calls.
11977
11978 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
11979
11980         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
11981         the magic trampoline stack frame is dropped before executing
11982         the new method.
11983
11984 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11985
11986         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
11987         and integer to fp conversions. Added support for overflowing
11988         arguments on the stack. Reserve a couple more registers as temps.
11989         Added support for aot compilation (as output still needs to be
11990         tweaked, though).
11991
11992 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
11993
11994         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
11995         Don't overwrite return register in some corner cases.
11996
11997 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
11998
11999         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
12000         static constructors when AOT compiling.
12001
12002         * driver.c (mono_main): Call mono_check_corlib_version.
12003
12004 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12005
12006         * cpu-g4.md, basic.cs: fixed div target register.
12007
12008 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
12009
12010         * mini-ppc.c, basic.cs: shl_imm fix with test.
12011
12012 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12013
12014         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
12015         structures by value. Misc fixes.
12016         * objects.cs: more tests.
12017
12018 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
12019
12020         * mini-ppc.c: lconv.ovf.i implemented.
12021
12022 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12023
12024         * mini.c:
12025         (mini_init): don't error out if someone already called g_thread_init.
12026
12027 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12028
12029         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
12030         to be any type per the spec. Fix abnormal memory usage when
12031         the same object is repeatedly thrown.
12032
12033 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
12034
12035         * mini.c: check for overruns in IL code.
12036
12037 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
12038
12039         * TODO: Add/remove some todo entries.
12040
12041 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
12042
12043         * driver.c (mono_main): Call mono_verify_corlib.
12044
12045 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
12046
12047         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
12048         This has been moved to mini.c
12049         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
12050         type being casted is marshalbyref it could be a proxy, so instead of
12051         emitting the type check code, emit a call to a runtime method that will
12052         perform the check by calling CanCastTo if needed.
12053
12054 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
12055
12056         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
12057         methods with large stack frames under Win32.
12058
12059 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
12060
12061         * Makefile.am: Distribute regression tests.
12062
12063         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
12064         at the end instead of inserting each variable into the sorted list.
12065
12066         * linear-scan.c (mono_varlist_sort): New helper function.
12067         
12068 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12069
12070         * mini.c: ensure arguments and locals are within bounds.
12071
12072 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12073
12074         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
12075         related fixes.
12076
12077 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12078
12079         * mini.c (mono_cprop_copy_values): Fix crash.
12080
12081         * aot.c: Set verbosity back to 0.
12082         
12083 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12084
12085         * regalloc.c: complete memory leak fix by Laurent Morichetti
12086         (l_m@pacbell.net).
12087
12088 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12089
12090         * driver.c (main_thread_handler): Revert the previous patch.
12091
12092         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
12093         under valgrind.
12094
12095         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
12096         memory from the memory pool.
12097
12098         * driver.c (main_thread_handler): Turn on all optimizations when
12099         --aot is used.
12100
12101         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
12102         an array for better performance.
12103
12104         * regalloc.c (mono_regstate_assign): Fix memory leak.
12105
12106         * debug-mini.c (mono_debug_serialize_debug_info): New function to
12107         serialize the debug info.
12108
12109         * debug-mini.c (mono_debug_add_aot_method): New function to load the
12110         debug info from the serialized representation.
12111
12112         * aot.c: Save debug info into the generated file and load it when 
12113         loading a method.
12114
12115         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12116
12117 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12118
12119         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
12120         More FP-related fixes.
12121
12122 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
12123
12124         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
12125         and register allocation buglet. Hello world now runs.
12126
12127 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12128
12129         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
12130         * tramp-ppc.c: fixed class init trampoline.
12131         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
12132
12133 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12134
12135         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
12136         mini.c: more ppc changes/fixes.
12137
12138 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12139
12140         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
12141         Also optimize the case when the arguments are the same in the caller 
12142         and in the callee.
12143
12144         * iltests.il: Add tests for tail calls with valuetype arguments.
12145
12146 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12147
12148         * mini-ppc.c: fixes for struct return type.
12149
12150 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
12151
12152         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
12153         mono_spillvar_offset() to arch-specific code.
12154
12155 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
12156
12157         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
12158
12159 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12160
12161         * exceptions-x86.c: Fix stack space leaks.
12162         
12163         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
12164         registers from the lmf if the method has save_lmf set.
12165
12166 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
12167
12168         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
12169         of icall wrappers into InvokeInDomain, since these are now per-domain.
12170
12171 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
12172
12173         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
12174         make some opcode emulation and intrinsic ops enabled/disabled 
12175         according to the architecture. More fixes.
12176
12177 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12178
12179         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
12180
12181 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12182
12183         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
12184         arch-specific handling for 'this' and struct return type to
12185         arch-specific code.
12186
12187 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12188
12189         * aot.c: prevent divide by zero error when reporting (it happened with
12190         Accessibility.dll).
12191
12192 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
12193
12194         * mini.h (inst_switch): Remove unused macro.
12195
12196 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12197
12198         * aot.c:
12199         (load_aot_module): free 'info->methods' and 'info' properly. No more
12200         "free(): invalid pointer blah" messages when you have an old aot
12201         compiled assembly.
12202
12203 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
12204
12205         * jit-icalls.c, mini.c: Added support for context static fields.
12206
12207 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12208
12209         * mini.c (mono_method_blittable): Methods which set LastError are not 
12210         blittable either. Fixes #51108.
12211         
12212 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12213
12214         * mini.c: flush icache.
12215         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
12216
12217 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12218
12219         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
12220
12221 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
12222
12223         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
12224         safe on IA32.
12225
12226         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
12227         vararg calls.
12228
12229         * inssel.brg (CEE_MKREFANY): Fix AOT case.
12230
12231 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
12232
12233         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
12234         instruction when the result is discarded.
12235
12236         * iltests.il (test_0_div_regalloc): New regression test.
12237
12238         * arrays.cs: Fix compilation error.
12239
12240 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
12241
12242         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
12243         float rules to inssel-x86.brg: sane architectures with FP registers
12244         don't need to implement these rules.
12245
12246 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12247
12248         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
12249
12250 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12251
12252         * mini.h, inssel-long32.brg: fixed endianess issues in int64
12253         implementation of 32 bit systems.
12254
12255 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12256
12257         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
12258         (Jeroen Zwartepoorte).
12259
12260 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12261
12262         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
12263         the caller and the callee matches.
12264         
12265         * mini.c (mono_method_to_ir): Add comment.
12266
12267         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
12268         signbit is missing on some platforms.
12269
12270 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
12271
12272         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
12273
12274         * mini.c (setup_jit_tls_data): Call the new function.
12275         
12276         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
12277
12278         * mini-x86.c: Add experimental support for fast access to the lmf
12279         structure under NPTL/Linux 2.6.x.
12280
12281 2003-11-06  Martin Baulig  <martin@ximian.com>
12282
12283         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
12284         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
12285         the debugger.
12286
12287 2003-11-02  Martin Baulig  <martin@ximian.com>
12288
12289         * mini.c (inflate_generic_field): New static method.
12290         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
12291         generic instance and the field is declared in a generic type, call
12292         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
12293
12294 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
12295
12296         * mini.h mini.c (mono_method_same_domain): New function to return
12297         whenever the caller and the callee are in the same domain.
12298
12299         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
12300
12301 2003-10-30  Martin Baulig  <martin@ximian.com>
12302
12303         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
12304         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
12305         method parameters.
12306         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
12307         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
12308
12309 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
12310
12311         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
12312         propagation.
12313
12314         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
12315         object here, so it is in the correct appdomain etc.
12316
12317 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
12318
12319         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
12320         already done.
12321         (mono_method_to_ir): Avoid freeing the type created returned from
12322         mono_type_create_from_typespec, since it is put into an internal cache
12323         by the function. Fixes pointer.exe.
12324
12325         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
12326         trampolines for icalls and pinvokes as well. Fixes #33569.
12327
12328 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
12329
12330         * mini.c: Update after appdomain changes.
12331
12332         * mini.c (mono_jit_compile_method_inner): Allways compile native
12333         method wrappers in the root domain, since there can only be one
12334         instance of them, whose address is stored in method->info.
12335
12336 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12337
12338         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
12339         environment variable. Instead detect automatically whenever running
12340         under valgrind using the magic macro RUNNING_ON_VALGRIND from
12341         valgrind.h.
12342
12343 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
12344
12345         * trace.c, trace.h: New files that implement the new trace option
12346         parsing. 
12347
12348         * driver.c: Document new --trace options.
12349
12350         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
12351         mini-x86.c: Apply:
12352
12353         -       if (mono_jit_trace_calls)
12354         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
12355
12356         * mini.h: prototypes.
12357         
12358 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12359
12360         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
12361
12362         * mini.c inssel.brg: Implement typedefbyref opcodes.
12363
12364         * mini.c (mono_jit_compile_method): Remove unused local variable.
12365
12366         * mini.c (mono_jit_compile_method_inner): Ditto.
12367         
12368 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
12369
12370         * tramp-x86.c (x86_class_init_trampoline): Fix build.
12371         
12372         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
12373
12374 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12375
12376         * mini.c (mono_no_aot): Remove unused global variable.
12377
12378         * mini.c: Thread safety fixes.
12379
12380 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12381
12382         * mini.c (mono_create_class_init_trampoline): Add a lock around
12383         class_init_hash_addr.
12384
12385         * arrays.cs (test_0_newarr_emulation): Add new regression test for
12386         #30073.
12387
12388         * mini.c: Decompose the NEWARR instruction before decomposing its
12389         arguments. Fixes #30073.
12390
12391 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
12392
12393         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
12394         convention.
12395
12396 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
12397
12398         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
12399
12400         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
12401
12402         * driver.c: Add support for compiling icall wrappers to --compile.
12403
12404 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
12405
12406         * inssel.brg: The empty value in class->interface_offsets is -1, not
12407         0. Fixes #49287.
12408
12409 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
12410
12411         * objects.cs: New test for 'is' operator on an array of interfaces.
12412
12413 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12414
12415         * tramp-ppc.c: update trampoline code to support jumps
12416         and class initialization.
12417
12418 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
12419
12420         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
12421
12422         * inssel.brg (OP_UNBOXCAST): Fix #46027.
12423
12424         * inssel.brg (OP_UNBOX): Remove unused rule.
12425
12426         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
12427         region instead of one for each method. Fixes #47813.
12428
12429 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
12430
12431         * exceptions.cs (test_0_nested_finally): New regression test for
12432         nested exception handlers.
12433
12434         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
12435
12436         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
12437
12438         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
12439         inlining.
12440
12441         * mini.c (mono_method_check_inlining): Make the inlining limit 
12442         configurable by an environment variable.
12443         
12444         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
12445
12446         * mini.h: Bump AOT file version.
12447
12448         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
12449         token, store the image along with the token, since the token might not 
12450         refer to the same image as the method containing the relocation, 
12451         because of inlining.
12452
12453 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
12454
12455         * mini.c (mono_precompile_assemblies): New function to compile
12456         all methods in all loaded assemblies.
12457
12458         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
12459
12460         * regalloc.h regalloc.c (MonoRegState): Change the type of 
12461         iassign and fassign to int*, since they can contain large negative
12462         values if the register is spilled. Also added some comments. Fixes
12463         #45817.
12464
12465         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
12466         under Win32. Fixes #42964.
12467
12468 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
12469
12470         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
12471
12472         * aot.c: Added support for AOT compiling methods which contain calls
12473         to wrappers. Currently, only remoting-invoke-with-check wrappers are
12474         handled.
12475         
12476         * driver.c (compile_all_methods): Run the compilation in a thread
12477         managed by mono. Fixes #44023.
12478
12479         * mini.c (mono_codegen): Print full method name in verbose output.
12480
12481         * mini-x86.c (mono_arch_patch_code): Fix warning.
12482         
12483         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
12484         jumps, since the method we are jumping to might be domain-specific.
12485
12486         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
12487
12488 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12489
12490         * inssel.brg: string chars are unsigned.
12491
12492 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
12493
12494         * TODO: New todo item.
12495
12496         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
12497         which calls mono_runtime_class_init and patches the call site to
12498         avoid further calls.
12499         (mono_arch_create_class_init_trampoline): New arch specific function 
12500         to create a class init trampoline.
12501         (create_trampoline_code): Generalized so it can create
12502         class init trampolines as well.
12503
12504         * mini.c (helper_sig_class_init_trampoline): New helper variable.
12505         (mono_create_class_init_trampoline): New function to create and cache
12506         class init trampolines.
12507         (mono_find_class_init_trampoline_by_addr): New function to lookup the
12508         vtable given the address of a class init trampoline. Used by the
12509         patching process.
12510         (mono_codegen): Generate a call to a trampoline instead of
12511         mono_runtime_class_init in LDSFLD[A].
12512         (mono_codegen): Add relocations for the new trampoline.
12513         
12514         * mini.h mini-x86.c aot.c: Added a new relocation type: 
12515         MONO_PATCH_INFO_CLASS_INIT.
12516
12517         * mini.h: Bump AOT version number.
12518
12519         * aot.c: Create a copy of the loaded code instead of using the original
12520         so methods which call each other will be close in memory, improving
12521         cache behaviour.
12522         
12523         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
12524         patch since it breaks the regression tests.
12525         
12526         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
12527         for the register saving instruction sequence since the 
12528         frame_state_for function in glibc 2.3.2 don't seem to detect it.
12529
12530 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
12531
12532         * TODO: Fix todo item && remove another.
12533
12534 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
12535
12536         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
12537         previous checkin.
12538
12539         * aot.c: Moved the check for MONO_LASTAOT into the initialization
12540         function of the module.
12541
12542         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
12543         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
12544         --no-aot command line option.
12545
12546 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
12547
12548         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
12549         by Bernie Solomon (bernard@ugsolutions.com).
12550
12551         * inssel.brg: Refactor the interface offset table related code into
12552         its separate functions and add support for the AOT case.
12553
12554 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
12555
12556         * aot.c (mono_aot_get_method_inner): Fix memory leak.
12557         
12558         * aot.c: Added mono_aot_verbose variable and made all debugging
12559         output depend on the value of this variable.
12560
12561         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
12562         method_label and info_label.
12563
12564         * mini.h mini-x86.c aot.c: Added a new relocation type 
12565         MONO_PATCH_INFO_IID for klass->interface_id.
12566
12567         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
12568         the MonoJitInfo structure.
12569
12570         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
12571         a non-root appdomain in shared mode.
12572
12573 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
12574
12575         * aot.c: make aot loader less verbose. Remove free of unused variable.
12576
12577 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
12578
12579         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
12580
12581         * .cvsignore: Added *.dll.
12582
12583         * mini.c (mono_print_tree_nl): New function callable while debugging.
12584
12585         * mini.c (mono_print_code): Export this.
12586
12587         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
12588         patched code.
12589
12590 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
12591
12592         * mini.h (MonoCompile): Added 'jit_info' field.
12593
12594         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
12595         the cfg structure, since it is needed by the AOT compiler.
12596
12597         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12598
12599         * aot.c: A major rewrite. Changes include:
12600         - save exception tables for methods which have them.
12601         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
12602         to g_module_symbol.
12603         - reworked the file format so it is now much smaller and needs
12604         fewer relocation entries.
12605         
12606 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12607
12608         * aot.c (load_aot_module): Fix build bustage on platforms without
12609         Boehm GC.
12610
12611 2003-09-04  Martin Baulig  <martin@ximian.com>
12612
12613         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
12614
12615 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12616
12617         * TODO: Some new optimization ideas.
12618
12619         * aot.c: Move AOT module loading logic here from mono_assembly_open.
12620
12621         * aot.c: Save the optimization flags used to compile the code into
12622         the AOT module.
12623
12624         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
12625         support emitting domain specific code.
12626         
12627         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
12628         no longer domain neutral. It can be made domain neutral by compiling 
12629         with --optimize=shared.
12630
12631         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
12632         between appdomains.
12633
12634         * driver.c mini.h mini.c: New --no-aot debugging option which disables
12635         loading of AOT code.
12636
12637         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
12638         
12639         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
12640         if there is no domain neutrality information.
12641
12642 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
12643
12644         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
12645         format version into the generated library.
12646
12647         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
12648         callee method into the caller since one of them could be shared.
12649
12650         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
12651         system exceptions from AOT code now works.
12652
12653         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
12654         method if it is domain neutral and the callee is not.
12655
12656         * graph.c (cfg_emit_one_loop_level): Fix warning.
12657
12658 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
12659
12660         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
12661         last checkin.
12662
12663 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
12664
12665         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
12666         is needed  by code which is executed before mono_runtime_init ().
12667         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
12668         
12669         * mini.c (mono_thread_abort): Fix warning.
12670         (mono_jit_compile_method): Call static constructor in the AOT case too.
12671
12672         * aot.c (mono_compile_assembly): Fix warning.
12673
12674 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12675
12676         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
12677
12678 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
12679
12680         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
12681
12682         * cpu-pentium.md: Fix the length of call opcodes so they include the
12683         ESP restoring instruction. Fixes #47968.
12684
12685 2003-08-28  Martin Baulig  <martin@ximian.com>
12686
12687         * mini-x86.c (mono_arch_call_opcode): Added support for
12688         MONO_TYPE_GENERICINST.
12689
12690         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
12691
12692 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
12693
12694         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
12695         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
12696
12697         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
12698         metadata_section.
12699
12700 2003-08-26  Martin Baulig  <martin@ximian.com>
12701
12702         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
12703         when reporting an error, set this to the actual error location.
12704         (mono_method_to_ir): Report the correct error location if
12705         get_basic_blocks() returned an error.
12706
12707 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
12708
12709         * mini.c (mono_type_blittable): OBJECT is not blittable.
12710         (mono_method_blittable): Methods which have marshalling descriptors
12711         are not blittable either. Fixes #47842.
12712
12713 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
12714
12715         * driver.c mini.c: Use an environment variable instead of a global 
12716         variable. Also fix the build.
12717
12718         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
12719         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
12720         reporting this. 
12721
12722         * driver.c mini.c: Added --with-valgrind option to turn off some
12723         code which prevents mono from running under valgrind.
12724
12725         * mini.c (mono_emit_call_args): Fixed warning.
12726
12727         * mini.c (mono_emulate_opcode): Fixed warning.
12728
12729 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12730
12731         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
12732         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
12733         regalloc.c, regalloc.h: specify available registers in arch-specific
12734         code and support floats in the regallocator (patch by Laurent Morichetti 
12735         <l_m@pacbell.net>)
12736
12737 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
12738
12739         * mini.c: mono_thread_current() can be called only after
12740         mono_runtime_init(): rearrange code to not call it early on.
12741
12742 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12743
12744         * mini.c: allocate jump tables in the code mempools.
12745
12746 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12747
12748         * mini.c, mini.h: make sure per-thread data allocated by the jit is
12749         freed.
12750
12751 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
12752
12753         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
12754         12 to 16.  This fixes bug #47453.
12755
12756
12757 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12758
12759         * mini-ppc.c: fixed indexed load and unsigned compares.
12760
12761 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
12762
12763         * mini.c: reenabled installation of handler for
12764           thread abort signal.
12765
12766 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12767
12768         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
12769         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
12770         until it's fixed and actually useful.
12771
12772 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
12773
12774         * inssel-long32.brg: couple more opcodes implemented.
12775
12776 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
12777         
12778         * mini-sparc.c: Even more opcodes implemeted.
12779
12780 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
12781
12782         * mini-sparc.c: More opcodes implemented.
12783
12784 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
12785
12786         * mini-sparc.c: More opcodes implemented.
12787
12788 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
12789
12790         * inssel-sparc.brg: Add some needed rules.  Direct
12791         copy from PPC.
12792         * Makefile.am: Use inssel-sparc.brg
12793         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
12794         an assert happy for now.
12795
12796 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
12797
12798         * mini-sparc.c: Fixed compile errors.
12799         * exceptions-sparc.c: Same.  We now produce a mono binary 
12800         on sparc-linux.  Yea.
12801
12802 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
12803
12804         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
12805         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
12806         They compile, but do not work.
12807
12808 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12809
12810         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
12811         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
12812         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
12813         (ct@gentoo.org).
12814
12815 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12816
12817         * mini.c: more opcodes implemented and better support for generics.
12818
12819 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
12820
12821         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
12822         * mini.c, mini.h: first cut at generics support: some new instructions 
12823         added and changed the behaviour of some of the existing ones.
12824
12825 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
12826
12827         * mini.c: Removed definition of metadata_shared mutex here.
12828
12829 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
12830
12831         * mini-x86.c: make vararg calls work for instance methods.
12832
12833 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12834
12835         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
12836         returns the arguments in a separte list, now.
12837
12838 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
12839
12840         * aot.c, mini.c: updates for array type representation changes.
12841
12842 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
12843
12844         * mini.c: register function to perform jit shutdown.
12845
12846 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12847
12848         * mini.c: use a faster allocator if possible.
12849
12850 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
12851
12852         * aot.c: some cleanups and portability changes.
12853
12854 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12855
12856         * mini.c: use faster allocation for CEE_BOX if possible.
12857
12858 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
12859
12860         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
12861         Moved inlined mempcy code to its own function so that is can be
12862         reused. Added an inline memset function as well (optimized initobj).
12863         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
12864
12865 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12866
12867         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
12868
12869 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
12870
12871         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
12872         arch code can setup the cpu for CLR execution, if needed.
12873         We use it on x86 to set the precision of FP operations.
12874
12875 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12876
12877         * mini.c: disable some optimizations if we can guess they'll cost too
12878         much for a given method.
12879
12880 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12881
12882         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
12883         
12884 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12885         * mini.h mini.c mini-x86.c: Added instruction level coverage 
12886         info collection support.
12887
12888 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12889
12890         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
12891         is now implemented in the profiling API. Get rid of a couple of
12892         unnecessary global variables.
12893
12894 2003-06-15  Nick Drochak <ndrochak@gol.com>
12895
12896         * basic-long.cs: tests for negative values for bigmul, and unsigned.
12897         * cpu-g4.md: add op_bigmul and op_bigmul_un
12898         * cpu_pentium.md: add op_bigmul_un
12899         * inssel-long32.brg: add rule for unsigned bigmul
12900         * mini-ops.h: define OP_BIGMUL_UN
12901         * mini-x86.c: THE BUG: handle (un)signed properly
12902         * mini.c: choose unsigned opcode if needed.
12903         This set of patches fixes bug #44291
12904
12905 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
12906
12907         * mini.c (optimize_branches): improved to handle all kinds of
12908         conditional branches.
12909
12910 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
12911
12912         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
12913         don't raise exceptions.
12914
12915 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12916
12917         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
12918         to arch-specific files.
12919
12920 2003-06-09  Martin Baulig  <martin@ximian.com>
12921
12922         * Makefile.am (libs): Added $(LIBGC_LIBS).
12923
12924 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
12925
12926         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
12927         and OP_ATAN (fixes bug#44293).
12928
12929 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
12930
12931         * Makefile.am, mini-x86.c: rename cpu description array to
12932         pentium_desc, since some compilers define the 'pentium' preprocessor
12933         symbol.
12934
12935 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
12936
12937         * mini.c (mini_select_instructions): add explicit branch if the
12938         following block is not the false target of a conditional branch -
12939         we need this with any optimization that reorder or remove bblocks
12940
12941         * mini.c (optimize_branches): bug fixes
12942
12943 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
12944
12945         * mini.c (mono_method_to_ir): inline static readonly fields
12946
12947         * ssa.c (fold_tree): start cfold support for long (very simple
12948         cases only)
12949
12950         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
12951
12952 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
12953
12954         * inssel.brg: fixed memcpy (bug #44219).
12955
12956 2003-06-05  Dick Porter  <dick@ximian.com>
12957
12958         * driver.c: Set the glib log levels to not abort if g_message
12959         recurses.
12960
12961         g_set_prgname() has to happen before mini_init() so that the
12962         process handle gets the info.
12963         
12964 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12965
12966         * driver.c: add intrins to the default optimizations to get wider
12967         exposure.
12968
12969 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12970
12971         * mini.h: some large basic blocks will overflow a 16-bit
12972         integers for symbolic registers.
12973
12974 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
12975
12976         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
12977         (mono_arch_output_basic_block): fix bug 43499 
12978
12979 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
12980
12981         * mini.c: kill duplicated definition of mono_debug_format.
12982
12983 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
12984
12985         * mini-x86.c, arrays.cs: fixed register allocation bug.
12986
12987 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
12988
12989         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
12990
12991         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
12992
12993 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12994
12995         * mini.c:
12996         (print_method_from_ip): also print source location information if
12997         available.
12998
12999 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
13000
13001         * mini.c (mono_find_block_region): bug fix in region code
13002         (mini_method_compile): enable removing unreachable code again, but
13003         only in methods without exception clauses.
13004
13005 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
13006
13007         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
13008         Implemented arglist opcode and handling of TypedReference type.
13009         Fixed x86 call convention when a structure is returned.
13010         Minimal support for calling static vararg methods.
13011
13012 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
13013
13014         * mini.c (mini_method_compile):  always remove unreachable code,
13015         because the code in them may be inconsistent  (access to dead
13016         variables for example).
13017
13018 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13019
13020         * driver.c, debug-mini.c: warning fixes.
13021
13022 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13023
13024         * Makefile.am, jit.h, mini.h: install header for embedding mono.
13025
13026 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
13027
13028         * mini.c: thread-static fields are registered in mono_class_vtable(),
13029         so ensure the function is called before checking for them.
13030
13031 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
13032
13033         * mini.c (optimize_branches): fix for bug 43586
13034
13035         * jit-icalls.c (mono_llmult_ovf): added an additional check for
13036         overflow (fixes Bug #43639)
13037
13038 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13039
13040         * mini.c, objects.cs: allow the use of stobj for primitive types.
13041
13042 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13043
13044         * mini.c: be less strict about argument checking until we support
13045         running the verifier.
13046
13047 2003-05-27  Nick Drochak <ndrochak@gol.com>
13048
13049         * basic-long.cs: tests for (ulong)int * (ulong)int also
13050         * mini.c: use the same trick for (ulong)int * (ulong)int
13051
13052 2003-05-27  Nick Drochak <ndrochak@gol.com>
13053
13054         * basic-long.cs: add regression test for (long)int * (long)int
13055         * cpu-pentium.md: add op_bigmul specification
13056         * inssel-long32.brg: add OP_BIGMUL rule
13057         * mini-ops.h: add OP_BIGMUL
13058         * mini-x86.c: register allocator: handle case where src1 needs to be
13059         in EAX.
13060         * mini.c: substitute special BIGMUL opcode in the tree for 
13061         (long)int * (long)int
13062
13063 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13064
13065         * jit-icalls.c: call the type ctor on field access if needed.
13066
13067 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13068
13069         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
13070         to a method (including results of ldelema, bug#43207).
13071
13072 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13073
13074         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
13075         colors to show exception handler blocks.
13076
13077         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
13078         (fix for pinvoke7.cs).
13079
13080 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13081
13082         * mini.h, mini.c: ensure correct initialization order for types that
13083         require it. Prepare for lazy compilation of jit icall wrappers.
13084         Provide a name for opcode emulation to reduce unneeded mallocing.
13085
13086 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13087
13088         * mini-x86.c: better register restoring code and profiling
13089         support for tail calls.
13090
13091 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13092
13093         * mini.h, driver.c: prepare for leaf methods optimization.
13094
13095 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13096
13097         * mini.c: get targets of branches before converting a method.
13098
13099 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
13100
13101         * mini.c (optimize_branches): added some experimental code (disbaled) 
13102
13103 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
13104
13105         * mini.c (optimize_branches): fix branch to branch optimization 
13106
13107         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
13108
13109         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
13110
13111         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
13112
13113         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
13114         if needed.
13115
13116 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13117
13118         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
13119         enable use of interface variables again.
13120
13121         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
13122         I1 to registers because there is no simply way to sign extend 8bit
13123         quantities in caller saved registers on x86.
13124
13125         * inssel-float.brg: set costs of some rules to 2 so
13126         that monobure always select the arch. specific ones if supplied,
13127         regardless of the order we pass the files to monoburg.
13128
13129 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13130
13131         * mini.c, mini-x86.c: since the magic trampoline for jumps
13132         can't patch the code directly, we do it as soon as the
13133         method gets compiled.
13134
13135 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13136
13137         * mini-x86.c, mini.h: introduce a new patching method
13138         to support CEE_JMP and tail calls.
13139         * mini.c: obey tail.call. Don't precompile methods target
13140         of CEE_JMP.
13141         * tramp-x86.c: new trampoline code to handle methods
13142         reached through a jump.
13143
13144 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
13145
13146         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
13147         bit values to registers
13148
13149 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
13150
13151         * mini.c (mono_compile_get_interface_var): share interface
13152         variables if possible.
13153
13154 2003-05-16  Martin Baulig  <martin@ximian.com>
13155
13156         * debug-mini.c (mono_init_debugger): New function to initialize
13157         the debugger.  This is not in the debugger since it needs to
13158         access some of mini's internals.
13159
13160 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13161
13162         * mini.c (mono_method_to_ir): inlining fixes/cleanups
13163
13164 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
13165
13166         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
13167         for value type handling.
13168
13169 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13170
13171         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
13172         (mono_method_check_inlining): enable inlining of all kinds of wrappers
13173
13174 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
13175
13176         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
13177           the constructor through a proxy.
13178
13179 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13180
13181         * jit-icalls.c, inssel.brg: fixes to array element address
13182         calculations.
13183
13184 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
13185
13186         * mini-x86.c (is_regsize_var): allocate pointer to registers
13187
13188 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13189
13190         * driver.c: fixed typo, added intrins to the set of optimizations
13191         tested with regressions.
13192
13193 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13194
13195         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
13196         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
13197         test case.
13198
13199 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
13200
13201         * inssel.brg: remove some common pop instructions without side effects
13202
13203 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13204
13205         * inssel-x86.brg: fixed thinko in int to double conversions.
13206
13207 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13208
13209         * mini.c, jit-icalls.c: added runtime thread-static variable support.
13210
13211 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13212
13213         * inssel-long32.brg: two more missing instructions.
13214
13215 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
13216
13217         * mini.c (mono_emit_call_args): set the cil_code for all arguments
13218         if not already set.
13219
13220 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
13221
13222         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
13223         correctly.
13224
13225         * basic-float.cs: Added tests for negative zero.
13226
13227 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13228
13229         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
13230         a couple of missing operations for long casts, with test cases.
13231
13232 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13233
13234         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
13235
13236 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
13237
13238         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
13239         code size estimation.
13240
13241 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
13242
13243         * mini.c (mono_jit_create_remoting_trampoline): make it work with
13244         abstract methods (fix bug 42542)
13245
13246         * aot.c: add ability to handle array types
13247         
13248 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
13249
13250         * mini.c: Call the _specific versions of the object allocation
13251         functions if possible.
13252
13253 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13254
13255         * driver.c: call setlocale ().
13256
13257 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13258
13259         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
13260         windows build.
13261
13262 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
13263
13264         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
13265
13266         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
13267         wrappers (fix bug 42122)
13268
13269 2003-05-04  Martin Baulig  <martin@ximian.com>
13270
13271         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
13272
13273         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
13274         s/mini_set_defaults/mono_set_defaults/g.
13275
13276 2003-05-04  Martin Baulig  <martin@ximian.com>
13277
13278         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
13279
13280 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13281
13282         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
13283         (reported by Don Roberts).
13284
13285 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
13286
13287         * mini.c: temporarily work around two bugs for this release.
13288
13289 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13290
13291         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
13292         that contains -export-dynamic and it makes using the ld script
13293         useless.
13294         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
13295
13296 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13297
13298         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
13299         specific cpu.
13300
13301 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13302
13303         * mini.c: make sure leave calls all the needed finally blocks,
13304         even when the target jumps out of multiple exception clauses.
13305
13306 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13307
13308         * ldscript, Makefile.am: add linker script to reduce the number of
13309         exported symbols (should also fix the issues with libwine defining
13310         some of the same symbols in io-layer).
13311
13312 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
13313
13314         * driver.c (mini_main): Avoid assertion when no file name is given on 
13315         the command line.
13316
13317 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
13318
13319         * driver.c: added --version/-V command line option.
13320         Added the inline optimization in the regression tests.
13321
13322 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13323
13324         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
13325         to the type in the method signature (fixes bug#42134).
13326
13327 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
13328
13329         * mini.c: when inlining, check this is not null only when needed (bug #42135).
13330
13331 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
13332
13333         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
13334
13335 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13336
13337         * driver.c: fixed bug #42100.
13338
13339 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
13340
13341         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
13342
13343 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13344
13345         * mini.c: moved most of the code required to do inlining to its own
13346         function so it can be reused. Inline also ctors if appropriate.
13347
13348 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
13349
13350         * Makefile.am: Link with -export-dynamic so shared libs loaded by
13351         the runtime can call mono API functions.
13352
13353 2003-04-27  Martin Baulig  <martin@ximian.com>
13354
13355         * debug-mini.c (mono_debug_init_method): Added
13356         `guint32 breakpoint_id' argument; if the method has a breakpoint,
13357         send a notification to the debugger.
13358
13359         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
13360         running in the Mono Debugger, just pass the breakpoint number to
13361         mono_debug_init_method().
13362
13363         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
13364
13365 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
13366
13367         * mini.c: allow some more unsafe compares.
13368
13369 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13370
13371         * mini-x86.c, Makefile.am: make distcheck works (partially from
13372         a patch by Richard Lee <r.h.lee@attbi.com>).
13373         * regset.c, regset.h: removed, they are unused.
13374
13375 2003-04-25  Dick Porter  <dick@ximian.com>
13376
13377         * driver.c: Usage reports the name as 'mono' not 'mini'
13378         * exceptions-x86.c: Build and run on freebsd
13379
13380 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13381
13382         * Makefile.am: install the program with the 'mono' name and
13383         the library as libmono instead of mini and libmini.
13384
13385 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13386
13387         * driver.c: provide the APIs for the embedding interface of the old jit.
13388
13389 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
13390
13391         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
13392
13393 2003-04-23  Martin Baulig  <martin@ximian.com>
13394
13395         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
13396
13397         * driver.c: Added `--debug' command line argument to enable
13398         debugging support.
13399
13400 2003-04-23  Martin Baulig  <martin@ximian.com>
13401
13402         * debug.[ch]: Removed.  The code is now in
13403         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
13404
13405         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
13406         last six months.
13407
13408 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
13409
13410         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
13411
13412 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13413
13414         * mini.c:
13415         (mini_cleanup): moved mono_runtime_cleanup call after the call to
13416         mono_domain_finalize.
13417         (mini_method_compile): use mono_method_profile* if the the option is
13418         enabled.
13419
13420 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
13421
13422         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13423         methods with their wrapper.
13424
13425         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13426         methods with their wrapper.
13427
13428         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
13429         their wrapper.
13430
13431         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
13432         wrapper.
13433
13434         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
13435         methods.
13436
13437 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
13438
13439         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
13440
13441 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
13442
13443         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
13444         of the mempool. This is slightly faster and uses less memory
13445
13446 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13447
13448         * mini.c: avoid O(n) allocation for variables.
13449
13450 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13451
13452         * mini.c: handle items on the stack after inlining methods.
13453
13454 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13455
13456         * mini.c: make the method->opcode optimization dependent
13457         on MONO_OPT_INSTRINS and do it lazily.
13458
13459 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13460
13461         * driver.c: print overall results at the end of regression run.
13462
13463 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13464
13465         * inssel.brg: don't overwrite symbolic registers.
13466
13467 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13468
13469         * inssel-x86.brg: fix conversion from long to float.
13470
13471 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
13472
13473         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
13474
13475 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
13476
13477         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
13478
13479         * driver.c: Added --print-vtable option as in the old JIT.
13480
13481 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13482
13483         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
13484
13485 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13486
13487         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
13488
13489 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
13490
13491         * mini.c regalloc.c regalloc.h: Fix memory leak.
13492
13493 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
13494
13495         * aot.c (mono_aot_get_method): register all used strings
13496
13497 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13498
13499         * mini.c: always intern strings references with ldstr at compile time.
13500
13501 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13502
13503         * Makefile.am: add BUILT_SOURCES.
13504
13505 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13506
13507         * driver.c: give a better error message when the assembly to execute
13508         doesn't have an entry point.
13509
13510 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
13511
13512         * Makefile.am: added hack for automake
13513
13514         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
13515         correct sematics.
13516
13517         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
13518
13519 22003-04-07  Martin Baulig  <martin@ximian.com>
13520
13521         * Makefile.am: Added Makefile.am.
13522
13523         * debugger-main.c: Removed, this is now in the debugger where it
13524         belongs.
13525
13526         * mini.pc.in: Call this package `mini' for the moment.
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536