2008-05-26 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
2
3         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
4         for accessing method->generic_container.
5
6 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
7
8         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
9         
10         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
11
12         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
13
14         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
15         fails.
16
17 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
18
19         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
20
21         * mini.c: Handle the case when mono_class_vtable () fails.
22
23 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
24         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
25         the stat profiler.
26
27 2008-05-22  Mark Probst  <mark.probst@gmail.com>
28
29         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
30         together with domain sharing.
31
32 2008-05-22  Mark Probst  <mark.probst@gmail.com>
33
34         * mini.c: Treat callvirts to final methods like non-virtual calls
35         when doing generic sharing, i.e. look them up in the runtime
36         generic context.
37
38 2008-05-22  Mark Probst  <mark.probst@gmail.com>
39
40         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
41         with computed types (for generic sharing).
42
43         * mini.c: Generic sharing for mkrefany and refanyval.
44
45 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
46
47         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
48         possible.
49
50         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
51         the generic sharing code.
52         
53         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
54         when needed.
55
56 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
57
58         * mini.h: Remove the declaration of mono_aot_init_vtable ().
59
60 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
61
62         * driver.c: updated copyright date
63
64 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
65
66         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
67         needed.
68
69 2008-05-19  Martin Baulig  <martin@ximian.com>
70
71         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
72         pointing to the new `_mono_debug_using_mono_debugger' variable.
73
74         * driver.c
75         (mono_main): Check mono_debug_using_mono_debugger() rather than
76         the `MONO_INSIDE_MDB' environment variable to check whether we're
77         inside the debugger.
78
79 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
80
81         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
82         argument.
83
84 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
85
86         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
87
88         * mini.c: Added mini_assembly_can_skip_verification. This
89         function checks if the assembly requested to skip verification. 
90         Fixes part of #387274.
91
92 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
93
94         * mini.c (mini_get_method): Disable the check for open generic classes when
95         using generic sharing.
96
97         * generics.cs: Add a test #387034.
98
99         * mini.c (mini_get_method): Check whenever the method class is an open generic
100         type, and return NULL in that case, causing a verification error. Fixes
101         #384123.
102
103 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
104
105         * driver.c (mono_main): Revert r102623. The right
106         thing to do is to enable the verifier under verifiable
107         unless a --security flag was passed.
108
109         We need this non-trivial behavior for --verify-all otherwise
110         mcs-compileall won't be able to use it. As it needs everything to
111         be verified under validil.
112
113 2008-05-06  Martin Baulig  <martin@ximian.com>
114
115         Fix #383749.
116
117         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
118         (mono_debugger_thread_cleanup): Likewise.
119         (mono_debugger_extended_notification): Likewise.
120
121 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
122
123         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
124         against both inflated and non-inflated methods. We need to check against the
125         generic definition for cases where the instantiated method is not visible.
126         We need to check against the inflated types for cases where the instantiation
127         changes any super type. This fixes #382986.
128
129         Note that this doesn't need to be applied to other parts of mono_method_to_ir
130         that check for visibiliy as generic params only appears as the type subject
131         of tokens on call opcodes. Field manipulation and ldftn must always
132         target an exact type.
133
134 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
135
136         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
137         if no related --security flag is passed.
138
139 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
140
141         * mini-arch.h: Prepare support for ppc64.
142
143         Contributed under MIT/X11 license.
144
145 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
146
147         * aot-runtime.c: Prepare support for ppc64.
148
149         Contributed under MIT/X11 license.
150
151 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
152
153         * mini-ops.h: Prepare support for ppc64.
154
155         Contributed under MIT/X11 license.
156
157 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
158
159         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
160
161         Contributed under MIT/X11 license.
162
163 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
164
165         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
166         assemblies, since aot_name is not a full path, causing us to load MS.NET 
167         assemblies on windows.
168
169 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
170
171         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
172         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
173         * main.c: Use UTF-8 encoded command line instead of Windows default code
174         page on Windows to support Unicode.
175         * driver.c (DllMain): New function for mixed-mode assembly support.
176         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
177         export __stdcall functions without decoration.
178
179         Contributed under MIT/X11 license.
180
181 2008-04-28  Mark Probst  <mark.probst@gmail.com>
182
183         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
184         saving it very early.
185
186 2008-04-28  Mark Probst  <mark.probst@gmail.com>
187
188         * mini.h, mini.c: Lots of code for accessing the old RGCTX
189         deleted.  The only way to access the new RGCTX is via the
190         trampline.
191
192         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
193         vtable instead of the RGCTX to static methods.
194
195         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
196         accessing the new RGCTX.
197
198         * generic-sharing.c: There is no separation between self, type
199         arguments and other types in the RGCTX anymore.
200
201 2008-04-25  Jonathan Chambers <joncham@gmail.com>
202
203         * mini-amd64.c (add_general): Remove previous stack adjustment.
204         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
205         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
206         for 32 bytes of stack space reserved for all calls.
207         
208         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
209         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
210         adjustment.
211         
212         Code contributed under MIT/X11 license.
213
214 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
215
216         * mini.c (mini_method_verify): Only verify non-inflated methods, check
217         against the root definition, peeling out method and type instantiations.
218         Cache verify success results, code that fails verification is still
219         checked multiple times.
220
221 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
222
223         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
224
225 2008-04-23  Jonathan Chambers <joncham@gmail.com>
226
227         * mini-amd64.c (add_general): Always increment stack on Win64.
228         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
229         on Win64.
230         
231         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
232         stack based argument handling on Win64.
233         
234         Code contributed under MIT/X11 license.
235
236 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
237
238         * Makefile.am (version.h): Add support for git-svn.
239
240 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
241
242         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
243         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
244         avoiding allocations and libc functions which might deadlock.
245         
246         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
247         'no-gdb-backtrace' option is set.
248
249         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
250
251         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
252
253 2008-04-21  Martin Baulig  <martin@ximian.com>
254
255         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
256         and `get_lmf_addr'; `notification_address' is no longer a pointer.
257
258 2008-04-21  Martin Baulig  <martin@ximian.com>
259
260         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
261         `thread_vtable', `event_handler_ptr' and `event_handler'.
262
263 2008-04-21  Martin Baulig  <martin@ximian.com>
264
265         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
266         allows delayed initialization of the `executable_code_buffer' when
267         attaching.
268
269 2008-04-21  Martin Baulig  <martin@ximian.com>
270
271         * mini.h (mono_debugger_create_notification_function): Removed.
272         * tramp-*.c (mono_debugger_create_notification_function): Removed.
273
274         * mdb-debug-info64.s
275         (MONO_DEBUGGER__notification_function): Added this in the .text section.
276
277         * mdb-debug-info32.s
278         (MONO_DEBUGGER__notification_function): Added this in the .text section.
279
280         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
281         currently only works on x86 and x86_64, so don't create it on ppc.
282
283 2008-04-21  Martin Baulig  <martin@ximian.com>
284
285         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
286
287         * mini.c
288         (mini_method_compile): In the fp elimination check, check
289         `debug_options.mdb_optimizations' in addition to
290         mono_debug_using_mono_debugger().       
291
292         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
293         disable some JIT optimizations which are only disabled when
294         running inside the debugger.
295         Added `--help-debug' option to describe the debugging options.
296         (parse_debug_options): New static function to parse the `--debug'
297         options, so we can easily add more stuff in future.
298
299 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
300
301         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
302         the method has no body.
303
304 2008-04-19  Jonathan Chambers <joncham@gmail.com>
305
306         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
307         assembly is not allowed in MSVC 64-bit compiler. 
308         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
309         as we get floating point exceptions everywhere.
310         
311         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
312         correctly align arguments for call to throw_exception.
313         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
314         
315         Code contributed under MIT/X11 license.
316
317 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
318
319         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
320
321 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
322
323         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
324
325         * mini-amd64.c (NEW_INS): Set cil_code.
326
327         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
328         from mini-amd64.c so all debugger related logic is in one place.
329
330         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
331         later won't have a random ip assigned to them.
332
333 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
334
335         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
336         the arch specific function initializes code_size.
337         (mono_create_delegate_trampoline): Ditto.
338
339         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
340         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
341         platforms.
342
343         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
344         running under the debugger.
345
346         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
347         debugger.
348
349         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
350         debugger. Also move the disabling of optimizations here from driver.c.
351         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
352         debugger.
353
354         * mini.h (MonoCompile): Add a few new flags.
355
356 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
357
358         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
359         so the cil_code field of created MonoInst's is properly set.
360         (mini_select_instructions): Ditto.
361
362         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
363         (MONO_INST_NEW_CALL): Ditto.
364
365         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
366         in many places so the ins->cil_code field is properly initialized.
367
368         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
369         place.
370
371 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
372
373         * mini.c (mini_method_compile): Print a different message when compiling a 
374         shared method.
375         
376         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
377         > 1.
378
379 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
380
381         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
382         SSE2 instructions.
383
384         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
385         
386 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
387
388         * mini.c (handle_stack_args): Make this return void since its return value was
389         never used. Also set cfg->unverifiable for invalid IL instead of calling
390         G_BREAKPOINT ().
391
392 2008-04-10  Mark Probst  <mark.probst@gmail.com>
393
394         * mini.c: Make sure "this" is live in catch clauses with type
395         variables in shared generic code.
396
397 2008-04-08  Mark Probst  <mark.probst@gmail.com>
398
399         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
400         generic_class_is_reference_type() to ensure the proper behaviour
401         when sharing generic code and the type in question is a type
402         argument.
403
404 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
405
406         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
407         race conditions when printing thread dumps. Fixes #377738.
408
409 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
410         
411         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
412         shows up when both MonoInst arguments can cause aliasig.
413         There is likely no way in the current JIT to trigger this problem, but
414         it showed up in the development of generics sharing, when in a new
415         opcode both args of an OP_GROUP can be aliases (addresses of a local).
416         When the generics sharing code will be committed, its tests will be
417         valid also for this bug.
418
419 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
420
421         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
422         PATCH_INFO_METHOD.
423
424         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
425         NULL.
426
427 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
428
429         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
430         use a more detailed exception message for InvalidCastException.
431
432         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
433
434         * driver.c (mono_main): Add --debug=casts option to turn on better 
435         InvalidCastException message details.
436
437         * mini.c (mini_get_debug_options): New helper function to return the address of
438         the debug_options variable.
439
440         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
441         the jit_tls TLS variable.
442
443         * mini.c (mono_jit_tls): New TLS variable.
444
445         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
446         option is used.
447
448 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
449
450         * mini.h: Removed verifer related stuff. This code was moved to verify.c
451
452         * mini.c: Removed verifer related stuff, code moved to verify.c.
453
454         * driver.c: Using code from verify.c instead of mini.c.
455
456 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
457
458         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
459         longer valid.
460
461 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
462
463         * mini.c (check_for_method_verify): Enabling verification of
464         corlib if mono_verify_all is set. Bugs in the verifier preventing that
465         have been fixed.
466
467 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
468
469         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
470         caller saved registers as well.
471         
472         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
473         saved registers as well.
474
475 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
476
477         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
478
479         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
480         code.
481
482 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
483
484         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
485         to get_call_info.
486         (get_call_info): Take a gsctx argument instead of 'cfg'.
487
488 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
489
490         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
491         mono_verify_all is set.
492
493         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
494
495         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
496
497 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
498
499         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
500         an exception.
501
502         * driver.c mini.c mini.h: Add a --verify-all development option to test the
503         verifier and the code generated by the compiler.
504
505 2008-03-25  Mark Probst  <mark.probst@gmail.com>
506
507         * mini.c: Generic sharing of the non-nullable case of the box
508         instruction.
509
510 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
511
512         * inssel.brg: Fix the build.
513
514         * iltests.il.in: Add a test for lconv.ovf.u8.un.
515
516 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
517
518         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
519         Array:Address. Fixes #372410.
520
521         * iltests.il.in: New tests for readonly prefix.
522
523 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
524
525         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
526         mini-trampolines.c.
527
528         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
529         mini-exceptions.c.
530
531         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
532         
533         * mini.c (mono_decompose_op_imm): New helper function.
534
535         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
536         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
537         return value.
538
539         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
540         mono_arch_output_basic_block. Fix warnings.
541
542         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
543         for now.
544
545 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
546
547         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
548         since the extra frame is now detected automatically inside the loop.
549
550         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
551         opts which are now in mono_peephole_ins ().
552         
553         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
554
555         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
556         frames and skip duplicate managed-to-native frames. Fixes #367665.
557
558         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
559         opts which are now in mono_peephole_ins ().
560         (mono_arch_peephole_pass_2): Ditto.
561
562         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
563
564         * mini-codegen.c (mono_peephole_ins): New helper function containing the
565         arch independent peephole optimizations.
566
567         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
568         opts which are now in mono_peephole_ins ().
569
570         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
571         
572         * mini-s390.c (mono_arch_output_basic_block): Fix build.
573
574         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
575         pattern.
576
577         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
578         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
579         opcode. 
580
581 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
582
583         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
584         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
585         return value.
586
587         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
588         mono_arch_output_basic_block. Fix warnings.
589
590 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
591
592         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
593         conv.ovf.u.un.
594
595 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
596
597         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
598         conv.ovf.u.un.
599
600         * iltests.il: Add new tests.
601
602 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
603
604         * mini.c: Removed Windows version macros.
605
606 2008-03-20  Mark Probst  <mark.probst@gmail.com>
607
608         * generic-sharing.c: Put reflection types in the extensible part
609         of the runtime generic context.
610
611         * mini.c: Generic sharing of the GetTypeHandle special case of the
612         ldtoken instruction.
613
614 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
615
616         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
617
618         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
619         
620         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
621         consistency with the other version on the linear IR branch.
622
623         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
624
625         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
626
627         * iltests.il.in: Add new tests.
628
629 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
630
631         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
632
633         * iltests.il.in: Add new tests.
634
635 2008-03-19  Mark Probst  <mark.probst@gmail.com>
636
637         * mini.c: Two variables with the same name were declared in
638         nesting contexts and one wasn't initialized.  Fixed.
639
640 2008-03-19  Mark Probst  <mark.probst@gmail.com>
641
642         * mini.c: Generic sharing of the initobj instruction.
643
644 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
645
646         * mini.c: make the test to optimize ldtoken from typeof() more
647         precise.
648
649 2008-03-18  Mark Probst  <mark.probst@gmail.com>
650
651         * mini.c: Generic sharing of the initobj instruction for reference
652         types.
653
654 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
655
656         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
657         the mono_breakpoint_clean_code() code to perform bound checks.
658
659 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
660
661         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
662         mono_arch_patch_callsite() to include the start of the managed method
663         to be able to perform bound checks.
664
665 2008-03-17  Mark Probst  <mark.probst@gmail.com>
666
667         * mini.c: Generic sharing for the isinst instruction.
668
669 2008-03-17  Mark Probst  <mark.probst@gmail.com>
670
671         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
672         inssel-long32-mips.brg: Added opcodes for doing indirect calls
673         with the runtime generic context argument.
674
675         * mini.c: Share calls to several types of unsharable methods by
676         putting the address of the method code in the runtime generic
677         context and doing an indirect call.
678
679         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
680         to switches.
681
682 2008-03-16  Mark Probst  <mark.probst@gmail.com>
683
684         * generic-sharing.c: Change due to a change in the runtime genric
685         context API.
686
687 2008-03-15  Martin Baulig  <martin@ximian.com>
688
689         * tramp-x86.c
690         (mono_arch_nullify_class_init_trampoline): Add call to
691         mono_breakpoint_clean_code() to make things work when running
692         inside the debugger.
693
694         * tramp-amd64.c
695         (mono_arch_nullify_class_init_trampoline): Add call to
696         mono_breakpoint_clean_code() to make things work when running
697         inside the debugger.
698
699 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
700
701         * inssel-long.brg (reg): Fix 64 bit build.
702
703 2008-03-14  Mark Probst  <mark.probst@gmail.com>
704
705         * mini.c, mini.h: Share static generic code by passing it an
706         implicit argument pointing to the runtime generic context.
707
708         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
709         inssel-long32-mips.brg: New opcodes for calling shared static,
710         which need to be passed the runtime generic context.
711
712         * mini-amd64.c, mini-x86.c: Save the runtime generic context
713         argument on the stack in the prologue if needed.  New function for
714         finding the runtime generic context argument from the registers
715         saved by the trampoline.
716
717         * mini-amd64.h, mini-x86.h: Specify which register to use for the
718         runtime generic context argument.
719
720         * tramp-amd64.c: Also restore the register used for the runtime
721         generic context argument.
722
723         * mini-trampoline.c: Resolve shared static calls by consulting the
724         runtime generic context via the new argument.
725
726         * generic-sharing.c: Add an argument to sharability-checking
727         functions that specifies whether type variables should be treated
728         as sharable type arguments.
729
730         * inssel-x86.brg: Removed a superfluous, buggy rule.
731
732         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
733         to switches.
734
735 2008-03-14  Martin Baulig  <martin@ximian.com>
736
737         * debug-debugger.c (main_thread_handler): Call
738         mono_runtime_run_main() without sending any notifications.
739
740         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
741
742 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
743
744         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
745
746 2008-03-14  Mark Probst  <mark.probst@gmail.com>
747
748         * tramp-x86.c: Fixed register restore offsets in the trampoline
749         code for ECX and EDX.
750
751 2008-03-12  Geoff Norton  <gnorton@novell.com>
752
753         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
754         different ucontext_t implementations.
755         * exceptions-arm.c: Use the above defines to get exceptions working on 
756         iPhone (based on a patch by Luke Howard lukeh@padl.com)
757         * mini-arm.c: Implement iPhone icache support (based on a patch by
758         Luke Howard lukeh@padl.com)
759
760 2008-03-12  Mark Probst  <mark.probst@gmail.com>
761
762         * mini.c: Enable generic sharing of calls to non-static
763         non-interface non-generic non-value-type methods.
764
765         * mini-trampolines.c: Resolve calls from shared generic code.
766
767 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
768
769         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
770
771         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
772
773 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
774
775         * mini.c: some fixes for the AOT compiler.
776
777 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
778
779         * cpu-amd64.md: Add clob:1 to some float opcodes.
780
781 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
782
783         * mini.h: Added MiniVerifierMode enumeration.
784
785         * mini.c: Added mini_verifier_set_mode to control
786         the usage of the new verifier.
787
788         * mini.c (mono_method): Integrated the new verifier.
789
790         * driver.c: Extended --security option with validil and
791         verifiable options to activate the new verifier.
792
793 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
794
795         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
796         optimization to ctors taking 0 or 2 arguments too.
797
798         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
799         a bit.
800
801         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
802
803         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
804
805 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
806
807         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
808         non-aot case as well.
809
810         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
811
812         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
813         changes.
814
815         * aot-compiler.c (encode_patch): Ditto.
816
817         * mini.h (G_MININT32): Fix the definition of this.
818
819 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
820
821         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
822
823         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
824
825 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
826
827         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
828         methods returning vtypes in registers.
829         (mono_arch_allocate_vars): Ditto.
830
831         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
832
833         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
834
835         * generics.cs: Add a test from the linear IR branch.
836
837         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
838
839         * mini.c (inline_method): Cache failed inline attempts.
840
841 2008-03-04  Mark Probst  <mark.probst@gmail.com>
842
843         * mini.c: For shared methods of generic classes put the location
844         of "this" into the MonoGenericJitInfo.
845
846         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
847         register out of a MonoContext by register number.  Add the generic
848         sharing context as an argument to mono_arch_find_this_argument().
849
850         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
851         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
852         for new arch function.
853
854         * mini-exception.c: Handle open exception clauses in shared
855         generic code.
856
857         * mini-trampolines.c: Supply additional argument to
858         mono_arch_find_this_argument().
859
860 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
861
862         * Makefile.am (regtests): Run the bench.exe tests last.
863
864 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
865
866         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
867         a bit.
868
869 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
870
871         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
872         with MS.
873
874         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
875         
876         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
877
878         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
879         whose class has no cctor.
880
881         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
882
883 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
884
885         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
886         unverified.
887
888 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
889
890         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
891         to be in sync with the code on the linear IR branch.
892
893         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
894
895         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
896
897 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
898
899         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
900
901         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
902
903         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
904
905         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
906
907         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
908         
909         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
910         body.
911
912 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
913
914         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
915         OP_LOADR4_MEMBASE emission.
916
917         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
918         (mono_spillvar_offset_float): Ditto.
919
920         * mini-mips.c (mono_arch_emit_prolog): Ditto.
921
922         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
923         emission.
924
925         * basic-long.cs: Add regression tests for them.
926
927         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
928         use.
929         (mono_arch_allocate_vars): Fix representation of single-precision float
930         argument.
931         (mono_arch_output_basic_block): Ditto.
932
933         * inssel-mips.brg: Ditto, remove duplicate items.
934
935         * mini-mips.c (emit_load_volatile_arguments): New function to handle
936         arguments of tail calls as on other platforms.
937         (mono_arch_output_basic_block): Handle tail calls.
938
939         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
940         register.
941
942         * objects.cs (test_5_pass_static_struct): Add test for it.
943
944         Contributed under MIT/X11 license.
945
946 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
947
948         * Makefile.am: Use gmcs for compiling the regression tests.
949
950         * *.2.cs *.2.il: Rename to *.cs and *.il.
951
952 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
953
954         * regalloc.h: Make the vassign array smaller.
955
956         * mini.c (mini_method_compile): Remove an unused field in cfg.
957
958         * mini-codegen.c: Add a bunch of micro optimizations.
959
960 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
961
962         * regalloc.h: Remove some unused fields.
963
964 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
965
966         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
967
968         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
969
970 2008-02-22  Mark Probst  <mark.probst@gmail.com>
971
972         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
973
974         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
975         trampoline: Fetch an entry from the runtime generic context.  If
976         it's NULL, jump to the actual trampoline to fill the runtime
977         generic context.  Otherwise, return it.
978
979         * mini.c: Call the lazy fetch trampoline to get entries out of the
980         runtime generic context.
981
982         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
983         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
984         tramp-sparc.c: Stubs for the lazy fetch trampoline.
985
986 2008-02-21  Mark Probst  <mark.probst@gmail.com>
987
988         * mini.c: Fetch data out of the extensible part of the runtime
989         generic context instead of calling a helper function.
990
991         * generic-sharing.c: Some functions moved into
992         metadata/generic-sharing.c.  Helper function for fetching other
993         types now checks and asserts against extensible rgctx (just for
994         debugging purposes - the helper function isn't called anymore
995         unless for debugging).
996
997 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
998
999         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
1000         for tail calls up to the point that the tests in iltests.exe run. Also add a
1001         dummy CKFINITE implementation.
1002         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
1003         needed for trampoline LMF frames.
1004
1005         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
1006         trampoline LMF frames.
1007
1008 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
1009
1010         * mini.c (inline_method): clean any pending loader error when inlining fail.
1011         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
1012
1013 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1014
1015         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
1016
1017         * aot-runtime.c (decode_patch_info): Ditto.
1018
1019         * mini.c (mono_resolve_patch_target): Ditto.
1020         
1021         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
1022         icall wrappers.
1023
1024         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
1025         
1026         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
1027         if it references an icall address.
1028
1029 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
1030
1031         * cpu-s390x.md: Remove some more unused opcodes.
1032         
1033         * cpu-s390x.md: Remove some unused opcodes.
1034
1035         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
1036         mono_op_imm_to_op ().
1037
1038         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
1039         instead of a switch statement.
1040         
1041         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
1042         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
1043
1044         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
1045         
1046         * mini-codegen.c: Remove unused mono_regstate2_... functions.
1047
1048         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
1049         -1.
1050
1051 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
1052
1053         * driver.c (mono_main): Improve error reporting when an assembly cannot be
1054         opened. Fixes #362607.
1055
1056         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
1057
1058         * iltests.il.in: Add a test for static methods in interfaces.
1059
1060 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
1061
1062         * genmdesc.c (build_table): Fix a crash on older glib versions.
1063
1064         * cpu-sparc.md: Remove some unused opcodes.
1065         
1066         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
1067         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
1068
1069         * cpu-amd64.md: Remove some unused opcodes.
1070
1071         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
1072         like the other opcodes.
1073
1074 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
1075
1076         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
1077
1078         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
1079
1080         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
1081         variables 'cfg' instead of 'm' for consistency.
1082
1083         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
1084
1085         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
1086         argument holding the vtype return address, to avoid the ambigious use of
1087         cfg->ret for this purpose.
1088
1089         * mini.c (NEW_RETLOADA): Use vret_addr if set.
1090
1091         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
1092         
1093         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
1094         new mono_print_ins () function which only takes one argument.
1095
1096 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
1097
1098         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
1099         macro arguments.
1100
1101 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
1102
1103         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
1104
1105         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
1106
1107         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
1108         opcodes and other small changes.
1109
1110         * mini-ops.h: Add some new opcodes from the linear IR branch.
1111
1112         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
1113
1114         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
1115         opcodes, use the REG_MEMBASE opcodes instead.
1116         
1117         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
1118         opcodes, use the REG_MEMBASE opcodes instead.
1119         
1120         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
1121         linear IR branch.
1122
1123         * mini.c (mono_op_imm_to_op): New helper function.
1124
1125         * mini-ops.h: Add some opcodes from linear IR branch.
1126
1127 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
1128
1129         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
1130         <tsv@solvo.ru>.
1131
1132 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
1133
1134         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
1135         OP_ICONV_TO_R4/R8.
1136
1137         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
1138
1139 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
1140
1141         * aot-compiler.c (emit_method_code): Add an assert.
1142
1143         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
1144         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
1145         methods.
1146
1147 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
1148
1149         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
1150         some load/store opcodes so they are consistent. 
1151         (mono_arch_emit_prolog): Simplify some code.
1152
1153         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
1154
1155         * objects.cs: Add tests for large argument offsets on ARM.
1156
1157         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
1158         stack offsets. Fixes #359651.
1159
1160         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
1161
1162         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
1163
1164         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
1165
1166         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
1167
1168         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
1169
1170         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
1171         rid of CEE_CONV_R_UN.
1172
1173         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
1174
1175 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
1176
1177         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
1178
1179         * mini.c (mono_normalize_opcodes): Add some more opcodes.
1180
1181         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
1182
1183         * cpu-amd64.md: Remove some unused opcodes.
1184
1185         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
1186
1187         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
1188
1189         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
1190         arch specific functions for its parts. Call the peephole pass after local
1191         regalloc so the prolog can compute a more accurate max_offset.
1192         
1193         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
1194         the corresponding OP_I/OP_L opcodes.
1195
1196         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
1197
1198         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
1199
1200 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1201
1202         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
1203         as they are handled in mini.c.
1204
1205         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
1206         
1207         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
1208         case since it is handled in mini.c.
1209
1210         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
1211
1212         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
1213
1214         * *.c: Use the new opcodes in the IR and back end code.
1215
1216         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
1217
1218         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
1219
1220 2008-02-06  Mark Probst  <mark.probst@gmail.com>
1221
1222         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
1223         an assert because it has a race condition.
1224
1225 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1226
1227         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
1228
1229         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
1230
1231         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
1232
1233         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
1234         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
1235
1236 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
1237
1238         * cpu-amd64.md (move): Correct the maximum size of move.
1239
1240 2008-02-05  Mark Probst  <mark.probst@gmail.com>
1241
1242         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
1243         the generic class init trampoline to return quickly if the class
1244         is already inited.
1245
1246 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
1247
1248         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
1249         issues where an 32 bit callsite cannot be patched by a 64 bit address.
1250
1251 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
1252
1253         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
1254         branch.
1255
1256 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
1257
1258         * objects.cs: Add some soft-float tests.
1259
1260         * mini.c: Fix a couple more soft-float issues.
1261
1262         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
1263
1264         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
1265         avoid a REX prefix.
1266
1267 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
1268
1269         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
1270         exception happens while compiling a virtual method.
1271
1272 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
1273
1274         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
1275         
1276         * mini-sparc.c: Fix build.
1277
1278         * mini-sparc.c (get_call_info): Add support for generic sharing.
1279
1280         * mini-exceptions.c: Add a FIXME.
1281
1282 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
1283
1284         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
1285         altstack handling code.
1286
1287         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
1288         
1289         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
1290
1291         * mini-s390.c: Add support for generic sharing.
1292
1293         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1294         Fix CAS on s390.
1295         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1296
1297         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
1298
1299         * mini-s390x.c: Add support for generic sharing.
1300         
1301         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1302         Fix CAS on ia64.
1303         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1304
1305         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
1306         can be used since it takes a 16 bit signed immediate.
1307
1308         * inssel-s390x.brg: Fix OP_SETRET.
1309
1310         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
1311
1312         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
1313
1314         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
1315
1316         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
1317
1318         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
1319         in one place.
1320
1321         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
1322         stuff.
1323
1324         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
1325         of the unused mono_arch_patch_delegate_trampoline stuff.
1326
1327 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
1328
1329         * basic-long.cs: Move the fp related tests to basic-float.cs.
1330
1331         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
1332
1333         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
1334
1335         * basic-calls.cs: Add a test for proper float argument passing.
1336
1337         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
1338         if the context corresponds to an exception received through a signal.
1339
1340         * exceptions.cs: Add a test for nullref handling at the start of a try
1341         clause.
1342
1343         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
1344
1345         * jit-icalls.c (mono_break): New JIT icall.
1346
1347         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
1348
1349         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
1350
1351 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
1352
1353         * cpu-*.md: Get rid of unused opcodes.
1354
1355         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
1356
1357         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
1358         by all platforms.
1359
1360         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
1361         define.
1362
1363         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
1364         the arch independent trampoline code in mini-trampolines.c.
1365
1366         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
1367
1368         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
1369
1370         * mini-s390.h: Remove an unused define.
1371         
1372         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
1373         the arch independent trampoline code in mini-trampolines.c.
1374
1375         * mini-arm.c (mono_arch_emit_prolog): Fix build.
1376
1377 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
1378
1379         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
1380
1381         * mini-s390.c (mono_arch_emit_prolog): Fix build.
1382
1383         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
1384
1385         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
1386
1387         * cpu-amd64.md: Use smaller sizes for int opcodes.
1388
1389         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
1390
1391         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
1392         objects.cs.
1393
1394         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
1395         debugging.
1396
1397         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
1398         instead of though a pointer to save an indirection when accessing elements of
1399         the array.
1400
1401         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
1402         some typos.
1403         (NOT_IMPLEMENTED): New helper macro.
1404         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
1405         of a bb.
1406
1407         * *.c: Use the new helper macro.
1408
1409 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
1410
1411         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
1412
1413 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
1414
1415         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
1416         stack slots.
1417
1418 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
1419
1420         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
1421         profiling is enabled.
1422         
1423         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
1424         the end.
1425         (mono_arch_emit_prolog): Add more first bblock optimizations.
1426
1427         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
1428         in order if possible.
1429         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
1430         bblock, since the arguments are still in their original registers.
1431
1432         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
1433
1434 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
1435
1436         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
1437         as well.
1438
1439         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
1440         offset 0.
1441
1442         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
1443
1444         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
1445         process async exceptions received while in unmanaged code.
1446
1447         * mini.c (mini_init): Install a callback with the runtime which will be called
1448         when a thread receives an async exception while in unmanaged code.
1449
1450         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
1451
1452         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
1453
1454 2008-01-16  Wade Berrier  <wberrier@novell.com>
1455
1456         * cpu-g4.md:
1457         * cpu-arm.md:
1458         * cpu-s390x.md:
1459         fix build
1460
1461 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
1462
1463         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
1464         compilation with sun cc.
1465
1466         * cpu-*.md: Fix the build.
1467
1468         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
1469
1470         * mini-amd64.h: Add some comments to the MonoLMF structure.
1471
1472         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
1473         
1474         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
1475         in the LMF structure if possible. This saves two instructions in the
1476         managed->native wrappers.
1477
1478         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
1479
1480 2008-01-16  Mark Probst  <mark.probst@gmail.com>
1481
1482         * generic-sharing.c: New type argument lookup code which uses the
1483         runtime generic context template.
1484
1485 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
1486
1487         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
1488
1489         * mini-arm.c (add_general): Fix arm eabi parameter passing.
1490         (mono_arch_output_basic_block): Fix localloc implementation.
1491
1492         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
1493
1494         * mini-ia64.c (peephole_pass): Fix ia64 build.
1495
1496         * mini-amd64.c (peephole_pass): Fix a warning.
1497         
1498         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
1499         at a constant offset from sp/fp.
1500
1501         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
1502         instead of obtaining it from *lmf in the managed method case.
1503
1504 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
1505
1506         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
1507
1508 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
1509
1510         * mini.h (MonoInstList): New type.
1511         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
1512         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
1513         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
1514         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
1515         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
1516         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
1517         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
1518         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
1519         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
1520         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
1521         MONO_INST_LIST_FOR_EACH_ENTRY,
1522         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
1523         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
1524         mono_inst_list_first, mono_inst_list_last,
1525         mono_inst_list_next, mono_inst_list_prev): New instruction
1526         list handling interfaces.
1527         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
1528         list head 'ins_list'.
1529         (MonoInst): Replace next pointer with list head 'node'.
1530         (MonoCallInst): Make 'out_args' a MonoInstList.
1531         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
1532         (MonoCompile): Delete reverse_inst_list and
1533         reverse_inst_list_len.
1534         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
1535         mono_arch_lowering_pass, mono_arch_local_regalloc,
1536         mono_arch_output_basic_block, mono_arch_emit_prolog):
1537         Convert to new instruction lists.
1538         (insert_after_ins): Delete.
1539         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
1540         instruction lists.
1541         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
1542         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
1543         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
1544         mono_emulate_opcode, mono_emit_load_got_addr,
1545         inline_method, mono_method_to_ir, mono_print_bb_code,
1546         print_dfn, decompose_pass, nullify_basic_block,
1547         replace_out_block_in_code, remove_block_if_useless,
1548         merge_basic_blocks, move_basic_block_to_end,
1549         try_unsigned_compare, optimize_branches, mono_print_code,
1550         mini_select_instructions, remove_critical_edges): Likewise.
1551         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
1552         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
1553         mono_arch_output_basic_block, mono_arch_emit_prolog):
1554         Likewise.
1555         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
1556         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1557         mono_arch_output_basic_block): Likewise.
1558         (inst_list_prepend, insert_after_ins): Delete.
1559         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
1560         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
1561         instruction lists.
1562         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
1563         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
1564         mono_arch_emit_prolog): Likewise.
1565         * cfold.c (mono_constant_fold): Likewise.
1566         * liveness.c (visit_bb, mono_analyze_liveness,
1567         optimize_initlocals): Likewise.
1568         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
1569         * graph.c (mono_draw_code_cfg): Likewise.
1570         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
1571         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
1572         mono_ssa_cprop): Likewise.
1573         * abcremoval (get_relations_from_previous_bb, process_block):
1574         Likewise.
1575         * local-propagation (mono_cprop_invalidate_values,
1576         mono_local_cprop_bb): Likewise.
1577         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
1578         peephole_pass, mono_arch_output_basic_block,
1579         mono_arch_emit_prolog): Likewise.
1580         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
1581         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1582         mono_arch_emit_prolog): Likewise.
1583         (insert_after_ins): Delete.
1584         * aliasing.c (print_code_with_aliasing_information,
1585         mono_build_aliasing_information, mono_aliasing_deadce):
1586         Convert to new instruction lists.
1587         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
1588         peephole_pass, NEW_INS, mono_arch_lowering_pass,
1589         mono_arch_local_regalloc, mono_arch_output_basic_block):
1590         Likewise.
1591         (insert_after_ins): Delete.
1592         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
1593         peephole_pass, mono_arch_output_basic_block): Convert to
1594         new instruction lists.
1595         * mini-codegen (InstList, inst_list_prepend,
1596         insert_after_ins): Delete.
1597         (insert_before_ins, get_register_force_spilling,
1598         get_register_spilling, free_up_ireg, free_up_reg,
1599         create_copy_ins, create_spilled_store, alloc_int_reg,
1600         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
1601         to new instruction lists.
1602         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
1603         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1604         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
1605         (insert_after_ins): Delete.
1606         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
1607         mono_arch_local_regalloc, mono_arch_output_basic_block,
1608         mono_arch_call_opcode): Convert to new instruction lists.
1609         (insert_after_ins): Delete.
1610         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
1611         peephole_pass, mono_arch_output_basic_block,
1612         mono_arch_emit_prolog): Convert to new instruction lists.
1613
1614 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
1615
1616         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
1617
1618         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
1619         Fixes #353182.
1620
1621         * Makefile.am (version.h): Make this work with non-bash shells.
1622
1623 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
1624
1625         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
1626
1627 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
1628
1629         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
1630         the InitializeArray optimization.
1631
1632 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
1633
1634         * mini.c driver.c: Don't include os/gc_wrapper.h.
1635
1636 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
1637
1638         * mini.c (print_jit_stats): Print GC statistics if available.
1639
1640 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
1641
1642         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
1643
1644 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
1645
1646         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
1647
1648 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
1649
1650         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
1651         
1652         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
1653
1654         * driver.c (mono_main): Ditto.
1655
1656 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
1657
1658         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
1659
1660         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
1661         in the vtable can't be encoded.
1662         (compile_method): Ditto.
1663
1664 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
1665
1666         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
1667         defined.
1668
1669         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
1670         lmf->rbp.
1671
1672         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
1673         the top LMF entry belongs to the current method.
1674
1675         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
1676
1677 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
1678
1679         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
1680         
1681         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
1682
1683         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
1684
1685         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
1686
1687         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
1688
1689         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
1690         implementation.
1691
1692         * basic-float.cs: Add an ulong->double cast test.
1693
1694 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
1695
1696         * mini.c (mono_method_to_ir): Fix a warning.
1697
1698 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
1699
1700         * mini-ops.h: Add OP_SWITCH.
1701
1702         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
1703         CEE_SWITCH in back-end code, use OP_SWITCH instead.
1704
1705 2007-12-11  Geoff Norton  <gnorton@novell.com>
1706
1707         * mini-s390x.c: Minor change to the MAX() define to allow
1708         it to compile with other gcc versions.
1709
1710 2007-12-11  Geoff Norton  <gnorton@novell.com>
1711
1712         * cpu-s390x.md:
1713         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
1714
1715 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
1716
1717         exceptions-arm.c (mono_arch_get_restore_context): Restore
1718         the frame pointer.
1719
1720         exceptions-arm.c (throw_exception): Save the frame pointer.
1721         This is a partial fix for #323747. Only the client side is
1722         fixed.
1723
1724 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
1725
1726         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
1727         was using an unrelated variable to log the class which
1728         needed the cctor to be called. This was crashing on arm.
1729
1730 2007-12-09  Robert Jordan  <robertj@gmx.net>
1731
1732         * mini-x86.c (mono_arch_emit_epilog):
1733         Consider all kinds of 64-bit types. Fixes #323114.
1734
1735 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
1736
1737         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
1738
1739 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1740
1741         * mini-amd64.c (peephole_pass): Add a missing instruction check.
1742
1743 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
1744
1745         * mini.c: run type ctor before allocating an object, not only
1746         when running it's constructor method (fixes at least part of bug #342507).
1747
1748 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1749         
1750         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
1751         
1752         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
1753         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
1754         function.
1755
1756         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
1757         mono_generic_class_init_trampoline () the same as it is done with the other
1758         trampolines.
1759
1760         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
1761         aot-runtime.c aot-compiler.c: Implement AOT support.    
1762
1763 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1764
1765         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
1766         build for archs which don't have the vtable trampoline defined
1767         yet.
1768
1769 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1770
1771         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
1772
1773         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
1774
1775         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
1776
1777         * tramp-<ARCH>.c: Use the new helper function.
1778
1779 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1780
1781         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
1782         trampoline call, which takes a vtable argument.
1783
1784         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
1785         OP_TRAMPCALL_VTABLEs like other calls.
1786
1787         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
1788         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
1789         call.  Implemented a support function which fetches the vtable
1790         from a register set.
1791
1792         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
1793         Implemented a generic class init trampoline, using the
1794         OP_TRAMPCALL_VTABLE opcode.
1795
1796         * mini.c: Implemented static field access when sharing generic
1797         code.  This implies initing the class using the new
1798         OP_TRAMPCALL_VTABLE call.
1799
1800 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1801
1802         * mini.c: Don't compile methods with sharing enabled if their
1803         classes are disabled for sharing.
1804
1805 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
1806
1807         * inssel.brg: Add a missing sign extension to the GETCHR and array access
1808         opcodes. Fixes #346563.
1809
1810         * objects.cs: Add a new test.
1811
1812         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
1813
1814         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
1815         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
1816
1817 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
1818
1819         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
1820
1821 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
1822
1823         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
1824         code stream.
1825
1826 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
1827
1828         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
1829
1830         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
1831         optimization in the AOT case.
1832         
1833 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
1834
1835         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
1836         
1837         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
1838
1839         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
1840
1841         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
1842
1843         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
1844         is created by the inlined delegate ctor.
1845
1846         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
1847
1848         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
1849
1850 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
1851
1852         * cpu-x86.md: Fix the length of ckfinite.
1853
1854 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
1855
1856         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
1857         
1858         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
1859         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
1860
1861         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
1862
1863         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
1864         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
1865
1866 2007-11-28  Martin Baulig  <martin@ximian.com>
1867
1868         * mini-x86.c
1869         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
1870         after creating the trampoline.
1871
1872 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
1873
1874         * aot-runtime.c (load_aot_module): Check runtime version if needed.
1875
1876         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
1877         the same version.
1878
1879         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
1880         instead of the calling method to help AOT.
1881
1882         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
1883
1884 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
1885
1886         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
1887         is defined.
1888
1889 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
1890
1891         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
1892         
1893         * aot-compiler.c (compile_method): Correct check for generic method definitions.
1894         (encode_method_ref): No need to handle generic method definitions specially.
1895
1896         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1897
1898         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
1899         decode_klass_info.
1900
1901         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
1902         encode_klass_info.
1903         (compile_method): Enable generic sharing.
1904
1905 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
1906
1907         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
1908         (mini_method_compile): Add preliminary support for AOTing shared generic code.
1909
1910         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
1911         generic code.
1912
1913         * mini-trampolines.c: Fix a warning.
1914
1915         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
1916         NEW_PCONST.
1917         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
1918         (generic_class_is_reference_type): Remove unused function.
1919
1920         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
1921         in the generic vtable trampoline case.
1922
1923         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
1924         
1925         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
1926         return an AOT method based on a vtable slot.
1927
1928         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
1929
1930         * mini.c (mini_get_vtable_trampoline): Export this.
1931
1932 2007-11-22  Martin Baulig  <martin@ximian.com>
1933
1934         * debug-debugger.h
1935         (MonoDebuggerInfo): Move `debugger_version' up.
1936
1937 2007-11-22  Martin Baulig  <martin@ximian.com>
1938
1939         * mini-amd64.c
1940         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
1941
1942         * mini-trampolines.c
1943         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
1944         after compiling the method.
1945
1946 2007-11-20  Martin Baulig  <martin@ximian.com>
1947
1948         * debug-mini.c
1949         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
1950         (mono_debugger_remove_breakpoint): Likewise.
1951         (mono_debugger_check_breakpoints): Likewise.
1952
1953         * debug-debugger.c: Implement the new breakpoint interface here.
1954
1955 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
1956
1957         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
1958         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
1959
1960         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
1961
1962 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
1963
1964         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
1965
1966         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
1967         mini.c.
1968
1969         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
1970         mini.c.
1971
1972         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
1973         returning a vtype in a register.
1974
1975         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
1976         here from the arch specific code.
1977
1978         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
1979         mini.c.
1980
1981         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
1982         (mono_arch_emit_prolog): Increment maximum prolog size.
1983
1984         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
1985         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
1986
1987         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
1988         MonoGenericSharingContext.
1989
1990         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
1991         MonoGenericSharingContext. Allocate memory from the cfg mempool.
1992
1993 2007-11-15  Mark Probst  <mark.probst@gmail.com>
1994
1995         * mini.c, mini.h, generic-sharing.c: Functions for producing code
1996         which extract fields out of the runtime generic context.  Full
1997         sharing of the NEWARR opcode.
1998
1999 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
2000
2001         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
2002         --enable-minimal=ssa.
2003
2004 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
2005
2006         * mini-trampolines.c (mono_delegate_trampoline): Update after 
2007         mono_marshal_get_delegate_invoke () signature change.
2008
2009 2007-11-13  Mark Probst  <mark.probst@gmail.com>
2010
2011         * mini.c: Removed the shared context in favor of the generic
2012         sharing context.  Allocate the MonoJitInfo structure with room for
2013         the generic sharing context if it's needed.
2014
2015         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
2016         domain-internals.h now.
2017
2018         * mini-x86.c: Pass the generic sharing context to get_call_info ().
2019
2020         * generic-sharing.c: Several changes for working without a shared
2021         context and instead operating on open types instead.
2022
2023 2007-11-12  David S. Miller  <davem@davemloft.net>
2024
2025        * inssel-sparc.brg: Fix double instruction emit.
2026
2027 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
2028
2029         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
2030         Get/Set/Address methods.
2031         
2032         * mini.c debug-debugger.c mini-trampolines.c: Update after 
2033         mono_marshal_get_delegate_invoke signature change.
2034
2035 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2036
2037         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
2038         This can happens with dynamic methods. Fixes the other bug in #322722.
2039
2040 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2041
2042         * tramp-arm.c (mono_arch_patch_callsite): Support patching
2043         BX call sequence.
2044
2045         * mini-arm.c (arm_patch): Implement patching of BX call
2046         sequence. Fixes one of the bugs in #322722.
2047
2048 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
2049
2050        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
2051        under Linux.  We only need to flush every 32-byte cache line.    
2052
2053 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
2054
2055         * mini.c:
2056         move_basic_block_to_end: Add branches when needed, eventually creating
2057         a new BB.
2058         optimize_branches: added a parameter that tells if it's ok to create
2059         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
2060         and avoid calling move_basic_block_to_end when it's not ok.
2061         Fixes bug 318677.
2062
2063 2007-11-07  Mark Probst  <mark.probst@gmail.com>
2064
2065         * mini.c: Abort inlining call to InitializeArray if something
2066         looks wrong.  Let the icall handle it, which now has proper safety
2067         checks.
2068
2069 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2070
2071         * mini.c (mono_spill_call): add support for soft-float.
2072
2073         * mini.c (mono_method_to_ir): add support for soft-float
2074         to inlined functions that return float.
2075
2076         * mini.c (mono_method_to_ir): add support for soft-float
2077         to cee_stsfld opcode on float fields.
2078
2079 2007-11-05  Geoff Norton  <gnorton@novell.com>
2080
2081         * mini-x86.h: Fix the structure access for X86 Leopard.
2082
2083
2084 2007-11-05  Martin Baulig  <martin@ximian.com>
2085
2086         * mini-trampolines.c
2087         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
2088         after compiling the method to notify the debugger.
2089
2090 2007-11-05  Martin Baulig  <martin@ximian.com>
2091
2092         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
2093
2094 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
2095
2096         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
2097         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
2098
2099 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
2100
2101         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
2102         native-to-managed wrappers.
2103         
2104 2007-11-01  Geoff Norton  <gnorton@novell.com>
2105
2106         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
2107         members.
2108
2109 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
2110
2111         * mini.c, mini-x86.c: when getting back from unmanaged code
2112         to managed via a marshaled delegate we also need to set the
2113         right domain.
2114
2115 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
2116
2117         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
2118         for amd64.
2119
2120 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
2121
2122         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
2123         let the debugger or other external agents to tell the JIT when
2124         a sw breakpoint has been inserted in the code that the JIT needs
2125         to be able to inspect.
2126
2127 2007-10-31  Martin Baulig  <martin@ximian.com>
2128
2129         * debug-debugger.h
2130         (MonoDebuggerInfo): Remove `runtime_class_init'.
2131
2132 2007-10-30  Martin Baulig  <martin@ximian.com>
2133
2134         * debug-mini.h
2135         (mono_debugger_thread_created): Added `MonoThread *' argument.
2136         (mono_debugger_extended_notification): New public method.
2137         (mono_debugger_trampoline_compiled): New public method.
2138
2139         * debug-mini.c
2140         (MonoDebuggerThreadInfo): Added `thread' and
2141         `extended_notifications' fields.
2142
2143         * debug-debugger.c
2144         (debugger_executable_code_buffer): New static variable.
2145
2146         * debug-debugger.h
2147         (MonoDebuggerInfo): Added `executable_code_buffer',
2148         `executable_code_buffer_size', `breakpoint_info_area',
2149         `breakpoint_table' and `breakpoint_table_size'.
2150
2151 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
2152
2153         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
2154         that IP  either is an unused value or the vtable pointer. IMT 
2155         calls use vtable + offset now. Reduced by almost half the size
2156         of IMT entries.
2157
2158 2007-10-26  Jonathan Chambers <joncham@gmail.com>
2159
2160         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
2161         defines to access param registers. Replace long usage with
2162         gsize as sizeof(long) != sizeof(void*) on Win64.
2163
2164         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
2165         on Win64. Fix intrinsic, use _AddressOfReturnAddress
2166         instead of non-existant _GetAddressOfReturnAddress.
2167
2168         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
2169         param registers. Save/restore %rdi and %rsi in MonoLMF.
2170
2171         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
2172         param registers. Modify (throw_exception) signature to take 
2173         %rdi and %rsi on Win64. 
2174
2175         Code is contributed under MIT/X11 license.
2176
2177 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
2178
2179         * helpers.c: unlink debugging output files.
2180
2181 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
2182
2183         * mini.c: Move mono_create_ftnptr () to object.c.
2184
2185 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2186
2187         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
2188         optional. This function can now be used to disassemble code generated
2189         outside the JIT such as trampolines and IMT thunks.
2190
2191         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
2192
2193         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
2194         vtable pointer from a ldr instruction.
2195
2196         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
2197         new IMT call sequence.
2198
2199         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
2200         call sequence for interface invocations.
2201
2202         * mini-arm.c (mono_arch_emit_imt_argument): added, required
2203         for imt support. This function is empty since IMT on ARM requires no
2204         special handling on the IR side.
2205
2206         * mini-arm.c (mono_arch_find_imt_method): added, required for
2207         imt support.
2208
2209         * mini-arm.c (mono_arch_find_this_argument): added, required
2210         for imt support.
2211
2212         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
2213         a ldr instruction to load a value stored in the code stream.
2214
2215         * mini-arm.c (mono_arch_build_imt_thunk):added, required
2216         for imt support.
2217
2218
2219 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
2220
2221         * mini.c (mini_init): Install the jump trampoline callback.
2222
2223 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2224
2225         * mini-trampolines.c: handle synchronized methods with the common
2226         vtable trampoline (bug #335601).
2227
2228 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
2229
2230         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
2231
2232         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
2233         64 bit platforms.
2234
2235         * mini-ia64.h mini-ia64.c: Add support for IMT.
2236
2237         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
2238         prolog. Fixes #331958.
2239
2240 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
2241
2242         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
2243
2244 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2245
2246         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
2247         trampoline.
2248
2249 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2250
2251         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
2252         trampoline.
2253
2254 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
2255
2256         * mini-x86.c, mini-x86.h: x86 support for the common vtable
2257         trampoline.
2258
2259 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
2260
2261         * mini-trampolines.c: changed the magic rampoline to understand
2262         the common vtable trampoline method: the method to invoke is
2263         determined by the vtable displacement of the call.
2264
2265 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2266
2267         * mini.c, mini.h: register the common vtable trampoline if the
2268         architecture supports it.
2269
2270 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2271
2272         * cpu-amd64.md: use the correct max length for tls_get.
2273
2274 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
2275
2276         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
2277         CEE_STELEM_ANY. Fixes #333696.
2278
2279 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2280
2281         * exceptions-x86.c: provide more graceful handling of the case where
2282         we followed a bogus function pointer from managed code (bug #332866).
2283
2284 2007-10-11  Mark Probst  <mark.probst@gmail.com>
2285
2286         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
2287         replaces the generic_shared flag and will carry more information
2288         in the future.
2289
2290         * generic-sharing.c: Added mini_type_stack_size() which allows
2291         allows open types if given a generic sharing context.
2292         mini_get_basic_type_from_generic() takes a
2293         MonoGenericSharingContext* instead of a MonoCompile* now.
2294
2295         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
2296         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
2297         mini-sparc.c, mini-x86.c: Trivial changes required by the two
2298         changes above.  Just passing arguments through to the right
2299         places.
2300
2301 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2302
2303         * mini-arm.c: unify the call emission to emit_code_seq().
2304
2305 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
2306
2307         * tramp-arm.c: reduced the trampoline size.
2308
2309 2007-10-10  Mark Probst  <mark.probst@gmail.com>
2310
2311         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
2312         variable handling out of arch-specific code.
2313
2314 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
2315
2316         * mini-arm.c: implemented fast delegate dispatch.
2317
2318 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2319
2320         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
2321         that fp elimination is turned off if the space required by locals is too
2322         big. Fixes #331958.
2323
2324 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
2325
2326         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
2327         ARM to the new style trampoline.
2328
2329 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2330
2331         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
2332
2333         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
2334
2335 2007-10-09  Martin Baulig  <martin@ximian.com>
2336
2337         * debug-debugger.h
2338         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
2339         `field_info_offset_offset'.     
2340
2341 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
2342
2343         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
2344         removed more internal usage of the r11 register and made it available
2345         to the register allocator.
2346
2347 2007-10-08  Mark Probst  <mark.probst@gmail.com>
2348
2349         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
2350         when sharing generics and treat type variables as references.
2351
2352 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2353
2354         * mini-ppc.c: started removing the internal uses of register r11
2355         to eventually allow the register allocator to manage it as an
2356         additional available register.
2357
2358 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2359
2360         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
2361
2362 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
2363
2364         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
2365         specific trampolines as they are not performance critical as a jump
2366         target (maybe align as before only for AOT code?). This saves about
2367         200 KB of native code on x86 for monodevelop startup.
2368
2369 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
2370
2371         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
2372         monodevelop startup.
2373
2374 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
2375
2376         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
2377
2378         * mini-sparc.h mini-sparc.c: Implement IMT support.
2379
2380         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
2381         its smaller and doesn't clobber sparc_g1.
2382
2383         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
2384
2385 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
2386
2387         * mini-ppc.c: optimized the size of the IMT thunks a bit.
2388
2389 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
2390
2391         * mini-ppc.c: implemented fast delegate invocation.
2392
2393 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
2394
2395         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
2396
2397 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2398
2399         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
2400         code to the new style trampoline in preparation for IMT support.
2401
2402 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
2403
2404         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
2405         systems already. This also reduces the specific trampiline sizes and
2406         prepares for the use of r12 as the IMT identifier register.
2407
2408 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2409
2410         * mini-mips.h: endianess fix (simplified from a patch by
2411         Thomas Kunze <thommy@tabao.de>, bug #323737).
2412
2413 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2414
2415         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
2416         to access ucontext fields and enable netbsd support
2417         (partially from Magnus Henoch <mange@freemail.hu>).
2418
2419 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2420
2421         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
2422         use the preprocessor from the CPP env var if it is set.
2423
2424 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2425
2426         * mini-trampolines.c: fixed an assertion and moved it earlier in the
2427         code, before interface_offset gets used.
2428
2429 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
2430
2431         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
2432         mono_class_setup_vtable () before accessing klass->vtable.
2433
2434 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
2435
2436         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
2437         hackish.
2438
2439 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2440
2441         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
2442         IMT slots (this saves hundreds of KB of memory in programs like
2443         IronPython and Monodevelop).
2444
2445 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2446
2447         * mini.c: print the delegate counter.
2448
2449 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
2450
2451         * mini-x86.c: make it easier to enable the debugging code for IMT
2452         slots.
2453
2454 2007-09-28  Martin Baulig  <martin@ximian.com>
2455
2456         * debug-debugger.h
2457         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
2458         `mono_method_klass_offset' and `mono_method_token_offset'.
2459
2460 2007-09-20  Mark Probst  <mark.probst@gmail.com>
2461
2462         * mini.c: First generics sharing implementation.  Can only share
2463         in very simple cases.  If sharing doesn't work it falls back to
2464         dedicated compilation.
2465
2466         * mini.h: Flag in MonoCompile to specify whether generic
2467         compilation is shared.  Flags enum for marking which generic inst
2468         of a context is used.  Prototypes for helper functions.
2469
2470         * generic-sharing.c: Helper functions for generic method sharing.
2471
2472         * optflags-def.h: Optimization flag (gshared) for enabling generic
2473         method sharing added.
2474
2475         * Makefile.am: generic-sharing.c added.
2476
2477 2007-09-19 Daniel Nauck <dna@mono-project.de>
2478
2479         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
2480
2481 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
2482         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
2483         fixes bug 325507.
2484
2485 2007-09-19  Martin Baulig  <martin@ximian.com>
2486
2487         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
2488         mono_debug_cleanup() is now part of mono_cleanup().
2489
2490 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
2491
2492         * driver.c (mono_main): Fix a warning.
2493
2494 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
2495
2496         * aot-compiler.c: Optimize various parts when processing large assemblies.
2497         Fixes ##325568.
2498
2499         * mini.c (mono_patch_info_hash): Improve hash function.
2500
2501 2007-09-14  Jonathan Chambers <joncham@gmail.com>
2502
2503         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
2504         
2505         Code is contributed under MIT/X11 license.
2506
2507 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2508
2509         * mini.c (mini_init): Fix a leak.
2510
2511         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
2512
2513 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2514
2515         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
2516
2517 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2518
2519         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
2520
2521 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
2522
2523         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
2524         variance tests.
2525
2526         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
2527
2528         * mini.c (handle_alloc): Enable managed allocators in AOT code.
2529
2530         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
2531
2532         * aot-runtime.c (decode_patch_info): Ditto.
2533
2534 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2535
2536         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
2537         static case. Cache delegates in architecture specific code, 
2538         based on number of parameters.
2539         
2540         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
2541         in architecture specific code, based on number of parameters.
2542         
2543         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
2544         caching happen in architecture specific code now.
2545         
2546         Code is contributed under MIT/X11 license.
2547
2548 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2549
2550         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
2551         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
2552         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
2553
2554         Code is contributed under MIT/X11 license.
2555
2556 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
2557         * mini.c: (mono_thread_abort) Fixed bug #82416.
2558
2559 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2560
2561         * mini.: hook the new managed GC allocation feature into the JIT.
2562
2563 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2564
2565         * mini.c: implementation for the new runtime tls opcode.
2566
2567 2007-09-11  Martin Baulig  <martin@ximian.com>
2568
2569         * debug-debugger.h
2570         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
2571         `mono_method_inflated_offset'.
2572
2573 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
2574
2575         * driver.c mini.h mini.c: Add a new devel command line option for injecting
2576         async exceptions into a method.
2577
2578         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
2579         purpose of testing whenever the unwinder works at every instruction.
2580
2581 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
2582
2583         * mini.c: check accessibility of method used in ldftn (fixes
2584         bug #82635).
2585
2586 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
2587
2588         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
2589
2590         * inssel.brg: Fix a warning.
2591
2592 2007-09-03  Martin Baulig  <martin@ximian.com>
2593
2594         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
2595         now takes the `main_method' as argument.
2596
2597 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
2598
2599         * cpu-sparc.md (endfilter): Add missing src1:i argument.
2600
2601 2007-08-30  Jonathan Chambers <joncham@gmail.com>
2602
2603         * driver.c: include the cil-coff.h header on Windows.
2604         
2605         Code is contributed under MIT/X11 license.
2606
2607 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2608
2609         * mini.c, driver.c: don't include the cil-coff.h header.
2610
2611 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2612
2613         * mini.c: flag places that needs fixes fo soft-float support.
2614
2615 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
2616
2617         * mini.h, inssel-float.brg: fix soft-float constant loads on big
2618         endian systems (partially from Dean Jenkins, bug #81924).
2619
2620 2007-08-28  Mark Probst  <mark.probst@gmail.com>
2621
2622         * mini.c (check_linkdemand): Remove embedded reference object in
2623         call to LinkDemandSecurityException.
2624         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
2625         with an IntPtr instead of a reference object.
2626
2627 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
2628
2629         * mini.c (handle_initobj): Handle alignment properly.
2630
2631         * inssel.brg (mini_emit_memset): Ditto. 
2632
2633         * inssel.brg (mini_emit_memcpy): Ditto. 
2634
2635         * inssel-sparc.brg: Ditto.              
2636
2637         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
2638
2639 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
2640
2641         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
2642         exceptions raised in unmanaged code. Fixes part of #82594.
2643
2644 2007-08-24  Mark Probst  <mark.probst@gmail.com>
2645
2646         * mini.c (mono_method_to_ir), declsec.c
2647         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
2648
2649 2007-08-22  Martin Baulig  <martin@ximian.com>
2650
2651         * debug-mini.h
2652         (MonoDebuggerThreadInfo): New typedef.
2653         (mono_debugger_thread_table): New global variable.
2654         (mono_debugger_thread_created): New public function.
2655         (mono_debugger_thread_cleanup): New public function.
2656
2657         * debug-debugger.h
2658         (MonoDebuggerInfo):
2659         - removed `get_current_thread' and `lookup_assembly'.
2660         - removed `data_table'.
2661         - added `thread_table'.
2662
2663         * mini.c
2664         (mono_thread_start_cb): Call mono_debugger_thread_created().
2665         (mono_thread_attach_cb): Likewise.
2666         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
2667         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
2668         initial domain.
2669
2670         * driver.c (mono_main): Move mono_debug_init() up, before calling
2671         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
2672
2673 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
2674
2675         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
2676         together when passing several arguments of type double (gives a small
2677         speedup and saves a few bytes of generated code).
2678
2679 2007-08-20  Jb Evain  <jbevain@novell.com>
2680
2681         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
2682
2683 2007-08-20  Jb Evain  <jbevain@novell.com>
2684
2685         * mini.c (mono_method_to_ir): throw MethodAccessException
2686         and FieldAccessException instead of InvalidProgramException.
2687
2688 2007-08-20  Mark Probst  <mark.probst@gmail.com>
2689
2690         * mini.c: CoreCLR security checks.
2691
2692         * mini.h: Removed MonoSecurityMode (moved to
2693         metadata/security-manager.h) and mono_security_mode global var
2694         (replaced by set/get functions in security-manager.h).
2695
2696         * driver.c: Added "core-clr-test" security mode for testing.  Used
2697         set-function for setting security mode.
2698
2699 2007-08-17  Mark Probst  <mark.probst@gmail.com>
2700
2701         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
2702         the new jit_info_table.
2703
2704         * driver.c: Test code for the new jit_info_table (enabled by the
2705         define MONO_JIT_INFO_TABLE_TEST).
2706
2707 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
2708
2709         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
2710         detection of call <REG> instruction sequence. Fixes build on freebsd.
2711
2712 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
2713
2714         * mini-exceptions.c: Fix a warning.
2715
2716 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
2717
2718         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
2719         stack overflow handling code on amd64 too.
2720
2721         * mini-exceptions.c (mono_setup_altstack): Make this use 
2722         mono_thread_get_stack_bounds ().
2723
2724         * mini-x86.h: Disable sigaltstack on solaris x86.
2725
2726 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
2727
2728         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
2729
2730 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
2731
2732         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
2733
2734 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
2735
2736         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
2737
2738         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
2739
2740 2007-08-03  Neale Ferguson <neale@sinenomine.net>
2741
2742         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
2743         due to alignment.
2744
2745 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2746
2747         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
2748         to be emitted (bug #82281).
2749
2750 2007-08-01  Martin Baulig  <martin@ximian.com>
2751
2752         Merged the `debugger-dublin' branch.
2753
2754         * debug-debugger.h (MonoDebuggerInfo):
2755         Removed the `old_*' compatibility entries.
2756         Added `debugger_version' and `data_table'.
2757         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
2758         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
2759
2760         * debug-mini.c
2761         (MiniDebugMethodBreakpointInfo): Add `address_list'.
2762         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
2763         instead of a `gconstpointer'.
2764         (mono_debugger_insert_method_breakpoint): Return a
2765         `MonoDebugMethodAddressList *'.
2766
2767 2007-06-28  Martin Baulig  <martin@ximian.com>
2768
2769         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
2770
2771 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
2772
2773         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
2774         __builtin_frame_address () since it is broken on older gcc versions.
2775
2776 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2777
2778         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
2779         on the stack overflow handling and made the managed stack overflows
2780         catchable in most cases using soft guard pages.
2781         * exceptions-x86.c: added code to restore the protection in the soft
2782         guard pages at the end of exception handling.
2783
2784 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
2785
2786         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
2787
2788 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2789
2790         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
2791         exception handling.
2792
2793 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2794
2795         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
2796         signal handling support until it has been ported to the new mechanism.
2797         * mini.c: fixed stack overflow detection and use the new
2798         architecture code  to handle signals on the altstack.
2799
2800 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
2801
2802         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
2803         stack overflows on the alt stack.
2804
2805 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
2806
2807         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
2808         stack overflows on the alt stack.
2809
2810 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
2811
2812         * exceptions-ppc.c: cleanup preparing for altstack support.
2813
2814 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
2815
2816         * exceptions-arm.c: cleanup preparing for altstack support.
2817
2818 2007-07-27  Mark Probst  <mark.probst@gmail.com>
2819
2820         * mini.c (print_jit_stats): Output hazard pointer stats.
2821
2822 2007-07-26  Mark Probst  <mark.probst@gmail.com>
2823
2824         * driver.c, mini.c: Replaced security mode flags with a single
2825         enum variable.
2826
2827 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2828
2829         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
2830
2831 2007-07-25  Mark Probst  <mark.probst@gmail.com>
2832
2833         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
2834         (which doesn't do anything yet) for activating Core CLR
2835         (Silverlight) security.
2836
2837 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
2838
2839         * mini-codegen.c: work around a possible gcc bug on arm.
2840
2841 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2842
2843         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
2844         message for platforms that don't support AOT compilation.
2845
2846 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2847
2848         * mini.h, mini.c, driver.c: temporary smcs hack.
2849
2850 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
2851
2852         * mini-arm.h, mini-arm.c: arm EABI fixes.
2853
2854 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
2855
2856         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
2857         case.
2858
2859         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
2860         trampolines taking a method argument.
2861
2862         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
2863
2864         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
2865         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
2866
2867         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
2868         JIT compilation throws an exception. Fixes #82050.
2869
2870 2007-07-19  Mark Probst  <mark.probst@gmail.com>
2871
2872         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
2873         with the MONO_EXCEPTION_ defines.
2874
2875 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
2876
2877         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
2878         #82117.
2879         
2880         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
2881         the cause of an assertion.
2882
2883 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
2884
2885         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
2886         removed.
2887
2888 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
2889
2890         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
2891         assert. Should fix #82103.
2892
2893 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
2894
2895         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
2896         here too. Fixes #82095.
2897
2898         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
2899         addresses.
2900
2901         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
2902
2903         * mini-amd64.h: Enable IMT for amd64.
2904         
2905         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
2906
2907 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
2908
2909         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
2910
2911 2007-07-12  Mark Probst  <mark.probst@gmail.com>
2912
2913         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
2914         as soon as check_linkdemand sets an exception_type.
2915
2916 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2917
2918         * mini-x86.c: fixed offsets for IMT call sequence.
2919         * mini-x86.h: enable IMT again.
2920
2921 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
2922
2923         * trace.c (mono_trace_enter_method): Decode MonoType too.
2924
2925         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
2926
2927         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
2928
2929         * mini-amd64.c: Add preliminary IMT implementation.
2930         
2931 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
2932
2933         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
2934         understand the new IMT-base interface invocation (thanks to
2935         Daniel Nauck for the report and the remote debugging session).
2936
2937 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2938
2939         * mini-x86.c: size and speed optimizations for the IMT bsearch.
2940
2941 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
2942
2943         * Makefile.am (aotcheck): Make this actually use the AOTed code.
2944
2945 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
2946
2947         * mini-trampolines.c: implement AOT IMT support.
2948         * mini-x86.h: enable IMT support for wider testing.
2949
2950 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
2951
2952         * inssel.brg (emit_imt_argument): Add aot support here.
2953
2954         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
2955
2956 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
2957
2958         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
2959         of the IMT implementation, partially from massi, with my
2960         implementation of the bsearch sequence. Disabled by default until
2961         the AOT code is implemented.
2962
2963 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
2964
2965         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
2966
2967         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
2968
2969 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2970
2971         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
2972         arch-independent IMT JIT code from Massimiliano
2973         Mantione (massi@ximian.com) with small cleanups from me.
2974
2975 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
2976
2977         * Makefile.am: fix svn invocation to get the svn revision to be
2978         independent of the local language (build fix).
2979
2980 2007-07-09  Mark Probst  <mark.probst@gmail.com>
2981
2982         * mini.c (inline_method): Reset cfg->exception_type if the
2983         inlining is aborted.  Fixes: 82049.
2984
2985 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
2986
2987         * mini.c: remove assert from exception handling code when exception_ptr
2988         is not set.
2989
2990 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
2991
2992         * mini.c (mono_codegen): Add an assert.
2993
2994         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
2995         enter and leave code.
2996         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
2997
2998 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2999
3000         * mini-ppc.c: fixed memory corruption for localloc(0)
3001         (bug #81852).
3002
3003 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3004         
3005         * mini.c: Fix warnings.
3006
3007 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
3008
3009         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
3010         to emit better double->int conversions.
3011
3012 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
3013
3014         * mini.c: the provided Min/Max optimizations are valid for unisgned
3015         ints.
3016
3017 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
3018
3019         * 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
3020
3021 2007-06-28  Miguel de Icaza  <miguel@novell.com>
3022
3023         * mini.c (mono_running_on_valgrind): Add support for reporting the
3024         method and  its boundaries to valgrind.
3025
3026 2007-06-28  Martin Baulig  <martin@ximian.com>
3027
3028         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3029
3030 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
3031
3032         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
3033
3034         * generic.2.cs: Add new test case.
3035
3036 2007-06-25  Martin Baulig  <martin@ximian.com>
3037
3038         Merged the `debugger-dublin' branch.
3039
3040         * debug-mini.c
3041         (mono_debugger_insert_method_breakpoint): New public method.
3042         (mono_debugger_remove_method_breakpoint): Likewise.
3043         (mono_debugger_check_breakpoints): New static method.
3044         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
3045
3046         * debug-debugger.h (MonoDebuggerInfo):
3047         Renamed (to keep backward compatibility in the vtable):
3048         `insert_breakpoint' -> `old_insert_breakpoint'.
3049         `remove_breakpoint' -> `old_remove_breakpoint'.
3050         `create_string' -> `old_create_string'.
3051         `lookup_class' -> `old_lookup_class'.
3052         `lookup_type' -> removed; changed into a dummy field.
3053         `lookup_assembly' -> `old_lookup_assembly'.
3054         Added (same functionality, but different signature):
3055         `create_string', `lookup_class', `lookup_assembly'
3056         Added new:
3057         `get_method_addr_or_bpt', `remove_method_breakpoint',
3058         `runtime_class_init'.
3059
3060         * debug-debugger.c: Merged the `debugger-dublin' branch.
3061
3062 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
3063
3064         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
3065         well.
3066         (peephole_pass): Likewise.
3067
3068 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
3069
3070         * driver.c: hopefully make setaffinity work also for ancient
3071         versions of linux.
3072
3073 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
3074
3075         * driver.c : win32 build fix.
3076
3077 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3078
3079         * driver.c: check for the MONO_NO_SMP env var and bind to a single
3080         processor if it is set.
3081
3082 2007-06-21  Martin Baulig  <martin@ximian.com>
3083
3084         * debug-mini.h: New file.
3085
3086         * debug-mini.c
3087         (mono_debugger_insert_breakpoint_full): Moved here from
3088         ../metadata/mono-debug-debugger.c.
3089         (mono_debugger_remove_breakpoint): Likewise.
3090         (mono_debugger_breakpoint_callback): Likewise.
3091
3092 2007-06-15  Raja R Harinath  <rharinath@novell.com>
3093
3094         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3095         changes in MonoGenericClass.
3096
3097 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
3098
3099         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
3100
3101 2007-06-14  Raja R Harinath  <rharinath@novell.com>
3102
3103         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3104         removal of MonoGenericMethod.
3105
3106 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3107
3108         * mini-exceptions.c: hooks for the exception events profiling API.
3109
3110 2007-06-14  Randolph Chung  <tausq@debian.org>
3111
3112         * Makefile.ma: Add hppa target.
3113         * mini-arch.h: Include mini-hppa.h
3114         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
3115         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
3116         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3117
3118 2007-06-14  Randolph Chung  <tausq@debian.org>
3119
3120         * inssel.brg: Add rules for "chained" compare-branch operations so that
3121         a single compare op can affect multiple branches.  Adjust cost for
3122         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
3123         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
3124         cost for some rules so that they can more easily be overridden by
3125         per-arch rules (with fixes from lupus).
3126         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3127
3128 2007-06-13  Randolph Chung  <tausq@debian.org>
3129
3130         * mini-ops.h: Reorder branch ops so that they match the order of the
3131         corresponding CEE_* ops.  The code expects them this way.
3132         Add new ops for HPPA target.
3133         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3134
3135 2007-06-13  Randolph Chung  <tausq@debian.org>
3136
3137         * mini-exceptions.c: Handle cases where the stack grows towards
3138         larger addresses.
3139         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3140
3141 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
3142
3143         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
3144         counter.
3145         * driver.c: explain where a non-matching corlib is found.
3146
3147 2007-06-13  Mark Probst  <mark.probst@gmail.com>
3148
3149         * mini.c (print_jit_stats): Output dynamic code allocation stats.
3150
3151 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
3152
3153         * mini-exceptions.c: Generate a method profile leave event during
3154         an exception to ensure that the profiler gets notified.
3155
3156 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
3157
3158         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
3159         branch.
3160
3161         * cpu-amd64.md: Add long_and/or/xor opcodes.
3162
3163 2007-06-06  Wade Berrier  <wberrier@novell.com>
3164
3165         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
3166         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
3167         length of instruction shr_imm (expected 8, got 10)
3168
3169 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
3170
3171         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
3172
3173 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3174
3175         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3176         MonoInternalHashTable again (fixed bug in the internal hash table
3177         code).
3178
3179 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3180
3181         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
3182         Have to figure out what makes it crash the SWF regression.
3183
3184 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
3185
3186         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
3187
3188 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3189
3190         * mini.c: optimize out the type check when storing null in a
3191         reference array.
3192
3193 2007-06-04  Mark Probst  <mark.probst@gmail.com>
3194
3195         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3196         MonoInternalHashTable.
3197
3198 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
3199
3200         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
3201         signed integer methods.
3202
3203 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3204
3205         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
3206         permanently since the current approach doesn't work.
3207
3208 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3209
3210         * inssel.brg (stmt): Only call delegate->invoke_impl if 
3211         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
3212
3213 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3214
3215         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
3216         the sreg2==rdx case.
3217         
3218         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
3219         account if it contains a rex prefix.
3220         (peephole_pass): Handle OP_FMOVE as well.
3221
3222 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3223
3224         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
3225         as it causes regressions.
3226
3227 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
3228
3229         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
3230         static case as well.
3231
3232         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
3233
3234         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3235         (mono_arch_get_this_arg_from_call): Ditto.
3236
3237         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
3238
3239         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
3240         invoke_impl field.
3241
3242         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3243         (mono_arch_get_this_arg_from_call): Ditto.
3244
3245         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
3246         
3247         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
3248         try to create optimized invoke code and use that for further invocations. 
3249         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
3250
3251         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
3252
3253 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
3254
3255         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
3256         sealed classes or methods.
3257         *devirtualization.cs: tests for the new optimization
3258
3259 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
3260
3261         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
3262         by the update_volatile () function.
3263
3264 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
3265
3266         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
3267         require it.
3268
3269         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
3270
3271 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
3272
3273         * mini.c: Add configure checks for header files.
3274         * mini-x86.c: Add configure checks for header files.
3275         * trace.c: Add configure checks for header files.
3276         * aot-runtime.c: Add configure checks for header files.
3277         * aot-compiler.c: Add configure checks for header files.
3278         * driver.c: Add configure checks for header files.
3279         * mini-codegen.c: Add configure checks for header files.
3280         
3281         Code is contributed under MIT/X11 license.
3282
3283 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
3284
3285         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
3286         icompare_imm -128 + op_iclt. Fixes #81703.
3287
3288 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
3289
3290         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
3291
3292 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
3293
3294         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
3295         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
3296         so that all isinst checks now use "interface_bitmap".
3297
3298 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
3299
3300         * cpu-amd64.md (jmp): Fix a warning.
3301
3302         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
3303
3304         * basic.cs: Add new regression test.
3305
3306         * basic.cs: Remove test which is now in basic-long.cs.
3307
3308         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
3309
3310         * basic-long.cs: Add new test.
3311         
3312 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
3313
3314         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
3315
3316 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
3317
3318         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
3319
3320         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
3321         places.
3322         
3323         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
3324         throwing code a bit.
3325
3326         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
3327         the exception throwing code a bit.
3328
3329         * mini-x86.c (get_call_info): Allocate result from a mempool.
3330
3331 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
3332
3333         * aot-compiler.c (find_typespec_for_class): Fix the assert.
3334
3335         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
3336
3337         * mini.h (MonoCompile): Add 'token_info_hash' field.
3338
3339         * mini.c: Save token->method associations during compilation so the AOT 
3340         compiler can use it.
3341         
3342         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
3343         which reference generic classes and methods.
3344
3345 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
3346
3347         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
3348
3349         * aot-compiler.c (compile_method): Fix a typo in a comment.
3350
3351         * aot-runtime.c (decode_cached_class_info): Skip generic types.
3352
3353         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
3354         everything generic.
3355
3356         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
3357
3358 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
3359
3360         * mini.h (MonoCompile): Add 'args' field.
3361
3362         * mini.c (mono_compile_create_vars): Store variables representing the arguments
3363         into cfg->args.
3364
3365         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
3366
3367 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
3368
3369         * mini.c (mono_compile_get_interface_var): Remove this unused function.
3370
3371         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
3372
3373         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
3374         opcodes for some opcodes.
3375
3376         * mini.h *.brg *.c: Use the new opcodes.
3377
3378 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
3379
3380         * mini.h: Bumped aot revision.
3381
3382         * inssel.brg: modified code generation of type checks for interfaces
3383         to use the new "MonoClass.interface_bitmap" instead of the old
3384         "MonoClass.interface_offsets".
3385
3386 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
3387
3388         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
3389
3390 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
3391
3392         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
3393         64 bit platforms.
3394
3395 2007-04-27  Neale Ferguson <neale@sinenomine.net>
3396
3397         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
3398
3399 2007-04-27  Wade Berrier  <wberrier@novell.com>
3400
3401         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
3402         mini.h) to fix build.
3403
3404 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
3405
3406         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
3407         
3408         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
3409         causes the corlib unit tests to fail.
3410
3411 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
3412
3413         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
3414
3415         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
3416
3417         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
3418         opcodes to the comparison relations.
3419
3420         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
3421         opcodes to their types.
3422         
3423         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
3424
3425         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
3426         it in cfg->arch.cinfo.
3427
3428         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
3429
3430         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
3431         cfg->cil_offset_to_bb.
3432
3433 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
3434
3435         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
3436         created becase of initlocals.
3437
3438 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
3439
3440         * mini-alpha.c cpu-alpha.md: More alpha port work from 
3441         Sergey Tikhonov <tsv@solvo.ru>.
3442
3443 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
3444
3445         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
3446
3447 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
3448
3449         * cpu-s390.md (break): Correct the length of break instruction.
3450
3451 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3452
3453         * mini.c: fix a couple of soft-float issues and comments.
3454
3455 2007-04-15  Miguel de Icaza  <miguel@novell.com>
3456
3457         * trace.c (is_filenamechar): - is also a filename char.
3458
3459 2007-04-15  Neale Ferguson <neale@sinenomine.net>
3460
3461         * mini-s390.c: Correct checking for enum type in return value processing.
3462
3463 2007-04-14  Raja R Harinath  <rharinath@novell.com>
3464
3465         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
3466         (version.h): Makefile is in the build directory.
3467
3468 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
3469
3470         * mini-amd64.h: fix for assertion failure on Solaris/amd64
3471
3472 2007-04-11  Martin Baulig  <martin@ximian.com>
3473
3474         * mini.c (can_access_member): Fix handling of generic classes;
3475         fixes #81259.
3476
3477 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
3478
3479         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
3480
3481 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
3482
3483         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
3484
3485 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3486
3487         * mini-codegen.c: make sure the right spill amount is
3488         used for fp or integer registers (fixes the float_sub_spill() on ppc).
3489
3490 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
3491
3492         * mini-ppc.c: fixes for the fp_branch_nan test.
3493
3494 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
3495
3496         * basic.cs: Comment out new test which still fails on ia64.
3497
3498 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3499
3500         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
3501
3502 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3503
3504         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
3505
3506 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
3507
3508         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
3509         on 64 bit machines. Fixes part of #80738.
3510
3511         * basic.cs: Add regression test.
3512
3513 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3514
3515         * inssel.brg basic.cs: Revert previous change to fix build.
3516
3517         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
3518         platforms.
3519         
3520         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
3521
3522         * basic.cs: Add new regression test.
3523
3524 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3525
3526         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
3527         many arguments.
3528
3529 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3530
3531         * cpu-s390x.md: Correct length of break instruction.
3532
3533 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3534
3535         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
3536         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
3537
3538 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
3539
3540         * *.c: Begin WIN64 port.
3541         * mini.c:  Use correct register in profiler.
3542         * mini-amd64.c: No inline assembly on Win64.
3543         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
3544         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
3545         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
3546         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
3547         mono_arch_ip_from_context for Win64.
3548         
3549         Contributed under MIT/X11 license.
3550
3551 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
3552
3553         * exceptions-amd64.c (seh_handler): Ditto.
3554
3555         * exceptions-x86.c (seh_handler): Fix a memory leak.
3556
3557 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
3558
3559         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
3560         mini-s390x.c: fixed peephole optimizations to deal
3561         correctly with 1 and 2 byte reload avoidance.
3562
3563 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
3564
3565         * cpu-s390.md, cpu-s390x.md: update localloc length.
3566
3567 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3568
3569         * cpu-g4.md: added missing descriptions.
3570
3571 2007-03-14  Miguel de Icaza  <miguel@novell.com>
3572
3573         *  Makefile.am: Add support so the tail tests are not executed on
3574         PowerPC as that is a known limitation of the PowerPC port.
3575
3576 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3577
3578         * runmdesc.bat:  Move to msvc directory.
3579         
3580 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3581
3582         * runmdesc.bat:  Run executable that was produced by the current
3583         target and sent via an argument.
3584         
3585 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
3586
3587         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
3588         #81102.
3589
3590         * generics.2.cs: Add regression test.
3591
3592 2007-03-09  Wade berrier  <wberrier@novell.com>
3593
3594         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
3595
3596 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
3597
3598         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
3599         AOT code depends on this.
3600
3601 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3602
3603         * mini.c: more precise tracking of types in the eval stack
3604         (part of fix for bug #81044).
3605
3606 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
3607
3608         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
3609
3610         * aot-compiler.c (encode_patch): Remove an obsolete comment.
3611
3612 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
3613
3614         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
3615
3616         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
3617
3618 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
3619
3620         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
3621         a pointer on 64 bit systems. Fixes #80190.
3622
3623         * iltests.il: Add new regression test.
3624
3625 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3626
3627         * mini.c: inline a constant for Environment.IsRunningOnWindows.
3628
3629 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
3630
3631         * trace.c: Remove an erroneous alignemnt check when tracing.
3632           Fixes --trace on OSX86.
3633
3634 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3635
3636         * mini-$(arch).h: initialize SP in context for all the archs.
3637
3638 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
3639
3640         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
3641         regressions in the thread tests.
3642
3643 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
3644
3645         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
3646         - fixed implementation of LOCALLOC opcode
3647         - implemented non-un compare for floats
3648         - code cleanup
3649         - implementation of FDIV and CKFINITE opcodes
3650         - fixes for latest mono updates
3651         - additional arch opcodes
3652
3653 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3654
3655         * Makefile.am: simplify and merge rules for cross-compilation.
3656
3657 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
3658
3659         * local-propagation.c: Actually *apply* the fix for bug 80591...
3660
3661 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3662
3663         * mini-exceptions.c: backuot part of the last change
3664         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
3665
3666 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
3667         * inssel.brg: Fix bug 59286.
3668
3669
3670 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
3671
3672         * mini-exceptions.c: patch from Zoltan to correctly check for
3673         stack boundaries (using the stack register, not the frame register),
3674         fixes bugs #80724, #79717.
3675
3676 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
3677
3678         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
3679         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
3680
3681         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
3682         presence of frame pointer elimination.
3683
3684 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
3685         
3686         * mini-x86.h: NetBSD UCONTEX_REG defines.
3687
3688 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
3689
3690         * inssel-amd64.brg: Fix amd64 build.
3691
3692 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
3693
3694         * mini.h: remove extern to workaround what looks likes gcc bug 26905
3695         on amd64.
3696
3697 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
3698
3699         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
3700         ends.
3701
3702         * mini-<ARCH>.c: Use mono_is_regsize_var ().
3703
3704 2007-01-30 Mark Mason <mason@broadcom.com>
3705
3706            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
3707            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
3708            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
3709            beginning support for CEE_JMP [not quite working yet]
3710            * tramp-mips.c: LMF handling now works
3711         
3712 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
3713
3714         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
3715
3716         * mini.h (NULLIFY_INS): New macro.
3717
3718 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3719
3720         * mini.c: statistical profiler fix for windows, patch
3721         from Tor Lillqvist (tml@novell.com).
3722
3723 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
3724         * local-propagation.c: Fix bug 80591.
3725
3726 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
3727
3728         * Makefile.am: put back the --export-dynamic option as with
3729         the previous gmodule flags (thanks to Robert Jordan).
3730
3731 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
3732
3733         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
3734
3735         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
3736         simplify and speed up the local register allocator. Also rename some fields
3737         like iassign->vassign.
3738         
3739         * regalloc.c: Remove some functions which are no longer used since their
3740         inlined version is in mini-codegen.c.
3741         
3742         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
3743
3744         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
3745
3746 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
3747
3748         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
3749         narrowing. Fixes #80622.
3750
3751         * iltests.il: Add new regresssion test. 
3752
3753 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3754
3755         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
3756         debug-debugger.c, debug-debugger.h: warning fixes.
3757         * driver.c: updated copyright year and made it fit in one line.
3758
3759 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
3760
3761         * aot-runtime.c: updated to use mono-dl instead of gmodule.
3762
3763 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
3764
3765         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
3766
3767         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
3768
3769         * iltests.il: Add new test for bug #80507.
3770
3771 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3772
3773         * mini-arm.h: use soft-float also on vfp for now.
3774
3775 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3776
3777         * mini.c: fix some more soft-float issues.
3778
3779 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
3780
3781         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
3782
3783 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
3784         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
3785         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
3786         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
3787
3788 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
3789
3790         * mini-arm.c: typo fix.
3791
3792 2007-01-23  Neale Ferguson <neale@sinenomine.net>
3793
3794         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
3795
3796 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
3797
3798         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
3799         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
3800
3801         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
3802
3803         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
3804
3805         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
3806         
3807         * inssel.brg: Fix a warning.
3808
3809         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
3810
3811         * abcremoval.c ssa.c ssapre.c: Update after this change.
3812         
3813         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
3814
3815         * dominators.c (df_set): Use mono_bitset_union_fast.    
3816
3817 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
3818
3819         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
3820         mini-codegen.c: reduce relocations and memory usage for the cpu
3821         description.
3822
3823 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
3824
3825         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
3826
3827         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
3828         to reduce their size.
3829
3830 2007-01-19 Mark Mason <mason@broadcom.com>
3831
3832         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
3833         * mini-mips.c: more configuration macros, support long conditional branches, additional
3834         asserts, fix epilog instrumentation.
3835         * mini-mips.h: use standard stack walk
3836         * cpu-mips.md: increase size of div, rem and conditional branches
3837         
3838 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
3839
3840         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
3841         to cpu spec data.
3842
3843 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
3844
3845         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
3846         (compile_method): Ditto.
3847
3848         * aot-runtime.c (decode_klass_info): Ditto.
3849
3850         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
3851         needed by the code generated by inssel.brg. Also fix a warning.
3852
3853 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
3854
3855         * mini.c: deal with enums that become genericinsts by
3856         being nested in a generic class (bug #79956).
3857
3858 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3859
3860         * mini.c: match the generic definition to check for
3861         private access with generic types (bug #78431).
3862
3863 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3864
3865         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
3866         to make life easier for people cross-compiling that insist on not
3867         using scratchbox.
3868
3869 2007-01-17 Mark Mason <mason@broadcom.com>
3870
3871         * inssel-long.brg: patch to deal with mips missing flags
3872         * inssel-long32-mips.brg: implement overflow checks
3873         * insset-mips.brg: implement overflow checks
3874         * mini-mips.h: implement conditional exception handling
3875         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
3876           Remove unused code, minor cleanups.
3877         * exceptions-mips.c: minor cleanups
3878         * mini-ops.h: add mips conditional exception ops
3879         * cpu-mips.md: add mips conditional exception ops
3880
3881         
3882 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
3883
3884         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
3885         to deal with mips missing of flags.
3886
3887 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
3888
3889         * exceptions-ppc.c: execute fault handlers.
3890
3891 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
3892
3893         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
3894
3895 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3896
3897         * mini.c: handle also floating point values in initialize_array.
3898
3899 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3900
3901         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
3902         array initialization and make it conditional on the intrins option.
3903
3904 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3905
3906         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
3907         relocations and put the patch info names close to the enum definition.
3908
3909 2007-01-15 Mark Mason <mason@broadcom.com>
3910
3911         * basic.cs, exceptions.cs: break up large tests to increase debugability.
3912
3913 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
3914
3915         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
3916
3917 2007-01-12  Raja R Harinath  <rharinath@novell.com>
3918
3919         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
3920
3921 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
3922
3923         * Makefile.am: distribute the mips sources.
3924
3925 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3926
3927         * mini-codegen.h: handle bug #80489 here, by excluding ecx
3928         directly.
3929
3930 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
3931
3932         * cpu-x86.md: back out for now as this triggers other regressions.
3933
3934 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3935
3936         * cpu-x86.md: force src1 and dest regpair for long shift instructions
3937         to eax:edx, so ecx can't get allocated to them (bug #80489).
3938
3939 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
3940
3941         * mini.c, mini-exceptions.c: enabled running fault handlers
3942         (bug #80469).
3943
3944 2007-01-03  Miguel de Icaza  <miguel@novell.com>
3945
3946         * driver.c: If nothing fail, do not use the string "failed",
3947         because it makes it very annoying to view test result logs on the
3948         web. 
3949
3950 2006-12-30  Miguel de Icaza  <miguel@novell.com>
3951
3952         * debug-debugger.c (mono_debugger_main): Rename "main" to
3953         "main_method" to prevent a warning.
3954
3955         Remove a warning for unused field.
3956
3957 2006-12-28  Martin Baulig  <martin@ximian.com>
3958
3959         * debug-debugger.c
3960         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
3961
3962 2006-12-22  Martin Baulig  <martin@ximian.com>
3963
3964         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
3965         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
3966         seperate `.mdb_debug_info' section, so we can access it from the
3967         debugger even if the binary is stripped.
3968
3969         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
3970         from the `.mdb_debug_info' here to prevent the linker from
3971         removing that section.
3972
3973         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
3974         mdb-debug-info64.s.
3975
3976 2006-12-19  Robert Jordan  <robertj@gmx.net>
3977
3978         * mini-x86: enable the code to return small structures in
3979         registers for FreeBSD as well. Fixes bug #80278.
3980         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
3981
3982 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
3983
3984         * mini-x86.c: align the stack when calling the profiler
3985         function instrumenting the prolog (on OSX).
3986
3987 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
3988
3989         * mini.c: emit a break opcode where Debugger.Break () is called.
3990
3991 2006-12-13  Miguel de Icaza  <miguel@novell.com>
3992
3993         * mini.c (mono_method_to_ir): Provide useful information on this
3994         assert, to prevent others from debugging like I did.
3995
3996 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
3997
3998         * mini.c: enable code which was incorrectly commented
3999         (bug #80235).
4000
4001 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4002
4003         * mini-x86.c: enable on OSX, too, the code to return small
4004         structures in registers.
4005
4006 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4007
4008         * mini-x86.c: remove the use of the dynamic code manager here, too.
4009
4010 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4011
4012         * mini.h, debug-debugger.c, tramp-*.c: fixed 
4013         mono_debugger_create_notification_function() to use
4014         mono_global_codeman_reserve () instead of a dynamic code manager.
4015
4016 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4017
4018         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
4019         ves_array_element_address() jit icall and use a generated
4020         managed method instead (which is about 4 times faster for a rank 3
4021         array access).
4022
4023 2006-11-29  Mark Mason  <mason@broadcom.com>
4024
4025         * basic-calls.cs: additional tests for passing
4026         structures as function arguments.
4027
4028 2006-11-29  Mark Mason  <mason@broadcom.com>
4029
4030         * mini-mips.h: disable custom exception handling
4031         * mini-mips.c: throw/rethrow should use jalr to call
4032         exception stubs.  Fixed bug with passing structures
4033         by value. More support for tracing floating point
4034         functions.
4035
4036 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4037
4038         * mini.c: fixed typo in the soft-float ldind.r4 handling
4039         (bug #80086).
4040
4041 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4042
4043         * mini.c, mini.h, driver.c: added --runtime command line
4044         option to select a different runtime than the autodetected one.
4045         * jit.h: added API for embedders to initialize with a specific
4046         runtime version.
4047
4048 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
4049
4050         * mini.c: handle also boxing of r4 values (bug #80024).
4051
4052 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4053
4054         * mini-ppc.c: force indirect calls until we reserve
4055         enough address space for all the generated code.
4056
4057 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
4058
4059         * exceptions-arm.c: workaround bugs in the libc definition
4060         of struct ucontext.
4061
4062 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
4063
4064         * inssel.brg: fixes from me and Mark Mason.
4065
4066 2006-11-23  Dick Porter  <dick@ximian.com>
4067
4068         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
4069         semaphore display now we've fixed the initial value
4070
4071 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4072
4073         * inssel.brg: partially revert the last change to fix the build.
4074
4075 2006-11-21  Mark Mason  <mason@broadcom.com>
4076
4077         * inssel.brg: Add and use compare-and-branch macros to support
4078         architectures that do not have condition code registers (ie. MIPS).
4079         * *-mips.{c,brg,md}: Fix copyright statements
4080
4081 2006-11-20  Mark Mason  <mason@broadcom.com>
4082
4083         * Makefile.am: remove mini-codegen.c from list of MIPS sources
4084         * mini.c: Allow GET_CONTEXT to be specified by the arch port
4085         * mini.h: Added declaration for mono_print_ins()
4086         * mini-codegen.c: added ins_spec initializer for MIPS
4087         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
4088         vreg to be virtual and hreg to be non-virtual.
4089         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
4090         is not yet working/implemented correctly.
4091         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
4092         non-static, fixup calls to print_ins() from other parts in the file.
4093
4094 2006-11-20  Mark Mason  <mason@broadcom.com>
4095
4096         * basic-calls.cs: added tests for passing structures as arguments
4097         to calls.
4098
4099 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
4100
4101         * inssel-long32.brg: optimize signed division by power of two.
4102
4103 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4104
4105         * mini-arm.c: added support for interworking with thumb code
4106         (mono must be still be built using the ARM instruction encoding).
4107
4108 2006-11-19  Miguel de Icaza  <miguel@novell.com>
4109
4110         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
4111         verifier has different rules for it.   Fixes a few verifier issues
4112         in the test suite.
4113
4114         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
4115         at the end, so people know what happened.
4116
4117 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
4118
4119         * brach-opts.c: in optimize_exception_target() make sure we
4120         are in a catch clause (fixes bug #79871).
4121
4122 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4123
4124         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
4125         more soft-float support fixes.
4126
4127 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
4128
4129         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
4130         that are passed half on the stack and half in registers.
4131
4132 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
4133
4134         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
4135         more mips integration work from Mark E Mason 
4136         <mark.e.mason@broadcom.com>.
4137
4138 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4139
4140         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
4141         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
4142         tramp-mips.c: added sources for the mips port, not
4143         integrated in the build yet. Contributed by
4144         Mark E Mason <mark.e.mason@broadcom.com>.
4145
4146 2006-11-14  Neale Ferguson <neale@sinenomine.net>
4147
4148         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
4149
4150 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4151
4152         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
4153         put the soft-float rules in its own file since it seems to
4154         break s390 compilation.
4155
4156 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4157
4158         * mini-arm.c: fixed wrnings.
4159
4160 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
4161
4162         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
4163         inssel-arm.brg: ARM support for soft-float.
4164
4165 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4166
4167         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
4168         loads and stores of 32 bit fp values.
4169
4170 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
4171
4172         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
4173
4174         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
4175         works. Fixes #79852 and #79463.
4176
4177 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4178
4179         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
4180         more soft-float support WIP and fixes.
4181
4182 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
4183
4184         * mini-arm.c: some VFP updates.
4185
4186 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4187
4188         * mini-exceptions.c: 0 is a valid local var offset in some
4189         architectures, don't assert (bug #78508).
4190
4191 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
4192
4193         * exceptions-arm.c: fixed off by one error in stack walk code.
4194
4195 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
4196
4197         * mini.h, mini.c: more precise tracking of type load exceptions.
4198
4199 2006-11-03  Robert Jordan  <robertj@gmx.net>
4200
4201         * Makefile.am: [WIN32] Add monow.exe target.
4202         * driver.c: [WIN32] Don't detach the console when debugging.
4203         Fixes bug #79797.
4204         
4205 2006-10-30  Miguel de Icaza  <miguel@novell.com>
4206
4207         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
4208
4209 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
4210
4211         * aot-compiler.c (emit_method_info): Add a case missed earlier.
4212
4213         * driver.c (mini_regression): Fix --regression with AOT.
4214
4215         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
4216
4217 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
4218
4219         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
4220
4221         * mini-sparc.h: Don't use sigaction on sparc/linux.
4222
4223         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
4224
4225         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
4226
4227         * mini-exceptions.c: Add proper include files for getpid ().
4228
4229 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
4230
4231         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
4232         address instead of a MonoJitInfo* to avoid decoding the exception info for the
4233         method.
4234
4235         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
4236         name cache to reduce its size.
4237
4238         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
4239
4240 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
4241
4242         * mini-x86.c: Save/restore the current LMF structure more efficiently using
4243         the mono_lmf TLS variable.
4244
4245         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
4246         trampoline lmf frames.  
4247
4248         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
4249
4250 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
4251
4252         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
4253         the mono_lmf TLS variable.
4254
4255         * mini-exceptions.c: Access the LMF structure through accessors.
4256
4257         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
4258         variable instead of in jit_tls->lmf.
4259
4260         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
4261         
4262         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
4263         trampoline lmf frames.
4264
4265         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
4266
4267 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
4268
4269        * mini.c trace.c mini-x86.c: Revert these too.
4270         
4271        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
4272        signature change.
4273
4274 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
4275
4276         * genmdesc.c: removed now dead code.
4277
4278 2006-10-09  Robert Jordan <robertj@gmx.net>
4279
4280         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
4281
4282 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
4283
4284         * mini.h: do not leave gaps in the opcode values.
4285
4286 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
4287
4288         * jit-icalls.h: flag functions as internal here, too.
4289
4290 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
4291
4292         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
4293         functions with the internal attribute.
4294
4295 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
4296
4297         * aot-compiler.c: fclose the file descriptor in the profile read loop.
4298
4299 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
4300
4301         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
4302         for soft-float.
4303
4304 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
4305
4306         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
4307         tail calls as on other platforms.
4308
4309         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
4310
4311         * iltests.il: Add a few tailcall tests.
4312
4313 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4314
4315         * driver.c: fix loop for old compilers (bug #79521).
4316
4317 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
4318
4319         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
4320
4321         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
4322
4323         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
4324         metadata without any code.
4325
4326         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
4327         more precise debugging information using gdb.
4328
4329 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
4330
4331         * inssel-ia64.brg: Make the helper methods static.
4332
4333 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4334
4335         * inssel-x86.brg: make the helper methods static.
4336
4337 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
4338
4339         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
4340
4341 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4342
4343         * mini.c: updates for monoburg changes.
4344         * inssel.brg: make a few helper functions static as they should.
4345
4346 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
4347
4348         * Makefile.am: Move mini-codegen.c to common_sources.
4349
4350 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4351
4352         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
4353         instructions.
4354         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
4355         mini-ppc.h: port to use the common local register allocator.
4356
4357 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4358
4359         * mini.h: Remove the comment too then.
4360
4361 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
4362
4363         * mini.h: put back backend.data which is to be used shortly and
4364         doesn't increase the size of MonoInst. If any 64 bit arch aligned
4365         pointers on 4 byte boundaries it'd have much bigger issues running
4366         and you can ifdef it out anyway.
4367
4368 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4369
4370         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
4371         MonoInst size by 4 bytes on 64 bit machines.
4372
4373 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4374
4375         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
4376         replacement with more meaningful field names. Arch maintainers, please
4377         check the assigned names are good enough for your arch.
4378
4379 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4380
4381         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
4382         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
4383
4384 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
4385
4386         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
4387         relocations and memory requirements, put the optimization flags
4388         definitions in their own file.
4389
4390 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
4391
4392         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
4393
4394         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
4395
4396 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
4397
4398         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
4399
4400 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
4401
4402         * inssel.brg: use the correct function to get the size of an item
4403         in an array, given an element class.
4404         * aot-compiler.c: do not access class->class_size directly.
4405
4406 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4407
4408         * mini.h, debug-mini.c: added a debugging function to print
4409         info about local variables and arguments in a jitted method.
4410
4411 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
4412
4413         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4414
4415         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
4416
4417 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4418
4419         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
4420         inner and outer loops when passing vtypes.
4421
4422 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
4423
4424         * mini-ppc.c: take into account the cpu errata for cache flushing
4425         which caused some random errors (bug #79381).
4426
4427 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4428
4429         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
4430         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
4431
4432 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
4433
4434         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
4435         loaded.
4436
4437         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
4438         freebsd ports tree.
4439
4440         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
4441         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
4442
4443         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
4444         displacement.
4445
4446 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
4447
4448         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
4449
4450 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
4451
4452         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
4453         macro does not have to be changed during debugging.
4454
4455         * 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>.
4456
4457         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
4458
4459         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
4460         
4461         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
4462         MONO_ARCH_NO_EMULATE_MUL is defined.
4463
4464         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
4465
4466         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
4467
4468         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
4469
4470         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
4471         
4472 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
4473
4474         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
4475         stuff to mini-exceptions.c where it is used.
4476
4477         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
4478         setup code, the real one is in mini-exceptions.c.
4479
4480         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
4481         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
4482         some changes from the freebsd ports tree.
4483
4484         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
4485         constants.
4486         
4487         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
4488
4489 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
4490
4491         * mini.c: on Linux, check for /proc to be mounted
4492         (bug# 79351, novell bug#201204).
4493
4494 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
4495
4496         * mini.c: handle cases where pthread_attr_getstack() behaves
4497         incorrectly (bug #78096).
4498
4499 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
4500
4501         * mini-arm.c: support larger stack frames (bug #79272).
4502
4503 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
4504
4505         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
4506
4507         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
4508         tokens.
4509
4510         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
4511         mono_class_from_name () to find a class from its name.
4512
4513         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
4514
4515 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
4516
4517         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
4518
4519 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
4520
4521         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
4522
4523 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
4524
4525         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
4526         callinfo->trampoline.
4527
4528         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
4529         fixes #79271.
4530         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
4531         future.
4532
4533 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
4534
4535         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
4536
4537 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
4538
4539         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
4540         stats.method_trampolines, it is already done by the generic trampoline code.
4541
4542         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
4543         
4544 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
4545
4546         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
4547
4548         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
4549
4550         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
4551
4552         * mini.c (print_jit_stats): Print mscorlib mempool size too.
4553         
4554         * mini.c (print_jit_stats): Print new stats.
4555
4556         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4557
4558 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
4559
4560         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
4561         Address on two dimensional arrays. Fixes #78729.
4562
4563         * mini.h (MonoCompile): Add a 'skip_visibility' field.
4564
4565         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
4566         a method.
4567
4568         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
4569
4570         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
4571         #79130.
4572         
4573         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
4574         a race condition.
4575         (mini_get_ldelema_ins): Ditto.
4576
4577 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
4578
4579         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
4580         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
4581         Fixes #79213.
4582
4583 2006-08-29 Neale Ferguson <neale@sinenomine.net>
4584
4585         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
4586         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
4587
4588         * exceptions-s390x.c: Cosmetic change.
4589
4590         * tramp-s390.c: Fix warning.
4591
4592         * cpu-s390.md: Correct length of mul_imm.
4593
4594 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
4595
4596         * aot-compiler.c: added binary writer with ELF backend
4597         implementation (only on Linux/x86 for now).
4598
4599 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4600
4601         * Makefile.am: Don't run net 2.0 AOT tests.
4602
4603         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
4604         (mono_compile_assembly): Skip net 2.0 assemblies as well.
4605
4606         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
4607
4608 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
4609
4610         * aot-compiler.c: simplified and refactored the asm-writing code
4611         to allow different backends.
4612
4613 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4614
4615         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4616
4617         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
4618         little. Share patches of type TYPE_FROM_HANDLE as well.
4619
4620         * mini.c (mono_patch_info_equal): New helper function.
4621         (mono_patch_info_hash): Ditto.
4622
4623         * aot-compiler.c (emit_method_code): Fix s390 build.
4624
4625         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
4626         is not handled because it is stored as a flag and not as a type ctor. Fixes
4627         #79016.
4628
4629 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
4630
4631         * aot-compiler.c: Fix computation of GOT slot statistics.
4632         
4633         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
4634         Also remove support for not PIC AOT.
4635
4636         * mini.h: Bump AOT file format version.
4637
4638         * objects.cs: Add a test for #78990.
4639
4640         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
4641         (peter.dettman@iinet.net.au). Fixes #79087.
4642
4643         * basic-long.cs: Add a test for the above.
4644
4645 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
4646
4647         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
4648         
4649         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
4650         code somewhat.
4651
4652 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
4653
4654         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
4655         exceptions.
4656
4657 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
4658
4659         * mini.c: Don't verify COM proxy invoke calls
4660         
4661
4662 2006-08-10  Dick Porter  <dick@ximian.com>
4663
4664         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
4665         which process is holding semaphores locked.
4666
4667 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
4668
4669         * mini-ia64.c mini-amd64.c: Fix #79027.
4670
4671         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
4672
4673         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
4674
4675         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
4676         implicit arguments in a vararg call. Fixes #79027.
4677
4678 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
4679
4680         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
4681         (mono_get_array_new_va_signature): Ditto.
4682
4683 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
4684
4685         * aot-runtime.c: Call init_plt lazily.
4686
4687         * inssel-long.brg: Fix unsigned long->int conversion.
4688
4689         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
4690
4691         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
4692         that most data is now in the .rss/.data section.
4693
4694 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
4695
4696         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
4697
4698         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
4699
4700         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
4701
4702         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
4703
4704         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
4705         virtual call. Fixes #79010.
4706
4707         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
4708         and use the result as the this argument in the real call.
4709
4710         * generics.2.cs: Add a new test for #79010.
4711         
4712 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
4713
4714         * mini-x86.c: Fix a warning.
4715
4716         * aot-compiler.c: Add a bunch of statistics.
4717
4718         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
4719
4720 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
4721
4722         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
4723
4724 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
4725
4726         * 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>.
4727
4728 2006-07-13  Miguel de Icaza  <miguel@novell.com>
4729
4730         * mini.c (mono_method_to_ir): Obtain the original method in the
4731         CIL stream and use this to perform validation.
4732
4733         Fixed: #78816
4734
4735 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
4736
4737         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
4738         (mono_arch_call_opcode): Ditto.
4739
4740         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
4741         #78826.
4742
4743         * mini.c (mono_patch_info_dup_mp): New helper function.
4744         
4745         * aot-compiler.c (compile_method): Fix some of the memory allocated during
4746         compilation. Fixes #78827.
4747
4748 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
4749
4750         * declsec.c: Use original security informations for
4751           MONO_WRAPPER_MANAGED_TO_MANAGED.
4752
4753 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
4754
4755         * mini.c: Allow Com Interop methods/classes and
4756         don't verify COM wrapper calls
4757         
4758
4759 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
4760
4761         * inssel-long32.brg: Fix long->i4 checked conversion.
4762
4763         * exceptions.cs: Add a test for the above.
4764
4765 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
4766
4767         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
4768
4769         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
4770         leaks.
4771
4772         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
4773         #78775.
4774
4775 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
4776
4777         * mini.c: Fix solaris/x86 exception handling.
4778
4779         * Makefile.am: Get rid of $(ICU_LIBS).
4780
4781 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
4782
4783         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
4784         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
4785         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
4786
4787         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
4788
4789         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
4790         this function causes a SIGSEGV.
4791
4792 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
4793
4794         * mini.c: Remove unused solaris/x86 includes.
4795
4796 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
4797
4798         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
4799
4800 2006-06-20  Jb Evain  <jbevain@gmail.com>
4801
4802         * cpu-g4.md: fix max length of start_handler instruction.
4803
4804 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
4805         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
4806
4807 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
4808         * ssa.c: Fixed bug 78653 for SSA based deadce.
4809         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
4810         MonoInst.flags, used in SSA based deadce.
4811         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
4812         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
4813
4814 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
4815
4816         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
4817         it can end up using non executable memory on ppc64 systems
4818         running ppc32 userspace (fix from Johannes Berg).
4819
4820 2006-06-14  Dick Porter  <dick@ximian.com>
4821
4822         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
4823         4.1.1
4824
4825 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
4826         * mini.c: Made so that inline is locally disabled if it would
4827         trigger a .cctor, because too many apps depend on this behavior
4828         (which seems to be also the one of the MS CLR).
4829
4830 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
4831
4832         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
4833         No idea why this worked before.
4834
4835         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
4836         which branch to outer exception clauses since they could skip the
4837         inner finally clauses. Fixes #78633.
4838
4839         * exceptions.cs: Add a test for the above.
4840
4841         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
4842         Fixes #78629.
4843
4844         * iltests.il: Add a test for the above.
4845
4846 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
4847
4848         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
4849         after the end of a try bblock, to prevent asserts in mini_method_compile ().
4850
4851         * iltests.il: Add a test for the above.
4852
4853 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
4854
4855         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
4856         
4857         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
4858         methods as instrinsics.
4859
4860 2006-06-09  Wade Berrier <wberrier@novell.com>
4861
4862         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
4863         (simple-cee-ops.h ssapre-mini-ops.h)
4864
4865 2006-06-09  Neale Ferguson <neale@sinenomine.net>
4866
4867         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
4868         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
4869         instruction).
4870         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
4871         * cpu-s390x.md: Fix max. length values for a couple of instructions.
4872
4873 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
4874
4875         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
4876
4877 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
4878
4879         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
4880         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
4881         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
4882         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
4883         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
4884         of opcodes, so that bug 78549 should not happen again.
4885         * ssapre.c: Updated to use the renamed files.
4886
4887 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
4888
4889         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
4890         in OP_ATOMIC_EXCHANGE_I4.
4891
4892 2006-06-07  Wade Berrier <wberrier@novell.com>
4893
4894         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
4895         in mono_debugger_create_notification_function)
4896
4897 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
4898
4899         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
4900         
4901         * mini.c (type_from_stack_type): Disable some changes which do not
4902         seem to work.
4903
4904         * driver.c: Reenable opts.
4905
4906         * mini.h (MonoStackSlot): New structure to keep track of the verification state
4907         of the evaluation stack.
4908         
4909         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
4910         evaluation stack trace at entry to the bblock.
4911
4912         * mini.c (merge_stacks): New function to perform verification of stack merges.
4913         Turned off by default.
4914
4915         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
4916         STACK_MP.
4917         
4918 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
4919
4920         * local-propagation.c: Fixed bug 78549.
4921
4922 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
4923
4924         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
4925
4926 2006-06-02  Miguel de Icaza  <miguel@novell.com>
4927
4928         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
4929         tramp-arm.c, tramp-ia64.c
4930         (mono_debugger_create_notification_function): Update signature to
4931         new signature and use new protocol for creating the notification
4932         function.  
4933
4934         Should fix the build.
4935
4936 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
4937
4938         * exceptions-ppc.c (mono_jit_walk_stack)
4939         (ves_icall_get_frame_info): Fix the build
4940
4941 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
4942
4943         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
4944
4945 2006-05-31  Raja R Harinath  <rharinath@novell.com>
4946
4947         * il2tests.2.il: New file for generics CIL tests.  Add test for
4948         #78019.
4949         * Makefile.am: Update.
4950
4951         Fix #78019
4952         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
4953         to nullable types.
4954
4955 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
4956
4957         * aliasing.c: Fixed bug 78311.
4958
4959 2006-05-29  Martin Baulig  <martin@ximian.com>
4960
4961         * mini-exceptions.c (mono_find_jit_info): When computing the
4962         native offset, check whether we're actually inside the method's
4963         code; call mono_debug_print_stack_frame() to format the frame.
4964         (ves_icall_System_Exception_get_trace): Call
4965         mono_debug_print_stack_frame() to format the stack frame.
4966         (ves_icall_get_trace): Update to the new debugging API.
4967         (mono_jit_walk_stack_from_ctx): Likewise.
4968         (ves_icall_get_frame_info): Likewise.
4969
4970         * mini.c (get_method_from_ip): Use the new debugging API.
4971         (mono_print_method_from_ip): Likewise.
4972
4973         * exceptions-ppc.c
4974         (mono_jit_walk_stack): Use the new debugging API.
4975         (ves_icall_get_frame_info): Likewise.   
4976
4977 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
4978
4979         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
4980
4981 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
4982
4983         * mini.c: Added "limitator" to inline for debugging.
4984
4985 2006-05-24  Martin Baulig  <martin@ximian.com>
4986
4987         * debug-debugger.c (mono_debugger_init): Create a private,
4988         malloc()-based code manager for the notification function and
4989         intentionally leak it on exit.  This fixes the crash-on-exit race
4990         condition.
4991
4992         * tramp-amd64.c
4993         (mono_debugger_create_notification_function): Added
4994         `MonoCodeManager *' argument.
4995
4996         * tramp-x86.c
4997         (mono_debugger_create_notification_function): Added
4998         `MonoCodeManager *' argument.
4999
5000 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
5001
5002         * aliasing.c: Fixed 64 bit issue.
5003         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5004         default since all known bugs are fixed (one more time!).
5005
5006 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
5007
5008         * mini.c: write barrier support.
5009
5010 2006-05-23  Martin Baulig  <martin@ximian.com>
5011
5012         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
5013         check at the top of the file.
5014
5015 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
5016
5017         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
5018         reverting changes without reason and without changelog entries.
5019
5020 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
5021
5022         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
5023         to a few opcodes. Fixes #78439.
5024
5025         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
5026         consistency with other archs.
5027
5028         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
5029
5030 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5031
5032         * debug-debugger.c: fix the build.
5033
5034 2006-05-17  Martin Baulig  <martin@ximian.com>
5035
5036         * debug-debugger.c
5037         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
5038         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
5039         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
5040         (debugger_attach): Call GC_mono_debugger_add_all_threads().
5041
5042 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
5043
5044         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
5045
5046 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
5047
5048         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
5049         MONO_TYPE_GENERICINST.
5050         
5051         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
5052         MONO_TYPE_GENERICINST.
5053
5054 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
5055
5056         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
5057         #78325.
5058
5059 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
5060
5061         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
5062         mempool.
5063         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
5064
5065 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
5066
5067         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
5068         mono_trace_cleanup ().
5069
5070         * iltests.il: Fix problem with the newly added test.
5071
5072         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
5073         due to register constraints, free up the previous hreg. Fixes #78314.
5074
5075         * iltests.il: Add new test for #78314.  
5076
5077         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
5078         Interlocked.Add. Fixes #78312.
5079
5080         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
5081         
5082 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
5083
5084         * inssel.brg (mini_emit_virtual_call): Fix a warning.
5085
5086 2006-05-05  Martin Baulig  <martin@ximian.com>
5087
5088         * debug-mini.c (mono_debug_open_block): New method.
5089
5090         * mini-amd64.c
5091         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5092         the beginning of each basic block.
5093
5094         * mini-x86.c
5095         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5096         the beginning of each basic block.
5097
5098 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5099
5100         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5101         default until I understand why they break the build on amd64.
5102
5103 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
5104
5105         * mini.c (mini_cleanup): Call mono_cleanup ().
5106
5107         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
5108         errors.
5109
5110 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5111
5112         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
5113         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5114         default since all known bugs are fixed, and I cannot reproduce bug
5115         77944... I'm asking Matt Hargett to test again after this commit.
5116
5117 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
5118
5119         * mini-codegen.c: Fixed typo that thrashed inline.
5120
5121 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
5122
5123         * dominators.c (compute_dominators): Avoid using a worklist since
5124         it is not correct in some cases. Instead, iterate over all bblocks as
5125         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
5126
5127 2006-04-28  Miguel de Icaza  <miguel@novell.com>
5128
5129         * mini.c (mono_jit_compile_method_inner): Use
5130         mono_prepare_exception_from_error that resets the value
5131         internally.
5132
5133 2006-04-27  Miguel de Icaza  <miguel@novell.com>
5134
5135         * mini.c: Move the mini_loader_error_to_exception to metadata. 
5136         
5137 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5138
5139         * aliasing.c: Fixed bug 78210.
5140
5141 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5142
5143         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5144         default until all their problems (or the ones they trigger) are fixed.
5145
5146 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
5147
5148         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
5149         
5150         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
5151         as loaded only after resolving patches since that could invoke the same method.
5152
5153         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
5154
5155         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
5156         functions.
5157
5158         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
5159         AOT loader.
5160
5161         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
5162         stack.
5163
5164         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
5165         made from AOT code through the PLT table.
5166
5167         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
5168         holding the plt offset when a call is made to the aot plt trampoline.
5169         
5170 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5171
5172         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
5173         amd64 AOT support.
5174
5175         * Makefile.am (common_sources): Fix build breakage.
5176
5177         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
5178         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
5179         intra-assembly calls if possible.
5180         
5181         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
5182
5183         * mini-trampolines.c: Handle PLT entries.
5184
5185         * mini.c: Avoid creating a GOT var for calls.
5186
5187         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
5188         from mscorlib code.
5189
5190         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
5191         from mscorlib code.
5192
5193         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
5194         AOT code.       
5195
5196         * mini.h: Bump AOT file format version.
5197         
5198         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
5199         covers more cases.
5200
5201 2006-04-25  Martin Baulig  <martin@ximian.com>
5202
5203         * driver.c: Disable copyprop, consprop and inline when running
5204         inside the debugger.
5205
5206 2006-04-25  Martin Baulig  <martin@ximian.com>
5207
5208         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
5209         with `get_current_thread' and added `detach'.
5210         (MonoDebuggerMetadataInfo): Added `thread_size',
5211         `thread_tid_offset', `thread_stack_ptr_offset' and
5212         `thread_end_stack_offset'.
5213
5214 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5215
5216         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
5217         aot-runtime.c.
5218
5219         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
5220         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
5221
5222         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
5223
5224         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
5225
5226         * aot.c: Add support for ADJUSTED_IID.  
5227
5228 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
5229
5230         * aot.c (emit_method_order): Don't align method_order_end.
5231
5232         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
5233         the interface ID changes.
5234
5235 2006-04-21  Dick Porter  <dick@ximian.com>
5236
5237         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
5238         cleaning up a thread.  Fixes the new part of bug 77470.
5239
5240 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
5241
5242         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
5243         to managed wrapper.
5244                      
5245 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
5246
5247         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
5248         
5249         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
5250         SIGSEGV. Fixes #78072.
5251
5252         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
5253         unregister our SIGABRT handler.
5254
5255 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
5256
5257         * mini.c: Disabled inline where it can alter the call stack in a
5258         way visible from managed code.
5259         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
5260         default.
5261
5262 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
5263
5264         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
5265         on other platforms. Fixes #78089.
5266
5267 2006-04-13  Martin Baulig  <martin@ximian.com>
5268
5269         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
5270         determine whether we're inside the debugger.
5271
5272         * debug-debugger.h
5273         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
5274
5275 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
5276
5277         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
5278         handler clauses. Fixes #78024.
5279
5280         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
5281         in the CALL_MEMBASE opcodes. Fixes #78088.
5282         (mono_arch_get_vcall_slot_addr): Ditto.
5283
5284 2006-04-10  Martin Baulig  <martin@ximian.com>
5285
5286         * debug-debugger.c: The thread handling code has now been moved
5287         into ../metadata/threads.c.
5288
5289 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5290
5291         * driver.c (mono_main): Fix --with-gc=none build.
5292
5293         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
5294         (mono_spillvar_offset_float): Ditto.
5295         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
5296         hreg, not when its !global, since on ia64, there is a third category: stacked
5297         registers.      
5298
5299 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
5300
5301         * mini.c: set MonoInst->klass for load field address and a few other
5302         places.
5303
5304 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5305
5306         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
5307
5308 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
5309
5310         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
5311         the branch opt changes.
5312
5313 2006-04-06  Dick Porter  <dick@ximian.com>
5314
5315         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
5316         
5317         * wapihandles.c (mini_wapi_seminfo): 
5318         * driver.c (mono_main): Add semaphore info option
5319
5320 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
5321
5322         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
5323         branch optimization changes. Fixes #78009.
5324
5325 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5326
5327         * mini.c: ignore accessibility of methods in managed->native wrappers.
5328
5329 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
5330
5331         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
5332         
5333         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
5334
5335 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
5336
5337         * mini.c: Modify the branch optimizations to preserve the invariant that
5338         the entries inside the in_bb and out_bb arrays are unique.
5339         (mono_unlink_bblock): Avoid creation of new arrays.
5340
5341 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
5342
5343         * mini.c (mono_unlink_bblock): Fix regression caused by previous
5344         change (#77992).
5345
5346 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
5347
5348         * mini.c (optimize_branches): Remove the "optimizations" in
5349         the cbranch1/cbranch2 -> branch cases which were causing several
5350         problems in the past. Fixes #77986.
5351
5352 2006-03-31  Chris Toshok  <toshok@ximian.com>
5353
5354         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
5355         default optimizations :(
5356
5357 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
5358
5359         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
5360         branch.
5361
5362 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
5363
5364         * local-propagation.c: Added comments to structs and removed
5365         "Mono" prefixes from local tree mover types.
5366
5367 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
5368
5369         * Makefile.am (arch_sources): Define this for each architecture so 
5370         libmono_la_SOURCES is defined in one place.
5371
5372 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
5373
5374         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
5375         from handles/.
5376
5377 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
5378
5379         * driver.c: print the GC name supplied by configure.
5380
5381 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
5382
5383         * local-propagation.c: Added tree mover, and moved here all the
5384         local propagation code from mini.c
5385         * mini.c: Added support for treeprop, and moved all the local
5386         propagation code to local-propagation.c
5387         * mini.h: Added support for treeprop
5388         * driver.c: Added support for treeprop, enabled consprop, copyprop,
5389         treeprop, inline and deadce by default
5390         * Makefile.am: Added local-propagation.c
5391
5392 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
5393
5394         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
5395
5396 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
5397
5398         * debug-debugger.c: make it compile without the Boehm GC.
5399
5400 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
5401
5402         * mini.c: fixed issue with mismatch when an icall is registered
5403         with multiple names but same address.
5404
5405 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5406
5407         * declsec.c, mini-exceptions.c: use write barrier to set reference
5408         fields of managed objects.
5409
5410 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5411
5412         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
5413         (can_access_internals): Fix a warning.
5414
5415         * mini.c (print_method_from_ip): Rename this to 
5416         mono_print_method_from_ip so it gets exported.
5417
5418         * trace.c: Deal with strings inside StringBuilder's containing garbage
5419         and fix memory leaks. Fixes #77848.
5420
5421 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5422
5423         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
5424         fixes #77787.
5425
5426 2006-03-16 Neale Ferguson <neale@sinenomine.net>
5427         
5428         * mini-s390.c: Remove OP_X86_TEST_NULL.
5429
5430 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5431
5432         * mini.c: use the correct GetHashCode() for the moving collector.
5433
5434 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
5435
5436         * liveness.c: Regalloc spill cost tuning.
5437
5438 2006-03-15 Neale Ferguson <neale@sinenomine.net>
5439         
5440         * mini-s390x.h: Correct S390_LONG macro.
5441
5442         * mini-s390x.c: Cleanup unused code.
5443
5444 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
5445
5446         * jit-icalls.h: New file.
5447
5448         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
5449         icalls and include that instead of including jit-icalls.c.
5450
5451         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
5452         OP_X86 opcodes.
5453
5454 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
5455
5456         * mini.c: when checking for member accessibility, also check for
5457         friend assemblies and for explicit interface implementations.
5458
5459 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
5460
5461         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
5462
5463         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
5464
5465         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5466         common cases are done first.    
5467
5468         * mini-ops.h: Only define platform specific opcodes on the given platform.
5469
5470         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
5471         branch.
5472         
5473 2006-03-14  Martin Baulig  <martin@ximian.com>
5474
5475         Revert Paolo's change from r57348:
5476
5477         * mini.h: don't use gboolean for bitfields.
5478         * mini.c: verifier changes for fields and methods accessibility.
5479
5480 2006-03-13  Neale Ferguson <neale@sinenomine.net>
5481
5482         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
5483
5484         * mini-s390x.c: Fix conv_r_un.
5485
5486         * cpu-s390, cpu-s390x.md: Fix lengths.
5487
5488 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
5489
5490         * mini.c: nested types have access to all the nesting
5491         levels, not just the enclosing types.
5492
5493 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5494
5495         * mini.c: added a few more verification checks.
5496
5497 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
5498
5499         * liveness.c: Merge optimizations from the linear-il branch.
5500
5501 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5502
5503         * mini-ia64.c (emit_call): Add a comment.
5504
5505         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
5506
5507         * tramp-ia64.c: Fix some warnings.
5508
5509 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
5510
5511         * mini.h: don't use gboolean for bitfields.
5512         * mini.c: verifier changes for fields and methods accessibility.
5513
5514 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5515
5516         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
5517         lazy icall wrapper changes.
5518
5519         * dominators.c: Replace all the dominator algorithms with faster
5520         ones from the linear-il branch.
5521
5522         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
5523         the mempool.
5524
5525         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5526         common cases are done first.
5527
5528         * mini-amd64.c: Fix some warnings.
5529
5530         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
5531         from the mempool.
5532
5533         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
5534         added code.
5535
5536         * mini.h: Add a missing prototype.
5537
5538 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
5539
5540         * mini.c: Compile icall wrappers lazily.
5541
5542         * mini-codegen.c: Use printf instead of g_print since its much faster.
5543
5544         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
5545         function.
5546
5547         * mini.c (optimize_branches): Cache the negative result from 
5548         remove_block_if_useless ().
5549
5550         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
5551         Also fix some bblock linking issues.
5552
5553         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
5554         assembly files.
5555
5556         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
5557
5558         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
5559         accessed fields first, for better cache behavior.
5560         
5561 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
5562
5563         * mini.c: speedup IList<T> array accesses.
5564
5565 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
5566
5567         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
5568         inline_costs counter. Fixes #77190.
5569
5570 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
5571
5572         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
5573         trace messages. Fixes #77706.
5574
5575 2006-03-04  Martin Baulig  <martin@ximian.com>
5576
5577         * tramp-amd64.c, tramp-x86.c
5578         (mono_debugger_create_notification_function): Use
5579         mono_global_codeman_reserve() to allocate a buffer at runtime and
5580         return it.
5581
5582         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
5583
5584         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
5585         notification function at runtime and then call `initialize' in the
5586         `MONO_DEBUGGER__debugger_info' vtable.
5587
5588 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
5589
5590         * iltests.il: Fix a visibility problem.
5591
5592 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5593
5594         * driver.c, mini.c: add hooks for the counters API.
5595
5596 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5597
5598         * driver.c: show disabled options.
5599
5600 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
5601
5602         * linear-scan.c: always use cost-driven selection.
5603
5604 2006-02-28  Raja R Harinath  <rharinath@novell.com>
5605
5606         * jit-icalls.c (helper_compile_generic_method): Revert change from
5607         2006-02-24.
5608
5609 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
5610
5611         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
5612
5613 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
5614
5615         * inssel.brg: style fixes, mostly to force the updated monoburg
5616         to run for people using svn.
5617
5618 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
5619
5620         * mini.c: match monoburg changes.
5621
5622 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5623
5624         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
5625         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
5626         declaration in the header file.
5627
5628 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
5629
5630         * helpers.c: reduce relocations and mem usage.
5631
5632 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
5633
5634         * mini.h, mini-codegen.c: disable logging features if
5635         requested by configure.
5636
5637 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
5638
5639         * mini.c: tiny verifier changes.
5640
5641 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5642
5643         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
5644         cpu-pentium.md: stack alignment changes for osx/x86,
5645         partially from Geoff Norton <gnorton@customerdna.com>.
5646
5647 2006-02-24  Raja R Harinath  <harinath@gmail.com>
5648
5649         * jit-icalls.c (helper_compile_generic_method): Update to changes
5650         in metadata/class.c.
5651
5652 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
5653         
5654         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
5655         
5656         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
5657         interface calls with large offsets.
5658
5659 2006-02-23  Raja R Harinath  <rharinath@novell.com>
5660
5661         * jit-icalls.c (helper_compile_generic_method): Document the
5662         special-case we depend on so that we can inflate the method twice
5663         with the same context with no bad side-effects.
5664
5665 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
5666
5667         * mini-x86.c, mini-amd64.c: fix for case when xen support
5668         is disabled.
5669
5670 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
5671
5672         * mini-x86.c, mini-amd64.c: generate code to access tls items
5673         in a faster way for Xen systems.
5674
5675 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5676
5677         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
5678         updates and compilation fixes for the OSX/x86 port, mostly from
5679         Geoff Norton <gnorton@customerdna.com>.
5680
5681 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
5682
5683         * inssel.brg: faster interface call implementation
5684         to sync with the interface_offsets MonoVTable changes.
5685
5686 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5687
5688         * mini.c: more verification checks.
5689
5690 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
5691
5692         * mini.c: added a few more verification checks.
5693
5694 2006-02-17      Neale Ferguson <neale@sinenomine.net>
5695
5696         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
5697         facility on the processor and use it if available.
5698
5699 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5700
5701         * driver.c, aot.c, mini.c: throw exception if the IL code is
5702         invalid or unverifiable.
5703
5704 2006-02-17  Raja R Harinath  <rharinath@novell.com>
5705
5706         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
5707         m.StructField.
5708
5709 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
5710
5711         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
5712
5713 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5714
5715         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
5716         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
5717         handling of instantiated generic valuetypes.
5718
5719 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
5720
5721         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
5722         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
5723         instead.
5724
5725         * generics.2.cs: Revert the nullable reftypes tests.
5726
5727 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
5728
5729         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
5730         using __builtin_frame_address (1) as it doesn't work in the presence
5731         of optimizations. Hopefully fixes #77273.
5732
5733         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
5734         -> generics.cs change as it doesn't work with some automake versions.
5735
5736 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5737
5738         * mini.c: handle systems that sue a different way to
5739         retrieve the stack address of the current thread.
5740
5741 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
5742
5743         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
5744         it specially in the makefile.
5745
5746         * generics.2.cs: Add tests for nullable reference types.
5747
5748 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5749
5750         * mini.c: always handle the case when mono_jit_init()
5751         is called in a thread different from the main thread,
5752         confusing libgc (bug #77309).
5753
5754 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
5755
5756         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
5757
5758 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5759
5760         * mini.c: change optimize_branches () to use a single loop
5761         and introduce a new optimization to simplify some range checks.
5762
5763 2006-02-03  Martin Baulig  <martin@ximian.com>
5764
5765         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
5766         and merged with debugger_thread_manager_add_thread().
5767         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
5768         inform the debugger about the main thread.
5769
5770 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
5771
5772         * basic.cs: Add test for div.un/rem.un constant folding.
5773
5774 2006-02-03  Neale Ferguson <neale@sinenomine.net>
5775
5776         * cpu-s390x.md: correct int_xor_imm length
5777
5778 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
5779
5780         * generics.2.cs: New test for #77442.
5781
5782         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
5783         #77442.
5784
5785 2006-02-02  Martin Baulig  <martin@ximian.com>
5786
5787         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
5788         <mono/metadata/mono-debug-debugger.h>   
5789
5790         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
5791
5792 2006-02-02  Martin Baulig  <martin@ximian.com>
5793
5794         * debug-debugger.h: New header file for debug-debugger.c.
5795
5796         * debug-debugger.c: Big API cleanup; don't run the managed Main()
5797         function is a separate thread anymore; add support for attaching.
5798
5799 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
5800
5801         * tramp-x86.c: Fix a warning.
5802
5803 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
5804
5805         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
5806         on very large methods.
5807
5808         * aot.c (load_patch_info): Fix a warning.
5809
5810 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
5811
5812         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
5813         mini-ops.h: alu membase optimizations.
5814
5815 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
5816
5817         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
5818         to speedup StringBuilder.
5819
5820 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
5821
5822         * dominators.c (mono_compute_natural_loops): Fix detection of
5823         loop body start blocks.
5824
5825         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
5826
5827 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
5828
5829         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
5830         #75145.
5831
5832 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
5833
5834         * aliasing.c: Fixed aliasing issue on 64 bit archs.
5835
5836 2006-01-25  Martin Baulig  <martin@ximian.com>
5837
5838         * debug-debugger.c: Moved the `MonoDebuggerManager' and
5839         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
5840         started to cleanup this file a little bit.
5841
5842 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
5843
5844         * mini.c: optimize a codepath frequently happening in generics code.
5845
5846 2006-01-23  Martin Baulig  <martin@ximian.com>
5847
5848         * Makefile.am: Only compile debug-debugger.c on supported platforms.
5849
5850         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
5851         functions directly.
5852
5853         * driver.c: debug-debugger.c is only available if
5854         `MONO_DEBUGGER_SUPPORTED' is defined.   
5855
5856 2006-01-23  Martin Baulig  <martin@ximian.com>
5857
5858         * debug-debugger.c: Only enable this on platforms where the Mono
5859         Debugger is working (x86 and x86_64).
5860
5861 2006-01-21  Martin Baulig  <martin@ximian.com>
5862
5863         The Mono Debugger is now using the normal `mono' instead of the
5864         `mono-debugger-mini-wrapper' when executing managed code.
5865
5866         * debug-debugger.c: New file; previously known as
5867         debugger/wrapper/wrapper.c.
5868
5869         * debug-mini.c (mono_init_debugger): Removed.
5870
5871         * driver.c (mono_main): Added new `--inside-mdb' command line
5872         argument which is used when running inside the debugger.
5873
5874 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
5875
5876         * liveness.c (mono_analyze_liveness): Remove some unused data
5877         structures.
5878
5879 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
5880
5881         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
5882
5883 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
5884
5885         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
5886         depends on implementation details of monobitset.
5887
5888         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
5889         Fixes #77271.
5890
5891 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
5892
5893         * liveness.c: Update after monobitset changes.
5894
5895 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
5896
5897         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
5898
5899 2006-01-11 Neale Ferguson <neale@sinenomine.net>
5900
5901         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
5902
5903         * mini-s390x.c: Remove warning messages.
5904
5905 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
5906
5907         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
5908
5909 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
5910
5911         * generics.2.cs: Add ldelem/stelem_any test.
5912
5913 2006-01-10 Neale Ferguson <neale@sinenomine.net>
5914
5915         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
5916
5917 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
5918
5919         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
5920         
5921 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
5922
5923         * generics.2.cs: Reenable vtype tests.
5924
5925         * inssel-x86.brg: Remove an icorrect valuetype rule.
5926
5927 2006-01-06 Neale Ferguson <neale@sinenomine.net>
5928
5929         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
5930         initial support for OP_ABS.
5931
5932 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5933
5934         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
5935
5936 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5937
5938         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
5939         conversion and implement LADD/LSUB.
5940
5941         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
5942         architectures.
5943
5944 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5945
5946         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
5947
5948         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
5949         architectures.
5950
5951 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5952
5953         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
5954         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
5955         (stack walk problem).
5956
5957 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
5958
5959         * aot.c (mono_aot_load_method): Fix a warning.
5960
5961 2006-01-03  Neale Ferguson <neale@sinenomine.net>
5962
5963         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
5964
5965 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
5966
5967         * iltests.il: Add test for #77148.
5968
5969         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
5970         #77148.
5971
5972 2006-01-03  Neale Ferguson <neale@sinenomine.net>
5973
5974         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
5975
5976 2006-01-03  Neale Ferguson <neale@sinenomine.net>
5977
5978         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
5979         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
5980
5981         * basic-long.cs: Add lconv-to-r4/r8 tests.
5982
5983 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
5984
5985         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
5986
5987         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
5988         here as on other archs.
5989
5990 2005-12-29 Neale Ferguson <neale@sinenomine.net>
5991
5992         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
5993
5994 2005-12-29 Neale Ferguson <neale@sinenomine.net>
5995
5996         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
5997         
5998         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
5999
6000         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
6001         instrument_prolog; Add memory_barrier instruction.
6002
6003 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
6004
6005         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
6006
6007 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
6008
6009         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
6010
6011         * aliasing.c inssel.brg: Fix warnings.
6012
6013         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
6014         could skip initialization of some parts of memory.
6015
6016         * mini.c mini-ia64.c: Fix warnings.
6017
6018         * inssel-sparc.brg: Add an implementation of lneg which actually works.
6019
6020 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
6021
6022         * aliasing.c (mono_build_aliasing_information): Add a workaround for
6023         a crash seen on sparc.
6024
6025         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
6026         
6027         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
6028
6029 2005-12-21 Neale Ferguson <neale@sinenomine.net>
6030
6031         * mini-ops.h: Add s390_backchain instruction
6032
6033         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
6034
6035         * cpu-s390.md: Add s390_backchain instruction
6036
6037         * mini-s390.c: Significant ABI changes
6038
6039         * mini-s390.h: Cater for zero length structures
6040
6041 2005-12-20 Neale Ferguson <neale@sinenomine.net>
6042
6043         * mini-s390.c: ABI fixes
6044
6045         * inssel-s390.brg: Remove debug statements
6046
6047         * cpu-s390.md: Fix length of ATOMIC_xx operations
6048
6049 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
6050
6051         * basic-float.cs: Add float<->long conversion tests.
6052
6053 2005-12-16 Neale Ferguson <neale@sinenomine.net>
6054
6055         * mini-s390.c: Fix LOCALLOC processing.
6056
6057         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
6058
6059 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
6060
6061         * iltests.il: Add tests for some opcodes not covered by the other
6062         tests.
6063
6064 2005-12-15 Neale Ferguson <neale@sinenomine.net>
6065
6066         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
6067         register loading for Tail processing; Correct trace output.
6068
6069         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
6070
6071         * cpu-s390.md: Correct size of jmp instruction. 
6072
6073 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6074
6075         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
6076
6077 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6078
6079         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
6080           Bring s390 up to current level.
6081
6082 2005-12-12  Zltan Varga  <vargaz@gmail.com>
6083
6084         * generics.2.cs: Disable the newly added tests as they do not work yet.
6085         
6086         * generics.2.cs: Add valuetype tests.
6087
6088 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
6089
6090         * basic-long.cs: Add i4->u8 test.
6091
6092         * objects.cs: Add tests for JIT intrinsic.
6093
6094         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
6095         optimizations lost by a mistake.
6096
6097 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
6098
6099         * basic-long.cs: Remove a test moved to objects.cs.
6100
6101         * arrays.cs: Add more array tests.
6102
6103 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
6104
6105         * arrays.cs: Add new tests for multi-dimensional arrays.
6106
6107 2005-12-06  Raja R Harinath  <rharinath@novell.com>
6108
6109         * Makefile.am (test_sources2): Add generics.2.cs.
6110         (EXTRA_DIST): Add test_sources2.
6111
6112 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
6113
6114         Support for boxing and unboxing nullable types as well as the
6115         isinst operation on nullables, per the CLI ammendment.
6116
6117         * inssel.brg (CEE_ISINST): Special case for nullable
6118
6119         * mini.c (handle_unbox_nullable): new method
6120         (handle_box): Special case for nullable types
6121         (mono_method_to_ir): Call handle_unbox_nullable in correct
6122         places.
6123
6124         * generics.2.cs: New test suite
6125
6126         * Makefile.am: Support for regression tests with generics.
6127
6128 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
6129
6130         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
6131         allocated to registers. Fixes #76800.
6132
6133 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
6134
6135         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
6136
6137 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
6138
6139         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
6140         of platforms.
6141
6142 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
6143
6144         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
6145         objects.cs.
6146
6147         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
6148         
6149         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
6150 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
6151
6152         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
6153         single precision before storing to a single precision location.
6154
6155 2005-11-28  Raja R Harinath  <rharinath@novell.com>
6156
6157         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
6158
6159 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
6160
6161         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
6162         correct files.
6163
6164         * basic.cs: Remove test_0_byte_compares test which was moved to
6165         objects.cs a long time ago.
6166
6167 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
6168
6169         * aliasing.c: Fixed aliasing issue on 64 bit archs.
6170
6171 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
6172
6173         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
6174         handlers are called.
6175
6176         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
6177         throwing code.
6178
6179          * mini-ia64.c: Add support for the throw->branch exception 
6180         optimization.   
6181
6182         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
6183
6184 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6185
6186         * mini.c: Enabled "fastpath" deadce :-)
6187         
6188 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6189
6190         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
6191         alias analysis pass to support it.
6192         * mini.h: Likewise.
6193         * ssa.c: Likewise.
6194         * liveness.c: Likewise (liveness computation can use aliasing
6195         information to be more accurate).
6196         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
6197         moreover made so that "--compile-all" uses the given optimization
6198         flags and not the default ones.
6199         * aliasing.c: Alias analysis (new file).
6200         * aliasing.h: Likewise.
6201         * Makefile.am: added "aliasing.c" and "aliasing.h".
6202         
6203 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
6204
6205         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
6206         OP_L opcodes.
6207
6208 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
6209
6210         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
6211         fp >= end_of_stack exit condition, as it is not needed, and it might
6212         become true for fp eliminated frames.
6213
6214 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
6215
6216         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
6217         coded offsets.
6218
6219 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
6220
6221         * mini-arm.c: fixed alignment of doubles/longs to match
6222         the C ABI (bug #76635).
6223
6224 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
6225
6226         * aot.c: fix compilation with --enable-minimal=aot.
6227
6228 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
6229
6230         * mini-arm.c: fixed compatibility with the new
6231         floating point emulator package for compares.
6232
6233 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
6234
6235         * mini.c : reverted sig->pinvoke changes (r51396-51397).
6236
6237 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
6238
6239         * mini-exceptions.c (print_stack_frame): Output to stderr.
6240         (mono_handle_native_sigsegv): Ditto.
6241
6242 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6243
6244         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
6245         OP_LCONV_TO_OVF_I implementation.
6246
6247         * mini-amd64.c: Add support for the throw->branch exception 
6248         optimization.
6249
6250         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
6251         when the catch clause catches a more general exception, i.e. Object.
6252
6253 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
6254
6255         * cpu-ia64.md: Remove unused opcodes.
6256
6257         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
6258         specific defines for architectures defining USE_SIGACTION.
6259
6260         * mini-ia64.c: Fix some warnings.
6261
6262         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
6263         version seemed to skip a frame.
6264
6265 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6266
6267         * mini.c: Clean up the usage of sig->pinvoke flag. Now
6268         only calls which are made to native code use this flag.
6269
6270 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
6271
6272         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
6273         varargs methods as well.
6274         
6275         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
6276         which have save_lmf set. Reorganize methods prologs a bit.
6277
6278         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
6279         debugger to the proper place.
6280
6281 2005-10-29  Martin Baulig  <martin@ximian.com>
6282
6283         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
6284         when running inside the debugger until the debugger has support
6285         for it.
6286
6287 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
6288
6289         * mini.h: Fix a warning.
6290
6291 2005-10-24  Miguel de Icaza  <miguel@novell.com>
6292
6293         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
6294         we expose publicly, this returns the string.
6295
6296 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
6297
6298         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
6299         with fp elimination.
6300
6301 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
6302
6303         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
6304         native stacktrace using the glibc 'backtrace' function if available.
6305
6306 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
6307
6308         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
6309
6310         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
6311         handle SIGSEGVs received while in native code.
6312
6313         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
6314         code, call mono_handle_native_sigsegv which will abort the runtime
6315         after printing some diagnostics, instead of converting it into a
6316         confusing NullReferenceException.
6317
6318 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
6319
6320         * cpu-pentium.md: Remove unused opcodes.
6321
6322 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
6323
6324         * mini-amd64.h (MonoLMF): Add rsp field.
6325
6326         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
6327         the lmf too.
6328
6329 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
6330
6331         * mini-codegen.c (get_register_spilling): Fix some warnings.
6332
6333 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
6334
6335         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
6336         elimination during exception handling. Enable fp elimination by
6337         default.
6338
6339         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
6340         elimination.
6341
6342 2005-10-16  Martin Baulig  <martin@ximian.com>
6343
6344         * mini-exceptions.c
6345         (mono_debugger_run_finally): New public method for the debugger.
6346
6347 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
6348
6349         * debug-mini.c (mono_debug_init_method): Fix warning.
6350
6351         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
6352         the 'exname' parameter const to fix some warnings.
6353
6354 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
6355
6356         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
6357         introduced by the previous patch.
6358
6359 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
6360
6361         * basic-float.cs: Add test for precision of float arithmetic.
6362
6363         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
6364         when loading/storing single values from/to memory.
6365
6366         * mini.c (mono_jit_compile_method_with_opt): Create the function
6367         pointers in the correct domain.
6368
6369 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
6370
6371         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
6372         introduced by previous patch.
6373         
6374         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
6375         when out_filter_idx is NULL.
6376
6377         * mini-exceptions.c: Don't run filter clauses twice during exception
6378         handling. Fixes #75755.
6379
6380 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
6381
6382         * aot.c: Add support for ldflda wrappers.
6383
6384         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
6385         #75902.
6386
6387 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
6388
6389         * mini.c, mini.h: do not consider exception handlers blocks when
6390         setting up interface variables.
6391
6392 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
6393
6394         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
6395
6396 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
6397
6398         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
6399         causes a regression.
6400
6401         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
6402
6403 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
6404
6405         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
6406         of the OP_P definitions.
6407
6408         * TODO: Add a proposal for dealing with the CEE/OP mess.
6409
6410         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
6411         optimizations from the x86 port.
6412
6413         * cpu-amd64.md: Ditto.
6414
6415         * basic.cs basic-long.cs: Add tests.
6416
6417 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
6418
6419         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
6420         Patrik Torstensson's implementation of my exception-handling
6421         optimization idea, when the exception object is not used
6422         (bug #62150).
6423
6424 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
6425
6426         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
6427         of the mul_imm optimizations from the old jit.
6428
6429 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
6430
6431         * mini.c, liveness.c: patch by Patrik Torstensson and
6432         Zoltan Varga to improve performance in methods with
6433         exception clauses.
6434
6435 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
6436
6437         * driver.c: Remove 'Globalization' entry from --version.
6438
6439 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
6440
6441         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
6442         there is a profiler interested in JIT events.
6443
6444         * aot.c: Load profile files produced by the AOT profiling module, and
6445         reorder methods based on the profiling info. Add a 'method_order' table
6446         to the AOT file to make mono_aot_find_jit_info work with the reordered
6447         methods.
6448
6449         * mini.h: Bump AOT file version info.
6450
6451 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
6452
6453         * mini-arm.h: work around what looks like a gcc bug when optimizations
6454         are enabled.
6455
6456 2005-09-28  Raja R Harinath  <rharinath@novell.com>
6457
6458         * Makefile.am (AM_CFLAGS): Don't use += to append inside
6459         conditionals.  Use ...
6460         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
6461
6462 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
6463
6464         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
6465         to determine the amount of memory to copy when passing valuetypes.
6466
6467         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
6468         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
6469
6470 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
6471
6472         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
6473         information about aot.
6474
6475 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
6476
6477         * *.c: Replace the use of {Enter,Leave}CriticalSection with
6478         macros. This will allow a deadlock debugger to easily be plugged
6479         in.
6480
6481 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
6482
6483         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
6484
6485 2005-09-27  Raja R Harinath  <rharinath@novell.com>
6486
6487         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
6488         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
6489         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
6490         ($(arch_built)) [CROSS_COMPILING]: Error out.
6491
6492 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
6493
6494         * aot.c: Add support for the no_special_static flag for classes.
6495
6496 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6497
6498         * Reapply reverted patches.
6499
6500         * *: Revert r50174 as well.
6501
6502         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
6503
6504 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6505
6506         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
6507
6508 2005-09-23  Miguel de Icaza  <miguel@novell.com>
6509
6510         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
6511         part of the SIG_HANDLER_SIGNATURE.  
6512
6513 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
6514
6515         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
6516         statistics.
6517
6518         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
6519         introduced by previous patch.
6520
6521 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
6522
6523         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
6524         saved registers too.
6525
6526         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
6527         upon the information returned by get_call_info ().
6528         
6529         * mini-x86.c (add_float): Fix stack size calculation.
6530         (mono_arch_call_opcode): Rewrite this so it works based up the
6531         information returned by get_call_info ().
6532         (mono_arch_get_this_vret_args): Ditto.
6533
6534 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
6535
6536         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
6537         in cinfo to determine the registers which need to be used.
6538
6539 2005-09-20  Miguel de Icaza  <miguel@novell.com>
6540
6541         * driver.c (mono_main): Add --server and --desktop flags. 
6542
6543 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
6544
6545         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
6546         registers as global registers.
6547
6548         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
6549         longer needed with the new register allocator.
6550
6551         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
6552
6553         * cpu-ia64.md: Remove unused opcodes.
6554         
6555         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
6556         
6557 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
6558
6559         * cpu-amd64.md: Remove unused opcodes.
6560
6561         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
6562         needed with the new register allocator.
6563
6564         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
6565         reg-reg moves.
6566
6567 2005-09-16  Raja R Harinath  <rharinath@novell.com>
6568
6569         * Makefile.am (check-local): Don't invoke semdel-wrapper.
6570
6571 2005-09-16  Martin Baulig  <martin@ximian.com>
6572
6573         * exceptions-amd64.c
6574         (throw_exception): Don't call mono_debugger_throw_exception() if
6575         we're a rethrow - see the FIXME in the code.
6576
6577 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
6578
6579         * mini.c (mono_init_exceptions): This only works on some architectures.
6580         
6581 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6582
6583         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
6584         on ia64.
6585
6586         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
6587
6588         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
6589         now in mini-exceptions.c.
6590
6591 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
6592
6593         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
6594         now in mini-exceptions.c.
6595
6596 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6597
6598         * exceptions-x86.c: Applied patch from Patrik Torstensson 
6599         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
6600
6601         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
6602         code into mini-exceptions.c. Add some assertions to it.
6603
6604 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
6605
6606         * aot.c (emit_section_change): Applied patch from "The Software Team" 
6607         (<software@solmersa.com>). Fix as errors on windows.
6608
6609 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6610
6611         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
6612         method info into the LMF.
6613
6614 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6615         
6616         * mini-ia64.c: Add proper unwind info for method epilogs.
6617
6618         * exceptions-ia64.c: Add some code to help debugging.
6619         
6620         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
6621
6622         * mini-exceptions.c: Fix warning.
6623
6624 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6625
6626         * mini.c: Really fix build.
6627
6628         * mini-x86.c mini-amd64.c: Fix build.
6629
6630 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6631
6632         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
6633
6634         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
6635         some Interlocked methods as intrinsics.
6636
6637         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
6638         for Thread methods as well.
6639
6640         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
6641
6642         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
6643
6644         * mini-ia64.c mini-x86.c mini-amd64.c 
6645         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
6646         OP_MEMORY_BARRIER.
6647         
6648         * mini.c (mono_init_exceptions): Fix build breakage.
6649
6650 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
6651
6652         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
6653         of instructions. Use the new ia64_unw_op macros for emitting unwind
6654         info.
6655
6656         * mini.c (mono_init_exceptions): Initialize exception handling
6657         related trampolines at startup.
6658
6659 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
6660
6661         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
6662
6663 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
6664
6665         * mini.c: Handle type loading errors gracefully during compilation and
6666         throw the appropriate exception.
6667
6668 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
6669
6670         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
6671         for the mono binary.
6672
6673 2005-09-09  Martin Baulig  <martin@ximian.com>
6674
6675         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
6676         the release.
6677
6678 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6679
6680         * mini-arm.h: use emulation for conv.r.un for the release.
6681
6682 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6683
6684         * mini-arm.c, objects.cs: more fixes and tests for them.
6685
6686 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6687
6688         * mini-arm.c: align structures to at least 4 bytes to be able
6689         to keep our current optimized memcpy.
6690
6691 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
6692
6693         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
6694
6695 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6696
6697         * mini.c: ignore SIGPIPE.
6698
6699 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
6700
6701         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
6702
6703         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
6704
6705 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
6706
6707         * mini.h: Add prototype for mono_allocate_stack_slots_full.
6708
6709 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6710
6711         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
6712         exception handling support.
6713         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
6714         patch by Brian Koropoff <briank@marakicorp.com>).
6715
6716 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
6717
6718         * mini.c: revert another 'optimization' which breaks when
6719         items on the eval stack need to be saved at a basic block end
6720         (bug #75940).
6721
6722 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
6723
6724         * jit-icalls.c: for arrays, ensure we always provide
6725         lower bounds.
6726
6727 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
6728
6729         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
6730         
6731         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
6732
6733 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
6734
6735         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
6736         arguments in their original register.
6737
6738 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
6739
6740         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
6741         memset/memcpy.
6742
6743         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
6744         when ssapre is enabled.
6745
6746         * inssel-long.brg: Fix bug in previous patch.
6747
6748         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
6749         multiplication by a constant.
6750
6751 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
6752
6753         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
6754         icc.
6755
6756         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
6757         saving registers.
6758
6759 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
6760
6761         * inssel-arm.brg: apply changes tested by Brian Koropoff
6762         <briank@marakicorp.com>.
6763
6764 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
6765
6766         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
6767         
6768 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
6769
6770         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
6771         to the same register if dreg is just a base register.
6772         (print_ins): Improve printing of membase opcodes.
6773
6774         * inssel-x86.brg: Add optimized ldind(reg) rules.
6775
6776         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
6777
6778 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
6779
6780         * mini.c: when running under valgrind, set the stack bottom for
6781         the GC at the actual approximate stack for the app (fixes running
6782         mono with valgrind).
6783
6784 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
6785
6786         * mini.c: do no break at the first valuetype to init found
6787         (fixes bug #75791).
6788
6789 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
6790
6791         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
6792
6793 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
6794
6795         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
6796
6797 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
6798
6799         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
6800
6801 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6802
6803         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
6804
6805         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
6806         code.
6807
6808         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
6809         code.
6810
6811         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
6812         methods.
6813
6814 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
6815
6816         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
6817
6818 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6819
6820         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
6821         in the tail recursion optimization.
6822
6823         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
6824         debug info into the assembly file.
6825
6826         * iltests.il: Add test for filter regions.
6827
6828         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
6829         initial stack of filter regions. Fixes #75755.
6830
6831 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
6832
6833         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
6834         stack requirements.
6835
6836 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6837
6838         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
6839         the check for an already compiled method on non-ia64 platforms.
6840         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
6841         proper domain.
6842
6843         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
6844
6845         * inssel-x86.brg: Add some optimized call rules.
6846
6847 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
6848
6849         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
6850         method here.
6851
6852         * mini.h mini-trampolines.c: Pass the trampoline argument to 
6853         mono_arch_patch_delegate_trampoline.
6854
6855         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
6856
6857         * mini-trampolines.c: Fix build.
6858
6859         * mini-amd64.h: Add delegate trampolines.
6860
6861         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
6862
6863         * inssel-amd64.brg: Add optimized call rules.
6864         
6865         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
6866
6867         * inssel-ia64.brg: Add optimized ldind(reg) rules.
6868
6869 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
6870
6871         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
6872         change.
6873
6874         * mini-ia64.c: Remove LMF fixmes.
6875
6876         * mini-ia64.h: Remove most fields from LMF.
6877
6878         * inssel-ia64.brg (stmt): Fix unaligned access errors.
6879
6880         * mini-trampolines.c: Add support for IA64 function descriptors.
6881
6882         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
6883         for IA64 function descriptors.
6884
6885 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
6886
6887         * tramp-arm.c: patch the vtable for virtual calls. Added
6888         support code to register/unregister the LMF.
6889         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
6890         more LMF work.
6891
6892 2005-08-19  Dick Porter  <dick@ximian.com>
6893
6894         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
6895         bit value if needed.
6896
6897 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
6898
6899         * mini.c (mini_get_method): Move handling of wrapper data here.
6900
6901         * mini.c (mono_method_to_ir): Add support for dynamic methods.
6902
6903         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
6904         virtual.
6905
6906         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
6907         bblock->code does not remain empty.
6908
6909 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
6910
6911         * arrays.cs: Add regression test for #75832.
6912
6913         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
6914         rules. Fixes #75832.
6915
6916         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
6917         instruction scheduling.
6918
6919 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
6920
6921         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
6922
6923 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
6924
6925         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
6926
6927         * mini-codegen.c: Fix VC build.
6928
6929         * cpu-pentium.md: Increase length of atomic_exhange_i4.
6930
6931 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6932
6933         * mini.h: fix signature for mono_register_opcode_emulation.
6934
6935 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
6936
6937         * mini.c: Get rid of most of the helper_sig_... constants using
6938         mono_create_icall_signature ().
6939
6940 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
6941
6942         * jit-icalls.c (helper_ldstr): New helper function.
6943
6944         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
6945
6946         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
6947         throw, load the string using a helper call instead of creating a string object.
6948
6949         * aot.c: Update after LDSTR changes.
6950
6951         * mini.h: Bump AOT file version.
6952         
6953         * aot.c: Save class size info into the AOT file. Print more statistics during
6954         compilation.
6955
6956         * mini.h: Bump AOT file version.
6957
6958         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
6959         ordering of disasm cases. Fixes #74957.
6960
6961 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
6962
6963         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
6964         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
6965         the generic code needed for the ARM port.
6966
6967 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
6968
6969         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
6970         inssel-arm.brg: more ARM features and fixes.
6971
6972 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
6973
6974         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
6975         ARM port work in progress.
6976
6977 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
6978
6979         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
6980
6981         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
6982
6983         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
6984
6985         * inssel.brg (mini_emit_memset): Add support for unaligned access.
6986
6987         * *-ia64.*: Ongoing IA64 work.
6988         
6989         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
6990
6991 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
6992
6993         * TODO: Remove out-of-data todo stuff.
6994
6995         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
6996         dead code.
6997
6998         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
6999
7000         * mini.h: Bump corlib version.
7001
7002 2005-07-27  Martin Baulig  <martin@ximian.com>
7003
7004         * mini-codegen.c
7005         (create_copy_ins): Added `const unsigned char *ip' argument; set
7006         `copy->cil_code' from it.
7007
7008 2005-07-27  Martin Baulig  <martin@ximian.com>
7009
7010         * mini-exceptions.c (mono_handle_exception): Don't call
7011         mono_debugger_handle_exception() for filters.
7012
7013 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
7014
7015         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
7016         as well.
7017
7018 2005-07-26  Martin Baulig  <martin@ximian.com>
7019
7020         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
7021
7022         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
7023         helper_compile_generic_method() if the method is actually virtual
7024         and non-final.
7025
7026 2005-07-26  Martin Baulig  <martin@ximian.com>
7027
7028         * mini.c
7029         (trampoline_code): Renamed to `mono_trampoline_code' and made it
7030         public; this is now accessed directly by the debugger.
7031         (mono_generic_trampoline_code): Removed.
7032
7033         * debug-mini.c
7034         (mono_debug_init_method): Also add interncalls and wrappers.
7035
7036 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
7037
7038         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
7039
7040 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
7041
7042         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
7043
7044 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
7045
7046         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
7047
7048 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7049
7050         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
7051         getting TLS offsets on AMD64 too.
7052
7053 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
7054
7055         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
7056
7057 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
7058
7059         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
7060         inssel-arm.brg, mini-arm.h: ARM port work in progress.
7061
7062 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7063
7064         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
7065
7066         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
7067         to mini.c.
7068
7069         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
7070         mono_sparc_is_virtual_call ().
7071         
7072         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
7073
7074         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
7075         trampoline parameters.
7076
7077         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
7078         
7079         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
7080         to mono_arch_get_vcall_slot_addr.
7081
7082         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
7083         trampoline code.
7084
7085         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
7086
7087 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7088
7089         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
7090
7091 2005-07-19  Martin Baulig  <martin@ximian.com>
7092
7093         * exceptions-amd64.c (throw_exception): Call
7094         mono_debugger_throw_exception() here like we're doing it on i386.
7095
7096 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7097
7098         * mini-ia64.c: Add optimized TLS access support.
7099
7100 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
7101
7102         * mini-exceptions.c: Ongoing IA64 work.
7103
7104         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
7105
7106         * mini.c: Use the default optimization set when embedding. Fixes
7107         #75194.
7108
7109 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
7110
7111         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
7112         of trampolines to a separate file.
7113
7114         * mini-trampolines.c: New file.
7115
7116         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
7117         separate file.
7118         
7119         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
7120         amd64/ia64 code.
7121
7122         * mini-codegen.c: Fix cygwin build.
7123
7124 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
7125
7126         * mini.c: Add some minor changes needed by the IA64 port.
7127
7128         * *-ia64.*: Ongoing IA64 work.
7129
7130 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
7131
7132         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
7133         trampolines into arch-independent and arch-dependent parts.
7134
7135         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
7136
7137 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
7138
7139         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
7140
7141         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
7142         the xp-regalloc-branch for amd64.
7143
7144         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
7145         xp-regalloc-branch for x86.
7146
7147 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
7148
7149         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
7150
7151 2005-07-06  Martin Baulig  <martin@ximian.com>
7152
7153         * mini.c
7154         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
7155         (mono_jit_runtime_invoke): Likewise.
7156
7157 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
7158
7159         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
7160         on x86 too.
7161         
7162         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
7163         without loading their metadata. Reorganize the file format so exception handling+
7164         debug info is kept separate from normal method info. Create MonoJitInfo 
7165         structures for methods lazily.
7166
7167         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
7168         loading metadata.
7169         (x86_class_init_trampoline): Patch AOT class init trampolines too.
7170
7171         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
7172
7173         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
7174         in AOT code.
7175
7176         * mini.h: Bump AOT file version.
7177
7178 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
7179
7180         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7181
7182 2005-07-01  Raja R Harinath  <rharinath@novell.com>
7183
7184         * Makefile.am (check-local): Call semdel-wrapper.
7185
7186 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
7187
7188         * mini-x86.c: Revert the last change as it seems to break the build..
7189
7190 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
7191
7192         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7193         
7194         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
7195
7196 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
7197
7198         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
7199         outside of the macro, so strange stuff doesn't happen with gcc4
7200         (NEW_AOTCONST_TOKEN): Likewise.
7201
7202 2005-06-28  Martin Baulig  <martin@ximian.com>
7203
7204         * mini.c (mini_class_is_system_array): New static method; use this
7205         instead of `klass->parent == mono_defaults.array_class' everywhere
7206         since this also works for the new generic array class.
7207
7208 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
7209
7210         * inssel.brg: Remove warnings.
7211
7212 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
7213
7214         * mini-ia64.c: Ongoing IA64 work.
7215
7216         * basic-float.cs: Add float->i1 conversion test.
7217
7218         * iltests.il: Add conv.u4 test.
7219
7220 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
7221
7222         * inssel-long.brg: Fix bug caused by last change.
7223
7224 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
7225
7226         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
7227         BSDs.  Allows the x86 JIT to work on OSX86
7228
7229 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
7230
7231         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
7232         u4->i8 conversion.
7233
7234         * mini-ia64.c: Ongoing IA64 work.
7235
7236 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
7237
7238         * mini-ia64.c: Ongoing IA64 work.
7239
7240         * driver.c: Clean up jit_code_hash as well when using --regression.
7241
7242         * inssel-long.brg: Fix long->i4/u4 conversion rules.
7243
7244         * basic-long.cs: Add tests for long->u4 conversion.
7245
7246 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
7247
7248         * mini.c: Take mono_get_domainvar out of macros. This makes sure
7249         that we do not depend on undefined C behavior: the order stuff
7250         gets evaluated within an expression. Fixes mono when compiled on
7251         GCC 4.
7252
7253 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
7254
7255         * *-ia64.*: Ongoing IA64 work.
7256
7257         * aot.c: Lower memory usage while loading AOT methods.
7258
7259         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
7260
7261         * mini.h: Bump AOT file format version.
7262
7263 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
7264
7265         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
7266
7267 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
7268
7269         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
7270         not on callee assembly). Fixed some comments.
7271
7272 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
7273
7274         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
7275         it gets proper disassembly.
7276         (emit_method_info): Remove some dead code.
7277
7278         * mini.c (mini_method_compile): Allways allocate the GOT var in
7279         mono_method_to_ir for emulating opcodes.
7280
7281 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
7282
7283         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
7284         before freeing the code memory. Fixes #74990.
7285
7286         * objects.cs: Add regression test for #74992.
7287
7288         * liveness.c: Extend live ranges of arguments to the beginning of the
7289         method. Fixes #74992.
7290
7291         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
7292         so it points into the faulting instruction.
7293
7294 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
7295
7296         * jit-icalls.c (mono_imul_ovf): Add exception handling.
7297
7298         * *-ia64.*: Ongoing IA64 work.
7299
7300         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
7301
7302 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
7303
7304         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
7305
7306         * *-ia64.*: Ongoing IA64 work.
7307
7308 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
7309
7310         * basic-long.cs: Add tests for add/sub.ovf.
7311
7312         * basic.cs: Add tests for sub.ovf.
7313
7314         * *-ia64.*: Ongoing IA64 work.
7315
7316 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
7317
7318         * *-ia64.*: Ongoing IA64 work.
7319
7320         * basic.cs: Add conv.ovf.i4.un test.
7321
7322 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
7323
7324         * mini.c: (remove_block_if_useless) Fixed bug 75061.
7325         
7326 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7327
7328         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
7329
7330 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
7331
7332         * *-ia64.*: Ongoing IA64 work.
7333
7334 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7335
7336         * trace.[ch]:
7337         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
7338
7339 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
7340
7341         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
7342
7343 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
7344
7345         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
7346
7347         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
7348         of a call is callable by a near call.
7349
7350 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
7351
7352         * mini-ia64.c: Ongoing IA64 work.
7353
7354 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
7355
7356         * genmdesc.c: Make the generated array non-static.
7357
7358         * inssel-long.brg: Fix LSHR_IMM rule.
7359
7360         * *-ia64.*: Ongoing IA64 work.
7361
7362         * *-ia64.*: Ongoing IA64 work.
7363
7364 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7365
7366         * *-ia64.*: Ongoing IA64 work.
7367
7368         * *-ia64.*: Ongoing IA64 work.
7369         
7370         * mini-ia64.c: Ongoing IA64 work.
7371
7372         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
7373
7374 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7375
7376         * objects.cs basic-calls.cs: Move some tests to objects.cs.
7377         
7378         * objects.cs basic-long.cs: Move some tests to objects.cs.
7379
7380 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
7381
7382         * *-ia64.*: Ongoing IA64 work.
7383
7384         * iltests.il: Add a new test.
7385
7386         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
7387         newobj. Fixes #75042.
7388
7389 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
7390
7391         * *-ia64.*: Ongoing IA64 work.
7392         
7393         * *-ia64.*: Ongoing IA64 work.
7394         
7395         * *-ia64.*: Ongoing IA64 work.
7396
7397         * basic.cs objects.cs: Move tests accessing static variables as well.
7398
7399         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
7400
7401 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
7402
7403         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
7404
7405         * driver.c: Always print failed tests.
7406
7407         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
7408         frame pointer.
7409
7410         * *ia64*: Ongoing IA64 work.
7411
7412 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
7413
7414         * basic.cs: Add tests for add.ovf. Fix warnings.
7415
7416 2005-05-18  Miguel de Icaza  <miguel@novell.com>
7417
7418         * driver.c (mono_main): Avoid crash if no argument is passed to
7419         --break;  Do not use g_error, but f_printf.   And fix all other
7420         ocurrences of the same crash.
7421
7422 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
7423
7424         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
7425         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
7426         Fixes #74742.
7427
7428 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
7429
7430         * *-ia64.*: Add beginnings of IA64 backend.
7431
7432         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
7433
7434 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
7435
7436         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
7437         Fixes #74925.
7438
7439         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
7440
7441         * mini-amd64.c: Fix a warning.
7442
7443 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
7444
7445         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
7446         in float_neg. Fixes #74897.
7447
7448         * mini-amd64.c (emit_call): Fix another near call bug.
7449
7450 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
7451
7452         * declsec.c: Keep the appdomain information in the structure. Added a 
7453         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
7454         value gets overwritten).
7455         * declsec.h: Set the default MonoArray for the the stack to 6. Added
7456         an MonoAppDomain member to MonoSecurityFrame.
7457         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
7458         used in the stack walk. Now use a MonoArray which grow (double) when
7459         it gets full.
7460
7461 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
7462
7463         * mini.c: Re-enabled runtime cleanup, since running threads should
7464         now properly stop when exiting.
7465
7466 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
7467
7468         * mini-codegen.c: New file contaning the arch-independent local
7469         register allocator. Not used by any architectures yet.
7470
7471         * mini.h linear-scan.c: Merge some changes from the 
7472         mini-xp-local-regalloc branch.
7473
7474 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
7475
7476         * mini-amd64.c (emit_call): Fix calls to native functions when the
7477         runtime is compiled as a shared library. Fixes #74756.
7478
7479         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
7480         on a literal field. Fixes #74751.
7481
7482 2005-04-25  Raja R Harinath  <rharinath@novell.com>
7483
7484         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
7485
7486 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
7487
7488         * objects.cs: Add missing null casting test.
7489
7490 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
7491
7492         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
7493         in wrapper methods. Also rename 'address' variable to 'offset'.
7494
7495 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
7496
7497         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
7498         warnings.
7499         
7500         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
7501
7502         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
7503         work on windows.
7504
7505 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
7506
7507         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
7508
7509 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7510
7511         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
7512         just the last bytes.
7513
7514 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7515
7516         * aot.c (mono_compile_assembly): Fix warning.
7517
7518         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
7519         by the _MSC_VER stuff.
7520
7521 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
7522
7523         * inssel-long.brg: Fix #74588.
7524
7525         * cpu-amd64.md: Fix #74591.
7526
7527         * iltests.il: Add new regression tests.
7528
7529 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
7530
7531         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
7532         valuetype.
7533
7534 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
7535
7536         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
7537
7538         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
7539         from Bill Middleton <flashdict@gmail.com>.
7540
7541 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
7542
7543         * arrays.cs: Add new regression test. Fix warnings.
7544
7545 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
7546
7547         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
7548         and leakage in CKFINITE.
7549
7550         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
7551         this to a null op since it is called on amd64 too.
7552
7553         * exceptions-amd64.c (get_throw_trampoline): Align stack.
7554
7555         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
7556         body since this is not used on amd64.
7557         
7558         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
7559
7560         * mini-amd64.c: Remove obsolete fixmes.
7561
7562         * mini.c (print_method_from_ip): Fix debugging support.
7563
7564 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
7565
7566         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
7567         so that expressions that don't give much gain are not reduced.
7568         * ssapre.h: Likewise.
7569
7570 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
7571
7572         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
7573
7574         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
7575
7576         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
7577
7578 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
7579
7580         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
7581
7582         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
7583
7584 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
7585
7586         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
7587         stack touching.
7588
7589         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
7590
7591         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
7592
7593         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
7594
7595         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
7596         MONO_ARCH_USE_SIGACTION. Fixes #74252.
7597
7598         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
7599
7600         * mini-x86.c: Fix up stack overflow handling.   
7601
7602         * exceptions.cs: Add new regression test.
7603
7604 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
7605
7606         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
7607         mono_jit_thread_attach.
7608
7609         * mini.c (mono_method_to_ir): Verify called method is not abstract.
7610
7611 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7612
7613         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
7614         avoid calling constructors using callvirt.
7615
7616         * inssel.brg: Fix #74073.
7617
7618 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
7619
7620         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
7621         compilation with non-GCC compilers.
7622         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
7623         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
7624
7625 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
7626
7627         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
7628         klass->interface_offsets (will likely fix bug#74073).
7629
7630 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7631
7632         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
7633
7634 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
7635
7636         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
7637         to amd64_div_reg_size ().
7638         
7639         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
7640
7641 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
7642
7643         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
7644
7645 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7646
7647         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
7648
7649 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7650
7651         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
7652         
7653         * mini.c (mono_precompile_assembly): Load and precompile referenced
7654         assemblies as well. Fixes #74015.
7655
7656 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
7657
7658         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
7659
7660 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
7661
7662         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
7663         a lot of checks and (anyway) permissions cannot work until corlib is 
7664         loaded.
7665
7666 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
7667
7668         * mini-ppc.c: fixed ABI issue on sysv/ppc.
7669
7670 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
7671
7672         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
7673         calls (fixes bug#72824).
7674
7675 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
7676
7677         * mini.c: fix tail recursion elimination (see test in bug#73936).
7678
7679 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
7680
7681         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
7682         some fp functions in sse2 mode.
7683
7684 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
7685
7686         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
7687
7688 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
7689
7690         * mini.h mini.c: Add mono_get_jit_tls_key ().
7691
7692         * mini-x86.c: Enable fast TLS support on windows.
7693
7694 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
7695
7696         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
7697         * mini.c: Check for p/invoke method when generating code. If a
7698         p/invoke method, or it's class, isn't decorated with [Suppress
7699         UnmanagedCodeSecurity] then generate code to call System.Security.
7700         UnmanagedDemand (only if the security manager is active).
7701
7702 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7703
7704         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
7705         last change as it seems to cause strange crashes.
7706         
7707 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
7708
7709         * *.c: handle unsafe function pointers where needed.
7710
7711 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7712
7713         * mini.c (mono_jit_free_method): Remove the fixme too.
7714
7715 2005-03-15  Miguel de Icaza  <miguel@novell.com>
7716
7717         * mini.c: As discussed, make the code actually free the delegate
7718         thunk now, to enable the debugging of delegate problems, use
7719         MONO_DEBUG=1 when running Mono. 
7720
7721         This takes also care of parts of the leaks as seen by Joe.
7722
7723 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
7724
7725         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
7726         thread_tls_offset calculation.
7727
7728 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
7729
7730         * declsec.c: Reworked linkdemand checks for icall. The previous code
7731         was using the declaration code (untrusted) and didn't work as expected
7732         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
7733         specific case.
7734
7735 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
7736
7737         * iltests.il: Add new localloc test.
7738
7739         * mini-amd64.c: Handle large stack allocations the same way as on
7740         windows if stack overflow handling is working.
7741         
7742         * mini-amd64.c: Allocate the signal stack using mmap.
7743
7744         * mini.c (sigsegv_signal_handler): Fix reading of context.
7745
7746         * mini-exceptions.c: Fix up stack overflow handling.
7747
7748         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
7749
7750         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
7751
7752         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
7753
7754         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
7755
7756         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
7757         tramp_init functions as they are no longer needed.
7758
7759 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
7760
7761         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
7762         
7763         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
7764
7765         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
7766         
7767         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
7768         support that now.
7769
7770         * mini-ops.h: Add OP_LMUL_IMM.
7771
7772         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
7773         long mul/div opcodes as intrinsic.
7774
7775         * mini-amd64.c (emit_call): Handle the case when the callee might be
7776         an AOT method.
7777
7778 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
7779
7780         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
7781         extra safe.
7782         
7783         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
7784
7785         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
7786
7787 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
7788
7789         * mini.c (mono_codegen): Don't leak here, to help people running
7790         monogrind.
7791
7792 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
7793
7794         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
7795         conversions in sse2 mode.
7796
7797         * basic-float.cs: Add regression test.
7798         
7799         * mini-amd64.c: Reenable sse2.
7800
7801 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
7802
7803         * mini-amd64.c: Disable sse2 until some regressions are fixed.
7804
7805 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
7806
7807         * driver.c: Copyright text should include 2005.
7808         
7809 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
7810
7811         * cpu-amd64.md (load_membase): Fix more max lengths.
7812
7813 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
7814
7815         * cpu-amd64.md (load_membase): Fix max length.
7816
7817         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
7818
7819         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
7820
7821         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
7822         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
7823
7824         * basic-float.cs: Add rounding regression test.
7825
7826         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
7827
7828 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
7829
7830         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
7831         structures in registers for pinvoke wrappers.
7832
7833 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
7834
7835         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
7836
7837 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
7838
7839         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
7840         wrapper to mono_jit_thread_attach.
7841
7842         * mini.c (mini_jit_thread_attach): New jit icall.
7843
7844         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
7845         native->managed wrappers.
7846
7847         * exceptions.cs: Add new regression test.
7848
7849         * mini.c (optimize_branches): Check regions in the cbranch to throw
7850         block case as well. Fixes #73242.
7851
7852 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7853
7854         * mini.c: thread safety fixes.
7855
7856 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
7857
7858         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
7859         patching stuff, since delegates use jump trampolines so there is
7860         no caller.
7861
7862         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
7863         jump trampolines.
7864         
7865         * tramp-amd64.c: Fix build.
7866
7867         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
7868         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
7869
7870         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
7871         Rename this to mono_arch....
7872         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
7873
7874         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
7875
7876         * mini-amd64.c (emit_call): If both the caller and the callee is
7877         guaranteed to have 32 bit addresses, emit a normal call.
7878
7879         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
7880
7881         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
7882         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
7883         method_ptr inside delegates.
7884
7885 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
7886
7887         * mini.c (mono_jit_free_method): Free the method info even if the native code is
7888         invalidated. Fixes #73001.
7889
7890         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
7891
7892         * mini-x86.c: Only use stdcall for pinvokes on windows.
7893
7894 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
7895
7896         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
7897         * mini-x86.c: remove unreliable __thread var offset detection,
7898         use the correct accessors and enable by default.
7899
7900 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
7901
7902         * mini.c (mono_jit_free_method): Fix memory leak.
7903
7904 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
7905
7906         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
7907
7908 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
7909
7910         * cpu-amd64.md: Fix lengths of atomic opcodes.
7911
7912 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
7913
7914         * driver.c: try to not imply using ICU is any good.
7915
7916 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
7917
7918         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
7919         functions as inline ops.
7920
7921         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
7922         some Interlocked functions as inline ops.
7923
7924         * mini.c (move_basic_block_to_end): Fix bug in last patch.
7925
7926         * mini.h (MonoBasicBlock): Reorganize fields a bit.
7927
7928         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
7929
7930         * mini.c: Add support for OP_NOT_TAKEN.
7931
7932         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
7933         structures in registers for pinvoke wrappers.
7934
7935         * mini-amd64.c: Fix warnings.
7936
7937 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
7938
7939         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
7940
7941         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
7942
7943         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
7944         address instead of loading the address from it.
7945
7946         * mini-x86.c: Add support for returning small structs in registers
7947         on Win32. Fixes part of #70864.
7948         
7949 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
7950
7951         * trace.c (get_token): Improve error checking.
7952
7953 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
7954
7955         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
7956
7957 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
7958  
7959         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
7960         it can be reused for MonoClass.
7961         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
7962         _LINKDEMAND.
7963
7964 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
7965
7966         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
7967         instead of a MonoReflectionMethod. The method information wasn't used
7968         when displaying SecurityException details (but will be now).
7969
7970 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
7971
7972         * Makefile.am : windows build fix.
7973
7974 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
7975
7976         * iltests.il: Add new regression test.
7977
7978         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
7979         #72522.
7980
7981 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
7982  
7983         * mini.c: Moved linkdemand check into helper function check_linkdemand
7984         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
7985         LDFTN, LDVIRTFTN).
7986
7987 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
7988
7989         * declsec.c: Added statistics counter for different kinds of 
7990         LinkDemands.
7991         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
7992         (and commented) declaration.
7993         * mini.c: Added statistics counter for security Demand code 
7994         generation. Added display of security statistics.
7995
7996 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
7997
7998         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
7999         Fix compilation errors under gcc-2.95.
8000
8001 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
8002
8003         * mini.c, driver.c: Use the new jit trampoline hashtable
8004
8005 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8006
8007         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
8008
8009 2005-02-11  Martin Baulig  <martin@ximian.com>
8010
8011         * debug-mini.c (mono_debug_close_method): Free the line number array.
8012
8013 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8014
8015         * aot.c: Break up large methods into smaller ones. Share GOT slots for
8016         icalls.
8017
8018         * mini.h: Bump AOT file format version. 
8019
8020 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
8021
8022         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
8023         APTC and P/Invoke.
8024         * declsec.h: Added macros to get/set lazyly initialized security 
8025         informations about assemblies. Added new enum for different type of
8026         possible LinkDemand violation. Added function to check LinkDemands.
8027         * mini.h: Added a field to MonoCompile to hold any security violation
8028         detected when JITting a method (so it can be thrown later).
8029         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
8030         and CEE_CALLVIRT. Added code to throw exception at the end of
8031         mini_method_compile (note: the exception is unhandled right now).
8032
8033 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
8034
8035         * mini.c, jit-icalls.c: use the managed implementation of
8036         memset for initobj and memset, to avoid managed <-> unmanaged
8037         transitions.
8038
8039 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8040
8041         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
8042         optimization if it would need a GOT var.
8043
8044         * basic.cs: Add tests for constant propagation and switch statements.
8045
8046         * ssa.c: Fix out-of-range constant propagation and switch statements.
8047
8048 2005-02-09    <vargaz@freemail.hu>
8049
8050         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
8051
8052 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
8053
8054         * cpu-amd64.md (load_membase): Fix max length of load_membase.
8055
8056 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8057
8058         * mini.c: update to new signature of mono_class_get_allocation_ftn().
8059
8060 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
8061
8062         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
8063         arithmetic operations.
8064
8065 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
8066
8067         * mini-ppc.c: add a workaround for broken user code that
8068         DllImports vararg functions with non-vararg signatures.
8069
8070 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
8071
8072         * mini.c (mono_jit_compile_method_inner): Add detection and a 
8073         meaningfull error message for assemblies written in Managed C++.
8074
8075         * tramp-amd64.c mini-amd64.h: Add support for 
8076         create_trampoline_from_token ().
8077
8078         * aot.c mini-x86.c abcremoval.c: Applied patch from
8079         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
8080
8081 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
8082
8083         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
8084         which takes a MonoImage/token as parameter instead of a MonoMethod.
8085
8086         * aot.c: Use the new trampoline for initializing vtables.
8087
8088         * aot.c: Add support for ldfld/stfld_remote wrappers.
8089
8090         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
8091         rules for compare <MEM>, IMM.
8092
8093         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
8094
8095         * aot.c: Handle inherited finalizers correctly.
8096
8097 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
8098
8099         * inssel.brg (stmt): Add a missing _setup_... ().
8100
8101         * aot.c: Save some parts of the class state to the AOT file and use it
8102         to recompute that state when a class is initialized.
8103
8104         * mini.c: Install AOT hooks into the runtime.
8105
8106         * mini.h: Bump AOT file format version.
8107         
8108         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
8109         Fixes #72148.
8110
8111         * iltests.il: Add new test.
8112
8113 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8114
8115         * mini.c: fix typo.
8116
8117 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
8118
8119         * mini.c: setup the statistical profiler in the thread attach
8120         callback to cope with the new single thread code.
8121
8122 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
8123
8124         * mini-ppc.c: ensure we have enough room for the profiler
8125         calls (fixed bug#72084).
8126
8127 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
8128
8129         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
8130         it.
8131
8132 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8133
8134         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
8135
8136 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8137
8138         * ssapre.c: Fixed an issue with down safety (this allows IronPython
8139         to succesfully execute parrotbench).
8140         * ssapre.h: Likewise.
8141
8142 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8143
8144         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
8145         variable for stores to method arguments (fixes a SSAPRE issue).
8146
8147 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8148
8149         * mini.c: handle value types in dup, fixes gen-112.cs.
8150
8151 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
8152
8153         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
8154         sequence for calls in dynamic methods to avoid thunks.
8155
8156 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
8157
8158         * mini.c: correctly remove dynamic methods from the hashtable.
8159
8160 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8161
8162         * driver.c: Disabled SSAPRE until fix the bug that appears
8163         in IronPython's parrotbench.
8164
8165 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
8166
8167         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
8168
8169         * mini.c (mono_method_to_ir): Revert the previous change.
8170         
8171         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
8172         when AOT compiling.
8173
8174         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
8175         mono_jit_info_table_find () etc. when running under valgrind.
8176
8177         * inssel.brg: Fix warnings.
8178
8179         * mini-exceptions.c: Fix warnings.
8180
8181 2005-01-31  Martin Baulig  <martin@ximian.com>
8182
8183         * driver.c (compile_all_methods_thread_main): Don't try to compile
8184         generic methods or anything which has type parameters.
8185
8186 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
8187
8188         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
8189
8190         * TestDriver.cs: Add --verbose flags.
8191
8192         * graph.c ssa.c: Fix 64 bit warnings.
8193         
8194         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
8195         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
8196         Fix 64 bit warnings.
8197
8198         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
8199         variable not spotted by gcc.
8200         
8201         * mini-amd64.c inssel-amd64.brg: Applied patch from  
8202         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
8203         X86_COMPARE_MEMBASE opcodes.
8204
8205         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
8206
8207 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
8208
8209         * *: MonoMethod->signature might be NULL now. You *MUST* use
8210         mono_method_signature.
8211
8212 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8213
8214         * driver.c (compile_all_methods_thread_main): Compile the methods
8215         without invoking cctors.
8216
8217 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8218
8219         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
8220         * basic-calls.cs: test for the above.
8221
8222 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8223
8224         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
8225         MonoJitInfo changes.
8226
8227 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
8228
8229         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
8230         eagerly if it contains dynamic methods.
8231         
8232         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
8233
8234         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
8235         trace, it is now computed by an icall from trace_ips.
8236         
8237         * mini-exceptions.c: Fix a warning.
8238
8239 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
8240
8241         * mini-exceptions.c: don't bother getting stack trace info if
8242         it's not going to be used.
8243
8244 2005-01-27  Raja R Harinath  <rharinath@novell.com>
8245
8246         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
8247         ssapre-mini-ops.h.
8248
8249 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
8250
8251         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
8252
8253         * aot.c: Avoid calling mono_method_get_header () if not needed.
8254
8255         * mini.h: Bump AOT file format version.
8256         
8257         * mini.c (mono_emit_native_call): Allocate a GOT var here.
8258
8259         * mini.c (mono_print_tree): Print more info for calls.
8260
8261 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
8262
8263         * declsec.h: Remove warning by adding missing include for marshal.h
8264
8265 2005-01-26  Martin Baulig  <martin@ximian.com>
8266
8267         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
8268         `ip' twice.
8269
8270 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
8271
8272         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
8273         flags.
8274
8275         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
8276
8277         * aot.c (mono_compile_assembly): Fix a warning.
8278
8279 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
8280
8281         * declsec.c: Look for security attributes on the original MonoMethod 
8282         (and not the wrapped one). This fix permissions on icalls.
8283
8284 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8285
8286         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8287
8288         * mini.c (mono_allocate_stack_slots): Add a fixme.
8289
8290         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8291
8292 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
8293
8294         * inssel.brg: optimize casts of sealed types (more
8295         optimizations waiting for fixes in remoting).
8296
8297 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8298
8299         * inssel.brg (stmt): Add another dummy rule.
8300
8301         * driver.c: Fix warnings.
8302
8303         * driver.c (mono_main): If running under valgrind, instruct glib to use
8304         the system allocation functions so valgrind can track the memory
8305         allocated by the g_... functions.
8306
8307         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
8308
8309         * mini-ops.h: Add OP_DUMMY_STORE opcode.
8310
8311         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
8312
8313         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
8314         variables in try regions.
8315
8316         * mini.c (mini_method_compile): Don't disable optimizations on large
8317         methods when AOT compiling.
8318
8319         * mini.c (mono_allocate_stack_slots): New arch independent method to 
8320         allocate stack slots. Not yet used.
8321
8322 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
8323
8324         * debug-mini.c (mono_debug_close_method): Plug some leaks.
8325
8326 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
8327
8328         * mini-ppc.c: make the branch info relative as the code
8329         buffer can be reallocated.
8330
8331 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
8332
8333         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
8334         * driver.c: Removed the AOT/security restriction. Now initialize the
8335         security manager (in metadata) if --security is used.
8336         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
8337         rather than the pointer to declarative security, when AOT is used.
8338
8339 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
8340
8341         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
8342         basic blocks, reduced intrinsic exception throwing code size.
8343
8344 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
8345
8346         * driver.c (mini_usage): Reorder the usage screen.
8347
8348 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
8349
8350         * mini.c (mono_resolve_patch_target): Fix warning.
8351
8352 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
8353
8354         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
8355         previous patch.
8356
8357         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8358
8359         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
8360         breaks the amd64 build.
8361
8362         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
8363         register allocation. Fixes #71454.
8364
8365         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8366
8367         * arrays.cs: Add new regression test.   
8368
8369 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8370
8371         * ssapre.c: Turned usage of snprintf to GString.
8372         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
8373         (I left it on by mistake in my previous commit).
8374
8375 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
8376
8377         * mini.c, cfold.c, basic-calls.cs: preserve side effects
8378         on cond branch optimization (fixes bug# 71515).
8379
8380 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8381
8382         * abcremoval.c: Fixed bug 71062.
8383         * abcremoval.h: Likewise.
8384
8385 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8386
8387         * mini.c: Added a new functionality to optimize_branches, the removal
8388         of useless basic blocks, and fixed some problem in the removal of
8389         critical edges; some utility functions added for both purposes.
8390         * ssapre.c: Added complex expression support, and fixed bug 70637.
8391         * ssapre.h: Likewise.
8392         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
8393         enabled in SSAPRE.
8394         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
8395         * driver.c: Re-enabled SSAPRE.
8396
8397 2005-01-19  Martin Baulig  <martin@ximian.com>
8398
8399         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
8400         the result of mono_get_method_constrained().
8401
8402 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
8403
8404         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
8405         manager.
8406
8407 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
8408
8409         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
8410         be detected.  Fixes #59296.
8411
8412 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8413
8414         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
8415         which can happen. Fixes #71361.
8416
8417 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8418
8419         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
8420         manager.
8421
8422 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8423
8424         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
8425         appdomain-unload.exe to fail.
8426         
8427         * mini.c: Fix some memory leaks.
8428
8429 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
8430
8431         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
8432         Fixed bug and sped up some codepaths.
8433
8434 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8435
8436         * mini.c: Fix some memory leaks.
8437
8438         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
8439         conversion.
8440
8441         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
8442
8443         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
8444         #71320.
8445
8446         * iltests.il: Add regression test for #71320.
8447
8448 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
8449
8450         * mini.c (mono_codegen): Fix installation of profiler hooks.
8451
8452         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
8453
8454 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8455
8456         * mini.h, mini.c, cfold.c: optimize access to enum
8457         readonly fields, too. Eval conditional branches if possible
8458         to perform unreachable code removal in more cases.
8459
8460 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
8461
8462         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
8463
8464         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
8465         code manager.
8466
8467         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
8468         WinXP DEP. Fixes #71244.
8469
8470 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
8471
8472         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
8473
8474 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
8475
8476         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
8477
8478 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
8479
8480         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
8481         changes.
8482
8483         * mini.h: Bump AOT version.
8484
8485         * mini.h (MonoCompile): Change exvar to a hash table.
8486
8487         * mini.c: Allocate a separate exvar for each handler block.
8488
8489         * mini.c: Get rid of the computation of filter_lengths, its not needed.
8490
8491         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
8492         ex var with the pending exception and only throw if the two are equal.
8493         Fixes #68552.
8494         
8495         * exceptions.cs: Add tests for rethrow and nested catch clauses.
8496
8497         * mini-x86.c: Fix warnings.
8498
8499         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
8500         used by all the ports now.
8501
8502         * aot.c: Add write-symbols and save-temps options.
8503
8504 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8505
8506         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
8507
8508 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
8509
8510         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
8511         operations.
8512
8513         * tramp-s390.c: Check vtable slot belongs to the domain.
8514
8515         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
8516         as per other platforms.
8517
8518         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
8519
8520 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
8521
8522         * driver.c: we don't run the Main() code in a subthread anymore.
8523
8524 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
8525
8526         * mini.c: added experimental rtc support in the statistical
8527         profiler: if the user has the permission, more accurate statistics
8528         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
8529         The MONO_RTC value must be restricted to what the linux rtc allows:
8530         power of two from 64 to 8192 Hz.
8531
8532 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8533
8534         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
8535
8536 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
8537
8538         * mini-ppc.c: better icache flush for smp.
8539
8540 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
8541
8542         * mini-amd64.c (emit_move_return_value): Fix memory leak.
8543
8544         * mini-x86.c (get_call_info): Add the get_call_info () code from the
8545         amd64 port, not yet used.
8546
8547 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8548
8549         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
8550         a struct type.
8551
8552 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
8553
8554         * driver.c: Added --security option to activate the security manager.
8555         Right now this will allow code generation for declarative demands and
8556         is disabled when AOT is specified.
8557         * mini.c: Add code generation for declarative security demands.
8558         * mini.h: Add mono_use_security_manager as an extern gboolean.
8559
8560 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8561
8562         * aot.c (mono_compile_assembly): Speed up compilation a bit by
8563         emitting more dense assembly code.
8564
8565         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
8566         exception throwing stuff.
8567
8568 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
8569
8570         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
8571         dead code.
8572
8573         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
8574         left in by mistake.
8575
8576         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
8577         fixed.
8578
8579         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
8580
8581         * tramp-*.c: Only patch vtable slots if the object is in the current
8582         domain. Fixes appdomain-unload.exe.
8583
8584         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
8585         
8586         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
8587         x86 branch.
8588
8589 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8590
8591         * mini.c (reverse_branch_op): New helper function.
8592
8593         * mini.c (optimize_branches): Run the new optimization only on 
8594         platforms which support it. Also reverse all kinds of branches.
8595
8596         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
8597
8598         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
8599         a throw statement.
8600
8601         * mini.c (optimize_branches): Reverse not-equals branches if the false
8602         bblock is a throw. This happens a lot of time with argument checking in
8603         corlib.
8604
8605         * mini.c (mono_codegen): Add support for placing basic blocks after
8606         the function epilogue.
8607
8608         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
8609         function epilogue.
8610         
8611 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
8612
8613         * mini.c (setup_stat_profiler): Only set this up if the platform
8614         supports ITIMER_PROF.
8615
8616 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8617
8618         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
8619         previous patch.
8620
8621         * inssel.brg: Fix a warning.
8622
8623 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
8624
8625         * mini.c: added support for statistical profiler 
8626         (run with: --profile=default:stat).
8627
8628 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
8629
8630         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
8631
8632         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
8633
8634         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
8635         related to global registers from the amd64 port.
8636
8637 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
8638
8639         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
8640
8641         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
8642         with global registers.
8643         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
8644
8645         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
8646
8647 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
8648
8649         * debug-mini.c (encode_value): Fix off-by-one.
8650
8651         * aot.c (encode_value): Likewise.
8652
8653         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
8654
8655 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
8656
8657         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
8658         AOT.
8659
8660         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
8661         
8662         * aot.c (emit_method_info): Increase size of temp buffer.
8663
8664         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
8665         the AOT case.
8666
8667 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
8668
8669         * aot.c (emit_method_info): Fix build.
8670         
8671         * aot.c: Further rework of the AOT file format to reduce the size of
8672         the method info data.
8673
8674         * mini.h: Bump AOT file format version.
8675
8676 2004-12-27  Martin Baulig  <martin@ximian.com>
8677
8678         * mini.c (mini_get_method): New static method; call
8679         mono_get_method_full() and mono_get_inflated_method().
8680         (mono_method_to_ir): Use mini_get_method() instead of
8681         mono_get_method_full(). 
8682
8683 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
8684
8685         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
8686
8687 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
8688
8689         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
8690
8691         * inssel-amd64.brg: Add some optimization rules.
8692
8693 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
8694
8695         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
8696         standard not GC'd stuff is fine.
8697
8698 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
8699
8700         * aot.c: Rework the AOT file format to get rid of most of the global
8701         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
8702
8703         * mini.h: Bump AOT file format version.
8704         
8705 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
8706
8707         * mini.h: Bump AOT file format version.
8708
8709         * aot.c (mono_aot_is_got_entry): New function to determine if an 
8710         address is inside a GOT.
8711
8712         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
8713
8714         * cpu-pentium.md: Increase the maximum size of some instructions which
8715         might involve a got access.
8716         
8717         * mini.c (get_method_from_ip): Another debug helper function.
8718
8719         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
8720         when got var accesses are created during the decompose phase.
8721
8722         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
8723
8724         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
8725         argument mini_compile_method and to MonoCompile, and use this to
8726         determine whenever a given method is compiled for AOT. This allows the
8727         other methods compiled during AOT compilation to be free of AOT stuff,
8728         so the backends does not need to add special support for them by
8729         creating a fake GOT etc.
8730
8731         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
8732         longer needed.
8733
8734 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
8735
8736         * mini.c (mono_method_to_ir): It turns out that some of the
8737         x-appdomain wrappers are lax with types, so just ignore this for
8738         all wrappers.
8739
8740         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
8741         at the vtable->klass. If it is non-shared code we can just use the
8742         vtable.
8743
8744 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
8745
8746         * mini-ppc.c: access MonoDomain from tls, too.
8747
8748 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
8749
8750         * declsec.c: Removed unused variable (and related warning ;-)
8751
8752 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
8753
8754         * iltests.il: New test for LDELEMA on an array of ref types.
8755
8756         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
8757         all ldelema's on reftypes.
8758         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
8759         it was the wrong place to put it.
8760
8761         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
8762         register to pop to make this cleaner, at the request of Paolo.
8763
8764 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8765
8766         * mini-ops.h (OP_GETHASHCODE): New op.
8767
8768         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
8769
8770         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
8771         operation.
8772
8773         For a microbenchmark, this reduces the cost of Hashtable.get_Item
8774         by 25%.
8775         
8776         * mini-x86.c (mono_arch_output_basic_block): Rather than
8777
8778         add ebp, 4
8779
8780         Emit
8781
8782         pop edx
8783
8784         The first is 3 bytes while the second is 1. This saves 36 kb on
8785         mscorlib, quite a big saving. When bootstraping mcs, I was able to
8786         see a small boost because of icache locality.
8787
8788         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
8789
8790 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
8791
8792         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
8793         started code sharing with the generic code.
8794
8795 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
8796
8797         * mini-ppc.c, cpu-g4.md: added code for direct access to
8798         tls data slots.
8799
8800 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
8801
8802         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
8803          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
8804         to OP_TLS_GET.
8805
8806 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
8807
8808         * declsec.c|h: Added functions to cache the declarative stack modifiers
8809         in MonoJitInfo and to create a security frame from a MonoJitInfo 
8810         structure.
8811         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
8812         created. Register internal calls for System.Security.SecurityFrame::
8813         _GetSecurityFrame and _GetSecurityStack.
8814         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
8815         the definitions for the new stack walk/callback mechanism.
8816         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
8817         first security frame for LinkDemands and InheritanceDemands) and
8818         GetSecurityStack for Demands. Both use the new mono_walk_stack code
8819         from lupus.
8820         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
8821         walk initialization (lupus).
8822
8823 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8824
8825         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
8826         idiom.
8827         (handle_loaded_temps): Do not create a temporary variable for
8828         things that we know are temps. They will never be modified.
8829         (mono_spill_call): Set MONO_INST_IS_TEMP
8830         (mono_emulate_opcode): ditto
8831         (emit_tree): ditto
8832         (mono_method_to_ir.CEE_DUP): ditto
8833
8834 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
8835
8836         * mini.c (type_to_eval_stack_type): Make this handle the void type
8837         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
8838         (emit_tree): use ip_in_bb to special case some common idioms
8839         Update all callers to pass in the IP.
8840         (mono_method_to_ir): Make CEE_CALL* do the above as well.
8841
8842         This gives us a nice 2% speedup in mcs bootstrap.
8843
8844         * mini-x86.c (peephole_pass): Peephole pass to make
8845         mov  [foo], eax
8846         push [foo]
8847
8848         into
8849
8850         mov [foo], eax
8851         push eax
8852
8853         * mini.c (ip_in_bb): new method.
8854         (mono_method_to_ir): use this method rather than doing the hash
8855         lookup ourselves.
8856
8857         * linear-scan.c (mono_linear_scan): When expiring actives, you
8858         don't need to keep around variables that expire on this
8859         instruction. This makes it so that:
8860              a = b + 1
8861         will turn into:
8862              store (ebx add (ebx, 1))
8863         which will become
8864              add ebx, 1
8865
8866 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
8867
8868         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
8869         combination to avoid doing two copies. Fix up problems with previous
8870         patch.
8871
8872         * mini.c: Fix 64 bit warnings.
8873
8874         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
8875
8876 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
8877
8878         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
8879         changes from the x86 code.
8880
8881         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
8882
8883 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
8884
8885         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
8886         throwing code to reduce its size, unify the AOT and non-aot code and 
8887         get rid of relocations in the AOT case.
8888
8889         * mini-x86.h mini.c exceptions-x86.c 
8890         (mono_arch_get_throw_corlib_exception): New arch specific function to 
8891         raise corlib exceptions which doesn't require relocations in the 
8892         caller.
8893
8894         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
8895
8896 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
8897
8898         * mini.c (mono_emit_method_call): Only allocate the got var when it is
8899         needed.
8900
8901         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
8902         in the AOT case.
8903
8904 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8905
8906         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
8907         with add function when used from Inc/dec atomic 
8908         functions. Re-enabled optimization on x86.
8909         * mini-ops.h: renamed atomic_add functions to
8910         allow _add to match the Interlocked::Add and
8911         _add_next to match Interlocked::Inc/Dec.
8912
8913 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
8914
8915         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
8916         linking of BBs to the end BB, and enabled SSAPRE also with
8917         consprop and copyprop (which was prevented by that bug).
8918
8919 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8920
8921         * mini-x86.c: disabling the Interlocked optimizing code. 
8922
8923 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
8924
8925         * aot.c (load_aot_module): Move reading of got_addr after the AOT
8926         file version check.
8927         
8928 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8929
8930         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
8931         interlocked optimization due lack of support on x86, rewrote 
8932         exchange to take into account that base may be in eax.
8933         
8934         xsp works again; activated Interlocked optimizing code.
8935         
8936 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
8937
8938         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8939
8940 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
8941
8942         * mini-ops.h: Add new opcodes.
8943
8944         * mini.h: Add new patch types. Add got_var to MonoCompile.
8945
8946         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
8947         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
8948         make it work with all kinds of patchable code.
8949
8950         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
8951         address of the GOT, and referencing entries in the GOT.
8952
8953         * mini.c: Add code to load the GOT address if needed by an opcode.
8954
8955         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
8956         independent AOT code on the x86 using an elf-style Global Offset Table.
8957
8958 2004-12-14  Raja R Harinath  <rharinath@novell.com>
8959
8960         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
8961
8962 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8963
8964         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
8965         when running xsp.
8966
8967 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
8968
8969         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
8970         of Interlocked:Increment/Decrement/Add as inline ops.
8971         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
8972
8973 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
8974
8975         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
8976         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
8977
8978 2004-12-12  Duncan Mak  <duncan@ximian.com>
8979
8980         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
8981         again. `patch_info->table_size' is no longer valid after Zoltan's
8982         commit #37636.
8983
8984 2004-12-12  Martin Baulig  <martin@ximian.com>
8985
8986         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
8987         if we are the "real" method, ie. not an inlined method inside it.
8988
8989 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
8990
8991         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
8992         before we look in the special fields table. This fixes
8993         ../tests/thread-static-init.cs.
8994
8995 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8996
8997         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
8998         for Array get_Rank and get_Length. Fixes bug #70465.
8999
9000 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
9001
9002         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
9003         separate structure to reduce the size of MonoJumpInfo.
9004
9005 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
9006
9007         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
9008
9009 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
9010
9011         * mini.c (mini_get_inst_for_method): Changed to allow ports
9012         to return a MonoInst instead of opcode 
9013         (renamed mini_get_opcode_for_method to better reflect the new functionality)
9014         
9015         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
9016         Allow ports to return a created MonoInst instead of op-code, will enable
9017         new optimizations.
9018         (renamed mini_get_opcode_for_method to better reflected the functionality)
9019
9020 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
9021
9022         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
9023
9024 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9025
9026         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
9027         Fixes #69985.
9028
9029 2004-12-08  Martin Baulig  <martin@ximian.com>
9030
9031         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
9032         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
9033
9034 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9035
9036         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
9037         correctly.
9038
9039         * exceptions.cs: Disable some tests which depend on properties of x86 fp
9040         arithmetic.
9041
9042 2004-12-08  Raja R Harinath  <rharinath@novell.com>
9043
9044         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
9045
9046 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
9047
9048         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
9049         bug introduced by the previous patch.
9050
9051 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9052
9053         * mini-ppc.c, objectc.cs: handle large structs passed by value
9054         (fixes bug #69972).
9055
9056 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
9057
9058         * mini-ppc.c: OP_ARGLIST implementation from
9059         Geoff Norton  <gnorton@customerdna.com>.
9060
9061 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
9062
9063         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
9064         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
9065
9066 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9067
9068         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
9069
9070 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9071
9072         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
9073         support.
9074
9075 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
9076
9077         * mini-sparc.c: Zero out localled-ed memory.
9078
9079         * iltests.il: Add tests for zeroing out localloc-ed memory.
9080
9081 2004-12-04  Martin Baulig  <martin@ximian.com>
9082
9083         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
9084         mono_method_get_signature_full().       
9085
9086 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
9087
9088         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
9089         and some utility functions (always for SSAPRE), integrated SSAPRE.
9090         * mini.h: Likewise.
9091         * driver.c: Added ssapre option.
9092         * ssa.c: Small fix on OP_ARG handling.
9093         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
9094         * Makefile.am: Likewise.
9095
9096 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
9097
9098         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
9099         now in the xp code.
9100
9101         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
9102         icall.
9103
9104 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9105
9106         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
9107         
9108         * cpu-s390.md : Increase instruction length of oparglist.
9109
9110         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
9111
9112 2004-11-30  Martin Baulig  <martin@ximian.com>
9113
9114         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
9115         virtual generic methods.  We call a special helper_compile_generic_method()
9116         icall to retrieve the method from the vtable, inflate and compile
9117         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
9118
9119         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
9120
9121 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
9122
9123         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
9124
9125 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
9126
9127         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
9128         Fixes #69929.
9129
9130 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
9131
9132         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
9133         platforms with PIC aot.
9134
9135 2004-11-28  Martin Baulig  <martin@ximian.com>
9136
9137         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
9138         Fixes gen-112.cs.
9139
9140 2004-11-28  Martin Baulig  <martin@ximian.com>
9141
9142         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
9143         the result of mono_type_get_underlying_type() to check whether
9144         we're byref.
9145
9146 2004-11-26  Martin Baulig  <martin@ximian.com>
9147
9148         * mini.c
9149         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
9150         in the g_assert().
9151
9152 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
9153
9154         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
9155         the same way as the other arguments so they won't get clobbered.
9156
9157         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
9158         calls through R11 since it is clobbered by the trampoline code.
9159
9160 2004-11-26  Raja R Harinath  <rharinath@novell.com>
9161
9162         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
9163         pick up in-tree mscorlib.dll.
9164
9165 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
9166
9167         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
9168
9169         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
9170         runtime data/code are now stored in a table similar to the GOT in ELF. 
9171         This allows the code itself to be position independent.
9172
9173         * aot.c: Fix loading of referenced assemblies after the lazy assembly
9174         loading changes.
9175
9176         * aot.c: Attach ELF type (object/function) directives to all global
9177         symbols.
9178
9179         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
9180
9181         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
9182
9183         * mini-amd64.h: Turn on PIC AOT code.
9184
9185         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
9186         returning the offset within an OP_AOTCONST instruction where the GOT
9187         offset needs to be added.
9188
9189         * mini.h: Bump AOT file format version.
9190
9191 2004-11-25  Martin Baulig  <martin@ximian.com>
9192
9193         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
9194         uninflated generic methods.
9195
9196 2004-11-25  Martin Baulig  <martin@ximian.com>
9197
9198         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
9199
9200 2004-11-24  Martin Baulig  <martin@ximian.com>
9201
9202         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
9203         original klass (this only applies for generic instances).
9204
9205 2004-11-24  Martin Baulig  <martin@ximian.com>
9206
9207         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
9208         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
9209         that array).
9210
9211 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
9212
9213         * mini.c (mono_method_to_ir): Disable inlining for methods containing
9214         localloc. Fixes #69678.
9215
9216         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
9217         
9218 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
9219
9220         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
9221         used SSE registers on pinvoke calls. Fixes #69774.
9222
9223 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
9224
9225         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
9226         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
9227
9228 2004-11-23  Raja R Harinath  <rharinath@novell.com>
9229
9230         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
9231         Refer directly to the mcs/ tree.
9232
9233 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9234
9235         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
9236         Check if a trampoline for a synchronized method is required. 
9237
9238 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
9239
9240         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
9241         with localloc if needed. Throe arithmetric exception in
9242         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
9243         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
9244
9245 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
9246
9247         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
9248         types before switching on type.  Fixes #69622.
9249
9250 2004-11-19  Raja R Harinath  <rharinath@novell.com>
9251
9252         * Makefile.am (check-local): New.  Integrate into 'make check'.
9253         (MCS,RUNTIME): Define using in-tree mono and mcs.
9254         (ILASM): New.
9255         (%.exe): Use $(ILASM).
9256
9257 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
9258
9259         * mini-ppc.c: adjust initial prolog size (bug #69691).
9260
9261 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
9262
9263         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
9264         #69664.
9265
9266 2004-11-17  Raja R Harinath  <rharinath@novell.com>
9267
9268         * Makefile.am (clean-local): Rename from 'clean'.
9269
9270 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9271
9272         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
9273         to mono_arch_is_int_overflow. 
9274         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
9275         SIGFPE events.
9276
9277 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
9278
9279         * declsec.c|h: New files to support declarative security attributes.
9280         Added function to check if a method has (applicable) security.
9281         * mini.c|h: Add check for declarative security attributes in
9282         mono_method_check_inlining.
9283         * Makefile.am: Added declsec.c and declsec.h to the build.
9284
9285 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
9286
9287         * mini.c, mini.h: update to keep dynamic code info per-domain.
9288
9289 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
9290
9291         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
9292         (mini_init): Get rid of it from here too.
9293
9294 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
9295
9296         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
9297         implemented OP_RETHROW (patch by Geoff Norton
9298         <gnorton@customerdna.com>).
9299
9300 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
9301
9302         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
9303         between appdomains.  Fixes appdomain-unload on PPC.
9304
9305 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
9306
9307         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9308         mini-exceptions.c: handle the new wrapper types.
9309         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
9310         token value as a MonoClass* when compiling a wrapper.
9311         mono_jit_create_remoting_trampoline now takes an additional
9312         MonoRemotingTarget parameter.
9313         
9314 2004-11-10  Martin Baulig  <martin@localhost>
9315
9316         * mini.c (mono_method_to_ir): Use `generic_container->context'
9317         rather than creating a new one.
9318
9319 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9320
9321         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
9322
9323         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
9324
9325 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
9326
9327         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
9328         the experimental aot cache stuff.
9329
9330 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
9331
9332         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9333         mini-exceptions.c: update to exception clause structure changes.
9334
9335 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9336
9337         * exceptions-x86.c (throw_exception): Fix warnings.
9338
9339         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
9340         for OP_RETHROW.
9341
9342 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9343
9344         * exceptions-sparc.c (get_throw_exception): Really fix this.
9345
9346 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
9347
9348         * tramp-*.c: we no longer support icalls without wrappers, so
9349         a bit of code can be removed here
9350
9351 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
9352
9353         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
9354         patch.
9355
9356         * cpu-sparc.md: Add op_rethrow.
9357
9358         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
9359
9360         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
9361
9362         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
9363         * mini-ops.h: Add OP_RETHROW.
9364
9365         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
9366
9367         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
9368
9369 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
9370         
9371         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
9372         Makes the output much easier to read
9373
9374 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
9375
9376         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
9377         prevents another huge leak when compiling with ssa. Secondly, the
9378         performance of doing this rather than freeing the lists is much
9379         better. GList does a lock every time you allocate a list link,
9380         so that it can use a memory pool. So, it is better to just use
9381         a memory pool of our own.
9382         
9383         * ssa.c, linear-scan.c: replace g_list_remove_link with
9384         g_list_delete.  The remove one does not free the GList, so we were
9385         leaking memory. On -O=all --compile-all with corlib, this cut down
9386         3 MB of allocations.
9387
9388 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
9389
9390         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
9391
9392         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
9393
9394         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
9395         into a new function mono_create_jit_trampoline ().
9396
9397 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
9398
9399         * trace.c (get_spec): Allow tracing of classes without a namespace.
9400
9401 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
9402
9403         * mini.c: Fix pointer overwrite in mini_method_compile.
9404
9405 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
9406
9407         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
9408         The darwin ABI needs some special handling for 1 and 2 byte structs
9409         Lets use lbz/lhz instead of lwz everywhere.
9410         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
9411         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
9412         Use stb/sth for the former, and put the latter always on stack instead of in
9413         argument registers.
9414
9415 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
9416
9417         * trace.c (is_filenamechar): Add '_'.
9418
9419 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
9420
9421         * mini-s390.c: Fix prolog length to allow for large trace requirements.
9422
9423         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
9424
9425 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
9426
9427         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
9428         depends on libmonogc. Fixes #68805.
9429
9430 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
9431
9432         * mini.c (mono_jit_free_method): Provide extra information for
9433         this error.  Currently this leaks, but will be turned into a
9434         developer option in the future.
9435
9436 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
9437
9438         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
9439
9440 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
9441
9442         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
9443         boundary. Fixes reading of PATCH_INFO_R4 and R8.
9444         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
9445
9446 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
9447
9448         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
9449         trampolines for AOT code.
9450
9451 2004-10-22    <vargaz@freemail.hu>
9452
9453         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
9454         constructed types. Fixes #68136.
9455
9456 2004-10-21  Martin Baulig  <martin@ximian.com>
9457
9458         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
9459         if it returns true, unwind the stack to the call instruction.
9460
9461 2004-10-21    <vargaz@freemail.hu>
9462
9463         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
9464
9465         * mini.h: Bump AOT version number.
9466
9467         * objects.cs: Add another test for unbox trampolines.
9468
9469         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
9470         valuetype methods.
9471
9472 2004-10-20    <vargaz@freemail.hu>
9473
9474         * driver.c: Add SHARED to the set of optimizations tested.
9475
9476         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
9477
9478         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
9479         used by CEE_NEWARR.
9480
9481         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
9482
9483 2004-10-20  Martin Baulig  <martin@ximian.com>
9484
9485         * mini-exceptions.c (mono_handle_exception): Call
9486         mono_debugger_handle_exception() to tell the debugger about
9487         catch/finally clauses.
9488
9489 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
9490
9491         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
9492
9493         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
9494         #68447.
9495
9496 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
9497
9498         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
9499         methods as their native size, fixed bug #57543, #57545.
9500         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
9501         This saves a temporary register and mullw call down into 1 (minor perf
9502         increase for cases like sum = sum * 5;  This use to translate into:
9503             li r11,5
9504             mullw r28,r28,r11
9505         It now translates to
9506             mulli r28,r28,5
9507
9508 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
9509
9510         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
9511         #68388.
9512
9513 2004-10-11  Martin Baulig  <martin@ximian.com>
9514
9515         * mini.c (mono_method_to_ir): If we're a generic method, get the
9516         MonoGenericContainer from our MonoMethodNormal and create a
9517         MonoGenericContext from it.
9518
9519 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
9520
9521         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
9522
9523         * basic-long.cs: Add test for checked i8->i2 cast.
9524
9525 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9526
9527         * inssel-ppc.brg: added a couple of speedup rules.
9528
9529 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
9530
9531         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
9532         to speed up rebuilds.
9533
9534 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9535
9536         * mini-s390.c: Minor fix to OP_OR_IMM.
9537
9538 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
9539
9540         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
9541         better. Fixes appdomain-unload.exe on sparc.
9542
9543 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
9544
9545         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
9546         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
9547         see bug 67324.
9548
9549 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
9550
9551         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
9552
9553 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
9554
9555         * mini.c: Always generate a field read/write wrapper for members
9556         of the class MarshalByRefObject since the actual instance could
9557         be a CBO.
9558
9559 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
9560
9561         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
9562
9563 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
9564
9565         * driver.c mini.h trace.c: Move the setting of the main assembly into
9566         a separate function called mono_trace_set_assembly () and call it after
9567         actually loading the main assembly. Fixes #66872.
9568
9569 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
9570
9571         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
9572         using the code manager.
9573
9574 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
9575
9576         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
9577
9578 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
9579
9580         * cpu-amd64.md: Fix bug in previous patch.
9581         
9582         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
9583         #66650.
9584
9585 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
9586
9587         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9588         mini-exceptions.c: updates for changed stack walk interface.
9589
9590 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9591
9592         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
9593
9594 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
9595
9596         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
9597
9598 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
9599
9600         * driver.c (mini_regression_list): Do not call mono_assembly_close 
9601         since assemblies can't be unloaded.
9602         
9603 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9604
9605         * cpu-amd64.md: Fix more instruction lengths.
9606
9607         * cpu-amd64.md: Fix lengths of some instructions.
9608
9609 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
9610
9611         * inssel.brg: Make the array ldelema check aot friendly.
9612
9613 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9614
9615         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
9616
9617         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
9618
9619 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
9620
9621         * mini-x86.c: Fix build.
9622
9623         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
9624         mono_type_get_underlying_type () helper function to simplify code.
9625         
9626 2004-09-09  Martin Baulig  <martin@ximian.com>
9627
9628         * mini-amd64.c: Don't access `type->data.klass' directly, call
9629         mono_class_from_mono_type() instead since the type may be a
9630         generic instance.
9631
9632 2004-09-09  Martin Baulig  <martin@ximian.com>
9633
9634         * mini-amd64.c (get_call_info): Fix support for generic instances.
9635         (add_valuetype): Use mono_class_from_mono_type() to get the class
9636         since we can be a generic instance.
9637
9638 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
9639
9640         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
9641
9642 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
9643
9644         * liveness.c: reset spill costs on each scan: bug 62107
9645
9646 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
9647
9648         * exceptions-sparc.c (mono_arch_find_jit_info): remove
9649         unnecessary line that doesn't compile
9650
9651 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
9652
9653         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
9654         trampolines, make them call an error function so people can fix their
9655         code.
9656
9657 2004-09-06  Martin Baulig  <martin@ximian.com>
9658
9659         * mini.c (mono_method_to_ir): When initializing locals, handle a
9660         generic instances like a valuetype if it's a valuetype and like a
9661         class if it's a class.
9662
9663 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9664
9665         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
9666         stack. Fixes #64674.
9667
9668         * exceptions.cs: Add test for unwinding of call arguments.
9669
9670 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
9671
9672         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
9673         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
9674         set the carry/borrow flag). The sparc and s390 implementations
9675         can now use optimized versions (and simplify the code). ppc bugfixes.
9676
9677 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9678
9679         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
9680
9681 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
9682
9683         * inssel-amd64.brg: Remove leftover 32 bit rule.
9684
9685         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
9686
9687 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
9688
9689         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
9690         mono_arch_find_jit_info functions into a new function. Fix a memory
9691         leak.
9692
9693         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
9694         refactored code.
9695         
9696 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9697
9698         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
9699         as well.
9700         
9701         * exceptions.cs: Add array size tests.
9702
9703         * mini.c: Allocate a separate icall wrapper for each arity of 
9704         mono_array_new_va. Fixes #59509.
9705
9706         * exceptions.cs: Add testcase for 64578.
9707
9708         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
9709
9710         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
9711         
9712 2004-09-02  Martin Baulig  <martin@ximian.com>
9713
9714         * mini.c (mono_method_to_ir): When initializing the locals, call
9715         handle_initobj() on the generic instance itself, not its
9716         underlying type.
9717
9718 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9719
9720         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
9721         MonoJitInfo for dynamic methods.
9722
9723         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
9724
9725         * mini.c: Add support for freeing JIT data for dynamic methods.
9726         
9727 2004-09-01  Martin Baulig  <martin@ximian.com>
9728
9729         * mini-x86.c (is_regsize_var): Added support for generic
9730         instances.
9731         (mono_arch_emit_prolog): Make this compile again, use
9732         `x86_push_imm_template (code)'.
9733
9734 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
9735
9736         * mini-x86.c: make all push_imm instructions that get
9737         patched always emit the long form
9738
9739 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
9740
9741         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
9742         in a per-domain hash.
9743
9744         * mini-amd64.c (merge_argument_class_from_type): Handle generic
9745         types.
9746
9747 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
9748
9749         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
9750         work.
9751         
9752         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
9753         work.
9754
9755         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
9756         Beginnings of SSE2 support.
9757
9758         * exceptions.cs: Add more tests for checked int<->uint casts.
9759
9760 2004-08-28  Martin Baulig  <martin@ximian.com>
9761
9762         * mini-x86.c (mono_arch_instrument_epilog): Added support for
9763         generic instances.
9764
9765         * mini.c
9766         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
9767         Handle generic instances recursively.
9768
9769 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9770
9771         * iltests.il: test for conv.u8 on a constant
9772
9773 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9774
9775         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
9776         LCONV_x4 (shrun_32 (membase)).
9777
9778 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9779
9780         * inssel-x86.brg: c&p rules for push/setret of long
9781
9782 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
9783
9784         * inssel-x86.brg: c&p rules for compare (base, regvar) and
9785         compare (regvar, base)
9786
9787         * inssel-x86.brg: more burg love
9788
9789         * inssel.brg: more cleanup
9790
9791         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
9792
9793 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
9794
9795         * basic-long.cs, basic-calls.cs: new tests for optimization.
9796
9797 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
9798
9799         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
9800         patch.
9801
9802 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
9803
9804         * mini-amd64.c (read_tls_offset_from_method): Add another case.
9805         
9806 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
9807
9808         * inssel.brg (mini_emit_memcpy): use 
9809         NO_UNALIGNED_ACCESS to disable memcpy optimization
9810
9811 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
9812
9813         * mini-amd64.c: Handle generic types in various places.
9814
9815         * mini.c (mono_method_to_ir): Handle generic types in init locals.
9816
9817 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
9818
9819         * mini.c (handle_box): Fix warning.
9820
9821         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
9822
9823         * mini-amd64.h: Enable the emit_state optimization.
9824
9825         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
9826
9827         * mini-amd64.c: Add some new 64 bit peephole opts.
9828
9829         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
9830
9831         * cpu-amd64.md: sreg1 of div instructions must be %rax.
9832
9833         * mini-amd64.c: Register allocator fixes.
9834
9835         * mini.c: Add an optimization to emit_state to avoid allocation of new
9836         registers on some platforms.
9837
9838 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
9839
9840         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
9841
9842         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
9843         allocation. Fixes #63085.
9844
9845         * basic-long.cs: Add new regression test.
9846
9847         * mini-amd64.c: Register allocator improvements.
9848
9849 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
9850
9851         * mini-amd64.c (read_tls_offset_from_method): Add another code
9852         sequence.
9853
9854         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
9855         instruction sequence for nullifying class init trampolines.
9856
9857         * objects.cs: Add new regalloc test.
9858
9859         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
9860
9861 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
9862
9863         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
9864         
9865         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
9866         arguments.
9867
9868         * driver.c: Fix profiling after TLS changes.
9869         
9870         * driver.c (mono_main): Set mono_stats.enabled if needed.
9871
9872         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
9873         CEE_BOX.
9874
9875 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
9876
9877         * mini-x86.c: use a 1 op rather than a 2 op tls access
9878         instruction -> faster.
9879
9880 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
9881
9882         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
9883         x86 backend.
9884
9885 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
9886
9887         * exceptions-sparc.c (throw_exception): fix typo
9888
9889 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
9890
9891         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
9892         set tree->dreg correctly with tls. Allow any
9893         register to be used.
9894
9895         * mini-x86.c (read_tls_offset_from_method): add new code
9896         generation pattern seen with GCC.
9897
9898
9899 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
9900
9901         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
9902         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9903         exceptions-sparc.c: fix some performance issues in exception
9904         handling and setting of the stack trace for exceptions that were
9905         already thrown.
9906
9907 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
9908
9909         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
9910         x86 backend.
9911         
9912         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
9913         registers.
9914
9915 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
9916
9917         This patch inlines tls access, when possible.
9918         
9919         * mini.h: new arch functions for TLS intrinsics.
9920         All platforms updated with a stub.
9921
9922         * mini.c: use the new intrinsics
9923
9924         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
9925         arch specific intrinsic for tls variables
9926
9927 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
9928
9929         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
9930         under windows.
9931
9932 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
9933
9934         * mini.c: thread local allocation
9935
9936 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
9937
9938         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
9939
9940         * Makefile.am: Link against the static version of libmonogc.
9941         
9942         * Makefile.am: Link the static versions of the convenience libraries
9943         into the mono executable.
9944
9945         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
9946
9947 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
9948
9949         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
9950         on integer overflow.
9951
9952         * mini-amd64.c: Reorganize function call code.
9953
9954         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
9955
9956 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
9957
9958         * inssel-x86.brg: use xor eax,eax.
9959         
9960         * basic.cs: new tests
9961
9962 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
9963
9964         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
9965         in exception throwing code.
9966         
9967 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
9968
9969         * inssel-x86.brg: use xor esi,esi.
9970
9971 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
9972
9973         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
9974         can trace methods compiled during mini_init () too.
9975
9976         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
9977         CEE_CONV_U4.
9978
9979 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
9980
9981         * Makefile.am: static link on x86 (r=zoltan)
9982
9983 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
9984
9985         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
9986         code since it causes some programs to fail.
9987
9988 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
9989
9990         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
9991
9992 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
9993
9994         * mini.c: ovfops_op_map - add STACK_OBJ case for
9995         CONV_I 
9996         * basic.cs: add test_0_pin_string as test
9997         case for above.
9998
9999 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10000
10001         * Makefile.am: build C# if srcdir != builddir
10002
10003 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10004
10005         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
10006         fall-through blocks.
10007
10008 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10009
10010         * driver.c: enable loop by default again and include abcrem in -O=all.
10011
10012 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
10013
10014         * iltests.il: Add some localloc tests.
10015
10016         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
10017
10018         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
10019         Fixes #62574.
10020
10021         * inssel-amd64.brg: Add some optimizations.
10022
10023         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
10024         for gcc-3.4.
10025
10026         * Makefile.am: Statically link mono against libmono on AMD64.
10027         
10028         * mini-amd64.c inssel-amd64.brg: Optimizations.
10029
10030 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
10031
10032         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
10033
10034         * tramp-amd64.c: Patch calling code in trampolines.
10035
10036 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
10037
10038         * mini-amd64.c: pinvoke struct passing fixes.
10039
10040 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
10041
10042         * mini-sparc.c: redo change, make mono_arch_cpu_init call
10043         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
10044
10045 2004-08-05  Duncan Mak  <duncan@ximian.com>
10046
10047         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
10048         CEE_LDELEM_ANY.
10049
10050 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10051
10052         * mini-amd64.c (emit_move_return_value): Move return value for normal
10053         calls too.
10054
10055 2004-08-05  Martin Baulig  <martin@ximian.com>
10056
10057         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
10058         `type->type'; just modify `type' itself when dealing with enums
10059         and generic instances.
10060         (check_call_signature): Make `simple_type' a `MonoType *'.
10061
10062 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10063
10064         * mini.c: Use OP_PADD to add offsets to addresses.
10065
10066         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
10067
10068 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
10069
10070         * mini-sparc.c (mono_arch_emit_epilog): fix check
10071         for folding last op into restore instruction
10072
10073 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10074
10075         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
10076         helper methods using the code manager.
10077         
10078         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
10079
10080         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
10081
10082 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10083         
10084         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
10085           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
10086
10087         * mini-s390.c: fix tail processing
10088
10089 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
10090
10091         * mini-ppc.c: mul.ovf.un exception name fix.
10092
10093 2004-08-03  Martin Baulig  <martin@ximian.com>
10094
10095         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
10096         instances; before jumping to `handle_enum', also modify `ptype'.
10097
10098 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
10099
10100         * cpu-sparc.md: fcall maximal length too small.
10101
10102 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
10103
10104         * mini-amd64.c mini.h: Add initial support for passing/returning 
10105         structures to/from pinvoked methods.
10106
10107 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
10108
10109         * mini-ppc.c: reg allocator fix.
10110
10111 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
10112
10113         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
10114
10115         * inssel.brg: Optimize memset on 64 bit machines.
10116
10117         * mini-amd64.c: Fix some vararg cases.
10118
10119 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10120
10121         * mini-s390.c: Corrected macro in emit_float_to_int
10122
10123         * s390-abi.cs: Tests to exercise the s390 ABI
10124
10125 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10126
10127         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
10128         caller saved regs.
10129
10130         * basic.cs: Add a test for add.ovf.un.
10131
10132 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
10133
10134         * mini-sparc.c: add case for OP_IDIV_UN
10135
10136 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10137
10138         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
10139         
10140         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
10141
10142 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
10143
10144         * basic.cs: regression tests.
10145
10146         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
10147         regressions.
10148
10149 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10150
10151         * basic.cs: Add a new test.
10152
10153         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
10154         and AOT. Various fixes and optimizations.
10155
10156         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
10157
10158 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10159
10160         * mini-ppc.c: make sure temp regs are not used for global reg
10161         allocation.
10162
10163 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
10164
10165         * cpu-sparc.md: conv_i8 fix for 64bits
10166
10167         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
10168
10169 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
10170         
10171         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
10172         add opcode for cmp BYTE PTR [eax], imm.
10173
10174         * inssel.brg: Make memcpy and memset takes bases.
10175
10176 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10177
10178         * *-amd64.*: More AMD64 work.
10179         
10180 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10181
10182         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
10183         add a compare-not-equal opcode.
10184         
10185 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
10186
10187         * mini.c: Use mono_init_from_assembly instead of mono_init.
10188         
10189 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10190
10191         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
10192
10193         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
10194
10195         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
10196
10197         * inssel.brg: 64 bit fixes.
10198
10199         * mini.h (MonoCallInst): Add some AMD64 specific data.
10200
10201         * mini.h: Add some OP_P opcodes.
10202
10203 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10204
10205         * basic.cs: tests for 61797 and 61740
10206
10207 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10208
10209         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
10210         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
10211
10212 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
10213
10214         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
10215
10216         * *-amd64*.*: Ongoing AMD64 work.
10217
10218 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
10219
10220         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
10221
10222         * *-amd64*: Ongoing AMD64 work.
10223
10224         * mini-arch.h: Add AMD64 support.
10225
10226         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
10227
10228         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
10229
10230         * mini-ops.h: Add new opcodes.
10231
10232         * Makefile.am: Add AMD64 support.
10233
10234         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
10235         rules into the inssel-long*.brg files.
10236
10237         * *-amd64.*: Add beginnings of AMD64 backend.
10238
10239 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
10240
10241         * mini.c (print_dfn): commenting out the code that prints
10242         the cil. With -O=deadce, this makes -v -v crash.
10243         
10244         * cpu-pentium.md: make checkthis have a length of 2
10245
10246 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
10247
10248         * mini-sparc.h: fix implementations of __builtin
10249         functions for Sun compiler for V9.
10250
10251 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
10252
10253         * mini.c: use the new stelem.ref wrapper
10254         * exceptions.cs, arrays.cs: new stelem.ref tests
10255
10256 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10257
10258         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
10259         new XSP should work with these changes).
10260
10261 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
10262         
10263         * inssel-{long32,x86,}.brg: trivial optimizations.
10264         
10265 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
10266
10267         * mini.c: load value when emitting box operation in
10268         constrained calls.
10269
10270 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
10271
10272         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
10273         is one byte shorter than cmp DWORD PTR [eax], 0.
10274
10275 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10276
10277         * inssel-ppc.brg: arguments on the stack are always
10278         relative to the stack pointer (spotted by Neale Ferguson).
10279
10280 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10281
10282         * exceptions-x86.c: delay appending the method name to the trace until
10283         after mono_jit_info_table_find is called, as this gets the real
10284         MonoMethod.
10285
10286 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
10287
10288         * aot.c: register roots
10289
10290 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10291
10292         * aot.c : I could just use PLATFORM_WIN32 flag.
10293
10294 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10295
10296         * aot.c : Reverting the previous fix. This time it broke linux build.
10297
10298 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10299
10300         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
10301
10302 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
10303
10304         * mini.c (handle_stack_args): Remove some more debugging code.
10305         
10306         * mini.c (handle_stack_args): Remove debug output left in by mistake.
10307
10308         * driver.c mini.h aot.c: Allow additional options to be specified with
10309         --aot and pass them to mono_compile_assembly.
10310
10311         * aot.c: Add experimental code to AOT compile all loaded assemblies
10312         on demand and save the code into a cache in the filesystem.
10313
10314         * aot.c: Add support for more wrapper methods.
10315         
10316         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
10317         58863.
10318
10319         * cpu-*.md: Remove removed opcodes.
10320
10321         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
10322         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
10323         related icalls to marshal.c.
10324
10325 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
10326
10327         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
10328
10329         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
10330
10331         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
10332
10333 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
10334         * liveness.c: If liveness is recomputated we need to reset the information
10335         for each variable. This way, if the liveness range has been narrowed
10336         by optimizations that happened after the last computation, we can return
10337         a smaller range.
10338         
10339         For example, if you have
10340         
10341         {
10342                 int i = 0;
10343                 
10344                 // Tons of code that does not affect i
10345                 
10346                 i = foo ();
10347                 ...
10348         }
10349         
10350         i = 0 is dead code and will be removed by SSA. However, when
10351         linear scan gets to the code, i will still appear to be live
10352         throughout the entire block. This prevents good register allocation.
10353
10354 2004-07-06  Martin Baulig  <martin@ximian.com>
10355
10356         * debug-mini.c (mono_debug_init_method): Allow
10357         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
10358         (mono_debug_add_icall_wrapper): New method.
10359
10360         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
10361
10362 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
10363
10364         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
10365         optimization.
10366
10367 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
10368
10369         * aot.c (mono_aot_load_method): Fix loading of debug info.
10370
10371 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10372
10373         * aot.c: Add logging support.
10374
10375 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10376
10377         * mini.h: Add prototype for mono_print_method_from_ip.
10378
10379         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
10380
10381         * inssel.brg: 64 bit fixes.
10382
10383         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
10384         inssel-long32.brg.
10385
10386         * Makefile.am: Add SPARC64 support.
10387
10388 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10389
10390         * aot.c: Fix alignment problems on 32 bit platforms.
10391
10392 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10393
10394         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
10395         SPARC64.
10396
10397         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
10398         problems.
10399
10400         * mini.h: Bump AOT file version. Some 64 bit fixes.
10401
10402 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10403
10404         * inssel-sparc.brg: Add new rule to avoid register moves.
10405
10406         * inssel.brg: Add ldind_to_load_membase helper function.
10407
10408 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
10409
10410         * mini.c: OffsetToStringData intrinsic.
10411         
10412 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10413
10414         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
10415
10416         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
10417         regression tests.
10418
10419         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
10420 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
10421
10422         * mini.c: reinstated mono_compile_get_interface_var()
10423         on x86, too, since the change breaks the Gtk# build there as well.
10424
10425 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10426
10427         * driver.c: remove loop from the default optimizations: it seems to
10428         interact badly with some of the other options (see bug #60613).
10429
10430 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
10431
10432         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
10433         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
10434
10435 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
10436
10437         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
10438         vararg-using methods.
10439
10440 2004-06-21  Martin Baulig  <martin@ximian.com>
10441
10442         * mini/mini-exceptions.c
10443         (mono_handle_exception): Added `gpointer original_ip' argument.
10444         After calling mono_unhandled_exception(), call
10445         mono_debugger_unhandled_exception() and if that returns true,
10446         restore the context and return.
10447
10448 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10449
10450         * mini-ppc.c: prefer the use of relative branches so
10451         they won't need to be patched in aot code (patch from Patrick Beard).
10452
10453 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10454
10455         * aot.c: patch from Patrick Beard to make the output assembly
10456         more correct for the MacOSX assembler. Small tweak to
10457         generate sane images on Linux/PPC, too.
10458
10459 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10460
10461         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
10462         case until bug #59509 is fixed (shows up in #60332).
10463
10464 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10465
10466         * mini.c: make sure the needed wrappers are compiled, too, with
10467         precomp.
10468
10469 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
10470
10471         * driver.c: remove NPTL reference in --version output.
10472
10473 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10474
10475         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
10476         generate valid assembly for the Mach-O assembler.
10477
10478 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10479
10480         * driver.c: don't include abcrem in the all optimization specifier
10481         since it slows down jit compilation too much for now.
10482
10483 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
10484
10485         * mini.c: use BIGMUL only if both operands have the same signage.
10486         * iltests.il: Test for bug 60056. (errors related to signage in
10487         BIGMUL).
10488
10489         r=lupus.
10490
10491 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
10492
10493         * mini.c, aot.c: memory leak fixes.
10494
10495 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10496
10497         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
10498
10499 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
10500
10501         * Makefile.am: remove the -static hack completely, it links in
10502         statically glib as well.
10503
10504 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
10505
10506         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
10507         * exceptions.cs: make it compile with new mcs/csc.
10508
10509 2004-06-03 Massimiliano Mantione <massi@ximian.com>
10510         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
10511         and added relevant test case.
10512
10513 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10514
10515         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
10516         regressions in gtk-sharp.
10517
10518 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
10519
10520         * exceptions.cs: New regression tests.
10521
10522         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
10523
10524 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
10525
10526         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
10527
10528 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
10529
10530         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
10531
10532         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
10533
10534 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
10535
10536         * mini.c (mono_jit_runtime_invoke): Init class in this
10537         method instead of trusting mono_jit_compile_method to
10538         do the work (because wrappers can be in object class)
10539
10540 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
10541
10542         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
10543
10544         * basic-long.cs: New regression test.
10545
10546 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
10547
10548         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
10549         and div/rem checks.
10550
10551 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
10552
10553         * Makefile.am: fix miguel's change to build mono statically against
10554         libmono (track build dependencies).
10555
10556 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10557
10558         * cfold.c: Some glib versions do not have G_MININT32.
10559
10560 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
10561
10562         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
10563         with precision of tan, atan, sin and cos, and implemented related
10564         regressions tests (fixes bug 54467, but one new problem appeared and
10565         is not fixed yet).
10566
10567 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10568
10569         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
10570
10571         * exceptions.cs: Add test for constant folding && division by zero.
10572
10573         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
10574         since driver.c is in libmono too, so the optimization was useless.
10575
10576         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
10577         variable to driver.c so the compiler can emit more efficient code to
10578         access them.
10579
10580 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10581
10582         * Makefile.am: don't distribute generated inssel.[ch] files.
10583
10584 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
10585
10586         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
10587         into the default appdomain. Fixes #58707.
10588
10589         * jit-icalls.c: Remove the broken approximation for truncl, doing
10590         no conversion is better.
10591
10592         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
10593         Fixes #58863.
10594
10595 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
10596
10597         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
10598         of the mcrxr instruction which is not available on some processors
10599         even if it's documented to be. Implement add and sub overflow correctly
10600         (still not complete for long unsigned). Speed up icalls a bit.
10601
10602 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
10603
10604         * mini.c (mono_jit_compile_method_with_opt): Make sure that
10605         we run .cctor in the current domain instead of target_domain.
10606         
10607         Fixes bug #58558, .cctor not being called in -O=shared.
10608
10609 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10610
10611         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
10612
10613 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
10614
10615         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
10616         which can be done with an imm8, do it that way.
10617         (mono_arch_output_basic_block): ditto for a jmp
10618         (mono_arch_emit_prolog): Computate maximum offset of a label.
10619
10620 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
10621
10622         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
10623         now tries to allocate prefered physical reg's for virtual
10624         regs. This reduces the number of emited spills/loads with
10625         20-30% on our core assemblies.
10626
10627 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10628
10629         * jit-icalls.c: truncl() is not needed and trunc() is
10630         the correct thing to do anyway (bug #58287).
10631
10632 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
10633
10634         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
10635         if available.
10636
10637 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10638
10639         * driver.c: enable loop optimizations by default.
10640
10641 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10642
10643         * mini-x86.c: fix calc of max loop size when aligning loops start.
10644
10645 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
10646
10647         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
10648         the stack.
10649
10650 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
10651
10652         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
10653         should set carry.
10654
10655         * basic-long.cs: Add tests for add/subtract of immediates with carry.
10656
10657         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
10658         
10659         * mini.c (inline_method): Allways inline some wrappers even if the cost
10660         is too large. Fixes #58785.
10661
10662         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
10663         
10664 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
10665
10666         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
10667         (crichton@gimp.org). Beginning of support for sparc/linux.
10668
10669         * mini-sparc.c: Optimize retrieval of LMF address.
10670
10671 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
10672
10673         * exceptions-ppc.c:  handle alloca in methods with clauses.
10674
10675 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
10676
10677         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
10678
10679 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
10680
10681         * mini.c: Delegate most of the abort signal work to 
10682           mono_thread_request_interruption, which also handles Stop and Suspend
10683           states.
10684
10685 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
10686
10687         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
10688         supports the save/restore lmf opcodes.
10689
10690 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
10691
10692         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
10693         by gcc-3.4 as well.
10694
10695         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
10696
10697 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10698
10699         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
10700         methods which contain array accesses.
10701
10702         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
10703         boundaries. Fixes #58537.
10704
10705         * iltests.il: Add regression test for #58537.
10706
10707 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10708
10709         * mini-x86.c (mono_arch_local_regalloc): Last part of
10710         fix for bug #58633 (releasing register to early).
10711
10712 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
10713
10714         * basic-long.cs: Add new regression test.
10715
10716 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10717
10718         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
10719         register too early on the chain.
10720
10721 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10722
10723         * mini.c (create_helper_signature): Use a helper function to reduce
10724         the code which needs to be written. Also set the calling convention of
10725         icalls on windows. Fixes #57840.
10726
10727 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10728
10729         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
10730         exceptions-ppc.c: added helper function to get the instruction address
10731         from a signal handler context.
10732
10733 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10734
10735         * helpers.c: use g_get_tmp_dir. Invokes happyness 
10736         from gonzalo.
10737
10738 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10739
10740         * helpers.c: Add new env variable to pass args to objdump.
10741         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
10742
10743 2004-05-17  Radek Doulik  <rodo@ximian.com>
10744
10745         * Makefile.am (common_sources): added abcremoval.h so it get
10746         disted and daily mono packages on go-mono.com will build again
10747
10748 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
10749
10750         * abcremoval.c: Fixed coding style, added copyright header.
10751
10752         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
10753
10754         * mini.h: Added prototype for abc removal main function.
10755
10756         * build_relations_propagation_table.pl: Added copyright header.
10757
10758 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
10759
10760         * basic-long.cs: reg test for complex ceq_long bug.
10761
10762 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
10763
10764         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
10765         reg in long and clob case (bug #58343). Fixed/added comments.
10766
10767 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
10768
10769         * mini.c (mono_jit_runtime_invoke): Follow new convention
10770         of calling the invoke method with an function pointer.
10771
10772 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
10773
10774         * ChangeLog: Fix author of memory leak patch.
10775
10776 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
10777
10778         * Makefile.am: fix make dist as well...
10779
10780
10781 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
10782
10783         * cfold.c: Made so that conversions from pointer to int4 are no-ops
10784         on archs where pointers are 4 bytes long.
10785
10786         * Makefile.am: Added abcremoval.c source file.
10787
10788         * abcremoval.c: Added abcremoval.c.
10789
10790         * abcremoval.h: Added abcremoval.h.
10791
10792         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
10793
10794         * inssel.brg: Enabled bounds check removal.
10795
10796         * mini.c: Added support for abcrem optimization.
10797
10798         * mini.h: Added abcrem optimization label.
10799
10800         * driver.c: Added support for abcrem optimization.
10801
10802         * propagated_relations_table.def: Added propagated_relations_table.def.
10803
10804 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
10805
10806         * mini.c, cfold.c: fix style.
10807
10808 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10809
10810         * mini.c: handle issue with the low-level implementation of
10811         some long opcodes (bug #54209).
10812
10813 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
10814
10815         * basic.cs: test for my new cmov stuff.
10816
10817 2004-05-13      Patrik Torstensson
10818
10819         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
10820         opt and added peephole documentation.
10821
10822 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
10823
10824         * tramp-ppc.c: rewrote the generic trampoline code.
10825
10826 2004-05-11      Patrik Torstensson
10827
10828         * mini-x86.c: optimize long shl/shr asm code (one less branch)
10829
10830 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
10831
10832         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
10833
10834         * mini.h mini.c dominators.c: Applied patch from Derek Woo
10835         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
10836
10837         * mini.c: Add new icalls for AsAny marshalling.
10838
10839 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10840
10841         * tramp-ppc.c, mini-ppc.c: more cleanups.
10842
10843 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10844
10845         * mini.c: no warnings.
10846
10847 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10848
10849         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
10850
10851 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
10852
10853         * mini.c: In the thread abort signal handler, if the thread is in the
10854         process of being stoped, don't throw the Abort exception, just stop the
10855         thread.
10856
10857 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
10858
10859         * tramp-ppc.c: removed old code.
10860
10861 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10862
10863         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
10864         do some simple speed optimizations on ppc.
10865
10866 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10867
10868         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
10869         and large offsets in load/store.
10870
10871 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
10872
10873         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
10874         it causes regressions.
10875
10876 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
10877
10878         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
10879         support.
10880
10881 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10882
10883         * jit-icalls.c: remove warnings.
10884         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
10885         speedups for unsafe code.
10886
10887 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
10888
10889         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
10890
10891 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
10892
10893         * basic-calls.cs: Add new regression test.
10894
10895         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
10896         more portable.
10897
10898         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
10899
10900         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
10901         is no longer used.
10902
10903 2004-05-06      Patrik Torstensson
10904
10905         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
10906         long reg allocation in any reg (not only eax:edx) and implemented 
10907         long shl/shr ops in asm instead of helpers.
10908
10909 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
10910
10911         * mini-sparc.h: Fix warnings.
10912
10913         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
10914         stack.
10915
10916         * mini-exceptions.c (mono_handle_exception): Call the filter in a
10917         separate statement for clarity.
10918
10919         * mini-sparc.c: Update status.
10920
10921 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
10922
10923         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
10924         here.
10925
10926 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10927
10928         * inssel-ppc.brg: another small pre-release workaround:
10929         we don't do overflow detection for long_sub_un.
10930
10931 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10932
10933         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
10934         (also works around a weird ppc bug: 57957).
10935
10936 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
10937
10938         * tramp-ppc.c: trampoline fixes.
10939
10940 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
10941
10942         * mini-ppc.c: fixed typos.
10943
10944 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10945
10946         * mini-ppc.c, exceptions-ppc.c: more code saves registers
10947         at the top of the stack. Fixed typos. Use a frame registers
10948         for all the methods with exception clauses.
10949
10950 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
10951
10952         * exceptions-ppc.c: restore fp registers.
10953
10954 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
10955
10956         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
10957         order from the stack top (moved the stack room to save the
10958         return value for trace after the param area). Fixed corruption
10959         in restoring registers on unwind.
10960
10961 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10962
10963         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
10964
10965 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10966
10967         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
10968         and prolog/epilog for methods that use it. Allow
10969         enough param area room for varargs methods. Fix miguel's
10970         breakage in exception handling.
10971
10972 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10973
10974         * Makefile.am: run genmdesc only on current arch.
10975
10976 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10977
10978         * exceptions-x86.c:
10979         * mini-x86.h: fix the build on windows.
10980
10981 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
10982
10983         * 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.
10984
10985         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
10986
10987         * mini-exceptions.c: New file.
10988         
10989         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
10990         Move some parts of the x86 exception handling code to an 
10991         arch-independent file so it can be shared with other ports.
10992
10993 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
10994
10995         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
10996
10997 2004-04-26  David Waite  <mass@akuma.org>
10998
10999         * driver.c: remove comma from end of enumeration declaration
11000
11001 2004-04-26  Jackson Harper  <jackson@ximian.com>
11002
11003         * driver.c: parse config file before loading first assembly. This
11004         allows the user gac to be enabled/disabled. 
11005         
11006 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
11007
11008         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
11009         simpler mechanism: we do not care what is encoded initially
11010         (branch absolute or relative), we care about the code and its
11011         target.  I kept the old code for reference for now.
11012
11013         The new code tries first to determine if the jump is anywhere in
11014         the -/+32 absolute meg range, if it succeeds, it encodes using the
11015         absolute branch;  If not, it tried to find something in the
11016         relative range, if not, it uses the handle_thunk code. 
11017
11018 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
11019
11020         * exceptions-ppc.c: use the correct ip register on macosx.
11021
11022 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
11023
11024         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
11025
11026 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
11027
11028         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
11029         Raise exception on integer divide by zero by hand since the hw
11030         doesn't support it. Handle NaNs in FP compares.
11031
11032 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
11033
11034         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
11035         code reducing duplication between the platforms and enabled
11036         signal exception handling (on linux for now).
11037
11038 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
11039
11040         * exceptions-ppc.c: more macosx support.
11041
11042 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11043
11044         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
11045
11046 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
11047
11048         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
11049
11050 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11051
11052         * iltests.il: more tests.
11053
11054 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11055
11056         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
11057         vars as well.
11058
11059 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11060
11061         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
11062
11063 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11064
11065         * liveness.c: Mark variables as volatile in all basic blocks reachable
11066         from exception clauses.
11067
11068 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
11069
11070         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
11071         inlining.
11072
11073 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11074
11075         * iltests.il, basic.cs: more tests for regalloc.
11076
11077 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11078
11079         * iltests.il: Some tests for register allocation modifications
11080         I have locally.
11081
11082 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
11083
11084         * exceptions.cs: Add regression test for bug #56782.
11085
11086         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
11087         original stack trace if an exception is rethrown. Fixes #56782. Oh,
11088         the beauty of fixing the same thing in 5 different files...
11089
11090 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
11091
11092         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
11093         methods.
11094
11095 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
11096
11097         * mini.c: Add support for STRWLPARRAY marshalling convention.
11098
11099 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11100
11101         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
11102         to init the context to setup the regs pointer).
11103
11104 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11105
11106         * exceptions-ppc.c: more exceptions work.
11107
11108 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11109
11110         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
11111         not allowed.
11112
11113 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11114
11115         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
11116         can use the memory directly.
11117
11118         * cpu-pentium.md: Update documentation from a post from Zoltan. 
11119
11120         add x86_add_membase, x86_sub_membase, x86_mul_membase
11121
11122 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11123
11124         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
11125         GENERAL_REGS they were also hardcoded for all PPC ports.
11126
11127         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
11128
11129         Remove hard-coded limit for floating point registers, use
11130         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
11131
11132         Notice that in MacOS X calling conventions you can fit a lot more
11133         floating point values in registers, so I should update the PInvoke
11134         test to excercise the passing of floating point values on the
11135         stack (currently broken).
11136         
11137 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
11138
11139         * tramp-ppc.c (create_trampoline_code): Added
11140         JUMP_TRAMPOLINE_SIZE. 
11141         (ppc_magic_trampoline): Follow the pattern from
11142         x86_magic_trampoline: if code is set to zero, return. 
11143         (create_trampoline_code): Always pass MonoMethod to the jump
11144         trampoline, before it was passing a null.
11145         (mono_arch_create_jump_trampoline): Implement the jump stub, could
11146         share the code with mono_arch_create_jit_trampoline. 
11147
11148         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
11149         implemented.
11150         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
11151         implemented.  
11152
11153         * cpu-g4.md: Added length for jmp instruction, the worst case
11154         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
11155         for save_lmf).
11156
11157 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
11158
11159         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
11160
11161 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
11162
11163         * mini.c: Only set bblock->real_offset when adding a new bblock, and
11164         before each IL instruction.
11165
11166         * mini.c (CEE_BOX): Fix warnings.
11167
11168 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11169
11170         * mini.c: removed a few unused vars and extra whitespace.
11171
11172 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
11173
11174         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
11175         checks.
11176         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
11177         index.
11178         (OP_GETCHR): use the above
11179         (CEE_LDELEMA): use the above.
11180
11181         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
11182         version of the generic impl.
11183         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
11184         (CEE_LDELEMA): use the above.
11185
11186 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11187
11188         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
11189         Fixes #56317.
11190
11191         * iltests.il: Added new regression test for #56317.
11192
11193 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11194
11195         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
11196         under NetBSD. Fixes #56450.
11197
11198         * liveness.c (update_gen_kill_set): Fix previous patch.
11199
11200 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11201
11202         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
11203
11204 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
11205
11206         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
11207         ldsfld and ldsflda.
11208
11209         * inssel-sparc.brg: Add more optimizations.
11210
11211         * mini-sparc.c: Replace multiply/divide with shifts if possible.
11212
11213 2004-04-01  Martin Baulig  <martin@ximian.com>
11214
11215         * mini.c (handle_box): New static function; moved the
11216         implementation of CEE_BOX here.
11217         (mono_method_to_ir): Added `constrained_call' variable.
11218         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
11219         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
11220         mono_method_get_constrained() to get the method.
11221
11222 2004-04-01  Martin Baulig  <martin@ximian.com>
11223
11224         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
11225         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
11226         (mono_method_to_ir): We don't need these macros anymore since
11227         mono_class_get_full() already takes care of it. 
11228
11229 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11230
11231         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
11232         use @function (as doesn't accept #function here) and check the return
11233         value of system and stop if fails.
11234
11235 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11236
11237         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
11238
11239 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
11240
11241         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
11242
11243         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
11244
11245         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
11246         #56223.
11247
11248         * basic-long.cs: Add test for negation of Int64.MinValue.
11249
11250 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
11251
11252         * mini-sparc.c: Update status.
11253
11254         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
11255
11256         * exceptions-sparc.c: Fix return value in filters.
11257
11258         * inssel-sparc.brg: Fix register allocation in some rules.
11259
11260 2004-03-28  Martin Baulig  <martin@ximian.com>
11261
11262         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
11263         if neccessary.  
11264
11265 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
11266
11267         * mini-x86.c (mono_arch_patch_code): Fix warnings.
11268         
11269         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
11270         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
11271         remove unused conv_u4 opcode.
11272
11273         * mini-x86.c: Remove valgrind workaround since it slows down things
11274         even when mono is not run under valgrind.
11275
11276 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
11277
11278         * mini-sparc.c: Update status.
11279
11280         * inssel-sparc.brg: Add some optimizations.
11281
11282         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
11283         future delay slot filling. Add support for varargs, tail calls and JMP.
11284
11285         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
11286         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
11287
11288         * inssel.brg: Fix register allocation in OP_ARGLIST.
11289
11290         * inssel.brg: Fix warnings.
11291
11292 2004-03-25  Martin Baulig  <martin@ximian.com>
11293
11294         * mini.c (inflate_generic_field): Removed.
11295         (mini_get_method): Removed, use mono_get_method_full(),
11296         (mini_get_class): Removed, use mono_class_get_full().
11297         (mono_method_to_ir): Pass our generic context to
11298         mono_field_from_token().        
11299
11300 2004-03-25  Martin Baulig  <martin@ximian.com>
11301
11302         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
11303         of a `MonoMethod *'.
11304         (mini_get_method): Take a `MonoGenericContext *' instead
11305         of a `MonoMethod *'.
11306         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
11307         a new local variable called `generic_context' which holds the
11308         current `MonoGenericContext *'; use it to lookup things.
11309
11310 2004-03-24  Martin Baulig  <martin@ximian.com>
11311
11312         * mini.c (mini_get_class): New static method; if we're inside a
11313         generic instance, inflate the class if neccessary.
11314         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
11315
11316 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
11317
11318         * iltests.il: New regression test for #55976.
11319
11320         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
11321         #55976.
11322
11323 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11324
11325         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
11326         output.
11327
11328 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11329
11330         * liveness.c: Consider SSA stores as well as loads when making vars
11331         volatile.
11332
11333         * exceptions.cs: New regression tests for register allocation.
11334         
11335 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
11336
11337         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
11338         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
11339           domain lock only to protect puntual access to data structures.
11340           Added access lock for sighash, jit_icall_hash_name, 
11341           jit_icall_hash_addr and domain->code_mp.
11342
11343 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
11344
11345         * driver.c: Print SIGSEGV handling method.
11346
11347         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
11348
11349         * mini.c (setup_jit_tls_data): Handle case when this is called
11350         multiple times for a thread.
11351
11352         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
11353         is different from fbxx_un. Fixes #54303. Also use constants instead of
11354         magic numbers in a lot of places.
11355
11356 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
11357
11358         * exceptions.cs: Fix cctor test when --regression is used.
11359
11360 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
11361
11362         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
11363         for Linux/ppc.
11364
11365 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11366
11367         * inssel-ppc.brg: fixed register assignments for some rules.
11368
11369 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11370
11371         * exceptions.cs: Add test for exceptions in static constructors.
11372
11373         * mini.c (mono_jit_compile_method_with_out): Move the calling of
11374         static constructors outside the domain lock. Fixes #55720.
11375
11376 2004-03-17  Martin Baulig  <martin@ximian.com>
11377
11378         * mini.c (get_generic_field_inst): Removed, this'll never happen.
11379         (inflate_generic_field): Take the `MonoMethod *' instead of the
11380         `MonoClass *' and added support for generic method.
11381         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
11382         have a `field->parent->gen_params', only inflate the field if it's
11383         an open constructed type.
11384
11385 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11386
11387         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
11388         exception object instead of the preconstructed ones.
11389
11390 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11391
11392         * mini.c: reverted changed to sigsegv_signal_handler commited
11393         accidentally in the previous patch.
11394
11395 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11396
11397         * mini.c:
11398         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
11399         running --aot with an old assembly.
11400
11401 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
11402
11403         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
11404         point values.
11405
11406         * mini-sparc.c: Add support for v9 branches with prediction.
11407
11408 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
11409
11410         * mini.c (mini_init): #warning is GNUC only
11411
11412         * mini-sparc.h: implement __builtin_frame_address
11413         and __builtin_return_address for Sun C compiler
11414
11415 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
11416
11417         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
11418
11419 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
11420
11421         * basic-calls.cs: Add test for unaligned byref long argument passing.
11422
11423         * mini-ops.h: Add sparcv9 compare and branch instructions.
11424
11425         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
11426         v9 instructions if we have a v9 cpu.
11427
11428         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
11429         registers for global allocation.
11430
11431         * exceptions-sparc.c: Fixes.
11432         
11433 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
11434
11435         * liveness.c (mono_analyze_liveness): Optimized version.
11436
11437         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
11438
11439         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
11440         sparc work.
11441
11442         * basic-float.cs basic-calls.cs: New regression tests.
11443
11444 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
11445
11446         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
11447         sigaltstack implementation.
11448
11449         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
11450         
11451         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
11452         stuff if SIGSEGV_ON_ALTSTACK is not defined.
11453
11454 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
11455
11456         * mini.c: Fix warnings.
11457         
11458         * mini.c (mono_resolve_patch_target): New function which contains the
11459         arch independent part of the patching process.
11460
11461         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
11462         patching code to a separate function.
11463
11464 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
11465
11466         * mini.c (add_signal_handler): ifdef out on Windows
11467
11468 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
11469
11470         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
11471         cpu-sparc.md: Add exception handling support + other fixes.
11472
11473         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
11474         typed GC detection in --version.
11475
11476         * basic.cs exceptions.cs: New regression tests.
11477
11478         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
11479         the arch specific code can store data during a compilation.
11480
11481         * mini-ops.h: Add OP_SETFRET.
11482
11483         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
11484         function, register a separate icall for each arity, so the icalls can
11485         get a wrapper.
11486         
11487         * mini.c (mono_print_tree): Print negative offsets in a more readable
11488         form.
11489         
11490         * mini.c: Make signal handling work on sparc.
11491         
11492         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
11493
11494         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
11495
11496         * jit-icalls.c: Emulate truncl by aintl on solaris.
11497
11498         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
11499
11500 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
11501
11502         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
11503
11504 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
11505
11506         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
11507         a MarshalByRef type, inline a method that performs the check, taking into
11508         account that the object can be a proxy. Also implemented tow new opcodes:
11509         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11510         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
11511         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11512
11513 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11514
11515         * mini-ppc.c: if a relative branch displacement is too big
11516         but it points to and area reachable with an absolute branch, 
11517         avoid the thunks.
11518
11519 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11520
11521         * mini.c: optimize small copies in cpblk.
11522
11523 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
11524
11525         * basic-calls.cs basic-float.cs: New regression tests.
11526
11527         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
11528         negative offsets from %fp. Implement localloc. Fix local register 
11529         allocation. Fix the case when the this argument needs to be saved to
11530         the stack. Implement some missing opcodes.
11531
11532 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
11533
11534         * mini.c (mini_method_compile): Reenable global regalloc in methods
11535         with exception handlers.
11536
11537         * linear-scan.c (mono_varlist_sort): Fix warning.
11538
11539         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
11540
11541         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
11542         regalloc costs.
11543
11544         * liveness.c: Make all variables uses in exception clauses volatile, to
11545         prevent them from being allocated to registers. Fixes #42136.
11546
11547 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
11548
11549         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
11550         causes regressions.
11551
11552         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
11553         argument to mono_arch_regalloc_cost.
11554
11555         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
11556         precisely.
11557
11558 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
11559
11560         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
11561         Make the cost of allocating a variable to a register arch dependent.
11562
11563         * basic-calls.cs: Fix compilation of tests.
11564         
11565         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
11566         helper function to cut back on the number of #ifdefs needed.
11567
11568         * mini-ppc.c: Fix compilation.
11569
11570         * basic-calls.cs: New regression tests.
11571
11572         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
11573
11574         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
11575         of l0 since that is callee saved.
11576
11577         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
11578         to virtual calls.
11579
11580         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
11581         of delay instruction.
11582
11583         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
11584
11585         * mini.h (MonoCallInst): Add 'virtual' flag.
11586
11587         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
11588
11589 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
11590
11591         * *.cs: New regression tests.
11592
11593         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
11594         work.
11595
11596         * mini.c (mono_runtime_install_handlers): Fix build.
11597
11598         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
11599         'signal_stack_size' members.
11600
11601         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
11602         alternate signal stack.
11603
11604         * exceptions-x86.c: Add stack overflow handling.
11605
11606         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
11607         functions to arch independent code.
11608
11609         * mini.c (mono_print_tree): Print more detailed info for load_membase
11610         opcodes.
11611         
11612 2004-02-23  Martin Baulig  <martin@ximian.com>
11613
11614         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
11615
11616 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11617
11618         * mini-x86.c: fixed reg allocation for div/rem.
11619
11620 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
11621
11622         * driver.c (mono_main): Report some configuratio options on --version.
11623
11624 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
11625
11626         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
11627         low in the address space. Correctly flush memory in thunks where we
11628         output native code.
11629
11630 2004-02-20  Martin Baulig  <martin@ximian.com>
11631
11632         * mini.c (mini_get_method): New static method; inflate all generic
11633         methods and methods in open generic instances.
11634         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
11635         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
11636
11637 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11638
11639         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
11640
11641         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
11642
11643 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
11644
11645         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
11646
11647         * mini-sparc.c (flushi mono_arch_output_basic_block): make
11648         it compile using Sun's compiler.
11649
11650 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11651
11652         * 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.
11653
11654         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
11655
11656 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11657
11658         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
11659         code.
11660         * mini-ppc.c: handle calls outside of the allowed range with thunks
11661         allocated using the code manager.
11662         * tramp-ppc.c: use the code manager to hold generated native code.
11663         Fixed the magic trampoline to just patch vtable entries.
11664
11665 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
11666
11667         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
11668         independent file.
11669
11670 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
11671
11672         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
11673         PPC.
11674
11675         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
11676         if we have a working __thread implementation.
11677
11678         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
11679         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
11680
11681 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
11682
11683         * mini-x86.c: Fix compilation under gcc 2.
11684         
11685 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
11686
11687         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
11688         contains a call to the wrapped function.
11689
11690         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
11691         OP_<CALL>_IMM opcodes, and use them under X86.
11692         
11693         * mini.c (mono_jit_find_compiled_method): Fix warning.
11694
11695         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
11696
11697         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
11698
11699         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
11700         functionality to mini.c.
11701
11702         * mini.c (mono_create_jump_trampoline): New function to create a jump
11703         trampoline. Return a compiled method instead of a trampoline if it
11704         exists. Add a cache for jump trampolines.
11705
11706         * mini.c (mono_jit_find_compiled_method): New function to return a
11707         compiled method if it exists.
11708
11709         * mini-x86.c: Call mono_create_jump_trampoline instead of 
11710         mono_arch_create_jit_trampoline.
11711
11712         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
11713         a jump trampoline. Fixes #52092.
11714         
11715 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
11716
11717         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
11718         which is not up-to-date. Add check_corlib_version () instead.
11719
11720         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
11721         have to call it.
11722         
11723         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
11724         since newer valgrind versions do not need it.
11725
11726         * mini.c (mono_jit_compile_method_with_opt): New helper function to
11727         compile a method with a given set of optimizations.
11728
11729         * mini.c: Compile icall wrappers on-demand instead of at startup.
11730
11731         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
11732         wrapper for an icall.
11733
11734 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
11735
11736         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
11737         #54063.
11738
11739         * iltests.il: Add test for non-empty stack before switch instruction.
11740
11741 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
11742
11743         * mini.c: Add support for new stringbuilder marshalling conventions.
11744
11745         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
11746
11747 2004-02-01  Martin Baulig  <martin@ximian.com>
11748
11749         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
11750         in `ginst->mtype_argv'.
11751
11752 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
11753
11754         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
11755         facilitate grepping.
11756
11757 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
11758
11759         * mini.c: fixed buglet in initobj generic implementation for references.
11760
11761 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
11762
11763         * Makefile.am: make the version script conditional.
11764         * jit-icalls.c: handle missing truncl().
11765
11766 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
11767
11768         * exceptions.cs: Add more tests for double->int conversion.
11769
11770         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
11771         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
11772
11773 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
11774
11775         * driver.c: make --verbose --version emit an error
11776         if the loaded corlib doesn't match the runtime version.
11777
11778 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
11779
11780         * mini-ppc.h: export ppc_patch().
11781         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
11782         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
11783         on par or better than on MacOSX.
11784
11785 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
11786
11787         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
11788         mono_lookup_pinvoke_call.
11789
11790         * mini-x86.c: Under windows, the default pinvoke calling convention is
11791         stdcall. Fixes #52834.
11792
11793         * mini.c (optimize_branches): Add an upper bound to the number of
11794         iterations to prevent infinite loops on strange loops. Fixes #53003.
11795
11796 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11797
11798         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
11799         and ISINST. Fixes #52093.
11800
11801         * objects.cs (test_0_vector_array_cast): New tests.
11802         
11803 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
11804
11805         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
11806         checking in Array.Set ().
11807
11808         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
11809         #52590.
11810
11811         * object.cs (test_0_multi_array_cast): New regression test.
11812
11813 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
11814
11815         * exceptions-ppc.c: fix build on Linux/PPC.
11816
11817 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
11818
11819         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
11820         running under valgrind.
11821         (x86_magic_trampoline): Fix build bustage.
11822
11823         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
11824         negative values as well. This is needed for the encoding of the line number
11825         info, since sometimes the line numbers are not in increasing order.
11826
11827 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
11828
11829         * cpu-pentium.md (localloc): Increase the size of the localloc 
11830         instruction since it is a loop under Win32.
11831
11832         * debug-mini.c (record_line_number): Get rid of unneccesary memory
11833         allocation.
11834
11835 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
11836
11837         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
11838         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
11839         Max Horn (max@quendi.de). Fix file names in comments.
11840
11841 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
11842
11843         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
11844         avoid stack overflow.
11845         (replace_usage): Avoid uninitialized variable warnings.
11846
11847         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
11848         and taking the address of valuetype variables.
11849
11850 2004-01-03  Patrik Torstensson
11851
11852         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
11853         for other purposes than FP later on.
11854
11855 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
11856
11857         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
11858         of tail calls.
11859
11860 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11861
11862         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
11863
11864 2003-12-30  Patrik Torstensson <p@rxc.se>
11865
11866         * mini-x86.h: Decreased number of availiable fp regs.
11867         Solves corner cases with FP spilling.
11868
11869 2003-12-23  Patrik Torstensson <p@rxc.se>
11870
11871         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
11872         for floating point stack tracking / spilling on x86. 
11873         Fixes bug #49012.
11874         
11875         * basic-float.cs: added float mul overflow test.
11876
11877 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
11878
11879         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
11880
11881 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11882
11883         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
11884         supports for cond branches that overflow the immediate
11885         overflow offset. mcs can compile simple programs.
11886
11887 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11888
11889         * exceptions-ppc.c: exception handling support wip:
11890         finally handlers get run on exception.
11891
11892 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
11893
11894         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
11895         profiling.
11896
11897 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
11898
11899         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
11900         initial support for stack walking and unwinding.
11901
11902 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
11903
11904         * driver.c (mono_main): Make corlib-out-of-sync message more 
11905         descriptive. Also remove verify_corlib call.
11906
11907 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
11908
11909         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
11910         not overlap with other call's arguments, too.
11911
11912 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
11913
11914         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
11915         move to arch-specific code the choice of arch-specific
11916         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
11917         * mini.c: ensure emulation calls will not interleave
11918         with other calls.
11919
11920 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
11921
11922         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
11923         the magic trampoline stack frame is dropped before executing
11924         the new method.
11925
11926 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11927
11928         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
11929         and integer to fp conversions. Added support for overflowing
11930         arguments on the stack. Reserve a couple more registers as temps.
11931         Added support for aot compilation (as output still needs to be
11932         tweaked, though).
11933
11934 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
11935
11936         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
11937         Don't overwrite return register in some corner cases.
11938
11939 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
11940
11941         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
11942         static constructors when AOT compiling.
11943
11944         * driver.c (mono_main): Call mono_check_corlib_version.
11945
11946 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
11947
11948         * cpu-g4.md, basic.cs: fixed div target register.
11949
11950 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
11951
11952         * mini-ppc.c, basic.cs: shl_imm fix with test.
11953
11954 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
11955
11956         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
11957         structures by value. Misc fixes.
11958         * objects.cs: more tests.
11959
11960 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
11961
11962         * mini-ppc.c: lconv.ovf.i implemented.
11963
11964 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11965
11966         * mini.c:
11967         (mini_init): don't error out if someone already called g_thread_init.
11968
11969 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
11970
11971         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
11972         to be any type per the spec. Fix abnormal memory usage when
11973         the same object is repeatedly thrown.
11974
11975 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
11976
11977         * mini.c: check for overruns in IL code.
11978
11979 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
11980
11981         * TODO: Add/remove some todo entries.
11982
11983 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
11984
11985         * driver.c (mono_main): Call mono_verify_corlib.
11986
11987 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
11988
11989         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
11990         This has been moved to mini.c
11991         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
11992         type being casted is marshalbyref it could be a proxy, so instead of
11993         emitting the type check code, emit a call to a runtime method that will
11994         perform the check by calling CanCastTo if needed.
11995
11996 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
11997
11998         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
11999         methods with large stack frames under Win32.
12000
12001 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
12002
12003         * Makefile.am: Distribute regression tests.
12004
12005         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
12006         at the end instead of inserting each variable into the sorted list.
12007
12008         * linear-scan.c (mono_varlist_sort): New helper function.
12009         
12010 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12011
12012         * mini.c: ensure arguments and locals are within bounds.
12013
12014 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12015
12016         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
12017         related fixes.
12018
12019 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12020
12021         * mini.c (mono_cprop_copy_values): Fix crash.
12022
12023         * aot.c: Set verbosity back to 0.
12024         
12025 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12026
12027         * regalloc.c: complete memory leak fix by Laurent Morichetti
12028         (l_m@pacbell.net).
12029
12030 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12031
12032         * driver.c (main_thread_handler): Revert the previous patch.
12033
12034         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
12035         under valgrind.
12036
12037         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
12038         memory from the memory pool.
12039
12040         * driver.c (main_thread_handler): Turn on all optimizations when
12041         --aot is used.
12042
12043         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
12044         an array for better performance.
12045
12046         * regalloc.c (mono_regstate_assign): Fix memory leak.
12047
12048         * debug-mini.c (mono_debug_serialize_debug_info): New function to
12049         serialize the debug info.
12050
12051         * debug-mini.c (mono_debug_add_aot_method): New function to load the
12052         debug info from the serialized representation.
12053
12054         * aot.c: Save debug info into the generated file and load it when 
12055         loading a method.
12056
12057         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12058
12059 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12060
12061         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
12062         More FP-related fixes.
12063
12064 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
12065
12066         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
12067         and register allocation buglet. Hello world now runs.
12068
12069 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12070
12071         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
12072         * tramp-ppc.c: fixed class init trampoline.
12073         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
12074
12075 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12076
12077         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
12078         mini.c: more ppc changes/fixes.
12079
12080 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12081
12082         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
12083         Also optimize the case when the arguments are the same in the caller 
12084         and in the callee.
12085
12086         * iltests.il: Add tests for tail calls with valuetype arguments.
12087
12088 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12089
12090         * mini-ppc.c: fixes for struct return type.
12091
12092 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
12093
12094         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
12095         mono_spillvar_offset() to arch-specific code.
12096
12097 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
12098
12099         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
12100
12101 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12102
12103         * exceptions-x86.c: Fix stack space leaks.
12104         
12105         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
12106         registers from the lmf if the method has save_lmf set.
12107
12108 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
12109
12110         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
12111         of icall wrappers into InvokeInDomain, since these are now per-domain.
12112
12113 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
12114
12115         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
12116         make some opcode emulation and intrinsic ops enabled/disabled 
12117         according to the architecture. More fixes.
12118
12119 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12120
12121         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
12122
12123 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12124
12125         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
12126         arch-specific handling for 'this' and struct return type to
12127         arch-specific code.
12128
12129 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12130
12131         * aot.c: prevent divide by zero error when reporting (it happened with
12132         Accessibility.dll).
12133
12134 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
12135
12136         * mini.h (inst_switch): Remove unused macro.
12137
12138 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12139
12140         * aot.c:
12141         (load_aot_module): free 'info->methods' and 'info' properly. No more
12142         "free(): invalid pointer blah" messages when you have an old aot
12143         compiled assembly.
12144
12145 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
12146
12147         * jit-icalls.c, mini.c: Added support for context static fields.
12148
12149 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12150
12151         * mini.c (mono_method_blittable): Methods which set LastError are not 
12152         blittable either. Fixes #51108.
12153         
12154 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12155
12156         * mini.c: flush icache.
12157         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
12158
12159 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12160
12161         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
12162
12163 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
12164
12165         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
12166         safe on IA32.
12167
12168         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
12169         vararg calls.
12170
12171         * inssel.brg (CEE_MKREFANY): Fix AOT case.
12172
12173 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
12174
12175         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
12176         instruction when the result is discarded.
12177
12178         * iltests.il (test_0_div_regalloc): New regression test.
12179
12180         * arrays.cs: Fix compilation error.
12181
12182 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
12183
12184         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
12185         float rules to inssel-x86.brg: sane architectures with FP registers
12186         don't need to implement these rules.
12187
12188 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12189
12190         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
12191
12192 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12193
12194         * mini.h, inssel-long32.brg: fixed endianess issues in int64
12195         implementation of 32 bit systems.
12196
12197 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12198
12199         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
12200         (Jeroen Zwartepoorte).
12201
12202 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12203
12204         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
12205         the caller and the callee matches.
12206         
12207         * mini.c (mono_method_to_ir): Add comment.
12208
12209         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
12210         signbit is missing on some platforms.
12211
12212 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
12213
12214         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
12215
12216         * mini.c (setup_jit_tls_data): Call the new function.
12217         
12218         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
12219
12220         * mini-x86.c: Add experimental support for fast access to the lmf
12221         structure under NPTL/Linux 2.6.x.
12222
12223 2003-11-06  Martin Baulig  <martin@ximian.com>
12224
12225         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
12226         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
12227         the debugger.
12228
12229 2003-11-02  Martin Baulig  <martin@ximian.com>
12230
12231         * mini.c (inflate_generic_field): New static method.
12232         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
12233         generic instance and the field is declared in a generic type, call
12234         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
12235
12236 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
12237
12238         * mini.h mini.c (mono_method_same_domain): New function to return
12239         whenever the caller and the callee are in the same domain.
12240
12241         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
12242
12243 2003-10-30  Martin Baulig  <martin@ximian.com>
12244
12245         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
12246         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
12247         method parameters.
12248         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
12249         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
12250
12251 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
12252
12253         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
12254         propagation.
12255
12256         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
12257         object here, so it is in the correct appdomain etc.
12258
12259 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
12260
12261         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
12262         already done.
12263         (mono_method_to_ir): Avoid freeing the type created returned from
12264         mono_type_create_from_typespec, since it is put into an internal cache
12265         by the function. Fixes pointer.exe.
12266
12267         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
12268         trampolines for icalls and pinvokes as well. Fixes #33569.
12269
12270 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
12271
12272         * mini.c: Update after appdomain changes.
12273
12274         * mini.c (mono_jit_compile_method_inner): Allways compile native
12275         method wrappers in the root domain, since there can only be one
12276         instance of them, whose address is stored in method->info.
12277
12278 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12279
12280         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
12281         environment variable. Instead detect automatically whenever running
12282         under valgrind using the magic macro RUNNING_ON_VALGRIND from
12283         valgrind.h.
12284
12285 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
12286
12287         * trace.c, trace.h: New files that implement the new trace option
12288         parsing. 
12289
12290         * driver.c: Document new --trace options.
12291
12292         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
12293         mini-x86.c: Apply:
12294
12295         -       if (mono_jit_trace_calls)
12296         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
12297
12298         * mini.h: prototypes.
12299         
12300 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12301
12302         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
12303
12304         * mini.c inssel.brg: Implement typedefbyref opcodes.
12305
12306         * mini.c (mono_jit_compile_method): Remove unused local variable.
12307
12308         * mini.c (mono_jit_compile_method_inner): Ditto.
12309         
12310 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
12311
12312         * tramp-x86.c (x86_class_init_trampoline): Fix build.
12313         
12314         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
12315
12316 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12317
12318         * mini.c (mono_no_aot): Remove unused global variable.
12319
12320         * mini.c: Thread safety fixes.
12321
12322 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12323
12324         * mini.c (mono_create_class_init_trampoline): Add a lock around
12325         class_init_hash_addr.
12326
12327         * arrays.cs (test_0_newarr_emulation): Add new regression test for
12328         #30073.
12329
12330         * mini.c: Decompose the NEWARR instruction before decomposing its
12331         arguments. Fixes #30073.
12332
12333 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
12334
12335         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
12336         convention.
12337
12338 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
12339
12340         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
12341
12342         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
12343
12344         * driver.c: Add support for compiling icall wrappers to --compile.
12345
12346 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
12347
12348         * inssel.brg: The empty value in class->interface_offsets is -1, not
12349         0. Fixes #49287.
12350
12351 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
12352
12353         * objects.cs: New test for 'is' operator on an array of interfaces.
12354
12355 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12356
12357         * tramp-ppc.c: update trampoline code to support jumps
12358         and class initialization.
12359
12360 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
12361
12362         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
12363
12364         * inssel.brg (OP_UNBOXCAST): Fix #46027.
12365
12366         * inssel.brg (OP_UNBOX): Remove unused rule.
12367
12368         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
12369         region instead of one for each method. Fixes #47813.
12370
12371 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
12372
12373         * exceptions.cs (test_0_nested_finally): New regression test for
12374         nested exception handlers.
12375
12376         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
12377
12378         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
12379
12380         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
12381         inlining.
12382
12383         * mini.c (mono_method_check_inlining): Make the inlining limit 
12384         configurable by an environment variable.
12385         
12386         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
12387
12388         * mini.h: Bump AOT file version.
12389
12390         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
12391         token, store the image along with the token, since the token might not 
12392         refer to the same image as the method containing the relocation, 
12393         because of inlining.
12394
12395 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
12396
12397         * mini.c (mono_precompile_assemblies): New function to compile
12398         all methods in all loaded assemblies.
12399
12400         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
12401
12402         * regalloc.h regalloc.c (MonoRegState): Change the type of 
12403         iassign and fassign to int*, since they can contain large negative
12404         values if the register is spilled. Also added some comments. Fixes
12405         #45817.
12406
12407         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
12408         under Win32. Fixes #42964.
12409
12410 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
12411
12412         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
12413
12414         * aot.c: Added support for AOT compiling methods which contain calls
12415         to wrappers. Currently, only remoting-invoke-with-check wrappers are
12416         handled.
12417         
12418         * driver.c (compile_all_methods): Run the compilation in a thread
12419         managed by mono. Fixes #44023.
12420
12421         * mini.c (mono_codegen): Print full method name in verbose output.
12422
12423         * mini-x86.c (mono_arch_patch_code): Fix warning.
12424         
12425         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
12426         jumps, since the method we are jumping to might be domain-specific.
12427
12428         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
12429
12430 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12431
12432         * inssel.brg: string chars are unsigned.
12433
12434 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
12435
12436         * TODO: New todo item.
12437
12438         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
12439         which calls mono_runtime_class_init and patches the call site to
12440         avoid further calls.
12441         (mono_arch_create_class_init_trampoline): New arch specific function 
12442         to create a class init trampoline.
12443         (create_trampoline_code): Generalized so it can create
12444         class init trampolines as well.
12445
12446         * mini.c (helper_sig_class_init_trampoline): New helper variable.
12447         (mono_create_class_init_trampoline): New function to create and cache
12448         class init trampolines.
12449         (mono_find_class_init_trampoline_by_addr): New function to lookup the
12450         vtable given the address of a class init trampoline. Used by the
12451         patching process.
12452         (mono_codegen): Generate a call to a trampoline instead of
12453         mono_runtime_class_init in LDSFLD[A].
12454         (mono_codegen): Add relocations for the new trampoline.
12455         
12456         * mini.h mini-x86.c aot.c: Added a new relocation type: 
12457         MONO_PATCH_INFO_CLASS_INIT.
12458
12459         * mini.h: Bump AOT version number.
12460
12461         * aot.c: Create a copy of the loaded code instead of using the original
12462         so methods which call each other will be close in memory, improving
12463         cache behaviour.
12464         
12465         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
12466         patch since it breaks the regression tests.
12467         
12468         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
12469         for the register saving instruction sequence since the 
12470         frame_state_for function in glibc 2.3.2 don't seem to detect it.
12471
12472 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
12473
12474         * TODO: Fix todo item && remove another.
12475
12476 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
12477
12478         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
12479         previous checkin.
12480
12481         * aot.c: Moved the check for MONO_LASTAOT into the initialization
12482         function of the module.
12483
12484         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
12485         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
12486         --no-aot command line option.
12487
12488 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
12489
12490         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
12491         by Bernie Solomon (bernard@ugsolutions.com).
12492
12493         * inssel.brg: Refactor the interface offset table related code into
12494         its separate functions and add support for the AOT case.
12495
12496 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
12497
12498         * aot.c (mono_aot_get_method_inner): Fix memory leak.
12499         
12500         * aot.c: Added mono_aot_verbose variable and made all debugging
12501         output depend on the value of this variable.
12502
12503         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
12504         method_label and info_label.
12505
12506         * mini.h mini-x86.c aot.c: Added a new relocation type 
12507         MONO_PATCH_INFO_IID for klass->interface_id.
12508
12509         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
12510         the MonoJitInfo structure.
12511
12512         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
12513         a non-root appdomain in shared mode.
12514
12515 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
12516
12517         * aot.c: make aot loader less verbose. Remove free of unused variable.
12518
12519 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
12520
12521         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
12522
12523         * .cvsignore: Added *.dll.
12524
12525         * mini.c (mono_print_tree_nl): New function callable while debugging.
12526
12527         * mini.c (mono_print_code): Export this.
12528
12529         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
12530         patched code.
12531
12532 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
12533
12534         * mini.h (MonoCompile): Added 'jit_info' field.
12535
12536         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
12537         the cfg structure, since it is needed by the AOT compiler.
12538
12539         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12540
12541         * aot.c: A major rewrite. Changes include:
12542         - save exception tables for methods which have them.
12543         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
12544         to g_module_symbol.
12545         - reworked the file format so it is now much smaller and needs
12546         fewer relocation entries.
12547         
12548 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12549
12550         * aot.c (load_aot_module): Fix build bustage on platforms without
12551         Boehm GC.
12552
12553 2003-09-04  Martin Baulig  <martin@ximian.com>
12554
12555         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
12556
12557 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12558
12559         * TODO: Some new optimization ideas.
12560
12561         * aot.c: Move AOT module loading logic here from mono_assembly_open.
12562
12563         * aot.c: Save the optimization flags used to compile the code into
12564         the AOT module.
12565
12566         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
12567         support emitting domain specific code.
12568         
12569         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
12570         no longer domain neutral. It can be made domain neutral by compiling 
12571         with --optimize=shared.
12572
12573         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
12574         between appdomains.
12575
12576         * driver.c mini.h mini.c: New --no-aot debugging option which disables
12577         loading of AOT code.
12578
12579         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
12580         
12581         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
12582         if there is no domain neutrality information.
12583
12584 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
12585
12586         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
12587         format version into the generated library.
12588
12589         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
12590         callee method into the caller since one of them could be shared.
12591
12592         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
12593         system exceptions from AOT code now works.
12594
12595         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
12596         method if it is domain neutral and the callee is not.
12597
12598         * graph.c (cfg_emit_one_loop_level): Fix warning.
12599
12600 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
12601
12602         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
12603         last checkin.
12604
12605 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
12606
12607         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
12608         is needed  by code which is executed before mono_runtime_init ().
12609         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
12610         
12611         * mini.c (mono_thread_abort): Fix warning.
12612         (mono_jit_compile_method): Call static constructor in the AOT case too.
12613
12614         * aot.c (mono_compile_assembly): Fix warning.
12615
12616 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12617
12618         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
12619
12620 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
12621
12622         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
12623
12624         * cpu-pentium.md: Fix the length of call opcodes so they include the
12625         ESP restoring instruction. Fixes #47968.
12626
12627 2003-08-28  Martin Baulig  <martin@ximian.com>
12628
12629         * mini-x86.c (mono_arch_call_opcode): Added support for
12630         MONO_TYPE_GENERICINST.
12631
12632         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
12633
12634 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
12635
12636         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
12637         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
12638
12639         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
12640         metadata_section.
12641
12642 2003-08-26  Martin Baulig  <martin@ximian.com>
12643
12644         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
12645         when reporting an error, set this to the actual error location.
12646         (mono_method_to_ir): Report the correct error location if
12647         get_basic_blocks() returned an error.
12648
12649 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
12650
12651         * mini.c (mono_type_blittable): OBJECT is not blittable.
12652         (mono_method_blittable): Methods which have marshalling descriptors
12653         are not blittable either. Fixes #47842.
12654
12655 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
12656
12657         * driver.c mini.c: Use an environment variable instead of a global 
12658         variable. Also fix the build.
12659
12660         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
12661         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
12662         reporting this. 
12663
12664         * driver.c mini.c: Added --with-valgrind option to turn off some
12665         code which prevents mono from running under valgrind.
12666
12667         * mini.c (mono_emit_call_args): Fixed warning.
12668
12669         * mini.c (mono_emulate_opcode): Fixed warning.
12670
12671 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12672
12673         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
12674         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
12675         regalloc.c, regalloc.h: specify available registers in arch-specific
12676         code and support floats in the regallocator (patch by Laurent Morichetti 
12677         <l_m@pacbell.net>)
12678
12679 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
12680
12681         * mini.c: mono_thread_current() can be called only after
12682         mono_runtime_init(): rearrange code to not call it early on.
12683
12684 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12685
12686         * mini.c: allocate jump tables in the code mempools.
12687
12688 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12689
12690         * mini.c, mini.h: make sure per-thread data allocated by the jit is
12691         freed.
12692
12693 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
12694
12695         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
12696         12 to 16.  This fixes bug #47453.
12697
12698
12699 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12700
12701         * mini-ppc.c: fixed indexed load and unsigned compares.
12702
12703 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
12704
12705         * mini.c: reenabled installation of handler for
12706           thread abort signal.
12707
12708 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12709
12710         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
12711         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
12712         until it's fixed and actually useful.
12713
12714 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
12715
12716         * inssel-long32.brg: couple more opcodes implemented.
12717
12718 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
12719         
12720         * mini-sparc.c: Even more opcodes implemeted.
12721
12722 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
12723
12724         * mini-sparc.c: More opcodes implemented.
12725
12726 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
12727
12728         * mini-sparc.c: More opcodes implemented.
12729
12730 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
12731
12732         * inssel-sparc.brg: Add some needed rules.  Direct
12733         copy from PPC.
12734         * Makefile.am: Use inssel-sparc.brg
12735         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
12736         an assert happy for now.
12737
12738 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
12739
12740         * mini-sparc.c: Fixed compile errors.
12741         * exceptions-sparc.c: Same.  We now produce a mono binary 
12742         on sparc-linux.  Yea.
12743
12744 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
12745
12746         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
12747         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
12748         They compile, but do not work.
12749
12750 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12751
12752         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
12753         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
12754         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
12755         (ct@gentoo.org).
12756
12757 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12758
12759         * mini.c: more opcodes implemented and better support for generics.
12760
12761 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
12762
12763         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
12764         * mini.c, mini.h: first cut at generics support: some new instructions 
12765         added and changed the behaviour of some of the existing ones.
12766
12767 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
12768
12769         * mini.c: Removed definition of metadata_shared mutex here.
12770
12771 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
12772
12773         * mini-x86.c: make vararg calls work for instance methods.
12774
12775 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12776
12777         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
12778         returns the arguments in a separte list, now.
12779
12780 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
12781
12782         * aot.c, mini.c: updates for array type representation changes.
12783
12784 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
12785
12786         * mini.c: register function to perform jit shutdown.
12787
12788 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12789
12790         * mini.c: use a faster allocator if possible.
12791
12792 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
12793
12794         * aot.c: some cleanups and portability changes.
12795
12796 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12797
12798         * mini.c: use faster allocation for CEE_BOX if possible.
12799
12800 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
12801
12802         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
12803         Moved inlined mempcy code to its own function so that is can be
12804         reused. Added an inline memset function as well (optimized initobj).
12805         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
12806
12807 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12808
12809         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
12810
12811 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
12812
12813         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
12814         arch code can setup the cpu for CLR execution, if needed.
12815         We use it on x86 to set the precision of FP operations.
12816
12817 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12818
12819         * mini.c: disable some optimizations if we can guess they'll cost too
12820         much for a given method.
12821
12822 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12823
12824         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
12825         
12826 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12827         * mini.h mini.c mini-x86.c: Added instruction level coverage 
12828         info collection support.
12829
12830 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12831
12832         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
12833         is now implemented in the profiling API. Get rid of a couple of
12834         unnecessary global variables.
12835
12836 2003-06-15  Nick Drochak <ndrochak@gol.com>
12837
12838         * basic-long.cs: tests for negative values for bigmul, and unsigned.
12839         * cpu-g4.md: add op_bigmul and op_bigmul_un
12840         * cpu_pentium.md: add op_bigmul_un
12841         * inssel-long32.brg: add rule for unsigned bigmul
12842         * mini-ops.h: define OP_BIGMUL_UN
12843         * mini-x86.c: THE BUG: handle (un)signed properly
12844         * mini.c: choose unsigned opcode if needed.
12845         This set of patches fixes bug #44291
12846
12847 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
12848
12849         * mini.c (optimize_branches): improved to handle all kinds of
12850         conditional branches.
12851
12852 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
12853
12854         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
12855         don't raise exceptions.
12856
12857 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12858
12859         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
12860         to arch-specific files.
12861
12862 2003-06-09  Martin Baulig  <martin@ximian.com>
12863
12864         * Makefile.am (libs): Added $(LIBGC_LIBS).
12865
12866 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
12867
12868         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
12869         and OP_ATAN (fixes bug#44293).
12870
12871 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
12872
12873         * Makefile.am, mini-x86.c: rename cpu description array to
12874         pentium_desc, since some compilers define the 'pentium' preprocessor
12875         symbol.
12876
12877 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
12878
12879         * mini.c (mini_select_instructions): add explicit branch if the
12880         following block is not the false target of a conditional branch -
12881         we need this with any optimization that reorder or remove bblocks
12882
12883         * mini.c (optimize_branches): bug fixes
12884
12885 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
12886
12887         * mini.c (mono_method_to_ir): inline static readonly fields
12888
12889         * ssa.c (fold_tree): start cfold support for long (very simple
12890         cases only)
12891
12892         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
12893
12894 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
12895
12896         * inssel.brg: fixed memcpy (bug #44219).
12897
12898 2003-06-05  Dick Porter  <dick@ximian.com>
12899
12900         * driver.c: Set the glib log levels to not abort if g_message
12901         recurses.
12902
12903         g_set_prgname() has to happen before mini_init() so that the
12904         process handle gets the info.
12905         
12906 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12907
12908         * driver.c: add intrins to the default optimizations to get wider
12909         exposure.
12910
12911 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12912
12913         * mini.h: some large basic blocks will overflow a 16-bit
12914         integers for symbolic registers.
12915
12916 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
12917
12918         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
12919         (mono_arch_output_basic_block): fix bug 43499 
12920
12921 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
12922
12923         * mini.c: kill duplicated definition of mono_debug_format.
12924
12925 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
12926
12927         * mini-x86.c, arrays.cs: fixed register allocation bug.
12928
12929 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
12930
12931         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
12932
12933         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
12934
12935 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12936
12937         * mini.c:
12938         (print_method_from_ip): also print source location information if
12939         available.
12940
12941 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
12942
12943         * mini.c (mono_find_block_region): bug fix in region code
12944         (mini_method_compile): enable removing unreachable code again, but
12945         only in methods without exception clauses.
12946
12947 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
12948
12949         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
12950         Implemented arglist opcode and handling of TypedReference type.
12951         Fixed x86 call convention when a structure is returned.
12952         Minimal support for calling static vararg methods.
12953
12954 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
12955
12956         * mini.c (mini_method_compile):  always remove unreachable code,
12957         because the code in them may be inconsistent  (access to dead
12958         variables for example).
12959
12960 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
12961
12962         * driver.c, debug-mini.c: warning fixes.
12963
12964 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
12965
12966         * Makefile.am, jit.h, mini.h: install header for embedding mono.
12967
12968 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
12969
12970         * mini.c: thread-static fields are registered in mono_class_vtable(),
12971         so ensure the function is called before checking for them.
12972
12973 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
12974
12975         * mini.c (optimize_branches): fix for bug 43586
12976
12977         * jit-icalls.c (mono_llmult_ovf): added an additional check for
12978         overflow (fixes Bug #43639)
12979
12980 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12981
12982         * mini.c, objects.cs: allow the use of stobj for primitive types.
12983
12984 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12985
12986         * mini.c: be less strict about argument checking until we support
12987         running the verifier.
12988
12989 2003-05-27  Nick Drochak <ndrochak@gol.com>
12990
12991         * basic-long.cs: tests for (ulong)int * (ulong)int also
12992         * mini.c: use the same trick for (ulong)int * (ulong)int
12993
12994 2003-05-27  Nick Drochak <ndrochak@gol.com>
12995
12996         * basic-long.cs: add regression test for (long)int * (long)int
12997         * cpu-pentium.md: add op_bigmul specification
12998         * inssel-long32.brg: add OP_BIGMUL rule
12999         * mini-ops.h: add OP_BIGMUL
13000         * mini-x86.c: register allocator: handle case where src1 needs to be
13001         in EAX.
13002         * mini.c: substitute special BIGMUL opcode in the tree for 
13003         (long)int * (long)int
13004
13005 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13006
13007         * jit-icalls.c: call the type ctor on field access if needed.
13008
13009 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13010
13011         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
13012         to a method (including results of ldelema, bug#43207).
13013
13014 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13015
13016         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
13017         colors to show exception handler blocks.
13018
13019         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
13020         (fix for pinvoke7.cs).
13021
13022 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13023
13024         * mini.h, mini.c: ensure correct initialization order for types that
13025         require it. Prepare for lazy compilation of jit icall wrappers.
13026         Provide a name for opcode emulation to reduce unneeded mallocing.
13027
13028 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13029
13030         * mini-x86.c: better register restoring code and profiling
13031         support for tail calls.
13032
13033 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13034
13035         * mini.h, driver.c: prepare for leaf methods optimization.
13036
13037 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13038
13039         * mini.c: get targets of branches before converting a method.
13040
13041 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
13042
13043         * mini.c (optimize_branches): added some experimental code (disbaled) 
13044
13045 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
13046
13047         * mini.c (optimize_branches): fix branch to branch optimization 
13048
13049         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
13050
13051         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
13052
13053         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
13054
13055         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
13056         if needed.
13057
13058 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13059
13060         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
13061         enable use of interface variables again.
13062
13063         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
13064         I1 to registers because there is no simply way to sign extend 8bit
13065         quantities in caller saved registers on x86.
13066
13067         * inssel-float.brg: set costs of some rules to 2 so
13068         that monobure always select the arch. specific ones if supplied,
13069         regardless of the order we pass the files to monoburg.
13070
13071 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13072
13073         * mini.c, mini-x86.c: since the magic trampoline for jumps
13074         can't patch the code directly, we do it as soon as the
13075         method gets compiled.
13076
13077 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13078
13079         * mini-x86.c, mini.h: introduce a new patching method
13080         to support CEE_JMP and tail calls.
13081         * mini.c: obey tail.call. Don't precompile methods target
13082         of CEE_JMP.
13083         * tramp-x86.c: new trampoline code to handle methods
13084         reached through a jump.
13085
13086 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
13087
13088         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
13089         bit values to registers
13090
13091 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
13092
13093         * mini.c (mono_compile_get_interface_var): share interface
13094         variables if possible.
13095
13096 2003-05-16  Martin Baulig  <martin@ximian.com>
13097
13098         * debug-mini.c (mono_init_debugger): New function to initialize
13099         the debugger.  This is not in the debugger since it needs to
13100         access some of mini's internals.
13101
13102 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13103
13104         * mini.c (mono_method_to_ir): inlining fixes/cleanups
13105
13106 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
13107
13108         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
13109         for value type handling.
13110
13111 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13112
13113         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
13114         (mono_method_check_inlining): enable inlining of all kinds of wrappers
13115
13116 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
13117
13118         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
13119           the constructor through a proxy.
13120
13121 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13122
13123         * jit-icalls.c, inssel.brg: fixes to array element address
13124         calculations.
13125
13126 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
13127
13128         * mini-x86.c (is_regsize_var): allocate pointer to registers
13129
13130 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13131
13132         * driver.c: fixed typo, added intrins to the set of optimizations
13133         tested with regressions.
13134
13135 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13136
13137         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
13138         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
13139         test case.
13140
13141 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
13142
13143         * inssel.brg: remove some common pop instructions without side effects
13144
13145 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13146
13147         * inssel-x86.brg: fixed thinko in int to double conversions.
13148
13149 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13150
13151         * mini.c, jit-icalls.c: added runtime thread-static variable support.
13152
13153 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13154
13155         * inssel-long32.brg: two more missing instructions.
13156
13157 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
13158
13159         * mini.c (mono_emit_call_args): set the cil_code for all arguments
13160         if not already set.
13161
13162 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
13163
13164         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
13165         correctly.
13166
13167         * basic-float.cs: Added tests for negative zero.
13168
13169 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13170
13171         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
13172         a couple of missing operations for long casts, with test cases.
13173
13174 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13175
13176         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
13177
13178 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
13179
13180         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
13181         code size estimation.
13182
13183 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
13184
13185         * mini.c (mono_jit_create_remoting_trampoline): make it work with
13186         abstract methods (fix bug 42542)
13187
13188         * aot.c: add ability to handle array types
13189         
13190 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
13191
13192         * mini.c: Call the _specific versions of the object allocation
13193         functions if possible.
13194
13195 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13196
13197         * driver.c: call setlocale ().
13198
13199 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13200
13201         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
13202         windows build.
13203
13204 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
13205
13206         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
13207
13208         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
13209         wrappers (fix bug 42122)
13210
13211 2003-05-04  Martin Baulig  <martin@ximian.com>
13212
13213         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
13214
13215         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
13216         s/mini_set_defaults/mono_set_defaults/g.
13217
13218 2003-05-04  Martin Baulig  <martin@ximian.com>
13219
13220         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
13221
13222 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13223
13224         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
13225         (reported by Don Roberts).
13226
13227 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
13228
13229         * mini.c: temporarily work around two bugs for this release.
13230
13231 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13232
13233         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
13234         that contains -export-dynamic and it makes using the ld script
13235         useless.
13236         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
13237
13238 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13239
13240         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
13241         specific cpu.
13242
13243 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13244
13245         * mini.c: make sure leave calls all the needed finally blocks,
13246         even when the target jumps out of multiple exception clauses.
13247
13248 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13249
13250         * ldscript, Makefile.am: add linker script to reduce the number of
13251         exported symbols (should also fix the issues with libwine defining
13252         some of the same symbols in io-layer).
13253
13254 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
13255
13256         * driver.c (mini_main): Avoid assertion when no file name is given on 
13257         the command line.
13258
13259 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
13260
13261         * driver.c: added --version/-V command line option.
13262         Added the inline optimization in the regression tests.
13263
13264 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13265
13266         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
13267         to the type in the method signature (fixes bug#42134).
13268
13269 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
13270
13271         * mini.c: when inlining, check this is not null only when needed (bug #42135).
13272
13273 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
13274
13275         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
13276
13277 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13278
13279         * driver.c: fixed bug #42100.
13280
13281 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
13282
13283         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
13284
13285 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13286
13287         * mini.c: moved most of the code required to do inlining to its own
13288         function so it can be reused. Inline also ctors if appropriate.
13289
13290 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
13291
13292         * Makefile.am: Link with -export-dynamic so shared libs loaded by
13293         the runtime can call mono API functions.
13294
13295 2003-04-27  Martin Baulig  <martin@ximian.com>
13296
13297         * debug-mini.c (mono_debug_init_method): Added
13298         `guint32 breakpoint_id' argument; if the method has a breakpoint,
13299         send a notification to the debugger.
13300
13301         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
13302         running in the Mono Debugger, just pass the breakpoint number to
13303         mono_debug_init_method().
13304
13305         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
13306
13307 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
13308
13309         * mini.c: allow some more unsafe compares.
13310
13311 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13312
13313         * mini-x86.c, Makefile.am: make distcheck works (partially from
13314         a patch by Richard Lee <r.h.lee@attbi.com>).
13315         * regset.c, regset.h: removed, they are unused.
13316
13317 2003-04-25  Dick Porter  <dick@ximian.com>
13318
13319         * driver.c: Usage reports the name as 'mono' not 'mini'
13320         * exceptions-x86.c: Build and run on freebsd
13321
13322 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13323
13324         * Makefile.am: install the program with the 'mono' name and
13325         the library as libmono instead of mini and libmini.
13326
13327 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13328
13329         * driver.c: provide the APIs for the embedding interface of the old jit.
13330
13331 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
13332
13333         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
13334
13335 2003-04-23  Martin Baulig  <martin@ximian.com>
13336
13337         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
13338
13339         * driver.c: Added `--debug' command line argument to enable
13340         debugging support.
13341
13342 2003-04-23  Martin Baulig  <martin@ximian.com>
13343
13344         * debug.[ch]: Removed.  The code is now in
13345         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
13346
13347         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
13348         last six months.
13349
13350 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
13351
13352         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
13353
13354 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13355
13356         * mini.c:
13357         (mini_cleanup): moved mono_runtime_cleanup call after the call to
13358         mono_domain_finalize.
13359         (mini_method_compile): use mono_method_profile* if the the option is
13360         enabled.
13361
13362 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
13363
13364         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13365         methods with their wrapper.
13366
13367         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13368         methods with their wrapper.
13369
13370         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
13371         their wrapper.
13372
13373         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
13374         wrapper.
13375
13376         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
13377         methods.
13378
13379 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
13380
13381         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
13382
13383 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
13384
13385         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
13386         of the mempool. This is slightly faster and uses less memory
13387
13388 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13389
13390         * mini.c: avoid O(n) allocation for variables.
13391
13392 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13393
13394         * mini.c: handle items on the stack after inlining methods.
13395
13396 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13397
13398         * mini.c: make the method->opcode optimization dependent
13399         on MONO_OPT_INSTRINS and do it lazily.
13400
13401 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13402
13403         * driver.c: print overall results at the end of regression run.
13404
13405 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13406
13407         * inssel.brg: don't overwrite symbolic registers.
13408
13409 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13410
13411         * inssel-x86.brg: fix conversion from long to float.
13412
13413 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
13414
13415         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
13416
13417 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
13418
13419         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
13420
13421         * driver.c: Added --print-vtable option as in the old JIT.
13422
13423 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13424
13425         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
13426
13427 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13428
13429         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
13430
13431 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
13432
13433         * mini.c regalloc.c regalloc.h: Fix memory leak.
13434
13435 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
13436
13437         * aot.c (mono_aot_get_method): register all used strings
13438
13439 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13440
13441         * mini.c: always intern strings references with ldstr at compile time.
13442
13443 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13444
13445         * Makefile.am: add BUILT_SOURCES.
13446
13447 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13448
13449         * driver.c: give a better error message when the assembly to execute
13450         doesn't have an entry point.
13451
13452 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
13453
13454         * Makefile.am: added hack for automake
13455
13456         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
13457         correct sematics.
13458
13459         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
13460
13461 22003-04-07  Martin Baulig  <martin@ximian.com>
13462
13463         * Makefile.am: Added Makefile.am.
13464
13465         * debugger-main.c: Removed, this is now in the debugger where it
13466         belongs.
13467
13468         * mini.pc.in: Call this package `mini' for the moment.
13469
13470
13471
13472
13473
13474
13475
13476