781e9e094b1b64dad3f8a3fa7c15e91adf519185
[mono.git] / mono / mini / ChangeLog
1 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
2
3         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
4         interruption_checkpoint.
5
6 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
7
8         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
9         from embedding applications.
10
11 2008-06-02  William Holmes  <billholmes54@gmail.com>
12
13         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
14           reserving 32 bytes on the stack when making calls. 
15
16         Contributed under MIT/X11 license.
17
18 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
19
20         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
21         the linear IL branch.
22
23         * driver.c: Print out more information for --version on arm.
24
25 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
26
27         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
28         bb_exit instead, since out of line bblocks might not actually be emitted
29         out-of-line.
30         
31         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
32         maximum epilog size for out of line bblocks if tracing is enabled.
33
34         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
35
36 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
37
38         * arrays.cs: Regression tests for allocating arrays with negative sizes.
39
40 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
41
42         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
43         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
44         opcodes.
45
46 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
47
48         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
49         the 'value' to store is a constant.
50
51         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
52
53         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
54         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
55
56 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
57
58         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
59         for accessing method->generic_container.
60
61 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
62
63         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
64         
65         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
66
67         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
68
69         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
70         fails.
71
72 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
73
74         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
75
76         * mini.c: Handle the case when mono_class_vtable () fails.
77
78 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
79         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
80         the stat profiler.
81
82 2008-05-22  Mark Probst  <mark.probst@gmail.com>
83
84         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
85         together with domain sharing.
86
87 2008-05-22  Mark Probst  <mark.probst@gmail.com>
88
89         * mini.c: Treat callvirts to final methods like non-virtual calls
90         when doing generic sharing, i.e. look them up in the runtime
91         generic context.
92
93 2008-05-22  Mark Probst  <mark.probst@gmail.com>
94
95         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
96         with computed types (for generic sharing).
97
98         * mini.c: Generic sharing for mkrefany and refanyval.
99
100 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
101
102         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
103         possible.
104
105         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
106         the generic sharing code.
107         
108         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
109         when needed.
110
111 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
112
113         * mini.h: Remove the declaration of mono_aot_init_vtable ().
114
115 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
116
117         * driver.c: updated copyright date
118
119 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
120
121         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
122         needed.
123
124 2008-05-19  Martin Baulig  <martin@ximian.com>
125
126         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
127         pointing to the new `_mono_debug_using_mono_debugger' variable.
128
129         * driver.c
130         (mono_main): Check mono_debug_using_mono_debugger() rather than
131         the `MONO_INSIDE_MDB' environment variable to check whether we're
132         inside the debugger.
133
134 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
135
136         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
137         argument.
138
139 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
140
141         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
142
143         * mini.c: Added mini_assembly_can_skip_verification. This
144         function checks if the assembly requested to skip verification. 
145         Fixes part of #387274.
146
147 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
148
149         * mini.c (mini_get_method): Disable the check for open generic classes when
150         using generic sharing.
151
152         * generics.cs: Add a test #387034.
153
154         * mini.c (mini_get_method): Check whenever the method class is an open generic
155         type, and return NULL in that case, causing a verification error. Fixes
156         #384123.
157
158 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
159
160         * driver.c (mono_main): Revert r102623. The right
161         thing to do is to enable the verifier under verifiable
162         unless a --security flag was passed.
163
164         We need this non-trivial behavior for --verify-all otherwise
165         mcs-compileall won't be able to use it. As it needs everything to
166         be verified under validil.
167
168 2008-05-06  Martin Baulig  <martin@ximian.com>
169
170         Fix #383749.
171
172         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
173         (mono_debugger_thread_cleanup): Likewise.
174         (mono_debugger_extended_notification): Likewise.
175
176 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
177
178         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
179         against both inflated and non-inflated methods. We need to check against the
180         generic definition for cases where the instantiated method is not visible.
181         We need to check against the inflated types for cases where the instantiation
182         changes any super type. This fixes #382986.
183
184         Note that this doesn't need to be applied to other parts of mono_method_to_ir
185         that check for visibiliy as generic params only appears as the type subject
186         of tokens on call opcodes. Field manipulation and ldftn must always
187         target an exact type.
188
189 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
190
191         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
192         if no related --security flag is passed.
193
194 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
195
196         * mini-arch.h: Prepare support for ppc64.
197
198         Contributed under MIT/X11 license.
199
200 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
201
202         * aot-runtime.c: Prepare support for ppc64.
203
204         Contributed under MIT/X11 license.
205
206 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
207
208         * mini-ops.h: Prepare support for ppc64.
209
210         Contributed under MIT/X11 license.
211
212 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
213
214         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
215
216         Contributed under MIT/X11 license.
217
218 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
219
220         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
221         assemblies, since aot_name is not a full path, causing us to load MS.NET 
222         assemblies on windows.
223
224 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
225
226         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
227         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
228         * main.c: Use UTF-8 encoded command line instead of Windows default code
229         page on Windows to support Unicode.
230         * driver.c (DllMain): New function for mixed-mode assembly support.
231         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
232         export __stdcall functions without decoration.
233
234         Contributed under MIT/X11 license.
235
236 2008-04-28  Mark Probst  <mark.probst@gmail.com>
237
238         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
239         saving it very early.
240
241 2008-04-28  Mark Probst  <mark.probst@gmail.com>
242
243         * mini.h, mini.c: Lots of code for accessing the old RGCTX
244         deleted.  The only way to access the new RGCTX is via the
245         trampline.
246
247         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
248         vtable instead of the RGCTX to static methods.
249
250         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
251         accessing the new RGCTX.
252
253         * generic-sharing.c: There is no separation between self, type
254         arguments and other types in the RGCTX anymore.
255
256 2008-04-25  Jonathan Chambers <joncham@gmail.com>
257
258         * mini-amd64.c (add_general): Remove previous stack adjustment.
259         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
260         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
261         for 32 bytes of stack space reserved for all calls.
262         
263         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
264         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
265         adjustment.
266         
267         Code contributed under MIT/X11 license.
268
269 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
270
271         * mini.c (mini_method_verify): Only verify non-inflated methods, check
272         against the root definition, peeling out method and type instantiations.
273         Cache verify success results, code that fails verification is still
274         checked multiple times.
275
276 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
277
278         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
279
280 2008-04-23  Jonathan Chambers <joncham@gmail.com>
281
282         * mini-amd64.c (add_general): Always increment stack on Win64.
283         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
284         on Win64.
285         
286         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
287         stack based argument handling on Win64.
288         
289         Code contributed under MIT/X11 license.
290
291 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
292
293         * Makefile.am (version.h): Add support for git-svn.
294
295 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
296
297         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
298         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
299         avoiding allocations and libc functions which might deadlock.
300         
301         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
302         'no-gdb-backtrace' option is set.
303
304         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
305
306         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
307
308 2008-04-21  Martin Baulig  <martin@ximian.com>
309
310         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
311         and `get_lmf_addr'; `notification_address' is no longer a pointer.
312
313 2008-04-21  Martin Baulig  <martin@ximian.com>
314
315         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
316         `thread_vtable', `event_handler_ptr' and `event_handler'.
317
318 2008-04-21  Martin Baulig  <martin@ximian.com>
319
320         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
321         allows delayed initialization of the `executable_code_buffer' when
322         attaching.
323
324 2008-04-21  Martin Baulig  <martin@ximian.com>
325
326         * mini.h (mono_debugger_create_notification_function): Removed.
327         * tramp-*.c (mono_debugger_create_notification_function): Removed.
328
329         * mdb-debug-info64.s
330         (MONO_DEBUGGER__notification_function): Added this in the .text section.
331
332         * mdb-debug-info32.s
333         (MONO_DEBUGGER__notification_function): Added this in the .text section.
334
335         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
336         currently only works on x86 and x86_64, so don't create it on ppc.
337
338 2008-04-21  Martin Baulig  <martin@ximian.com>
339
340         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
341
342         * mini.c
343         (mini_method_compile): In the fp elimination check, check
344         `debug_options.mdb_optimizations' in addition to
345         mono_debug_using_mono_debugger().       
346
347         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
348         disable some JIT optimizations which are only disabled when
349         running inside the debugger.
350         Added `--help-debug' option to describe the debugging options.
351         (parse_debug_options): New static function to parse the `--debug'
352         options, so we can easily add more stuff in future.
353
354 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
355
356         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
357         the method has no body.
358
359 2008-04-19  Jonathan Chambers <joncham@gmail.com>
360
361         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
362         assembly is not allowed in MSVC 64-bit compiler. 
363         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
364         as we get floating point exceptions everywhere.
365         
366         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
367         correctly align arguments for call to throw_exception.
368         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
369         
370         Code contributed under MIT/X11 license.
371
372 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
373
374         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
375
376 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
377
378         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
379
380         * mini-amd64.c (NEW_INS): Set cil_code.
381
382         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
383         from mini-amd64.c so all debugger related logic is in one place.
384
385         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
386         later won't have a random ip assigned to them.
387
388 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
389
390         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
391         the arch specific function initializes code_size.
392         (mono_create_delegate_trampoline): Ditto.
393
394         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
395         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
396         platforms.
397
398         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
399         running under the debugger.
400
401         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
402         debugger.
403
404         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
405         debugger. Also move the disabling of optimizations here from driver.c.
406         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
407         debugger.
408
409         * mini.h (MonoCompile): Add a few new flags.
410
411 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
412
413         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
414         so the cil_code field of created MonoInst's is properly set.
415         (mini_select_instructions): Ditto.
416
417         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
418         (MONO_INST_NEW_CALL): Ditto.
419
420         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
421         in many places so the ins->cil_code field is properly initialized.
422
423         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
424         place.
425
426 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
427
428         * mini.c (mini_method_compile): Print a different message when compiling a 
429         shared method.
430         
431         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
432         > 1.
433
434 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
435
436         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
437         SSE2 instructions.
438
439         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
440         
441 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
442
443         * mini.c (handle_stack_args): Make this return void since its return value was
444         never used. Also set cfg->unverifiable for invalid IL instead of calling
445         G_BREAKPOINT ().
446
447 2008-04-10  Mark Probst  <mark.probst@gmail.com>
448
449         * mini.c: Make sure "this" is live in catch clauses with type
450         variables in shared generic code.
451
452 2008-04-08  Mark Probst  <mark.probst@gmail.com>
453
454         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
455         generic_class_is_reference_type() to ensure the proper behaviour
456         when sharing generic code and the type in question is a type
457         argument.
458
459 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
460
461         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
462         race conditions when printing thread dumps. Fixes #377738.
463
464 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
465         
466         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
467         shows up when both MonoInst arguments can cause aliasig.
468         There is likely no way in the current JIT to trigger this problem, but
469         it showed up in the development of generics sharing, when in a new
470         opcode both args of an OP_GROUP can be aliases (addresses of a local).
471         When the generics sharing code will be committed, its tests will be
472         valid also for this bug.
473
474 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
475
476         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
477         PATCH_INFO_METHOD.
478
479         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
480         NULL.
481
482 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
483
484         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
485         use a more detailed exception message for InvalidCastException.
486
487         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
488
489         * driver.c (mono_main): Add --debug=casts option to turn on better 
490         InvalidCastException message details.
491
492         * mini.c (mini_get_debug_options): New helper function to return the address of
493         the debug_options variable.
494
495         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
496         the jit_tls TLS variable.
497
498         * mini.c (mono_jit_tls): New TLS variable.
499
500         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
501         option is used.
502
503 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
504
505         * mini.h: Removed verifer related stuff. This code was moved to verify.c
506
507         * mini.c: Removed verifer related stuff, code moved to verify.c.
508
509         * driver.c: Using code from verify.c instead of mini.c.
510
511 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
512
513         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
514         longer valid.
515
516 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
517
518         * mini.c (check_for_method_verify): Enabling verification of
519         corlib if mono_verify_all is set. Bugs in the verifier preventing that
520         have been fixed.
521
522 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
523
524         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
525         caller saved registers as well.
526         
527         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
528         saved registers as well.
529
530 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
531
532         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
533
534         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
535         code.
536
537 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
538
539         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
540         to get_call_info.
541         (get_call_info): Take a gsctx argument instead of 'cfg'.
542
543 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
544
545         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
546         mono_verify_all is set.
547
548         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
549
550         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
551
552 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
553
554         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
555         an exception.
556
557         * driver.c mini.c mini.h: Add a --verify-all development option to test the
558         verifier and the code generated by the compiler.
559
560 2008-03-25  Mark Probst  <mark.probst@gmail.com>
561
562         * mini.c: Generic sharing of the non-nullable case of the box
563         instruction.
564
565 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
566
567         * inssel.brg: Fix the build.
568
569         * iltests.il.in: Add a test for lconv.ovf.u8.un.
570
571 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
572
573         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
574         Array:Address. Fixes #372410.
575
576         * iltests.il.in: New tests for readonly prefix.
577
578 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
579
580         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
581         mini-trampolines.c.
582
583         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
584         mini-exceptions.c.
585
586         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
587         
588         * mini.c (mono_decompose_op_imm): New helper function.
589
590         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
591         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
592         return value.
593
594         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
595         mono_arch_output_basic_block. Fix warnings.
596
597         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
598         for now.
599
600 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
601
602         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
603         since the extra frame is now detected automatically inside the loop.
604
605         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
606         opts which are now in mono_peephole_ins ().
607         
608         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
609
610         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
611         frames and skip duplicate managed-to-native frames. Fixes #367665.
612
613         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
614         opts which are now in mono_peephole_ins ().
615         (mono_arch_peephole_pass_2): Ditto.
616
617         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
618
619         * mini-codegen.c (mono_peephole_ins): New helper function containing the
620         arch independent peephole optimizations.
621
622         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
623         opts which are now in mono_peephole_ins ().
624
625         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
626         
627         * mini-s390.c (mono_arch_output_basic_block): Fix build.
628
629         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
630         pattern.
631
632         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
633         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
634         opcode. 
635
636 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
637
638         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
639         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
640         return value.
641
642         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
643         mono_arch_output_basic_block. Fix warnings.
644
645 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
646
647         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
648         conv.ovf.u.un.
649
650 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
651
652         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
653         conv.ovf.u.un.
654
655         * iltests.il: Add new tests.
656
657 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
658
659         * mini.c: Removed Windows version macros.
660
661 2008-03-20  Mark Probst  <mark.probst@gmail.com>
662
663         * generic-sharing.c: Put reflection types in the extensible part
664         of the runtime generic context.
665
666         * mini.c: Generic sharing of the GetTypeHandle special case of the
667         ldtoken instruction.
668
669 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
670
671         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
672
673         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
674         
675         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
676         consistency with the other version on the linear IR branch.
677
678         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
679
680         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
681
682         * iltests.il.in: Add new tests.
683
684 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
685
686         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
687
688         * iltests.il.in: Add new tests.
689
690 2008-03-19  Mark Probst  <mark.probst@gmail.com>
691
692         * mini.c: Two variables with the same name were declared in
693         nesting contexts and one wasn't initialized.  Fixed.
694
695 2008-03-19  Mark Probst  <mark.probst@gmail.com>
696
697         * mini.c: Generic sharing of the initobj instruction.
698
699 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
700
701         * mini.c: make the test to optimize ldtoken from typeof() more
702         precise.
703
704 2008-03-18  Mark Probst  <mark.probst@gmail.com>
705
706         * mini.c: Generic sharing of the initobj instruction for reference
707         types.
708
709 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
710
711         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
712         the mono_breakpoint_clean_code() code to perform bound checks.
713
714 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
715
716         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
717         mono_arch_patch_callsite() to include the start of the managed method
718         to be able to perform bound checks.
719
720 2008-03-17  Mark Probst  <mark.probst@gmail.com>
721
722         * mini.c: Generic sharing for the isinst instruction.
723
724 2008-03-17  Mark Probst  <mark.probst@gmail.com>
725
726         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
727         inssel-long32-mips.brg: Added opcodes for doing indirect calls
728         with the runtime generic context argument.
729
730         * mini.c: Share calls to several types of unsharable methods by
731         putting the address of the method code in the runtime generic
732         context and doing an indirect call.
733
734         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
735         to switches.
736
737 2008-03-16  Mark Probst  <mark.probst@gmail.com>
738
739         * generic-sharing.c: Change due to a change in the runtime genric
740         context API.
741
742 2008-03-15  Martin Baulig  <martin@ximian.com>
743
744         * tramp-x86.c
745         (mono_arch_nullify_class_init_trampoline): Add call to
746         mono_breakpoint_clean_code() to make things work when running
747         inside the debugger.
748
749         * tramp-amd64.c
750         (mono_arch_nullify_class_init_trampoline): Add call to
751         mono_breakpoint_clean_code() to make things work when running
752         inside the debugger.
753
754 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
755
756         * inssel-long.brg (reg): Fix 64 bit build.
757
758 2008-03-14  Mark Probst  <mark.probst@gmail.com>
759
760         * mini.c, mini.h: Share static generic code by passing it an
761         implicit argument pointing to the runtime generic context.
762
763         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
764         inssel-long32-mips.brg: New opcodes for calling shared static,
765         which need to be passed the runtime generic context.
766
767         * mini-amd64.c, mini-x86.c: Save the runtime generic context
768         argument on the stack in the prologue if needed.  New function for
769         finding the runtime generic context argument from the registers
770         saved by the trampoline.
771
772         * mini-amd64.h, mini-x86.h: Specify which register to use for the
773         runtime generic context argument.
774
775         * tramp-amd64.c: Also restore the register used for the runtime
776         generic context argument.
777
778         * mini-trampoline.c: Resolve shared static calls by consulting the
779         runtime generic context via the new argument.
780
781         * generic-sharing.c: Add an argument to sharability-checking
782         functions that specifies whether type variables should be treated
783         as sharable type arguments.
784
785         * inssel-x86.brg: Removed a superfluous, buggy rule.
786
787         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
788         to switches.
789
790 2008-03-14  Martin Baulig  <martin@ximian.com>
791
792         * debug-debugger.c (main_thread_handler): Call
793         mono_runtime_run_main() without sending any notifications.
794
795         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
796
797 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
798
799         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
800
801 2008-03-14  Mark Probst  <mark.probst@gmail.com>
802
803         * tramp-x86.c: Fixed register restore offsets in the trampoline
804         code for ECX and EDX.
805
806 2008-03-12  Geoff Norton  <gnorton@novell.com>
807
808         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
809         different ucontext_t implementations.
810         * exceptions-arm.c: Use the above defines to get exceptions working on 
811         iPhone (based on a patch by Luke Howard lukeh@padl.com)
812         * mini-arm.c: Implement iPhone icache support (based on a patch by
813         Luke Howard lukeh@padl.com)
814
815 2008-03-12  Mark Probst  <mark.probst@gmail.com>
816
817         * mini.c: Enable generic sharing of calls to non-static
818         non-interface non-generic non-value-type methods.
819
820         * mini-trampolines.c: Resolve calls from shared generic code.
821
822 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
823
824         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
825
826         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
827
828 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
829
830         * mini.c: some fixes for the AOT compiler.
831
832 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
833
834         * cpu-amd64.md: Add clob:1 to some float opcodes.
835
836 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
837
838         * mini.h: Added MiniVerifierMode enumeration.
839
840         * mini.c: Added mini_verifier_set_mode to control
841         the usage of the new verifier.
842
843         * mini.c (mono_method): Integrated the new verifier.
844
845         * driver.c: Extended --security option with validil and
846         verifiable options to activate the new verifier.
847
848 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
849
850         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
851         optimization to ctors taking 0 or 2 arguments too.
852
853         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
854         a bit.
855
856         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
857
858         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
859
860 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
861
862         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
863         non-aot case as well.
864
865         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
866
867         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
868         changes.
869
870         * aot-compiler.c (encode_patch): Ditto.
871
872         * mini.h (G_MININT32): Fix the definition of this.
873
874 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
875
876         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
877
878         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
879
880 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
881
882         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
883         methods returning vtypes in registers.
884         (mono_arch_allocate_vars): Ditto.
885
886         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
887
888         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
889
890         * generics.cs: Add a test from the linear IR branch.
891
892         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
893
894         * mini.c (inline_method): Cache failed inline attempts.
895
896 2008-03-04  Mark Probst  <mark.probst@gmail.com>
897
898         * mini.c: For shared methods of generic classes put the location
899         of "this" into the MonoGenericJitInfo.
900
901         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
902         register out of a MonoContext by register number.  Add the generic
903         sharing context as an argument to mono_arch_find_this_argument().
904
905         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
906         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
907         for new arch function.
908
909         * mini-exception.c: Handle open exception clauses in shared
910         generic code.
911
912         * mini-trampolines.c: Supply additional argument to
913         mono_arch_find_this_argument().
914
915 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
916
917         * Makefile.am (regtests): Run the bench.exe tests last.
918
919 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
920
921         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
922         a bit.
923
924 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
925
926         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
927         with MS.
928
929         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
930         
931         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
932
933         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
934         whose class has no cctor.
935
936         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
937
938 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
939
940         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
941         unverified.
942
943 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
944
945         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
946         to be in sync with the code on the linear IR branch.
947
948         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
949
950         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
951
952 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
953
954         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
955
956         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
957
958         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
959
960         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
961
962         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
963         
964         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
965         body.
966
967 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
968
969         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
970         OP_LOADR4_MEMBASE emission.
971
972         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
973         (mono_spillvar_offset_float): Ditto.
974
975         * mini-mips.c (mono_arch_emit_prolog): Ditto.
976
977         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
978         emission.
979
980         * basic-long.cs: Add regression tests for them.
981
982         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
983         use.
984         (mono_arch_allocate_vars): Fix representation of single-precision float
985         argument.
986         (mono_arch_output_basic_block): Ditto.
987
988         * inssel-mips.brg: Ditto, remove duplicate items.
989
990         * mini-mips.c (emit_load_volatile_arguments): New function to handle
991         arguments of tail calls as on other platforms.
992         (mono_arch_output_basic_block): Handle tail calls.
993
994         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
995         register.
996
997         * objects.cs (test_5_pass_static_struct): Add test for it.
998
999         Contributed under MIT/X11 license.
1000
1001 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
1002
1003         * Makefile.am: Use gmcs for compiling the regression tests.
1004
1005         * *.2.cs *.2.il: Rename to *.cs and *.il.
1006
1007 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
1008
1009         * regalloc.h: Make the vassign array smaller.
1010
1011         * mini.c (mini_method_compile): Remove an unused field in cfg.
1012
1013         * mini-codegen.c: Add a bunch of micro optimizations.
1014
1015 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
1016
1017         * regalloc.h: Remove some unused fields.
1018
1019 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
1020
1021         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
1022
1023         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
1024
1025 2008-02-22  Mark Probst  <mark.probst@gmail.com>
1026
1027         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
1028
1029         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
1030         trampoline: Fetch an entry from the runtime generic context.  If
1031         it's NULL, jump to the actual trampoline to fill the runtime
1032         generic context.  Otherwise, return it.
1033
1034         * mini.c: Call the lazy fetch trampoline to get entries out of the
1035         runtime generic context.
1036
1037         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
1038         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
1039         tramp-sparc.c: Stubs for the lazy fetch trampoline.
1040
1041 2008-02-21  Mark Probst  <mark.probst@gmail.com>
1042
1043         * mini.c: Fetch data out of the extensible part of the runtime
1044         generic context instead of calling a helper function.
1045
1046         * generic-sharing.c: Some functions moved into
1047         metadata/generic-sharing.c.  Helper function for fetching other
1048         types now checks and asserts against extensible rgctx (just for
1049         debugging purposes - the helper function isn't called anymore
1050         unless for debugging).
1051
1052 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1053
1054         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
1055         for tail calls up to the point that the tests in iltests.exe run. Also add a
1056         dummy CKFINITE implementation.
1057         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
1058         needed for trampoline LMF frames.
1059
1060         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
1061         trampoline LMF frames.
1062
1063 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
1064
1065         * mini.c (inline_method): clean any pending loader error when inlining fail.
1066         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
1067
1068 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1069
1070         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
1071
1072         * aot-runtime.c (decode_patch_info): Ditto.
1073
1074         * mini.c (mono_resolve_patch_target): Ditto.
1075         
1076         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
1077         icall wrappers.
1078
1079         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
1080         
1081         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
1082         if it references an icall address.
1083
1084 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
1085
1086         * cpu-s390x.md: Remove some more unused opcodes.
1087         
1088         * cpu-s390x.md: Remove some unused opcodes.
1089
1090         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
1091         mono_op_imm_to_op ().
1092
1093         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
1094         instead of a switch statement.
1095         
1096         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
1097         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
1098
1099         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
1100         
1101         * mini-codegen.c: Remove unused mono_regstate2_... functions.
1102
1103         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
1104         -1.
1105
1106 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
1107
1108         * driver.c (mono_main): Improve error reporting when an assembly cannot be
1109         opened. Fixes #362607.
1110
1111         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
1112
1113         * iltests.il.in: Add a test for static methods in interfaces.
1114
1115 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
1116
1117         * genmdesc.c (build_table): Fix a crash on older glib versions.
1118
1119         * cpu-sparc.md: Remove some unused opcodes.
1120         
1121         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
1122         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
1123
1124         * cpu-amd64.md: Remove some unused opcodes.
1125
1126         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
1127         like the other opcodes.
1128
1129 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
1130
1131         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
1132
1133         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
1134
1135         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
1136         variables 'cfg' instead of 'm' for consistency.
1137
1138         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
1139
1140         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
1141         argument holding the vtype return address, to avoid the ambigious use of
1142         cfg->ret for this purpose.
1143
1144         * mini.c (NEW_RETLOADA): Use vret_addr if set.
1145
1146         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
1147         
1148         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
1149         new mono_print_ins () function which only takes one argument.
1150
1151 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
1152
1153         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
1154         macro arguments.
1155
1156 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
1157
1158         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
1159
1160         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
1161
1162         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
1163         opcodes and other small changes.
1164
1165         * mini-ops.h: Add some new opcodes from the linear IR branch.
1166
1167         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
1168
1169         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
1170         opcodes, use the REG_MEMBASE opcodes instead.
1171         
1172         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
1173         opcodes, use the REG_MEMBASE opcodes instead.
1174         
1175         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
1176         linear IR branch.
1177
1178         * mini.c (mono_op_imm_to_op): New helper function.
1179
1180         * mini-ops.h: Add some opcodes from linear IR branch.
1181
1182 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
1183
1184         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
1185         <tsv@solvo.ru>.
1186
1187 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
1188
1189         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
1190         OP_ICONV_TO_R4/R8.
1191
1192         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
1193
1194 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
1195
1196         * aot-compiler.c (emit_method_code): Add an assert.
1197
1198         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
1199         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
1200         methods.
1201
1202 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
1203
1204         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
1205         some load/store opcodes so they are consistent. 
1206         (mono_arch_emit_prolog): Simplify some code.
1207
1208         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
1209
1210         * objects.cs: Add tests for large argument offsets on ARM.
1211
1212         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
1213         stack offsets. Fixes #359651.
1214
1215         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
1216
1217         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
1218
1219         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
1220
1221         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
1222
1223         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
1224
1225         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
1226         rid of CEE_CONV_R_UN.
1227
1228         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
1229
1230 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
1231
1232         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
1233
1234         * mini.c (mono_normalize_opcodes): Add some more opcodes.
1235
1236         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
1237
1238         * cpu-amd64.md: Remove some unused opcodes.
1239
1240         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
1241
1242         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
1243
1244         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
1245         arch specific functions for its parts. Call the peephole pass after local
1246         regalloc so the prolog can compute a more accurate max_offset.
1247         
1248         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
1249         the corresponding OP_I/OP_L opcodes.
1250
1251         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
1252
1253         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
1254
1255 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1256
1257         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
1258         as they are handled in mini.c.
1259
1260         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
1261         
1262         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
1263         case since it is handled in mini.c.
1264
1265         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
1266
1267         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
1268
1269         * *.c: Use the new opcodes in the IR and back end code.
1270
1271         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
1272
1273         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
1274
1275 2008-02-06  Mark Probst  <mark.probst@gmail.com>
1276
1277         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
1278         an assert because it has a race condition.
1279
1280 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1281
1282         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
1283
1284         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
1285
1286         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
1287
1288         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
1289         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
1290
1291 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
1292
1293         * cpu-amd64.md (move): Correct the maximum size of move.
1294
1295 2008-02-05  Mark Probst  <mark.probst@gmail.com>
1296
1297         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
1298         the generic class init trampoline to return quickly if the class
1299         is already inited.
1300
1301 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
1302
1303         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
1304         issues where an 32 bit callsite cannot be patched by a 64 bit address.
1305
1306 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
1307
1308         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
1309         branch.
1310
1311 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
1312
1313         * objects.cs: Add some soft-float tests.
1314
1315         * mini.c: Fix a couple more soft-float issues.
1316
1317         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
1318
1319         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
1320         avoid a REX prefix.
1321
1322 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
1323
1324         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
1325         exception happens while compiling a virtual method.
1326
1327 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
1328
1329         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
1330         
1331         * mini-sparc.c: Fix build.
1332
1333         * mini-sparc.c (get_call_info): Add support for generic sharing.
1334
1335         * mini-exceptions.c: Add a FIXME.
1336
1337 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
1338
1339         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
1340         altstack handling code.
1341
1342         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
1343         
1344         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
1345
1346         * mini-s390.c: Add support for generic sharing.
1347
1348         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1349         Fix CAS on s390.
1350         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1351
1352         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
1353
1354         * mini-s390x.c: Add support for generic sharing.
1355         
1356         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1357         Fix CAS on ia64.
1358         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1359
1360         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
1361         can be used since it takes a 16 bit signed immediate.
1362
1363         * inssel-s390x.brg: Fix OP_SETRET.
1364
1365         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
1366
1367         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
1368
1369         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
1370
1371         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
1372
1373         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
1374         in one place.
1375
1376         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
1377         stuff.
1378
1379         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
1380         of the unused mono_arch_patch_delegate_trampoline stuff.
1381
1382 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
1383
1384         * basic-long.cs: Move the fp related tests to basic-float.cs.
1385
1386         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
1387
1388         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
1389
1390         * basic-calls.cs: Add a test for proper float argument passing.
1391
1392         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
1393         if the context corresponds to an exception received through a signal.
1394
1395         * exceptions.cs: Add a test for nullref handling at the start of a try
1396         clause.
1397
1398         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
1399
1400         * jit-icalls.c (mono_break): New JIT icall.
1401
1402         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
1403
1404         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
1405
1406 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
1407
1408         * cpu-*.md: Get rid of unused opcodes.
1409
1410         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
1411
1412         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
1413         by all platforms.
1414
1415         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
1416         define.
1417
1418         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
1419         the arch independent trampoline code in mini-trampolines.c.
1420
1421         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
1422
1423         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
1424
1425         * mini-s390.h: Remove an unused define.
1426         
1427         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
1428         the arch independent trampoline code in mini-trampolines.c.
1429
1430         * mini-arm.c (mono_arch_emit_prolog): Fix build.
1431
1432 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
1433
1434         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
1435
1436         * mini-s390.c (mono_arch_emit_prolog): Fix build.
1437
1438         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
1439
1440         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
1441
1442         * cpu-amd64.md: Use smaller sizes for int opcodes.
1443
1444         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
1445
1446         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
1447         objects.cs.
1448
1449         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
1450         debugging.
1451
1452         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
1453         instead of though a pointer to save an indirection when accessing elements of
1454         the array.
1455
1456         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
1457         some typos.
1458         (NOT_IMPLEMENTED): New helper macro.
1459         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
1460         of a bb.
1461
1462         * *.c: Use the new helper macro.
1463
1464 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
1465
1466         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
1467
1468 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
1469
1470         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
1471         stack slots.
1472
1473 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
1474
1475         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
1476         profiling is enabled.
1477         
1478         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
1479         the end.
1480         (mono_arch_emit_prolog): Add more first bblock optimizations.
1481
1482         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
1483         in order if possible.
1484         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
1485         bblock, since the arguments are still in their original registers.
1486
1487         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
1488
1489 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
1490
1491         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
1492         as well.
1493
1494         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
1495         offset 0.
1496
1497         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
1498
1499         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
1500         process async exceptions received while in unmanaged code.
1501
1502         * mini.c (mini_init): Install a callback with the runtime which will be called
1503         when a thread receives an async exception while in unmanaged code.
1504
1505         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
1506
1507         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
1508
1509 2008-01-16  Wade Berrier  <wberrier@novell.com>
1510
1511         * cpu-g4.md:
1512         * cpu-arm.md:
1513         * cpu-s390x.md:
1514         fix build
1515
1516 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
1517
1518         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
1519         compilation with sun cc.
1520
1521         * cpu-*.md: Fix the build.
1522
1523         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
1524
1525         * mini-amd64.h: Add some comments to the MonoLMF structure.
1526
1527         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
1528         
1529         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
1530         in the LMF structure if possible. This saves two instructions in the
1531         managed->native wrappers.
1532
1533         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
1534
1535 2008-01-16  Mark Probst  <mark.probst@gmail.com>
1536
1537         * generic-sharing.c: New type argument lookup code which uses the
1538         runtime generic context template.
1539
1540 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
1541
1542         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
1543
1544         * mini-arm.c (add_general): Fix arm eabi parameter passing.
1545         (mono_arch_output_basic_block): Fix localloc implementation.
1546
1547         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
1548
1549         * mini-ia64.c (peephole_pass): Fix ia64 build.
1550
1551         * mini-amd64.c (peephole_pass): Fix a warning.
1552         
1553         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
1554         at a constant offset from sp/fp.
1555
1556         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
1557         instead of obtaining it from *lmf in the managed method case.
1558
1559 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
1560
1561         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
1562
1563 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
1564
1565         * mini.h (MonoInstList): New type.
1566         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
1567         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
1568         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
1569         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
1570         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
1571         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
1572         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
1573         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
1574         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
1575         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
1576         MONO_INST_LIST_FOR_EACH_ENTRY,
1577         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
1578         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
1579         mono_inst_list_first, mono_inst_list_last,
1580         mono_inst_list_next, mono_inst_list_prev): New instruction
1581         list handling interfaces.
1582         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
1583         list head 'ins_list'.
1584         (MonoInst): Replace next pointer with list head 'node'.
1585         (MonoCallInst): Make 'out_args' a MonoInstList.
1586         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
1587         (MonoCompile): Delete reverse_inst_list and
1588         reverse_inst_list_len.
1589         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
1590         mono_arch_lowering_pass, mono_arch_local_regalloc,
1591         mono_arch_output_basic_block, mono_arch_emit_prolog):
1592         Convert to new instruction lists.
1593         (insert_after_ins): Delete.
1594         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
1595         instruction lists.
1596         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
1597         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
1598         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
1599         mono_emulate_opcode, mono_emit_load_got_addr,
1600         inline_method, mono_method_to_ir, mono_print_bb_code,
1601         print_dfn, decompose_pass, nullify_basic_block,
1602         replace_out_block_in_code, remove_block_if_useless,
1603         merge_basic_blocks, move_basic_block_to_end,
1604         try_unsigned_compare, optimize_branches, mono_print_code,
1605         mini_select_instructions, remove_critical_edges): Likewise.
1606         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
1607         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
1608         mono_arch_output_basic_block, mono_arch_emit_prolog):
1609         Likewise.
1610         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
1611         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1612         mono_arch_output_basic_block): Likewise.
1613         (inst_list_prepend, insert_after_ins): Delete.
1614         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
1615         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
1616         instruction lists.
1617         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
1618         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
1619         mono_arch_emit_prolog): Likewise.
1620         * cfold.c (mono_constant_fold): Likewise.
1621         * liveness.c (visit_bb, mono_analyze_liveness,
1622         optimize_initlocals): Likewise.
1623         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
1624         * graph.c (mono_draw_code_cfg): Likewise.
1625         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
1626         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
1627         mono_ssa_cprop): Likewise.
1628         * abcremoval (get_relations_from_previous_bb, process_block):
1629         Likewise.
1630         * local-propagation (mono_cprop_invalidate_values,
1631         mono_local_cprop_bb): Likewise.
1632         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
1633         peephole_pass, mono_arch_output_basic_block,
1634         mono_arch_emit_prolog): Likewise.
1635         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
1636         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1637         mono_arch_emit_prolog): Likewise.
1638         (insert_after_ins): Delete.
1639         * aliasing.c (print_code_with_aliasing_information,
1640         mono_build_aliasing_information, mono_aliasing_deadce):
1641         Convert to new instruction lists.
1642         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
1643         peephole_pass, NEW_INS, mono_arch_lowering_pass,
1644         mono_arch_local_regalloc, mono_arch_output_basic_block):
1645         Likewise.
1646         (insert_after_ins): Delete.
1647         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
1648         peephole_pass, mono_arch_output_basic_block): Convert to
1649         new instruction lists.
1650         * mini-codegen (InstList, inst_list_prepend,
1651         insert_after_ins): Delete.
1652         (insert_before_ins, get_register_force_spilling,
1653         get_register_spilling, free_up_ireg, free_up_reg,
1654         create_copy_ins, create_spilled_store, alloc_int_reg,
1655         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
1656         to new instruction lists.
1657         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
1658         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1659         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
1660         (insert_after_ins): Delete.
1661         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
1662         mono_arch_local_regalloc, mono_arch_output_basic_block,
1663         mono_arch_call_opcode): Convert to new instruction lists.
1664         (insert_after_ins): Delete.
1665         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
1666         peephole_pass, mono_arch_output_basic_block,
1667         mono_arch_emit_prolog): Convert to new instruction lists.
1668
1669 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
1670
1671         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
1672
1673         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
1674         Fixes #353182.
1675
1676         * Makefile.am (version.h): Make this work with non-bash shells.
1677
1678 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
1679
1680         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
1681
1682 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
1683
1684         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
1685         the InitializeArray optimization.
1686
1687 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
1688
1689         * mini.c driver.c: Don't include os/gc_wrapper.h.
1690
1691 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
1692
1693         * mini.c (print_jit_stats): Print GC statistics if available.
1694
1695 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
1696
1697         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
1698
1699 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
1700
1701         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
1702
1703 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
1704
1705         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
1706         
1707         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
1708
1709         * driver.c (mono_main): Ditto.
1710
1711 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
1712
1713         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
1714
1715         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
1716         in the vtable can't be encoded.
1717         (compile_method): Ditto.
1718
1719 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
1720
1721         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
1722         defined.
1723
1724         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
1725         lmf->rbp.
1726
1727         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
1728         the top LMF entry belongs to the current method.
1729
1730         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
1731
1732 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
1733
1734         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
1735         
1736         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
1737
1738         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
1739
1740         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
1741
1742         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
1743
1744         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
1745         implementation.
1746
1747         * basic-float.cs: Add an ulong->double cast test.
1748
1749 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
1750
1751         * mini.c (mono_method_to_ir): Fix a warning.
1752
1753 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
1754
1755         * mini-ops.h: Add OP_SWITCH.
1756
1757         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
1758         CEE_SWITCH in back-end code, use OP_SWITCH instead.
1759
1760 2007-12-11  Geoff Norton  <gnorton@novell.com>
1761
1762         * mini-s390x.c: Minor change to the MAX() define to allow
1763         it to compile with other gcc versions.
1764
1765 2007-12-11  Geoff Norton  <gnorton@novell.com>
1766
1767         * cpu-s390x.md:
1768         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
1769
1770 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
1771
1772         exceptions-arm.c (mono_arch_get_restore_context): Restore
1773         the frame pointer.
1774
1775         exceptions-arm.c (throw_exception): Save the frame pointer.
1776         This is a partial fix for #323747. Only the client side is
1777         fixed.
1778
1779 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
1780
1781         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
1782         was using an unrelated variable to log the class which
1783         needed the cctor to be called. This was crashing on arm.
1784
1785 2007-12-09  Robert Jordan  <robertj@gmx.net>
1786
1787         * mini-x86.c (mono_arch_emit_epilog):
1788         Consider all kinds of 64-bit types. Fixes #323114.
1789
1790 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
1791
1792         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
1793
1794 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1795
1796         * mini-amd64.c (peephole_pass): Add a missing instruction check.
1797
1798 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
1799
1800         * mini.c: run type ctor before allocating an object, not only
1801         when running it's constructor method (fixes at least part of bug #342507).
1802
1803 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1804         
1805         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
1806         
1807         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
1808         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
1809         function.
1810
1811         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
1812         mono_generic_class_init_trampoline () the same as it is done with the other
1813         trampolines.
1814
1815         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
1816         aot-runtime.c aot-compiler.c: Implement AOT support.    
1817
1818 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1819
1820         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
1821         build for archs which don't have the vtable trampoline defined
1822         yet.
1823
1824 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1825
1826         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
1827
1828         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
1829
1830         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
1831
1832         * tramp-<ARCH>.c: Use the new helper function.
1833
1834 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1835
1836         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
1837         trampoline call, which takes a vtable argument.
1838
1839         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
1840         OP_TRAMPCALL_VTABLEs like other calls.
1841
1842         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
1843         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
1844         call.  Implemented a support function which fetches the vtable
1845         from a register set.
1846
1847         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
1848         Implemented a generic class init trampoline, using the
1849         OP_TRAMPCALL_VTABLE opcode.
1850
1851         * mini.c: Implemented static field access when sharing generic
1852         code.  This implies initing the class using the new
1853         OP_TRAMPCALL_VTABLE call.
1854
1855 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1856
1857         * mini.c: Don't compile methods with sharing enabled if their
1858         classes are disabled for sharing.
1859
1860 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
1861
1862         * inssel.brg: Add a missing sign extension to the GETCHR and array access
1863         opcodes. Fixes #346563.
1864
1865         * objects.cs: Add a new test.
1866
1867         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
1868
1869         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
1870         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
1871
1872 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
1873
1874         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
1875
1876 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
1877
1878         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
1879         code stream.
1880
1881 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
1882
1883         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
1884
1885         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
1886         optimization in the AOT case.
1887         
1888 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
1889
1890         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
1891         
1892         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
1893
1894         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
1895
1896         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
1897
1898         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
1899         is created by the inlined delegate ctor.
1900
1901         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
1902
1903         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
1904
1905 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
1906
1907         * cpu-x86.md: Fix the length of ckfinite.
1908
1909 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
1910
1911         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
1912         
1913         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
1914         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
1915
1916         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
1917
1918         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
1919         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
1920
1921 2007-11-28  Martin Baulig  <martin@ximian.com>
1922
1923         * mini-x86.c
1924         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
1925         after creating the trampoline.
1926
1927 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
1928
1929         * aot-runtime.c (load_aot_module): Check runtime version if needed.
1930
1931         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
1932         the same version.
1933
1934         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
1935         instead of the calling method to help AOT.
1936
1937         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
1938
1939 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
1940
1941         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
1942         is defined.
1943
1944 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
1945
1946         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
1947         
1948         * aot-compiler.c (compile_method): Correct check for generic method definitions.
1949         (encode_method_ref): No need to handle generic method definitions specially.
1950
1951         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1952
1953         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
1954         decode_klass_info.
1955
1956         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
1957         encode_klass_info.
1958         (compile_method): Enable generic sharing.
1959
1960 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
1961
1962         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
1963         (mini_method_compile): Add preliminary support for AOTing shared generic code.
1964
1965         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
1966         generic code.
1967
1968         * mini-trampolines.c: Fix a warning.
1969
1970         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
1971         NEW_PCONST.
1972         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
1973         (generic_class_is_reference_type): Remove unused function.
1974
1975         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
1976         in the generic vtable trampoline case.
1977
1978         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
1979         
1980         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
1981         return an AOT method based on a vtable slot.
1982
1983         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
1984
1985         * mini.c (mini_get_vtable_trampoline): Export this.
1986
1987 2007-11-22  Martin Baulig  <martin@ximian.com>
1988
1989         * debug-debugger.h
1990         (MonoDebuggerInfo): Move `debugger_version' up.
1991
1992 2007-11-22  Martin Baulig  <martin@ximian.com>
1993
1994         * mini-amd64.c
1995         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
1996
1997         * mini-trampolines.c
1998         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
1999         after compiling the method.
2000
2001 2007-11-20  Martin Baulig  <martin@ximian.com>
2002
2003         * debug-mini.c
2004         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
2005         (mono_debugger_remove_breakpoint): Likewise.
2006         (mono_debugger_check_breakpoints): Likewise.
2007
2008         * debug-debugger.c: Implement the new breakpoint interface here.
2009
2010 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
2011
2012         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
2013         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
2014
2015         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
2016
2017 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
2018
2019         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
2020
2021         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
2022         mini.c.
2023
2024         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
2025         mini.c.
2026
2027         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
2028         returning a vtype in a register.
2029
2030         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
2031         here from the arch specific code.
2032
2033         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
2034         mini.c.
2035
2036         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
2037         (mono_arch_emit_prolog): Increment maximum prolog size.
2038
2039         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
2040         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
2041
2042         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
2043         MonoGenericSharingContext.
2044
2045         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
2046         MonoGenericSharingContext. Allocate memory from the cfg mempool.
2047
2048 2007-11-15  Mark Probst  <mark.probst@gmail.com>
2049
2050         * mini.c, mini.h, generic-sharing.c: Functions for producing code
2051         which extract fields out of the runtime generic context.  Full
2052         sharing of the NEWARR opcode.
2053
2054 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
2055
2056         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
2057         --enable-minimal=ssa.
2058
2059 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
2060
2061         * mini-trampolines.c (mono_delegate_trampoline): Update after 
2062         mono_marshal_get_delegate_invoke () signature change.
2063
2064 2007-11-13  Mark Probst  <mark.probst@gmail.com>
2065
2066         * mini.c: Removed the shared context in favor of the generic
2067         sharing context.  Allocate the MonoJitInfo structure with room for
2068         the generic sharing context if it's needed.
2069
2070         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
2071         domain-internals.h now.
2072
2073         * mini-x86.c: Pass the generic sharing context to get_call_info ().
2074
2075         * generic-sharing.c: Several changes for working without a shared
2076         context and instead operating on open types instead.
2077
2078 2007-11-12  David S. Miller  <davem@davemloft.net>
2079
2080        * inssel-sparc.brg: Fix double instruction emit.
2081
2082 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
2083
2084         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
2085         Get/Set/Address methods.
2086         
2087         * mini.c debug-debugger.c mini-trampolines.c: Update after 
2088         mono_marshal_get_delegate_invoke signature change.
2089
2090 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2091
2092         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
2093         This can happens with dynamic methods. Fixes the other bug in #322722.
2094
2095 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2096
2097         * tramp-arm.c (mono_arch_patch_callsite): Support patching
2098         BX call sequence.
2099
2100         * mini-arm.c (arm_patch): Implement patching of BX call
2101         sequence. Fixes one of the bugs in #322722.
2102
2103 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
2104
2105        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
2106        under Linux.  We only need to flush every 32-byte cache line.    
2107
2108 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
2109
2110         * mini.c:
2111         move_basic_block_to_end: Add branches when needed, eventually creating
2112         a new BB.
2113         optimize_branches: added a parameter that tells if it's ok to create
2114         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
2115         and avoid calling move_basic_block_to_end when it's not ok.
2116         Fixes bug 318677.
2117
2118 2007-11-07  Mark Probst  <mark.probst@gmail.com>
2119
2120         * mini.c: Abort inlining call to InitializeArray if something
2121         looks wrong.  Let the icall handle it, which now has proper safety
2122         checks.
2123
2124 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2125
2126         * mini.c (mono_spill_call): add support for soft-float.
2127
2128         * mini.c (mono_method_to_ir): add support for soft-float
2129         to inlined functions that return float.
2130
2131         * mini.c (mono_method_to_ir): add support for soft-float
2132         to cee_stsfld opcode on float fields.
2133
2134 2007-11-05  Geoff Norton  <gnorton@novell.com>
2135
2136         * mini-x86.h: Fix the structure access for X86 Leopard.
2137
2138
2139 2007-11-05  Martin Baulig  <martin@ximian.com>
2140
2141         * mini-trampolines.c
2142         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
2143         after compiling the method to notify the debugger.
2144
2145 2007-11-05  Martin Baulig  <martin@ximian.com>
2146
2147         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
2148
2149 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
2150
2151         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
2152         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
2153
2154 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
2155
2156         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
2157         native-to-managed wrappers.
2158         
2159 2007-11-01  Geoff Norton  <gnorton@novell.com>
2160
2161         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
2162         members.
2163
2164 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
2165
2166         * mini.c, mini-x86.c: when getting back from unmanaged code
2167         to managed via a marshaled delegate we also need to set the
2168         right domain.
2169
2170 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
2171
2172         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
2173         for amd64.
2174
2175 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
2176
2177         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
2178         let the debugger or other external agents to tell the JIT when
2179         a sw breakpoint has been inserted in the code that the JIT needs
2180         to be able to inspect.
2181
2182 2007-10-31  Martin Baulig  <martin@ximian.com>
2183
2184         * debug-debugger.h
2185         (MonoDebuggerInfo): Remove `runtime_class_init'.
2186
2187 2007-10-30  Martin Baulig  <martin@ximian.com>
2188
2189         * debug-mini.h
2190         (mono_debugger_thread_created): Added `MonoThread *' argument.
2191         (mono_debugger_extended_notification): New public method.
2192         (mono_debugger_trampoline_compiled): New public method.
2193
2194         * debug-mini.c
2195         (MonoDebuggerThreadInfo): Added `thread' and
2196         `extended_notifications' fields.
2197
2198         * debug-debugger.c
2199         (debugger_executable_code_buffer): New static variable.
2200
2201         * debug-debugger.h
2202         (MonoDebuggerInfo): Added `executable_code_buffer',
2203         `executable_code_buffer_size', `breakpoint_info_area',
2204         `breakpoint_table' and `breakpoint_table_size'.
2205
2206 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
2207
2208         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
2209         that IP  either is an unused value or the vtable pointer. IMT 
2210         calls use vtable + offset now. Reduced by almost half the size
2211         of IMT entries.
2212
2213 2007-10-26  Jonathan Chambers <joncham@gmail.com>
2214
2215         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
2216         defines to access param registers. Replace long usage with
2217         gsize as sizeof(long) != sizeof(void*) on Win64.
2218
2219         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
2220         on Win64. Fix intrinsic, use _AddressOfReturnAddress
2221         instead of non-existant _GetAddressOfReturnAddress.
2222
2223         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
2224         param registers. Save/restore %rdi and %rsi in MonoLMF.
2225
2226         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
2227         param registers. Modify (throw_exception) signature to take 
2228         %rdi and %rsi on Win64. 
2229
2230         Code is contributed under MIT/X11 license.
2231
2232 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
2233
2234         * helpers.c: unlink debugging output files.
2235
2236 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
2237
2238         * mini.c: Move mono_create_ftnptr () to object.c.
2239
2240 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2241
2242         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
2243         optional. This function can now be used to disassemble code generated
2244         outside the JIT such as trampolines and IMT thunks.
2245
2246         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
2247
2248         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
2249         vtable pointer from a ldr instruction.
2250
2251         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
2252         new IMT call sequence.
2253
2254         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
2255         call sequence for interface invocations.
2256
2257         * mini-arm.c (mono_arch_emit_imt_argument): added, required
2258         for imt support. This function is empty since IMT on ARM requires no
2259         special handling on the IR side.
2260
2261         * mini-arm.c (mono_arch_find_imt_method): added, required for
2262         imt support.
2263
2264         * mini-arm.c (mono_arch_find_this_argument): added, required
2265         for imt support.
2266
2267         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
2268         a ldr instruction to load a value stored in the code stream.
2269
2270         * mini-arm.c (mono_arch_build_imt_thunk):added, required
2271         for imt support.
2272
2273
2274 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
2275
2276         * mini.c (mini_init): Install the jump trampoline callback.
2277
2278 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2279
2280         * mini-trampolines.c: handle synchronized methods with the common
2281         vtable trampoline (bug #335601).
2282
2283 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
2284
2285         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
2286
2287         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
2288         64 bit platforms.
2289
2290         * mini-ia64.h mini-ia64.c: Add support for IMT.
2291
2292         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
2293         prolog. Fixes #331958.
2294
2295 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
2296
2297         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
2298
2299 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2300
2301         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
2302         trampoline.
2303
2304 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2305
2306         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
2307         trampoline.
2308
2309 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
2310
2311         * mini-x86.c, mini-x86.h: x86 support for the common vtable
2312         trampoline.
2313
2314 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
2315
2316         * mini-trampolines.c: changed the magic rampoline to understand
2317         the common vtable trampoline method: the method to invoke is
2318         determined by the vtable displacement of the call.
2319
2320 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2321
2322         * mini.c, mini.h: register the common vtable trampoline if the
2323         architecture supports it.
2324
2325 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2326
2327         * cpu-amd64.md: use the correct max length for tls_get.
2328
2329 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
2330
2331         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
2332         CEE_STELEM_ANY. Fixes #333696.
2333
2334 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2335
2336         * exceptions-x86.c: provide more graceful handling of the case where
2337         we followed a bogus function pointer from managed code (bug #332866).
2338
2339 2007-10-11  Mark Probst  <mark.probst@gmail.com>
2340
2341         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
2342         replaces the generic_shared flag and will carry more information
2343         in the future.
2344
2345         * generic-sharing.c: Added mini_type_stack_size() which allows
2346         allows open types if given a generic sharing context.
2347         mini_get_basic_type_from_generic() takes a
2348         MonoGenericSharingContext* instead of a MonoCompile* now.
2349
2350         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
2351         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
2352         mini-sparc.c, mini-x86.c: Trivial changes required by the two
2353         changes above.  Just passing arguments through to the right
2354         places.
2355
2356 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2357
2358         * mini-arm.c: unify the call emission to emit_code_seq().
2359
2360 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
2361
2362         * tramp-arm.c: reduced the trampoline size.
2363
2364 2007-10-10  Mark Probst  <mark.probst@gmail.com>
2365
2366         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
2367         variable handling out of arch-specific code.
2368
2369 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
2370
2371         * mini-arm.c: implemented fast delegate dispatch.
2372
2373 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2374
2375         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
2376         that fp elimination is turned off if the space required by locals is too
2377         big. Fixes #331958.
2378
2379 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
2380
2381         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
2382         ARM to the new style trampoline.
2383
2384 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2385
2386         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
2387
2388         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
2389
2390 2007-10-09  Martin Baulig  <martin@ximian.com>
2391
2392         * debug-debugger.h
2393         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
2394         `field_info_offset_offset'.     
2395
2396 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
2397
2398         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
2399         removed more internal usage of the r11 register and made it available
2400         to the register allocator.
2401
2402 2007-10-08  Mark Probst  <mark.probst@gmail.com>
2403
2404         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
2405         when sharing generics and treat type variables as references.
2406
2407 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2408
2409         * mini-ppc.c: started removing the internal uses of register r11
2410         to eventually allow the register allocator to manage it as an
2411         additional available register.
2412
2413 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2414
2415         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
2416
2417 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
2418
2419         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
2420         specific trampolines as they are not performance critical as a jump
2421         target (maybe align as before only for AOT code?). This saves about
2422         200 KB of native code on x86 for monodevelop startup.
2423
2424 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
2425
2426         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
2427         monodevelop startup.
2428
2429 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
2430
2431         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
2432
2433         * mini-sparc.h mini-sparc.c: Implement IMT support.
2434
2435         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
2436         its smaller and doesn't clobber sparc_g1.
2437
2438         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
2439
2440 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
2441
2442         * mini-ppc.c: optimized the size of the IMT thunks a bit.
2443
2444 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
2445
2446         * mini-ppc.c: implemented fast delegate invocation.
2447
2448 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
2449
2450         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
2451
2452 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2453
2454         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
2455         code to the new style trampoline in preparation for IMT support.
2456
2457 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
2458
2459         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
2460         systems already. This also reduces the specific trampiline sizes and
2461         prepares for the use of r12 as the IMT identifier register.
2462
2463 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2464
2465         * mini-mips.h: endianess fix (simplified from a patch by
2466         Thomas Kunze <thommy@tabao.de>, bug #323737).
2467
2468 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2469
2470         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
2471         to access ucontext fields and enable netbsd support
2472         (partially from Magnus Henoch <mange@freemail.hu>).
2473
2474 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2475
2476         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
2477         use the preprocessor from the CPP env var if it is set.
2478
2479 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2480
2481         * mini-trampolines.c: fixed an assertion and moved it earlier in the
2482         code, before interface_offset gets used.
2483
2484 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
2485
2486         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
2487         mono_class_setup_vtable () before accessing klass->vtable.
2488
2489 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
2490
2491         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
2492         hackish.
2493
2494 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2495
2496         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
2497         IMT slots (this saves hundreds of KB of memory in programs like
2498         IronPython and Monodevelop).
2499
2500 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2501
2502         * mini.c: print the delegate counter.
2503
2504 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
2505
2506         * mini-x86.c: make it easier to enable the debugging code for IMT
2507         slots.
2508
2509 2007-09-28  Martin Baulig  <martin@ximian.com>
2510
2511         * debug-debugger.h
2512         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
2513         `mono_method_klass_offset' and `mono_method_token_offset'.
2514
2515 2007-09-20  Mark Probst  <mark.probst@gmail.com>
2516
2517         * mini.c: First generics sharing implementation.  Can only share
2518         in very simple cases.  If sharing doesn't work it falls back to
2519         dedicated compilation.
2520
2521         * mini.h: Flag in MonoCompile to specify whether generic
2522         compilation is shared.  Flags enum for marking which generic inst
2523         of a context is used.  Prototypes for helper functions.
2524
2525         * generic-sharing.c: Helper functions for generic method sharing.
2526
2527         * optflags-def.h: Optimization flag (gshared) for enabling generic
2528         method sharing added.
2529
2530         * Makefile.am: generic-sharing.c added.
2531
2532 2007-09-19 Daniel Nauck <dna@mono-project.de>
2533
2534         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
2535
2536 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
2537         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
2538         fixes bug 325507.
2539
2540 2007-09-19  Martin Baulig  <martin@ximian.com>
2541
2542         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
2543         mono_debug_cleanup() is now part of mono_cleanup().
2544
2545 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
2546
2547         * driver.c (mono_main): Fix a warning.
2548
2549 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
2550
2551         * aot-compiler.c: Optimize various parts when processing large assemblies.
2552         Fixes ##325568.
2553
2554         * mini.c (mono_patch_info_hash): Improve hash function.
2555
2556 2007-09-14  Jonathan Chambers <joncham@gmail.com>
2557
2558         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
2559         
2560         Code is contributed under MIT/X11 license.
2561
2562 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2563
2564         * mini.c (mini_init): Fix a leak.
2565
2566         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
2567
2568 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2569
2570         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
2571
2572 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2573
2574         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
2575
2576 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
2577
2578         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
2579         variance tests.
2580
2581         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
2582
2583         * mini.c (handle_alloc): Enable managed allocators in AOT code.
2584
2585         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
2586
2587         * aot-runtime.c (decode_patch_info): Ditto.
2588
2589 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2590
2591         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
2592         static case. Cache delegates in architecture specific code, 
2593         based on number of parameters.
2594         
2595         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
2596         in architecture specific code, based on number of parameters.
2597         
2598         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
2599         caching happen in architecture specific code now.
2600         
2601         Code is contributed under MIT/X11 license.
2602
2603 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2604
2605         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
2606         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
2607         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
2608
2609         Code is contributed under MIT/X11 license.
2610
2611 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
2612         * mini.c: (mono_thread_abort) Fixed bug #82416.
2613
2614 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2615
2616         * mini.: hook the new managed GC allocation feature into the JIT.
2617
2618 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2619
2620         * mini.c: implementation for the new runtime tls opcode.
2621
2622 2007-09-11  Martin Baulig  <martin@ximian.com>
2623
2624         * debug-debugger.h
2625         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
2626         `mono_method_inflated_offset'.
2627
2628 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
2629
2630         * driver.c mini.h mini.c: Add a new devel command line option for injecting
2631         async exceptions into a method.
2632
2633         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
2634         purpose of testing whenever the unwinder works at every instruction.
2635
2636 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
2637
2638         * mini.c: check accessibility of method used in ldftn (fixes
2639         bug #82635).
2640
2641 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
2642
2643         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
2644
2645         * inssel.brg: Fix a warning.
2646
2647 2007-09-03  Martin Baulig  <martin@ximian.com>
2648
2649         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
2650         now takes the `main_method' as argument.
2651
2652 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
2653
2654         * cpu-sparc.md (endfilter): Add missing src1:i argument.
2655
2656 2007-08-30  Jonathan Chambers <joncham@gmail.com>
2657
2658         * driver.c: include the cil-coff.h header on Windows.
2659         
2660         Code is contributed under MIT/X11 license.
2661
2662 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2663
2664         * mini.c, driver.c: don't include the cil-coff.h header.
2665
2666 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2667
2668         * mini.c: flag places that needs fixes fo soft-float support.
2669
2670 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
2671
2672         * mini.h, inssel-float.brg: fix soft-float constant loads on big
2673         endian systems (partially from Dean Jenkins, bug #81924).
2674
2675 2007-08-28  Mark Probst  <mark.probst@gmail.com>
2676
2677         * mini.c (check_linkdemand): Remove embedded reference object in
2678         call to LinkDemandSecurityException.
2679         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
2680         with an IntPtr instead of a reference object.
2681
2682 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
2683
2684         * mini.c (handle_initobj): Handle alignment properly.
2685
2686         * inssel.brg (mini_emit_memset): Ditto. 
2687
2688         * inssel.brg (mini_emit_memcpy): Ditto. 
2689
2690         * inssel-sparc.brg: Ditto.              
2691
2692         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
2693
2694 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
2695
2696         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
2697         exceptions raised in unmanaged code. Fixes part of #82594.
2698
2699 2007-08-24  Mark Probst  <mark.probst@gmail.com>
2700
2701         * mini.c (mono_method_to_ir), declsec.c
2702         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
2703
2704 2007-08-22  Martin Baulig  <martin@ximian.com>
2705
2706         * debug-mini.h
2707         (MonoDebuggerThreadInfo): New typedef.
2708         (mono_debugger_thread_table): New global variable.
2709         (mono_debugger_thread_created): New public function.
2710         (mono_debugger_thread_cleanup): New public function.
2711
2712         * debug-debugger.h
2713         (MonoDebuggerInfo):
2714         - removed `get_current_thread' and `lookup_assembly'.
2715         - removed `data_table'.
2716         - added `thread_table'.
2717
2718         * mini.c
2719         (mono_thread_start_cb): Call mono_debugger_thread_created().
2720         (mono_thread_attach_cb): Likewise.
2721         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
2722         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
2723         initial domain.
2724
2725         * driver.c (mono_main): Move mono_debug_init() up, before calling
2726         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
2727
2728 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
2729
2730         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
2731         together when passing several arguments of type double (gives a small
2732         speedup and saves a few bytes of generated code).
2733
2734 2007-08-20  Jb Evain  <jbevain@novell.com>
2735
2736         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
2737
2738 2007-08-20  Jb Evain  <jbevain@novell.com>
2739
2740         * mini.c (mono_method_to_ir): throw MethodAccessException
2741         and FieldAccessException instead of InvalidProgramException.
2742
2743 2007-08-20  Mark Probst  <mark.probst@gmail.com>
2744
2745         * mini.c: CoreCLR security checks.
2746
2747         * mini.h: Removed MonoSecurityMode (moved to
2748         metadata/security-manager.h) and mono_security_mode global var
2749         (replaced by set/get functions in security-manager.h).
2750
2751         * driver.c: Added "core-clr-test" security mode for testing.  Used
2752         set-function for setting security mode.
2753
2754 2007-08-17  Mark Probst  <mark.probst@gmail.com>
2755
2756         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
2757         the new jit_info_table.
2758
2759         * driver.c: Test code for the new jit_info_table (enabled by the
2760         define MONO_JIT_INFO_TABLE_TEST).
2761
2762 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
2763
2764         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
2765         detection of call <REG> instruction sequence. Fixes build on freebsd.
2766
2767 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
2768
2769         * mini-exceptions.c: Fix a warning.
2770
2771 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
2772
2773         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
2774         stack overflow handling code on amd64 too.
2775
2776         * mini-exceptions.c (mono_setup_altstack): Make this use 
2777         mono_thread_get_stack_bounds ().
2778
2779         * mini-x86.h: Disable sigaltstack on solaris x86.
2780
2781 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
2782
2783         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
2784
2785 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
2786
2787         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
2788
2789 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
2790
2791         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
2792
2793         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
2794
2795 2007-08-03  Neale Ferguson <neale@sinenomine.net>
2796
2797         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
2798         due to alignment.
2799
2800 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2801
2802         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
2803         to be emitted (bug #82281).
2804
2805 2007-08-01  Martin Baulig  <martin@ximian.com>
2806
2807         Merged the `debugger-dublin' branch.
2808
2809         * debug-debugger.h (MonoDebuggerInfo):
2810         Removed the `old_*' compatibility entries.
2811         Added `debugger_version' and `data_table'.
2812         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
2813         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
2814
2815         * debug-mini.c
2816         (MiniDebugMethodBreakpointInfo): Add `address_list'.
2817         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
2818         instead of a `gconstpointer'.
2819         (mono_debugger_insert_method_breakpoint): Return a
2820         `MonoDebugMethodAddressList *'.
2821
2822 2007-06-28  Martin Baulig  <martin@ximian.com>
2823
2824         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
2825
2826 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
2827
2828         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
2829         __builtin_frame_address () since it is broken on older gcc versions.
2830
2831 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2832
2833         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
2834         on the stack overflow handling and made the managed stack overflows
2835         catchable in most cases using soft guard pages.
2836         * exceptions-x86.c: added code to restore the protection in the soft
2837         guard pages at the end of exception handling.
2838
2839 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
2840
2841         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
2842
2843 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2844
2845         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
2846         exception handling.
2847
2848 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2849
2850         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
2851         signal handling support until it has been ported to the new mechanism.
2852         * mini.c: fixed stack overflow detection and use the new
2853         architecture code  to handle signals on the altstack.
2854
2855 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
2856
2857         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
2858         stack overflows on the alt stack.
2859
2860 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
2861
2862         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
2863         stack overflows on the alt stack.
2864
2865 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
2866
2867         * exceptions-ppc.c: cleanup preparing for altstack support.
2868
2869 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
2870
2871         * exceptions-arm.c: cleanup preparing for altstack support.
2872
2873 2007-07-27  Mark Probst  <mark.probst@gmail.com>
2874
2875         * mini.c (print_jit_stats): Output hazard pointer stats.
2876
2877 2007-07-26  Mark Probst  <mark.probst@gmail.com>
2878
2879         * driver.c, mini.c: Replaced security mode flags with a single
2880         enum variable.
2881
2882 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2883
2884         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
2885
2886 2007-07-25  Mark Probst  <mark.probst@gmail.com>
2887
2888         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
2889         (which doesn't do anything yet) for activating Core CLR
2890         (Silverlight) security.
2891
2892 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
2893
2894         * mini-codegen.c: work around a possible gcc bug on arm.
2895
2896 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2897
2898         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
2899         message for platforms that don't support AOT compilation.
2900
2901 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2902
2903         * mini.h, mini.c, driver.c: temporary smcs hack.
2904
2905 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
2906
2907         * mini-arm.h, mini-arm.c: arm EABI fixes.
2908
2909 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
2910
2911         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
2912         case.
2913
2914         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
2915         trampolines taking a method argument.
2916
2917         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
2918
2919         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
2920         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
2921
2922         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
2923         JIT compilation throws an exception. Fixes #82050.
2924
2925 2007-07-19  Mark Probst  <mark.probst@gmail.com>
2926
2927         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
2928         with the MONO_EXCEPTION_ defines.
2929
2930 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
2931
2932         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
2933         #82117.
2934         
2935         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
2936         the cause of an assertion.
2937
2938 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
2939
2940         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
2941         removed.
2942
2943 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
2944
2945         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
2946         assert. Should fix #82103.
2947
2948 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
2949
2950         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
2951         here too. Fixes #82095.
2952
2953         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
2954         addresses.
2955
2956         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
2957
2958         * mini-amd64.h: Enable IMT for amd64.
2959         
2960         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
2961
2962 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
2963
2964         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
2965
2966 2007-07-12  Mark Probst  <mark.probst@gmail.com>
2967
2968         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
2969         as soon as check_linkdemand sets an exception_type.
2970
2971 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2972
2973         * mini-x86.c: fixed offsets for IMT call sequence.
2974         * mini-x86.h: enable IMT again.
2975
2976 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
2977
2978         * trace.c (mono_trace_enter_method): Decode MonoType too.
2979
2980         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
2981
2982         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
2983
2984         * mini-amd64.c: Add preliminary IMT implementation.
2985         
2986 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
2987
2988         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
2989         understand the new IMT-base interface invocation (thanks to
2990         Daniel Nauck for the report and the remote debugging session).
2991
2992 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2993
2994         * mini-x86.c: size and speed optimizations for the IMT bsearch.
2995
2996 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
2997
2998         * Makefile.am (aotcheck): Make this actually use the AOTed code.
2999
3000 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
3001
3002         * mini-trampolines.c: implement AOT IMT support.
3003         * mini-x86.h: enable IMT support for wider testing.
3004
3005 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3006
3007         * inssel.brg (emit_imt_argument): Add aot support here.
3008
3009         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
3010
3011 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3012
3013         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
3014         of the IMT implementation, partially from massi, with my
3015         implementation of the bsearch sequence. Disabled by default until
3016         the AOT code is implemented.
3017
3018 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3019
3020         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
3021
3022         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
3023
3024 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3025
3026         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
3027         arch-independent IMT JIT code from Massimiliano
3028         Mantione (massi@ximian.com) with small cleanups from me.
3029
3030 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3031
3032         * Makefile.am: fix svn invocation to get the svn revision to be
3033         independent of the local language (build fix).
3034
3035 2007-07-09  Mark Probst  <mark.probst@gmail.com>
3036
3037         * mini.c (inline_method): Reset cfg->exception_type if the
3038         inlining is aborted.  Fixes: 82049.
3039
3040 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
3041
3042         * mini.c: remove assert from exception handling code when exception_ptr
3043         is not set.
3044
3045 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3046
3047         * mini.c (mono_codegen): Add an assert.
3048
3049         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
3050         enter and leave code.
3051         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
3052
3053 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3054
3055         * mini-ppc.c: fixed memory corruption for localloc(0)
3056         (bug #81852).
3057
3058 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3059         
3060         * mini.c: Fix warnings.
3061
3062 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
3063
3064         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
3065         to emit better double->int conversions.
3066
3067 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
3068
3069         * mini.c: the provided Min/Max optimizations are valid for unisgned
3070         ints.
3071
3072 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
3073
3074         * 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
3075
3076 2007-06-28  Miguel de Icaza  <miguel@novell.com>
3077
3078         * mini.c (mono_running_on_valgrind): Add support for reporting the
3079         method and  its boundaries to valgrind.
3080
3081 2007-06-28  Martin Baulig  <martin@ximian.com>
3082
3083         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3084
3085 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
3086
3087         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
3088
3089         * generic.2.cs: Add new test case.
3090
3091 2007-06-25  Martin Baulig  <martin@ximian.com>
3092
3093         Merged the `debugger-dublin' branch.
3094
3095         * debug-mini.c
3096         (mono_debugger_insert_method_breakpoint): New public method.
3097         (mono_debugger_remove_method_breakpoint): Likewise.
3098         (mono_debugger_check_breakpoints): New static method.
3099         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
3100
3101         * debug-debugger.h (MonoDebuggerInfo):
3102         Renamed (to keep backward compatibility in the vtable):
3103         `insert_breakpoint' -> `old_insert_breakpoint'.
3104         `remove_breakpoint' -> `old_remove_breakpoint'.
3105         `create_string' -> `old_create_string'.
3106         `lookup_class' -> `old_lookup_class'.
3107         `lookup_type' -> removed; changed into a dummy field.
3108         `lookup_assembly' -> `old_lookup_assembly'.
3109         Added (same functionality, but different signature):
3110         `create_string', `lookup_class', `lookup_assembly'
3111         Added new:
3112         `get_method_addr_or_bpt', `remove_method_breakpoint',
3113         `runtime_class_init'.
3114
3115         * debug-debugger.c: Merged the `debugger-dublin' branch.
3116
3117 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
3118
3119         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
3120         well.
3121         (peephole_pass): Likewise.
3122
3123 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
3124
3125         * driver.c: hopefully make setaffinity work also for ancient
3126         versions of linux.
3127
3128 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
3129
3130         * driver.c : win32 build fix.
3131
3132 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3133
3134         * driver.c: check for the MONO_NO_SMP env var and bind to a single
3135         processor if it is set.
3136
3137 2007-06-21  Martin Baulig  <martin@ximian.com>
3138
3139         * debug-mini.h: New file.
3140
3141         * debug-mini.c
3142         (mono_debugger_insert_breakpoint_full): Moved here from
3143         ../metadata/mono-debug-debugger.c.
3144         (mono_debugger_remove_breakpoint): Likewise.
3145         (mono_debugger_breakpoint_callback): Likewise.
3146
3147 2007-06-15  Raja R Harinath  <rharinath@novell.com>
3148
3149         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3150         changes in MonoGenericClass.
3151
3152 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
3153
3154         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
3155
3156 2007-06-14  Raja R Harinath  <rharinath@novell.com>
3157
3158         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3159         removal of MonoGenericMethod.
3160
3161 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3162
3163         * mini-exceptions.c: hooks for the exception events profiling API.
3164
3165 2007-06-14  Randolph Chung  <tausq@debian.org>
3166
3167         * Makefile.ma: Add hppa target.
3168         * mini-arch.h: Include mini-hppa.h
3169         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
3170         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
3171         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3172
3173 2007-06-14  Randolph Chung  <tausq@debian.org>
3174
3175         * inssel.brg: Add rules for "chained" compare-branch operations so that
3176         a single compare op can affect multiple branches.  Adjust cost for
3177         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
3178         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
3179         cost for some rules so that they can more easily be overridden by
3180         per-arch rules (with fixes from lupus).
3181         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3182
3183 2007-06-13  Randolph Chung  <tausq@debian.org>
3184
3185         * mini-ops.h: Reorder branch ops so that they match the order of the
3186         corresponding CEE_* ops.  The code expects them this way.
3187         Add new ops for HPPA target.
3188         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3189
3190 2007-06-13  Randolph Chung  <tausq@debian.org>
3191
3192         * mini-exceptions.c: Handle cases where the stack grows towards
3193         larger addresses.
3194         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3195
3196 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
3197
3198         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
3199         counter.
3200         * driver.c: explain where a non-matching corlib is found.
3201
3202 2007-06-13  Mark Probst  <mark.probst@gmail.com>
3203
3204         * mini.c (print_jit_stats): Output dynamic code allocation stats.
3205
3206 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
3207
3208         * mini-exceptions.c: Generate a method profile leave event during
3209         an exception to ensure that the profiler gets notified.
3210
3211 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
3212
3213         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
3214         branch.
3215
3216         * cpu-amd64.md: Add long_and/or/xor opcodes.
3217
3218 2007-06-06  Wade Berrier  <wberrier@novell.com>
3219
3220         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
3221         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
3222         length of instruction shr_imm (expected 8, got 10)
3223
3224 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
3225
3226         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
3227
3228 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3229
3230         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3231         MonoInternalHashTable again (fixed bug in the internal hash table
3232         code).
3233
3234 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3235
3236         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
3237         Have to figure out what makes it crash the SWF regression.
3238
3239 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
3240
3241         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
3242
3243 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3244
3245         * mini.c: optimize out the type check when storing null in a
3246         reference array.
3247
3248 2007-06-04  Mark Probst  <mark.probst@gmail.com>
3249
3250         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3251         MonoInternalHashTable.
3252
3253 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
3254
3255         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
3256         signed integer methods.
3257
3258 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3259
3260         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
3261         permanently since the current approach doesn't work.
3262
3263 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3264
3265         * inssel.brg (stmt): Only call delegate->invoke_impl if 
3266         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
3267
3268 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3269
3270         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
3271         the sreg2==rdx case.
3272         
3273         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
3274         account if it contains a rex prefix.
3275         (peephole_pass): Handle OP_FMOVE as well.
3276
3277 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3278
3279         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
3280         as it causes regressions.
3281
3282 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
3283
3284         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
3285         static case as well.
3286
3287         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
3288
3289         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3290         (mono_arch_get_this_arg_from_call): Ditto.
3291
3292         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
3293
3294         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
3295         invoke_impl field.
3296
3297         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3298         (mono_arch_get_this_arg_from_call): Ditto.
3299
3300         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
3301         
3302         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
3303         try to create optimized invoke code and use that for further invocations. 
3304         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
3305
3306         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
3307
3308 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
3309
3310         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
3311         sealed classes or methods.
3312         *devirtualization.cs: tests for the new optimization
3313
3314 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
3315
3316         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
3317         by the update_volatile () function.
3318
3319 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
3320
3321         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
3322         require it.
3323
3324         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
3325
3326 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
3327
3328         * mini.c: Add configure checks for header files.
3329         * mini-x86.c: Add configure checks for header files.
3330         * trace.c: Add configure checks for header files.
3331         * aot-runtime.c: Add configure checks for header files.
3332         * aot-compiler.c: Add configure checks for header files.
3333         * driver.c: Add configure checks for header files.
3334         * mini-codegen.c: Add configure checks for header files.
3335         
3336         Code is contributed under MIT/X11 license.
3337
3338 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
3339
3340         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
3341         icompare_imm -128 + op_iclt. Fixes #81703.
3342
3343 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
3344
3345         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
3346
3347 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
3348
3349         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
3350         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
3351         so that all isinst checks now use "interface_bitmap".
3352
3353 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
3354
3355         * cpu-amd64.md (jmp): Fix a warning.
3356
3357         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
3358
3359         * basic.cs: Add new regression test.
3360
3361         * basic.cs: Remove test which is now in basic-long.cs.
3362
3363         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
3364
3365         * basic-long.cs: Add new test.
3366         
3367 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
3368
3369         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
3370
3371 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
3372
3373         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
3374
3375         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
3376         places.
3377         
3378         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
3379         throwing code a bit.
3380
3381         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
3382         the exception throwing code a bit.
3383
3384         * mini-x86.c (get_call_info): Allocate result from a mempool.
3385
3386 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
3387
3388         * aot-compiler.c (find_typespec_for_class): Fix the assert.
3389
3390         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
3391
3392         * mini.h (MonoCompile): Add 'token_info_hash' field.
3393
3394         * mini.c: Save token->method associations during compilation so the AOT 
3395         compiler can use it.
3396         
3397         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
3398         which reference generic classes and methods.
3399
3400 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
3401
3402         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
3403
3404         * aot-compiler.c (compile_method): Fix a typo in a comment.
3405
3406         * aot-runtime.c (decode_cached_class_info): Skip generic types.
3407
3408         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
3409         everything generic.
3410
3411         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
3412
3413 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
3414
3415         * mini.h (MonoCompile): Add 'args' field.
3416
3417         * mini.c (mono_compile_create_vars): Store variables representing the arguments
3418         into cfg->args.
3419
3420         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
3421
3422 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
3423
3424         * mini.c (mono_compile_get_interface_var): Remove this unused function.
3425
3426         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
3427
3428         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
3429         opcodes for some opcodes.
3430
3431         * mini.h *.brg *.c: Use the new opcodes.
3432
3433 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
3434
3435         * mini.h: Bumped aot revision.
3436
3437         * inssel.brg: modified code generation of type checks for interfaces
3438         to use the new "MonoClass.interface_bitmap" instead of the old
3439         "MonoClass.interface_offsets".
3440
3441 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
3442
3443         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
3444
3445 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
3446
3447         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
3448         64 bit platforms.
3449
3450 2007-04-27  Neale Ferguson <neale@sinenomine.net>
3451
3452         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
3453
3454 2007-04-27  Wade Berrier  <wberrier@novell.com>
3455
3456         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
3457         mini.h) to fix build.
3458
3459 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
3460
3461         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
3462         
3463         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
3464         causes the corlib unit tests to fail.
3465
3466 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
3467
3468         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
3469
3470         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
3471
3472         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
3473         opcodes to the comparison relations.
3474
3475         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
3476         opcodes to their types.
3477         
3478         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
3479
3480         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
3481         it in cfg->arch.cinfo.
3482
3483         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
3484
3485         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
3486         cfg->cil_offset_to_bb.
3487
3488 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
3489
3490         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
3491         created becase of initlocals.
3492
3493 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
3494
3495         * mini-alpha.c cpu-alpha.md: More alpha port work from 
3496         Sergey Tikhonov <tsv@solvo.ru>.
3497
3498 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
3499
3500         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
3501
3502 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
3503
3504         * cpu-s390.md (break): Correct the length of break instruction.
3505
3506 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3507
3508         * mini.c: fix a couple of soft-float issues and comments.
3509
3510 2007-04-15  Miguel de Icaza  <miguel@novell.com>
3511
3512         * trace.c (is_filenamechar): - is also a filename char.
3513
3514 2007-04-15  Neale Ferguson <neale@sinenomine.net>
3515
3516         * mini-s390.c: Correct checking for enum type in return value processing.
3517
3518 2007-04-14  Raja R Harinath  <rharinath@novell.com>
3519
3520         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
3521         (version.h): Makefile is in the build directory.
3522
3523 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
3524
3525         * mini-amd64.h: fix for assertion failure on Solaris/amd64
3526
3527 2007-04-11  Martin Baulig  <martin@ximian.com>
3528
3529         * mini.c (can_access_member): Fix handling of generic classes;
3530         fixes #81259.
3531
3532 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
3533
3534         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
3535
3536 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
3537
3538         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
3539
3540 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3541
3542         * mini-codegen.c: make sure the right spill amount is
3543         used for fp or integer registers (fixes the float_sub_spill() on ppc).
3544
3545 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
3546
3547         * mini-ppc.c: fixes for the fp_branch_nan test.
3548
3549 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
3550
3551         * basic.cs: Comment out new test which still fails on ia64.
3552
3553 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3554
3555         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
3556
3557 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3558
3559         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
3560
3561 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
3562
3563         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
3564         on 64 bit machines. Fixes part of #80738.
3565
3566         * basic.cs: Add regression test.
3567
3568 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3569
3570         * inssel.brg basic.cs: Revert previous change to fix build.
3571
3572         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
3573         platforms.
3574         
3575         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
3576
3577         * basic.cs: Add new regression test.
3578
3579 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3580
3581         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
3582         many arguments.
3583
3584 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3585
3586         * cpu-s390x.md: Correct length of break instruction.
3587
3588 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3589
3590         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
3591         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
3592
3593 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
3594
3595         * *.c: Begin WIN64 port.
3596         * mini.c:  Use correct register in profiler.
3597         * mini-amd64.c: No inline assembly on Win64.
3598         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
3599         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
3600         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
3601         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
3602         mono_arch_ip_from_context for Win64.
3603         
3604         Contributed under MIT/X11 license.
3605
3606 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
3607
3608         * exceptions-amd64.c (seh_handler): Ditto.
3609
3610         * exceptions-x86.c (seh_handler): Fix a memory leak.
3611
3612 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
3613
3614         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
3615         mini-s390x.c: fixed peephole optimizations to deal
3616         correctly with 1 and 2 byte reload avoidance.
3617
3618 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
3619
3620         * cpu-s390.md, cpu-s390x.md: update localloc length.
3621
3622 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3623
3624         * cpu-g4.md: added missing descriptions.
3625
3626 2007-03-14  Miguel de Icaza  <miguel@novell.com>
3627
3628         *  Makefile.am: Add support so the tail tests are not executed on
3629         PowerPC as that is a known limitation of the PowerPC port.
3630
3631 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3632
3633         * runmdesc.bat:  Move to msvc directory.
3634         
3635 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3636
3637         * runmdesc.bat:  Run executable that was produced by the current
3638         target and sent via an argument.
3639         
3640 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
3641
3642         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
3643         #81102.
3644
3645         * generics.2.cs: Add regression test.
3646
3647 2007-03-09  Wade berrier  <wberrier@novell.com>
3648
3649         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
3650
3651 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
3652
3653         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
3654         AOT code depends on this.
3655
3656 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3657
3658         * mini.c: more precise tracking of types in the eval stack
3659         (part of fix for bug #81044).
3660
3661 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
3662
3663         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
3664
3665         * aot-compiler.c (encode_patch): Remove an obsolete comment.
3666
3667 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
3668
3669         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
3670
3671         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
3672
3673 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
3674
3675         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
3676         a pointer on 64 bit systems. Fixes #80190.
3677
3678         * iltests.il: Add new regression test.
3679
3680 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3681
3682         * mini.c: inline a constant for Environment.IsRunningOnWindows.
3683
3684 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
3685
3686         * trace.c: Remove an erroneous alignemnt check when tracing.
3687           Fixes --trace on OSX86.
3688
3689 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3690
3691         * mini-$(arch).h: initialize SP in context for all the archs.
3692
3693 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
3694
3695         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
3696         regressions in the thread tests.
3697
3698 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
3699
3700         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
3701         - fixed implementation of LOCALLOC opcode
3702         - implemented non-un compare for floats
3703         - code cleanup
3704         - implementation of FDIV and CKFINITE opcodes
3705         - fixes for latest mono updates
3706         - additional arch opcodes
3707
3708 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3709
3710         * Makefile.am: simplify and merge rules for cross-compilation.
3711
3712 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
3713
3714         * local-propagation.c: Actually *apply* the fix for bug 80591...
3715
3716 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3717
3718         * mini-exceptions.c: backuot part of the last change
3719         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
3720
3721 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
3722         * inssel.brg: Fix bug 59286.
3723
3724
3725 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
3726
3727         * mini-exceptions.c: patch from Zoltan to correctly check for
3728         stack boundaries (using the stack register, not the frame register),
3729         fixes bugs #80724, #79717.
3730
3731 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
3732
3733         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
3734         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
3735
3736         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
3737         presence of frame pointer elimination.
3738
3739 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
3740         
3741         * mini-x86.h: NetBSD UCONTEX_REG defines.
3742
3743 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
3744
3745         * inssel-amd64.brg: Fix amd64 build.
3746
3747 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
3748
3749         * mini.h: remove extern to workaround what looks likes gcc bug 26905
3750         on amd64.
3751
3752 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
3753
3754         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
3755         ends.
3756
3757         * mini-<ARCH>.c: Use mono_is_regsize_var ().
3758
3759 2007-01-30 Mark Mason <mason@broadcom.com>
3760
3761            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
3762            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
3763            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
3764            beginning support for CEE_JMP [not quite working yet]
3765            * tramp-mips.c: LMF handling now works
3766         
3767 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
3768
3769         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
3770
3771         * mini.h (NULLIFY_INS): New macro.
3772
3773 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3774
3775         * mini.c: statistical profiler fix for windows, patch
3776         from Tor Lillqvist (tml@novell.com).
3777
3778 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
3779         * local-propagation.c: Fix bug 80591.
3780
3781 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
3782
3783         * Makefile.am: put back the --export-dynamic option as with
3784         the previous gmodule flags (thanks to Robert Jordan).
3785
3786 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
3787
3788         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
3789
3790         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
3791         simplify and speed up the local register allocator. Also rename some fields
3792         like iassign->vassign.
3793         
3794         * regalloc.c: Remove some functions which are no longer used since their
3795         inlined version is in mini-codegen.c.
3796         
3797         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
3798
3799         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
3800
3801 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
3802
3803         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
3804         narrowing. Fixes #80622.
3805
3806         * iltests.il: Add new regresssion test. 
3807
3808 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3809
3810         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
3811         debug-debugger.c, debug-debugger.h: warning fixes.
3812         * driver.c: updated copyright year and made it fit in one line.
3813
3814 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
3815
3816         * aot-runtime.c: updated to use mono-dl instead of gmodule.
3817
3818 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
3819
3820         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
3821
3822         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
3823
3824         * iltests.il: Add new test for bug #80507.
3825
3826 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3827
3828         * mini-arm.h: use soft-float also on vfp for now.
3829
3830 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3831
3832         * mini.c: fix some more soft-float issues.
3833
3834 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
3835
3836         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
3837
3838 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
3839         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
3840         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
3841         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
3842
3843 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
3844
3845         * mini-arm.c: typo fix.
3846
3847 2007-01-23  Neale Ferguson <neale@sinenomine.net>
3848
3849         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
3850
3851 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
3852
3853         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
3854         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
3855
3856         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
3857
3858         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
3859
3860         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
3861         
3862         * inssel.brg: Fix a warning.
3863
3864         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
3865
3866         * abcremoval.c ssa.c ssapre.c: Update after this change.
3867         
3868         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
3869
3870         * dominators.c (df_set): Use mono_bitset_union_fast.    
3871
3872 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
3873
3874         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
3875         mini-codegen.c: reduce relocations and memory usage for the cpu
3876         description.
3877
3878 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
3879
3880         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
3881
3882         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
3883         to reduce their size.
3884
3885 2007-01-19 Mark Mason <mason@broadcom.com>
3886
3887         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
3888         * mini-mips.c: more configuration macros, support long conditional branches, additional
3889         asserts, fix epilog instrumentation.
3890         * mini-mips.h: use standard stack walk
3891         * cpu-mips.md: increase size of div, rem and conditional branches
3892         
3893 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
3894
3895         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
3896         to cpu spec data.
3897
3898 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
3899
3900         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
3901         (compile_method): Ditto.
3902
3903         * aot-runtime.c (decode_klass_info): Ditto.
3904
3905         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
3906         needed by the code generated by inssel.brg. Also fix a warning.
3907
3908 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
3909
3910         * mini.c: deal with enums that become genericinsts by
3911         being nested in a generic class (bug #79956).
3912
3913 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3914
3915         * mini.c: match the generic definition to check for
3916         private access with generic types (bug #78431).
3917
3918 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3919
3920         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
3921         to make life easier for people cross-compiling that insist on not
3922         using scratchbox.
3923
3924 2007-01-17 Mark Mason <mason@broadcom.com>
3925
3926         * inssel-long.brg: patch to deal with mips missing flags
3927         * inssel-long32-mips.brg: implement overflow checks
3928         * insset-mips.brg: implement overflow checks
3929         * mini-mips.h: implement conditional exception handling
3930         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
3931           Remove unused code, minor cleanups.
3932         * exceptions-mips.c: minor cleanups
3933         * mini-ops.h: add mips conditional exception ops
3934         * cpu-mips.md: add mips conditional exception ops
3935
3936         
3937 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
3938
3939         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
3940         to deal with mips missing of flags.
3941
3942 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
3943
3944         * exceptions-ppc.c: execute fault handlers.
3945
3946 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
3947
3948         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
3949
3950 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3951
3952         * mini.c: handle also floating point values in initialize_array.
3953
3954 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3955
3956         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
3957         array initialization and make it conditional on the intrins option.
3958
3959 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3960
3961         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
3962         relocations and put the patch info names close to the enum definition.
3963
3964 2007-01-15 Mark Mason <mason@broadcom.com>
3965
3966         * basic.cs, exceptions.cs: break up large tests to increase debugability.
3967
3968 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
3969
3970         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
3971
3972 2007-01-12  Raja R Harinath  <rharinath@novell.com>
3973
3974         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
3975
3976 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
3977
3978         * Makefile.am: distribute the mips sources.
3979
3980 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3981
3982         * mini-codegen.h: handle bug #80489 here, by excluding ecx
3983         directly.
3984
3985 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
3986
3987         * cpu-x86.md: back out for now as this triggers other regressions.
3988
3989 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3990
3991         * cpu-x86.md: force src1 and dest regpair for long shift instructions
3992         to eax:edx, so ecx can't get allocated to them (bug #80489).
3993
3994 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
3995
3996         * mini.c, mini-exceptions.c: enabled running fault handlers
3997         (bug #80469).
3998
3999 2007-01-03  Miguel de Icaza  <miguel@novell.com>
4000
4001         * driver.c: If nothing fail, do not use the string "failed",
4002         because it makes it very annoying to view test result logs on the
4003         web. 
4004
4005 2006-12-30  Miguel de Icaza  <miguel@novell.com>
4006
4007         * debug-debugger.c (mono_debugger_main): Rename "main" to
4008         "main_method" to prevent a warning.
4009
4010         Remove a warning for unused field.
4011
4012 2006-12-28  Martin Baulig  <martin@ximian.com>
4013
4014         * debug-debugger.c
4015         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
4016
4017 2006-12-22  Martin Baulig  <martin@ximian.com>
4018
4019         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
4020         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
4021         seperate `.mdb_debug_info' section, so we can access it from the
4022         debugger even if the binary is stripped.
4023
4024         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
4025         from the `.mdb_debug_info' here to prevent the linker from
4026         removing that section.
4027
4028         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
4029         mdb-debug-info64.s.
4030
4031 2006-12-19  Robert Jordan  <robertj@gmx.net>
4032
4033         * mini-x86: enable the code to return small structures in
4034         registers for FreeBSD as well. Fixes bug #80278.
4035         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
4036
4037 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4038
4039         * mini-x86.c: align the stack when calling the profiler
4040         function instrumenting the prolog (on OSX).
4041
4042 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4043
4044         * mini.c: emit a break opcode where Debugger.Break () is called.
4045
4046 2006-12-13  Miguel de Icaza  <miguel@novell.com>
4047
4048         * mini.c (mono_method_to_ir): Provide useful information on this
4049         assert, to prevent others from debugging like I did.
4050
4051 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4052
4053         * mini.c: enable code which was incorrectly commented
4054         (bug #80235).
4055
4056 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4057
4058         * mini-x86.c: enable on OSX, too, the code to return small
4059         structures in registers.
4060
4061 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4062
4063         * mini-x86.c: remove the use of the dynamic code manager here, too.
4064
4065 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4066
4067         * mini.h, debug-debugger.c, tramp-*.c: fixed 
4068         mono_debugger_create_notification_function() to use
4069         mono_global_codeman_reserve () instead of a dynamic code manager.
4070
4071 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4072
4073         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
4074         ves_array_element_address() jit icall and use a generated
4075         managed method instead (which is about 4 times faster for a rank 3
4076         array access).
4077
4078 2006-11-29  Mark Mason  <mason@broadcom.com>
4079
4080         * basic-calls.cs: additional tests for passing
4081         structures as function arguments.
4082
4083 2006-11-29  Mark Mason  <mason@broadcom.com>
4084
4085         * mini-mips.h: disable custom exception handling
4086         * mini-mips.c: throw/rethrow should use jalr to call
4087         exception stubs.  Fixed bug with passing structures
4088         by value. More support for tracing floating point
4089         functions.
4090
4091 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4092
4093         * mini.c: fixed typo in the soft-float ldind.r4 handling
4094         (bug #80086).
4095
4096 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4097
4098         * mini.c, mini.h, driver.c: added --runtime command line
4099         option to select a different runtime than the autodetected one.
4100         * jit.h: added API for embedders to initialize with a specific
4101         runtime version.
4102
4103 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
4104
4105         * mini.c: handle also boxing of r4 values (bug #80024).
4106
4107 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4108
4109         * mini-ppc.c: force indirect calls until we reserve
4110         enough address space for all the generated code.
4111
4112 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
4113
4114         * exceptions-arm.c: workaround bugs in the libc definition
4115         of struct ucontext.
4116
4117 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
4118
4119         * inssel.brg: fixes from me and Mark Mason.
4120
4121 2006-11-23  Dick Porter  <dick@ximian.com>
4122
4123         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
4124         semaphore display now we've fixed the initial value
4125
4126 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4127
4128         * inssel.brg: partially revert the last change to fix the build.
4129
4130 2006-11-21  Mark Mason  <mason@broadcom.com>
4131
4132         * inssel.brg: Add and use compare-and-branch macros to support
4133         architectures that do not have condition code registers (ie. MIPS).
4134         * *-mips.{c,brg,md}: Fix copyright statements
4135
4136 2006-11-20  Mark Mason  <mason@broadcom.com>
4137
4138         * Makefile.am: remove mini-codegen.c from list of MIPS sources
4139         * mini.c: Allow GET_CONTEXT to be specified by the arch port
4140         * mini.h: Added declaration for mono_print_ins()
4141         * mini-codegen.c: added ins_spec initializer for MIPS
4142         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
4143         vreg to be virtual and hreg to be non-virtual.
4144         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
4145         is not yet working/implemented correctly.
4146         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
4147         non-static, fixup calls to print_ins() from other parts in the file.
4148
4149 2006-11-20  Mark Mason  <mason@broadcom.com>
4150
4151         * basic-calls.cs: added tests for passing structures as arguments
4152         to calls.
4153
4154 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
4155
4156         * inssel-long32.brg: optimize signed division by power of two.
4157
4158 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4159
4160         * mini-arm.c: added support for interworking with thumb code
4161         (mono must be still be built using the ARM instruction encoding).
4162
4163 2006-11-19  Miguel de Icaza  <miguel@novell.com>
4164
4165         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
4166         verifier has different rules for it.   Fixes a few verifier issues
4167         in the test suite.
4168
4169         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
4170         at the end, so people know what happened.
4171
4172 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
4173
4174         * brach-opts.c: in optimize_exception_target() make sure we
4175         are in a catch clause (fixes bug #79871).
4176
4177 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4178
4179         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
4180         more soft-float support fixes.
4181
4182 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
4183
4184         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
4185         that are passed half on the stack and half in registers.
4186
4187 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
4188
4189         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
4190         more mips integration work from Mark E Mason 
4191         <mark.e.mason@broadcom.com>.
4192
4193 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4194
4195         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
4196         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
4197         tramp-mips.c: added sources for the mips port, not
4198         integrated in the build yet. Contributed by
4199         Mark E Mason <mark.e.mason@broadcom.com>.
4200
4201 2006-11-14  Neale Ferguson <neale@sinenomine.net>
4202
4203         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
4204
4205 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4206
4207         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
4208         put the soft-float rules in its own file since it seems to
4209         break s390 compilation.
4210
4211 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4212
4213         * mini-arm.c: fixed wrnings.
4214
4215 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
4216
4217         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
4218         inssel-arm.brg: ARM support for soft-float.
4219
4220 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4221
4222         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
4223         loads and stores of 32 bit fp values.
4224
4225 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
4226
4227         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
4228
4229         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
4230         works. Fixes #79852 and #79463.
4231
4232 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4233
4234         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
4235         more soft-float support WIP and fixes.
4236
4237 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
4238
4239         * mini-arm.c: some VFP updates.
4240
4241 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4242
4243         * mini-exceptions.c: 0 is a valid local var offset in some
4244         architectures, don't assert (bug #78508).
4245
4246 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
4247
4248         * exceptions-arm.c: fixed off by one error in stack walk code.
4249
4250 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
4251
4252         * mini.h, mini.c: more precise tracking of type load exceptions.
4253
4254 2006-11-03  Robert Jordan  <robertj@gmx.net>
4255
4256         * Makefile.am: [WIN32] Add monow.exe target.
4257         * driver.c: [WIN32] Don't detach the console when debugging.
4258         Fixes bug #79797.
4259         
4260 2006-10-30  Miguel de Icaza  <miguel@novell.com>
4261
4262         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
4263
4264 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
4265
4266         * aot-compiler.c (emit_method_info): Add a case missed earlier.
4267
4268         * driver.c (mini_regression): Fix --regression with AOT.
4269
4270         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
4271
4272 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
4273
4274         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
4275
4276         * mini-sparc.h: Don't use sigaction on sparc/linux.
4277
4278         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
4279
4280         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
4281
4282         * mini-exceptions.c: Add proper include files for getpid ().
4283
4284 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
4285
4286         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
4287         address instead of a MonoJitInfo* to avoid decoding the exception info for the
4288         method.
4289
4290         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
4291         name cache to reduce its size.
4292
4293         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
4294
4295 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
4296
4297         * mini-x86.c: Save/restore the current LMF structure more efficiently using
4298         the mono_lmf TLS variable.
4299
4300         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
4301         trampoline lmf frames.  
4302
4303         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
4304
4305 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
4306
4307         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
4308         the mono_lmf TLS variable.
4309
4310         * mini-exceptions.c: Access the LMF structure through accessors.
4311
4312         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
4313         variable instead of in jit_tls->lmf.
4314
4315         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
4316         
4317         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
4318         trampoline lmf frames.
4319
4320         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
4321
4322 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
4323
4324        * mini.c trace.c mini-x86.c: Revert these too.
4325         
4326        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
4327        signature change.
4328
4329 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
4330
4331         * genmdesc.c: removed now dead code.
4332
4333 2006-10-09  Robert Jordan <robertj@gmx.net>
4334
4335         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
4336
4337 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
4338
4339         * mini.h: do not leave gaps in the opcode values.
4340
4341 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
4342
4343         * jit-icalls.h: flag functions as internal here, too.
4344
4345 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
4346
4347         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
4348         functions with the internal attribute.
4349
4350 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
4351
4352         * aot-compiler.c: fclose the file descriptor in the profile read loop.
4353
4354 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
4355
4356         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
4357         for soft-float.
4358
4359 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
4360
4361         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
4362         tail calls as on other platforms.
4363
4364         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
4365
4366         * iltests.il: Add a few tailcall tests.
4367
4368 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4369
4370         * driver.c: fix loop for old compilers (bug #79521).
4371
4372 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
4373
4374         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
4375
4376         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
4377
4378         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
4379         metadata without any code.
4380
4381         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
4382         more precise debugging information using gdb.
4383
4384 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
4385
4386         * inssel-ia64.brg: Make the helper methods static.
4387
4388 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4389
4390         * inssel-x86.brg: make the helper methods static.
4391
4392 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
4393
4394         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
4395
4396 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4397
4398         * mini.c: updates for monoburg changes.
4399         * inssel.brg: make a few helper functions static as they should.
4400
4401 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
4402
4403         * Makefile.am: Move mini-codegen.c to common_sources.
4404
4405 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4406
4407         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
4408         instructions.
4409         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
4410         mini-ppc.h: port to use the common local register allocator.
4411
4412 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4413
4414         * mini.h: Remove the comment too then.
4415
4416 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
4417
4418         * mini.h: put back backend.data which is to be used shortly and
4419         doesn't increase the size of MonoInst. If any 64 bit arch aligned
4420         pointers on 4 byte boundaries it'd have much bigger issues running
4421         and you can ifdef it out anyway.
4422
4423 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4424
4425         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
4426         MonoInst size by 4 bytes on 64 bit machines.
4427
4428 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4429
4430         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
4431         replacement with more meaningful field names. Arch maintainers, please
4432         check the assigned names are good enough for your arch.
4433
4434 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4435
4436         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
4437         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
4438
4439 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
4440
4441         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
4442         relocations and memory requirements, put the optimization flags
4443         definitions in their own file.
4444
4445 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
4446
4447         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
4448
4449         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
4450
4451 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
4452
4453         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
4454
4455 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
4456
4457         * inssel.brg: use the correct function to get the size of an item
4458         in an array, given an element class.
4459         * aot-compiler.c: do not access class->class_size directly.
4460
4461 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4462
4463         * mini.h, debug-mini.c: added a debugging function to print
4464         info about local variables and arguments in a jitted method.
4465
4466 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
4467
4468         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4469
4470         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
4471
4472 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4473
4474         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
4475         inner and outer loops when passing vtypes.
4476
4477 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
4478
4479         * mini-ppc.c: take into account the cpu errata for cache flushing
4480         which caused some random errors (bug #79381).
4481
4482 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4483
4484         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
4485         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
4486
4487 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
4488
4489         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
4490         loaded.
4491
4492         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
4493         freebsd ports tree.
4494
4495         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
4496         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
4497
4498         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
4499         displacement.
4500
4501 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
4502
4503         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
4504
4505 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
4506
4507         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
4508         macro does not have to be changed during debugging.
4509
4510         * 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>.
4511
4512         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
4513
4514         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
4515         
4516         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
4517         MONO_ARCH_NO_EMULATE_MUL is defined.
4518
4519         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
4520
4521         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
4522
4523         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
4524
4525         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
4526         
4527 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
4528
4529         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
4530         stuff to mini-exceptions.c where it is used.
4531
4532         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
4533         setup code, the real one is in mini-exceptions.c.
4534
4535         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
4536         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
4537         some changes from the freebsd ports tree.
4538
4539         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
4540         constants.
4541         
4542         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
4543
4544 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
4545
4546         * mini.c: on Linux, check for /proc to be mounted
4547         (bug# 79351, novell bug#201204).
4548
4549 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
4550
4551         * mini.c: handle cases where pthread_attr_getstack() behaves
4552         incorrectly (bug #78096).
4553
4554 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
4555
4556         * mini-arm.c: support larger stack frames (bug #79272).
4557
4558 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
4559
4560         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
4561
4562         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
4563         tokens.
4564
4565         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
4566         mono_class_from_name () to find a class from its name.
4567
4568         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
4569
4570 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
4571
4572         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
4573
4574 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
4575
4576         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
4577
4578 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
4579
4580         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
4581         callinfo->trampoline.
4582
4583         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
4584         fixes #79271.
4585         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
4586         future.
4587
4588 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
4589
4590         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
4591
4592 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
4593
4594         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
4595         stats.method_trampolines, it is already done by the generic trampoline code.
4596
4597         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
4598         
4599 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
4600
4601         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
4602
4603         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
4604
4605         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
4606
4607         * mini.c (print_jit_stats): Print mscorlib mempool size too.
4608         
4609         * mini.c (print_jit_stats): Print new stats.
4610
4611         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4612
4613 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
4614
4615         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
4616         Address on two dimensional arrays. Fixes #78729.
4617
4618         * mini.h (MonoCompile): Add a 'skip_visibility' field.
4619
4620         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
4621         a method.
4622
4623         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
4624
4625         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
4626         #79130.
4627         
4628         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
4629         a race condition.
4630         (mini_get_ldelema_ins): Ditto.
4631
4632 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
4633
4634         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
4635         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
4636         Fixes #79213.
4637
4638 2006-08-29 Neale Ferguson <neale@sinenomine.net>
4639
4640         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
4641         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
4642
4643         * exceptions-s390x.c: Cosmetic change.
4644
4645         * tramp-s390.c: Fix warning.
4646
4647         * cpu-s390.md: Correct length of mul_imm.
4648
4649 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
4650
4651         * aot-compiler.c: added binary writer with ELF backend
4652         implementation (only on Linux/x86 for now).
4653
4654 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4655
4656         * Makefile.am: Don't run net 2.0 AOT tests.
4657
4658         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
4659         (mono_compile_assembly): Skip net 2.0 assemblies as well.
4660
4661         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
4662
4663 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
4664
4665         * aot-compiler.c: simplified and refactored the asm-writing code
4666         to allow different backends.
4667
4668 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4669
4670         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4671
4672         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
4673         little. Share patches of type TYPE_FROM_HANDLE as well.
4674
4675         * mini.c (mono_patch_info_equal): New helper function.
4676         (mono_patch_info_hash): Ditto.
4677
4678         * aot-compiler.c (emit_method_code): Fix s390 build.
4679
4680         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
4681         is not handled because it is stored as a flag and not as a type ctor. Fixes
4682         #79016.
4683
4684 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
4685
4686         * aot-compiler.c: Fix computation of GOT slot statistics.
4687         
4688         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
4689         Also remove support for not PIC AOT.
4690
4691         * mini.h: Bump AOT file format version.
4692
4693         * objects.cs: Add a test for #78990.
4694
4695         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
4696         (peter.dettman@iinet.net.au). Fixes #79087.
4697
4698         * basic-long.cs: Add a test for the above.
4699
4700 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
4701
4702         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
4703         
4704         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
4705         code somewhat.
4706
4707 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
4708
4709         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
4710         exceptions.
4711
4712 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
4713
4714         * mini.c: Don't verify COM proxy invoke calls
4715         
4716
4717 2006-08-10  Dick Porter  <dick@ximian.com>
4718
4719         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
4720         which process is holding semaphores locked.
4721
4722 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
4723
4724         * mini-ia64.c mini-amd64.c: Fix #79027.
4725
4726         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
4727
4728         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
4729
4730         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
4731         implicit arguments in a vararg call. Fixes #79027.
4732
4733 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
4734
4735         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
4736         (mono_get_array_new_va_signature): Ditto.
4737
4738 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
4739
4740         * aot-runtime.c: Call init_plt lazily.
4741
4742         * inssel-long.brg: Fix unsigned long->int conversion.
4743
4744         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
4745
4746         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
4747         that most data is now in the .rss/.data section.
4748
4749 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
4750
4751         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
4752
4753         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
4754
4755         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
4756
4757         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
4758
4759         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
4760         virtual call. Fixes #79010.
4761
4762         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
4763         and use the result as the this argument in the real call.
4764
4765         * generics.2.cs: Add a new test for #79010.
4766         
4767 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
4768
4769         * mini-x86.c: Fix a warning.
4770
4771         * aot-compiler.c: Add a bunch of statistics.
4772
4773         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
4774
4775 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
4776
4777         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
4778
4779 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
4780
4781         * 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>.
4782
4783 2006-07-13  Miguel de Icaza  <miguel@novell.com>
4784
4785         * mini.c (mono_method_to_ir): Obtain the original method in the
4786         CIL stream and use this to perform validation.
4787
4788         Fixed: #78816
4789
4790 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
4791
4792         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
4793         (mono_arch_call_opcode): Ditto.
4794
4795         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
4796         #78826.
4797
4798         * mini.c (mono_patch_info_dup_mp): New helper function.
4799         
4800         * aot-compiler.c (compile_method): Fix some of the memory allocated during
4801         compilation. Fixes #78827.
4802
4803 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
4804
4805         * declsec.c: Use original security informations for
4806           MONO_WRAPPER_MANAGED_TO_MANAGED.
4807
4808 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
4809
4810         * mini.c: Allow Com Interop methods/classes and
4811         don't verify COM wrapper calls
4812         
4813
4814 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
4815
4816         * inssel-long32.brg: Fix long->i4 checked conversion.
4817
4818         * exceptions.cs: Add a test for the above.
4819
4820 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
4821
4822         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
4823
4824         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
4825         leaks.
4826
4827         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
4828         #78775.
4829
4830 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
4831
4832         * mini.c: Fix solaris/x86 exception handling.
4833
4834         * Makefile.am: Get rid of $(ICU_LIBS).
4835
4836 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
4837
4838         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
4839         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
4840         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
4841
4842         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
4843
4844         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
4845         this function causes a SIGSEGV.
4846
4847 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
4848
4849         * mini.c: Remove unused solaris/x86 includes.
4850
4851 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
4852
4853         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
4854
4855 2006-06-20  Jb Evain  <jbevain@gmail.com>
4856
4857         * cpu-g4.md: fix max length of start_handler instruction.
4858
4859 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
4860         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
4861
4862 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
4863         * ssa.c: Fixed bug 78653 for SSA based deadce.
4864         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
4865         MonoInst.flags, used in SSA based deadce.
4866         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
4867         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
4868
4869 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
4870
4871         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
4872         it can end up using non executable memory on ppc64 systems
4873         running ppc32 userspace (fix from Johannes Berg).
4874
4875 2006-06-14  Dick Porter  <dick@ximian.com>
4876
4877         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
4878         4.1.1
4879
4880 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
4881         * mini.c: Made so that inline is locally disabled if it would
4882         trigger a .cctor, because too many apps depend on this behavior
4883         (which seems to be also the one of the MS CLR).
4884
4885 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
4886
4887         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
4888         No idea why this worked before.
4889
4890         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
4891         which branch to outer exception clauses since they could skip the
4892         inner finally clauses. Fixes #78633.
4893
4894         * exceptions.cs: Add a test for the above.
4895
4896         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
4897         Fixes #78629.
4898
4899         * iltests.il: Add a test for the above.
4900
4901 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
4902
4903         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
4904         after the end of a try bblock, to prevent asserts in mini_method_compile ().
4905
4906         * iltests.il: Add a test for the above.
4907
4908 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
4909
4910         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
4911         
4912         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
4913         methods as instrinsics.
4914
4915 2006-06-09  Wade Berrier <wberrier@novell.com>
4916
4917         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
4918         (simple-cee-ops.h ssapre-mini-ops.h)
4919
4920 2006-06-09  Neale Ferguson <neale@sinenomine.net>
4921
4922         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
4923         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
4924         instruction).
4925         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
4926         * cpu-s390x.md: Fix max. length values for a couple of instructions.
4927
4928 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
4929
4930         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
4931
4932 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
4933
4934         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
4935         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
4936         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
4937         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
4938         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
4939         of opcodes, so that bug 78549 should not happen again.
4940         * ssapre.c: Updated to use the renamed files.
4941
4942 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
4943
4944         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
4945         in OP_ATOMIC_EXCHANGE_I4.
4946
4947 2006-06-07  Wade Berrier <wberrier@novell.com>
4948
4949         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
4950         in mono_debugger_create_notification_function)
4951
4952 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
4953
4954         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
4955         
4956         * mini.c (type_from_stack_type): Disable some changes which do not
4957         seem to work.
4958
4959         * driver.c: Reenable opts.
4960
4961         * mini.h (MonoStackSlot): New structure to keep track of the verification state
4962         of the evaluation stack.
4963         
4964         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
4965         evaluation stack trace at entry to the bblock.
4966
4967         * mini.c (merge_stacks): New function to perform verification of stack merges.
4968         Turned off by default.
4969
4970         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
4971         STACK_MP.
4972         
4973 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
4974
4975         * local-propagation.c: Fixed bug 78549.
4976
4977 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
4978
4979         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
4980
4981 2006-06-02  Miguel de Icaza  <miguel@novell.com>
4982
4983         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
4984         tramp-arm.c, tramp-ia64.c
4985         (mono_debugger_create_notification_function): Update signature to
4986         new signature and use new protocol for creating the notification
4987         function.  
4988
4989         Should fix the build.
4990
4991 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
4992
4993         * exceptions-ppc.c (mono_jit_walk_stack)
4994         (ves_icall_get_frame_info): Fix the build
4995
4996 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
4997
4998         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
4999
5000 2006-05-31  Raja R Harinath  <rharinath@novell.com>
5001
5002         * il2tests.2.il: New file for generics CIL tests.  Add test for
5003         #78019.
5004         * Makefile.am: Update.
5005
5006         Fix #78019
5007         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
5008         to nullable types.
5009
5010 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
5011
5012         * aliasing.c: Fixed bug 78311.
5013
5014 2006-05-29  Martin Baulig  <martin@ximian.com>
5015
5016         * mini-exceptions.c (mono_find_jit_info): When computing the
5017         native offset, check whether we're actually inside the method's
5018         code; call mono_debug_print_stack_frame() to format the frame.
5019         (ves_icall_System_Exception_get_trace): Call
5020         mono_debug_print_stack_frame() to format the stack frame.
5021         (ves_icall_get_trace): Update to the new debugging API.
5022         (mono_jit_walk_stack_from_ctx): Likewise.
5023         (ves_icall_get_frame_info): Likewise.
5024
5025         * mini.c (get_method_from_ip): Use the new debugging API.
5026         (mono_print_method_from_ip): Likewise.
5027
5028         * exceptions-ppc.c
5029         (mono_jit_walk_stack): Use the new debugging API.
5030         (ves_icall_get_frame_info): Likewise.   
5031
5032 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
5033
5034         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
5035
5036 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
5037
5038         * mini.c: Added "limitator" to inline for debugging.
5039
5040 2006-05-24  Martin Baulig  <martin@ximian.com>
5041
5042         * debug-debugger.c (mono_debugger_init): Create a private,
5043         malloc()-based code manager for the notification function and
5044         intentionally leak it on exit.  This fixes the crash-on-exit race
5045         condition.
5046
5047         * tramp-amd64.c
5048         (mono_debugger_create_notification_function): Added
5049         `MonoCodeManager *' argument.
5050
5051         * tramp-x86.c
5052         (mono_debugger_create_notification_function): Added
5053         `MonoCodeManager *' argument.
5054
5055 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
5056
5057         * aliasing.c: Fixed 64 bit issue.
5058         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5059         default since all known bugs are fixed (one more time!).
5060
5061 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
5062
5063         * mini.c: write barrier support.
5064
5065 2006-05-23  Martin Baulig  <martin@ximian.com>
5066
5067         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
5068         check at the top of the file.
5069
5070 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
5071
5072         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
5073         reverting changes without reason and without changelog entries.
5074
5075 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
5076
5077         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
5078         to a few opcodes. Fixes #78439.
5079
5080         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
5081         consistency with other archs.
5082
5083         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
5084
5085 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5086
5087         * debug-debugger.c: fix the build.
5088
5089 2006-05-17  Martin Baulig  <martin@ximian.com>
5090
5091         * debug-debugger.c
5092         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
5093         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
5094         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
5095         (debugger_attach): Call GC_mono_debugger_add_all_threads().
5096
5097 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
5098
5099         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
5100
5101 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
5102
5103         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
5104         MONO_TYPE_GENERICINST.
5105         
5106         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
5107         MONO_TYPE_GENERICINST.
5108
5109 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
5110
5111         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
5112         #78325.
5113
5114 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
5115
5116         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
5117         mempool.
5118         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
5119
5120 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
5121
5122         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
5123         mono_trace_cleanup ().
5124
5125         * iltests.il: Fix problem with the newly added test.
5126
5127         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
5128         due to register constraints, free up the previous hreg. Fixes #78314.
5129
5130         * iltests.il: Add new test for #78314.  
5131
5132         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
5133         Interlocked.Add. Fixes #78312.
5134
5135         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
5136         
5137 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
5138
5139         * inssel.brg (mini_emit_virtual_call): Fix a warning.
5140
5141 2006-05-05  Martin Baulig  <martin@ximian.com>
5142
5143         * debug-mini.c (mono_debug_open_block): New method.
5144
5145         * mini-amd64.c
5146         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5147         the beginning of each basic block.
5148
5149         * mini-x86.c
5150         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5151         the beginning of each basic block.
5152
5153 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5154
5155         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5156         default until I understand why they break the build on amd64.
5157
5158 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
5159
5160         * mini.c (mini_cleanup): Call mono_cleanup ().
5161
5162         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
5163         errors.
5164
5165 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5166
5167         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
5168         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5169         default since all known bugs are fixed, and I cannot reproduce bug
5170         77944... I'm asking Matt Hargett to test again after this commit.
5171
5172 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
5173
5174         * mini-codegen.c: Fixed typo that thrashed inline.
5175
5176 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
5177
5178         * dominators.c (compute_dominators): Avoid using a worklist since
5179         it is not correct in some cases. Instead, iterate over all bblocks as
5180         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
5181
5182 2006-04-28  Miguel de Icaza  <miguel@novell.com>
5183
5184         * mini.c (mono_jit_compile_method_inner): Use
5185         mono_prepare_exception_from_error that resets the value
5186         internally.
5187
5188 2006-04-27  Miguel de Icaza  <miguel@novell.com>
5189
5190         * mini.c: Move the mini_loader_error_to_exception to metadata. 
5191         
5192 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5193
5194         * aliasing.c: Fixed bug 78210.
5195
5196 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5197
5198         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5199         default until all their problems (or the ones they trigger) are fixed.
5200
5201 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
5202
5203         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
5204         
5205         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
5206         as loaded only after resolving patches since that could invoke the same method.
5207
5208         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
5209
5210         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
5211         functions.
5212
5213         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
5214         AOT loader.
5215
5216         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
5217         stack.
5218
5219         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
5220         made from AOT code through the PLT table.
5221
5222         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
5223         holding the plt offset when a call is made to the aot plt trampoline.
5224         
5225 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5226
5227         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
5228         amd64 AOT support.
5229
5230         * Makefile.am (common_sources): Fix build breakage.
5231
5232         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
5233         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
5234         intra-assembly calls if possible.
5235         
5236         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
5237
5238         * mini-trampolines.c: Handle PLT entries.
5239
5240         * mini.c: Avoid creating a GOT var for calls.
5241
5242         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
5243         from mscorlib code.
5244
5245         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
5246         from mscorlib code.
5247
5248         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
5249         AOT code.       
5250
5251         * mini.h: Bump AOT file format version.
5252         
5253         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
5254         covers more cases.
5255
5256 2006-04-25  Martin Baulig  <martin@ximian.com>
5257
5258         * driver.c: Disable copyprop, consprop and inline when running
5259         inside the debugger.
5260
5261 2006-04-25  Martin Baulig  <martin@ximian.com>
5262
5263         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
5264         with `get_current_thread' and added `detach'.
5265         (MonoDebuggerMetadataInfo): Added `thread_size',
5266         `thread_tid_offset', `thread_stack_ptr_offset' and
5267         `thread_end_stack_offset'.
5268
5269 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5270
5271         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
5272         aot-runtime.c.
5273
5274         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
5275         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
5276
5277         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
5278
5279         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
5280
5281         * aot.c: Add support for ADJUSTED_IID.  
5282
5283 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
5284
5285         * aot.c (emit_method_order): Don't align method_order_end.
5286
5287         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
5288         the interface ID changes.
5289
5290 2006-04-21  Dick Porter  <dick@ximian.com>
5291
5292         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
5293         cleaning up a thread.  Fixes the new part of bug 77470.
5294
5295 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
5296
5297         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
5298         to managed wrapper.
5299                      
5300 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
5301
5302         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
5303         
5304         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
5305         SIGSEGV. Fixes #78072.
5306
5307         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
5308         unregister our SIGABRT handler.
5309
5310 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
5311
5312         * mini.c: Disabled inline where it can alter the call stack in a
5313         way visible from managed code.
5314         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
5315         default.
5316
5317 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
5318
5319         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
5320         on other platforms. Fixes #78089.
5321
5322 2006-04-13  Martin Baulig  <martin@ximian.com>
5323
5324         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
5325         determine whether we're inside the debugger.
5326
5327         * debug-debugger.h
5328         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
5329
5330 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
5331
5332         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
5333         handler clauses. Fixes #78024.
5334
5335         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
5336         in the CALL_MEMBASE opcodes. Fixes #78088.
5337         (mono_arch_get_vcall_slot_addr): Ditto.
5338
5339 2006-04-10  Martin Baulig  <martin@ximian.com>
5340
5341         * debug-debugger.c: The thread handling code has now been moved
5342         into ../metadata/threads.c.
5343
5344 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5345
5346         * driver.c (mono_main): Fix --with-gc=none build.
5347
5348         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
5349         (mono_spillvar_offset_float): Ditto.
5350         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
5351         hreg, not when its !global, since on ia64, there is a third category: stacked
5352         registers.      
5353
5354 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
5355
5356         * mini.c: set MonoInst->klass for load field address and a few other
5357         places.
5358
5359 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5360
5361         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
5362
5363 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
5364
5365         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
5366         the branch opt changes.
5367
5368 2006-04-06  Dick Porter  <dick@ximian.com>
5369
5370         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
5371         
5372         * wapihandles.c (mini_wapi_seminfo): 
5373         * driver.c (mono_main): Add semaphore info option
5374
5375 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
5376
5377         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
5378         branch optimization changes. Fixes #78009.
5379
5380 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5381
5382         * mini.c: ignore accessibility of methods in managed->native wrappers.
5383
5384 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
5385
5386         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
5387         
5388         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
5389
5390 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
5391
5392         * mini.c: Modify the branch optimizations to preserve the invariant that
5393         the entries inside the in_bb and out_bb arrays are unique.
5394         (mono_unlink_bblock): Avoid creation of new arrays.
5395
5396 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
5397
5398         * mini.c (mono_unlink_bblock): Fix regression caused by previous
5399         change (#77992).
5400
5401 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
5402
5403         * mini.c (optimize_branches): Remove the "optimizations" in
5404         the cbranch1/cbranch2 -> branch cases which were causing several
5405         problems in the past. Fixes #77986.
5406
5407 2006-03-31  Chris Toshok  <toshok@ximian.com>
5408
5409         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
5410         default optimizations :(
5411
5412 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
5413
5414         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
5415         branch.
5416
5417 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
5418
5419         * local-propagation.c: Added comments to structs and removed
5420         "Mono" prefixes from local tree mover types.
5421
5422 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
5423
5424         * Makefile.am (arch_sources): Define this for each architecture so 
5425         libmono_la_SOURCES is defined in one place.
5426
5427 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
5428
5429         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
5430         from handles/.
5431
5432 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
5433
5434         * driver.c: print the GC name supplied by configure.
5435
5436 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
5437
5438         * local-propagation.c: Added tree mover, and moved here all the
5439         local propagation code from mini.c
5440         * mini.c: Added support for treeprop, and moved all the local
5441         propagation code to local-propagation.c
5442         * mini.h: Added support for treeprop
5443         * driver.c: Added support for treeprop, enabled consprop, copyprop,
5444         treeprop, inline and deadce by default
5445         * Makefile.am: Added local-propagation.c
5446
5447 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
5448
5449         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
5450
5451 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
5452
5453         * debug-debugger.c: make it compile without the Boehm GC.
5454
5455 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
5456
5457         * mini.c: fixed issue with mismatch when an icall is registered
5458         with multiple names but same address.
5459
5460 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5461
5462         * declsec.c, mini-exceptions.c: use write barrier to set reference
5463         fields of managed objects.
5464
5465 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5466
5467         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
5468         (can_access_internals): Fix a warning.
5469
5470         * mini.c (print_method_from_ip): Rename this to 
5471         mono_print_method_from_ip so it gets exported.
5472
5473         * trace.c: Deal with strings inside StringBuilder's containing garbage
5474         and fix memory leaks. Fixes #77848.
5475
5476 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5477
5478         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
5479         fixes #77787.
5480
5481 2006-03-16 Neale Ferguson <neale@sinenomine.net>
5482         
5483         * mini-s390.c: Remove OP_X86_TEST_NULL.
5484
5485 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5486
5487         * mini.c: use the correct GetHashCode() for the moving collector.
5488
5489 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
5490
5491         * liveness.c: Regalloc spill cost tuning.
5492
5493 2006-03-15 Neale Ferguson <neale@sinenomine.net>
5494         
5495         * mini-s390x.h: Correct S390_LONG macro.
5496
5497         * mini-s390x.c: Cleanup unused code.
5498
5499 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
5500
5501         * jit-icalls.h: New file.
5502
5503         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
5504         icalls and include that instead of including jit-icalls.c.
5505
5506         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
5507         OP_X86 opcodes.
5508
5509 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
5510
5511         * mini.c: when checking for member accessibility, also check for
5512         friend assemblies and for explicit interface implementations.
5513
5514 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
5515
5516         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
5517
5518         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
5519
5520         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5521         common cases are done first.    
5522
5523         * mini-ops.h: Only define platform specific opcodes on the given platform.
5524
5525         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
5526         branch.
5527         
5528 2006-03-14  Martin Baulig  <martin@ximian.com>
5529
5530         Revert Paolo's change from r57348:
5531
5532         * mini.h: don't use gboolean for bitfields.
5533         * mini.c: verifier changes for fields and methods accessibility.
5534
5535 2006-03-13  Neale Ferguson <neale@sinenomine.net>
5536
5537         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
5538
5539         * mini-s390x.c: Fix conv_r_un.
5540
5541         * cpu-s390, cpu-s390x.md: Fix lengths.
5542
5543 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
5544
5545         * mini.c: nested types have access to all the nesting
5546         levels, not just the enclosing types.
5547
5548 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5549
5550         * mini.c: added a few more verification checks.
5551
5552 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
5553
5554         * liveness.c: Merge optimizations from the linear-il branch.
5555
5556 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5557
5558         * mini-ia64.c (emit_call): Add a comment.
5559
5560         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
5561
5562         * tramp-ia64.c: Fix some warnings.
5563
5564 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
5565
5566         * mini.h: don't use gboolean for bitfields.
5567         * mini.c: verifier changes for fields and methods accessibility.
5568
5569 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5570
5571         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
5572         lazy icall wrapper changes.
5573
5574         * dominators.c: Replace all the dominator algorithms with faster
5575         ones from the linear-il branch.
5576
5577         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
5578         the mempool.
5579
5580         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5581         common cases are done first.
5582
5583         * mini-amd64.c: Fix some warnings.
5584
5585         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
5586         from the mempool.
5587
5588         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
5589         added code.
5590
5591         * mini.h: Add a missing prototype.
5592
5593 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
5594
5595         * mini.c: Compile icall wrappers lazily.
5596
5597         * mini-codegen.c: Use printf instead of g_print since its much faster.
5598
5599         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
5600         function.
5601
5602         * mini.c (optimize_branches): Cache the negative result from 
5603         remove_block_if_useless ().
5604
5605         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
5606         Also fix some bblock linking issues.
5607
5608         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
5609         assembly files.
5610
5611         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
5612
5613         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
5614         accessed fields first, for better cache behavior.
5615         
5616 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
5617
5618         * mini.c: speedup IList<T> array accesses.
5619
5620 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
5621
5622         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
5623         inline_costs counter. Fixes #77190.
5624
5625 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
5626
5627         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
5628         trace messages. Fixes #77706.
5629
5630 2006-03-04  Martin Baulig  <martin@ximian.com>
5631
5632         * tramp-amd64.c, tramp-x86.c
5633         (mono_debugger_create_notification_function): Use
5634         mono_global_codeman_reserve() to allocate a buffer at runtime and
5635         return it.
5636
5637         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
5638
5639         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
5640         notification function at runtime and then call `initialize' in the
5641         `MONO_DEBUGGER__debugger_info' vtable.
5642
5643 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
5644
5645         * iltests.il: Fix a visibility problem.
5646
5647 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5648
5649         * driver.c, mini.c: add hooks for the counters API.
5650
5651 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5652
5653         * driver.c: show disabled options.
5654
5655 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
5656
5657         * linear-scan.c: always use cost-driven selection.
5658
5659 2006-02-28  Raja R Harinath  <rharinath@novell.com>
5660
5661         * jit-icalls.c (helper_compile_generic_method): Revert change from
5662         2006-02-24.
5663
5664 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
5665
5666         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
5667
5668 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
5669
5670         * inssel.brg: style fixes, mostly to force the updated monoburg
5671         to run for people using svn.
5672
5673 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
5674
5675         * mini.c: match monoburg changes.
5676
5677 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5678
5679         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
5680         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
5681         declaration in the header file.
5682
5683 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
5684
5685         * helpers.c: reduce relocations and mem usage.
5686
5687 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
5688
5689         * mini.h, mini-codegen.c: disable logging features if
5690         requested by configure.
5691
5692 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
5693
5694         * mini.c: tiny verifier changes.
5695
5696 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5697
5698         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
5699         cpu-pentium.md: stack alignment changes for osx/x86,
5700         partially from Geoff Norton <gnorton@customerdna.com>.
5701
5702 2006-02-24  Raja R Harinath  <harinath@gmail.com>
5703
5704         * jit-icalls.c (helper_compile_generic_method): Update to changes
5705         in metadata/class.c.
5706
5707 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
5708         
5709         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
5710         
5711         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
5712         interface calls with large offsets.
5713
5714 2006-02-23  Raja R Harinath  <rharinath@novell.com>
5715
5716         * jit-icalls.c (helper_compile_generic_method): Document the
5717         special-case we depend on so that we can inflate the method twice
5718         with the same context with no bad side-effects.
5719
5720 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
5721
5722         * mini-x86.c, mini-amd64.c: fix for case when xen support
5723         is disabled.
5724
5725 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
5726
5727         * mini-x86.c, mini-amd64.c: generate code to access tls items
5728         in a faster way for Xen systems.
5729
5730 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5731
5732         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
5733         updates and compilation fixes for the OSX/x86 port, mostly from
5734         Geoff Norton <gnorton@customerdna.com>.
5735
5736 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
5737
5738         * inssel.brg: faster interface call implementation
5739         to sync with the interface_offsets MonoVTable changes.
5740
5741 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5742
5743         * mini.c: more verification checks.
5744
5745 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
5746
5747         * mini.c: added a few more verification checks.
5748
5749 2006-02-17      Neale Ferguson <neale@sinenomine.net>
5750
5751         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
5752         facility on the processor and use it if available.
5753
5754 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5755
5756         * driver.c, aot.c, mini.c: throw exception if the IL code is
5757         invalid or unverifiable.
5758
5759 2006-02-17  Raja R Harinath  <rharinath@novell.com>
5760
5761         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
5762         m.StructField.
5763
5764 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
5765
5766         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
5767
5768 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5769
5770         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
5771         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
5772         handling of instantiated generic valuetypes.
5773
5774 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
5775
5776         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
5777         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
5778         instead.
5779
5780         * generics.2.cs: Revert the nullable reftypes tests.
5781
5782 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
5783
5784         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
5785         using __builtin_frame_address (1) as it doesn't work in the presence
5786         of optimizations. Hopefully fixes #77273.
5787
5788         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
5789         -> generics.cs change as it doesn't work with some automake versions.
5790
5791 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5792
5793         * mini.c: handle systems that sue a different way to
5794         retrieve the stack address of the current thread.
5795
5796 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
5797
5798         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
5799         it specially in the makefile.
5800
5801         * generics.2.cs: Add tests for nullable reference types.
5802
5803 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5804
5805         * mini.c: always handle the case when mono_jit_init()
5806         is called in a thread different from the main thread,
5807         confusing libgc (bug #77309).
5808
5809 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
5810
5811         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
5812
5813 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5814
5815         * mini.c: change optimize_branches () to use a single loop
5816         and introduce a new optimization to simplify some range checks.
5817
5818 2006-02-03  Martin Baulig  <martin@ximian.com>
5819
5820         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
5821         and merged with debugger_thread_manager_add_thread().
5822         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
5823         inform the debugger about the main thread.
5824
5825 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
5826
5827         * basic.cs: Add test for div.un/rem.un constant folding.
5828
5829 2006-02-03  Neale Ferguson <neale@sinenomine.net>
5830
5831         * cpu-s390x.md: correct int_xor_imm length
5832
5833 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
5834
5835         * generics.2.cs: New test for #77442.
5836
5837         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
5838         #77442.
5839
5840 2006-02-02  Martin Baulig  <martin@ximian.com>
5841
5842         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
5843         <mono/metadata/mono-debug-debugger.h>   
5844
5845         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
5846
5847 2006-02-02  Martin Baulig  <martin@ximian.com>
5848
5849         * debug-debugger.h: New header file for debug-debugger.c.
5850
5851         * debug-debugger.c: Big API cleanup; don't run the managed Main()
5852         function is a separate thread anymore; add support for attaching.
5853
5854 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
5855
5856         * tramp-x86.c: Fix a warning.
5857
5858 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
5859
5860         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
5861         on very large methods.
5862
5863         * aot.c (load_patch_info): Fix a warning.
5864
5865 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
5866
5867         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
5868         mini-ops.h: alu membase optimizations.
5869
5870 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
5871
5872         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
5873         to speedup StringBuilder.
5874
5875 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
5876
5877         * dominators.c (mono_compute_natural_loops): Fix detection of
5878         loop body start blocks.
5879
5880         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
5881
5882 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
5883
5884         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
5885         #75145.
5886
5887 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
5888
5889         * aliasing.c: Fixed aliasing issue on 64 bit archs.
5890
5891 2006-01-25  Martin Baulig  <martin@ximian.com>
5892
5893         * debug-debugger.c: Moved the `MonoDebuggerManager' and
5894         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
5895         started to cleanup this file a little bit.
5896
5897 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
5898
5899         * mini.c: optimize a codepath frequently happening in generics code.
5900
5901 2006-01-23  Martin Baulig  <martin@ximian.com>
5902
5903         * Makefile.am: Only compile debug-debugger.c on supported platforms.
5904
5905         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
5906         functions directly.
5907
5908         * driver.c: debug-debugger.c is only available if
5909         `MONO_DEBUGGER_SUPPORTED' is defined.   
5910
5911 2006-01-23  Martin Baulig  <martin@ximian.com>
5912
5913         * debug-debugger.c: Only enable this on platforms where the Mono
5914         Debugger is working (x86 and x86_64).
5915
5916 2006-01-21  Martin Baulig  <martin@ximian.com>
5917
5918         The Mono Debugger is now using the normal `mono' instead of the
5919         `mono-debugger-mini-wrapper' when executing managed code.
5920
5921         * debug-debugger.c: New file; previously known as
5922         debugger/wrapper/wrapper.c.
5923
5924         * debug-mini.c (mono_init_debugger): Removed.
5925
5926         * driver.c (mono_main): Added new `--inside-mdb' command line
5927         argument which is used when running inside the debugger.
5928
5929 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
5930
5931         * liveness.c (mono_analyze_liveness): Remove some unused data
5932         structures.
5933
5934 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
5935
5936         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
5937
5938 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
5939
5940         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
5941         depends on implementation details of monobitset.
5942
5943         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
5944         Fixes #77271.
5945
5946 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
5947
5948         * liveness.c: Update after monobitset changes.
5949
5950 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
5951
5952         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
5953
5954 2006-01-11 Neale Ferguson <neale@sinenomine.net>
5955
5956         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
5957
5958         * mini-s390x.c: Remove warning messages.
5959
5960 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
5961
5962         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
5963
5964 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
5965
5966         * generics.2.cs: Add ldelem/stelem_any test.
5967
5968 2006-01-10 Neale Ferguson <neale@sinenomine.net>
5969
5970         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
5971
5972 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
5973
5974         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
5975         
5976 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
5977
5978         * generics.2.cs: Reenable vtype tests.
5979
5980         * inssel-x86.brg: Remove an icorrect valuetype rule.
5981
5982 2006-01-06 Neale Ferguson <neale@sinenomine.net>
5983
5984         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
5985         initial support for OP_ABS.
5986
5987 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5988
5989         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
5990
5991 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5992
5993         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
5994         conversion and implement LADD/LSUB.
5995
5996         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
5997         architectures.
5998
5999 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6000
6001         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
6002
6003         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
6004         architectures.
6005
6006 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6007
6008         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
6009         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
6010         (stack walk problem).
6011
6012 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
6013
6014         * aot.c (mono_aot_load_method): Fix a warning.
6015
6016 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6017
6018         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
6019
6020 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6021
6022         * iltests.il: Add test for #77148.
6023
6024         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
6025         #77148.
6026
6027 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6028
6029         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
6030
6031 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6032
6033         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
6034         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
6035
6036         * basic-long.cs: Add lconv-to-r4/r8 tests.
6037
6038 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6039
6040         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
6041
6042         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
6043         here as on other archs.
6044
6045 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6046
6047         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
6048
6049 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6050
6051         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
6052         
6053         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
6054
6055         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
6056         instrument_prolog; Add memory_barrier instruction.
6057
6058 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
6059
6060         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
6061
6062 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
6063
6064         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
6065
6066         * aliasing.c inssel.brg: Fix warnings.
6067
6068         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
6069         could skip initialization of some parts of memory.
6070
6071         * mini.c mini-ia64.c: Fix warnings.
6072
6073         * inssel-sparc.brg: Add an implementation of lneg which actually works.
6074
6075 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
6076
6077         * aliasing.c (mono_build_aliasing_information): Add a workaround for
6078         a crash seen on sparc.
6079
6080         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
6081         
6082         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
6083
6084 2005-12-21 Neale Ferguson <neale@sinenomine.net>
6085
6086         * mini-ops.h: Add s390_backchain instruction
6087
6088         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
6089
6090         * cpu-s390.md: Add s390_backchain instruction
6091
6092         * mini-s390.c: Significant ABI changes
6093
6094         * mini-s390.h: Cater for zero length structures
6095
6096 2005-12-20 Neale Ferguson <neale@sinenomine.net>
6097
6098         * mini-s390.c: ABI fixes
6099
6100         * inssel-s390.brg: Remove debug statements
6101
6102         * cpu-s390.md: Fix length of ATOMIC_xx operations
6103
6104 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
6105
6106         * basic-float.cs: Add float<->long conversion tests.
6107
6108 2005-12-16 Neale Ferguson <neale@sinenomine.net>
6109
6110         * mini-s390.c: Fix LOCALLOC processing.
6111
6112         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
6113
6114 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
6115
6116         * iltests.il: Add tests for some opcodes not covered by the other
6117         tests.
6118
6119 2005-12-15 Neale Ferguson <neale@sinenomine.net>
6120
6121         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
6122         register loading for Tail processing; Correct trace output.
6123
6124         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
6125
6126         * cpu-s390.md: Correct size of jmp instruction. 
6127
6128 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6129
6130         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
6131
6132 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6133
6134         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
6135           Bring s390 up to current level.
6136
6137 2005-12-12  Zltan Varga  <vargaz@gmail.com>
6138
6139         * generics.2.cs: Disable the newly added tests as they do not work yet.
6140         
6141         * generics.2.cs: Add valuetype tests.
6142
6143 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
6144
6145         * basic-long.cs: Add i4->u8 test.
6146
6147         * objects.cs: Add tests for JIT intrinsic.
6148
6149         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
6150         optimizations lost by a mistake.
6151
6152 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
6153
6154         * basic-long.cs: Remove a test moved to objects.cs.
6155
6156         * arrays.cs: Add more array tests.
6157
6158 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
6159
6160         * arrays.cs: Add new tests for multi-dimensional arrays.
6161
6162 2005-12-06  Raja R Harinath  <rharinath@novell.com>
6163
6164         * Makefile.am (test_sources2): Add generics.2.cs.
6165         (EXTRA_DIST): Add test_sources2.
6166
6167 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
6168
6169         Support for boxing and unboxing nullable types as well as the
6170         isinst operation on nullables, per the CLI ammendment.
6171
6172         * inssel.brg (CEE_ISINST): Special case for nullable
6173
6174         * mini.c (handle_unbox_nullable): new method
6175         (handle_box): Special case for nullable types
6176         (mono_method_to_ir): Call handle_unbox_nullable in correct
6177         places.
6178
6179         * generics.2.cs: New test suite
6180
6181         * Makefile.am: Support for regression tests with generics.
6182
6183 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
6184
6185         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
6186         allocated to registers. Fixes #76800.
6187
6188 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
6189
6190         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
6191
6192 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
6193
6194         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
6195         of platforms.
6196
6197 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
6198
6199         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
6200         objects.cs.
6201
6202         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
6203         
6204         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
6205 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
6206
6207         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
6208         single precision before storing to a single precision location.
6209
6210 2005-11-28  Raja R Harinath  <rharinath@novell.com>
6211
6212         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
6213
6214 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
6215
6216         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
6217         correct files.
6218
6219         * basic.cs: Remove test_0_byte_compares test which was moved to
6220         objects.cs a long time ago.
6221
6222 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
6223
6224         * aliasing.c: Fixed aliasing issue on 64 bit archs.
6225
6226 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
6227
6228         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
6229         handlers are called.
6230
6231         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
6232         throwing code.
6233
6234          * mini-ia64.c: Add support for the throw->branch exception 
6235         optimization.   
6236
6237         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
6238
6239 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6240
6241         * mini.c: Enabled "fastpath" deadce :-)
6242         
6243 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6244
6245         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
6246         alias analysis pass to support it.
6247         * mini.h: Likewise.
6248         * ssa.c: Likewise.
6249         * liveness.c: Likewise (liveness computation can use aliasing
6250         information to be more accurate).
6251         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
6252         moreover made so that "--compile-all" uses the given optimization
6253         flags and not the default ones.
6254         * aliasing.c: Alias analysis (new file).
6255         * aliasing.h: Likewise.
6256         * Makefile.am: added "aliasing.c" and "aliasing.h".
6257         
6258 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
6259
6260         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
6261         OP_L opcodes.
6262
6263 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
6264
6265         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
6266         fp >= end_of_stack exit condition, as it is not needed, and it might
6267         become true for fp eliminated frames.
6268
6269 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
6270
6271         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
6272         coded offsets.
6273
6274 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
6275
6276         * mini-arm.c: fixed alignment of doubles/longs to match
6277         the C ABI (bug #76635).
6278
6279 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
6280
6281         * aot.c: fix compilation with --enable-minimal=aot.
6282
6283 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
6284
6285         * mini-arm.c: fixed compatibility with the new
6286         floating point emulator package for compares.
6287
6288 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
6289
6290         * mini.c : reverted sig->pinvoke changes (r51396-51397).
6291
6292 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
6293
6294         * mini-exceptions.c (print_stack_frame): Output to stderr.
6295         (mono_handle_native_sigsegv): Ditto.
6296
6297 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6298
6299         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
6300         OP_LCONV_TO_OVF_I implementation.
6301
6302         * mini-amd64.c: Add support for the throw->branch exception 
6303         optimization.
6304
6305         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
6306         when the catch clause catches a more general exception, i.e. Object.
6307
6308 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
6309
6310         * cpu-ia64.md: Remove unused opcodes.
6311
6312         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
6313         specific defines for architectures defining USE_SIGACTION.
6314
6315         * mini-ia64.c: Fix some warnings.
6316
6317         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
6318         version seemed to skip a frame.
6319
6320 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6321
6322         * mini.c: Clean up the usage of sig->pinvoke flag. Now
6323         only calls which are made to native code use this flag.
6324
6325 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
6326
6327         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
6328         varargs methods as well.
6329         
6330         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
6331         which have save_lmf set. Reorganize methods prologs a bit.
6332
6333         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
6334         debugger to the proper place.
6335
6336 2005-10-29  Martin Baulig  <martin@ximian.com>
6337
6338         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
6339         when running inside the debugger until the debugger has support
6340         for it.
6341
6342 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
6343
6344         * mini.h: Fix a warning.
6345
6346 2005-10-24  Miguel de Icaza  <miguel@novell.com>
6347
6348         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
6349         we expose publicly, this returns the string.
6350
6351 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
6352
6353         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
6354         with fp elimination.
6355
6356 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
6357
6358         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
6359         native stacktrace using the glibc 'backtrace' function if available.
6360
6361 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
6362
6363         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
6364
6365         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
6366         handle SIGSEGVs received while in native code.
6367
6368         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
6369         code, call mono_handle_native_sigsegv which will abort the runtime
6370         after printing some diagnostics, instead of converting it into a
6371         confusing NullReferenceException.
6372
6373 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
6374
6375         * cpu-pentium.md: Remove unused opcodes.
6376
6377 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
6378
6379         * mini-amd64.h (MonoLMF): Add rsp field.
6380
6381         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
6382         the lmf too.
6383
6384 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
6385
6386         * mini-codegen.c (get_register_spilling): Fix some warnings.
6387
6388 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
6389
6390         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
6391         elimination during exception handling. Enable fp elimination by
6392         default.
6393
6394         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
6395         elimination.
6396
6397 2005-10-16  Martin Baulig  <martin@ximian.com>
6398
6399         * mini-exceptions.c
6400         (mono_debugger_run_finally): New public method for the debugger.
6401
6402 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
6403
6404         * debug-mini.c (mono_debug_init_method): Fix warning.
6405
6406         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
6407         the 'exname' parameter const to fix some warnings.
6408
6409 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
6410
6411         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
6412         introduced by the previous patch.
6413
6414 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
6415
6416         * basic-float.cs: Add test for precision of float arithmetic.
6417
6418         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
6419         when loading/storing single values from/to memory.
6420
6421         * mini.c (mono_jit_compile_method_with_opt): Create the function
6422         pointers in the correct domain.
6423
6424 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
6425
6426         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
6427         introduced by previous patch.
6428         
6429         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
6430         when out_filter_idx is NULL.
6431
6432         * mini-exceptions.c: Don't run filter clauses twice during exception
6433         handling. Fixes #75755.
6434
6435 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
6436
6437         * aot.c: Add support for ldflda wrappers.
6438
6439         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
6440         #75902.
6441
6442 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
6443
6444         * mini.c, mini.h: do not consider exception handlers blocks when
6445         setting up interface variables.
6446
6447 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
6448
6449         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
6450
6451 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
6452
6453         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
6454         causes a regression.
6455
6456         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
6457
6458 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
6459
6460         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
6461         of the OP_P definitions.
6462
6463         * TODO: Add a proposal for dealing with the CEE/OP mess.
6464
6465         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
6466         optimizations from the x86 port.
6467
6468         * cpu-amd64.md: Ditto.
6469
6470         * basic.cs basic-long.cs: Add tests.
6471
6472 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
6473
6474         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
6475         Patrik Torstensson's implementation of my exception-handling
6476         optimization idea, when the exception object is not used
6477         (bug #62150).
6478
6479 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
6480
6481         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
6482         of the mul_imm optimizations from the old jit.
6483
6484 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
6485
6486         * mini.c, liveness.c: patch by Patrik Torstensson and
6487         Zoltan Varga to improve performance in methods with
6488         exception clauses.
6489
6490 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
6491
6492         * driver.c: Remove 'Globalization' entry from --version.
6493
6494 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
6495
6496         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
6497         there is a profiler interested in JIT events.
6498
6499         * aot.c: Load profile files produced by the AOT profiling module, and
6500         reorder methods based on the profiling info. Add a 'method_order' table
6501         to the AOT file to make mono_aot_find_jit_info work with the reordered
6502         methods.
6503
6504         * mini.h: Bump AOT file version info.
6505
6506 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
6507
6508         * mini-arm.h: work around what looks like a gcc bug when optimizations
6509         are enabled.
6510
6511 2005-09-28  Raja R Harinath  <rharinath@novell.com>
6512
6513         * Makefile.am (AM_CFLAGS): Don't use += to append inside
6514         conditionals.  Use ...
6515         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
6516
6517 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
6518
6519         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
6520         to determine the amount of memory to copy when passing valuetypes.
6521
6522         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
6523         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
6524
6525 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
6526
6527         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
6528         information about aot.
6529
6530 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
6531
6532         * *.c: Replace the use of {Enter,Leave}CriticalSection with
6533         macros. This will allow a deadlock debugger to easily be plugged
6534         in.
6535
6536 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
6537
6538         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
6539
6540 2005-09-27  Raja R Harinath  <rharinath@novell.com>
6541
6542         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
6543         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
6544         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
6545         ($(arch_built)) [CROSS_COMPILING]: Error out.
6546
6547 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
6548
6549         * aot.c: Add support for the no_special_static flag for classes.
6550
6551 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6552
6553         * Reapply reverted patches.
6554
6555         * *: Revert r50174 as well.
6556
6557         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
6558
6559 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6560
6561         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
6562
6563 2005-09-23  Miguel de Icaza  <miguel@novell.com>
6564
6565         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
6566         part of the SIG_HANDLER_SIGNATURE.  
6567
6568 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
6569
6570         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
6571         statistics.
6572
6573         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
6574         introduced by previous patch.
6575
6576 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
6577
6578         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
6579         saved registers too.
6580
6581         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
6582         upon the information returned by get_call_info ().
6583         
6584         * mini-x86.c (add_float): Fix stack size calculation.
6585         (mono_arch_call_opcode): Rewrite this so it works based up the
6586         information returned by get_call_info ().
6587         (mono_arch_get_this_vret_args): Ditto.
6588
6589 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
6590
6591         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
6592         in cinfo to determine the registers which need to be used.
6593
6594 2005-09-20  Miguel de Icaza  <miguel@novell.com>
6595
6596         * driver.c (mono_main): Add --server and --desktop flags. 
6597
6598 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
6599
6600         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
6601         registers as global registers.
6602
6603         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
6604         longer needed with the new register allocator.
6605
6606         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
6607
6608         * cpu-ia64.md: Remove unused opcodes.
6609         
6610         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
6611         
6612 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
6613
6614         * cpu-amd64.md: Remove unused opcodes.
6615
6616         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
6617         needed with the new register allocator.
6618
6619         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
6620         reg-reg moves.
6621
6622 2005-09-16  Raja R Harinath  <rharinath@novell.com>
6623
6624         * Makefile.am (check-local): Don't invoke semdel-wrapper.
6625
6626 2005-09-16  Martin Baulig  <martin@ximian.com>
6627
6628         * exceptions-amd64.c
6629         (throw_exception): Don't call mono_debugger_throw_exception() if
6630         we're a rethrow - see the FIXME in the code.
6631
6632 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
6633
6634         * mini.c (mono_init_exceptions): This only works on some architectures.
6635         
6636 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6637
6638         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
6639         on ia64.
6640
6641         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
6642
6643         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
6644         now in mini-exceptions.c.
6645
6646 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
6647
6648         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
6649         now in mini-exceptions.c.
6650
6651 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6652
6653         * exceptions-x86.c: Applied patch from Patrik Torstensson 
6654         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
6655
6656         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
6657         code into mini-exceptions.c. Add some assertions to it.
6658
6659 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
6660
6661         * aot.c (emit_section_change): Applied patch from "The Software Team" 
6662         (<software@solmersa.com>). Fix as errors on windows.
6663
6664 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6665
6666         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
6667         method info into the LMF.
6668
6669 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6670         
6671         * mini-ia64.c: Add proper unwind info for method epilogs.
6672
6673         * exceptions-ia64.c: Add some code to help debugging.
6674         
6675         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
6676
6677         * mini-exceptions.c: Fix warning.
6678
6679 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6680
6681         * mini.c: Really fix build.
6682
6683         * mini-x86.c mini-amd64.c: Fix build.
6684
6685 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6686
6687         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
6688
6689         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
6690         some Interlocked methods as intrinsics.
6691
6692         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
6693         for Thread methods as well.
6694
6695         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
6696
6697         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
6698
6699         * mini-ia64.c mini-x86.c mini-amd64.c 
6700         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
6701         OP_MEMORY_BARRIER.
6702         
6703         * mini.c (mono_init_exceptions): Fix build breakage.
6704
6705 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
6706
6707         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
6708         of instructions. Use the new ia64_unw_op macros for emitting unwind
6709         info.
6710
6711         * mini.c (mono_init_exceptions): Initialize exception handling
6712         related trampolines at startup.
6713
6714 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
6715
6716         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
6717
6718 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
6719
6720         * mini.c: Handle type loading errors gracefully during compilation and
6721         throw the appropriate exception.
6722
6723 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
6724
6725         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
6726         for the mono binary.
6727
6728 2005-09-09  Martin Baulig  <martin@ximian.com>
6729
6730         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
6731         the release.
6732
6733 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6734
6735         * mini-arm.h: use emulation for conv.r.un for the release.
6736
6737 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6738
6739         * mini-arm.c, objects.cs: more fixes and tests for them.
6740
6741 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6742
6743         * mini-arm.c: align structures to at least 4 bytes to be able
6744         to keep our current optimized memcpy.
6745
6746 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
6747
6748         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
6749
6750 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6751
6752         * mini.c: ignore SIGPIPE.
6753
6754 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
6755
6756         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
6757
6758         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
6759
6760 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
6761
6762         * mini.h: Add prototype for mono_allocate_stack_slots_full.
6763
6764 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6765
6766         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
6767         exception handling support.
6768         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
6769         patch by Brian Koropoff <briank@marakicorp.com>).
6770
6771 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
6772
6773         * mini.c: revert another 'optimization' which breaks when
6774         items on the eval stack need to be saved at a basic block end
6775         (bug #75940).
6776
6777 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
6778
6779         * jit-icalls.c: for arrays, ensure we always provide
6780         lower bounds.
6781
6782 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
6783
6784         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
6785         
6786         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
6787
6788 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
6789
6790         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
6791         arguments in their original register.
6792
6793 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
6794
6795         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
6796         memset/memcpy.
6797
6798         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
6799         when ssapre is enabled.
6800
6801         * inssel-long.brg: Fix bug in previous patch.
6802
6803         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
6804         multiplication by a constant.
6805
6806 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
6807
6808         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
6809         icc.
6810
6811         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
6812         saving registers.
6813
6814 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
6815
6816         * inssel-arm.brg: apply changes tested by Brian Koropoff
6817         <briank@marakicorp.com>.
6818
6819 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
6820
6821         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
6822         
6823 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
6824
6825         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
6826         to the same register if dreg is just a base register.
6827         (print_ins): Improve printing of membase opcodes.
6828
6829         * inssel-x86.brg: Add optimized ldind(reg) rules.
6830
6831         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
6832
6833 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
6834
6835         * mini.c: when running under valgrind, set the stack bottom for
6836         the GC at the actual approximate stack for the app (fixes running
6837         mono with valgrind).
6838
6839 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
6840
6841         * mini.c: do no break at the first valuetype to init found
6842         (fixes bug #75791).
6843
6844 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
6845
6846         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
6847
6848 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
6849
6850         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
6851
6852 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
6853
6854         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
6855
6856 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6857
6858         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
6859
6860         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
6861         code.
6862
6863         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
6864         code.
6865
6866         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
6867         methods.
6868
6869 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
6870
6871         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
6872
6873 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6874
6875         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
6876         in the tail recursion optimization.
6877
6878         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
6879         debug info into the assembly file.
6880
6881         * iltests.il: Add test for filter regions.
6882
6883         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
6884         initial stack of filter regions. Fixes #75755.
6885
6886 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
6887
6888         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
6889         stack requirements.
6890
6891 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6892
6893         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
6894         the check for an already compiled method on non-ia64 platforms.
6895         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
6896         proper domain.
6897
6898         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
6899
6900         * inssel-x86.brg: Add some optimized call rules.
6901
6902 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
6903
6904         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
6905         method here.
6906
6907         * mini.h mini-trampolines.c: Pass the trampoline argument to 
6908         mono_arch_patch_delegate_trampoline.
6909
6910         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
6911
6912         * mini-trampolines.c: Fix build.
6913
6914         * mini-amd64.h: Add delegate trampolines.
6915
6916         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
6917
6918         * inssel-amd64.brg: Add optimized call rules.
6919         
6920         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
6921
6922         * inssel-ia64.brg: Add optimized ldind(reg) rules.
6923
6924 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
6925
6926         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
6927         change.
6928
6929         * mini-ia64.c: Remove LMF fixmes.
6930
6931         * mini-ia64.h: Remove most fields from LMF.
6932
6933         * inssel-ia64.brg (stmt): Fix unaligned access errors.
6934
6935         * mini-trampolines.c: Add support for IA64 function descriptors.
6936
6937         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
6938         for IA64 function descriptors.
6939
6940 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
6941
6942         * tramp-arm.c: patch the vtable for virtual calls. Added
6943         support code to register/unregister the LMF.
6944         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
6945         more LMF work.
6946
6947 2005-08-19  Dick Porter  <dick@ximian.com>
6948
6949         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
6950         bit value if needed.
6951
6952 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
6953
6954         * mini.c (mini_get_method): Move handling of wrapper data here.
6955
6956         * mini.c (mono_method_to_ir): Add support for dynamic methods.
6957
6958         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
6959         virtual.
6960
6961         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
6962         bblock->code does not remain empty.
6963
6964 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
6965
6966         * arrays.cs: Add regression test for #75832.
6967
6968         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
6969         rules. Fixes #75832.
6970
6971         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
6972         instruction scheduling.
6973
6974 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
6975
6976         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
6977
6978 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
6979
6980         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
6981
6982         * mini-codegen.c: Fix VC build.
6983
6984         * cpu-pentium.md: Increase length of atomic_exhange_i4.
6985
6986 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6987
6988         * mini.h: fix signature for mono_register_opcode_emulation.
6989
6990 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
6991
6992         * mini.c: Get rid of most of the helper_sig_... constants using
6993         mono_create_icall_signature ().
6994
6995 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
6996
6997         * jit-icalls.c (helper_ldstr): New helper function.
6998
6999         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
7000
7001         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
7002         throw, load the string using a helper call instead of creating a string object.
7003
7004         * aot.c: Update after LDSTR changes.
7005
7006         * mini.h: Bump AOT file version.
7007         
7008         * aot.c: Save class size info into the AOT file. Print more statistics during
7009         compilation.
7010
7011         * mini.h: Bump AOT file version.
7012
7013         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
7014         ordering of disasm cases. Fixes #74957.
7015
7016 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
7017
7018         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
7019         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
7020         the generic code needed for the ARM port.
7021
7022 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
7023
7024         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
7025         inssel-arm.brg: more ARM features and fixes.
7026
7027 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
7028
7029         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
7030         ARM port work in progress.
7031
7032 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
7033
7034         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
7035
7036         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
7037
7038         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
7039
7040         * inssel.brg (mini_emit_memset): Add support for unaligned access.
7041
7042         * *-ia64.*: Ongoing IA64 work.
7043         
7044         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
7045
7046 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
7047
7048         * TODO: Remove out-of-data todo stuff.
7049
7050         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
7051         dead code.
7052
7053         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
7054
7055         * mini.h: Bump corlib version.
7056
7057 2005-07-27  Martin Baulig  <martin@ximian.com>
7058
7059         * mini-codegen.c
7060         (create_copy_ins): Added `const unsigned char *ip' argument; set
7061         `copy->cil_code' from it.
7062
7063 2005-07-27  Martin Baulig  <martin@ximian.com>
7064
7065         * mini-exceptions.c (mono_handle_exception): Don't call
7066         mono_debugger_handle_exception() for filters.
7067
7068 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
7069
7070         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
7071         as well.
7072
7073 2005-07-26  Martin Baulig  <martin@ximian.com>
7074
7075         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
7076
7077         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
7078         helper_compile_generic_method() if the method is actually virtual
7079         and non-final.
7080
7081 2005-07-26  Martin Baulig  <martin@ximian.com>
7082
7083         * mini.c
7084         (trampoline_code): Renamed to `mono_trampoline_code' and made it
7085         public; this is now accessed directly by the debugger.
7086         (mono_generic_trampoline_code): Removed.
7087
7088         * debug-mini.c
7089         (mono_debug_init_method): Also add interncalls and wrappers.
7090
7091 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
7092
7093         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
7094
7095 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
7096
7097         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
7098
7099 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
7100
7101         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
7102
7103 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7104
7105         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
7106         getting TLS offsets on AMD64 too.
7107
7108 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
7109
7110         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
7111
7112 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
7113
7114         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
7115         inssel-arm.brg, mini-arm.h: ARM port work in progress.
7116
7117 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7118
7119         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
7120
7121         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
7122         to mini.c.
7123
7124         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
7125         mono_sparc_is_virtual_call ().
7126         
7127         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
7128
7129         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
7130         trampoline parameters.
7131
7132         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
7133         
7134         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
7135         to mono_arch_get_vcall_slot_addr.
7136
7137         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
7138         trampoline code.
7139
7140         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
7141
7142 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7143
7144         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
7145
7146 2005-07-19  Martin Baulig  <martin@ximian.com>
7147
7148         * exceptions-amd64.c (throw_exception): Call
7149         mono_debugger_throw_exception() here like we're doing it on i386.
7150
7151 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7152
7153         * mini-ia64.c: Add optimized TLS access support.
7154
7155 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
7156
7157         * mini-exceptions.c: Ongoing IA64 work.
7158
7159         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
7160
7161         * mini.c: Use the default optimization set when embedding. Fixes
7162         #75194.
7163
7164 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
7165
7166         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
7167         of trampolines to a separate file.
7168
7169         * mini-trampolines.c: New file.
7170
7171         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
7172         separate file.
7173         
7174         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
7175         amd64/ia64 code.
7176
7177         * mini-codegen.c: Fix cygwin build.
7178
7179 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
7180
7181         * mini.c: Add some minor changes needed by the IA64 port.
7182
7183         * *-ia64.*: Ongoing IA64 work.
7184
7185 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
7186
7187         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
7188         trampolines into arch-independent and arch-dependent parts.
7189
7190         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
7191
7192 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
7193
7194         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
7195
7196         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
7197         the xp-regalloc-branch for amd64.
7198
7199         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
7200         xp-regalloc-branch for x86.
7201
7202 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
7203
7204         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
7205
7206 2005-07-06  Martin Baulig  <martin@ximian.com>
7207
7208         * mini.c
7209         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
7210         (mono_jit_runtime_invoke): Likewise.
7211
7212 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
7213
7214         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
7215         on x86 too.
7216         
7217         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
7218         without loading their metadata. Reorganize the file format so exception handling+
7219         debug info is kept separate from normal method info. Create MonoJitInfo 
7220         structures for methods lazily.
7221
7222         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
7223         loading metadata.
7224         (x86_class_init_trampoline): Patch AOT class init trampolines too.
7225
7226         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
7227
7228         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
7229         in AOT code.
7230
7231         * mini.h: Bump AOT file version.
7232
7233 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
7234
7235         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7236
7237 2005-07-01  Raja R Harinath  <rharinath@novell.com>
7238
7239         * Makefile.am (check-local): Call semdel-wrapper.
7240
7241 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
7242
7243         * mini-x86.c: Revert the last change as it seems to break the build..
7244
7245 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
7246
7247         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7248         
7249         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
7250
7251 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
7252
7253         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
7254         outside of the macro, so strange stuff doesn't happen with gcc4
7255         (NEW_AOTCONST_TOKEN): Likewise.
7256
7257 2005-06-28  Martin Baulig  <martin@ximian.com>
7258
7259         * mini.c (mini_class_is_system_array): New static method; use this
7260         instead of `klass->parent == mono_defaults.array_class' everywhere
7261         since this also works for the new generic array class.
7262
7263 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
7264
7265         * inssel.brg: Remove warnings.
7266
7267 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
7268
7269         * mini-ia64.c: Ongoing IA64 work.
7270
7271         * basic-float.cs: Add float->i1 conversion test.
7272
7273         * iltests.il: Add conv.u4 test.
7274
7275 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
7276
7277         * inssel-long.brg: Fix bug caused by last change.
7278
7279 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
7280
7281         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
7282         BSDs.  Allows the x86 JIT to work on OSX86
7283
7284 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
7285
7286         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
7287         u4->i8 conversion.
7288
7289         * mini-ia64.c: Ongoing IA64 work.
7290
7291 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
7292
7293         * mini-ia64.c: Ongoing IA64 work.
7294
7295         * driver.c: Clean up jit_code_hash as well when using --regression.
7296
7297         * inssel-long.brg: Fix long->i4/u4 conversion rules.
7298
7299         * basic-long.cs: Add tests for long->u4 conversion.
7300
7301 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
7302
7303         * mini.c: Take mono_get_domainvar out of macros. This makes sure
7304         that we do not depend on undefined C behavior: the order stuff
7305         gets evaluated within an expression. Fixes mono when compiled on
7306         GCC 4.
7307
7308 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
7309
7310         * *-ia64.*: Ongoing IA64 work.
7311
7312         * aot.c: Lower memory usage while loading AOT methods.
7313
7314         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
7315
7316         * mini.h: Bump AOT file format version.
7317
7318 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
7319
7320         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
7321
7322 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
7323
7324         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
7325         not on callee assembly). Fixed some comments.
7326
7327 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
7328
7329         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
7330         it gets proper disassembly.
7331         (emit_method_info): Remove some dead code.
7332
7333         * mini.c (mini_method_compile): Allways allocate the GOT var in
7334         mono_method_to_ir for emulating opcodes.
7335
7336 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
7337
7338         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
7339         before freeing the code memory. Fixes #74990.
7340
7341         * objects.cs: Add regression test for #74992.
7342
7343         * liveness.c: Extend live ranges of arguments to the beginning of the
7344         method. Fixes #74992.
7345
7346         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
7347         so it points into the faulting instruction.
7348
7349 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
7350
7351         * jit-icalls.c (mono_imul_ovf): Add exception handling.
7352
7353         * *-ia64.*: Ongoing IA64 work.
7354
7355         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
7356
7357 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
7358
7359         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
7360
7361         * *-ia64.*: Ongoing IA64 work.
7362
7363 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
7364
7365         * basic-long.cs: Add tests for add/sub.ovf.
7366
7367         * basic.cs: Add tests for sub.ovf.
7368
7369         * *-ia64.*: Ongoing IA64 work.
7370
7371 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
7372
7373         * *-ia64.*: Ongoing IA64 work.
7374
7375         * basic.cs: Add conv.ovf.i4.un test.
7376
7377 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
7378
7379         * mini.c: (remove_block_if_useless) Fixed bug 75061.
7380         
7381 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7382
7383         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
7384
7385 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
7386
7387         * *-ia64.*: Ongoing IA64 work.
7388
7389 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7390
7391         * trace.[ch]:
7392         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
7393
7394 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
7395
7396         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
7397
7398 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
7399
7400         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
7401
7402         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
7403         of a call is callable by a near call.
7404
7405 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
7406
7407         * mini-ia64.c: Ongoing IA64 work.
7408
7409 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
7410
7411         * genmdesc.c: Make the generated array non-static.
7412
7413         * inssel-long.brg: Fix LSHR_IMM rule.
7414
7415         * *-ia64.*: Ongoing IA64 work.
7416
7417         * *-ia64.*: Ongoing IA64 work.
7418
7419 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7420
7421         * *-ia64.*: Ongoing IA64 work.
7422
7423         * *-ia64.*: Ongoing IA64 work.
7424         
7425         * mini-ia64.c: Ongoing IA64 work.
7426
7427         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
7428
7429 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7430
7431         * objects.cs basic-calls.cs: Move some tests to objects.cs.
7432         
7433         * objects.cs basic-long.cs: Move some tests to objects.cs.
7434
7435 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
7436
7437         * *-ia64.*: Ongoing IA64 work.
7438
7439         * iltests.il: Add a new test.
7440
7441         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
7442         newobj. Fixes #75042.
7443
7444 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
7445
7446         * *-ia64.*: Ongoing IA64 work.
7447         
7448         * *-ia64.*: Ongoing IA64 work.
7449         
7450         * *-ia64.*: Ongoing IA64 work.
7451
7452         * basic.cs objects.cs: Move tests accessing static variables as well.
7453
7454         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
7455
7456 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
7457
7458         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
7459
7460         * driver.c: Always print failed tests.
7461
7462         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
7463         frame pointer.
7464
7465         * *ia64*: Ongoing IA64 work.
7466
7467 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
7468
7469         * basic.cs: Add tests for add.ovf. Fix warnings.
7470
7471 2005-05-18  Miguel de Icaza  <miguel@novell.com>
7472
7473         * driver.c (mono_main): Avoid crash if no argument is passed to
7474         --break;  Do not use g_error, but f_printf.   And fix all other
7475         ocurrences of the same crash.
7476
7477 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
7478
7479         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
7480         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
7481         Fixes #74742.
7482
7483 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
7484
7485         * *-ia64.*: Add beginnings of IA64 backend.
7486
7487         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
7488
7489 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
7490
7491         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
7492         Fixes #74925.
7493
7494         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
7495
7496         * mini-amd64.c: Fix a warning.
7497
7498 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
7499
7500         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
7501         in float_neg. Fixes #74897.
7502
7503         * mini-amd64.c (emit_call): Fix another near call bug.
7504
7505 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
7506
7507         * declsec.c: Keep the appdomain information in the structure. Added a 
7508         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
7509         value gets overwritten).
7510         * declsec.h: Set the default MonoArray for the the stack to 6. Added
7511         an MonoAppDomain member to MonoSecurityFrame.
7512         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
7513         used in the stack walk. Now use a MonoArray which grow (double) when
7514         it gets full.
7515
7516 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
7517
7518         * mini.c: Re-enabled runtime cleanup, since running threads should
7519         now properly stop when exiting.
7520
7521 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
7522
7523         * mini-codegen.c: New file contaning the arch-independent local
7524         register allocator. Not used by any architectures yet.
7525
7526         * mini.h linear-scan.c: Merge some changes from the 
7527         mini-xp-local-regalloc branch.
7528
7529 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
7530
7531         * mini-amd64.c (emit_call): Fix calls to native functions when the
7532         runtime is compiled as a shared library. Fixes #74756.
7533
7534         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
7535         on a literal field. Fixes #74751.
7536
7537 2005-04-25  Raja R Harinath  <rharinath@novell.com>
7538
7539         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
7540
7541 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
7542
7543         * objects.cs: Add missing null casting test.
7544
7545 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
7546
7547         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
7548         in wrapper methods. Also rename 'address' variable to 'offset'.
7549
7550 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
7551
7552         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
7553         warnings.
7554         
7555         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
7556
7557         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
7558         work on windows.
7559
7560 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
7561
7562         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
7563
7564 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7565
7566         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
7567         just the last bytes.
7568
7569 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7570
7571         * aot.c (mono_compile_assembly): Fix warning.
7572
7573         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
7574         by the _MSC_VER stuff.
7575
7576 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
7577
7578         * inssel-long.brg: Fix #74588.
7579
7580         * cpu-amd64.md: Fix #74591.
7581
7582         * iltests.il: Add new regression tests.
7583
7584 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
7585
7586         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
7587         valuetype.
7588
7589 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
7590
7591         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
7592
7593         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
7594         from Bill Middleton <flashdict@gmail.com>.
7595
7596 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
7597
7598         * arrays.cs: Add new regression test. Fix warnings.
7599
7600 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
7601
7602         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
7603         and leakage in CKFINITE.
7604
7605         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
7606         this to a null op since it is called on amd64 too.
7607
7608         * exceptions-amd64.c (get_throw_trampoline): Align stack.
7609
7610         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
7611         body since this is not used on amd64.
7612         
7613         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
7614
7615         * mini-amd64.c: Remove obsolete fixmes.
7616
7617         * mini.c (print_method_from_ip): Fix debugging support.
7618
7619 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
7620
7621         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
7622         so that expressions that don't give much gain are not reduced.
7623         * ssapre.h: Likewise.
7624
7625 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
7626
7627         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
7628
7629         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
7630
7631         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
7632
7633 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
7634
7635         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
7636
7637         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
7638
7639 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
7640
7641         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
7642         stack touching.
7643
7644         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
7645
7646         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
7647
7648         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
7649
7650         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
7651         MONO_ARCH_USE_SIGACTION. Fixes #74252.
7652
7653         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
7654
7655         * mini-x86.c: Fix up stack overflow handling.   
7656
7657         * exceptions.cs: Add new regression test.
7658
7659 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
7660
7661         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
7662         mono_jit_thread_attach.
7663
7664         * mini.c (mono_method_to_ir): Verify called method is not abstract.
7665
7666 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7667
7668         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
7669         avoid calling constructors using callvirt.
7670
7671         * inssel.brg: Fix #74073.
7672
7673 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
7674
7675         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
7676         compilation with non-GCC compilers.
7677         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
7678         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
7679
7680 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
7681
7682         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
7683         klass->interface_offsets (will likely fix bug#74073).
7684
7685 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7686
7687         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
7688
7689 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
7690
7691         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
7692         to amd64_div_reg_size ().
7693         
7694         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
7695
7696 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
7697
7698         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
7699
7700 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7701
7702         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
7703
7704 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7705
7706         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
7707         
7708         * mini.c (mono_precompile_assembly): Load and precompile referenced
7709         assemblies as well. Fixes #74015.
7710
7711 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
7712
7713         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
7714
7715 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
7716
7717         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
7718         a lot of checks and (anyway) permissions cannot work until corlib is 
7719         loaded.
7720
7721 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
7722
7723         * mini-ppc.c: fixed ABI issue on sysv/ppc.
7724
7725 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
7726
7727         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
7728         calls (fixes bug#72824).
7729
7730 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
7731
7732         * mini.c: fix tail recursion elimination (see test in bug#73936).
7733
7734 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
7735
7736         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
7737         some fp functions in sse2 mode.
7738
7739 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
7740
7741         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
7742
7743 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
7744
7745         * mini.h mini.c: Add mono_get_jit_tls_key ().
7746
7747         * mini-x86.c: Enable fast TLS support on windows.
7748
7749 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
7750
7751         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
7752         * mini.c: Check for p/invoke method when generating code. If a
7753         p/invoke method, or it's class, isn't decorated with [Suppress
7754         UnmanagedCodeSecurity] then generate code to call System.Security.
7755         UnmanagedDemand (only if the security manager is active).
7756
7757 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7758
7759         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
7760         last change as it seems to cause strange crashes.
7761         
7762 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
7763
7764         * *.c: handle unsafe function pointers where needed.
7765
7766 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7767
7768         * mini.c (mono_jit_free_method): Remove the fixme too.
7769
7770 2005-03-15  Miguel de Icaza  <miguel@novell.com>
7771
7772         * mini.c: As discussed, make the code actually free the delegate
7773         thunk now, to enable the debugging of delegate problems, use
7774         MONO_DEBUG=1 when running Mono. 
7775
7776         This takes also care of parts of the leaks as seen by Joe.
7777
7778 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
7779
7780         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
7781         thread_tls_offset calculation.
7782
7783 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
7784
7785         * declsec.c: Reworked linkdemand checks for icall. The previous code
7786         was using the declaration code (untrusted) and didn't work as expected
7787         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
7788         specific case.
7789
7790 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
7791
7792         * iltests.il: Add new localloc test.
7793
7794         * mini-amd64.c: Handle large stack allocations the same way as on
7795         windows if stack overflow handling is working.
7796         
7797         * mini-amd64.c: Allocate the signal stack using mmap.
7798
7799         * mini.c (sigsegv_signal_handler): Fix reading of context.
7800
7801         * mini-exceptions.c: Fix up stack overflow handling.
7802
7803         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
7804
7805         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
7806
7807         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
7808
7809         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
7810
7811         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
7812         tramp_init functions as they are no longer needed.
7813
7814 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
7815
7816         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
7817         
7818         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
7819
7820         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
7821         
7822         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
7823         support that now.
7824
7825         * mini-ops.h: Add OP_LMUL_IMM.
7826
7827         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
7828         long mul/div opcodes as intrinsic.
7829
7830         * mini-amd64.c (emit_call): Handle the case when the callee might be
7831         an AOT method.
7832
7833 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
7834
7835         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
7836         extra safe.
7837         
7838         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
7839
7840         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
7841
7842 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
7843
7844         * mini.c (mono_codegen): Don't leak here, to help people running
7845         monogrind.
7846
7847 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
7848
7849         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
7850         conversions in sse2 mode.
7851
7852         * basic-float.cs: Add regression test.
7853         
7854         * mini-amd64.c: Reenable sse2.
7855
7856 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
7857
7858         * mini-amd64.c: Disable sse2 until some regressions are fixed.
7859
7860 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
7861
7862         * driver.c: Copyright text should include 2005.
7863         
7864 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
7865
7866         * cpu-amd64.md (load_membase): Fix more max lengths.
7867
7868 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
7869
7870         * cpu-amd64.md (load_membase): Fix max length.
7871
7872         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
7873
7874         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
7875
7876         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
7877         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
7878
7879         * basic-float.cs: Add rounding regression test.
7880
7881         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
7882
7883 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
7884
7885         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
7886         structures in registers for pinvoke wrappers.
7887
7888 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
7889
7890         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
7891
7892 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
7893
7894         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
7895         wrapper to mono_jit_thread_attach.
7896
7897         * mini.c (mini_jit_thread_attach): New jit icall.
7898
7899         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
7900         native->managed wrappers.
7901
7902         * exceptions.cs: Add new regression test.
7903
7904         * mini.c (optimize_branches): Check regions in the cbranch to throw
7905         block case as well. Fixes #73242.
7906
7907 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7908
7909         * mini.c: thread safety fixes.
7910
7911 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
7912
7913         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
7914         patching stuff, since delegates use jump trampolines so there is
7915         no caller.
7916
7917         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
7918         jump trampolines.
7919         
7920         * tramp-amd64.c: Fix build.
7921
7922         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
7923         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
7924
7925         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
7926         Rename this to mono_arch....
7927         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
7928
7929         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
7930
7931         * mini-amd64.c (emit_call): If both the caller and the callee is
7932         guaranteed to have 32 bit addresses, emit a normal call.
7933
7934         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
7935
7936         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
7937         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
7938         method_ptr inside delegates.
7939
7940 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
7941
7942         * mini.c (mono_jit_free_method): Free the method info even if the native code is
7943         invalidated. Fixes #73001.
7944
7945         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
7946
7947         * mini-x86.c: Only use stdcall for pinvokes on windows.
7948
7949 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
7950
7951         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
7952         * mini-x86.c: remove unreliable __thread var offset detection,
7953         use the correct accessors and enable by default.
7954
7955 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
7956
7957         * mini.c (mono_jit_free_method): Fix memory leak.
7958
7959 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
7960
7961         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
7962
7963 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
7964
7965         * cpu-amd64.md: Fix lengths of atomic opcodes.
7966
7967 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
7968
7969         * driver.c: try to not imply using ICU is any good.
7970
7971 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
7972
7973         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
7974         functions as inline ops.
7975
7976         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
7977         some Interlocked functions as inline ops.
7978
7979         * mini.c (move_basic_block_to_end): Fix bug in last patch.
7980
7981         * mini.h (MonoBasicBlock): Reorganize fields a bit.
7982
7983         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
7984
7985         * mini.c: Add support for OP_NOT_TAKEN.
7986
7987         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
7988         structures in registers for pinvoke wrappers.
7989
7990         * mini-amd64.c: Fix warnings.
7991
7992 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
7993
7994         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
7995
7996         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
7997
7998         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
7999         address instead of loading the address from it.
8000
8001         * mini-x86.c: Add support for returning small structs in registers
8002         on Win32. Fixes part of #70864.
8003         
8004 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
8005
8006         * trace.c (get_token): Improve error checking.
8007
8008 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
8009
8010         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
8011
8012 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
8013  
8014         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
8015         it can be reused for MonoClass.
8016         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
8017         _LINKDEMAND.
8018
8019 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
8020
8021         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
8022         instead of a MonoReflectionMethod. The method information wasn't used
8023         when displaying SecurityException details (but will be now).
8024
8025 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
8026
8027         * Makefile.am : windows build fix.
8028
8029 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
8030
8031         * iltests.il: Add new regression test.
8032
8033         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
8034         #72522.
8035
8036 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
8037  
8038         * mini.c: Moved linkdemand check into helper function check_linkdemand
8039         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
8040         LDFTN, LDVIRTFTN).
8041
8042 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
8043
8044         * declsec.c: Added statistics counter for different kinds of 
8045         LinkDemands.
8046         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
8047         (and commented) declaration.
8048         * mini.c: Added statistics counter for security Demand code 
8049         generation. Added display of security statistics.
8050
8051 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
8052
8053         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
8054         Fix compilation errors under gcc-2.95.
8055
8056 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
8057
8058         * mini.c, driver.c: Use the new jit trampoline hashtable
8059
8060 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8061
8062         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
8063
8064 2005-02-11  Martin Baulig  <martin@ximian.com>
8065
8066         * debug-mini.c (mono_debug_close_method): Free the line number array.
8067
8068 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8069
8070         * aot.c: Break up large methods into smaller ones. Share GOT slots for
8071         icalls.
8072
8073         * mini.h: Bump AOT file format version. 
8074
8075 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
8076
8077         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
8078         APTC and P/Invoke.
8079         * declsec.h: Added macros to get/set lazyly initialized security 
8080         informations about assemblies. Added new enum for different type of
8081         possible LinkDemand violation. Added function to check LinkDemands.
8082         * mini.h: Added a field to MonoCompile to hold any security violation
8083         detected when JITting a method (so it can be thrown later).
8084         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
8085         and CEE_CALLVIRT. Added code to throw exception at the end of
8086         mini_method_compile (note: the exception is unhandled right now).
8087
8088 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
8089
8090         * mini.c, jit-icalls.c: use the managed implementation of
8091         memset for initobj and memset, to avoid managed <-> unmanaged
8092         transitions.
8093
8094 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8095
8096         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
8097         optimization if it would need a GOT var.
8098
8099         * basic.cs: Add tests for constant propagation and switch statements.
8100
8101         * ssa.c: Fix out-of-range constant propagation and switch statements.
8102
8103 2005-02-09    <vargaz@freemail.hu>
8104
8105         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
8106
8107 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
8108
8109         * cpu-amd64.md (load_membase): Fix max length of load_membase.
8110
8111 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8112
8113         * mini.c: update to new signature of mono_class_get_allocation_ftn().
8114
8115 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
8116
8117         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
8118         arithmetic operations.
8119
8120 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
8121
8122         * mini-ppc.c: add a workaround for broken user code that
8123         DllImports vararg functions with non-vararg signatures.
8124
8125 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
8126
8127         * mini.c (mono_jit_compile_method_inner): Add detection and a 
8128         meaningfull error message for assemblies written in Managed C++.
8129
8130         * tramp-amd64.c mini-amd64.h: Add support for 
8131         create_trampoline_from_token ().
8132
8133         * aot.c mini-x86.c abcremoval.c: Applied patch from
8134         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
8135
8136 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
8137
8138         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
8139         which takes a MonoImage/token as parameter instead of a MonoMethod.
8140
8141         * aot.c: Use the new trampoline for initializing vtables.
8142
8143         * aot.c: Add support for ldfld/stfld_remote wrappers.
8144
8145         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
8146         rules for compare <MEM>, IMM.
8147
8148         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
8149
8150         * aot.c: Handle inherited finalizers correctly.
8151
8152 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
8153
8154         * inssel.brg (stmt): Add a missing _setup_... ().
8155
8156         * aot.c: Save some parts of the class state to the AOT file and use it
8157         to recompute that state when a class is initialized.
8158
8159         * mini.c: Install AOT hooks into the runtime.
8160
8161         * mini.h: Bump AOT file format version.
8162         
8163         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
8164         Fixes #72148.
8165
8166         * iltests.il: Add new test.
8167
8168 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8169
8170         * mini.c: fix typo.
8171
8172 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
8173
8174         * mini.c: setup the statistical profiler in the thread attach
8175         callback to cope with the new single thread code.
8176
8177 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
8178
8179         * mini-ppc.c: ensure we have enough room for the profiler
8180         calls (fixed bug#72084).
8181
8182 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
8183
8184         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
8185         it.
8186
8187 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8188
8189         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
8190
8191 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8192
8193         * ssapre.c: Fixed an issue with down safety (this allows IronPython
8194         to succesfully execute parrotbench).
8195         * ssapre.h: Likewise.
8196
8197 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8198
8199         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
8200         variable for stores to method arguments (fixes a SSAPRE issue).
8201
8202 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8203
8204         * mini.c: handle value types in dup, fixes gen-112.cs.
8205
8206 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
8207
8208         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
8209         sequence for calls in dynamic methods to avoid thunks.
8210
8211 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
8212
8213         * mini.c: correctly remove dynamic methods from the hashtable.
8214
8215 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8216
8217         * driver.c: Disabled SSAPRE until fix the bug that appears
8218         in IronPython's parrotbench.
8219
8220 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
8221
8222         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
8223
8224         * mini.c (mono_method_to_ir): Revert the previous change.
8225         
8226         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
8227         when AOT compiling.
8228
8229         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
8230         mono_jit_info_table_find () etc. when running under valgrind.
8231
8232         * inssel.brg: Fix warnings.
8233
8234         * mini-exceptions.c: Fix warnings.
8235
8236 2005-01-31  Martin Baulig  <martin@ximian.com>
8237
8238         * driver.c (compile_all_methods_thread_main): Don't try to compile
8239         generic methods or anything which has type parameters.
8240
8241 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
8242
8243         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
8244
8245         * TestDriver.cs: Add --verbose flags.
8246
8247         * graph.c ssa.c: Fix 64 bit warnings.
8248         
8249         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
8250         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
8251         Fix 64 bit warnings.
8252
8253         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
8254         variable not spotted by gcc.
8255         
8256         * mini-amd64.c inssel-amd64.brg: Applied patch from  
8257         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
8258         X86_COMPARE_MEMBASE opcodes.
8259
8260         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
8261
8262 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
8263
8264         * *: MonoMethod->signature might be NULL now. You *MUST* use
8265         mono_method_signature.
8266
8267 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8268
8269         * driver.c (compile_all_methods_thread_main): Compile the methods
8270         without invoking cctors.
8271
8272 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8273
8274         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
8275         * basic-calls.cs: test for the above.
8276
8277 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8278
8279         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
8280         MonoJitInfo changes.
8281
8282 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
8283
8284         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
8285         eagerly if it contains dynamic methods.
8286         
8287         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
8288
8289         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
8290         trace, it is now computed by an icall from trace_ips.
8291         
8292         * mini-exceptions.c: Fix a warning.
8293
8294 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
8295
8296         * mini-exceptions.c: don't bother getting stack trace info if
8297         it's not going to be used.
8298
8299 2005-01-27  Raja R Harinath  <rharinath@novell.com>
8300
8301         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
8302         ssapre-mini-ops.h.
8303
8304 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
8305
8306         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
8307
8308         * aot.c: Avoid calling mono_method_get_header () if not needed.
8309
8310         * mini.h: Bump AOT file format version.
8311         
8312         * mini.c (mono_emit_native_call): Allocate a GOT var here.
8313
8314         * mini.c (mono_print_tree): Print more info for calls.
8315
8316 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
8317
8318         * declsec.h: Remove warning by adding missing include for marshal.h
8319
8320 2005-01-26  Martin Baulig  <martin@ximian.com>
8321
8322         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
8323         `ip' twice.
8324
8325 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
8326
8327         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
8328         flags.
8329
8330         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
8331
8332         * aot.c (mono_compile_assembly): Fix a warning.
8333
8334 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
8335
8336         * declsec.c: Look for security attributes on the original MonoMethod 
8337         (and not the wrapped one). This fix permissions on icalls.
8338
8339 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8340
8341         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8342
8343         * mini.c (mono_allocate_stack_slots): Add a fixme.
8344
8345         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8346
8347 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
8348
8349         * inssel.brg: optimize casts of sealed types (more
8350         optimizations waiting for fixes in remoting).
8351
8352 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8353
8354         * inssel.brg (stmt): Add another dummy rule.
8355
8356         * driver.c: Fix warnings.
8357
8358         * driver.c (mono_main): If running under valgrind, instruct glib to use
8359         the system allocation functions so valgrind can track the memory
8360         allocated by the g_... functions.
8361
8362         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
8363
8364         * mini-ops.h: Add OP_DUMMY_STORE opcode.
8365
8366         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
8367
8368         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
8369         variables in try regions.
8370
8371         * mini.c (mini_method_compile): Don't disable optimizations on large
8372         methods when AOT compiling.
8373
8374         * mini.c (mono_allocate_stack_slots): New arch independent method to 
8375         allocate stack slots. Not yet used.
8376
8377 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
8378
8379         * debug-mini.c (mono_debug_close_method): Plug some leaks.
8380
8381 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
8382
8383         * mini-ppc.c: make the branch info relative as the code
8384         buffer can be reallocated.
8385
8386 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
8387
8388         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
8389         * driver.c: Removed the AOT/security restriction. Now initialize the
8390         security manager (in metadata) if --security is used.
8391         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
8392         rather than the pointer to declarative security, when AOT is used.
8393
8394 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
8395
8396         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
8397         basic blocks, reduced intrinsic exception throwing code size.
8398
8399 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
8400
8401         * driver.c (mini_usage): Reorder the usage screen.
8402
8403 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
8404
8405         * mini.c (mono_resolve_patch_target): Fix warning.
8406
8407 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
8408
8409         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
8410         previous patch.
8411
8412         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8413
8414         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
8415         breaks the amd64 build.
8416
8417         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
8418         register allocation. Fixes #71454.
8419
8420         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8421
8422         * arrays.cs: Add new regression test.   
8423
8424 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8425
8426         * ssapre.c: Turned usage of snprintf to GString.
8427         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
8428         (I left it on by mistake in my previous commit).
8429
8430 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
8431
8432         * mini.c, cfold.c, basic-calls.cs: preserve side effects
8433         on cond branch optimization (fixes bug# 71515).
8434
8435 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8436
8437         * abcremoval.c: Fixed bug 71062.
8438         * abcremoval.h: Likewise.
8439
8440 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8441
8442         * mini.c: Added a new functionality to optimize_branches, the removal
8443         of useless basic blocks, and fixed some problem in the removal of
8444         critical edges; some utility functions added for both purposes.
8445         * ssapre.c: Added complex expression support, and fixed bug 70637.
8446         * ssapre.h: Likewise.
8447         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
8448         enabled in SSAPRE.
8449         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
8450         * driver.c: Re-enabled SSAPRE.
8451
8452 2005-01-19  Martin Baulig  <martin@ximian.com>
8453
8454         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
8455         the result of mono_get_method_constrained().
8456
8457 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
8458
8459         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
8460         manager.
8461
8462 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
8463
8464         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
8465         be detected.  Fixes #59296.
8466
8467 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8468
8469         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
8470         which can happen. Fixes #71361.
8471
8472 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8473
8474         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
8475         manager.
8476
8477 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8478
8479         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
8480         appdomain-unload.exe to fail.
8481         
8482         * mini.c: Fix some memory leaks.
8483
8484 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
8485
8486         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
8487         Fixed bug and sped up some codepaths.
8488
8489 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8490
8491         * mini.c: Fix some memory leaks.
8492
8493         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
8494         conversion.
8495
8496         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
8497
8498         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
8499         #71320.
8500
8501         * iltests.il: Add regression test for #71320.
8502
8503 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
8504
8505         * mini.c (mono_codegen): Fix installation of profiler hooks.
8506
8507         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
8508
8509 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8510
8511         * mini.h, mini.c, cfold.c: optimize access to enum
8512         readonly fields, too. Eval conditional branches if possible
8513         to perform unreachable code removal in more cases.
8514
8515 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
8516
8517         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
8518
8519         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
8520         code manager.
8521
8522         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
8523         WinXP DEP. Fixes #71244.
8524
8525 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
8526
8527         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
8528
8529 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
8530
8531         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
8532
8533 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
8534
8535         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
8536         changes.
8537
8538         * mini.h: Bump AOT version.
8539
8540         * mini.h (MonoCompile): Change exvar to a hash table.
8541
8542         * mini.c: Allocate a separate exvar for each handler block.
8543
8544         * mini.c: Get rid of the computation of filter_lengths, its not needed.
8545
8546         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
8547         ex var with the pending exception and only throw if the two are equal.
8548         Fixes #68552.
8549         
8550         * exceptions.cs: Add tests for rethrow and nested catch clauses.
8551
8552         * mini-x86.c: Fix warnings.
8553
8554         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
8555         used by all the ports now.
8556
8557         * aot.c: Add write-symbols and save-temps options.
8558
8559 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8560
8561         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
8562
8563 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
8564
8565         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
8566         operations.
8567
8568         * tramp-s390.c: Check vtable slot belongs to the domain.
8569
8570         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
8571         as per other platforms.
8572
8573         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
8574
8575 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
8576
8577         * driver.c: we don't run the Main() code in a subthread anymore.
8578
8579 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
8580
8581         * mini.c: added experimental rtc support in the statistical
8582         profiler: if the user has the permission, more accurate statistics
8583         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
8584         The MONO_RTC value must be restricted to what the linux rtc allows:
8585         power of two from 64 to 8192 Hz.
8586
8587 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8588
8589         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
8590
8591 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
8592
8593         * mini-ppc.c: better icache flush for smp.
8594
8595 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
8596
8597         * mini-amd64.c (emit_move_return_value): Fix memory leak.
8598
8599         * mini-x86.c (get_call_info): Add the get_call_info () code from the
8600         amd64 port, not yet used.
8601
8602 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8603
8604         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
8605         a struct type.
8606
8607 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
8608
8609         * driver.c: Added --security option to activate the security manager.
8610         Right now this will allow code generation for declarative demands and
8611         is disabled when AOT is specified.
8612         * mini.c: Add code generation for declarative security demands.
8613         * mini.h: Add mono_use_security_manager as an extern gboolean.
8614
8615 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8616
8617         * aot.c (mono_compile_assembly): Speed up compilation a bit by
8618         emitting more dense assembly code.
8619
8620         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
8621         exception throwing stuff.
8622
8623 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
8624
8625         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
8626         dead code.
8627
8628         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
8629         left in by mistake.
8630
8631         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
8632         fixed.
8633
8634         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
8635
8636         * tramp-*.c: Only patch vtable slots if the object is in the current
8637         domain. Fixes appdomain-unload.exe.
8638
8639         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
8640         
8641         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
8642         x86 branch.
8643
8644 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8645
8646         * mini.c (reverse_branch_op): New helper function.
8647
8648         * mini.c (optimize_branches): Run the new optimization only on 
8649         platforms which support it. Also reverse all kinds of branches.
8650
8651         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
8652
8653         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
8654         a throw statement.
8655
8656         * mini.c (optimize_branches): Reverse not-equals branches if the false
8657         bblock is a throw. This happens a lot of time with argument checking in
8658         corlib.
8659
8660         * mini.c (mono_codegen): Add support for placing basic blocks after
8661         the function epilogue.
8662
8663         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
8664         function epilogue.
8665         
8666 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
8667
8668         * mini.c (setup_stat_profiler): Only set this up if the platform
8669         supports ITIMER_PROF.
8670
8671 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8672
8673         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
8674         previous patch.
8675
8676         * inssel.brg: Fix a warning.
8677
8678 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
8679
8680         * mini.c: added support for statistical profiler 
8681         (run with: --profile=default:stat).
8682
8683 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
8684
8685         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
8686
8687         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
8688
8689         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
8690         related to global registers from the amd64 port.
8691
8692 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
8693
8694         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
8695
8696         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
8697         with global registers.
8698         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
8699
8700         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
8701
8702 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
8703
8704         * debug-mini.c (encode_value): Fix off-by-one.
8705
8706         * aot.c (encode_value): Likewise.
8707
8708         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
8709
8710 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
8711
8712         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
8713         AOT.
8714
8715         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
8716         
8717         * aot.c (emit_method_info): Increase size of temp buffer.
8718
8719         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
8720         the AOT case.
8721
8722 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
8723
8724         * aot.c (emit_method_info): Fix build.
8725         
8726         * aot.c: Further rework of the AOT file format to reduce the size of
8727         the method info data.
8728
8729         * mini.h: Bump AOT file format version.
8730
8731 2004-12-27  Martin Baulig  <martin@ximian.com>
8732
8733         * mini.c (mini_get_method): New static method; call
8734         mono_get_method_full() and mono_get_inflated_method().
8735         (mono_method_to_ir): Use mini_get_method() instead of
8736         mono_get_method_full(). 
8737
8738 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
8739
8740         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
8741
8742 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
8743
8744         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
8745
8746         * inssel-amd64.brg: Add some optimization rules.
8747
8748 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
8749
8750         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
8751         standard not GC'd stuff is fine.
8752
8753 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
8754
8755         * aot.c: Rework the AOT file format to get rid of most of the global
8756         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
8757
8758         * mini.h: Bump AOT file format version.
8759         
8760 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
8761
8762         * mini.h: Bump AOT file format version.
8763
8764         * aot.c (mono_aot_is_got_entry): New function to determine if an 
8765         address is inside a GOT.
8766
8767         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
8768
8769         * cpu-pentium.md: Increase the maximum size of some instructions which
8770         might involve a got access.
8771         
8772         * mini.c (get_method_from_ip): Another debug helper function.
8773
8774         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
8775         when got var accesses are created during the decompose phase.
8776
8777         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
8778
8779         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
8780         argument mini_compile_method and to MonoCompile, and use this to
8781         determine whenever a given method is compiled for AOT. This allows the
8782         other methods compiled during AOT compilation to be free of AOT stuff,
8783         so the backends does not need to add special support for them by
8784         creating a fake GOT etc.
8785
8786         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
8787         longer needed.
8788
8789 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
8790
8791         * mini.c (mono_method_to_ir): It turns out that some of the
8792         x-appdomain wrappers are lax with types, so just ignore this for
8793         all wrappers.
8794
8795         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
8796         at the vtable->klass. If it is non-shared code we can just use the
8797         vtable.
8798
8799 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
8800
8801         * mini-ppc.c: access MonoDomain from tls, too.
8802
8803 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
8804
8805         * declsec.c: Removed unused variable (and related warning ;-)
8806
8807 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
8808
8809         * iltests.il: New test for LDELEMA on an array of ref types.
8810
8811         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
8812         all ldelema's on reftypes.
8813         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
8814         it was the wrong place to put it.
8815
8816         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
8817         register to pop to make this cleaner, at the request of Paolo.
8818
8819 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8820
8821         * mini-ops.h (OP_GETHASHCODE): New op.
8822
8823         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
8824
8825         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
8826         operation.
8827
8828         For a microbenchmark, this reduces the cost of Hashtable.get_Item
8829         by 25%.
8830         
8831         * mini-x86.c (mono_arch_output_basic_block): Rather than
8832
8833         add ebp, 4
8834
8835         Emit
8836
8837         pop edx
8838
8839         The first is 3 bytes while the second is 1. This saves 36 kb on
8840         mscorlib, quite a big saving. When bootstraping mcs, I was able to
8841         see a small boost because of icache locality.
8842
8843         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
8844
8845 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
8846
8847         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
8848         started code sharing with the generic code.
8849
8850 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
8851
8852         * mini-ppc.c, cpu-g4.md: added code for direct access to
8853         tls data slots.
8854
8855 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
8856
8857         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
8858          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
8859         to OP_TLS_GET.
8860
8861 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
8862
8863         * declsec.c|h: Added functions to cache the declarative stack modifiers
8864         in MonoJitInfo and to create a security frame from a MonoJitInfo 
8865         structure.
8866         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
8867         created. Register internal calls for System.Security.SecurityFrame::
8868         _GetSecurityFrame and _GetSecurityStack.
8869         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
8870         the definitions for the new stack walk/callback mechanism.
8871         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
8872         first security frame for LinkDemands and InheritanceDemands) and
8873         GetSecurityStack for Demands. Both use the new mono_walk_stack code
8874         from lupus.
8875         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
8876         walk initialization (lupus).
8877
8878 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8879
8880         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
8881         idiom.
8882         (handle_loaded_temps): Do not create a temporary variable for
8883         things that we know are temps. They will never be modified.
8884         (mono_spill_call): Set MONO_INST_IS_TEMP
8885         (mono_emulate_opcode): ditto
8886         (emit_tree): ditto
8887         (mono_method_to_ir.CEE_DUP): ditto
8888
8889 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
8890
8891         * mini.c (type_to_eval_stack_type): Make this handle the void type
8892         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
8893         (emit_tree): use ip_in_bb to special case some common idioms
8894         Update all callers to pass in the IP.
8895         (mono_method_to_ir): Make CEE_CALL* do the above as well.
8896
8897         This gives us a nice 2% speedup in mcs bootstrap.
8898
8899         * mini-x86.c (peephole_pass): Peephole pass to make
8900         mov  [foo], eax
8901         push [foo]
8902
8903         into
8904
8905         mov [foo], eax
8906         push eax
8907
8908         * mini.c (ip_in_bb): new method.
8909         (mono_method_to_ir): use this method rather than doing the hash
8910         lookup ourselves.
8911
8912         * linear-scan.c (mono_linear_scan): When expiring actives, you
8913         don't need to keep around variables that expire on this
8914         instruction. This makes it so that:
8915              a = b + 1
8916         will turn into:
8917              store (ebx add (ebx, 1))
8918         which will become
8919              add ebx, 1
8920
8921 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
8922
8923         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
8924         combination to avoid doing two copies. Fix up problems with previous
8925         patch.
8926
8927         * mini.c: Fix 64 bit warnings.
8928
8929         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
8930
8931 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
8932
8933         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
8934         changes from the x86 code.
8935
8936         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
8937
8938 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
8939
8940         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
8941         throwing code to reduce its size, unify the AOT and non-aot code and 
8942         get rid of relocations in the AOT case.
8943
8944         * mini-x86.h mini.c exceptions-x86.c 
8945         (mono_arch_get_throw_corlib_exception): New arch specific function to 
8946         raise corlib exceptions which doesn't require relocations in the 
8947         caller.
8948
8949         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
8950
8951 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
8952
8953         * mini.c (mono_emit_method_call): Only allocate the got var when it is
8954         needed.
8955
8956         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
8957         in the AOT case.
8958
8959 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8960
8961         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
8962         with add function when used from Inc/dec atomic 
8963         functions. Re-enabled optimization on x86.
8964         * mini-ops.h: renamed atomic_add functions to
8965         allow _add to match the Interlocked::Add and
8966         _add_next to match Interlocked::Inc/Dec.
8967
8968 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
8969
8970         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
8971         linking of BBs to the end BB, and enabled SSAPRE also with
8972         consprop and copyprop (which was prevented by that bug).
8973
8974 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8975
8976         * mini-x86.c: disabling the Interlocked optimizing code. 
8977
8978 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
8979
8980         * aot.c (load_aot_module): Move reading of got_addr after the AOT
8981         file version check.
8982         
8983 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8984
8985         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
8986         interlocked optimization due lack of support on x86, rewrote 
8987         exchange to take into account that base may be in eax.
8988         
8989         xsp works again; activated Interlocked optimizing code.
8990         
8991 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
8992
8993         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8994
8995 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
8996
8997         * mini-ops.h: Add new opcodes.
8998
8999         * mini.h: Add new patch types. Add got_var to MonoCompile.
9000
9001         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
9002         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
9003         make it work with all kinds of patchable code.
9004
9005         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
9006         address of the GOT, and referencing entries in the GOT.
9007
9008         * mini.c: Add code to load the GOT address if needed by an opcode.
9009
9010         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
9011         independent AOT code on the x86 using an elf-style Global Offset Table.
9012
9013 2004-12-14  Raja R Harinath  <rharinath@novell.com>
9014
9015         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
9016
9017 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9018
9019         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
9020         when running xsp.
9021
9022 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
9023
9024         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
9025         of Interlocked:Increment/Decrement/Add as inline ops.
9026         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
9027
9028 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
9029
9030         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
9031         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
9032
9033 2004-12-12  Duncan Mak  <duncan@ximian.com>
9034
9035         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
9036         again. `patch_info->table_size' is no longer valid after Zoltan's
9037         commit #37636.
9038
9039 2004-12-12  Martin Baulig  <martin@ximian.com>
9040
9041         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
9042         if we are the "real" method, ie. not an inlined method inside it.
9043
9044 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
9045
9046         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
9047         before we look in the special fields table. This fixes
9048         ../tests/thread-static-init.cs.
9049
9050 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9051
9052         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
9053         for Array get_Rank and get_Length. Fixes bug #70465.
9054
9055 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
9056
9057         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
9058         separate structure to reduce the size of MonoJumpInfo.
9059
9060 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
9061
9062         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
9063
9064 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
9065
9066         * mini.c (mini_get_inst_for_method): Changed to allow ports
9067         to return a MonoInst instead of opcode 
9068         (renamed mini_get_opcode_for_method to better reflect the new functionality)
9069         
9070         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
9071         Allow ports to return a created MonoInst instead of op-code, will enable
9072         new optimizations.
9073         (renamed mini_get_opcode_for_method to better reflected the functionality)
9074
9075 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
9076
9077         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
9078
9079 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9080
9081         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
9082         Fixes #69985.
9083
9084 2004-12-08  Martin Baulig  <martin@ximian.com>
9085
9086         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
9087         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
9088
9089 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9090
9091         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
9092         correctly.
9093
9094         * exceptions.cs: Disable some tests which depend on properties of x86 fp
9095         arithmetic.
9096
9097 2004-12-08  Raja R Harinath  <rharinath@novell.com>
9098
9099         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
9100
9101 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
9102
9103         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
9104         bug introduced by the previous patch.
9105
9106 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9107
9108         * mini-ppc.c, objectc.cs: handle large structs passed by value
9109         (fixes bug #69972).
9110
9111 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
9112
9113         * mini-ppc.c: OP_ARGLIST implementation from
9114         Geoff Norton  <gnorton@customerdna.com>.
9115
9116 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
9117
9118         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
9119         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
9120
9121 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9122
9123         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
9124
9125 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9126
9127         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
9128         support.
9129
9130 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
9131
9132         * mini-sparc.c: Zero out localled-ed memory.
9133
9134         * iltests.il: Add tests for zeroing out localloc-ed memory.
9135
9136 2004-12-04  Martin Baulig  <martin@ximian.com>
9137
9138         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
9139         mono_method_get_signature_full().       
9140
9141 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
9142
9143         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
9144         and some utility functions (always for SSAPRE), integrated SSAPRE.
9145         * mini.h: Likewise.
9146         * driver.c: Added ssapre option.
9147         * ssa.c: Small fix on OP_ARG handling.
9148         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
9149         * Makefile.am: Likewise.
9150
9151 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
9152
9153         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
9154         now in the xp code.
9155
9156         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
9157         icall.
9158
9159 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9160
9161         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
9162         
9163         * cpu-s390.md : Increase instruction length of oparglist.
9164
9165         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
9166
9167 2004-11-30  Martin Baulig  <martin@ximian.com>
9168
9169         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
9170         virtual generic methods.  We call a special helper_compile_generic_method()
9171         icall to retrieve the method from the vtable, inflate and compile
9172         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
9173
9174         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
9175
9176 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
9177
9178         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
9179
9180 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
9181
9182         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
9183         Fixes #69929.
9184
9185 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
9186
9187         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
9188         platforms with PIC aot.
9189
9190 2004-11-28  Martin Baulig  <martin@ximian.com>
9191
9192         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
9193         Fixes gen-112.cs.
9194
9195 2004-11-28  Martin Baulig  <martin@ximian.com>
9196
9197         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
9198         the result of mono_type_get_underlying_type() to check whether
9199         we're byref.
9200
9201 2004-11-26  Martin Baulig  <martin@ximian.com>
9202
9203         * mini.c
9204         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
9205         in the g_assert().
9206
9207 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
9208
9209         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
9210         the same way as the other arguments so they won't get clobbered.
9211
9212         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
9213         calls through R11 since it is clobbered by the trampoline code.
9214
9215 2004-11-26  Raja R Harinath  <rharinath@novell.com>
9216
9217         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
9218         pick up in-tree mscorlib.dll.
9219
9220 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
9221
9222         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
9223
9224         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
9225         runtime data/code are now stored in a table similar to the GOT in ELF. 
9226         This allows the code itself to be position independent.
9227
9228         * aot.c: Fix loading of referenced assemblies after the lazy assembly
9229         loading changes.
9230
9231         * aot.c: Attach ELF type (object/function) directives to all global
9232         symbols.
9233
9234         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
9235
9236         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
9237
9238         * mini-amd64.h: Turn on PIC AOT code.
9239
9240         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
9241         returning the offset within an OP_AOTCONST instruction where the GOT
9242         offset needs to be added.
9243
9244         * mini.h: Bump AOT file format version.
9245
9246 2004-11-25  Martin Baulig  <martin@ximian.com>
9247
9248         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
9249         uninflated generic methods.
9250
9251 2004-11-25  Martin Baulig  <martin@ximian.com>
9252
9253         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
9254
9255 2004-11-24  Martin Baulig  <martin@ximian.com>
9256
9257         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
9258         original klass (this only applies for generic instances).
9259
9260 2004-11-24  Martin Baulig  <martin@ximian.com>
9261
9262         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
9263         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
9264         that array).
9265
9266 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
9267
9268         * mini.c (mono_method_to_ir): Disable inlining for methods containing
9269         localloc. Fixes #69678.
9270
9271         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
9272         
9273 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
9274
9275         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
9276         used SSE registers on pinvoke calls. Fixes #69774.
9277
9278 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
9279
9280         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
9281         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
9282
9283 2004-11-23  Raja R Harinath  <rharinath@novell.com>
9284
9285         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
9286         Refer directly to the mcs/ tree.
9287
9288 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9289
9290         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
9291         Check if a trampoline for a synchronized method is required. 
9292
9293 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
9294
9295         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
9296         with localloc if needed. Throe arithmetric exception in
9297         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
9298         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
9299
9300 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
9301
9302         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
9303         types before switching on type.  Fixes #69622.
9304
9305 2004-11-19  Raja R Harinath  <rharinath@novell.com>
9306
9307         * Makefile.am (check-local): New.  Integrate into 'make check'.
9308         (MCS,RUNTIME): Define using in-tree mono and mcs.
9309         (ILASM): New.
9310         (%.exe): Use $(ILASM).
9311
9312 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
9313
9314         * mini-ppc.c: adjust initial prolog size (bug #69691).
9315
9316 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
9317
9318         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
9319         #69664.
9320
9321 2004-11-17  Raja R Harinath  <rharinath@novell.com>
9322
9323         * Makefile.am (clean-local): Rename from 'clean'.
9324
9325 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9326
9327         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
9328         to mono_arch_is_int_overflow. 
9329         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
9330         SIGFPE events.
9331
9332 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
9333
9334         * declsec.c|h: New files to support declarative security attributes.
9335         Added function to check if a method has (applicable) security.
9336         * mini.c|h: Add check for declarative security attributes in
9337         mono_method_check_inlining.
9338         * Makefile.am: Added declsec.c and declsec.h to the build.
9339
9340 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
9341
9342         * mini.c, mini.h: update to keep dynamic code info per-domain.
9343
9344 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
9345
9346         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
9347         (mini_init): Get rid of it from here too.
9348
9349 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
9350
9351         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
9352         implemented OP_RETHROW (patch by Geoff Norton
9353         <gnorton@customerdna.com>).
9354
9355 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
9356
9357         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
9358         between appdomains.  Fixes appdomain-unload on PPC.
9359
9360 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
9361
9362         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9363         mini-exceptions.c: handle the new wrapper types.
9364         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
9365         token value as a MonoClass* when compiling a wrapper.
9366         mono_jit_create_remoting_trampoline now takes an additional
9367         MonoRemotingTarget parameter.
9368         
9369 2004-11-10  Martin Baulig  <martin@localhost>
9370
9371         * mini.c (mono_method_to_ir): Use `generic_container->context'
9372         rather than creating a new one.
9373
9374 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9375
9376         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
9377
9378         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
9379
9380 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
9381
9382         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
9383         the experimental aot cache stuff.
9384
9385 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
9386
9387         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9388         mini-exceptions.c: update to exception clause structure changes.
9389
9390 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9391
9392         * exceptions-x86.c (throw_exception): Fix warnings.
9393
9394         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
9395         for OP_RETHROW.
9396
9397 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9398
9399         * exceptions-sparc.c (get_throw_exception): Really fix this.
9400
9401 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
9402
9403         * tramp-*.c: we no longer support icalls without wrappers, so
9404         a bit of code can be removed here
9405
9406 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
9407
9408         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
9409         patch.
9410
9411         * cpu-sparc.md: Add op_rethrow.
9412
9413         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
9414
9415         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
9416
9417         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
9418         * mini-ops.h: Add OP_RETHROW.
9419
9420         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
9421
9422         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
9423
9424 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
9425         
9426         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
9427         Makes the output much easier to read
9428
9429 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
9430
9431         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
9432         prevents another huge leak when compiling with ssa. Secondly, the
9433         performance of doing this rather than freeing the lists is much
9434         better. GList does a lock every time you allocate a list link,
9435         so that it can use a memory pool. So, it is better to just use
9436         a memory pool of our own.
9437         
9438         * ssa.c, linear-scan.c: replace g_list_remove_link with
9439         g_list_delete.  The remove one does not free the GList, so we were
9440         leaking memory. On -O=all --compile-all with corlib, this cut down
9441         3 MB of allocations.
9442
9443 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
9444
9445         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
9446
9447         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
9448
9449         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
9450         into a new function mono_create_jit_trampoline ().
9451
9452 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
9453
9454         * trace.c (get_spec): Allow tracing of classes without a namespace.
9455
9456 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
9457
9458         * mini.c: Fix pointer overwrite in mini_method_compile.
9459
9460 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
9461
9462         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
9463         The darwin ABI needs some special handling for 1 and 2 byte structs
9464         Lets use lbz/lhz instead of lwz everywhere.
9465         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
9466         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
9467         Use stb/sth for the former, and put the latter always on stack instead of in
9468         argument registers.
9469
9470 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
9471
9472         * trace.c (is_filenamechar): Add '_'.
9473
9474 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
9475
9476         * mini-s390.c: Fix prolog length to allow for large trace requirements.
9477
9478         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
9479
9480 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
9481
9482         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
9483         depends on libmonogc. Fixes #68805.
9484
9485 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
9486
9487         * mini.c (mono_jit_free_method): Provide extra information for
9488         this error.  Currently this leaks, but will be turned into a
9489         developer option in the future.
9490
9491 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
9492
9493         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
9494
9495 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
9496
9497         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
9498         boundary. Fixes reading of PATCH_INFO_R4 and R8.
9499         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
9500
9501 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
9502
9503         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
9504         trampolines for AOT code.
9505
9506 2004-10-22    <vargaz@freemail.hu>
9507
9508         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
9509         constructed types. Fixes #68136.
9510
9511 2004-10-21  Martin Baulig  <martin@ximian.com>
9512
9513         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
9514         if it returns true, unwind the stack to the call instruction.
9515
9516 2004-10-21    <vargaz@freemail.hu>
9517
9518         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
9519
9520         * mini.h: Bump AOT version number.
9521
9522         * objects.cs: Add another test for unbox trampolines.
9523
9524         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
9525         valuetype methods.
9526
9527 2004-10-20    <vargaz@freemail.hu>
9528
9529         * driver.c: Add SHARED to the set of optimizations tested.
9530
9531         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
9532
9533         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
9534         used by CEE_NEWARR.
9535
9536         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
9537
9538 2004-10-20  Martin Baulig  <martin@ximian.com>
9539
9540         * mini-exceptions.c (mono_handle_exception): Call
9541         mono_debugger_handle_exception() to tell the debugger about
9542         catch/finally clauses.
9543
9544 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
9545
9546         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
9547
9548         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
9549         #68447.
9550
9551 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
9552
9553         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
9554         methods as their native size, fixed bug #57543, #57545.
9555         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
9556         This saves a temporary register and mullw call down into 1 (minor perf
9557         increase for cases like sum = sum * 5;  This use to translate into:
9558             li r11,5
9559             mullw r28,r28,r11
9560         It now translates to
9561             mulli r28,r28,5
9562
9563 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
9564
9565         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
9566         #68388.
9567
9568 2004-10-11  Martin Baulig  <martin@ximian.com>
9569
9570         * mini.c (mono_method_to_ir): If we're a generic method, get the
9571         MonoGenericContainer from our MonoMethodNormal and create a
9572         MonoGenericContext from it.
9573
9574 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
9575
9576         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
9577
9578         * basic-long.cs: Add test for checked i8->i2 cast.
9579
9580 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9581
9582         * inssel-ppc.brg: added a couple of speedup rules.
9583
9584 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
9585
9586         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
9587         to speed up rebuilds.
9588
9589 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9590
9591         * mini-s390.c: Minor fix to OP_OR_IMM.
9592
9593 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
9594
9595         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
9596         better. Fixes appdomain-unload.exe on sparc.
9597
9598 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
9599
9600         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
9601         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
9602         see bug 67324.
9603
9604 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
9605
9606         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
9607
9608 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
9609
9610         * mini.c: Always generate a field read/write wrapper for members
9611         of the class MarshalByRefObject since the actual instance could
9612         be a CBO.
9613
9614 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
9615
9616         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
9617
9618 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
9619
9620         * driver.c mini.h trace.c: Move the setting of the main assembly into
9621         a separate function called mono_trace_set_assembly () and call it after
9622         actually loading the main assembly. Fixes #66872.
9623
9624 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
9625
9626         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
9627         using the code manager.
9628
9629 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
9630
9631         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
9632
9633 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
9634
9635         * cpu-amd64.md: Fix bug in previous patch.
9636         
9637         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
9638         #66650.
9639
9640 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
9641
9642         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9643         mini-exceptions.c: updates for changed stack walk interface.
9644
9645 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9646
9647         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
9648
9649 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
9650
9651         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
9652
9653 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
9654
9655         * driver.c (mini_regression_list): Do not call mono_assembly_close 
9656         since assemblies can't be unloaded.
9657         
9658 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9659
9660         * cpu-amd64.md: Fix more instruction lengths.
9661
9662         * cpu-amd64.md: Fix lengths of some instructions.
9663
9664 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
9665
9666         * inssel.brg: Make the array ldelema check aot friendly.
9667
9668 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9669
9670         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
9671
9672         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
9673
9674 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
9675
9676         * mini-x86.c: Fix build.
9677
9678         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
9679         mono_type_get_underlying_type () helper function to simplify code.
9680         
9681 2004-09-09  Martin Baulig  <martin@ximian.com>
9682
9683         * mini-amd64.c: Don't access `type->data.klass' directly, call
9684         mono_class_from_mono_type() instead since the type may be a
9685         generic instance.
9686
9687 2004-09-09  Martin Baulig  <martin@ximian.com>
9688
9689         * mini-amd64.c (get_call_info): Fix support for generic instances.
9690         (add_valuetype): Use mono_class_from_mono_type() to get the class
9691         since we can be a generic instance.
9692
9693 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
9694
9695         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
9696
9697 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
9698
9699         * liveness.c: reset spill costs on each scan: bug 62107
9700
9701 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
9702
9703         * exceptions-sparc.c (mono_arch_find_jit_info): remove
9704         unnecessary line that doesn't compile
9705
9706 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
9707
9708         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
9709         trampolines, make them call an error function so people can fix their
9710         code.
9711
9712 2004-09-06  Martin Baulig  <martin@ximian.com>
9713
9714         * mini.c (mono_method_to_ir): When initializing locals, handle a
9715         generic instances like a valuetype if it's a valuetype and like a
9716         class if it's a class.
9717
9718 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9719
9720         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
9721         stack. Fixes #64674.
9722
9723         * exceptions.cs: Add test for unwinding of call arguments.
9724
9725 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
9726
9727         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
9728         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
9729         set the carry/borrow flag). The sparc and s390 implementations
9730         can now use optimized versions (and simplify the code). ppc bugfixes.
9731
9732 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9733
9734         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
9735
9736 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
9737
9738         * inssel-amd64.brg: Remove leftover 32 bit rule.
9739
9740         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
9741
9742 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
9743
9744         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
9745         mono_arch_find_jit_info functions into a new function. Fix a memory
9746         leak.
9747
9748         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
9749         refactored code.
9750         
9751 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9752
9753         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
9754         as well.
9755         
9756         * exceptions.cs: Add array size tests.
9757
9758         * mini.c: Allocate a separate icall wrapper for each arity of 
9759         mono_array_new_va. Fixes #59509.
9760
9761         * exceptions.cs: Add testcase for 64578.
9762
9763         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
9764
9765         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
9766         
9767 2004-09-02  Martin Baulig  <martin@ximian.com>
9768
9769         * mini.c (mono_method_to_ir): When initializing the locals, call
9770         handle_initobj() on the generic instance itself, not its
9771         underlying type.
9772
9773 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9774
9775         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
9776         MonoJitInfo for dynamic methods.
9777
9778         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
9779
9780         * mini.c: Add support for freeing JIT data for dynamic methods.
9781         
9782 2004-09-01  Martin Baulig  <martin@ximian.com>
9783
9784         * mini-x86.c (is_regsize_var): Added support for generic
9785         instances.
9786         (mono_arch_emit_prolog): Make this compile again, use
9787         `x86_push_imm_template (code)'.
9788
9789 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
9790
9791         * mini-x86.c: make all push_imm instructions that get
9792         patched always emit the long form
9793
9794 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
9795
9796         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
9797         in a per-domain hash.
9798
9799         * mini-amd64.c (merge_argument_class_from_type): Handle generic
9800         types.
9801
9802 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
9803
9804         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
9805         work.
9806         
9807         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
9808         work.
9809
9810         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
9811         Beginnings of SSE2 support.
9812
9813         * exceptions.cs: Add more tests for checked int<->uint casts.
9814
9815 2004-08-28  Martin Baulig  <martin@ximian.com>
9816
9817         * mini-x86.c (mono_arch_instrument_epilog): Added support for
9818         generic instances.
9819
9820         * mini.c
9821         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
9822         Handle generic instances recursively.
9823
9824 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9825
9826         * iltests.il: test for conv.u8 on a constant
9827
9828 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9829
9830         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
9831         LCONV_x4 (shrun_32 (membase)).
9832
9833 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9834
9835         * inssel-x86.brg: c&p rules for push/setret of long
9836
9837 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
9838
9839         * inssel-x86.brg: c&p rules for compare (base, regvar) and
9840         compare (regvar, base)
9841
9842         * inssel-x86.brg: more burg love
9843
9844         * inssel.brg: more cleanup
9845
9846         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
9847
9848 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
9849
9850         * basic-long.cs, basic-calls.cs: new tests for optimization.
9851
9852 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
9853
9854         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
9855         patch.
9856
9857 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
9858
9859         * mini-amd64.c (read_tls_offset_from_method): Add another case.
9860         
9861 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
9862
9863         * inssel.brg (mini_emit_memcpy): use 
9864         NO_UNALIGNED_ACCESS to disable memcpy optimization
9865
9866 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
9867
9868         * mini-amd64.c: Handle generic types in various places.
9869
9870         * mini.c (mono_method_to_ir): Handle generic types in init locals.
9871
9872 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
9873
9874         * mini.c (handle_box): Fix warning.
9875
9876         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
9877
9878         * mini-amd64.h: Enable the emit_state optimization.
9879
9880         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
9881
9882         * mini-amd64.c: Add some new 64 bit peephole opts.
9883
9884         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
9885
9886         * cpu-amd64.md: sreg1 of div instructions must be %rax.
9887
9888         * mini-amd64.c: Register allocator fixes.
9889
9890         * mini.c: Add an optimization to emit_state to avoid allocation of new
9891         registers on some platforms.
9892
9893 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
9894
9895         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
9896
9897         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
9898         allocation. Fixes #63085.
9899
9900         * basic-long.cs: Add new regression test.
9901
9902         * mini-amd64.c: Register allocator improvements.
9903
9904 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
9905
9906         * mini-amd64.c (read_tls_offset_from_method): Add another code
9907         sequence.
9908
9909         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
9910         instruction sequence for nullifying class init trampolines.
9911
9912         * objects.cs: Add new regalloc test.
9913
9914         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
9915
9916 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
9917
9918         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
9919         
9920         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
9921         arguments.
9922
9923         * driver.c: Fix profiling after TLS changes.
9924         
9925         * driver.c (mono_main): Set mono_stats.enabled if needed.
9926
9927         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
9928         CEE_BOX.
9929
9930 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
9931
9932         * mini-x86.c: use a 1 op rather than a 2 op tls access
9933         instruction -> faster.
9934
9935 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
9936
9937         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
9938         x86 backend.
9939
9940 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
9941
9942         * exceptions-sparc.c (throw_exception): fix typo
9943
9944 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
9945
9946         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
9947         set tree->dreg correctly with tls. Allow any
9948         register to be used.
9949
9950         * mini-x86.c (read_tls_offset_from_method): add new code
9951         generation pattern seen with GCC.
9952
9953
9954 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
9955
9956         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
9957         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9958         exceptions-sparc.c: fix some performance issues in exception
9959         handling and setting of the stack trace for exceptions that were
9960         already thrown.
9961
9962 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
9963
9964         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
9965         x86 backend.
9966         
9967         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
9968         registers.
9969
9970 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
9971
9972         This patch inlines tls access, when possible.
9973         
9974         * mini.h: new arch functions for TLS intrinsics.
9975         All platforms updated with a stub.
9976
9977         * mini.c: use the new intrinsics
9978
9979         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
9980         arch specific intrinsic for tls variables
9981
9982 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
9983
9984         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
9985         under windows.
9986
9987 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
9988
9989         * mini.c: thread local allocation
9990
9991 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
9992
9993         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
9994
9995         * Makefile.am: Link against the static version of libmonogc.
9996         
9997         * Makefile.am: Link the static versions of the convenience libraries
9998         into the mono executable.
9999
10000         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
10001
10002 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
10003
10004         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
10005         on integer overflow.
10006
10007         * mini-amd64.c: Reorganize function call code.
10008
10009         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
10010
10011 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10012
10013         * inssel-x86.brg: use xor eax,eax.
10014         
10015         * basic.cs: new tests
10016
10017 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10018
10019         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
10020         in exception throwing code.
10021         
10022 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10023
10024         * inssel-x86.brg: use xor esi,esi.
10025
10026 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10027
10028         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
10029         can trace methods compiled during mini_init () too.
10030
10031         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
10032         CEE_CONV_U4.
10033
10034 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10035
10036         * Makefile.am: static link on x86 (r=zoltan)
10037
10038 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10039
10040         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
10041         code since it causes some programs to fail.
10042
10043 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
10044
10045         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
10046
10047 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10048
10049         * mini.c: ovfops_op_map - add STACK_OBJ case for
10050         CONV_I 
10051         * basic.cs: add test_0_pin_string as test
10052         case for above.
10053
10054 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10055
10056         * Makefile.am: build C# if srcdir != builddir
10057
10058 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10059
10060         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
10061         fall-through blocks.
10062
10063 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10064
10065         * driver.c: enable loop by default again and include abcrem in -O=all.
10066
10067 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
10068
10069         * iltests.il: Add some localloc tests.
10070
10071         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
10072
10073         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
10074         Fixes #62574.
10075
10076         * inssel-amd64.brg: Add some optimizations.
10077
10078         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
10079         for gcc-3.4.
10080
10081         * Makefile.am: Statically link mono against libmono on AMD64.
10082         
10083         * mini-amd64.c inssel-amd64.brg: Optimizations.
10084
10085 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
10086
10087         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
10088
10089         * tramp-amd64.c: Patch calling code in trampolines.
10090
10091 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
10092
10093         * mini-amd64.c: pinvoke struct passing fixes.
10094
10095 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
10096
10097         * mini-sparc.c: redo change, make mono_arch_cpu_init call
10098         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
10099
10100 2004-08-05  Duncan Mak  <duncan@ximian.com>
10101
10102         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
10103         CEE_LDELEM_ANY.
10104
10105 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10106
10107         * mini-amd64.c (emit_move_return_value): Move return value for normal
10108         calls too.
10109
10110 2004-08-05  Martin Baulig  <martin@ximian.com>
10111
10112         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
10113         `type->type'; just modify `type' itself when dealing with enums
10114         and generic instances.
10115         (check_call_signature): Make `simple_type' a `MonoType *'.
10116
10117 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10118
10119         * mini.c: Use OP_PADD to add offsets to addresses.
10120
10121         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
10122
10123 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
10124
10125         * mini-sparc.c (mono_arch_emit_epilog): fix check
10126         for folding last op into restore instruction
10127
10128 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10129
10130         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
10131         helper methods using the code manager.
10132         
10133         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
10134
10135         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
10136
10137 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10138         
10139         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
10140           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
10141
10142         * mini-s390.c: fix tail processing
10143
10144 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
10145
10146         * mini-ppc.c: mul.ovf.un exception name fix.
10147
10148 2004-08-03  Martin Baulig  <martin@ximian.com>
10149
10150         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
10151         instances; before jumping to `handle_enum', also modify `ptype'.
10152
10153 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
10154
10155         * cpu-sparc.md: fcall maximal length too small.
10156
10157 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
10158
10159         * mini-amd64.c mini.h: Add initial support for passing/returning 
10160         structures to/from pinvoked methods.
10161
10162 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
10163
10164         * mini-ppc.c: reg allocator fix.
10165
10166 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
10167
10168         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
10169
10170         * inssel.brg: Optimize memset on 64 bit machines.
10171
10172         * mini-amd64.c: Fix some vararg cases.
10173
10174 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10175
10176         * mini-s390.c: Corrected macro in emit_float_to_int
10177
10178         * s390-abi.cs: Tests to exercise the s390 ABI
10179
10180 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10181
10182         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
10183         caller saved regs.
10184
10185         * basic.cs: Add a test for add.ovf.un.
10186
10187 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
10188
10189         * mini-sparc.c: add case for OP_IDIV_UN
10190
10191 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10192
10193         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
10194         
10195         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
10196
10197 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
10198
10199         * basic.cs: regression tests.
10200
10201         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
10202         regressions.
10203
10204 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10205
10206         * basic.cs: Add a new test.
10207
10208         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
10209         and AOT. Various fixes and optimizations.
10210
10211         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
10212
10213 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10214
10215         * mini-ppc.c: make sure temp regs are not used for global reg
10216         allocation.
10217
10218 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
10219
10220         * cpu-sparc.md: conv_i8 fix for 64bits
10221
10222         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
10223
10224 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
10225         
10226         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
10227         add opcode for cmp BYTE PTR [eax], imm.
10228
10229         * inssel.brg: Make memcpy and memset takes bases.
10230
10231 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10232
10233         * *-amd64.*: More AMD64 work.
10234         
10235 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10236
10237         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
10238         add a compare-not-equal opcode.
10239         
10240 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
10241
10242         * mini.c: Use mono_init_from_assembly instead of mono_init.
10243         
10244 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10245
10246         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
10247
10248         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
10249
10250         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
10251
10252         * inssel.brg: 64 bit fixes.
10253
10254         * mini.h (MonoCallInst): Add some AMD64 specific data.
10255
10256         * mini.h: Add some OP_P opcodes.
10257
10258 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10259
10260         * basic.cs: tests for 61797 and 61740
10261
10262 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10263
10264         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
10265         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
10266
10267 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
10268
10269         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
10270
10271         * *-amd64*.*: Ongoing AMD64 work.
10272
10273 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
10274
10275         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
10276
10277         * *-amd64*: Ongoing AMD64 work.
10278
10279         * mini-arch.h: Add AMD64 support.
10280
10281         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
10282
10283         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
10284
10285         * mini-ops.h: Add new opcodes.
10286
10287         * Makefile.am: Add AMD64 support.
10288
10289         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
10290         rules into the inssel-long*.brg files.
10291
10292         * *-amd64.*: Add beginnings of AMD64 backend.
10293
10294 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
10295
10296         * mini.c (print_dfn): commenting out the code that prints
10297         the cil. With -O=deadce, this makes -v -v crash.
10298         
10299         * cpu-pentium.md: make checkthis have a length of 2
10300
10301 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
10302
10303         * mini-sparc.h: fix implementations of __builtin
10304         functions for Sun compiler for V9.
10305
10306 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
10307
10308         * mini.c: use the new stelem.ref wrapper
10309         * exceptions.cs, arrays.cs: new stelem.ref tests
10310
10311 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10312
10313         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
10314         new XSP should work with these changes).
10315
10316 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
10317         
10318         * inssel-{long32,x86,}.brg: trivial optimizations.
10319         
10320 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
10321
10322         * mini.c: load value when emitting box operation in
10323         constrained calls.
10324
10325 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
10326
10327         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
10328         is one byte shorter than cmp DWORD PTR [eax], 0.
10329
10330 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10331
10332         * inssel-ppc.brg: arguments on the stack are always
10333         relative to the stack pointer (spotted by Neale Ferguson).
10334
10335 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10336
10337         * exceptions-x86.c: delay appending the method name to the trace until
10338         after mono_jit_info_table_find is called, as this gets the real
10339         MonoMethod.
10340
10341 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
10342
10343         * aot.c: register roots
10344
10345 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10346
10347         * aot.c : I could just use PLATFORM_WIN32 flag.
10348
10349 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10350
10351         * aot.c : Reverting the previous fix. This time it broke linux build.
10352
10353 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10354
10355         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
10356
10357 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
10358
10359         * mini.c (handle_stack_args): Remove some more debugging code.
10360         
10361         * mini.c (handle_stack_args): Remove debug output left in by mistake.
10362
10363         * driver.c mini.h aot.c: Allow additional options to be specified with
10364         --aot and pass them to mono_compile_assembly.
10365
10366         * aot.c: Add experimental code to AOT compile all loaded assemblies
10367         on demand and save the code into a cache in the filesystem.
10368
10369         * aot.c: Add support for more wrapper methods.
10370         
10371         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
10372         58863.
10373
10374         * cpu-*.md: Remove removed opcodes.
10375
10376         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
10377         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
10378         related icalls to marshal.c.
10379
10380 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
10381
10382         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
10383
10384         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
10385
10386         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
10387
10388 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
10389         * liveness.c: If liveness is recomputated we need to reset the information
10390         for each variable. This way, if the liveness range has been narrowed
10391         by optimizations that happened after the last computation, we can return
10392         a smaller range.
10393         
10394         For example, if you have
10395         
10396         {
10397                 int i = 0;
10398                 
10399                 // Tons of code that does not affect i
10400                 
10401                 i = foo ();
10402                 ...
10403         }
10404         
10405         i = 0 is dead code and will be removed by SSA. However, when
10406         linear scan gets to the code, i will still appear to be live
10407         throughout the entire block. This prevents good register allocation.
10408
10409 2004-07-06  Martin Baulig  <martin@ximian.com>
10410
10411         * debug-mini.c (mono_debug_init_method): Allow
10412         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
10413         (mono_debug_add_icall_wrapper): New method.
10414
10415         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
10416
10417 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
10418
10419         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
10420         optimization.
10421
10422 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
10423
10424         * aot.c (mono_aot_load_method): Fix loading of debug info.
10425
10426 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10427
10428         * aot.c: Add logging support.
10429
10430 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10431
10432         * mini.h: Add prototype for mono_print_method_from_ip.
10433
10434         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
10435
10436         * inssel.brg: 64 bit fixes.
10437
10438         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
10439         inssel-long32.brg.
10440
10441         * Makefile.am: Add SPARC64 support.
10442
10443 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10444
10445         * aot.c: Fix alignment problems on 32 bit platforms.
10446
10447 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10448
10449         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
10450         SPARC64.
10451
10452         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
10453         problems.
10454
10455         * mini.h: Bump AOT file version. Some 64 bit fixes.
10456
10457 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10458
10459         * inssel-sparc.brg: Add new rule to avoid register moves.
10460
10461         * inssel.brg: Add ldind_to_load_membase helper function.
10462
10463 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
10464
10465         * mini.c: OffsetToStringData intrinsic.
10466         
10467 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10468
10469         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
10470
10471         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
10472         regression tests.
10473
10474         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
10475 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
10476
10477         * mini.c: reinstated mono_compile_get_interface_var()
10478         on x86, too, since the change breaks the Gtk# build there as well.
10479
10480 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10481
10482         * driver.c: remove loop from the default optimizations: it seems to
10483         interact badly with some of the other options (see bug #60613).
10484
10485 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
10486
10487         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
10488         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
10489
10490 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
10491
10492         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
10493         vararg-using methods.
10494
10495 2004-06-21  Martin Baulig  <martin@ximian.com>
10496
10497         * mini/mini-exceptions.c
10498         (mono_handle_exception): Added `gpointer original_ip' argument.
10499         After calling mono_unhandled_exception(), call
10500         mono_debugger_unhandled_exception() and if that returns true,
10501         restore the context and return.
10502
10503 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10504
10505         * mini-ppc.c: prefer the use of relative branches so
10506         they won't need to be patched in aot code (patch from Patrick Beard).
10507
10508 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10509
10510         * aot.c: patch from Patrick Beard to make the output assembly
10511         more correct for the MacOSX assembler. Small tweak to
10512         generate sane images on Linux/PPC, too.
10513
10514 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10515
10516         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
10517         case until bug #59509 is fixed (shows up in #60332).
10518
10519 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10520
10521         * mini.c: make sure the needed wrappers are compiled, too, with
10522         precomp.
10523
10524 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
10525
10526         * driver.c: remove NPTL reference in --version output.
10527
10528 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10529
10530         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
10531         generate valid assembly for the Mach-O assembler.
10532
10533 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10534
10535         * driver.c: don't include abcrem in the all optimization specifier
10536         since it slows down jit compilation too much for now.
10537
10538 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
10539
10540         * mini.c: use BIGMUL only if both operands have the same signage.
10541         * iltests.il: Test for bug 60056. (errors related to signage in
10542         BIGMUL).
10543
10544         r=lupus.
10545
10546 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
10547
10548         * mini.c, aot.c: memory leak fixes.
10549
10550 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10551
10552         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
10553
10554 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
10555
10556         * Makefile.am: remove the -static hack completely, it links in
10557         statically glib as well.
10558
10559 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
10560
10561         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
10562         * exceptions.cs: make it compile with new mcs/csc.
10563
10564 2004-06-03 Massimiliano Mantione <massi@ximian.com>
10565         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
10566         and added relevant test case.
10567
10568 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10569
10570         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
10571         regressions in gtk-sharp.
10572
10573 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
10574
10575         * exceptions.cs: New regression tests.
10576
10577         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
10578
10579 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
10580
10581         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
10582
10583 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
10584
10585         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
10586
10587         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
10588
10589 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
10590
10591         * mini.c (mono_jit_runtime_invoke): Init class in this
10592         method instead of trusting mono_jit_compile_method to
10593         do the work (because wrappers can be in object class)
10594
10595 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
10596
10597         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
10598
10599         * basic-long.cs: New regression test.
10600
10601 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
10602
10603         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
10604         and div/rem checks.
10605
10606 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
10607
10608         * Makefile.am: fix miguel's change to build mono statically against
10609         libmono (track build dependencies).
10610
10611 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10612
10613         * cfold.c: Some glib versions do not have G_MININT32.
10614
10615 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
10616
10617         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
10618         with precision of tan, atan, sin and cos, and implemented related
10619         regressions tests (fixes bug 54467, but one new problem appeared and
10620         is not fixed yet).
10621
10622 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10623
10624         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
10625
10626         * exceptions.cs: Add test for constant folding && division by zero.
10627
10628         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
10629         since driver.c is in libmono too, so the optimization was useless.
10630
10631         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
10632         variable to driver.c so the compiler can emit more efficient code to
10633         access them.
10634
10635 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10636
10637         * Makefile.am: don't distribute generated inssel.[ch] files.
10638
10639 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
10640
10641         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
10642         into the default appdomain. Fixes #58707.
10643
10644         * jit-icalls.c: Remove the broken approximation for truncl, doing
10645         no conversion is better.
10646
10647         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
10648         Fixes #58863.
10649
10650 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
10651
10652         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
10653         of the mcrxr instruction which is not available on some processors
10654         even if it's documented to be. Implement add and sub overflow correctly
10655         (still not complete for long unsigned). Speed up icalls a bit.
10656
10657 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
10658
10659         * mini.c (mono_jit_compile_method_with_opt): Make sure that
10660         we run .cctor in the current domain instead of target_domain.
10661         
10662         Fixes bug #58558, .cctor not being called in -O=shared.
10663
10664 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10665
10666         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
10667
10668 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
10669
10670         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
10671         which can be done with an imm8, do it that way.
10672         (mono_arch_output_basic_block): ditto for a jmp
10673         (mono_arch_emit_prolog): Computate maximum offset of a label.
10674
10675 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
10676
10677         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
10678         now tries to allocate prefered physical reg's for virtual
10679         regs. This reduces the number of emited spills/loads with
10680         20-30% on our core assemblies.
10681
10682 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10683
10684         * jit-icalls.c: truncl() is not needed and trunc() is
10685         the correct thing to do anyway (bug #58287).
10686
10687 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
10688
10689         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
10690         if available.
10691
10692 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10693
10694         * driver.c: enable loop optimizations by default.
10695
10696 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10697
10698         * mini-x86.c: fix calc of max loop size when aligning loops start.
10699
10700 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
10701
10702         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
10703         the stack.
10704
10705 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
10706
10707         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
10708         should set carry.
10709
10710         * basic-long.cs: Add tests for add/subtract of immediates with carry.
10711
10712         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
10713         
10714         * mini.c (inline_method): Allways inline some wrappers even if the cost
10715         is too large. Fixes #58785.
10716
10717         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
10718         
10719 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
10720
10721         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
10722         (crichton@gimp.org). Beginning of support for sparc/linux.
10723
10724         * mini-sparc.c: Optimize retrieval of LMF address.
10725
10726 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
10727
10728         * exceptions-ppc.c:  handle alloca in methods with clauses.
10729
10730 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
10731
10732         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
10733
10734 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
10735
10736         * mini.c: Delegate most of the abort signal work to 
10737           mono_thread_request_interruption, which also handles Stop and Suspend
10738           states.
10739
10740 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
10741
10742         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
10743         supports the save/restore lmf opcodes.
10744
10745 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
10746
10747         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
10748         by gcc-3.4 as well.
10749
10750         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
10751
10752 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10753
10754         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
10755         methods which contain array accesses.
10756
10757         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
10758         boundaries. Fixes #58537.
10759
10760         * iltests.il: Add regression test for #58537.
10761
10762 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10763
10764         * mini-x86.c (mono_arch_local_regalloc): Last part of
10765         fix for bug #58633 (releasing register to early).
10766
10767 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
10768
10769         * basic-long.cs: Add new regression test.
10770
10771 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10772
10773         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
10774         register too early on the chain.
10775
10776 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10777
10778         * mini.c (create_helper_signature): Use a helper function to reduce
10779         the code which needs to be written. Also set the calling convention of
10780         icalls on windows. Fixes #57840.
10781
10782 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10783
10784         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
10785         exceptions-ppc.c: added helper function to get the instruction address
10786         from a signal handler context.
10787
10788 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10789
10790         * helpers.c: use g_get_tmp_dir. Invokes happyness 
10791         from gonzalo.
10792
10793 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10794
10795         * helpers.c: Add new env variable to pass args to objdump.
10796         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
10797
10798 2004-05-17  Radek Doulik  <rodo@ximian.com>
10799
10800         * Makefile.am (common_sources): added abcremoval.h so it get
10801         disted and daily mono packages on go-mono.com will build again
10802
10803 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
10804
10805         * abcremoval.c: Fixed coding style, added copyright header.
10806
10807         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
10808
10809         * mini.h: Added prototype for abc removal main function.
10810
10811         * build_relations_propagation_table.pl: Added copyright header.
10812
10813 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
10814
10815         * basic-long.cs: reg test for complex ceq_long bug.
10816
10817 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
10818
10819         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
10820         reg in long and clob case (bug #58343). Fixed/added comments.
10821
10822 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
10823
10824         * mini.c (mono_jit_runtime_invoke): Follow new convention
10825         of calling the invoke method with an function pointer.
10826
10827 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
10828
10829         * ChangeLog: Fix author of memory leak patch.
10830
10831 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
10832
10833         * Makefile.am: fix make dist as well...
10834
10835
10836 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
10837
10838         * cfold.c: Made so that conversions from pointer to int4 are no-ops
10839         on archs where pointers are 4 bytes long.
10840
10841         * Makefile.am: Added abcremoval.c source file.
10842
10843         * abcremoval.c: Added abcremoval.c.
10844
10845         * abcremoval.h: Added abcremoval.h.
10846
10847         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
10848
10849         * inssel.brg: Enabled bounds check removal.
10850
10851         * mini.c: Added support for abcrem optimization.
10852
10853         * mini.h: Added abcrem optimization label.
10854
10855         * driver.c: Added support for abcrem optimization.
10856
10857         * propagated_relations_table.def: Added propagated_relations_table.def.
10858
10859 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
10860
10861         * mini.c, cfold.c: fix style.
10862
10863 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10864
10865         * mini.c: handle issue with the low-level implementation of
10866         some long opcodes (bug #54209).
10867
10868 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
10869
10870         * basic.cs: test for my new cmov stuff.
10871
10872 2004-05-13      Patrik Torstensson
10873
10874         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
10875         opt and added peephole documentation.
10876
10877 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
10878
10879         * tramp-ppc.c: rewrote the generic trampoline code.
10880
10881 2004-05-11      Patrik Torstensson
10882
10883         * mini-x86.c: optimize long shl/shr asm code (one less branch)
10884
10885 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
10886
10887         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
10888
10889         * mini.h mini.c dominators.c: Applied patch from Derek Woo
10890         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
10891
10892         * mini.c: Add new icalls for AsAny marshalling.
10893
10894 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10895
10896         * tramp-ppc.c, mini-ppc.c: more cleanups.
10897
10898 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10899
10900         * mini.c: no warnings.
10901
10902 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10903
10904         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
10905
10906 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
10907
10908         * mini.c: In the thread abort signal handler, if the thread is in the
10909         process of being stoped, don't throw the Abort exception, just stop the
10910         thread.
10911
10912 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
10913
10914         * tramp-ppc.c: removed old code.
10915
10916 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10917
10918         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
10919         do some simple speed optimizations on ppc.
10920
10921 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10922
10923         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
10924         and large offsets in load/store.
10925
10926 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
10927
10928         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
10929         it causes regressions.
10930
10931 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
10932
10933         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
10934         support.
10935
10936 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10937
10938         * jit-icalls.c: remove warnings.
10939         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
10940         speedups for unsafe code.
10941
10942 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
10943
10944         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
10945
10946 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
10947
10948         * basic-calls.cs: Add new regression test.
10949
10950         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
10951         more portable.
10952
10953         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
10954
10955         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
10956         is no longer used.
10957
10958 2004-05-06      Patrik Torstensson
10959
10960         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
10961         long reg allocation in any reg (not only eax:edx) and implemented 
10962         long shl/shr ops in asm instead of helpers.
10963
10964 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
10965
10966         * mini-sparc.h: Fix warnings.
10967
10968         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
10969         stack.
10970
10971         * mini-exceptions.c (mono_handle_exception): Call the filter in a
10972         separate statement for clarity.
10973
10974         * mini-sparc.c: Update status.
10975
10976 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
10977
10978         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
10979         here.
10980
10981 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10982
10983         * inssel-ppc.brg: another small pre-release workaround:
10984         we don't do overflow detection for long_sub_un.
10985
10986 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10987
10988         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
10989         (also works around a weird ppc bug: 57957).
10990
10991 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
10992
10993         * tramp-ppc.c: trampoline fixes.
10994
10995 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
10996
10997         * mini-ppc.c: fixed typos.
10998
10999 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11000
11001         * mini-ppc.c, exceptions-ppc.c: more code saves registers
11002         at the top of the stack. Fixed typos. Use a frame registers
11003         for all the methods with exception clauses.
11004
11005 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11006
11007         * exceptions-ppc.c: restore fp registers.
11008
11009 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
11010
11011         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
11012         order from the stack top (moved the stack room to save the
11013         return value for trace after the param area). Fixed corruption
11014         in restoring registers on unwind.
11015
11016 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11017
11018         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
11019
11020 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11021
11022         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
11023         and prolog/epilog for methods that use it. Allow
11024         enough param area room for varargs methods. Fix miguel's
11025         breakage in exception handling.
11026
11027 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11028
11029         * Makefile.am: run genmdesc only on current arch.
11030
11031 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11032
11033         * exceptions-x86.c:
11034         * mini-x86.h: fix the build on windows.
11035
11036 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
11037
11038         * 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.
11039
11040         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
11041
11042         * mini-exceptions.c: New file.
11043         
11044         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
11045         Move some parts of the x86 exception handling code to an 
11046         arch-independent file so it can be shared with other ports.
11047
11048 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
11049
11050         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
11051
11052 2004-04-26  David Waite  <mass@akuma.org>
11053
11054         * driver.c: remove comma from end of enumeration declaration
11055
11056 2004-04-26  Jackson Harper  <jackson@ximian.com>
11057
11058         * driver.c: parse config file before loading first assembly. This
11059         allows the user gac to be enabled/disabled. 
11060         
11061 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
11062
11063         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
11064         simpler mechanism: we do not care what is encoded initially
11065         (branch absolute or relative), we care about the code and its
11066         target.  I kept the old code for reference for now.
11067
11068         The new code tries first to determine if the jump is anywhere in
11069         the -/+32 absolute meg range, if it succeeds, it encodes using the
11070         absolute branch;  If not, it tried to find something in the
11071         relative range, if not, it uses the handle_thunk code. 
11072
11073 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
11074
11075         * exceptions-ppc.c: use the correct ip register on macosx.
11076
11077 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
11078
11079         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
11080
11081 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
11082
11083         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
11084         Raise exception on integer divide by zero by hand since the hw
11085         doesn't support it. Handle NaNs in FP compares.
11086
11087 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
11088
11089         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
11090         code reducing duplication between the platforms and enabled
11091         signal exception handling (on linux for now).
11092
11093 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
11094
11095         * exceptions-ppc.c: more macosx support.
11096
11097 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11098
11099         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
11100
11101 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
11102
11103         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
11104
11105 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11106
11107         * iltests.il: more tests.
11108
11109 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11110
11111         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
11112         vars as well.
11113
11114 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11115
11116         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
11117
11118 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11119
11120         * liveness.c: Mark variables as volatile in all basic blocks reachable
11121         from exception clauses.
11122
11123 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
11124
11125         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
11126         inlining.
11127
11128 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11129
11130         * iltests.il, basic.cs: more tests for regalloc.
11131
11132 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11133
11134         * iltests.il: Some tests for register allocation modifications
11135         I have locally.
11136
11137 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
11138
11139         * exceptions.cs: Add regression test for bug #56782.
11140
11141         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
11142         original stack trace if an exception is rethrown. Fixes #56782. Oh,
11143         the beauty of fixing the same thing in 5 different files...
11144
11145 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
11146
11147         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
11148         methods.
11149
11150 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
11151
11152         * mini.c: Add support for STRWLPARRAY marshalling convention.
11153
11154 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11155
11156         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
11157         to init the context to setup the regs pointer).
11158
11159 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11160
11161         * exceptions-ppc.c: more exceptions work.
11162
11163 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11164
11165         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
11166         not allowed.
11167
11168 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11169
11170         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
11171         can use the memory directly.
11172
11173         * cpu-pentium.md: Update documentation from a post from Zoltan. 
11174
11175         add x86_add_membase, x86_sub_membase, x86_mul_membase
11176
11177 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11178
11179         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
11180         GENERAL_REGS they were also hardcoded for all PPC ports.
11181
11182         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
11183
11184         Remove hard-coded limit for floating point registers, use
11185         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
11186
11187         Notice that in MacOS X calling conventions you can fit a lot more
11188         floating point values in registers, so I should update the PInvoke
11189         test to excercise the passing of floating point values on the
11190         stack (currently broken).
11191         
11192 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
11193
11194         * tramp-ppc.c (create_trampoline_code): Added
11195         JUMP_TRAMPOLINE_SIZE. 
11196         (ppc_magic_trampoline): Follow the pattern from
11197         x86_magic_trampoline: if code is set to zero, return. 
11198         (create_trampoline_code): Always pass MonoMethod to the jump
11199         trampoline, before it was passing a null.
11200         (mono_arch_create_jump_trampoline): Implement the jump stub, could
11201         share the code with mono_arch_create_jit_trampoline. 
11202
11203         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
11204         implemented.
11205         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
11206         implemented.  
11207
11208         * cpu-g4.md: Added length for jmp instruction, the worst case
11209         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
11210         for save_lmf).
11211
11212 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
11213
11214         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
11215
11216 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
11217
11218         * mini.c: Only set bblock->real_offset when adding a new bblock, and
11219         before each IL instruction.
11220
11221         * mini.c (CEE_BOX): Fix warnings.
11222
11223 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11224
11225         * mini.c: removed a few unused vars and extra whitespace.
11226
11227 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
11228
11229         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
11230         checks.
11231         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
11232         index.
11233         (OP_GETCHR): use the above
11234         (CEE_LDELEMA): use the above.
11235
11236         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
11237         version of the generic impl.
11238         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
11239         (CEE_LDELEMA): use the above.
11240
11241 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11242
11243         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
11244         Fixes #56317.
11245
11246         * iltests.il: Added new regression test for #56317.
11247
11248 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11249
11250         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
11251         under NetBSD. Fixes #56450.
11252
11253         * liveness.c (update_gen_kill_set): Fix previous patch.
11254
11255 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11256
11257         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
11258
11259 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
11260
11261         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
11262         ldsfld and ldsflda.
11263
11264         * inssel-sparc.brg: Add more optimizations.
11265
11266         * mini-sparc.c: Replace multiply/divide with shifts if possible.
11267
11268 2004-04-01  Martin Baulig  <martin@ximian.com>
11269
11270         * mini.c (handle_box): New static function; moved the
11271         implementation of CEE_BOX here.
11272         (mono_method_to_ir): Added `constrained_call' variable.
11273         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
11274         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
11275         mono_method_get_constrained() to get the method.
11276
11277 2004-04-01  Martin Baulig  <martin@ximian.com>
11278
11279         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
11280         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
11281         (mono_method_to_ir): We don't need these macros anymore since
11282         mono_class_get_full() already takes care of it. 
11283
11284 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11285
11286         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
11287         use @function (as doesn't accept #function here) and check the return
11288         value of system and stop if fails.
11289
11290 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11291
11292         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
11293
11294 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
11295
11296         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
11297
11298         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
11299
11300         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
11301         #56223.
11302
11303         * basic-long.cs: Add test for negation of Int64.MinValue.
11304
11305 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
11306
11307         * mini-sparc.c: Update status.
11308
11309         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
11310
11311         * exceptions-sparc.c: Fix return value in filters.
11312
11313         * inssel-sparc.brg: Fix register allocation in some rules.
11314
11315 2004-03-28  Martin Baulig  <martin@ximian.com>
11316
11317         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
11318         if neccessary.  
11319
11320 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
11321
11322         * mini-x86.c (mono_arch_patch_code): Fix warnings.
11323         
11324         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
11325         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
11326         remove unused conv_u4 opcode.
11327
11328         * mini-x86.c: Remove valgrind workaround since it slows down things
11329         even when mono is not run under valgrind.
11330
11331 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
11332
11333         * mini-sparc.c: Update status.
11334
11335         * inssel-sparc.brg: Add some optimizations.
11336
11337         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
11338         future delay slot filling. Add support for varargs, tail calls and JMP.
11339
11340         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
11341         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
11342
11343         * inssel.brg: Fix register allocation in OP_ARGLIST.
11344
11345         * inssel.brg: Fix warnings.
11346
11347 2004-03-25  Martin Baulig  <martin@ximian.com>
11348
11349         * mini.c (inflate_generic_field): Removed.
11350         (mini_get_method): Removed, use mono_get_method_full(),
11351         (mini_get_class): Removed, use mono_class_get_full().
11352         (mono_method_to_ir): Pass our generic context to
11353         mono_field_from_token().        
11354
11355 2004-03-25  Martin Baulig  <martin@ximian.com>
11356
11357         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
11358         of a `MonoMethod *'.
11359         (mini_get_method): Take a `MonoGenericContext *' instead
11360         of a `MonoMethod *'.
11361         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
11362         a new local variable called `generic_context' which holds the
11363         current `MonoGenericContext *'; use it to lookup things.
11364
11365 2004-03-24  Martin Baulig  <martin@ximian.com>
11366
11367         * mini.c (mini_get_class): New static method; if we're inside a
11368         generic instance, inflate the class if neccessary.
11369         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
11370
11371 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
11372
11373         * iltests.il: New regression test for #55976.
11374
11375         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
11376         #55976.
11377
11378 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11379
11380         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
11381         output.
11382
11383 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11384
11385         * liveness.c: Consider SSA stores as well as loads when making vars
11386         volatile.
11387
11388         * exceptions.cs: New regression tests for register allocation.
11389         
11390 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
11391
11392         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
11393         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
11394           domain lock only to protect puntual access to data structures.
11395           Added access lock for sighash, jit_icall_hash_name, 
11396           jit_icall_hash_addr and domain->code_mp.
11397
11398 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
11399
11400         * driver.c: Print SIGSEGV handling method.
11401
11402         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
11403
11404         * mini.c (setup_jit_tls_data): Handle case when this is called
11405         multiple times for a thread.
11406
11407         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
11408         is different from fbxx_un. Fixes #54303. Also use constants instead of
11409         magic numbers in a lot of places.
11410
11411 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
11412
11413         * exceptions.cs: Fix cctor test when --regression is used.
11414
11415 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
11416
11417         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
11418         for Linux/ppc.
11419
11420 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11421
11422         * inssel-ppc.brg: fixed register assignments for some rules.
11423
11424 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11425
11426         * exceptions.cs: Add test for exceptions in static constructors.
11427
11428         * mini.c (mono_jit_compile_method_with_out): Move the calling of
11429         static constructors outside the domain lock. Fixes #55720.
11430
11431 2004-03-17  Martin Baulig  <martin@ximian.com>
11432
11433         * mini.c (get_generic_field_inst): Removed, this'll never happen.
11434         (inflate_generic_field): Take the `MonoMethod *' instead of the
11435         `MonoClass *' and added support for generic method.
11436         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
11437         have a `field->parent->gen_params', only inflate the field if it's
11438         an open constructed type.
11439
11440 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11441
11442         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
11443         exception object instead of the preconstructed ones.
11444
11445 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11446
11447         * mini.c: reverted changed to sigsegv_signal_handler commited
11448         accidentally in the previous patch.
11449
11450 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11451
11452         * mini.c:
11453         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
11454         running --aot with an old assembly.
11455
11456 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
11457
11458         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
11459         point values.
11460
11461         * mini-sparc.c: Add support for v9 branches with prediction.
11462
11463 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
11464
11465         * mini.c (mini_init): #warning is GNUC only
11466
11467         * mini-sparc.h: implement __builtin_frame_address
11468         and __builtin_return_address for Sun C compiler
11469
11470 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
11471
11472         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
11473
11474 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
11475
11476         * basic-calls.cs: Add test for unaligned byref long argument passing.
11477
11478         * mini-ops.h: Add sparcv9 compare and branch instructions.
11479
11480         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
11481         v9 instructions if we have a v9 cpu.
11482
11483         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
11484         registers for global allocation.
11485
11486         * exceptions-sparc.c: Fixes.
11487         
11488 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
11489
11490         * liveness.c (mono_analyze_liveness): Optimized version.
11491
11492         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
11493
11494         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
11495         sparc work.
11496
11497         * basic-float.cs basic-calls.cs: New regression tests.
11498
11499 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
11500
11501         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
11502         sigaltstack implementation.
11503
11504         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
11505         
11506         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
11507         stuff if SIGSEGV_ON_ALTSTACK is not defined.
11508
11509 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
11510
11511         * mini.c: Fix warnings.
11512         
11513         * mini.c (mono_resolve_patch_target): New function which contains the
11514         arch independent part of the patching process.
11515
11516         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
11517         patching code to a separate function.
11518
11519 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
11520
11521         * mini.c (add_signal_handler): ifdef out on Windows
11522
11523 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
11524
11525         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
11526         cpu-sparc.md: Add exception handling support + other fixes.
11527
11528         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
11529         typed GC detection in --version.
11530
11531         * basic.cs exceptions.cs: New regression tests.
11532
11533         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
11534         the arch specific code can store data during a compilation.
11535
11536         * mini-ops.h: Add OP_SETFRET.
11537
11538         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
11539         function, register a separate icall for each arity, so the icalls can
11540         get a wrapper.
11541         
11542         * mini.c (mono_print_tree): Print negative offsets in a more readable
11543         form.
11544         
11545         * mini.c: Make signal handling work on sparc.
11546         
11547         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
11548
11549         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
11550
11551         * jit-icalls.c: Emulate truncl by aintl on solaris.
11552
11553         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
11554
11555 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
11556
11557         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
11558
11559 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
11560
11561         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
11562         a MarshalByRef type, inline a method that performs the check, taking into
11563         account that the object can be a proxy. Also implemented tow new opcodes:
11564         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11565         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
11566         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11567
11568 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11569
11570         * mini-ppc.c: if a relative branch displacement is too big
11571         but it points to and area reachable with an absolute branch, 
11572         avoid the thunks.
11573
11574 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11575
11576         * mini.c: optimize small copies in cpblk.
11577
11578 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
11579
11580         * basic-calls.cs basic-float.cs: New regression tests.
11581
11582         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
11583         negative offsets from %fp. Implement localloc. Fix local register 
11584         allocation. Fix the case when the this argument needs to be saved to
11585         the stack. Implement some missing opcodes.
11586
11587 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
11588
11589         * mini.c (mini_method_compile): Reenable global regalloc in methods
11590         with exception handlers.
11591
11592         * linear-scan.c (mono_varlist_sort): Fix warning.
11593
11594         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
11595
11596         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
11597         regalloc costs.
11598
11599         * liveness.c: Make all variables uses in exception clauses volatile, to
11600         prevent them from being allocated to registers. Fixes #42136.
11601
11602 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
11603
11604         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
11605         causes regressions.
11606
11607         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
11608         argument to mono_arch_regalloc_cost.
11609
11610         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
11611         precisely.
11612
11613 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
11614
11615         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
11616         Make the cost of allocating a variable to a register arch dependent.
11617
11618         * basic-calls.cs: Fix compilation of tests.
11619         
11620         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
11621         helper function to cut back on the number of #ifdefs needed.
11622
11623         * mini-ppc.c: Fix compilation.
11624
11625         * basic-calls.cs: New regression tests.
11626
11627         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
11628
11629         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
11630         of l0 since that is callee saved.
11631
11632         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
11633         to virtual calls.
11634
11635         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
11636         of delay instruction.
11637
11638         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
11639
11640         * mini.h (MonoCallInst): Add 'virtual' flag.
11641
11642         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
11643
11644 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
11645
11646         * *.cs: New regression tests.
11647
11648         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
11649         work.
11650
11651         * mini.c (mono_runtime_install_handlers): Fix build.
11652
11653         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
11654         'signal_stack_size' members.
11655
11656         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
11657         alternate signal stack.
11658
11659         * exceptions-x86.c: Add stack overflow handling.
11660
11661         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
11662         functions to arch independent code.
11663
11664         * mini.c (mono_print_tree): Print more detailed info for load_membase
11665         opcodes.
11666         
11667 2004-02-23  Martin Baulig  <martin@ximian.com>
11668
11669         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
11670
11671 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11672
11673         * mini-x86.c: fixed reg allocation for div/rem.
11674
11675 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
11676
11677         * driver.c (mono_main): Report some configuratio options on --version.
11678
11679 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
11680
11681         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
11682         low in the address space. Correctly flush memory in thunks where we
11683         output native code.
11684
11685 2004-02-20  Martin Baulig  <martin@ximian.com>
11686
11687         * mini.c (mini_get_method): New static method; inflate all generic
11688         methods and methods in open generic instances.
11689         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
11690         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
11691
11692 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11693
11694         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
11695
11696         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
11697
11698 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
11699
11700         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
11701
11702         * mini-sparc.c (flushi mono_arch_output_basic_block): make
11703         it compile using Sun's compiler.
11704
11705 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11706
11707         * 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.
11708
11709         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
11710
11711 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11712
11713         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
11714         code.
11715         * mini-ppc.c: handle calls outside of the allowed range with thunks
11716         allocated using the code manager.
11717         * tramp-ppc.c: use the code manager to hold generated native code.
11718         Fixed the magic trampoline to just patch vtable entries.
11719
11720 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
11721
11722         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
11723         independent file.
11724
11725 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
11726
11727         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
11728         PPC.
11729
11730         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
11731         if we have a working __thread implementation.
11732
11733         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
11734         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
11735
11736 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
11737
11738         * mini-x86.c: Fix compilation under gcc 2.
11739         
11740 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
11741
11742         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
11743         contains a call to the wrapped function.
11744
11745         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
11746         OP_<CALL>_IMM opcodes, and use them under X86.
11747         
11748         * mini.c (mono_jit_find_compiled_method): Fix warning.
11749
11750         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
11751
11752         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
11753
11754         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
11755         functionality to mini.c.
11756
11757         * mini.c (mono_create_jump_trampoline): New function to create a jump
11758         trampoline. Return a compiled method instead of a trampoline if it
11759         exists. Add a cache for jump trampolines.
11760
11761         * mini.c (mono_jit_find_compiled_method): New function to return a
11762         compiled method if it exists.
11763
11764         * mini-x86.c: Call mono_create_jump_trampoline instead of 
11765         mono_arch_create_jit_trampoline.
11766
11767         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
11768         a jump trampoline. Fixes #52092.
11769         
11770 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
11771
11772         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
11773         which is not up-to-date. Add check_corlib_version () instead.
11774
11775         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
11776         have to call it.
11777         
11778         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
11779         since newer valgrind versions do not need it.
11780
11781         * mini.c (mono_jit_compile_method_with_opt): New helper function to
11782         compile a method with a given set of optimizations.
11783
11784         * mini.c: Compile icall wrappers on-demand instead of at startup.
11785
11786         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
11787         wrapper for an icall.
11788
11789 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
11790
11791         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
11792         #54063.
11793
11794         * iltests.il: Add test for non-empty stack before switch instruction.
11795
11796 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
11797
11798         * mini.c: Add support for new stringbuilder marshalling conventions.
11799
11800         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
11801
11802 2004-02-01  Martin Baulig  <martin@ximian.com>
11803
11804         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
11805         in `ginst->mtype_argv'.
11806
11807 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
11808
11809         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
11810         facilitate grepping.
11811
11812 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
11813
11814         * mini.c: fixed buglet in initobj generic implementation for references.
11815
11816 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
11817
11818         * Makefile.am: make the version script conditional.
11819         * jit-icalls.c: handle missing truncl().
11820
11821 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
11822
11823         * exceptions.cs: Add more tests for double->int conversion.
11824
11825         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
11826         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
11827
11828 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
11829
11830         * driver.c: make --verbose --version emit an error
11831         if the loaded corlib doesn't match the runtime version.
11832
11833 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
11834
11835         * mini-ppc.h: export ppc_patch().
11836         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
11837         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
11838         on par or better than on MacOSX.
11839
11840 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
11841
11842         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
11843         mono_lookup_pinvoke_call.
11844
11845         * mini-x86.c: Under windows, the default pinvoke calling convention is
11846         stdcall. Fixes #52834.
11847
11848         * mini.c (optimize_branches): Add an upper bound to the number of
11849         iterations to prevent infinite loops on strange loops. Fixes #53003.
11850
11851 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11852
11853         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
11854         and ISINST. Fixes #52093.
11855
11856         * objects.cs (test_0_vector_array_cast): New tests.
11857         
11858 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
11859
11860         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
11861         checking in Array.Set ().
11862
11863         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
11864         #52590.
11865
11866         * object.cs (test_0_multi_array_cast): New regression test.
11867
11868 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
11869
11870         * exceptions-ppc.c: fix build on Linux/PPC.
11871
11872 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
11873
11874         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
11875         running under valgrind.
11876         (x86_magic_trampoline): Fix build bustage.
11877
11878         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
11879         negative values as well. This is needed for the encoding of the line number
11880         info, since sometimes the line numbers are not in increasing order.
11881
11882 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
11883
11884         * cpu-pentium.md (localloc): Increase the size of the localloc 
11885         instruction since it is a loop under Win32.
11886
11887         * debug-mini.c (record_line_number): Get rid of unneccesary memory
11888         allocation.
11889
11890 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
11891
11892         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
11893         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
11894         Max Horn (max@quendi.de). Fix file names in comments.
11895
11896 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
11897
11898         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
11899         avoid stack overflow.
11900         (replace_usage): Avoid uninitialized variable warnings.
11901
11902         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
11903         and taking the address of valuetype variables.
11904
11905 2004-01-03  Patrik Torstensson
11906
11907         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
11908         for other purposes than FP later on.
11909
11910 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
11911
11912         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
11913         of tail calls.
11914
11915 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11916
11917         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
11918
11919 2003-12-30  Patrik Torstensson <p@rxc.se>
11920
11921         * mini-x86.h: Decreased number of availiable fp regs.
11922         Solves corner cases with FP spilling.
11923
11924 2003-12-23  Patrik Torstensson <p@rxc.se>
11925
11926         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
11927         for floating point stack tracking / spilling on x86. 
11928         Fixes bug #49012.
11929         
11930         * basic-float.cs: added float mul overflow test.
11931
11932 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
11933
11934         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
11935
11936 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11937
11938         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
11939         supports for cond branches that overflow the immediate
11940         overflow offset. mcs can compile simple programs.
11941
11942 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11943
11944         * exceptions-ppc.c: exception handling support wip:
11945         finally handlers get run on exception.
11946
11947 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
11948
11949         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
11950         profiling.
11951
11952 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
11953
11954         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
11955         initial support for stack walking and unwinding.
11956
11957 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
11958
11959         * driver.c (mono_main): Make corlib-out-of-sync message more 
11960         descriptive. Also remove verify_corlib call.
11961
11962 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
11963
11964         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
11965         not overlap with other call's arguments, too.
11966
11967 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
11968
11969         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
11970         move to arch-specific code the choice of arch-specific
11971         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
11972         * mini.c: ensure emulation calls will not interleave
11973         with other calls.
11974
11975 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
11976
11977         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
11978         the magic trampoline stack frame is dropped before executing
11979         the new method.
11980
11981 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11982
11983         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
11984         and integer to fp conversions. Added support for overflowing
11985         arguments on the stack. Reserve a couple more registers as temps.
11986         Added support for aot compilation (as output still needs to be
11987         tweaked, though).
11988
11989 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
11990
11991         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
11992         Don't overwrite return register in some corner cases.
11993
11994 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
11995
11996         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
11997         static constructors when AOT compiling.
11998
11999         * driver.c (mono_main): Call mono_check_corlib_version.
12000
12001 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12002
12003         * cpu-g4.md, basic.cs: fixed div target register.
12004
12005 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
12006
12007         * mini-ppc.c, basic.cs: shl_imm fix with test.
12008
12009 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12010
12011         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
12012         structures by value. Misc fixes.
12013         * objects.cs: more tests.
12014
12015 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
12016
12017         * mini-ppc.c: lconv.ovf.i implemented.
12018
12019 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12020
12021         * mini.c:
12022         (mini_init): don't error out if someone already called g_thread_init.
12023
12024 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12025
12026         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
12027         to be any type per the spec. Fix abnormal memory usage when
12028         the same object is repeatedly thrown.
12029
12030 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
12031
12032         * mini.c: check for overruns in IL code.
12033
12034 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
12035
12036         * TODO: Add/remove some todo entries.
12037
12038 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
12039
12040         * driver.c (mono_main): Call mono_verify_corlib.
12041
12042 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
12043
12044         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
12045         This has been moved to mini.c
12046         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
12047         type being casted is marshalbyref it could be a proxy, so instead of
12048         emitting the type check code, emit a call to a runtime method that will
12049         perform the check by calling CanCastTo if needed.
12050
12051 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
12052
12053         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
12054         methods with large stack frames under Win32.
12055
12056 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
12057
12058         * Makefile.am: Distribute regression tests.
12059
12060         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
12061         at the end instead of inserting each variable into the sorted list.
12062
12063         * linear-scan.c (mono_varlist_sort): New helper function.
12064         
12065 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12066
12067         * mini.c: ensure arguments and locals are within bounds.
12068
12069 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12070
12071         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
12072         related fixes.
12073
12074 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12075
12076         * mini.c (mono_cprop_copy_values): Fix crash.
12077
12078         * aot.c: Set verbosity back to 0.
12079         
12080 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12081
12082         * regalloc.c: complete memory leak fix by Laurent Morichetti
12083         (l_m@pacbell.net).
12084
12085 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12086
12087         * driver.c (main_thread_handler): Revert the previous patch.
12088
12089         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
12090         under valgrind.
12091
12092         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
12093         memory from the memory pool.
12094
12095         * driver.c (main_thread_handler): Turn on all optimizations when
12096         --aot is used.
12097
12098         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
12099         an array for better performance.
12100
12101         * regalloc.c (mono_regstate_assign): Fix memory leak.
12102
12103         * debug-mini.c (mono_debug_serialize_debug_info): New function to
12104         serialize the debug info.
12105
12106         * debug-mini.c (mono_debug_add_aot_method): New function to load the
12107         debug info from the serialized representation.
12108
12109         * aot.c: Save debug info into the generated file and load it when 
12110         loading a method.
12111
12112         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12113
12114 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12115
12116         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
12117         More FP-related fixes.
12118
12119 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
12120
12121         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
12122         and register allocation buglet. Hello world now runs.
12123
12124 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12125
12126         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
12127         * tramp-ppc.c: fixed class init trampoline.
12128         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
12129
12130 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12131
12132         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
12133         mini.c: more ppc changes/fixes.
12134
12135 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12136
12137         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
12138         Also optimize the case when the arguments are the same in the caller 
12139         and in the callee.
12140
12141         * iltests.il: Add tests for tail calls with valuetype arguments.
12142
12143 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12144
12145         * mini-ppc.c: fixes for struct return type.
12146
12147 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
12148
12149         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
12150         mono_spillvar_offset() to arch-specific code.
12151
12152 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
12153
12154         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
12155
12156 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12157
12158         * exceptions-x86.c: Fix stack space leaks.
12159         
12160         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
12161         registers from the lmf if the method has save_lmf set.
12162
12163 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
12164
12165         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
12166         of icall wrappers into InvokeInDomain, since these are now per-domain.
12167
12168 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
12169
12170         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
12171         make some opcode emulation and intrinsic ops enabled/disabled 
12172         according to the architecture. More fixes.
12173
12174 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12175
12176         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
12177
12178 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12179
12180         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
12181         arch-specific handling for 'this' and struct return type to
12182         arch-specific code.
12183
12184 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12185
12186         * aot.c: prevent divide by zero error when reporting (it happened with
12187         Accessibility.dll).
12188
12189 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
12190
12191         * mini.h (inst_switch): Remove unused macro.
12192
12193 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12194
12195         * aot.c:
12196         (load_aot_module): free 'info->methods' and 'info' properly. No more
12197         "free(): invalid pointer blah" messages when you have an old aot
12198         compiled assembly.
12199
12200 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
12201
12202         * jit-icalls.c, mini.c: Added support for context static fields.
12203
12204 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12205
12206         * mini.c (mono_method_blittable): Methods which set LastError are not 
12207         blittable either. Fixes #51108.
12208         
12209 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12210
12211         * mini.c: flush icache.
12212         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
12213
12214 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12215
12216         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
12217
12218 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
12219
12220         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
12221         safe on IA32.
12222
12223         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
12224         vararg calls.
12225
12226         * inssel.brg (CEE_MKREFANY): Fix AOT case.
12227
12228 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
12229
12230         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
12231         instruction when the result is discarded.
12232
12233         * iltests.il (test_0_div_regalloc): New regression test.
12234
12235         * arrays.cs: Fix compilation error.
12236
12237 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
12238
12239         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
12240         float rules to inssel-x86.brg: sane architectures with FP registers
12241         don't need to implement these rules.
12242
12243 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12244
12245         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
12246
12247 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12248
12249         * mini.h, inssel-long32.brg: fixed endianess issues in int64
12250         implementation of 32 bit systems.
12251
12252 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12253
12254         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
12255         (Jeroen Zwartepoorte).
12256
12257 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12258
12259         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
12260         the caller and the callee matches.
12261         
12262         * mini.c (mono_method_to_ir): Add comment.
12263
12264         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
12265         signbit is missing on some platforms.
12266
12267 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
12268
12269         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
12270
12271         * mini.c (setup_jit_tls_data): Call the new function.
12272         
12273         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
12274
12275         * mini-x86.c: Add experimental support for fast access to the lmf
12276         structure under NPTL/Linux 2.6.x.
12277
12278 2003-11-06  Martin Baulig  <martin@ximian.com>
12279
12280         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
12281         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
12282         the debugger.
12283
12284 2003-11-02  Martin Baulig  <martin@ximian.com>
12285
12286         * mini.c (inflate_generic_field): New static method.
12287         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
12288         generic instance and the field is declared in a generic type, call
12289         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
12290
12291 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
12292
12293         * mini.h mini.c (mono_method_same_domain): New function to return
12294         whenever the caller and the callee are in the same domain.
12295
12296         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
12297
12298 2003-10-30  Martin Baulig  <martin@ximian.com>
12299
12300         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
12301         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
12302         method parameters.
12303         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
12304         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
12305
12306 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
12307
12308         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
12309         propagation.
12310
12311         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
12312         object here, so it is in the correct appdomain etc.
12313
12314 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
12315
12316         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
12317         already done.
12318         (mono_method_to_ir): Avoid freeing the type created returned from
12319         mono_type_create_from_typespec, since it is put into an internal cache
12320         by the function. Fixes pointer.exe.
12321
12322         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
12323         trampolines for icalls and pinvokes as well. Fixes #33569.
12324
12325 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
12326
12327         * mini.c: Update after appdomain changes.
12328
12329         * mini.c (mono_jit_compile_method_inner): Allways compile native
12330         method wrappers in the root domain, since there can only be one
12331         instance of them, whose address is stored in method->info.
12332
12333 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12334
12335         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
12336         environment variable. Instead detect automatically whenever running
12337         under valgrind using the magic macro RUNNING_ON_VALGRIND from
12338         valgrind.h.
12339
12340 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
12341
12342         * trace.c, trace.h: New files that implement the new trace option
12343         parsing. 
12344
12345         * driver.c: Document new --trace options.
12346
12347         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
12348         mini-x86.c: Apply:
12349
12350         -       if (mono_jit_trace_calls)
12351         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
12352
12353         * mini.h: prototypes.
12354         
12355 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12356
12357         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
12358
12359         * mini.c inssel.brg: Implement typedefbyref opcodes.
12360
12361         * mini.c (mono_jit_compile_method): Remove unused local variable.
12362
12363         * mini.c (mono_jit_compile_method_inner): Ditto.
12364         
12365 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
12366
12367         * tramp-x86.c (x86_class_init_trampoline): Fix build.
12368         
12369         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
12370
12371 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12372
12373         * mini.c (mono_no_aot): Remove unused global variable.
12374
12375         * mini.c: Thread safety fixes.
12376
12377 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12378
12379         * mini.c (mono_create_class_init_trampoline): Add a lock around
12380         class_init_hash_addr.
12381
12382         * arrays.cs (test_0_newarr_emulation): Add new regression test for
12383         #30073.
12384
12385         * mini.c: Decompose the NEWARR instruction before decomposing its
12386         arguments. Fixes #30073.
12387
12388 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
12389
12390         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
12391         convention.
12392
12393 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
12394
12395         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
12396
12397         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
12398
12399         * driver.c: Add support for compiling icall wrappers to --compile.
12400
12401 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
12402
12403         * inssel.brg: The empty value in class->interface_offsets is -1, not
12404         0. Fixes #49287.
12405
12406 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
12407
12408         * objects.cs: New test for 'is' operator on an array of interfaces.
12409
12410 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12411
12412         * tramp-ppc.c: update trampoline code to support jumps
12413         and class initialization.
12414
12415 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
12416
12417         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
12418
12419         * inssel.brg (OP_UNBOXCAST): Fix #46027.
12420
12421         * inssel.brg (OP_UNBOX): Remove unused rule.
12422
12423         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
12424         region instead of one for each method. Fixes #47813.
12425
12426 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
12427
12428         * exceptions.cs (test_0_nested_finally): New regression test for
12429         nested exception handlers.
12430
12431         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
12432
12433         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
12434
12435         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
12436         inlining.
12437
12438         * mini.c (mono_method_check_inlining): Make the inlining limit 
12439         configurable by an environment variable.
12440         
12441         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
12442
12443         * mini.h: Bump AOT file version.
12444
12445         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
12446         token, store the image along with the token, since the token might not 
12447         refer to the same image as the method containing the relocation, 
12448         because of inlining.
12449
12450 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
12451
12452         * mini.c (mono_precompile_assemblies): New function to compile
12453         all methods in all loaded assemblies.
12454
12455         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
12456
12457         * regalloc.h regalloc.c (MonoRegState): Change the type of 
12458         iassign and fassign to int*, since they can contain large negative
12459         values if the register is spilled. Also added some comments. Fixes
12460         #45817.
12461
12462         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
12463         under Win32. Fixes #42964.
12464
12465 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
12466
12467         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
12468
12469         * aot.c: Added support for AOT compiling methods which contain calls
12470         to wrappers. Currently, only remoting-invoke-with-check wrappers are
12471         handled.
12472         
12473         * driver.c (compile_all_methods): Run the compilation in a thread
12474         managed by mono. Fixes #44023.
12475
12476         * mini.c (mono_codegen): Print full method name in verbose output.
12477
12478         * mini-x86.c (mono_arch_patch_code): Fix warning.
12479         
12480         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
12481         jumps, since the method we are jumping to might be domain-specific.
12482
12483         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
12484
12485 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12486
12487         * inssel.brg: string chars are unsigned.
12488
12489 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
12490
12491         * TODO: New todo item.
12492
12493         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
12494         which calls mono_runtime_class_init and patches the call site to
12495         avoid further calls.
12496         (mono_arch_create_class_init_trampoline): New arch specific function 
12497         to create a class init trampoline.
12498         (create_trampoline_code): Generalized so it can create
12499         class init trampolines as well.
12500
12501         * mini.c (helper_sig_class_init_trampoline): New helper variable.
12502         (mono_create_class_init_trampoline): New function to create and cache
12503         class init trampolines.
12504         (mono_find_class_init_trampoline_by_addr): New function to lookup the
12505         vtable given the address of a class init trampoline. Used by the
12506         patching process.
12507         (mono_codegen): Generate a call to a trampoline instead of
12508         mono_runtime_class_init in LDSFLD[A].
12509         (mono_codegen): Add relocations for the new trampoline.
12510         
12511         * mini.h mini-x86.c aot.c: Added a new relocation type: 
12512         MONO_PATCH_INFO_CLASS_INIT.
12513
12514         * mini.h: Bump AOT version number.
12515
12516         * aot.c: Create a copy of the loaded code instead of using the original
12517         so methods which call each other will be close in memory, improving
12518         cache behaviour.
12519         
12520         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
12521         patch since it breaks the regression tests.
12522         
12523         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
12524         for the register saving instruction sequence since the 
12525         frame_state_for function in glibc 2.3.2 don't seem to detect it.
12526
12527 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
12528
12529         * TODO: Fix todo item && remove another.
12530
12531 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
12532
12533         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
12534         previous checkin.
12535
12536         * aot.c: Moved the check for MONO_LASTAOT into the initialization
12537         function of the module.
12538
12539         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
12540         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
12541         --no-aot command line option.
12542
12543 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
12544
12545         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
12546         by Bernie Solomon (bernard@ugsolutions.com).
12547
12548         * inssel.brg: Refactor the interface offset table related code into
12549         its separate functions and add support for the AOT case.
12550
12551 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
12552
12553         * aot.c (mono_aot_get_method_inner): Fix memory leak.
12554         
12555         * aot.c: Added mono_aot_verbose variable and made all debugging
12556         output depend on the value of this variable.
12557
12558         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
12559         method_label and info_label.
12560
12561         * mini.h mini-x86.c aot.c: Added a new relocation type 
12562         MONO_PATCH_INFO_IID for klass->interface_id.
12563
12564         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
12565         the MonoJitInfo structure.
12566
12567         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
12568         a non-root appdomain in shared mode.
12569
12570 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
12571
12572         * aot.c: make aot loader less verbose. Remove free of unused variable.
12573
12574 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
12575
12576         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
12577
12578         * .cvsignore: Added *.dll.
12579
12580         * mini.c (mono_print_tree_nl): New function callable while debugging.
12581
12582         * mini.c (mono_print_code): Export this.
12583
12584         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
12585         patched code.
12586
12587 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
12588
12589         * mini.h (MonoCompile): Added 'jit_info' field.
12590
12591         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
12592         the cfg structure, since it is needed by the AOT compiler.
12593
12594         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12595
12596         * aot.c: A major rewrite. Changes include:
12597         - save exception tables for methods which have them.
12598         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
12599         to g_module_symbol.
12600         - reworked the file format so it is now much smaller and needs
12601         fewer relocation entries.
12602         
12603 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12604
12605         * aot.c (load_aot_module): Fix build bustage on platforms without
12606         Boehm GC.
12607
12608 2003-09-04  Martin Baulig  <martin@ximian.com>
12609
12610         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
12611
12612 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12613
12614         * TODO: Some new optimization ideas.
12615
12616         * aot.c: Move AOT module loading logic here from mono_assembly_open.
12617
12618         * aot.c: Save the optimization flags used to compile the code into
12619         the AOT module.
12620
12621         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
12622         support emitting domain specific code.
12623         
12624         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
12625         no longer domain neutral. It can be made domain neutral by compiling 
12626         with --optimize=shared.
12627
12628         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
12629         between appdomains.
12630
12631         * driver.c mini.h mini.c: New --no-aot debugging option which disables
12632         loading of AOT code.
12633
12634         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
12635         
12636         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
12637         if there is no domain neutrality information.
12638
12639 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
12640
12641         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
12642         format version into the generated library.
12643
12644         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
12645         callee method into the caller since one of them could be shared.
12646
12647         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
12648         system exceptions from AOT code now works.
12649
12650         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
12651         method if it is domain neutral and the callee is not.
12652
12653         * graph.c (cfg_emit_one_loop_level): Fix warning.
12654
12655 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
12656
12657         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
12658         last checkin.
12659
12660 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
12661
12662         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
12663         is needed  by code which is executed before mono_runtime_init ().
12664         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
12665         
12666         * mini.c (mono_thread_abort): Fix warning.
12667         (mono_jit_compile_method): Call static constructor in the AOT case too.
12668
12669         * aot.c (mono_compile_assembly): Fix warning.
12670
12671 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12672
12673         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
12674
12675 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
12676
12677         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
12678
12679         * cpu-pentium.md: Fix the length of call opcodes so they include the
12680         ESP restoring instruction. Fixes #47968.
12681
12682 2003-08-28  Martin Baulig  <martin@ximian.com>
12683
12684         * mini-x86.c (mono_arch_call_opcode): Added support for
12685         MONO_TYPE_GENERICINST.
12686
12687         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
12688
12689 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
12690
12691         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
12692         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
12693
12694         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
12695         metadata_section.
12696
12697 2003-08-26  Martin Baulig  <martin@ximian.com>
12698
12699         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
12700         when reporting an error, set this to the actual error location.
12701         (mono_method_to_ir): Report the correct error location if
12702         get_basic_blocks() returned an error.
12703
12704 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
12705
12706         * mini.c (mono_type_blittable): OBJECT is not blittable.
12707         (mono_method_blittable): Methods which have marshalling descriptors
12708         are not blittable either. Fixes #47842.
12709
12710 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
12711
12712         * driver.c mini.c: Use an environment variable instead of a global 
12713         variable. Also fix the build.
12714
12715         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
12716         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
12717         reporting this. 
12718
12719         * driver.c mini.c: Added --with-valgrind option to turn off some
12720         code which prevents mono from running under valgrind.
12721
12722         * mini.c (mono_emit_call_args): Fixed warning.
12723
12724         * mini.c (mono_emulate_opcode): Fixed warning.
12725
12726 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12727
12728         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
12729         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
12730         regalloc.c, regalloc.h: specify available registers in arch-specific
12731         code and support floats in the regallocator (patch by Laurent Morichetti 
12732         <l_m@pacbell.net>)
12733
12734 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
12735
12736         * mini.c: mono_thread_current() can be called only after
12737         mono_runtime_init(): rearrange code to not call it early on.
12738
12739 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12740
12741         * mini.c: allocate jump tables in the code mempools.
12742
12743 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12744
12745         * mini.c, mini.h: make sure per-thread data allocated by the jit is
12746         freed.
12747
12748 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
12749
12750         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
12751         12 to 16.  This fixes bug #47453.
12752
12753
12754 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12755
12756         * mini-ppc.c: fixed indexed load and unsigned compares.
12757
12758 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
12759
12760         * mini.c: reenabled installation of handler for
12761           thread abort signal.
12762
12763 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12764
12765         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
12766         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
12767         until it's fixed and actually useful.
12768
12769 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
12770
12771         * inssel-long32.brg: couple more opcodes implemented.
12772
12773 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
12774         
12775         * mini-sparc.c: Even more opcodes implemeted.
12776
12777 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
12778
12779         * mini-sparc.c: More opcodes implemented.
12780
12781 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
12782
12783         * mini-sparc.c: More opcodes implemented.
12784
12785 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
12786
12787         * inssel-sparc.brg: Add some needed rules.  Direct
12788         copy from PPC.
12789         * Makefile.am: Use inssel-sparc.brg
12790         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
12791         an assert happy for now.
12792
12793 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
12794
12795         * mini-sparc.c: Fixed compile errors.
12796         * exceptions-sparc.c: Same.  We now produce a mono binary 
12797         on sparc-linux.  Yea.
12798
12799 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
12800
12801         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
12802         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
12803         They compile, but do not work.
12804
12805 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12806
12807         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
12808         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
12809         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
12810         (ct@gentoo.org).
12811
12812 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12813
12814         * mini.c: more opcodes implemented and better support for generics.
12815
12816 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
12817
12818         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
12819         * mini.c, mini.h: first cut at generics support: some new instructions 
12820         added and changed the behaviour of some of the existing ones.
12821
12822 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
12823
12824         * mini.c: Removed definition of metadata_shared mutex here.
12825
12826 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
12827
12828         * mini-x86.c: make vararg calls work for instance methods.
12829
12830 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12831
12832         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
12833         returns the arguments in a separte list, now.
12834
12835 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
12836
12837         * aot.c, mini.c: updates for array type representation changes.
12838
12839 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
12840
12841         * mini.c: register function to perform jit shutdown.
12842
12843 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12844
12845         * mini.c: use a faster allocator if possible.
12846
12847 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
12848
12849         * aot.c: some cleanups and portability changes.
12850
12851 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12852
12853         * mini.c: use faster allocation for CEE_BOX if possible.
12854
12855 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
12856
12857         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
12858         Moved inlined mempcy code to its own function so that is can be
12859         reused. Added an inline memset function as well (optimized initobj).
12860         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
12861
12862 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12863
12864         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
12865
12866 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
12867
12868         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
12869         arch code can setup the cpu for CLR execution, if needed.
12870         We use it on x86 to set the precision of FP operations.
12871
12872 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12873
12874         * mini.c: disable some optimizations if we can guess they'll cost too
12875         much for a given method.
12876
12877 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12878
12879         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
12880         
12881 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12882         * mini.h mini.c mini-x86.c: Added instruction level coverage 
12883         info collection support.
12884
12885 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12886
12887         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
12888         is now implemented in the profiling API. Get rid of a couple of
12889         unnecessary global variables.
12890
12891 2003-06-15  Nick Drochak <ndrochak@gol.com>
12892
12893         * basic-long.cs: tests for negative values for bigmul, and unsigned.
12894         * cpu-g4.md: add op_bigmul and op_bigmul_un
12895         * cpu_pentium.md: add op_bigmul_un
12896         * inssel-long32.brg: add rule for unsigned bigmul
12897         * mini-ops.h: define OP_BIGMUL_UN
12898         * mini-x86.c: THE BUG: handle (un)signed properly
12899         * mini.c: choose unsigned opcode if needed.
12900         This set of patches fixes bug #44291
12901
12902 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
12903
12904         * mini.c (optimize_branches): improved to handle all kinds of
12905         conditional branches.
12906
12907 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
12908
12909         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
12910         don't raise exceptions.
12911
12912 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12913
12914         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
12915         to arch-specific files.
12916
12917 2003-06-09  Martin Baulig  <martin@ximian.com>
12918
12919         * Makefile.am (libs): Added $(LIBGC_LIBS).
12920
12921 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
12922
12923         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
12924         and OP_ATAN (fixes bug#44293).
12925
12926 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
12927
12928         * Makefile.am, mini-x86.c: rename cpu description array to
12929         pentium_desc, since some compilers define the 'pentium' preprocessor
12930         symbol.
12931
12932 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
12933
12934         * mini.c (mini_select_instructions): add explicit branch if the
12935         following block is not the false target of a conditional branch -
12936         we need this with any optimization that reorder or remove bblocks
12937
12938         * mini.c (optimize_branches): bug fixes
12939
12940 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
12941
12942         * mini.c (mono_method_to_ir): inline static readonly fields
12943
12944         * ssa.c (fold_tree): start cfold support for long (very simple
12945         cases only)
12946
12947         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
12948
12949 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
12950
12951         * inssel.brg: fixed memcpy (bug #44219).
12952
12953 2003-06-05  Dick Porter  <dick@ximian.com>
12954
12955         * driver.c: Set the glib log levels to not abort if g_message
12956         recurses.
12957
12958         g_set_prgname() has to happen before mini_init() so that the
12959         process handle gets the info.
12960         
12961 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12962
12963         * driver.c: add intrins to the default optimizations to get wider
12964         exposure.
12965
12966 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12967
12968         * mini.h: some large basic blocks will overflow a 16-bit
12969         integers for symbolic registers.
12970
12971 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
12972
12973         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
12974         (mono_arch_output_basic_block): fix bug 43499 
12975
12976 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
12977
12978         * mini.c: kill duplicated definition of mono_debug_format.
12979
12980 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
12981
12982         * mini-x86.c, arrays.cs: fixed register allocation bug.
12983
12984 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
12985
12986         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
12987
12988         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
12989
12990 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12991
12992         * mini.c:
12993         (print_method_from_ip): also print source location information if
12994         available.
12995
12996 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
12997
12998         * mini.c (mono_find_block_region): bug fix in region code
12999         (mini_method_compile): enable removing unreachable code again, but
13000         only in methods without exception clauses.
13001
13002 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
13003
13004         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
13005         Implemented arglist opcode and handling of TypedReference type.
13006         Fixed x86 call convention when a structure is returned.
13007         Minimal support for calling static vararg methods.
13008
13009 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
13010
13011         * mini.c (mini_method_compile):  always remove unreachable code,
13012         because the code in them may be inconsistent  (access to dead
13013         variables for example).
13014
13015 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13016
13017         * driver.c, debug-mini.c: warning fixes.
13018
13019 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13020
13021         * Makefile.am, jit.h, mini.h: install header for embedding mono.
13022
13023 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
13024
13025         * mini.c: thread-static fields are registered in mono_class_vtable(),
13026         so ensure the function is called before checking for them.
13027
13028 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
13029
13030         * mini.c (optimize_branches): fix for bug 43586
13031
13032         * jit-icalls.c (mono_llmult_ovf): added an additional check for
13033         overflow (fixes Bug #43639)
13034
13035 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13036
13037         * mini.c, objects.cs: allow the use of stobj for primitive types.
13038
13039 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13040
13041         * mini.c: be less strict about argument checking until we support
13042         running the verifier.
13043
13044 2003-05-27  Nick Drochak <ndrochak@gol.com>
13045
13046         * basic-long.cs: tests for (ulong)int * (ulong)int also
13047         * mini.c: use the same trick for (ulong)int * (ulong)int
13048
13049 2003-05-27  Nick Drochak <ndrochak@gol.com>
13050
13051         * basic-long.cs: add regression test for (long)int * (long)int
13052         * cpu-pentium.md: add op_bigmul specification
13053         * inssel-long32.brg: add OP_BIGMUL rule
13054         * mini-ops.h: add OP_BIGMUL
13055         * mini-x86.c: register allocator: handle case where src1 needs to be
13056         in EAX.
13057         * mini.c: substitute special BIGMUL opcode in the tree for 
13058         (long)int * (long)int
13059
13060 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13061
13062         * jit-icalls.c: call the type ctor on field access if needed.
13063
13064 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13065
13066         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
13067         to a method (including results of ldelema, bug#43207).
13068
13069 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13070
13071         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
13072         colors to show exception handler blocks.
13073
13074         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
13075         (fix for pinvoke7.cs).
13076
13077 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13078
13079         * mini.h, mini.c: ensure correct initialization order for types that
13080         require it. Prepare for lazy compilation of jit icall wrappers.
13081         Provide a name for opcode emulation to reduce unneeded mallocing.
13082
13083 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13084
13085         * mini-x86.c: better register restoring code and profiling
13086         support for tail calls.
13087
13088 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13089
13090         * mini.h, driver.c: prepare for leaf methods optimization.
13091
13092 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13093
13094         * mini.c: get targets of branches before converting a method.
13095
13096 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
13097
13098         * mini.c (optimize_branches): added some experimental code (disbaled) 
13099
13100 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
13101
13102         * mini.c (optimize_branches): fix branch to branch optimization 
13103
13104         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
13105
13106         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
13107
13108         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
13109
13110         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
13111         if needed.
13112
13113 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13114
13115         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
13116         enable use of interface variables again.
13117
13118         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
13119         I1 to registers because there is no simply way to sign extend 8bit
13120         quantities in caller saved registers on x86.
13121
13122         * inssel-float.brg: set costs of some rules to 2 so
13123         that monobure always select the arch. specific ones if supplied,
13124         regardless of the order we pass the files to monoburg.
13125
13126 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13127
13128         * mini.c, mini-x86.c: since the magic trampoline for jumps
13129         can't patch the code directly, we do it as soon as the
13130         method gets compiled.
13131
13132 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13133
13134         * mini-x86.c, mini.h: introduce a new patching method
13135         to support CEE_JMP and tail calls.
13136         * mini.c: obey tail.call. Don't precompile methods target
13137         of CEE_JMP.
13138         * tramp-x86.c: new trampoline code to handle methods
13139         reached through a jump.
13140
13141 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
13142
13143         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
13144         bit values to registers
13145
13146 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
13147
13148         * mini.c (mono_compile_get_interface_var): share interface
13149         variables if possible.
13150
13151 2003-05-16  Martin Baulig  <martin@ximian.com>
13152
13153         * debug-mini.c (mono_init_debugger): New function to initialize
13154         the debugger.  This is not in the debugger since it needs to
13155         access some of mini's internals.
13156
13157 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13158
13159         * mini.c (mono_method_to_ir): inlining fixes/cleanups
13160
13161 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
13162
13163         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
13164         for value type handling.
13165
13166 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13167
13168         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
13169         (mono_method_check_inlining): enable inlining of all kinds of wrappers
13170
13171 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
13172
13173         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
13174           the constructor through a proxy.
13175
13176 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13177
13178         * jit-icalls.c, inssel.brg: fixes to array element address
13179         calculations.
13180
13181 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
13182
13183         * mini-x86.c (is_regsize_var): allocate pointer to registers
13184
13185 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13186
13187         * driver.c: fixed typo, added intrins to the set of optimizations
13188         tested with regressions.
13189
13190 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13191
13192         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
13193         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
13194         test case.
13195
13196 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
13197
13198         * inssel.brg: remove some common pop instructions without side effects
13199
13200 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13201
13202         * inssel-x86.brg: fixed thinko in int to double conversions.
13203
13204 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13205
13206         * mini.c, jit-icalls.c: added runtime thread-static variable support.
13207
13208 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13209
13210         * inssel-long32.brg: two more missing instructions.
13211
13212 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
13213
13214         * mini.c (mono_emit_call_args): set the cil_code for all arguments
13215         if not already set.
13216
13217 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
13218
13219         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
13220         correctly.
13221
13222         * basic-float.cs: Added tests for negative zero.
13223
13224 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13225
13226         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
13227         a couple of missing operations for long casts, with test cases.
13228
13229 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13230
13231         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
13232
13233 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
13234
13235         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
13236         code size estimation.
13237
13238 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
13239
13240         * mini.c (mono_jit_create_remoting_trampoline): make it work with
13241         abstract methods (fix bug 42542)
13242
13243         * aot.c: add ability to handle array types
13244         
13245 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
13246
13247         * mini.c: Call the _specific versions of the object allocation
13248         functions if possible.
13249
13250 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13251
13252         * driver.c: call setlocale ().
13253
13254 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13255
13256         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
13257         windows build.
13258
13259 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
13260
13261         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
13262
13263         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
13264         wrappers (fix bug 42122)
13265
13266 2003-05-04  Martin Baulig  <martin@ximian.com>
13267
13268         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
13269
13270         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
13271         s/mini_set_defaults/mono_set_defaults/g.
13272
13273 2003-05-04  Martin Baulig  <martin@ximian.com>
13274
13275         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
13276
13277 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13278
13279         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
13280         (reported by Don Roberts).
13281
13282 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
13283
13284         * mini.c: temporarily work around two bugs for this release.
13285
13286 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13287
13288         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
13289         that contains -export-dynamic and it makes using the ld script
13290         useless.
13291         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
13292
13293 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13294
13295         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
13296         specific cpu.
13297
13298 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13299
13300         * mini.c: make sure leave calls all the needed finally blocks,
13301         even when the target jumps out of multiple exception clauses.
13302
13303 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13304
13305         * ldscript, Makefile.am: add linker script to reduce the number of
13306         exported symbols (should also fix the issues with libwine defining
13307         some of the same symbols in io-layer).
13308
13309 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
13310
13311         * driver.c (mini_main): Avoid assertion when no file name is given on 
13312         the command line.
13313
13314 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
13315
13316         * driver.c: added --version/-V command line option.
13317         Added the inline optimization in the regression tests.
13318
13319 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13320
13321         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
13322         to the type in the method signature (fixes bug#42134).
13323
13324 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
13325
13326         * mini.c: when inlining, check this is not null only when needed (bug #42135).
13327
13328 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
13329
13330         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
13331
13332 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13333
13334         * driver.c: fixed bug #42100.
13335
13336 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
13337
13338         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
13339
13340 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13341
13342         * mini.c: moved most of the code required to do inlining to its own
13343         function so it can be reused. Inline also ctors if appropriate.
13344
13345 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
13346
13347         * Makefile.am: Link with -export-dynamic so shared libs loaded by
13348         the runtime can call mono API functions.
13349
13350 2003-04-27  Martin Baulig  <martin@ximian.com>
13351
13352         * debug-mini.c (mono_debug_init_method): Added
13353         `guint32 breakpoint_id' argument; if the method has a breakpoint,
13354         send a notification to the debugger.
13355
13356         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
13357         running in the Mono Debugger, just pass the breakpoint number to
13358         mono_debug_init_method().
13359
13360         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
13361
13362 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
13363
13364         * mini.c: allow some more unsafe compares.
13365
13366 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13367
13368         * mini-x86.c, Makefile.am: make distcheck works (partially from
13369         a patch by Richard Lee <r.h.lee@attbi.com>).
13370         * regset.c, regset.h: removed, they are unused.
13371
13372 2003-04-25  Dick Porter  <dick@ximian.com>
13373
13374         * driver.c: Usage reports the name as 'mono' not 'mini'
13375         * exceptions-x86.c: Build and run on freebsd
13376
13377 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13378
13379         * Makefile.am: install the program with the 'mono' name and
13380         the library as libmono instead of mini and libmini.
13381
13382 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13383
13384         * driver.c: provide the APIs for the embedding interface of the old jit.
13385
13386 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
13387
13388         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
13389
13390 2003-04-23  Martin Baulig  <martin@ximian.com>
13391
13392         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
13393
13394         * driver.c: Added `--debug' command line argument to enable
13395         debugging support.
13396
13397 2003-04-23  Martin Baulig  <martin@ximian.com>
13398
13399         * debug.[ch]: Removed.  The code is now in
13400         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
13401
13402         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
13403         last six months.
13404
13405 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
13406
13407         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
13408
13409 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13410
13411         * mini.c:
13412         (mini_cleanup): moved mono_runtime_cleanup call after the call to
13413         mono_domain_finalize.
13414         (mini_method_compile): use mono_method_profile* if the the option is
13415         enabled.
13416
13417 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
13418
13419         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13420         methods with their wrapper.
13421
13422         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13423         methods with their wrapper.
13424
13425         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
13426         their wrapper.
13427
13428         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
13429         wrapper.
13430
13431         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
13432         methods.
13433
13434 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
13435
13436         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
13437
13438 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
13439
13440         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
13441         of the mempool. This is slightly faster and uses less memory
13442
13443 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13444
13445         * mini.c: avoid O(n) allocation for variables.
13446
13447 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13448
13449         * mini.c: handle items on the stack after inlining methods.
13450
13451 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13452
13453         * mini.c: make the method->opcode optimization dependent
13454         on MONO_OPT_INSTRINS and do it lazily.
13455
13456 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13457
13458         * driver.c: print overall results at the end of regression run.
13459
13460 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13461
13462         * inssel.brg: don't overwrite symbolic registers.
13463
13464 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13465
13466         * inssel-x86.brg: fix conversion from long to float.
13467
13468 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
13469
13470         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
13471
13472 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
13473
13474         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
13475
13476         * driver.c: Added --print-vtable option as in the old JIT.
13477
13478 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13479
13480         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
13481
13482 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13483
13484         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
13485
13486 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
13487
13488         * mini.c regalloc.c regalloc.h: Fix memory leak.
13489
13490 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
13491
13492         * aot.c (mono_aot_get_method): register all used strings
13493
13494 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13495
13496         * mini.c: always intern strings references with ldstr at compile time.
13497
13498 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13499
13500         * Makefile.am: add BUILT_SOURCES.
13501
13502 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13503
13504         * driver.c: give a better error message when the assembly to execute
13505         doesn't have an entry point.
13506
13507 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
13508
13509         * Makefile.am: added hack for automake
13510
13511         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
13512         correct sematics.
13513
13514         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
13515
13516 22003-04-07  Martin Baulig  <martin@ximian.com>
13517
13518         * Makefile.am: Added Makefile.am.
13519
13520         * debugger-main.c: Removed, this is now in the debugger where it
13521         belongs.
13522
13523         * mini.pc.in: Call this package `mini' for the moment.
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533