2008-06-07 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
2
3         * mini.c (remove_block_if_useless): Avoid printing the method name.
4         
5         * mini.c: Remove needless setting of ins->cil_code which is now done by 
6         MONO_INST_NEW.
7
8         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
9         LMF. Not yet used.
10
11         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
12         translated code after it has been patched.
13
14 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
15
16         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
17         avoid problems during code patching on SMP systems.
18         (emit_call): Avoid adding a patch info which is already added by 
19         emit_call_body.
20         (mono_arch_emit_exceptions): Ditto.
21
22 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
23
24         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
25         MONO_TYPE_ISSTRUCT already checks for it.
26
27 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
28
29         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
30           structs with floats on Winx64 the float registers are not used.  
31           The integer registers are always used..
32         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
33           only one register will be used and only if the size of the struct 
34           is 1,2,4, or 8 bytes.
35
36         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
37           to work for Winx64.
38
39         Contributed under MIT/X11 license.
40
41 2008-06-05  Martin Baulig  <martin@ximian.com>
42
43         * debug-debugger.c (debugger_lookup_class): Also call
44         mono_class_setup_methods() here; we're only called from RTI.
45
46 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
47
48         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
49         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
50         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
51         Post-process object files and add dtrace-generated object, if necessary.
52
53         Contributed under MIT/X11 license.
54
55 2008-06-04  Mark Probst  <mark.probst@gmail.com>
56
57         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
58         element class.
59
60         * mini.c: Generic sharing for unbox.any and castclass.
61
62 2008-06-04  Mark Probst  <mark.probst@gmail.com>
63
64         * mini.c: Ignore tailcall prefix in shared generic code and when
65         doing calls which require a vtable/rgctx argument.
66
67 2008-06-04  Mark Probst  <mark.probst@gmail.com>
68
69         * mini.c: Don't free the JIT info.
70
71         * driver.c: Changes in the JIT info table testing code.
72
73 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
74
75         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
76         interruption. Fix some warnings.
77
78         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
79         interruption_checkpoint.
80
81 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
82
83         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
84         from embedding applications.
85
86 2008-06-02  William Holmes  <billholmes54@gmail.com>
87
88         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
89           reserving 32 bytes on the stack when making calls. 
90
91         Contributed under MIT/X11 license.
92
93 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
94
95         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
96         the linear IL branch.
97
98         * driver.c: Print out more information for --version on arm.
99
100 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
101
102         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
103         bb_exit instead, since out of line bblocks might not actually be emitted
104         out-of-line.
105         
106         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
107         maximum epilog size for out of line bblocks if tracing is enabled.
108
109         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
110
111 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
112
113         * arrays.cs: Regression tests for allocating arrays with negative sizes.
114
115 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
116
117         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
118         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
119         opcodes.
120
121 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
122
123         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
124         the 'value' to store is a constant.
125
126         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
127
128         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
129         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
130
131 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
132
133         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
134         for accessing method->generic_container.
135
136 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
137
138         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
139         
140         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
141
142         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
143
144         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
145         fails.
146
147 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
148
149         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
150
151         * mini.c: Handle the case when mono_class_vtable () fails.
152
153 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
154         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
155         the stat profiler.
156
157 2008-05-22  Mark Probst  <mark.probst@gmail.com>
158
159         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
160         together with domain sharing.
161
162 2008-05-22  Mark Probst  <mark.probst@gmail.com>
163
164         * mini.c: Treat callvirts to final methods like non-virtual calls
165         when doing generic sharing, i.e. look them up in the runtime
166         generic context.
167
168 2008-05-22  Mark Probst  <mark.probst@gmail.com>
169
170         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
171         with computed types (for generic sharing).
172
173         * mini.c: Generic sharing for mkrefany and refanyval.
174
175 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
176
177         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
178         possible.
179
180         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
181         the generic sharing code.
182         
183         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
184         when needed.
185
186 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
187
188         * mini.h: Remove the declaration of mono_aot_init_vtable ().
189
190 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
191
192         * driver.c: updated copyright date
193
194 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
195
196         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
197         needed.
198
199 2008-05-19  Martin Baulig  <martin@ximian.com>
200
201         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
202         pointing to the new `_mono_debug_using_mono_debugger' variable.
203
204         * driver.c
205         (mono_main): Check mono_debug_using_mono_debugger() rather than
206         the `MONO_INSIDE_MDB' environment variable to check whether we're
207         inside the debugger.
208
209 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
210
211         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
212         argument.
213
214 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
215
216         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
217
218         * mini.c: Added mini_assembly_can_skip_verification. This
219         function checks if the assembly requested to skip verification. 
220         Fixes part of #387274.
221
222 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
223
224         * mini.c (mini_get_method): Disable the check for open generic classes when
225         using generic sharing.
226
227         * generics.cs: Add a test #387034.
228
229         * mini.c (mini_get_method): Check whenever the method class is an open generic
230         type, and return NULL in that case, causing a verification error. Fixes
231         #384123.
232
233 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
234
235         * driver.c (mono_main): Revert r102623. The right
236         thing to do is to enable the verifier under verifiable
237         unless a --security flag was passed.
238
239         We need this non-trivial behavior for --verify-all otherwise
240         mcs-compileall won't be able to use it. As it needs everything to
241         be verified under validil.
242
243 2008-05-06  Martin Baulig  <martin@ximian.com>
244
245         Fix #383749.
246
247         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
248         (mono_debugger_thread_cleanup): Likewise.
249         (mono_debugger_extended_notification): Likewise.
250
251 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
252
253         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
254         against both inflated and non-inflated methods. We need to check against the
255         generic definition for cases where the instantiated method is not visible.
256         We need to check against the inflated types for cases where the instantiation
257         changes any super type. This fixes #382986.
258
259         Note that this doesn't need to be applied to other parts of mono_method_to_ir
260         that check for visibiliy as generic params only appears as the type subject
261         of tokens on call opcodes. Field manipulation and ldftn must always
262         target an exact type.
263
264 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
265
266         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
267         if no related --security flag is passed.
268
269 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
270
271         * mini-arch.h: Prepare support for ppc64.
272
273         Contributed under MIT/X11 license.
274
275 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
276
277         * aot-runtime.c: Prepare support for ppc64.
278
279         Contributed under MIT/X11 license.
280
281 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
282
283         * mini-ops.h: Prepare support for ppc64.
284
285         Contributed under MIT/X11 license.
286
287 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
288
289         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
290
291         Contributed under MIT/X11 license.
292
293 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
294
295         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
296         assemblies, since aot_name is not a full path, causing us to load MS.NET 
297         assemblies on windows.
298
299 2008-04-28  KornĂ©l Pál  <kornelpal@gmail.com>
300
301         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
302         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
303         * main.c: Use UTF-8 encoded command line instead of Windows default code
304         page on Windows to support Unicode.
305         * driver.c (DllMain): New function for mixed-mode assembly support.
306         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
307         export __stdcall functions without decoration.
308
309         Contributed under MIT/X11 license.
310
311 2008-04-28  Mark Probst  <mark.probst@gmail.com>
312
313         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
314         saving it very early.
315
316 2008-04-28  Mark Probst  <mark.probst@gmail.com>
317
318         * mini.h, mini.c: Lots of code for accessing the old RGCTX
319         deleted.  The only way to access the new RGCTX is via the
320         trampline.
321
322         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
323         vtable instead of the RGCTX to static methods.
324
325         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
326         accessing the new RGCTX.
327
328         * generic-sharing.c: There is no separation between self, type
329         arguments and other types in the RGCTX anymore.
330
331 2008-04-25  Jonathan Chambers <joncham@gmail.com>
332
333         * mini-amd64.c (add_general): Remove previous stack adjustment.
334         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
335         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
336         for 32 bytes of stack space reserved for all calls.
337         
338         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
339         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
340         adjustment.
341         
342         Code contributed under MIT/X11 license.
343
344 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
345
346         * mini.c (mini_method_verify): Only verify non-inflated methods, check
347         against the root definition, peeling out method and type instantiations.
348         Cache verify success results, code that fails verification is still
349         checked multiple times.
350
351 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
352
353         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
354
355 2008-04-23  Jonathan Chambers <joncham@gmail.com>
356
357         * mini-amd64.c (add_general): Always increment stack on Win64.
358         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
359         on Win64.
360         
361         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
362         stack based argument handling on Win64.
363         
364         Code contributed under MIT/X11 license.
365
366 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
367
368         * Makefile.am (version.h): Add support for git-svn.
369
370 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
371
372         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
373         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
374         avoiding allocations and libc functions which might deadlock.
375         
376         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
377         'no-gdb-backtrace' option is set.
378
379         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
380
381         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
382
383 2008-04-21  Martin Baulig  <martin@ximian.com>
384
385         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
386         and `get_lmf_addr'; `notification_address' is no longer a pointer.
387
388 2008-04-21  Martin Baulig  <martin@ximian.com>
389
390         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
391         `thread_vtable', `event_handler_ptr' and `event_handler'.
392
393 2008-04-21  Martin Baulig  <martin@ximian.com>
394
395         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
396         allows delayed initialization of the `executable_code_buffer' when
397         attaching.
398
399 2008-04-21  Martin Baulig  <martin@ximian.com>
400
401         * mini.h (mono_debugger_create_notification_function): Removed.
402         * tramp-*.c (mono_debugger_create_notification_function): Removed.
403
404         * mdb-debug-info64.s
405         (MONO_DEBUGGER__notification_function): Added this in the .text section.
406
407         * mdb-debug-info32.s
408         (MONO_DEBUGGER__notification_function): Added this in the .text section.
409
410         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
411         currently only works on x86 and x86_64, so don't create it on ppc.
412
413 2008-04-21  Martin Baulig  <martin@ximian.com>
414
415         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
416
417         * mini.c
418         (mini_method_compile): In the fp elimination check, check
419         `debug_options.mdb_optimizations' in addition to
420         mono_debug_using_mono_debugger().       
421
422         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
423         disable some JIT optimizations which are only disabled when
424         running inside the debugger.
425         Added `--help-debug' option to describe the debugging options.
426         (parse_debug_options): New static function to parse the `--debug'
427         options, so we can easily add more stuff in future.
428
429 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
430
431         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
432         the method has no body.
433
434 2008-04-19  Jonathan Chambers <joncham@gmail.com>
435
436         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
437         assembly is not allowed in MSVC 64-bit compiler. 
438         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
439         as we get floating point exceptions everywhere.
440         
441         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
442         correctly align arguments for call to throw_exception.
443         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
444         
445         Code contributed under MIT/X11 license.
446
447 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
448
449         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
450
451 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
452
453         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
454
455         * mini-amd64.c (NEW_INS): Set cil_code.
456
457         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
458         from mini-amd64.c so all debugger related logic is in one place.
459
460         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
461         later won't have a random ip assigned to them.
462
463 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
464
465         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
466         the arch specific function initializes code_size.
467         (mono_create_delegate_trampoline): Ditto.
468
469         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
470         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
471         platforms.
472
473         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
474         running under the debugger.
475
476         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
477         debugger.
478
479         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
480         debugger. Also move the disabling of optimizations here from driver.c.
481         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
482         debugger.
483
484         * mini.h (MonoCompile): Add a few new flags.
485
486 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
487
488         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
489         so the cil_code field of created MonoInst's is properly set.
490         (mini_select_instructions): Ditto.
491
492         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
493         (MONO_INST_NEW_CALL): Ditto.
494
495         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
496         in many places so the ins->cil_code field is properly initialized.
497
498         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
499         place.
500
501 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
502
503         * mini.c (mini_method_compile): Print a different message when compiling a 
504         shared method.
505         
506         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
507         > 1.
508
509 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
510
511         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
512         SSE2 instructions.
513
514         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
515         
516 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
517
518         * mini.c (handle_stack_args): Make this return void since its return value was
519         never used. Also set cfg->unverifiable for invalid IL instead of calling
520         G_BREAKPOINT ().
521
522 2008-04-10  Mark Probst  <mark.probst@gmail.com>
523
524         * mini.c: Make sure "this" is live in catch clauses with type
525         variables in shared generic code.
526
527 2008-04-08  Mark Probst  <mark.probst@gmail.com>
528
529         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
530         generic_class_is_reference_type() to ensure the proper behaviour
531         when sharing generic code and the type in question is a type
532         argument.
533
534 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
535
536         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
537         race conditions when printing thread dumps. Fixes #377738.
538
539 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
540         
541         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
542         shows up when both MonoInst arguments can cause aliasig.
543         There is likely no way in the current JIT to trigger this problem, but
544         it showed up in the development of generics sharing, when in a new
545         opcode both args of an OP_GROUP can be aliases (addresses of a local).
546         When the generics sharing code will be committed, its tests will be
547         valid also for this bug.
548
549 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
550
551         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
552         PATCH_INFO_METHOD.
553
554         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
555         NULL.
556
557 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
558
559         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
560         use a more detailed exception message for InvalidCastException.
561
562         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
563
564         * driver.c (mono_main): Add --debug=casts option to turn on better 
565         InvalidCastException message details.
566
567         * mini.c (mini_get_debug_options): New helper function to return the address of
568         the debug_options variable.
569
570         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
571         the jit_tls TLS variable.
572
573         * mini.c (mono_jit_tls): New TLS variable.
574
575         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
576         option is used.
577
578 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
579
580         * mini.h: Removed verifer related stuff. This code was moved to verify.c
581
582         * mini.c: Removed verifer related stuff, code moved to verify.c.
583
584         * driver.c: Using code from verify.c instead of mini.c.
585
586 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
587
588         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
589         longer valid.
590
591 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
592
593         * mini.c (check_for_method_verify): Enabling verification of
594         corlib if mono_verify_all is set. Bugs in the verifier preventing that
595         have been fixed.
596
597 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
598
599         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
600         caller saved registers as well.
601         
602         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
603         saved registers as well.
604
605 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
606
607         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
608
609         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
610         code.
611
612 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
613
614         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
615         to get_call_info.
616         (get_call_info): Take a gsctx argument instead of 'cfg'.
617
618 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
619
620         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
621         mono_verify_all is set.
622
623         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
624
625         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
626
627 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
628
629         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
630         an exception.
631
632         * driver.c mini.c mini.h: Add a --verify-all development option to test the
633         verifier and the code generated by the compiler.
634
635 2008-03-25  Mark Probst  <mark.probst@gmail.com>
636
637         * mini.c: Generic sharing of the non-nullable case of the box
638         instruction.
639
640 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
641
642         * inssel.brg: Fix the build.
643
644         * iltests.il.in: Add a test for lconv.ovf.u8.un.
645
646 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
647
648         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
649         Array:Address. Fixes #372410.
650
651         * iltests.il.in: New tests for readonly prefix.
652
653 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
654
655         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
656         mini-trampolines.c.
657
658         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
659         mini-exceptions.c.
660
661         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
662         
663         * mini.c (mono_decompose_op_imm): New helper function.
664
665         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
666         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
667         return value.
668
669         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
670         mono_arch_output_basic_block. Fix warnings.
671
672         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
673         for now.
674
675 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
676
677         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
678         since the extra frame is now detected automatically inside the loop.
679
680         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
681         opts which are now in mono_peephole_ins ().
682         
683         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
684
685         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
686         frames and skip duplicate managed-to-native frames. Fixes #367665.
687
688         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
689         opts which are now in mono_peephole_ins ().
690         (mono_arch_peephole_pass_2): Ditto.
691
692         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
693
694         * mini-codegen.c (mono_peephole_ins): New helper function containing the
695         arch independent peephole optimizations.
696
697         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
698         opts which are now in mono_peephole_ins ().
699
700         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
701         
702         * mini-s390.c (mono_arch_output_basic_block): Fix build.
703
704         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
705         pattern.
706
707         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
708         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
709         opcode. 
710
711 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
712
713         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
714         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
715         return value.
716
717         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
718         mono_arch_output_basic_block. Fix warnings.
719
720 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
721
722         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
723         conv.ovf.u.un.
724
725 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
726
727         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
728         conv.ovf.u.un.
729
730         * iltests.il: Add new tests.
731
732 2008-03-20  KornĂ©l Pál  <kornelpal@gmail.com>
733
734         * mini.c: Removed Windows version macros.
735
736 2008-03-20  Mark Probst  <mark.probst@gmail.com>
737
738         * generic-sharing.c: Put reflection types in the extensible part
739         of the runtime generic context.
740
741         * mini.c: Generic sharing of the GetTypeHandle special case of the
742         ldtoken instruction.
743
744 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
745
746         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
747
748         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
749         
750         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
751         consistency with the other version on the linear IR branch.
752
753         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
754
755         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
756
757         * iltests.il.in: Add new tests.
758
759 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
760
761         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
762
763         * iltests.il.in: Add new tests.
764
765 2008-03-19  Mark Probst  <mark.probst@gmail.com>
766
767         * mini.c: Two variables with the same name were declared in
768         nesting contexts and one wasn't initialized.  Fixed.
769
770 2008-03-19  Mark Probst  <mark.probst@gmail.com>
771
772         * mini.c: Generic sharing of the initobj instruction.
773
774 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
775
776         * mini.c: make the test to optimize ldtoken from typeof() more
777         precise.
778
779 2008-03-18  Mark Probst  <mark.probst@gmail.com>
780
781         * mini.c: Generic sharing of the initobj instruction for reference
782         types.
783
784 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
785
786         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
787         the mono_breakpoint_clean_code() code to perform bound checks.
788
789 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
790
791         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
792         mono_arch_patch_callsite() to include the start of the managed method
793         to be able to perform bound checks.
794
795 2008-03-17  Mark Probst  <mark.probst@gmail.com>
796
797         * mini.c: Generic sharing for the isinst instruction.
798
799 2008-03-17  Mark Probst  <mark.probst@gmail.com>
800
801         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
802         inssel-long32-mips.brg: Added opcodes for doing indirect calls
803         with the runtime generic context argument.
804
805         * mini.c: Share calls to several types of unsharable methods by
806         putting the address of the method code in the runtime generic
807         context and doing an indirect call.
808
809         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
810         to switches.
811
812 2008-03-16  Mark Probst  <mark.probst@gmail.com>
813
814         * generic-sharing.c: Change due to a change in the runtime genric
815         context API.
816
817 2008-03-15  Martin Baulig  <martin@ximian.com>
818
819         * tramp-x86.c
820         (mono_arch_nullify_class_init_trampoline): Add call to
821         mono_breakpoint_clean_code() to make things work when running
822         inside the debugger.
823
824         * tramp-amd64.c
825         (mono_arch_nullify_class_init_trampoline): Add call to
826         mono_breakpoint_clean_code() to make things work when running
827         inside the debugger.
828
829 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
830
831         * inssel-long.brg (reg): Fix 64 bit build.
832
833 2008-03-14  Mark Probst  <mark.probst@gmail.com>
834
835         * mini.c, mini.h: Share static generic code by passing it an
836         implicit argument pointing to the runtime generic context.
837
838         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
839         inssel-long32-mips.brg: New opcodes for calling shared static,
840         which need to be passed the runtime generic context.
841
842         * mini-amd64.c, mini-x86.c: Save the runtime generic context
843         argument on the stack in the prologue if needed.  New function for
844         finding the runtime generic context argument from the registers
845         saved by the trampoline.
846
847         * mini-amd64.h, mini-x86.h: Specify which register to use for the
848         runtime generic context argument.
849
850         * tramp-amd64.c: Also restore the register used for the runtime
851         generic context argument.
852
853         * mini-trampoline.c: Resolve shared static calls by consulting the
854         runtime generic context via the new argument.
855
856         * generic-sharing.c: Add an argument to sharability-checking
857         functions that specifies whether type variables should be treated
858         as sharable type arguments.
859
860         * inssel-x86.brg: Removed a superfluous, buggy rule.
861
862         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
863         to switches.
864
865 2008-03-14  Martin Baulig  <martin@ximian.com>
866
867         * debug-debugger.c (main_thread_handler): Call
868         mono_runtime_run_main() without sending any notifications.
869
870         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
871
872 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
873
874         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
875
876 2008-03-14  Mark Probst  <mark.probst@gmail.com>
877
878         * tramp-x86.c: Fixed register restore offsets in the trampoline
879         code for ECX and EDX.
880
881 2008-03-12  Geoff Norton  <gnorton@novell.com>
882
883         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
884         different ucontext_t implementations.
885         * exceptions-arm.c: Use the above defines to get exceptions working on 
886         iPhone (based on a patch by Luke Howard lukeh@padl.com)
887         * mini-arm.c: Implement iPhone icache support (based on a patch by
888         Luke Howard lukeh@padl.com)
889
890 2008-03-12  Mark Probst  <mark.probst@gmail.com>
891
892         * mini.c: Enable generic sharing of calls to non-static
893         non-interface non-generic non-value-type methods.
894
895         * mini-trampolines.c: Resolve calls from shared generic code.
896
897 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
898
899         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
900
901         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
902
903 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
904
905         * mini.c: some fixes for the AOT compiler.
906
907 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
908
909         * cpu-amd64.md: Add clob:1 to some float opcodes.
910
911 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
912
913         * mini.h: Added MiniVerifierMode enumeration.
914
915         * mini.c: Added mini_verifier_set_mode to control
916         the usage of the new verifier.
917
918         * mini.c (mono_method): Integrated the new verifier.
919
920         * driver.c: Extended --security option with validil and
921         verifiable options to activate the new verifier.
922
923 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
924
925         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
926         optimization to ctors taking 0 or 2 arguments too.
927
928         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
929         a bit.
930
931         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
932
933         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
934
935 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
936
937         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
938         non-aot case as well.
939
940         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
941
942         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
943         changes.
944
945         * aot-compiler.c (encode_patch): Ditto.
946
947         * mini.h (G_MININT32): Fix the definition of this.
948
949 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
950
951         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
952
953         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
954
955 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
956
957         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
958         methods returning vtypes in registers.
959         (mono_arch_allocate_vars): Ditto.
960
961         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
962
963         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
964
965         * generics.cs: Add a test from the linear IR branch.
966
967         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
968
969         * mini.c (inline_method): Cache failed inline attempts.
970
971 2008-03-04  Mark Probst  <mark.probst@gmail.com>
972
973         * mini.c: For shared methods of generic classes put the location
974         of "this" into the MonoGenericJitInfo.
975
976         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
977         register out of a MonoContext by register number.  Add the generic
978         sharing context as an argument to mono_arch_find_this_argument().
979
980         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
981         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
982         for new arch function.
983
984         * mini-exception.c: Handle open exception clauses in shared
985         generic code.
986
987         * mini-trampolines.c: Supply additional argument to
988         mono_arch_find_this_argument().
989
990 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
991
992         * Makefile.am (regtests): Run the bench.exe tests last.
993
994 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
995
996         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
997         a bit.
998
999 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
1000
1001         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
1002         with MS.
1003
1004         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
1005         
1006         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
1007
1008         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
1009         whose class has no cctor.
1010
1011         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
1012
1013 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
1014
1015         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
1016         unverified.
1017
1018 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
1019
1020         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
1021         to be in sync with the code on the linear IR branch.
1022
1023         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
1024
1025         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
1026
1027 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
1028
1029         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
1030
1031         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
1032
1033         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
1034
1035         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
1036
1037         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
1038         
1039         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
1040         body.
1041
1042 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
1043
1044         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
1045         OP_LOADR4_MEMBASE emission.
1046
1047         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
1048         (mono_spillvar_offset_float): Ditto.
1049
1050         * mini-mips.c (mono_arch_emit_prolog): Ditto.
1051
1052         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
1053         emission.
1054
1055         * basic-long.cs: Add regression tests for them.
1056
1057         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
1058         use.
1059         (mono_arch_allocate_vars): Fix representation of single-precision float
1060         argument.
1061         (mono_arch_output_basic_block): Ditto.
1062
1063         * inssel-mips.brg: Ditto, remove duplicate items.
1064
1065         * mini-mips.c (emit_load_volatile_arguments): New function to handle
1066         arguments of tail calls as on other platforms.
1067         (mono_arch_output_basic_block): Handle tail calls.
1068
1069         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
1070         register.
1071
1072         * objects.cs (test_5_pass_static_struct): Add test for it.
1073
1074         Contributed under MIT/X11 license.
1075
1076 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
1077
1078         * Makefile.am: Use gmcs for compiling the regression tests.
1079
1080         * *.2.cs *.2.il: Rename to *.cs and *.il.
1081
1082 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
1083
1084         * regalloc.h: Make the vassign array smaller.
1085
1086         * mini.c (mini_method_compile): Remove an unused field in cfg.
1087
1088         * mini-codegen.c: Add a bunch of micro optimizations.
1089
1090 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
1091
1092         * regalloc.h: Remove some unused fields.
1093
1094 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
1095
1096         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
1097
1098         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
1099
1100 2008-02-22  Mark Probst  <mark.probst@gmail.com>
1101
1102         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
1103
1104         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
1105         trampoline: Fetch an entry from the runtime generic context.  If
1106         it's NULL, jump to the actual trampoline to fill the runtime
1107         generic context.  Otherwise, return it.
1108
1109         * mini.c: Call the lazy fetch trampoline to get entries out of the
1110         runtime generic context.
1111
1112         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
1113         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
1114         tramp-sparc.c: Stubs for the lazy fetch trampoline.
1115
1116 2008-02-21  Mark Probst  <mark.probst@gmail.com>
1117
1118         * mini.c: Fetch data out of the extensible part of the runtime
1119         generic context instead of calling a helper function.
1120
1121         * generic-sharing.c: Some functions moved into
1122         metadata/generic-sharing.c.  Helper function for fetching other
1123         types now checks and asserts against extensible rgctx (just for
1124         debugging purposes - the helper function isn't called anymore
1125         unless for debugging).
1126
1127 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1128
1129         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
1130         for tail calls up to the point that the tests in iltests.exe run. Also add a
1131         dummy CKFINITE implementation.
1132         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
1133         needed for trampoline LMF frames.
1134
1135         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
1136         trampoline LMF frames.
1137
1138 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
1139
1140         * mini.c (inline_method): clean any pending loader error when inlining fail.
1141         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
1142
1143 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1144
1145         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
1146
1147         * aot-runtime.c (decode_patch_info): Ditto.
1148
1149         * mini.c (mono_resolve_patch_target): Ditto.
1150         
1151         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
1152         icall wrappers.
1153
1154         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
1155         
1156         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
1157         if it references an icall address.
1158
1159 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
1160
1161         * cpu-s390x.md: Remove some more unused opcodes.
1162         
1163         * cpu-s390x.md: Remove some unused opcodes.
1164
1165         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
1166         mono_op_imm_to_op ().
1167
1168         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
1169         instead of a switch statement.
1170         
1171         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
1172         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
1173
1174         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
1175         
1176         * mini-codegen.c: Remove unused mono_regstate2_... functions.
1177
1178         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
1179         -1.
1180
1181 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
1182
1183         * driver.c (mono_main): Improve error reporting when an assembly cannot be
1184         opened. Fixes #362607.
1185
1186         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
1187
1188         * iltests.il.in: Add a test for static methods in interfaces.
1189
1190 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
1191
1192         * genmdesc.c (build_table): Fix a crash on older glib versions.
1193
1194         * cpu-sparc.md: Remove some unused opcodes.
1195         
1196         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
1197         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
1198
1199         * cpu-amd64.md: Remove some unused opcodes.
1200
1201         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
1202         like the other opcodes.
1203
1204 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
1205
1206         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
1207
1208         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
1209
1210         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
1211         variables 'cfg' instead of 'm' for consistency.
1212
1213         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
1214
1215         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
1216         argument holding the vtype return address, to avoid the ambigious use of
1217         cfg->ret for this purpose.
1218
1219         * mini.c (NEW_RETLOADA): Use vret_addr if set.
1220
1221         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
1222         
1223         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
1224         new mono_print_ins () function which only takes one argument.
1225
1226 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
1227
1228         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
1229         macro arguments.
1230
1231 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
1232
1233         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
1234
1235         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
1236
1237         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
1238         opcodes and other small changes.
1239
1240         * mini-ops.h: Add some new opcodes from the linear IR branch.
1241
1242         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
1243
1244         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
1245         opcodes, use the REG_MEMBASE opcodes instead.
1246         
1247         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
1248         opcodes, use the REG_MEMBASE opcodes instead.
1249         
1250         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
1251         linear IR branch.
1252
1253         * mini.c (mono_op_imm_to_op): New helper function.
1254
1255         * mini-ops.h: Add some opcodes from linear IR branch.
1256
1257 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
1258
1259         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
1260         <tsv@solvo.ru>.
1261
1262 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
1263
1264         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
1265         OP_ICONV_TO_R4/R8.
1266
1267         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
1268
1269 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
1270
1271         * aot-compiler.c (emit_method_code): Add an assert.
1272
1273         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
1274         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
1275         methods.
1276
1277 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
1278
1279         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
1280         some load/store opcodes so they are consistent. 
1281         (mono_arch_emit_prolog): Simplify some code.
1282
1283         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
1284
1285         * objects.cs: Add tests for large argument offsets on ARM.
1286
1287         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
1288         stack offsets. Fixes #359651.
1289
1290         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
1291
1292         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
1293
1294         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
1295
1296         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
1297
1298         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
1299
1300         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
1301         rid of CEE_CONV_R_UN.
1302
1303         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
1304
1305 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
1306
1307         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
1308
1309         * mini.c (mono_normalize_opcodes): Add some more opcodes.
1310
1311         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
1312
1313         * cpu-amd64.md: Remove some unused opcodes.
1314
1315         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
1316
1317         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
1318
1319         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
1320         arch specific functions for its parts. Call the peephole pass after local
1321         regalloc so the prolog can compute a more accurate max_offset.
1322         
1323         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
1324         the corresponding OP_I/OP_L opcodes.
1325
1326         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
1327
1328         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
1329
1330 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1331
1332         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
1333         as they are handled in mini.c.
1334
1335         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
1336         
1337         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
1338         case since it is handled in mini.c.
1339
1340         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
1341
1342         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
1343
1344         * *.c: Use the new opcodes in the IR and back end code.
1345
1346         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
1347
1348         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
1349
1350 2008-02-06  Mark Probst  <mark.probst@gmail.com>
1351
1352         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
1353         an assert because it has a race condition.
1354
1355 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1356
1357         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
1358
1359         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
1360
1361         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
1362
1363         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
1364         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
1365
1366 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
1367
1368         * cpu-amd64.md (move): Correct the maximum size of move.
1369
1370 2008-02-05  Mark Probst  <mark.probst@gmail.com>
1371
1372         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
1373         the generic class init trampoline to return quickly if the class
1374         is already inited.
1375
1376 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
1377
1378         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
1379         issues where an 32 bit callsite cannot be patched by a 64 bit address.
1380
1381 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
1382
1383         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
1384         branch.
1385
1386 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
1387
1388         * objects.cs: Add some soft-float tests.
1389
1390         * mini.c: Fix a couple more soft-float issues.
1391
1392         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
1393
1394         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
1395         avoid a REX prefix.
1396
1397 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
1398
1399         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
1400         exception happens while compiling a virtual method.
1401
1402 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
1403
1404         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
1405         
1406         * mini-sparc.c: Fix build.
1407
1408         * mini-sparc.c (get_call_info): Add support for generic sharing.
1409
1410         * mini-exceptions.c: Add a FIXME.
1411
1412 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
1413
1414         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
1415         altstack handling code.
1416
1417         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
1418         
1419         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
1420
1421         * mini-s390.c: Add support for generic sharing.
1422
1423         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1424         Fix CAS on s390.
1425         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1426
1427         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
1428
1429         * mini-s390x.c: Add support for generic sharing.
1430         
1431         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1432         Fix CAS on ia64.
1433         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1434
1435         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
1436         can be used since it takes a 16 bit signed immediate.
1437
1438         * inssel-s390x.brg: Fix OP_SETRET.
1439
1440         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
1441
1442         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
1443
1444         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
1445
1446         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
1447
1448         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
1449         in one place.
1450
1451         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
1452         stuff.
1453
1454         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
1455         of the unused mono_arch_patch_delegate_trampoline stuff.
1456
1457 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
1458
1459         * basic-long.cs: Move the fp related tests to basic-float.cs.
1460
1461         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
1462
1463         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
1464
1465         * basic-calls.cs: Add a test for proper float argument passing.
1466
1467         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
1468         if the context corresponds to an exception received through a signal.
1469
1470         * exceptions.cs: Add a test for nullref handling at the start of a try
1471         clause.
1472
1473         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
1474
1475         * jit-icalls.c (mono_break): New JIT icall.
1476
1477         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
1478
1479         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
1480
1481 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
1482
1483         * cpu-*.md: Get rid of unused opcodes.
1484
1485         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
1486
1487         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
1488         by all platforms.
1489
1490         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
1491         define.
1492
1493         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
1494         the arch independent trampoline code in mini-trampolines.c.
1495
1496         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
1497
1498         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
1499
1500         * mini-s390.h: Remove an unused define.
1501         
1502         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
1503         the arch independent trampoline code in mini-trampolines.c.
1504
1505         * mini-arm.c (mono_arch_emit_prolog): Fix build.
1506
1507 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
1508
1509         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
1510
1511         * mini-s390.c (mono_arch_emit_prolog): Fix build.
1512
1513         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
1514
1515         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
1516
1517         * cpu-amd64.md: Use smaller sizes for int opcodes.
1518
1519         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
1520
1521         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
1522         objects.cs.
1523
1524         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
1525         debugging.
1526
1527         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
1528         instead of though a pointer to save an indirection when accessing elements of
1529         the array.
1530
1531         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
1532         some typos.
1533         (NOT_IMPLEMENTED): New helper macro.
1534         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
1535         of a bb.
1536
1537         * *.c: Use the new helper macro.
1538
1539 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
1540
1541         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
1542
1543 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
1544
1545         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
1546         stack slots.
1547
1548 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
1549
1550         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
1551         profiling is enabled.
1552         
1553         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
1554         the end.
1555         (mono_arch_emit_prolog): Add more first bblock optimizations.
1556
1557         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
1558         in order if possible.
1559         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
1560         bblock, since the arguments are still in their original registers.
1561
1562         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
1563
1564 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
1565
1566         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
1567         as well.
1568
1569         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
1570         offset 0.
1571
1572         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
1573
1574         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
1575         process async exceptions received while in unmanaged code.
1576
1577         * mini.c (mini_init): Install a callback with the runtime which will be called
1578         when a thread receives an async exception while in unmanaged code.
1579
1580         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
1581
1582         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
1583
1584 2008-01-16  Wade Berrier  <wberrier@novell.com>
1585
1586         * cpu-g4.md:
1587         * cpu-arm.md:
1588         * cpu-s390x.md:
1589         fix build
1590
1591 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
1592
1593         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
1594         compilation with sun cc.
1595
1596         * cpu-*.md: Fix the build.
1597
1598         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
1599
1600         * mini-amd64.h: Add some comments to the MonoLMF structure.
1601
1602         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
1603         
1604         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
1605         in the LMF structure if possible. This saves two instructions in the
1606         managed->native wrappers.
1607
1608         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
1609
1610 2008-01-16  Mark Probst  <mark.probst@gmail.com>
1611
1612         * generic-sharing.c: New type argument lookup code which uses the
1613         runtime generic context template.
1614
1615 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
1616
1617         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
1618
1619         * mini-arm.c (add_general): Fix arm eabi parameter passing.
1620         (mono_arch_output_basic_block): Fix localloc implementation.
1621
1622         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
1623
1624         * mini-ia64.c (peephole_pass): Fix ia64 build.
1625
1626         * mini-amd64.c (peephole_pass): Fix a warning.
1627         
1628         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
1629         at a constant offset from sp/fp.
1630
1631         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
1632         instead of obtaining it from *lmf in the managed method case.
1633
1634 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
1635
1636         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
1637
1638 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
1639
1640         * mini.h (MonoInstList): New type.
1641         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
1642         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
1643         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
1644         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
1645         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
1646         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
1647         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
1648         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
1649         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
1650         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
1651         MONO_INST_LIST_FOR_EACH_ENTRY,
1652         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
1653         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
1654         mono_inst_list_first, mono_inst_list_last,
1655         mono_inst_list_next, mono_inst_list_prev): New instruction
1656         list handling interfaces.
1657         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
1658         list head 'ins_list'.
1659         (MonoInst): Replace next pointer with list head 'node'.
1660         (MonoCallInst): Make 'out_args' a MonoInstList.
1661         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
1662         (MonoCompile): Delete reverse_inst_list and
1663         reverse_inst_list_len.
1664         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
1665         mono_arch_lowering_pass, mono_arch_local_regalloc,
1666         mono_arch_output_basic_block, mono_arch_emit_prolog):
1667         Convert to new instruction lists.
1668         (insert_after_ins): Delete.
1669         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
1670         instruction lists.
1671         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
1672         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
1673         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
1674         mono_emulate_opcode, mono_emit_load_got_addr,
1675         inline_method, mono_method_to_ir, mono_print_bb_code,
1676         print_dfn, decompose_pass, nullify_basic_block,
1677         replace_out_block_in_code, remove_block_if_useless,
1678         merge_basic_blocks, move_basic_block_to_end,
1679         try_unsigned_compare, optimize_branches, mono_print_code,
1680         mini_select_instructions, remove_critical_edges): Likewise.
1681         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
1682         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
1683         mono_arch_output_basic_block, mono_arch_emit_prolog):
1684         Likewise.
1685         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
1686         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1687         mono_arch_output_basic_block): Likewise.
1688         (inst_list_prepend, insert_after_ins): Delete.
1689         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
1690         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
1691         instruction lists.
1692         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
1693         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
1694         mono_arch_emit_prolog): Likewise.
1695         * cfold.c (mono_constant_fold): Likewise.
1696         * liveness.c (visit_bb, mono_analyze_liveness,
1697         optimize_initlocals): Likewise.
1698         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
1699         * graph.c (mono_draw_code_cfg): Likewise.
1700         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
1701         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
1702         mono_ssa_cprop): Likewise.
1703         * abcremoval (get_relations_from_previous_bb, process_block):
1704         Likewise.
1705         * local-propagation (mono_cprop_invalidate_values,
1706         mono_local_cprop_bb): Likewise.
1707         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
1708         peephole_pass, mono_arch_output_basic_block,
1709         mono_arch_emit_prolog): Likewise.
1710         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
1711         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1712         mono_arch_emit_prolog): Likewise.
1713         (insert_after_ins): Delete.
1714         * aliasing.c (print_code_with_aliasing_information,
1715         mono_build_aliasing_information, mono_aliasing_deadce):
1716         Convert to new instruction lists.
1717         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
1718         peephole_pass, NEW_INS, mono_arch_lowering_pass,
1719         mono_arch_local_regalloc, mono_arch_output_basic_block):
1720         Likewise.
1721         (insert_after_ins): Delete.
1722         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
1723         peephole_pass, mono_arch_output_basic_block): Convert to
1724         new instruction lists.
1725         * mini-codegen (InstList, inst_list_prepend,
1726         insert_after_ins): Delete.
1727         (insert_before_ins, get_register_force_spilling,
1728         get_register_spilling, free_up_ireg, free_up_reg,
1729         create_copy_ins, create_spilled_store, alloc_int_reg,
1730         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
1731         to new instruction lists.
1732         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
1733         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1734         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
1735         (insert_after_ins): Delete.
1736         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
1737         mono_arch_local_regalloc, mono_arch_output_basic_block,
1738         mono_arch_call_opcode): Convert to new instruction lists.
1739         (insert_after_ins): Delete.
1740         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
1741         peephole_pass, mono_arch_output_basic_block,
1742         mono_arch_emit_prolog): Convert to new instruction lists.
1743
1744 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
1745
1746         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
1747
1748         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
1749         Fixes #353182.
1750
1751         * Makefile.am (version.h): Make this work with non-bash shells.
1752
1753 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
1754
1755         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
1756
1757 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
1758
1759         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
1760         the InitializeArray optimization.
1761
1762 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
1763
1764         * mini.c driver.c: Don't include os/gc_wrapper.h.
1765
1766 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
1767
1768         * mini.c (print_jit_stats): Print GC statistics if available.
1769
1770 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
1771
1772         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
1773
1774 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
1775
1776         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
1777
1778 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
1779
1780         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
1781         
1782         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
1783
1784         * driver.c (mono_main): Ditto.
1785
1786 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
1787
1788         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
1789
1790         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
1791         in the vtable can't be encoded.
1792         (compile_method): Ditto.
1793
1794 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
1795
1796         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
1797         defined.
1798
1799         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
1800         lmf->rbp.
1801
1802         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
1803         the top LMF entry belongs to the current method.
1804
1805         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
1806
1807 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
1808
1809         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
1810         
1811         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
1812
1813         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
1814
1815         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
1816
1817         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
1818
1819         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
1820         implementation.
1821
1822         * basic-float.cs: Add an ulong->double cast test.
1823
1824 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
1825
1826         * mini.c (mono_method_to_ir): Fix a warning.
1827
1828 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
1829
1830         * mini-ops.h: Add OP_SWITCH.
1831
1832         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
1833         CEE_SWITCH in back-end code, use OP_SWITCH instead.
1834
1835 2007-12-11  Geoff Norton  <gnorton@novell.com>
1836
1837         * mini-s390x.c: Minor change to the MAX() define to allow
1838         it to compile with other gcc versions.
1839
1840 2007-12-11  Geoff Norton  <gnorton@novell.com>
1841
1842         * cpu-s390x.md:
1843         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
1844
1845 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
1846
1847         exceptions-arm.c (mono_arch_get_restore_context): Restore
1848         the frame pointer.
1849
1850         exceptions-arm.c (throw_exception): Save the frame pointer.
1851         This is a partial fix for #323747. Only the client side is
1852         fixed.
1853
1854 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
1855
1856         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
1857         was using an unrelated variable to log the class which
1858         needed the cctor to be called. This was crashing on arm.
1859
1860 2007-12-09  Robert Jordan  <robertj@gmx.net>
1861
1862         * mini-x86.c (mono_arch_emit_epilog):
1863         Consider all kinds of 64-bit types. Fixes #323114.
1864
1865 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
1866
1867         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
1868
1869 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1870
1871         * mini-amd64.c (peephole_pass): Add a missing instruction check.
1872
1873 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
1874
1875         * mini.c: run type ctor before allocating an object, not only
1876         when running it's constructor method (fixes at least part of bug #342507).
1877
1878 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1879         
1880         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
1881         
1882         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
1883         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
1884         function.
1885
1886         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
1887         mono_generic_class_init_trampoline () the same as it is done with the other
1888         trampolines.
1889
1890         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
1891         aot-runtime.c aot-compiler.c: Implement AOT support.    
1892
1893 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1894
1895         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
1896         build for archs which don't have the vtable trampoline defined
1897         yet.
1898
1899 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1900
1901         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
1902
1903         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
1904
1905         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
1906
1907         * tramp-<ARCH>.c: Use the new helper function.
1908
1909 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1910
1911         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
1912         trampoline call, which takes a vtable argument.
1913
1914         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
1915         OP_TRAMPCALL_VTABLEs like other calls.
1916
1917         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
1918         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
1919         call.  Implemented a support function which fetches the vtable
1920         from a register set.
1921
1922         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
1923         Implemented a generic class init trampoline, using the
1924         OP_TRAMPCALL_VTABLE opcode.
1925
1926         * mini.c: Implemented static field access when sharing generic
1927         code.  This implies initing the class using the new
1928         OP_TRAMPCALL_VTABLE call.
1929
1930 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1931
1932         * mini.c: Don't compile methods with sharing enabled if their
1933         classes are disabled for sharing.
1934
1935 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
1936
1937         * inssel.brg: Add a missing sign extension to the GETCHR and array access
1938         opcodes. Fixes #346563.
1939
1940         * objects.cs: Add a new test.
1941
1942         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
1943
1944         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
1945         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
1946
1947 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
1948
1949         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
1950
1951 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
1952
1953         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
1954         code stream.
1955
1956 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
1957
1958         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
1959
1960         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
1961         optimization in the AOT case.
1962         
1963 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
1964
1965         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
1966         
1967         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
1968
1969         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
1970
1971         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
1972
1973         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
1974         is created by the inlined delegate ctor.
1975
1976         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
1977
1978         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
1979
1980 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
1981
1982         * cpu-x86.md: Fix the length of ckfinite.
1983
1984 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
1985
1986         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
1987         
1988         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
1989         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
1990
1991         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
1992
1993         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
1994         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
1995
1996 2007-11-28  Martin Baulig  <martin@ximian.com>
1997
1998         * mini-x86.c
1999         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
2000         after creating the trampoline.
2001
2002 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
2003
2004         * aot-runtime.c (load_aot_module): Check runtime version if needed.
2005
2006         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
2007         the same version.
2008
2009         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
2010         instead of the calling method to help AOT.
2011
2012         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
2013
2014 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
2015
2016         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
2017         is defined.
2018
2019 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
2020
2021         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
2022         
2023         * aot-compiler.c (compile_method): Correct check for generic method definitions.
2024         (encode_method_ref): No need to handle generic method definitions specially.
2025
2026         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2027
2028         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
2029         decode_klass_info.
2030
2031         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
2032         encode_klass_info.
2033         (compile_method): Enable generic sharing.
2034
2035 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
2036
2037         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
2038         (mini_method_compile): Add preliminary support for AOTing shared generic code.
2039
2040         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
2041         generic code.
2042
2043         * mini-trampolines.c: Fix a warning.
2044
2045         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
2046         NEW_PCONST.
2047         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
2048         (generic_class_is_reference_type): Remove unused function.
2049
2050         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
2051         in the generic vtable trampoline case.
2052
2053         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
2054         
2055         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
2056         return an AOT method based on a vtable slot.
2057
2058         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
2059
2060         * mini.c (mini_get_vtable_trampoline): Export this.
2061
2062 2007-11-22  Martin Baulig  <martin@ximian.com>
2063
2064         * debug-debugger.h
2065         (MonoDebuggerInfo): Move `debugger_version' up.
2066
2067 2007-11-22  Martin Baulig  <martin@ximian.com>
2068
2069         * mini-amd64.c
2070         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
2071
2072         * mini-trampolines.c
2073         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
2074         after compiling the method.
2075
2076 2007-11-20  Martin Baulig  <martin@ximian.com>
2077
2078         * debug-mini.c
2079         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
2080         (mono_debugger_remove_breakpoint): Likewise.
2081         (mono_debugger_check_breakpoints): Likewise.
2082
2083         * debug-debugger.c: Implement the new breakpoint interface here.
2084
2085 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
2086
2087         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
2088         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
2089
2090         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
2091
2092 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
2093
2094         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
2095
2096         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
2097         mini.c.
2098
2099         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
2100         mini.c.
2101
2102         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
2103         returning a vtype in a register.
2104
2105         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
2106         here from the arch specific code.
2107
2108         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
2109         mini.c.
2110
2111         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
2112         (mono_arch_emit_prolog): Increment maximum prolog size.
2113
2114         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
2115         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
2116
2117         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
2118         MonoGenericSharingContext.
2119
2120         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
2121         MonoGenericSharingContext. Allocate memory from the cfg mempool.
2122
2123 2007-11-15  Mark Probst  <mark.probst@gmail.com>
2124
2125         * mini.c, mini.h, generic-sharing.c: Functions for producing code
2126         which extract fields out of the runtime generic context.  Full
2127         sharing of the NEWARR opcode.
2128
2129 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
2130
2131         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
2132         --enable-minimal=ssa.
2133
2134 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
2135
2136         * mini-trampolines.c (mono_delegate_trampoline): Update after 
2137         mono_marshal_get_delegate_invoke () signature change.
2138
2139 2007-11-13  Mark Probst  <mark.probst@gmail.com>
2140
2141         * mini.c: Removed the shared context in favor of the generic
2142         sharing context.  Allocate the MonoJitInfo structure with room for
2143         the generic sharing context if it's needed.
2144
2145         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
2146         domain-internals.h now.
2147
2148         * mini-x86.c: Pass the generic sharing context to get_call_info ().
2149
2150         * generic-sharing.c: Several changes for working without a shared
2151         context and instead operating on open types instead.
2152
2153 2007-11-12  David S. Miller  <davem@davemloft.net>
2154
2155        * inssel-sparc.brg: Fix double instruction emit.
2156
2157 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
2158
2159         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
2160         Get/Set/Address methods.
2161         
2162         * mini.c debug-debugger.c mini-trampolines.c: Update after 
2163         mono_marshal_get_delegate_invoke signature change.
2164
2165 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2166
2167         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
2168         This can happens with dynamic methods. Fixes the other bug in #322722.
2169
2170 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2171
2172         * tramp-arm.c (mono_arch_patch_callsite): Support patching
2173         BX call sequence.
2174
2175         * mini-arm.c (arm_patch): Implement patching of BX call
2176         sequence. Fixes one of the bugs in #322722.
2177
2178 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
2179
2180        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
2181        under Linux.  We only need to flush every 32-byte cache line.    
2182
2183 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
2184
2185         * mini.c:
2186         move_basic_block_to_end: Add branches when needed, eventually creating
2187         a new BB.
2188         optimize_branches: added a parameter that tells if it's ok to create
2189         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
2190         and avoid calling move_basic_block_to_end when it's not ok.
2191         Fixes bug 318677.
2192
2193 2007-11-07  Mark Probst  <mark.probst@gmail.com>
2194
2195         * mini.c: Abort inlining call to InitializeArray if something
2196         looks wrong.  Let the icall handle it, which now has proper safety
2197         checks.
2198
2199 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2200
2201         * mini.c (mono_spill_call): add support for soft-float.
2202
2203         * mini.c (mono_method_to_ir): add support for soft-float
2204         to inlined functions that return float.
2205
2206         * mini.c (mono_method_to_ir): add support for soft-float
2207         to cee_stsfld opcode on float fields.
2208
2209 2007-11-05  Geoff Norton  <gnorton@novell.com>
2210
2211         * mini-x86.h: Fix the structure access for X86 Leopard.
2212
2213
2214 2007-11-05  Martin Baulig  <martin@ximian.com>
2215
2216         * mini-trampolines.c
2217         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
2218         after compiling the method to notify the debugger.
2219
2220 2007-11-05  Martin Baulig  <martin@ximian.com>
2221
2222         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
2223
2224 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
2225
2226         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
2227         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
2228
2229 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
2230
2231         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
2232         native-to-managed wrappers.
2233         
2234 2007-11-01  Geoff Norton  <gnorton@novell.com>
2235
2236         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
2237         members.
2238
2239 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
2240
2241         * mini.c, mini-x86.c: when getting back from unmanaged code
2242         to managed via a marshaled delegate we also need to set the
2243         right domain.
2244
2245 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
2246
2247         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
2248         for amd64.
2249
2250 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
2251
2252         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
2253         let the debugger or other external agents to tell the JIT when
2254         a sw breakpoint has been inserted in the code that the JIT needs
2255         to be able to inspect.
2256
2257 2007-10-31  Martin Baulig  <martin@ximian.com>
2258
2259         * debug-debugger.h
2260         (MonoDebuggerInfo): Remove `runtime_class_init'.
2261
2262 2007-10-30  Martin Baulig  <martin@ximian.com>
2263
2264         * debug-mini.h
2265         (mono_debugger_thread_created): Added `MonoThread *' argument.
2266         (mono_debugger_extended_notification): New public method.
2267         (mono_debugger_trampoline_compiled): New public method.
2268
2269         * debug-mini.c
2270         (MonoDebuggerThreadInfo): Added `thread' and
2271         `extended_notifications' fields.
2272
2273         * debug-debugger.c
2274         (debugger_executable_code_buffer): New static variable.
2275
2276         * debug-debugger.h
2277         (MonoDebuggerInfo): Added `executable_code_buffer',
2278         `executable_code_buffer_size', `breakpoint_info_area',
2279         `breakpoint_table' and `breakpoint_table_size'.
2280
2281 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
2282
2283         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
2284         that IP  either is an unused value or the vtable pointer. IMT 
2285         calls use vtable + offset now. Reduced by almost half the size
2286         of IMT entries.
2287
2288 2007-10-26  Jonathan Chambers <joncham@gmail.com>
2289
2290         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
2291         defines to access param registers. Replace long usage with
2292         gsize as sizeof(long) != sizeof(void*) on Win64.
2293
2294         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
2295         on Win64. Fix intrinsic, use _AddressOfReturnAddress
2296         instead of non-existant _GetAddressOfReturnAddress.
2297
2298         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
2299         param registers. Save/restore %rdi and %rsi in MonoLMF.
2300
2301         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
2302         param registers. Modify (throw_exception) signature to take 
2303         %rdi and %rsi on Win64. 
2304
2305         Code is contributed under MIT/X11 license.
2306
2307 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
2308
2309         * helpers.c: unlink debugging output files.
2310
2311 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
2312
2313         * mini.c: Move mono_create_ftnptr () to object.c.
2314
2315 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2316
2317         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
2318         optional. This function can now be used to disassemble code generated
2319         outside the JIT such as trampolines and IMT thunks.
2320
2321         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
2322
2323         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
2324         vtable pointer from a ldr instruction.
2325
2326         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
2327         new IMT call sequence.
2328
2329         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
2330         call sequence for interface invocations.
2331
2332         * mini-arm.c (mono_arch_emit_imt_argument): added, required
2333         for imt support. This function is empty since IMT on ARM requires no
2334         special handling on the IR side.
2335
2336         * mini-arm.c (mono_arch_find_imt_method): added, required for
2337         imt support.
2338
2339         * mini-arm.c (mono_arch_find_this_argument): added, required
2340         for imt support.
2341
2342         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
2343         a ldr instruction to load a value stored in the code stream.
2344
2345         * mini-arm.c (mono_arch_build_imt_thunk):added, required
2346         for imt support.
2347
2348
2349 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
2350
2351         * mini.c (mini_init): Install the jump trampoline callback.
2352
2353 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2354
2355         * mini-trampolines.c: handle synchronized methods with the common
2356         vtable trampoline (bug #335601).
2357
2358 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
2359
2360         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
2361
2362         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
2363         64 bit platforms.
2364
2365         * mini-ia64.h mini-ia64.c: Add support for IMT.
2366
2367         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
2368         prolog. Fixes #331958.
2369
2370 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
2371
2372         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
2373
2374 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2375
2376         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
2377         trampoline.
2378
2379 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2380
2381         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
2382         trampoline.
2383
2384 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
2385
2386         * mini-x86.c, mini-x86.h: x86 support for the common vtable
2387         trampoline.
2388
2389 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
2390
2391         * mini-trampolines.c: changed the magic rampoline to understand
2392         the common vtable trampoline method: the method to invoke is
2393         determined by the vtable displacement of the call.
2394
2395 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2396
2397         * mini.c, mini.h: register the common vtable trampoline if the
2398         architecture supports it.
2399
2400 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2401
2402         * cpu-amd64.md: use the correct max length for tls_get.
2403
2404 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
2405
2406         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
2407         CEE_STELEM_ANY. Fixes #333696.
2408
2409 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2410
2411         * exceptions-x86.c: provide more graceful handling of the case where
2412         we followed a bogus function pointer from managed code (bug #332866).
2413
2414 2007-10-11  Mark Probst  <mark.probst@gmail.com>
2415
2416         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
2417         replaces the generic_shared flag and will carry more information
2418         in the future.
2419
2420         * generic-sharing.c: Added mini_type_stack_size() which allows
2421         allows open types if given a generic sharing context.
2422         mini_get_basic_type_from_generic() takes a
2423         MonoGenericSharingContext* instead of a MonoCompile* now.
2424
2425         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
2426         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
2427         mini-sparc.c, mini-x86.c: Trivial changes required by the two
2428         changes above.  Just passing arguments through to the right
2429         places.
2430
2431 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2432
2433         * mini-arm.c: unify the call emission to emit_code_seq().
2434
2435 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
2436
2437         * tramp-arm.c: reduced the trampoline size.
2438
2439 2007-10-10  Mark Probst  <mark.probst@gmail.com>
2440
2441         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
2442         variable handling out of arch-specific code.
2443
2444 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
2445
2446         * mini-arm.c: implemented fast delegate dispatch.
2447
2448 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2449
2450         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
2451         that fp elimination is turned off if the space required by locals is too
2452         big. Fixes #331958.
2453
2454 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
2455
2456         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
2457         ARM to the new style trampoline.
2458
2459 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2460
2461         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
2462
2463         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
2464
2465 2007-10-09  Martin Baulig  <martin@ximian.com>
2466
2467         * debug-debugger.h
2468         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
2469         `field_info_offset_offset'.     
2470
2471 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
2472
2473         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
2474         removed more internal usage of the r11 register and made it available
2475         to the register allocator.
2476
2477 2007-10-08  Mark Probst  <mark.probst@gmail.com>
2478
2479         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
2480         when sharing generics and treat type variables as references.
2481
2482 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2483
2484         * mini-ppc.c: started removing the internal uses of register r11
2485         to eventually allow the register allocator to manage it as an
2486         additional available register.
2487
2488 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2489
2490         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
2491
2492 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
2493
2494         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
2495         specific trampolines as they are not performance critical as a jump
2496         target (maybe align as before only for AOT code?). This saves about
2497         200 KB of native code on x86 for monodevelop startup.
2498
2499 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
2500
2501         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
2502         monodevelop startup.
2503
2504 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
2505
2506         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
2507
2508         * mini-sparc.h mini-sparc.c: Implement IMT support.
2509
2510         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
2511         its smaller and doesn't clobber sparc_g1.
2512
2513         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
2514
2515 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
2516
2517         * mini-ppc.c: optimized the size of the IMT thunks a bit.
2518
2519 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
2520
2521         * mini-ppc.c: implemented fast delegate invocation.
2522
2523 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
2524
2525         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
2526
2527 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2528
2529         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
2530         code to the new style trampoline in preparation for IMT support.
2531
2532 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
2533
2534         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
2535         systems already. This also reduces the specific trampiline sizes and
2536         prepares for the use of r12 as the IMT identifier register.
2537
2538 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2539
2540         * mini-mips.h: endianess fix (simplified from a patch by
2541         Thomas Kunze <thommy@tabao.de>, bug #323737).
2542
2543 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2544
2545         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
2546         to access ucontext fields and enable netbsd support
2547         (partially from Magnus Henoch <mange@freemail.hu>).
2548
2549 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2550
2551         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
2552         use the preprocessor from the CPP env var if it is set.
2553
2554 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2555
2556         * mini-trampolines.c: fixed an assertion and moved it earlier in the
2557         code, before interface_offset gets used.
2558
2559 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
2560
2561         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
2562         mono_class_setup_vtable () before accessing klass->vtable.
2563
2564 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
2565
2566         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
2567         hackish.
2568
2569 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2570
2571         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
2572         IMT slots (this saves hundreds of KB of memory in programs like
2573         IronPython and Monodevelop).
2574
2575 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2576
2577         * mini.c: print the delegate counter.
2578
2579 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
2580
2581         * mini-x86.c: make it easier to enable the debugging code for IMT
2582         slots.
2583
2584 2007-09-28  Martin Baulig  <martin@ximian.com>
2585
2586         * debug-debugger.h
2587         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
2588         `mono_method_klass_offset' and `mono_method_token_offset'.
2589
2590 2007-09-20  Mark Probst  <mark.probst@gmail.com>
2591
2592         * mini.c: First generics sharing implementation.  Can only share
2593         in very simple cases.  If sharing doesn't work it falls back to
2594         dedicated compilation.
2595
2596         * mini.h: Flag in MonoCompile to specify whether generic
2597         compilation is shared.  Flags enum for marking which generic inst
2598         of a context is used.  Prototypes for helper functions.
2599
2600         * generic-sharing.c: Helper functions for generic method sharing.
2601
2602         * optflags-def.h: Optimization flag (gshared) for enabling generic
2603         method sharing added.
2604
2605         * Makefile.am: generic-sharing.c added.
2606
2607 2007-09-19 Daniel Nauck <dna@mono-project.de>
2608
2609         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
2610
2611 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
2612         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
2613         fixes bug 325507.
2614
2615 2007-09-19  Martin Baulig  <martin@ximian.com>
2616
2617         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
2618         mono_debug_cleanup() is now part of mono_cleanup().
2619
2620 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
2621
2622         * driver.c (mono_main): Fix a warning.
2623
2624 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
2625
2626         * aot-compiler.c: Optimize various parts when processing large assemblies.
2627         Fixes ##325568.
2628
2629         * mini.c (mono_patch_info_hash): Improve hash function.
2630
2631 2007-09-14  Jonathan Chambers <joncham@gmail.com>
2632
2633         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
2634         
2635         Code is contributed under MIT/X11 license.
2636
2637 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2638
2639         * mini.c (mini_init): Fix a leak.
2640
2641         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
2642
2643 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2644
2645         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
2646
2647 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2648
2649         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
2650
2651 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
2652
2653         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
2654         variance tests.
2655
2656         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
2657
2658         * mini.c (handle_alloc): Enable managed allocators in AOT code.
2659
2660         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
2661
2662         * aot-runtime.c (decode_patch_info): Ditto.
2663
2664 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2665
2666         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
2667         static case. Cache delegates in architecture specific code, 
2668         based on number of parameters.
2669         
2670         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
2671         in architecture specific code, based on number of parameters.
2672         
2673         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
2674         caching happen in architecture specific code now.
2675         
2676         Code is contributed under MIT/X11 license.
2677
2678 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2679
2680         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
2681         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
2682         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
2683
2684         Code is contributed under MIT/X11 license.
2685
2686 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
2687         * mini.c: (mono_thread_abort) Fixed bug #82416.
2688
2689 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2690
2691         * mini.: hook the new managed GC allocation feature into the JIT.
2692
2693 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2694
2695         * mini.c: implementation for the new runtime tls opcode.
2696
2697 2007-09-11  Martin Baulig  <martin@ximian.com>
2698
2699         * debug-debugger.h
2700         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
2701         `mono_method_inflated_offset'.
2702
2703 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
2704
2705         * driver.c mini.h mini.c: Add a new devel command line option for injecting
2706         async exceptions into a method.
2707
2708         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
2709         purpose of testing whenever the unwinder works at every instruction.
2710
2711 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
2712
2713         * mini.c: check accessibility of method used in ldftn (fixes
2714         bug #82635).
2715
2716 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
2717
2718         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
2719
2720         * inssel.brg: Fix a warning.
2721
2722 2007-09-03  Martin Baulig  <martin@ximian.com>
2723
2724         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
2725         now takes the `main_method' as argument.
2726
2727 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
2728
2729         * cpu-sparc.md (endfilter): Add missing src1:i argument.
2730
2731 2007-08-30  Jonathan Chambers <joncham@gmail.com>
2732
2733         * driver.c: include the cil-coff.h header on Windows.
2734         
2735         Code is contributed under MIT/X11 license.
2736
2737 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2738
2739         * mini.c, driver.c: don't include the cil-coff.h header.
2740
2741 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2742
2743         * mini.c: flag places that needs fixes fo soft-float support.
2744
2745 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
2746
2747         * mini.h, inssel-float.brg: fix soft-float constant loads on big
2748         endian systems (partially from Dean Jenkins, bug #81924).
2749
2750 2007-08-28  Mark Probst  <mark.probst@gmail.com>
2751
2752         * mini.c (check_linkdemand): Remove embedded reference object in
2753         call to LinkDemandSecurityException.
2754         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
2755         with an IntPtr instead of a reference object.
2756
2757 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
2758
2759         * mini.c (handle_initobj): Handle alignment properly.
2760
2761         * inssel.brg (mini_emit_memset): Ditto. 
2762
2763         * inssel.brg (mini_emit_memcpy): Ditto. 
2764
2765         * inssel-sparc.brg: Ditto.              
2766
2767         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
2768
2769 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
2770
2771         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
2772         exceptions raised in unmanaged code. Fixes part of #82594.
2773
2774 2007-08-24  Mark Probst  <mark.probst@gmail.com>
2775
2776         * mini.c (mono_method_to_ir), declsec.c
2777         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
2778
2779 2007-08-22  Martin Baulig  <martin@ximian.com>
2780
2781         * debug-mini.h
2782         (MonoDebuggerThreadInfo): New typedef.
2783         (mono_debugger_thread_table): New global variable.
2784         (mono_debugger_thread_created): New public function.
2785         (mono_debugger_thread_cleanup): New public function.
2786
2787         * debug-debugger.h
2788         (MonoDebuggerInfo):
2789         - removed `get_current_thread' and `lookup_assembly'.
2790         - removed `data_table'.
2791         - added `thread_table'.
2792
2793         * mini.c
2794         (mono_thread_start_cb): Call mono_debugger_thread_created().
2795         (mono_thread_attach_cb): Likewise.
2796         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
2797         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
2798         initial domain.
2799
2800         * driver.c (mono_main): Move mono_debug_init() up, before calling
2801         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
2802
2803 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
2804
2805         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
2806         together when passing several arguments of type double (gives a small
2807         speedup and saves a few bytes of generated code).
2808
2809 2007-08-20  Jb Evain  <jbevain@novell.com>
2810
2811         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
2812
2813 2007-08-20  Jb Evain  <jbevain@novell.com>
2814
2815         * mini.c (mono_method_to_ir): throw MethodAccessException
2816         and FieldAccessException instead of InvalidProgramException.
2817
2818 2007-08-20  Mark Probst  <mark.probst@gmail.com>
2819
2820         * mini.c: CoreCLR security checks.
2821
2822         * mini.h: Removed MonoSecurityMode (moved to
2823         metadata/security-manager.h) and mono_security_mode global var
2824         (replaced by set/get functions in security-manager.h).
2825
2826         * driver.c: Added "core-clr-test" security mode for testing.  Used
2827         set-function for setting security mode.
2828
2829 2007-08-17  Mark Probst  <mark.probst@gmail.com>
2830
2831         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
2832         the new jit_info_table.
2833
2834         * driver.c: Test code for the new jit_info_table (enabled by the
2835         define MONO_JIT_INFO_TABLE_TEST).
2836
2837 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
2838
2839         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
2840         detection of call <REG> instruction sequence. Fixes build on freebsd.
2841
2842 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
2843
2844         * mini-exceptions.c: Fix a warning.
2845
2846 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
2847
2848         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
2849         stack overflow handling code on amd64 too.
2850
2851         * mini-exceptions.c (mono_setup_altstack): Make this use 
2852         mono_thread_get_stack_bounds ().
2853
2854         * mini-x86.h: Disable sigaltstack on solaris x86.
2855
2856 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
2857
2858         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
2859
2860 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
2861
2862         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
2863
2864 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
2865
2866         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
2867
2868         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
2869
2870 2007-08-03  Neale Ferguson <neale@sinenomine.net>
2871
2872         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
2873         due to alignment.
2874
2875 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2876
2877         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
2878         to be emitted (bug #82281).
2879
2880 2007-08-01  Martin Baulig  <martin@ximian.com>
2881
2882         Merged the `debugger-dublin' branch.
2883
2884         * debug-debugger.h (MonoDebuggerInfo):
2885         Removed the `old_*' compatibility entries.
2886         Added `debugger_version' and `data_table'.
2887         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
2888         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
2889
2890         * debug-mini.c
2891         (MiniDebugMethodBreakpointInfo): Add `address_list'.
2892         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
2893         instead of a `gconstpointer'.
2894         (mono_debugger_insert_method_breakpoint): Return a
2895         `MonoDebugMethodAddressList *'.
2896
2897 2007-06-28  Martin Baulig  <martin@ximian.com>
2898
2899         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
2900
2901 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
2902
2903         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
2904         __builtin_frame_address () since it is broken on older gcc versions.
2905
2906 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2907
2908         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
2909         on the stack overflow handling and made the managed stack overflows
2910         catchable in most cases using soft guard pages.
2911         * exceptions-x86.c: added code to restore the protection in the soft
2912         guard pages at the end of exception handling.
2913
2914 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
2915
2916         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
2917
2918 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2919
2920         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
2921         exception handling.
2922
2923 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2924
2925         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
2926         signal handling support until it has been ported to the new mechanism.
2927         * mini.c: fixed stack overflow detection and use the new
2928         architecture code  to handle signals on the altstack.
2929
2930 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
2931
2932         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
2933         stack overflows on the alt stack.
2934
2935 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
2936
2937         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
2938         stack overflows on the alt stack.
2939
2940 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
2941
2942         * exceptions-ppc.c: cleanup preparing for altstack support.
2943
2944 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
2945
2946         * exceptions-arm.c: cleanup preparing for altstack support.
2947
2948 2007-07-27  Mark Probst  <mark.probst@gmail.com>
2949
2950         * mini.c (print_jit_stats): Output hazard pointer stats.
2951
2952 2007-07-26  Mark Probst  <mark.probst@gmail.com>
2953
2954         * driver.c, mini.c: Replaced security mode flags with a single
2955         enum variable.
2956
2957 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2958
2959         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
2960
2961 2007-07-25  Mark Probst  <mark.probst@gmail.com>
2962
2963         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
2964         (which doesn't do anything yet) for activating Core CLR
2965         (Silverlight) security.
2966
2967 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
2968
2969         * mini-codegen.c: work around a possible gcc bug on arm.
2970
2971 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2972
2973         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
2974         message for platforms that don't support AOT compilation.
2975
2976 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2977
2978         * mini.h, mini.c, driver.c: temporary smcs hack.
2979
2980 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
2981
2982         * mini-arm.h, mini-arm.c: arm EABI fixes.
2983
2984 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
2985
2986         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
2987         case.
2988
2989         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
2990         trampolines taking a method argument.
2991
2992         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
2993
2994         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
2995         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
2996
2997         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
2998         JIT compilation throws an exception. Fixes #82050.
2999
3000 2007-07-19  Mark Probst  <mark.probst@gmail.com>
3001
3002         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
3003         with the MONO_EXCEPTION_ defines.
3004
3005 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
3006
3007         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
3008         #82117.
3009         
3010         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
3011         the cause of an assertion.
3012
3013 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
3014
3015         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
3016         removed.
3017
3018 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
3019
3020         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
3021         assert. Should fix #82103.
3022
3023 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
3024
3025         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
3026         here too. Fixes #82095.
3027
3028         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
3029         addresses.
3030
3031         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
3032
3033         * mini-amd64.h: Enable IMT for amd64.
3034         
3035         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
3036
3037 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
3038
3039         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
3040
3041 2007-07-12  Mark Probst  <mark.probst@gmail.com>
3042
3043         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
3044         as soon as check_linkdemand sets an exception_type.
3045
3046 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
3047
3048         * mini-x86.c: fixed offsets for IMT call sequence.
3049         * mini-x86.h: enable IMT again.
3050
3051 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
3052
3053         * trace.c (mono_trace_enter_method): Decode MonoType too.
3054
3055         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
3056
3057         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
3058
3059         * mini-amd64.c: Add preliminary IMT implementation.
3060         
3061 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
3062
3063         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
3064         understand the new IMT-base interface invocation (thanks to
3065         Daniel Nauck for the report and the remote debugging session).
3066
3067 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
3068
3069         * mini-x86.c: size and speed optimizations for the IMT bsearch.
3070
3071 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
3072
3073         * Makefile.am (aotcheck): Make this actually use the AOTed code.
3074
3075 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
3076
3077         * mini-trampolines.c: implement AOT IMT support.
3078         * mini-x86.h: enable IMT support for wider testing.
3079
3080 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3081
3082         * inssel.brg (emit_imt_argument): Add aot support here.
3083
3084         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
3085
3086 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3087
3088         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
3089         of the IMT implementation, partially from massi, with my
3090         implementation of the bsearch sequence. Disabled by default until
3091         the AOT code is implemented.
3092
3093 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3094
3095         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
3096
3097         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
3098
3099 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3100
3101         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
3102         arch-independent IMT JIT code from Massimiliano
3103         Mantione (massi@ximian.com) with small cleanups from me.
3104
3105 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3106
3107         * Makefile.am: fix svn invocation to get the svn revision to be
3108         independent of the local language (build fix).
3109
3110 2007-07-09  Mark Probst  <mark.probst@gmail.com>
3111
3112         * mini.c (inline_method): Reset cfg->exception_type if the
3113         inlining is aborted.  Fixes: 82049.
3114
3115 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
3116
3117         * mini.c: remove assert from exception handling code when exception_ptr
3118         is not set.
3119
3120 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3121
3122         * mini.c (mono_codegen): Add an assert.
3123
3124         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
3125         enter and leave code.
3126         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
3127
3128 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3129
3130         * mini-ppc.c: fixed memory corruption for localloc(0)
3131         (bug #81852).
3132
3133 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3134         
3135         * mini.c: Fix warnings.
3136
3137 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
3138
3139         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
3140         to emit better double->int conversions.
3141
3142 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
3143
3144         * mini.c: the provided Min/Max optimizations are valid for unisgned
3145         ints.
3146
3147 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
3148
3149         * 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
3150
3151 2007-06-28  Miguel de Icaza  <miguel@novell.com>
3152
3153         * mini.c (mono_running_on_valgrind): Add support for reporting the
3154         method and  its boundaries to valgrind.
3155
3156 2007-06-28  Martin Baulig  <martin@ximian.com>
3157
3158         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3159
3160 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
3161
3162         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
3163
3164         * generic.2.cs: Add new test case.
3165
3166 2007-06-25  Martin Baulig  <martin@ximian.com>
3167
3168         Merged the `debugger-dublin' branch.
3169
3170         * debug-mini.c
3171         (mono_debugger_insert_method_breakpoint): New public method.
3172         (mono_debugger_remove_method_breakpoint): Likewise.
3173         (mono_debugger_check_breakpoints): New static method.
3174         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
3175
3176         * debug-debugger.h (MonoDebuggerInfo):
3177         Renamed (to keep backward compatibility in the vtable):
3178         `insert_breakpoint' -> `old_insert_breakpoint'.
3179         `remove_breakpoint' -> `old_remove_breakpoint'.
3180         `create_string' -> `old_create_string'.
3181         `lookup_class' -> `old_lookup_class'.
3182         `lookup_type' -> removed; changed into a dummy field.
3183         `lookup_assembly' -> `old_lookup_assembly'.
3184         Added (same functionality, but different signature):
3185         `create_string', `lookup_class', `lookup_assembly'
3186         Added new:
3187         `get_method_addr_or_bpt', `remove_method_breakpoint',
3188         `runtime_class_init'.
3189
3190         * debug-debugger.c: Merged the `debugger-dublin' branch.
3191
3192 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
3193
3194         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
3195         well.
3196         (peephole_pass): Likewise.
3197
3198 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
3199
3200         * driver.c: hopefully make setaffinity work also for ancient
3201         versions of linux.
3202
3203 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
3204
3205         * driver.c : win32 build fix.
3206
3207 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3208
3209         * driver.c: check for the MONO_NO_SMP env var and bind to a single
3210         processor if it is set.
3211
3212 2007-06-21  Martin Baulig  <martin@ximian.com>
3213
3214         * debug-mini.h: New file.
3215
3216         * debug-mini.c
3217         (mono_debugger_insert_breakpoint_full): Moved here from
3218         ../metadata/mono-debug-debugger.c.
3219         (mono_debugger_remove_breakpoint): Likewise.
3220         (mono_debugger_breakpoint_callback): Likewise.
3221
3222 2007-06-15  Raja R Harinath  <rharinath@novell.com>
3223
3224         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3225         changes in MonoGenericClass.
3226
3227 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
3228
3229         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
3230
3231 2007-06-14  Raja R Harinath  <rharinath@novell.com>
3232
3233         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3234         removal of MonoGenericMethod.
3235
3236 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3237
3238         * mini-exceptions.c: hooks for the exception events profiling API.
3239
3240 2007-06-14  Randolph Chung  <tausq@debian.org>
3241
3242         * Makefile.ma: Add hppa target.
3243         * mini-arch.h: Include mini-hppa.h
3244         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
3245         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
3246         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3247
3248 2007-06-14  Randolph Chung  <tausq@debian.org>
3249
3250         * inssel.brg: Add rules for "chained" compare-branch operations so that
3251         a single compare op can affect multiple branches.  Adjust cost for
3252         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
3253         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
3254         cost for some rules so that they can more easily be overridden by
3255         per-arch rules (with fixes from lupus).
3256         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3257
3258 2007-06-13  Randolph Chung  <tausq@debian.org>
3259
3260         * mini-ops.h: Reorder branch ops so that they match the order of the
3261         corresponding CEE_* ops.  The code expects them this way.
3262         Add new ops for HPPA target.
3263         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3264
3265 2007-06-13  Randolph Chung  <tausq@debian.org>
3266
3267         * mini-exceptions.c: Handle cases where the stack grows towards
3268         larger addresses.
3269         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3270
3271 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
3272
3273         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
3274         counter.
3275         * driver.c: explain where a non-matching corlib is found.
3276
3277 2007-06-13  Mark Probst  <mark.probst@gmail.com>
3278
3279         * mini.c (print_jit_stats): Output dynamic code allocation stats.
3280
3281 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
3282
3283         * mini-exceptions.c: Generate a method profile leave event during
3284         an exception to ensure that the profiler gets notified.
3285
3286 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
3287
3288         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
3289         branch.
3290
3291         * cpu-amd64.md: Add long_and/or/xor opcodes.
3292
3293 2007-06-06  Wade Berrier  <wberrier@novell.com>
3294
3295         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
3296         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
3297         length of instruction shr_imm (expected 8, got 10)
3298
3299 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
3300
3301         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
3302
3303 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3304
3305         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3306         MonoInternalHashTable again (fixed bug in the internal hash table
3307         code).
3308
3309 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3310
3311         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
3312         Have to figure out what makes it crash the SWF regression.
3313
3314 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
3315
3316         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
3317
3318 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3319
3320         * mini.c: optimize out the type check when storing null in a
3321         reference array.
3322
3323 2007-06-04  Mark Probst  <mark.probst@gmail.com>
3324
3325         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3326         MonoInternalHashTable.
3327
3328 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
3329
3330         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
3331         signed integer methods.
3332
3333 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3334
3335         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
3336         permanently since the current approach doesn't work.
3337
3338 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3339
3340         * inssel.brg (stmt): Only call delegate->invoke_impl if 
3341         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
3342
3343 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3344
3345         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
3346         the sreg2==rdx case.
3347         
3348         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
3349         account if it contains a rex prefix.
3350         (peephole_pass): Handle OP_FMOVE as well.
3351
3352 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3353
3354         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
3355         as it causes regressions.
3356
3357 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
3358
3359         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
3360         static case as well.
3361
3362         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
3363
3364         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3365         (mono_arch_get_this_arg_from_call): Ditto.
3366
3367         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
3368
3369         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
3370         invoke_impl field.
3371
3372         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3373         (mono_arch_get_this_arg_from_call): Ditto.
3374
3375         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
3376         
3377         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
3378         try to create optimized invoke code and use that for further invocations. 
3379         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
3380
3381         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
3382
3383 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
3384
3385         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
3386         sealed classes or methods.
3387         *devirtualization.cs: tests for the new optimization
3388
3389 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
3390
3391         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
3392         by the update_volatile () function.
3393
3394 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
3395
3396         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
3397         require it.
3398
3399         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
3400
3401 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
3402
3403         * mini.c: Add configure checks for header files.
3404         * mini-x86.c: Add configure checks for header files.
3405         * trace.c: Add configure checks for header files.
3406         * aot-runtime.c: Add configure checks for header files.
3407         * aot-compiler.c: Add configure checks for header files.
3408         * driver.c: Add configure checks for header files.
3409         * mini-codegen.c: Add configure checks for header files.
3410         
3411         Code is contributed under MIT/X11 license.
3412
3413 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
3414
3415         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
3416         icompare_imm -128 + op_iclt. Fixes #81703.
3417
3418 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
3419
3420         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
3421
3422 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
3423
3424         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
3425         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
3426         so that all isinst checks now use "interface_bitmap".
3427
3428 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
3429
3430         * cpu-amd64.md (jmp): Fix a warning.
3431
3432         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
3433
3434         * basic.cs: Add new regression test.
3435
3436         * basic.cs: Remove test which is now in basic-long.cs.
3437
3438         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
3439
3440         * basic-long.cs: Add new test.
3441         
3442 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
3443
3444         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
3445
3446 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
3447
3448         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
3449
3450         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
3451         places.
3452         
3453         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
3454         throwing code a bit.
3455
3456         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
3457         the exception throwing code a bit.
3458
3459         * mini-x86.c (get_call_info): Allocate result from a mempool.
3460
3461 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
3462
3463         * aot-compiler.c (find_typespec_for_class): Fix the assert.
3464
3465         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
3466
3467         * mini.h (MonoCompile): Add 'token_info_hash' field.
3468
3469         * mini.c: Save token->method associations during compilation so the AOT 
3470         compiler can use it.
3471         
3472         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
3473         which reference generic classes and methods.
3474
3475 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
3476
3477         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
3478
3479         * aot-compiler.c (compile_method): Fix a typo in a comment.
3480
3481         * aot-runtime.c (decode_cached_class_info): Skip generic types.
3482
3483         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
3484         everything generic.
3485
3486         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
3487
3488 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
3489
3490         * mini.h (MonoCompile): Add 'args' field.
3491
3492         * mini.c (mono_compile_create_vars): Store variables representing the arguments
3493         into cfg->args.
3494
3495         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
3496
3497 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
3498
3499         * mini.c (mono_compile_get_interface_var): Remove this unused function.
3500
3501         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
3502
3503         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
3504         opcodes for some opcodes.
3505
3506         * mini.h *.brg *.c: Use the new opcodes.
3507
3508 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
3509
3510         * mini.h: Bumped aot revision.
3511
3512         * inssel.brg: modified code generation of type checks for interfaces
3513         to use the new "MonoClass.interface_bitmap" instead of the old
3514         "MonoClass.interface_offsets".
3515
3516 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
3517
3518         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
3519
3520 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
3521
3522         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
3523         64 bit platforms.
3524
3525 2007-04-27  Neale Ferguson <neale@sinenomine.net>
3526
3527         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
3528
3529 2007-04-27  Wade Berrier  <wberrier@novell.com>
3530
3531         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
3532         mini.h) to fix build.
3533
3534 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
3535
3536         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
3537         
3538         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
3539         causes the corlib unit tests to fail.
3540
3541 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
3542
3543         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
3544
3545         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
3546
3547         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
3548         opcodes to the comparison relations.
3549
3550         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
3551         opcodes to their types.
3552         
3553         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
3554
3555         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
3556         it in cfg->arch.cinfo.
3557
3558         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
3559
3560         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
3561         cfg->cil_offset_to_bb.
3562
3563 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
3564
3565         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
3566         created becase of initlocals.
3567
3568 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
3569
3570         * mini-alpha.c cpu-alpha.md: More alpha port work from 
3571         Sergey Tikhonov <tsv@solvo.ru>.
3572
3573 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
3574
3575         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
3576
3577 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
3578
3579         * cpu-s390.md (break): Correct the length of break instruction.
3580
3581 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3582
3583         * mini.c: fix a couple of soft-float issues and comments.
3584
3585 2007-04-15  Miguel de Icaza  <miguel@novell.com>
3586
3587         * trace.c (is_filenamechar): - is also a filename char.
3588
3589 2007-04-15  Neale Ferguson <neale@sinenomine.net>
3590
3591         * mini-s390.c: Correct checking for enum type in return value processing.
3592
3593 2007-04-14  Raja R Harinath  <rharinath@novell.com>
3594
3595         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
3596         (version.h): Makefile is in the build directory.
3597
3598 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
3599
3600         * mini-amd64.h: fix for assertion failure on Solaris/amd64
3601
3602 2007-04-11  Martin Baulig  <martin@ximian.com>
3603
3604         * mini.c (can_access_member): Fix handling of generic classes;
3605         fixes #81259.
3606
3607 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
3608
3609         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
3610
3611 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
3612
3613         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
3614
3615 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3616
3617         * mini-codegen.c: make sure the right spill amount is
3618         used for fp or integer registers (fixes the float_sub_spill() on ppc).
3619
3620 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
3621
3622         * mini-ppc.c: fixes for the fp_branch_nan test.
3623
3624 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
3625
3626         * basic.cs: Comment out new test which still fails on ia64.
3627
3628 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3629
3630         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
3631
3632 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3633
3634         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
3635
3636 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
3637
3638         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
3639         on 64 bit machines. Fixes part of #80738.
3640
3641         * basic.cs: Add regression test.
3642
3643 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3644
3645         * inssel.brg basic.cs: Revert previous change to fix build.
3646
3647         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
3648         platforms.
3649         
3650         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
3651
3652         * basic.cs: Add new regression test.
3653
3654 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3655
3656         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
3657         many arguments.
3658
3659 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3660
3661         * cpu-s390x.md: Correct length of break instruction.
3662
3663 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3664
3665         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
3666         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
3667
3668 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
3669
3670         * *.c: Begin WIN64 port.
3671         * mini.c:  Use correct register in profiler.
3672         * mini-amd64.c: No inline assembly on Win64.
3673         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
3674         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
3675         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
3676         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
3677         mono_arch_ip_from_context for Win64.
3678         
3679         Contributed under MIT/X11 license.
3680
3681 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
3682
3683         * exceptions-amd64.c (seh_handler): Ditto.
3684
3685         * exceptions-x86.c (seh_handler): Fix a memory leak.
3686
3687 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
3688
3689         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
3690         mini-s390x.c: fixed peephole optimizations to deal
3691         correctly with 1 and 2 byte reload avoidance.
3692
3693 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
3694
3695         * cpu-s390.md, cpu-s390x.md: update localloc length.
3696
3697 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3698
3699         * cpu-g4.md: added missing descriptions.
3700
3701 2007-03-14  Miguel de Icaza  <miguel@novell.com>
3702
3703         *  Makefile.am: Add support so the tail tests are not executed on
3704         PowerPC as that is a known limitation of the PowerPC port.
3705
3706 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3707
3708         * runmdesc.bat:  Move to msvc directory.
3709         
3710 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3711
3712         * runmdesc.bat:  Run executable that was produced by the current
3713         target and sent via an argument.
3714         
3715 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
3716
3717         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
3718         #81102.
3719
3720         * generics.2.cs: Add regression test.
3721
3722 2007-03-09  Wade berrier  <wberrier@novell.com>
3723
3724         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
3725
3726 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
3727
3728         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
3729         AOT code depends on this.
3730
3731 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3732
3733         * mini.c: more precise tracking of types in the eval stack
3734         (part of fix for bug #81044).
3735
3736 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
3737
3738         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
3739
3740         * aot-compiler.c (encode_patch): Remove an obsolete comment.
3741
3742 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
3743
3744         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
3745
3746         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
3747
3748 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
3749
3750         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
3751         a pointer on 64 bit systems. Fixes #80190.
3752
3753         * iltests.il: Add new regression test.
3754
3755 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3756
3757         * mini.c: inline a constant for Environment.IsRunningOnWindows.
3758
3759 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
3760
3761         * trace.c: Remove an erroneous alignemnt check when tracing.
3762           Fixes --trace on OSX86.
3763
3764 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3765
3766         * mini-$(arch).h: initialize SP in context for all the archs.
3767
3768 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
3769
3770         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
3771         regressions in the thread tests.
3772
3773 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
3774
3775         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
3776         - fixed implementation of LOCALLOC opcode
3777         - implemented non-un compare for floats
3778         - code cleanup
3779         - implementation of FDIV and CKFINITE opcodes
3780         - fixes for latest mono updates
3781         - additional arch opcodes
3782
3783 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3784
3785         * Makefile.am: simplify and merge rules for cross-compilation.
3786
3787 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
3788
3789         * local-propagation.c: Actually *apply* the fix for bug 80591...
3790
3791 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3792
3793         * mini-exceptions.c: backuot part of the last change
3794         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
3795
3796 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
3797         * inssel.brg: Fix bug 59286.
3798
3799
3800 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
3801
3802         * mini-exceptions.c: patch from Zoltan to correctly check for
3803         stack boundaries (using the stack register, not the frame register),
3804         fixes bugs #80724, #79717.
3805
3806 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
3807
3808         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
3809         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
3810
3811         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
3812         presence of frame pointer elimination.
3813
3814 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
3815         
3816         * mini-x86.h: NetBSD UCONTEX_REG defines.
3817
3818 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
3819
3820         * inssel-amd64.brg: Fix amd64 build.
3821
3822 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
3823
3824         * mini.h: remove extern to workaround what looks likes gcc bug 26905
3825         on amd64.
3826
3827 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
3828
3829         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
3830         ends.
3831
3832         * mini-<ARCH>.c: Use mono_is_regsize_var ().
3833
3834 2007-01-30 Mark Mason <mason@broadcom.com>
3835
3836            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
3837            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
3838            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
3839            beginning support for CEE_JMP [not quite working yet]
3840            * tramp-mips.c: LMF handling now works
3841         
3842 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
3843
3844         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
3845
3846         * mini.h (NULLIFY_INS): New macro.
3847
3848 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3849
3850         * mini.c: statistical profiler fix for windows, patch
3851         from Tor Lillqvist (tml@novell.com).
3852
3853 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
3854         * local-propagation.c: Fix bug 80591.
3855
3856 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
3857
3858         * Makefile.am: put back the --export-dynamic option as with
3859         the previous gmodule flags (thanks to Robert Jordan).
3860
3861 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
3862
3863         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
3864
3865         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
3866         simplify and speed up the local register allocator. Also rename some fields
3867         like iassign->vassign.
3868         
3869         * regalloc.c: Remove some functions which are no longer used since their
3870         inlined version is in mini-codegen.c.
3871         
3872         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
3873
3874         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
3875
3876 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
3877
3878         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
3879         narrowing. Fixes #80622.
3880
3881         * iltests.il: Add new regresssion test. 
3882
3883 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3884
3885         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
3886         debug-debugger.c, debug-debugger.h: warning fixes.
3887         * driver.c: updated copyright year and made it fit in one line.
3888
3889 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
3890
3891         * aot-runtime.c: updated to use mono-dl instead of gmodule.
3892
3893 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
3894
3895         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
3896
3897         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
3898
3899         * iltests.il: Add new test for bug #80507.
3900
3901 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3902
3903         * mini-arm.h: use soft-float also on vfp for now.
3904
3905 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3906
3907         * mini.c: fix some more soft-float issues.
3908
3909 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
3910
3911         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
3912
3913 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
3914         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
3915         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
3916         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
3917
3918 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
3919
3920         * mini-arm.c: typo fix.
3921
3922 2007-01-23  Neale Ferguson <neale@sinenomine.net>
3923
3924         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
3925
3926 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
3927
3928         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
3929         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
3930
3931         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
3932
3933         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
3934
3935         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
3936         
3937         * inssel.brg: Fix a warning.
3938
3939         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
3940
3941         * abcremoval.c ssa.c ssapre.c: Update after this change.
3942         
3943         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
3944
3945         * dominators.c (df_set): Use mono_bitset_union_fast.    
3946
3947 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
3948
3949         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
3950         mini-codegen.c: reduce relocations and memory usage for the cpu
3951         description.
3952
3953 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
3954
3955         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
3956
3957         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
3958         to reduce their size.
3959
3960 2007-01-19 Mark Mason <mason@broadcom.com>
3961
3962         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
3963         * mini-mips.c: more configuration macros, support long conditional branches, additional
3964         asserts, fix epilog instrumentation.
3965         * mini-mips.h: use standard stack walk
3966         * cpu-mips.md: increase size of div, rem and conditional branches
3967         
3968 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
3969
3970         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
3971         to cpu spec data.
3972
3973 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
3974
3975         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
3976         (compile_method): Ditto.
3977
3978         * aot-runtime.c (decode_klass_info): Ditto.
3979
3980         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
3981         needed by the code generated by inssel.brg. Also fix a warning.
3982
3983 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
3984
3985         * mini.c: deal with enums that become genericinsts by
3986         being nested in a generic class (bug #79956).
3987
3988 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3989
3990         * mini.c: match the generic definition to check for
3991         private access with generic types (bug #78431).
3992
3993 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3994
3995         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
3996         to make life easier for people cross-compiling that insist on not
3997         using scratchbox.
3998
3999 2007-01-17 Mark Mason <mason@broadcom.com>
4000
4001         * inssel-long.brg: patch to deal with mips missing flags
4002         * inssel-long32-mips.brg: implement overflow checks
4003         * insset-mips.brg: implement overflow checks
4004         * mini-mips.h: implement conditional exception handling
4005         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
4006           Remove unused code, minor cleanups.
4007         * exceptions-mips.c: minor cleanups
4008         * mini-ops.h: add mips conditional exception ops
4009         * cpu-mips.md: add mips conditional exception ops
4010
4011         
4012 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
4013
4014         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
4015         to deal with mips missing of flags.
4016
4017 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
4018
4019         * exceptions-ppc.c: execute fault handlers.
4020
4021 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
4022
4023         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
4024
4025 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
4026
4027         * mini.c: handle also floating point values in initialize_array.
4028
4029 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
4030
4031         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
4032         array initialization and make it conditional on the intrins option.
4033
4034 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
4035
4036         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
4037         relocations and put the patch info names close to the enum definition.
4038
4039 2007-01-15 Mark Mason <mason@broadcom.com>
4040
4041         * basic.cs, exceptions.cs: break up large tests to increase debugability.
4042
4043 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4044
4045         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
4046
4047 2007-01-12  Raja R Harinath  <rharinath@novell.com>
4048
4049         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
4050
4051 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
4052
4053         * Makefile.am: distribute the mips sources.
4054
4055 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4056
4057         * mini-codegen.h: handle bug #80489 here, by excluding ecx
4058         directly.
4059
4060 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
4061
4062         * cpu-x86.md: back out for now as this triggers other regressions.
4063
4064 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
4065
4066         * cpu-x86.md: force src1 and dest regpair for long shift instructions
4067         to eax:edx, so ecx can't get allocated to them (bug #80489).
4068
4069 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
4070
4071         * mini.c, mini-exceptions.c: enabled running fault handlers
4072         (bug #80469).
4073
4074 2007-01-03  Miguel de Icaza  <miguel@novell.com>
4075
4076         * driver.c: If nothing fail, do not use the string "failed",
4077         because it makes it very annoying to view test result logs on the
4078         web. 
4079
4080 2006-12-30  Miguel de Icaza  <miguel@novell.com>
4081
4082         * debug-debugger.c (mono_debugger_main): Rename "main" to
4083         "main_method" to prevent a warning.
4084
4085         Remove a warning for unused field.
4086
4087 2006-12-28  Martin Baulig  <martin@ximian.com>
4088
4089         * debug-debugger.c
4090         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
4091
4092 2006-12-22  Martin Baulig  <martin@ximian.com>
4093
4094         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
4095         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
4096         seperate `.mdb_debug_info' section, so we can access it from the
4097         debugger even if the binary is stripped.
4098
4099         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
4100         from the `.mdb_debug_info' here to prevent the linker from
4101         removing that section.
4102
4103         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
4104         mdb-debug-info64.s.
4105
4106 2006-12-19  Robert Jordan  <robertj@gmx.net>
4107
4108         * mini-x86: enable the code to return small structures in
4109         registers for FreeBSD as well. Fixes bug #80278.
4110         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
4111
4112 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4113
4114         * mini-x86.c: align the stack when calling the profiler
4115         function instrumenting the prolog (on OSX).
4116
4117 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4118
4119         * mini.c: emit a break opcode where Debugger.Break () is called.
4120
4121 2006-12-13  Miguel de Icaza  <miguel@novell.com>
4122
4123         * mini.c (mono_method_to_ir): Provide useful information on this
4124         assert, to prevent others from debugging like I did.
4125
4126 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4127
4128         * mini.c: enable code which was incorrectly commented
4129         (bug #80235).
4130
4131 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4132
4133         * mini-x86.c: enable on OSX, too, the code to return small
4134         structures in registers.
4135
4136 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4137
4138         * mini-x86.c: remove the use of the dynamic code manager here, too.
4139
4140 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4141
4142         * mini.h, debug-debugger.c, tramp-*.c: fixed 
4143         mono_debugger_create_notification_function() to use
4144         mono_global_codeman_reserve () instead of a dynamic code manager.
4145
4146 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4147
4148         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
4149         ves_array_element_address() jit icall and use a generated
4150         managed method instead (which is about 4 times faster for a rank 3
4151         array access).
4152
4153 2006-11-29  Mark Mason  <mason@broadcom.com>
4154
4155         * basic-calls.cs: additional tests for passing
4156         structures as function arguments.
4157
4158 2006-11-29  Mark Mason  <mason@broadcom.com>
4159
4160         * mini-mips.h: disable custom exception handling
4161         * mini-mips.c: throw/rethrow should use jalr to call
4162         exception stubs.  Fixed bug with passing structures
4163         by value. More support for tracing floating point
4164         functions.
4165
4166 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4167
4168         * mini.c: fixed typo in the soft-float ldind.r4 handling
4169         (bug #80086).
4170
4171 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4172
4173         * mini.c, mini.h, driver.c: added --runtime command line
4174         option to select a different runtime than the autodetected one.
4175         * jit.h: added API for embedders to initialize with a specific
4176         runtime version.
4177
4178 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
4179
4180         * mini.c: handle also boxing of r4 values (bug #80024).
4181
4182 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4183
4184         * mini-ppc.c: force indirect calls until we reserve
4185         enough address space for all the generated code.
4186
4187 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
4188
4189         * exceptions-arm.c: workaround bugs in the libc definition
4190         of struct ucontext.
4191
4192 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
4193
4194         * inssel.brg: fixes from me and Mark Mason.
4195
4196 2006-11-23  Dick Porter  <dick@ximian.com>
4197
4198         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
4199         semaphore display now we've fixed the initial value
4200
4201 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4202
4203         * inssel.brg: partially revert the last change to fix the build.
4204
4205 2006-11-21  Mark Mason  <mason@broadcom.com>
4206
4207         * inssel.brg: Add and use compare-and-branch macros to support
4208         architectures that do not have condition code registers (ie. MIPS).
4209         * *-mips.{c,brg,md}: Fix copyright statements
4210
4211 2006-11-20  Mark Mason  <mason@broadcom.com>
4212
4213         * Makefile.am: remove mini-codegen.c from list of MIPS sources
4214         * mini.c: Allow GET_CONTEXT to be specified by the arch port
4215         * mini.h: Added declaration for mono_print_ins()
4216         * mini-codegen.c: added ins_spec initializer for MIPS
4217         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
4218         vreg to be virtual and hreg to be non-virtual.
4219         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
4220         is not yet working/implemented correctly.
4221         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
4222         non-static, fixup calls to print_ins() from other parts in the file.
4223
4224 2006-11-20  Mark Mason  <mason@broadcom.com>
4225
4226         * basic-calls.cs: added tests for passing structures as arguments
4227         to calls.
4228
4229 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
4230
4231         * inssel-long32.brg: optimize signed division by power of two.
4232
4233 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4234
4235         * mini-arm.c: added support for interworking with thumb code
4236         (mono must be still be built using the ARM instruction encoding).
4237
4238 2006-11-19  Miguel de Icaza  <miguel@novell.com>
4239
4240         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
4241         verifier has different rules for it.   Fixes a few verifier issues
4242         in the test suite.
4243
4244         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
4245         at the end, so people know what happened.
4246
4247 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
4248
4249         * brach-opts.c: in optimize_exception_target() make sure we
4250         are in a catch clause (fixes bug #79871).
4251
4252 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4253
4254         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
4255         more soft-float support fixes.
4256
4257 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
4258
4259         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
4260         that are passed half on the stack and half in registers.
4261
4262 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
4263
4264         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
4265         more mips integration work from Mark E Mason 
4266         <mark.e.mason@broadcom.com>.
4267
4268 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4269
4270         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
4271         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
4272         tramp-mips.c: added sources for the mips port, not
4273         integrated in the build yet. Contributed by
4274         Mark E Mason <mark.e.mason@broadcom.com>.
4275
4276 2006-11-14  Neale Ferguson <neale@sinenomine.net>
4277
4278         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
4279
4280 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4281
4282         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
4283         put the soft-float rules in its own file since it seems to
4284         break s390 compilation.
4285
4286 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4287
4288         * mini-arm.c: fixed wrnings.
4289
4290 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
4291
4292         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
4293         inssel-arm.brg: ARM support for soft-float.
4294
4295 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4296
4297         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
4298         loads and stores of 32 bit fp values.
4299
4300 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
4301
4302         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
4303
4304         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
4305         works. Fixes #79852 and #79463.
4306
4307 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4308
4309         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
4310         more soft-float support WIP and fixes.
4311
4312 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
4313
4314         * mini-arm.c: some VFP updates.
4315
4316 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4317
4318         * mini-exceptions.c: 0 is a valid local var offset in some
4319         architectures, don't assert (bug #78508).
4320
4321 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
4322
4323         * exceptions-arm.c: fixed off by one error in stack walk code.
4324
4325 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
4326
4327         * mini.h, mini.c: more precise tracking of type load exceptions.
4328
4329 2006-11-03  Robert Jordan  <robertj@gmx.net>
4330
4331         * Makefile.am: [WIN32] Add monow.exe target.
4332         * driver.c: [WIN32] Don't detach the console when debugging.
4333         Fixes bug #79797.
4334         
4335 2006-10-30  Miguel de Icaza  <miguel@novell.com>
4336
4337         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
4338
4339 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
4340
4341         * aot-compiler.c (emit_method_info): Add a case missed earlier.
4342
4343         * driver.c (mini_regression): Fix --regression with AOT.
4344
4345         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
4346
4347 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
4348
4349         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
4350
4351         * mini-sparc.h: Don't use sigaction on sparc/linux.
4352
4353         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
4354
4355         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
4356
4357         * mini-exceptions.c: Add proper include files for getpid ().
4358
4359 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
4360
4361         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
4362         address instead of a MonoJitInfo* to avoid decoding the exception info for the
4363         method.
4364
4365         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
4366         name cache to reduce its size.
4367
4368         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
4369
4370 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
4371
4372         * mini-x86.c: Save/restore the current LMF structure more efficiently using
4373         the mono_lmf TLS variable.
4374
4375         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
4376         trampoline lmf frames.  
4377
4378         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
4379
4380 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
4381
4382         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
4383         the mono_lmf TLS variable.
4384
4385         * mini-exceptions.c: Access the LMF structure through accessors.
4386
4387         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
4388         variable instead of in jit_tls->lmf.
4389
4390         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
4391         
4392         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
4393         trampoline lmf frames.
4394
4395         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
4396
4397 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
4398
4399        * mini.c trace.c mini-x86.c: Revert these too.
4400         
4401        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
4402        signature change.
4403
4404 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
4405
4406         * genmdesc.c: removed now dead code.
4407
4408 2006-10-09  Robert Jordan <robertj@gmx.net>
4409
4410         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
4411
4412 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
4413
4414         * mini.h: do not leave gaps in the opcode values.
4415
4416 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
4417
4418         * jit-icalls.h: flag functions as internal here, too.
4419
4420 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
4421
4422         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
4423         functions with the internal attribute.
4424
4425 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
4426
4427         * aot-compiler.c: fclose the file descriptor in the profile read loop.
4428
4429 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
4430
4431         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
4432         for soft-float.
4433
4434 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
4435
4436         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
4437         tail calls as on other platforms.
4438
4439         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
4440
4441         * iltests.il: Add a few tailcall tests.
4442
4443 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4444
4445         * driver.c: fix loop for old compilers (bug #79521).
4446
4447 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
4448
4449         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
4450
4451         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
4452
4453         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
4454         metadata without any code.
4455
4456         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
4457         more precise debugging information using gdb.
4458
4459 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
4460
4461         * inssel-ia64.brg: Make the helper methods static.
4462
4463 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4464
4465         * inssel-x86.brg: make the helper methods static.
4466
4467 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
4468
4469         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
4470
4471 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4472
4473         * mini.c: updates for monoburg changes.
4474         * inssel.brg: make a few helper functions static as they should.
4475
4476 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
4477
4478         * Makefile.am: Move mini-codegen.c to common_sources.
4479
4480 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4481
4482         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
4483         instructions.
4484         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
4485         mini-ppc.h: port to use the common local register allocator.
4486
4487 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4488
4489         * mini.h: Remove the comment too then.
4490
4491 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
4492
4493         * mini.h: put back backend.data which is to be used shortly and
4494         doesn't increase the size of MonoInst. If any 64 bit arch aligned
4495         pointers on 4 byte boundaries it'd have much bigger issues running
4496         and you can ifdef it out anyway.
4497
4498 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4499
4500         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
4501         MonoInst size by 4 bytes on 64 bit machines.
4502
4503 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4504
4505         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
4506         replacement with more meaningful field names. Arch maintainers, please
4507         check the assigned names are good enough for your arch.
4508
4509 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4510
4511         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
4512         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
4513
4514 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
4515
4516         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
4517         relocations and memory requirements, put the optimization flags
4518         definitions in their own file.
4519
4520 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
4521
4522         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
4523
4524         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
4525
4526 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
4527
4528         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
4529
4530 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
4531
4532         * inssel.brg: use the correct function to get the size of an item
4533         in an array, given an element class.
4534         * aot-compiler.c: do not access class->class_size directly.
4535
4536 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4537
4538         * mini.h, debug-mini.c: added a debugging function to print
4539         info about local variables and arguments in a jitted method.
4540
4541 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
4542
4543         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4544
4545         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
4546
4547 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4548
4549         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
4550         inner and outer loops when passing vtypes.
4551
4552 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
4553
4554         * mini-ppc.c: take into account the cpu errata for cache flushing
4555         which caused some random errors (bug #79381).
4556
4557 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4558
4559         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
4560         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
4561
4562 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
4563
4564         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
4565         loaded.
4566
4567         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
4568         freebsd ports tree.
4569
4570         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
4571         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
4572
4573         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
4574         displacement.
4575
4576 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
4577
4578         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
4579
4580 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
4581
4582         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
4583         macro does not have to be changed during debugging.
4584
4585         * 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>.
4586
4587         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
4588
4589         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
4590         
4591         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
4592         MONO_ARCH_NO_EMULATE_MUL is defined.
4593
4594         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
4595
4596         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
4597
4598         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
4599
4600         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
4601         
4602 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
4603
4604         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
4605         stuff to mini-exceptions.c where it is used.
4606
4607         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
4608         setup code, the real one is in mini-exceptions.c.
4609
4610         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
4611         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
4612         some changes from the freebsd ports tree.
4613
4614         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
4615         constants.
4616         
4617         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
4618
4619 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
4620
4621         * mini.c: on Linux, check for /proc to be mounted
4622         (bug# 79351, novell bug#201204).
4623
4624 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
4625
4626         * mini.c: handle cases where pthread_attr_getstack() behaves
4627         incorrectly (bug #78096).
4628
4629 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
4630
4631         * mini-arm.c: support larger stack frames (bug #79272).
4632
4633 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
4634
4635         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
4636
4637         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
4638         tokens.
4639
4640         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
4641         mono_class_from_name () to find a class from its name.
4642
4643         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
4644
4645 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
4646
4647         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
4648
4649 2006-09-05  KornĂ©l Pál  <kornelpal@gmail.com>
4650
4651         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
4652
4653 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
4654
4655         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
4656         callinfo->trampoline.
4657
4658         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
4659         fixes #79271.
4660         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
4661         future.
4662
4663 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
4664
4665         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
4666
4667 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
4668
4669         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
4670         stats.method_trampolines, it is already done by the generic trampoline code.
4671
4672         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
4673         
4674 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
4675
4676         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
4677
4678         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
4679
4680         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
4681
4682         * mini.c (print_jit_stats): Print mscorlib mempool size too.
4683         
4684         * mini.c (print_jit_stats): Print new stats.
4685
4686         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4687
4688 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
4689
4690         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
4691         Address on two dimensional arrays. Fixes #78729.
4692
4693         * mini.h (MonoCompile): Add a 'skip_visibility' field.
4694
4695         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
4696         a method.
4697
4698         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
4699
4700         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
4701         #79130.
4702         
4703         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
4704         a race condition.
4705         (mini_get_ldelema_ins): Ditto.
4706
4707 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
4708
4709         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
4710         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
4711         Fixes #79213.
4712
4713 2006-08-29 Neale Ferguson <neale@sinenomine.net>
4714
4715         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
4716         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
4717
4718         * exceptions-s390x.c: Cosmetic change.
4719
4720         * tramp-s390.c: Fix warning.
4721
4722         * cpu-s390.md: Correct length of mul_imm.
4723
4724 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
4725
4726         * aot-compiler.c: added binary writer with ELF backend
4727         implementation (only on Linux/x86 for now).
4728
4729 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4730
4731         * Makefile.am: Don't run net 2.0 AOT tests.
4732
4733         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
4734         (mono_compile_assembly): Skip net 2.0 assemblies as well.
4735
4736         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
4737
4738 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
4739
4740         * aot-compiler.c: simplified and refactored the asm-writing code
4741         to allow different backends.
4742
4743 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4744
4745         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4746
4747         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
4748         little. Share patches of type TYPE_FROM_HANDLE as well.
4749
4750         * mini.c (mono_patch_info_equal): New helper function.
4751         (mono_patch_info_hash): Ditto.
4752
4753         * aot-compiler.c (emit_method_code): Fix s390 build.
4754
4755         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
4756         is not handled because it is stored as a flag and not as a type ctor. Fixes
4757         #79016.
4758
4759 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
4760
4761         * aot-compiler.c: Fix computation of GOT slot statistics.
4762         
4763         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
4764         Also remove support for not PIC AOT.
4765
4766         * mini.h: Bump AOT file format version.
4767
4768         * objects.cs: Add a test for #78990.
4769
4770         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
4771         (peter.dettman@iinet.net.au). Fixes #79087.
4772
4773         * basic-long.cs: Add a test for the above.
4774
4775 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
4776
4777         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
4778         
4779         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
4780         code somewhat.
4781
4782 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
4783
4784         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
4785         exceptions.
4786
4787 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
4788
4789         * mini.c: Don't verify COM proxy invoke calls
4790         
4791
4792 2006-08-10  Dick Porter  <dick@ximian.com>
4793
4794         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
4795         which process is holding semaphores locked.
4796
4797 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
4798
4799         * mini-ia64.c mini-amd64.c: Fix #79027.
4800
4801         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
4802
4803         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
4804
4805         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
4806         implicit arguments in a vararg call. Fixes #79027.
4807
4808 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
4809
4810         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
4811         (mono_get_array_new_va_signature): Ditto.
4812
4813 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
4814
4815         * aot-runtime.c: Call init_plt lazily.
4816
4817         * inssel-long.brg: Fix unsigned long->int conversion.
4818
4819         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
4820
4821         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
4822         that most data is now in the .rss/.data section.
4823
4824 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
4825
4826         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
4827
4828         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
4829
4830         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
4831
4832         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
4833
4834         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
4835         virtual call. Fixes #79010.
4836
4837         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
4838         and use the result as the this argument in the real call.
4839
4840         * generics.2.cs: Add a new test for #79010.
4841         
4842 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
4843
4844         * mini-x86.c: Fix a warning.
4845
4846         * aot-compiler.c: Add a bunch of statistics.
4847
4848         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
4849
4850 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
4851
4852         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
4853
4854 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
4855
4856         * 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>.
4857
4858 2006-07-13  Miguel de Icaza  <miguel@novell.com>
4859
4860         * mini.c (mono_method_to_ir): Obtain the original method in the
4861         CIL stream and use this to perform validation.
4862
4863         Fixed: #78816
4864
4865 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
4866
4867         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
4868         (mono_arch_call_opcode): Ditto.
4869
4870         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
4871         #78826.
4872
4873         * mini.c (mono_patch_info_dup_mp): New helper function.
4874         
4875         * aot-compiler.c (compile_method): Fix some of the memory allocated during
4876         compilation. Fixes #78827.
4877
4878 2006-07-18  KornĂ©l Pál  <kornelpal@gmail.com>
4879
4880         * declsec.c: Use original security informations for
4881           MONO_WRAPPER_MANAGED_TO_MANAGED.
4882
4883 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
4884
4885         * mini.c: Allow Com Interop methods/classes and
4886         don't verify COM wrapper calls
4887         
4888
4889 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
4890
4891         * inssel-long32.brg: Fix long->i4 checked conversion.
4892
4893         * exceptions.cs: Add a test for the above.
4894
4895 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
4896
4897         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
4898
4899         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
4900         leaks.
4901
4902         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
4903         #78775.
4904
4905 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
4906
4907         * mini.c: Fix solaris/x86 exception handling.
4908
4909         * Makefile.am: Get rid of $(ICU_LIBS).
4910
4911 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
4912
4913         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
4914         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
4915         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
4916
4917         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
4918
4919         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
4920         this function causes a SIGSEGV.
4921
4922 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
4923
4924         * mini.c: Remove unused solaris/x86 includes.
4925
4926 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
4927
4928         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
4929
4930 2006-06-20  Jb Evain  <jbevain@gmail.com>
4931
4932         * cpu-g4.md: fix max length of start_handler instruction.
4933
4934 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
4935         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
4936
4937 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
4938         * ssa.c: Fixed bug 78653 for SSA based deadce.
4939         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
4940         MonoInst.flags, used in SSA based deadce.
4941         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
4942         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
4943
4944 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
4945
4946         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
4947         it can end up using non executable memory on ppc64 systems
4948         running ppc32 userspace (fix from Johannes Berg).
4949
4950 2006-06-14  Dick Porter  <dick@ximian.com>
4951
4952         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
4953         4.1.1
4954
4955 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
4956         * mini.c: Made so that inline is locally disabled if it would
4957         trigger a .cctor, because too many apps depend on this behavior
4958         (which seems to be also the one of the MS CLR).
4959
4960 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
4961
4962         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
4963         No idea why this worked before.
4964
4965         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
4966         which branch to outer exception clauses since they could skip the
4967         inner finally clauses. Fixes #78633.
4968
4969         * exceptions.cs: Add a test for the above.
4970
4971         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
4972         Fixes #78629.
4973
4974         * iltests.il: Add a test for the above.
4975
4976 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
4977
4978         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
4979         after the end of a try bblock, to prevent asserts in mini_method_compile ().
4980
4981         * iltests.il: Add a test for the above.
4982
4983 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
4984
4985         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
4986         
4987         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
4988         methods as instrinsics.
4989
4990 2006-06-09  Wade Berrier <wberrier@novell.com>
4991
4992         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
4993         (simple-cee-ops.h ssapre-mini-ops.h)
4994
4995 2006-06-09  Neale Ferguson <neale@sinenomine.net>
4996
4997         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
4998         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
4999         instruction).
5000         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
5001         * cpu-s390x.md: Fix max. length values for a couple of instructions.
5002
5003 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
5004
5005         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
5006
5007 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
5008
5009         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
5010         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
5011         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
5012         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
5013         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
5014         of opcodes, so that bug 78549 should not happen again.
5015         * ssapre.c: Updated to use the renamed files.
5016
5017 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
5018
5019         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
5020         in OP_ATOMIC_EXCHANGE_I4.
5021
5022 2006-06-07  Wade Berrier <wberrier@novell.com>
5023
5024         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
5025         in mono_debugger_create_notification_function)
5026
5027 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
5028
5029         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
5030         
5031         * mini.c (type_from_stack_type): Disable some changes which do not
5032         seem to work.
5033
5034         * driver.c: Reenable opts.
5035
5036         * mini.h (MonoStackSlot): New structure to keep track of the verification state
5037         of the evaluation stack.
5038         
5039         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
5040         evaluation stack trace at entry to the bblock.
5041
5042         * mini.c (merge_stacks): New function to perform verification of stack merges.
5043         Turned off by default.
5044
5045         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
5046         STACK_MP.
5047         
5048 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
5049
5050         * local-propagation.c: Fixed bug 78549.
5051
5052 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
5053
5054         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
5055
5056 2006-06-02  Miguel de Icaza  <miguel@novell.com>
5057
5058         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
5059         tramp-arm.c, tramp-ia64.c
5060         (mono_debugger_create_notification_function): Update signature to
5061         new signature and use new protocol for creating the notification
5062         function.  
5063
5064         Should fix the build.
5065
5066 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
5067
5068         * exceptions-ppc.c (mono_jit_walk_stack)
5069         (ves_icall_get_frame_info): Fix the build
5070
5071 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
5072
5073         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
5074
5075 2006-05-31  Raja R Harinath  <rharinath@novell.com>
5076
5077         * il2tests.2.il: New file for generics CIL tests.  Add test for
5078         #78019.
5079         * Makefile.am: Update.
5080
5081         Fix #78019
5082         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
5083         to nullable types.
5084
5085 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
5086
5087         * aliasing.c: Fixed bug 78311.
5088
5089 2006-05-29  Martin Baulig  <martin@ximian.com>
5090
5091         * mini-exceptions.c (mono_find_jit_info): When computing the
5092         native offset, check whether we're actually inside the method's
5093         code; call mono_debug_print_stack_frame() to format the frame.
5094         (ves_icall_System_Exception_get_trace): Call
5095         mono_debug_print_stack_frame() to format the stack frame.
5096         (ves_icall_get_trace): Update to the new debugging API.
5097         (mono_jit_walk_stack_from_ctx): Likewise.
5098         (ves_icall_get_frame_info): Likewise.
5099
5100         * mini.c (get_method_from_ip): Use the new debugging API.
5101         (mono_print_method_from_ip): Likewise.
5102
5103         * exceptions-ppc.c
5104         (mono_jit_walk_stack): Use the new debugging API.
5105         (ves_icall_get_frame_info): Likewise.   
5106
5107 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
5108
5109         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
5110
5111 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
5112
5113         * mini.c: Added "limitator" to inline for debugging.
5114
5115 2006-05-24  Martin Baulig  <martin@ximian.com>
5116
5117         * debug-debugger.c (mono_debugger_init): Create a private,
5118         malloc()-based code manager for the notification function and
5119         intentionally leak it on exit.  This fixes the crash-on-exit race
5120         condition.
5121
5122         * tramp-amd64.c
5123         (mono_debugger_create_notification_function): Added
5124         `MonoCodeManager *' argument.
5125
5126         * tramp-x86.c
5127         (mono_debugger_create_notification_function): Added
5128         `MonoCodeManager *' argument.
5129
5130 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
5131
5132         * aliasing.c: Fixed 64 bit issue.
5133         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5134         default since all known bugs are fixed (one more time!).
5135
5136 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
5137
5138         * mini.c: write barrier support.
5139
5140 2006-05-23  Martin Baulig  <martin@ximian.com>
5141
5142         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
5143         check at the top of the file.
5144
5145 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
5146
5147         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
5148         reverting changes without reason and without changelog entries.
5149
5150 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
5151
5152         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
5153         to a few opcodes. Fixes #78439.
5154
5155         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
5156         consistency with other archs.
5157
5158         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
5159
5160 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5161
5162         * debug-debugger.c: fix the build.
5163
5164 2006-05-17  Martin Baulig  <martin@ximian.com>
5165
5166         * debug-debugger.c
5167         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
5168         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
5169         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
5170         (debugger_attach): Call GC_mono_debugger_add_all_threads().
5171
5172 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
5173
5174         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
5175
5176 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
5177
5178         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
5179         MONO_TYPE_GENERICINST.
5180         
5181         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
5182         MONO_TYPE_GENERICINST.
5183
5184 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
5185
5186         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
5187         #78325.
5188
5189 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
5190
5191         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
5192         mempool.
5193         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
5194
5195 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
5196
5197         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
5198         mono_trace_cleanup ().
5199
5200         * iltests.il: Fix problem with the newly added test.
5201
5202         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
5203         due to register constraints, free up the previous hreg. Fixes #78314.
5204
5205         * iltests.il: Add new test for #78314.  
5206
5207         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
5208         Interlocked.Add. Fixes #78312.
5209
5210         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
5211         
5212 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
5213
5214         * inssel.brg (mini_emit_virtual_call): Fix a warning.
5215
5216 2006-05-05  Martin Baulig  <martin@ximian.com>
5217
5218         * debug-mini.c (mono_debug_open_block): New method.
5219
5220         * mini-amd64.c
5221         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5222         the beginning of each basic block.
5223
5224         * mini-x86.c
5225         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5226         the beginning of each basic block.
5227
5228 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5229
5230         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5231         default until I understand why they break the build on amd64.
5232
5233 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
5234
5235         * mini.c (mini_cleanup): Call mono_cleanup ().
5236
5237         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
5238         errors.
5239
5240 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5241
5242         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
5243         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5244         default since all known bugs are fixed, and I cannot reproduce bug
5245         77944... I'm asking Matt Hargett to test again after this commit.
5246
5247 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
5248
5249         * mini-codegen.c: Fixed typo that thrashed inline.
5250
5251 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
5252
5253         * dominators.c (compute_dominators): Avoid using a worklist since
5254         it is not correct in some cases. Instead, iterate over all bblocks as
5255         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
5256
5257 2006-04-28  Miguel de Icaza  <miguel@novell.com>
5258
5259         * mini.c (mono_jit_compile_method_inner): Use
5260         mono_prepare_exception_from_error that resets the value
5261         internally.
5262
5263 2006-04-27  Miguel de Icaza  <miguel@novell.com>
5264
5265         * mini.c: Move the mini_loader_error_to_exception to metadata. 
5266         
5267 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5268
5269         * aliasing.c: Fixed bug 78210.
5270
5271 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5272
5273         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5274         default until all their problems (or the ones they trigger) are fixed.
5275
5276 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
5277
5278         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
5279         
5280         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
5281         as loaded only after resolving patches since that could invoke the same method.
5282
5283         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
5284
5285         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
5286         functions.
5287
5288         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
5289         AOT loader.
5290
5291         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
5292         stack.
5293
5294         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
5295         made from AOT code through the PLT table.
5296
5297         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
5298         holding the plt offset when a call is made to the aot plt trampoline.
5299         
5300 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5301
5302         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
5303         amd64 AOT support.
5304
5305         * Makefile.am (common_sources): Fix build breakage.
5306
5307         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
5308         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
5309         intra-assembly calls if possible.
5310         
5311         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
5312
5313         * mini-trampolines.c: Handle PLT entries.
5314
5315         * mini.c: Avoid creating a GOT var for calls.
5316
5317         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
5318         from mscorlib code.
5319
5320         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
5321         from mscorlib code.
5322
5323         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
5324         AOT code.       
5325
5326         * mini.h: Bump AOT file format version.
5327         
5328         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
5329         covers more cases.
5330
5331 2006-04-25  Martin Baulig  <martin@ximian.com>
5332
5333         * driver.c: Disable copyprop, consprop and inline when running
5334         inside the debugger.
5335
5336 2006-04-25  Martin Baulig  <martin@ximian.com>
5337
5338         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
5339         with `get_current_thread' and added `detach'.
5340         (MonoDebuggerMetadataInfo): Added `thread_size',
5341         `thread_tid_offset', `thread_stack_ptr_offset' and
5342         `thread_end_stack_offset'.
5343
5344 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5345
5346         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
5347         aot-runtime.c.
5348
5349         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
5350         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
5351
5352         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
5353
5354         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
5355
5356         * aot.c: Add support for ADJUSTED_IID.  
5357
5358 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
5359
5360         * aot.c (emit_method_order): Don't align method_order_end.
5361
5362         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
5363         the interface ID changes.
5364
5365 2006-04-21  Dick Porter  <dick@ximian.com>
5366
5367         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
5368         cleaning up a thread.  Fixes the new part of bug 77470.
5369
5370 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
5371
5372         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
5373         to managed wrapper.
5374                      
5375 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
5376
5377         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
5378         
5379         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
5380         SIGSEGV. Fixes #78072.
5381
5382         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
5383         unregister our SIGABRT handler.
5384
5385 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
5386
5387         * mini.c: Disabled inline where it can alter the call stack in a
5388         way visible from managed code.
5389         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
5390         default.
5391
5392 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
5393
5394         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
5395         on other platforms. Fixes #78089.
5396
5397 2006-04-13  Martin Baulig  <martin@ximian.com>
5398
5399         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
5400         determine whether we're inside the debugger.
5401
5402         * debug-debugger.h
5403         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
5404
5405 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
5406
5407         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
5408         handler clauses. Fixes #78024.
5409
5410         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
5411         in the CALL_MEMBASE opcodes. Fixes #78088.
5412         (mono_arch_get_vcall_slot_addr): Ditto.
5413
5414 2006-04-10  Martin Baulig  <martin@ximian.com>
5415
5416         * debug-debugger.c: The thread handling code has now been moved
5417         into ../metadata/threads.c.
5418
5419 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5420
5421         * driver.c (mono_main): Fix --with-gc=none build.
5422
5423         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
5424         (mono_spillvar_offset_float): Ditto.
5425         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
5426         hreg, not when its !global, since on ia64, there is a third category: stacked
5427         registers.      
5428
5429 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
5430
5431         * mini.c: set MonoInst->klass for load field address and a few other
5432         places.
5433
5434 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5435
5436         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
5437
5438 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
5439
5440         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
5441         the branch opt changes.
5442
5443 2006-04-06  Dick Porter  <dick@ximian.com>
5444
5445         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
5446         
5447         * wapihandles.c (mini_wapi_seminfo): 
5448         * driver.c (mono_main): Add semaphore info option
5449
5450 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
5451
5452         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
5453         branch optimization changes. Fixes #78009.
5454
5455 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5456
5457         * mini.c: ignore accessibility of methods in managed->native wrappers.
5458
5459 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
5460
5461         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
5462         
5463         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
5464
5465 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
5466
5467         * mini.c: Modify the branch optimizations to preserve the invariant that
5468         the entries inside the in_bb and out_bb arrays are unique.
5469         (mono_unlink_bblock): Avoid creation of new arrays.
5470
5471 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
5472
5473         * mini.c (mono_unlink_bblock): Fix regression caused by previous
5474         change (#77992).
5475
5476 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
5477
5478         * mini.c (optimize_branches): Remove the "optimizations" in
5479         the cbranch1/cbranch2 -> branch cases which were causing several
5480         problems in the past. Fixes #77986.
5481
5482 2006-03-31  Chris Toshok  <toshok@ximian.com>
5483
5484         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
5485         default optimizations :(
5486
5487 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
5488
5489         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
5490         branch.
5491
5492 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
5493
5494         * local-propagation.c: Added comments to structs and removed
5495         "Mono" prefixes from local tree mover types.
5496
5497 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
5498
5499         * Makefile.am (arch_sources): Define this for each architecture so 
5500         libmono_la_SOURCES is defined in one place.
5501
5502 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
5503
5504         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
5505         from handles/.
5506
5507 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
5508
5509         * driver.c: print the GC name supplied by configure.
5510
5511 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
5512
5513         * local-propagation.c: Added tree mover, and moved here all the
5514         local propagation code from mini.c
5515         * mini.c: Added support for treeprop, and moved all the local
5516         propagation code to local-propagation.c
5517         * mini.h: Added support for treeprop
5518         * driver.c: Added support for treeprop, enabled consprop, copyprop,
5519         treeprop, inline and deadce by default
5520         * Makefile.am: Added local-propagation.c
5521
5522 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
5523
5524         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
5525
5526 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
5527
5528         * debug-debugger.c: make it compile without the Boehm GC.
5529
5530 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
5531
5532         * mini.c: fixed issue with mismatch when an icall is registered
5533         with multiple names but same address.
5534
5535 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5536
5537         * declsec.c, mini-exceptions.c: use write barrier to set reference
5538         fields of managed objects.
5539
5540 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5541
5542         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
5543         (can_access_internals): Fix a warning.
5544
5545         * mini.c (print_method_from_ip): Rename this to 
5546         mono_print_method_from_ip so it gets exported.
5547
5548         * trace.c: Deal with strings inside StringBuilder's containing garbage
5549         and fix memory leaks. Fixes #77848.
5550
5551 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5552
5553         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
5554         fixes #77787.
5555
5556 2006-03-16 Neale Ferguson <neale@sinenomine.net>
5557         
5558         * mini-s390.c: Remove OP_X86_TEST_NULL.
5559
5560 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5561
5562         * mini.c: use the correct GetHashCode() for the moving collector.
5563
5564 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
5565
5566         * liveness.c: Regalloc spill cost tuning.
5567
5568 2006-03-15 Neale Ferguson <neale@sinenomine.net>
5569         
5570         * mini-s390x.h: Correct S390_LONG macro.
5571
5572         * mini-s390x.c: Cleanup unused code.
5573
5574 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
5575
5576         * jit-icalls.h: New file.
5577
5578         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
5579         icalls and include that instead of including jit-icalls.c.
5580
5581         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
5582         OP_X86 opcodes.
5583
5584 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
5585
5586         * mini.c: when checking for member accessibility, also check for
5587         friend assemblies and for explicit interface implementations.
5588
5589 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
5590
5591         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
5592
5593         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
5594
5595         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5596         common cases are done first.    
5597
5598         * mini-ops.h: Only define platform specific opcodes on the given platform.
5599
5600         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
5601         branch.
5602         
5603 2006-03-14  Martin Baulig  <martin@ximian.com>
5604
5605         Revert Paolo's change from r57348:
5606
5607         * mini.h: don't use gboolean for bitfields.
5608         * mini.c: verifier changes for fields and methods accessibility.
5609
5610 2006-03-13  Neale Ferguson <neale@sinenomine.net>
5611
5612         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
5613
5614         * mini-s390x.c: Fix conv_r_un.
5615
5616         * cpu-s390, cpu-s390x.md: Fix lengths.
5617
5618 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
5619
5620         * mini.c: nested types have access to all the nesting
5621         levels, not just the enclosing types.
5622
5623 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5624
5625         * mini.c: added a few more verification checks.
5626
5627 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
5628
5629         * liveness.c: Merge optimizations from the linear-il branch.
5630
5631 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5632
5633         * mini-ia64.c (emit_call): Add a comment.
5634
5635         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
5636
5637         * tramp-ia64.c: Fix some warnings.
5638
5639 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
5640
5641         * mini.h: don't use gboolean for bitfields.
5642         * mini.c: verifier changes for fields and methods accessibility.
5643
5644 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5645
5646         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
5647         lazy icall wrapper changes.
5648
5649         * dominators.c: Replace all the dominator algorithms with faster
5650         ones from the linear-il branch.
5651
5652         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
5653         the mempool.
5654
5655         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5656         common cases are done first.
5657
5658         * mini-amd64.c: Fix some warnings.
5659
5660         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
5661         from the mempool.
5662
5663         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
5664         added code.
5665
5666         * mini.h: Add a missing prototype.
5667
5668 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
5669
5670         * mini.c: Compile icall wrappers lazily.
5671
5672         * mini-codegen.c: Use printf instead of g_print since its much faster.
5673
5674         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
5675         function.
5676
5677         * mini.c (optimize_branches): Cache the negative result from 
5678         remove_block_if_useless ().
5679
5680         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
5681         Also fix some bblock linking issues.
5682
5683         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
5684         assembly files.
5685
5686         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
5687
5688         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
5689         accessed fields first, for better cache behavior.
5690         
5691 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
5692
5693         * mini.c: speedup IList<T> array accesses.
5694
5695 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
5696
5697         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
5698         inline_costs counter. Fixes #77190.
5699
5700 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
5701
5702         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
5703         trace messages. Fixes #77706.
5704
5705 2006-03-04  Martin Baulig  <martin@ximian.com>
5706
5707         * tramp-amd64.c, tramp-x86.c
5708         (mono_debugger_create_notification_function): Use
5709         mono_global_codeman_reserve() to allocate a buffer at runtime and
5710         return it.
5711
5712         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
5713
5714         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
5715         notification function at runtime and then call `initialize' in the
5716         `MONO_DEBUGGER__debugger_info' vtable.
5717
5718 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
5719
5720         * iltests.il: Fix a visibility problem.
5721
5722 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5723
5724         * driver.c, mini.c: add hooks for the counters API.
5725
5726 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5727
5728         * driver.c: show disabled options.
5729
5730 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
5731
5732         * linear-scan.c: always use cost-driven selection.
5733
5734 2006-02-28  Raja R Harinath  <rharinath@novell.com>
5735
5736         * jit-icalls.c (helper_compile_generic_method): Revert change from
5737         2006-02-24.
5738
5739 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
5740
5741         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
5742
5743 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
5744
5745         * inssel.brg: style fixes, mostly to force the updated monoburg
5746         to run for people using svn.
5747
5748 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
5749
5750         * mini.c: match monoburg changes.
5751
5752 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5753
5754         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
5755         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
5756         declaration in the header file.
5757
5758 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
5759
5760         * helpers.c: reduce relocations and mem usage.
5761
5762 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
5763
5764         * mini.h, mini-codegen.c: disable logging features if
5765         requested by configure.
5766
5767 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
5768
5769         * mini.c: tiny verifier changes.
5770
5771 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5772
5773         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
5774         cpu-pentium.md: stack alignment changes for osx/x86,
5775         partially from Geoff Norton <gnorton@customerdna.com>.
5776
5777 2006-02-24  Raja R Harinath  <harinath@gmail.com>
5778
5779         * jit-icalls.c (helper_compile_generic_method): Update to changes
5780         in metadata/class.c.
5781
5782 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
5783         
5784         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
5785         
5786         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
5787         interface calls with large offsets.
5788
5789 2006-02-23  Raja R Harinath  <rharinath@novell.com>
5790
5791         * jit-icalls.c (helper_compile_generic_method): Document the
5792         special-case we depend on so that we can inflate the method twice
5793         with the same context with no bad side-effects.
5794
5795 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
5796
5797         * mini-x86.c, mini-amd64.c: fix for case when xen support
5798         is disabled.
5799
5800 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
5801
5802         * mini-x86.c, mini-amd64.c: generate code to access tls items
5803         in a faster way for Xen systems.
5804
5805 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5806
5807         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
5808         updates and compilation fixes for the OSX/x86 port, mostly from
5809         Geoff Norton <gnorton@customerdna.com>.
5810
5811 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
5812
5813         * inssel.brg: faster interface call implementation
5814         to sync with the interface_offsets MonoVTable changes.
5815
5816 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5817
5818         * mini.c: more verification checks.
5819
5820 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
5821
5822         * mini.c: added a few more verification checks.
5823
5824 2006-02-17      Neale Ferguson <neale@sinenomine.net>
5825
5826         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
5827         facility on the processor and use it if available.
5828
5829 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5830
5831         * driver.c, aot.c, mini.c: throw exception if the IL code is
5832         invalid or unverifiable.
5833
5834 2006-02-17  Raja R Harinath  <rharinath@novell.com>
5835
5836         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
5837         m.StructField.
5838
5839 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
5840
5841         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
5842
5843 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5844
5845         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
5846         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
5847         handling of instantiated generic valuetypes.
5848
5849 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
5850
5851         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
5852         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
5853         instead.
5854
5855         * generics.2.cs: Revert the nullable reftypes tests.
5856
5857 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
5858
5859         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
5860         using __builtin_frame_address (1) as it doesn't work in the presence
5861         of optimizations. Hopefully fixes #77273.
5862
5863         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
5864         -> generics.cs change as it doesn't work with some automake versions.
5865
5866 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5867
5868         * mini.c: handle systems that sue a different way to
5869         retrieve the stack address of the current thread.
5870
5871 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
5872
5873         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
5874         it specially in the makefile.
5875
5876         * generics.2.cs: Add tests for nullable reference types.
5877
5878 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5879
5880         * mini.c: always handle the case when mono_jit_init()
5881         is called in a thread different from the main thread,
5882         confusing libgc (bug #77309).
5883
5884 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
5885
5886         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
5887
5888 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5889
5890         * mini.c: change optimize_branches () to use a single loop
5891         and introduce a new optimization to simplify some range checks.
5892
5893 2006-02-03  Martin Baulig  <martin@ximian.com>
5894
5895         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
5896         and merged with debugger_thread_manager_add_thread().
5897         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
5898         inform the debugger about the main thread.
5899
5900 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
5901
5902         * basic.cs: Add test for div.un/rem.un constant folding.
5903
5904 2006-02-03  Neale Ferguson <neale@sinenomine.net>
5905
5906         * cpu-s390x.md: correct int_xor_imm length
5907
5908 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
5909
5910         * generics.2.cs: New test for #77442.
5911
5912         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
5913         #77442.
5914
5915 2006-02-02  Martin Baulig  <martin@ximian.com>
5916
5917         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
5918         <mono/metadata/mono-debug-debugger.h>   
5919
5920         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
5921
5922 2006-02-02  Martin Baulig  <martin@ximian.com>
5923
5924         * debug-debugger.h: New header file for debug-debugger.c.
5925
5926         * debug-debugger.c: Big API cleanup; don't run the managed Main()
5927         function is a separate thread anymore; add support for attaching.
5928
5929 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
5930
5931         * tramp-x86.c: Fix a warning.
5932
5933 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
5934
5935         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
5936         on very large methods.
5937
5938         * aot.c (load_patch_info): Fix a warning.
5939
5940 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
5941
5942         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
5943         mini-ops.h: alu membase optimizations.
5944
5945 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
5946
5947         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
5948         to speedup StringBuilder.
5949
5950 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
5951
5952         * dominators.c (mono_compute_natural_loops): Fix detection of
5953         loop body start blocks.
5954
5955         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
5956
5957 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
5958
5959         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
5960         #75145.
5961
5962 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
5963
5964         * aliasing.c: Fixed aliasing issue on 64 bit archs.
5965
5966 2006-01-25  Martin Baulig  <martin@ximian.com>
5967
5968         * debug-debugger.c: Moved the `MonoDebuggerManager' and
5969         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
5970         started to cleanup this file a little bit.
5971
5972 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
5973
5974         * mini.c: optimize a codepath frequently happening in generics code.
5975
5976 2006-01-23  Martin Baulig  <martin@ximian.com>
5977
5978         * Makefile.am: Only compile debug-debugger.c on supported platforms.
5979
5980         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
5981         functions directly.
5982
5983         * driver.c: debug-debugger.c is only available if
5984         `MONO_DEBUGGER_SUPPORTED' is defined.   
5985
5986 2006-01-23  Martin Baulig  <martin@ximian.com>
5987
5988         * debug-debugger.c: Only enable this on platforms where the Mono
5989         Debugger is working (x86 and x86_64).
5990
5991 2006-01-21  Martin Baulig  <martin@ximian.com>
5992
5993         The Mono Debugger is now using the normal `mono' instead of the
5994         `mono-debugger-mini-wrapper' when executing managed code.
5995
5996         * debug-debugger.c: New file; previously known as
5997         debugger/wrapper/wrapper.c.
5998
5999         * debug-mini.c (mono_init_debugger): Removed.
6000
6001         * driver.c (mono_main): Added new `--inside-mdb' command line
6002         argument which is used when running inside the debugger.
6003
6004 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
6005
6006         * liveness.c (mono_analyze_liveness): Remove some unused data
6007         structures.
6008
6009 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
6010
6011         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
6012
6013 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
6014
6015         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
6016         depends on implementation details of monobitset.
6017
6018         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
6019         Fixes #77271.
6020
6021 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
6022
6023         * liveness.c: Update after monobitset changes.
6024
6025 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
6026
6027         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
6028
6029 2006-01-11 Neale Ferguson <neale@sinenomine.net>
6030
6031         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
6032
6033         * mini-s390x.c: Remove warning messages.
6034
6035 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
6036
6037         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
6038
6039 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
6040
6041         * generics.2.cs: Add ldelem/stelem_any test.
6042
6043 2006-01-10 Neale Ferguson <neale@sinenomine.net>
6044
6045         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
6046
6047 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
6048
6049         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
6050         
6051 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
6052
6053         * generics.2.cs: Reenable vtype tests.
6054
6055         * inssel-x86.brg: Remove an icorrect valuetype rule.
6056
6057 2006-01-06 Neale Ferguson <neale@sinenomine.net>
6058
6059         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
6060         initial support for OP_ABS.
6061
6062 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6063
6064         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
6065
6066 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6067
6068         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
6069         conversion and implement LADD/LSUB.
6070
6071         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
6072         architectures.
6073
6074 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6075
6076         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
6077
6078         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
6079         architectures.
6080
6081 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6082
6083         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
6084         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
6085         (stack walk problem).
6086
6087 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
6088
6089         * aot.c (mono_aot_load_method): Fix a warning.
6090
6091 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6092
6093         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
6094
6095 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6096
6097         * iltests.il: Add test for #77148.
6098
6099         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
6100         #77148.
6101
6102 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6103
6104         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
6105
6106 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6107
6108         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
6109         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
6110
6111         * basic-long.cs: Add lconv-to-r4/r8 tests.
6112
6113 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6114
6115         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
6116
6117         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
6118         here as on other archs.
6119
6120 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6121
6122         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
6123
6124 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6125
6126         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
6127         
6128         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
6129
6130         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
6131         instrument_prolog; Add memory_barrier instruction.
6132
6133 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
6134
6135         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
6136
6137 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
6138
6139         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
6140
6141         * aliasing.c inssel.brg: Fix warnings.
6142
6143         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
6144         could skip initialization of some parts of memory.
6145
6146         * mini.c mini-ia64.c: Fix warnings.
6147
6148         * inssel-sparc.brg: Add an implementation of lneg which actually works.
6149
6150 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
6151
6152         * aliasing.c (mono_build_aliasing_information): Add a workaround for
6153         a crash seen on sparc.
6154
6155         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
6156         
6157         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
6158
6159 2005-12-21 Neale Ferguson <neale@sinenomine.net>
6160
6161         * mini-ops.h: Add s390_backchain instruction
6162
6163         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
6164
6165         * cpu-s390.md: Add s390_backchain instruction
6166
6167         * mini-s390.c: Significant ABI changes
6168
6169         * mini-s390.h: Cater for zero length structures
6170
6171 2005-12-20 Neale Ferguson <neale@sinenomine.net>
6172
6173         * mini-s390.c: ABI fixes
6174
6175         * inssel-s390.brg: Remove debug statements
6176
6177         * cpu-s390.md: Fix length of ATOMIC_xx operations
6178
6179 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
6180
6181         * basic-float.cs: Add float<->long conversion tests.
6182
6183 2005-12-16 Neale Ferguson <neale@sinenomine.net>
6184
6185         * mini-s390.c: Fix LOCALLOC processing.
6186
6187         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
6188
6189 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
6190
6191         * iltests.il: Add tests for some opcodes not covered by the other
6192         tests.
6193
6194 2005-12-15 Neale Ferguson <neale@sinenomine.net>
6195
6196         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
6197         register loading for Tail processing; Correct trace output.
6198
6199         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
6200
6201         * cpu-s390.md: Correct size of jmp instruction. 
6202
6203 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6204
6205         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
6206
6207 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6208
6209         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
6210           Bring s390 up to current level.
6211
6212 2005-12-12  Zltan Varga  <vargaz@gmail.com>
6213
6214         * generics.2.cs: Disable the newly added tests as they do not work yet.
6215         
6216         * generics.2.cs: Add valuetype tests.
6217
6218 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
6219
6220         * basic-long.cs: Add i4->u8 test.
6221
6222         * objects.cs: Add tests for JIT intrinsic.
6223
6224         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
6225         optimizations lost by a mistake.
6226
6227 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
6228
6229         * basic-long.cs: Remove a test moved to objects.cs.
6230
6231         * arrays.cs: Add more array tests.
6232
6233 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
6234
6235         * arrays.cs: Add new tests for multi-dimensional arrays.
6236
6237 2005-12-06  Raja R Harinath  <rharinath@novell.com>
6238
6239         * Makefile.am (test_sources2): Add generics.2.cs.
6240         (EXTRA_DIST): Add test_sources2.
6241
6242 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
6243
6244         Support for boxing and unboxing nullable types as well as the
6245         isinst operation on nullables, per the CLI ammendment.
6246
6247         * inssel.brg (CEE_ISINST): Special case for nullable
6248
6249         * mini.c (handle_unbox_nullable): new method
6250         (handle_box): Special case for nullable types
6251         (mono_method_to_ir): Call handle_unbox_nullable in correct
6252         places.
6253
6254         * generics.2.cs: New test suite
6255
6256         * Makefile.am: Support for regression tests with generics.
6257
6258 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
6259
6260         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
6261         allocated to registers. Fixes #76800.
6262
6263 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
6264
6265         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
6266
6267 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
6268
6269         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
6270         of platforms.
6271
6272 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
6273
6274         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
6275         objects.cs.
6276
6277         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
6278         
6279         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
6280 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
6281
6282         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
6283         single precision before storing to a single precision location.
6284
6285 2005-11-28  Raja R Harinath  <rharinath@novell.com>
6286
6287         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
6288
6289 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
6290
6291         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
6292         correct files.
6293
6294         * basic.cs: Remove test_0_byte_compares test which was moved to
6295         objects.cs a long time ago.
6296
6297 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
6298
6299         * aliasing.c: Fixed aliasing issue on 64 bit archs.
6300
6301 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
6302
6303         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
6304         handlers are called.
6305
6306         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
6307         throwing code.
6308
6309          * mini-ia64.c: Add support for the throw->branch exception 
6310         optimization.   
6311
6312         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
6313
6314 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6315
6316         * mini.c: Enabled "fastpath" deadce :-)
6317         
6318 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6319
6320         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
6321         alias analysis pass to support it.
6322         * mini.h: Likewise.
6323         * ssa.c: Likewise.
6324         * liveness.c: Likewise (liveness computation can use aliasing
6325         information to be more accurate).
6326         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
6327         moreover made so that "--compile-all" uses the given optimization
6328         flags and not the default ones.
6329         * aliasing.c: Alias analysis (new file).
6330         * aliasing.h: Likewise.
6331         * Makefile.am: added "aliasing.c" and "aliasing.h".
6332         
6333 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
6334
6335         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
6336         OP_L opcodes.
6337
6338 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
6339
6340         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
6341         fp >= end_of_stack exit condition, as it is not needed, and it might
6342         become true for fp eliminated frames.
6343
6344 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
6345
6346         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
6347         coded offsets.
6348
6349 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
6350
6351         * mini-arm.c: fixed alignment of doubles/longs to match
6352         the C ABI (bug #76635).
6353
6354 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
6355
6356         * aot.c: fix compilation with --enable-minimal=aot.
6357
6358 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
6359
6360         * mini-arm.c: fixed compatibility with the new
6361         floating point emulator package for compares.
6362
6363 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
6364
6365         * mini.c : reverted sig->pinvoke changes (r51396-51397).
6366
6367 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
6368
6369         * mini-exceptions.c (print_stack_frame): Output to stderr.
6370         (mono_handle_native_sigsegv): Ditto.
6371
6372 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6373
6374         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
6375         OP_LCONV_TO_OVF_I implementation.
6376
6377         * mini-amd64.c: Add support for the throw->branch exception 
6378         optimization.
6379
6380         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
6381         when the catch clause catches a more general exception, i.e. Object.
6382
6383 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
6384
6385         * cpu-ia64.md: Remove unused opcodes.
6386
6387         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
6388         specific defines for architectures defining USE_SIGACTION.
6389
6390         * mini-ia64.c: Fix some warnings.
6391
6392         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
6393         version seemed to skip a frame.
6394
6395 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6396
6397         * mini.c: Clean up the usage of sig->pinvoke flag. Now
6398         only calls which are made to native code use this flag.
6399
6400 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
6401
6402         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
6403         varargs methods as well.
6404         
6405         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
6406         which have save_lmf set. Reorganize methods prologs a bit.
6407
6408         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
6409         debugger to the proper place.
6410
6411 2005-10-29  Martin Baulig  <martin@ximian.com>
6412
6413         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
6414         when running inside the debugger until the debugger has support
6415         for it.
6416
6417 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
6418
6419         * mini.h: Fix a warning.
6420
6421 2005-10-24  Miguel de Icaza  <miguel@novell.com>
6422
6423         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
6424         we expose publicly, this returns the string.
6425
6426 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
6427
6428         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
6429         with fp elimination.
6430
6431 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
6432
6433         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
6434         native stacktrace using the glibc 'backtrace' function if available.
6435
6436 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
6437
6438         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
6439
6440         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
6441         handle SIGSEGVs received while in native code.
6442
6443         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
6444         code, call mono_handle_native_sigsegv which will abort the runtime
6445         after printing some diagnostics, instead of converting it into a
6446         confusing NullReferenceException.
6447
6448 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
6449
6450         * cpu-pentium.md: Remove unused opcodes.
6451
6452 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
6453
6454         * mini-amd64.h (MonoLMF): Add rsp field.
6455
6456         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
6457         the lmf too.
6458
6459 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
6460
6461         * mini-codegen.c (get_register_spilling): Fix some warnings.
6462
6463 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
6464
6465         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
6466         elimination during exception handling. Enable fp elimination by
6467         default.
6468
6469         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
6470         elimination.
6471
6472 2005-10-16  Martin Baulig  <martin@ximian.com>
6473
6474         * mini-exceptions.c
6475         (mono_debugger_run_finally): New public method for the debugger.
6476
6477 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
6478
6479         * debug-mini.c (mono_debug_init_method): Fix warning.
6480
6481         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
6482         the 'exname' parameter const to fix some warnings.
6483
6484 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
6485
6486         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
6487         introduced by the previous patch.
6488
6489 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
6490
6491         * basic-float.cs: Add test for precision of float arithmetic.
6492
6493         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
6494         when loading/storing single values from/to memory.
6495
6496         * mini.c (mono_jit_compile_method_with_opt): Create the function
6497         pointers in the correct domain.
6498
6499 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
6500
6501         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
6502         introduced by previous patch.
6503         
6504         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
6505         when out_filter_idx is NULL.
6506
6507         * mini-exceptions.c: Don't run filter clauses twice during exception
6508         handling. Fixes #75755.
6509
6510 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
6511
6512         * aot.c: Add support for ldflda wrappers.
6513
6514         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
6515         #75902.
6516
6517 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
6518
6519         * mini.c, mini.h: do not consider exception handlers blocks when
6520         setting up interface variables.
6521
6522 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
6523
6524         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
6525
6526 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
6527
6528         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
6529         causes a regression.
6530
6531         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
6532
6533 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
6534
6535         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
6536         of the OP_P definitions.
6537
6538         * TODO: Add a proposal for dealing with the CEE/OP mess.
6539
6540         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
6541         optimizations from the x86 port.
6542
6543         * cpu-amd64.md: Ditto.
6544
6545         * basic.cs basic-long.cs: Add tests.
6546
6547 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
6548
6549         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
6550         Patrik Torstensson's implementation of my exception-handling
6551         optimization idea, when the exception object is not used
6552         (bug #62150).
6553
6554 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
6555
6556         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
6557         of the mul_imm optimizations from the old jit.
6558
6559 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
6560
6561         * mini.c, liveness.c: patch by Patrik Torstensson and
6562         Zoltan Varga to improve performance in methods with
6563         exception clauses.
6564
6565 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
6566
6567         * driver.c: Remove 'Globalization' entry from --version.
6568
6569 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
6570
6571         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
6572         there is a profiler interested in JIT events.
6573
6574         * aot.c: Load profile files produced by the AOT profiling module, and
6575         reorder methods based on the profiling info. Add a 'method_order' table
6576         to the AOT file to make mono_aot_find_jit_info work with the reordered
6577         methods.
6578
6579         * mini.h: Bump AOT file version info.
6580
6581 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
6582
6583         * mini-arm.h: work around what looks like a gcc bug when optimizations
6584         are enabled.
6585
6586 2005-09-28  Raja R Harinath  <rharinath@novell.com>
6587
6588         * Makefile.am (AM_CFLAGS): Don't use += to append inside
6589         conditionals.  Use ...
6590         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
6591
6592 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
6593
6594         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
6595         to determine the amount of memory to copy when passing valuetypes.
6596
6597         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
6598         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
6599
6600 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
6601
6602         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
6603         information about aot.
6604
6605 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
6606
6607         * *.c: Replace the use of {Enter,Leave}CriticalSection with
6608         macros. This will allow a deadlock debugger to easily be plugged
6609         in.
6610
6611 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
6612
6613         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
6614
6615 2005-09-27  Raja R Harinath  <rharinath@novell.com>
6616
6617         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
6618         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
6619         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
6620         ($(arch_built)) [CROSS_COMPILING]: Error out.
6621
6622 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
6623
6624         * aot.c: Add support for the no_special_static flag for classes.
6625
6626 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6627
6628         * Reapply reverted patches.
6629
6630         * *: Revert r50174 as well.
6631
6632         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
6633
6634 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6635
6636         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
6637
6638 2005-09-23  Miguel de Icaza  <miguel@novell.com>
6639
6640         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
6641         part of the SIG_HANDLER_SIGNATURE.  
6642
6643 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
6644
6645         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
6646         statistics.
6647
6648         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
6649         introduced by previous patch.
6650
6651 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
6652
6653         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
6654         saved registers too.
6655
6656         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
6657         upon the information returned by get_call_info ().
6658         
6659         * mini-x86.c (add_float): Fix stack size calculation.
6660         (mono_arch_call_opcode): Rewrite this so it works based up the
6661         information returned by get_call_info ().
6662         (mono_arch_get_this_vret_args): Ditto.
6663
6664 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
6665
6666         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
6667         in cinfo to determine the registers which need to be used.
6668
6669 2005-09-20  Miguel de Icaza  <miguel@novell.com>
6670
6671         * driver.c (mono_main): Add --server and --desktop flags. 
6672
6673 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
6674
6675         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
6676         registers as global registers.
6677
6678         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
6679         longer needed with the new register allocator.
6680
6681         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
6682
6683         * cpu-ia64.md: Remove unused opcodes.
6684         
6685         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
6686         
6687 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
6688
6689         * cpu-amd64.md: Remove unused opcodes.
6690
6691         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
6692         needed with the new register allocator.
6693
6694         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
6695         reg-reg moves.
6696
6697 2005-09-16  Raja R Harinath  <rharinath@novell.com>
6698
6699         * Makefile.am (check-local): Don't invoke semdel-wrapper.
6700
6701 2005-09-16  Martin Baulig  <martin@ximian.com>
6702
6703         * exceptions-amd64.c
6704         (throw_exception): Don't call mono_debugger_throw_exception() if
6705         we're a rethrow - see the FIXME in the code.
6706
6707 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
6708
6709         * mini.c (mono_init_exceptions): This only works on some architectures.
6710         
6711 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6712
6713         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
6714         on ia64.
6715
6716         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
6717
6718         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
6719         now in mini-exceptions.c.
6720
6721 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
6722
6723         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
6724         now in mini-exceptions.c.
6725
6726 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6727
6728         * exceptions-x86.c: Applied patch from Patrik Torstensson 
6729         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
6730
6731         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
6732         code into mini-exceptions.c. Add some assertions to it.
6733
6734 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
6735
6736         * aot.c (emit_section_change): Applied patch from "The Software Team" 
6737         (<software@solmersa.com>). Fix as errors on windows.
6738
6739 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6740
6741         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
6742         method info into the LMF.
6743
6744 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6745         
6746         * mini-ia64.c: Add proper unwind info for method epilogs.
6747
6748         * exceptions-ia64.c: Add some code to help debugging.
6749         
6750         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
6751
6752         * mini-exceptions.c: Fix warning.
6753
6754 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6755
6756         * mini.c: Really fix build.
6757
6758         * mini-x86.c mini-amd64.c: Fix build.
6759
6760 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6761
6762         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
6763
6764         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
6765         some Interlocked methods as intrinsics.
6766
6767         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
6768         for Thread methods as well.
6769
6770         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
6771
6772         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
6773
6774         * mini-ia64.c mini-x86.c mini-amd64.c 
6775         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
6776         OP_MEMORY_BARRIER.
6777         
6778         * mini.c (mono_init_exceptions): Fix build breakage.
6779
6780 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
6781
6782         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
6783         of instructions. Use the new ia64_unw_op macros for emitting unwind
6784         info.
6785
6786         * mini.c (mono_init_exceptions): Initialize exception handling
6787         related trampolines at startup.
6788
6789 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
6790
6791         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
6792
6793 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
6794
6795         * mini.c: Handle type loading errors gracefully during compilation and
6796         throw the appropriate exception.
6797
6798 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
6799
6800         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
6801         for the mono binary.
6802
6803 2005-09-09  Martin Baulig  <martin@ximian.com>
6804
6805         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
6806         the release.
6807
6808 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6809
6810         * mini-arm.h: use emulation for conv.r.un for the release.
6811
6812 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6813
6814         * mini-arm.c, objects.cs: more fixes and tests for them.
6815
6816 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6817
6818         * mini-arm.c: align structures to at least 4 bytes to be able
6819         to keep our current optimized memcpy.
6820
6821 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
6822
6823         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
6824
6825 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6826
6827         * mini.c: ignore SIGPIPE.
6828
6829 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
6830
6831         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
6832
6833         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
6834
6835 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
6836
6837         * mini.h: Add prototype for mono_allocate_stack_slots_full.
6838
6839 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6840
6841         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
6842         exception handling support.
6843         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
6844         patch by Brian Koropoff <briank@marakicorp.com>).
6845
6846 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
6847
6848         * mini.c: revert another 'optimization' which breaks when
6849         items on the eval stack need to be saved at a basic block end
6850         (bug #75940).
6851
6852 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
6853
6854         * jit-icalls.c: for arrays, ensure we always provide
6855         lower bounds.
6856
6857 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
6858
6859         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
6860         
6861         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
6862
6863 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
6864
6865         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
6866         arguments in their original register.
6867
6868 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
6869
6870         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
6871         memset/memcpy.
6872
6873         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
6874         when ssapre is enabled.
6875
6876         * inssel-long.brg: Fix bug in previous patch.
6877
6878         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
6879         multiplication by a constant.
6880
6881 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
6882
6883         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
6884         icc.
6885
6886         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
6887         saving registers.
6888
6889 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
6890
6891         * inssel-arm.brg: apply changes tested by Brian Koropoff
6892         <briank@marakicorp.com>.
6893
6894 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
6895
6896         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
6897         
6898 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
6899
6900         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
6901         to the same register if dreg is just a base register.
6902         (print_ins): Improve printing of membase opcodes.
6903
6904         * inssel-x86.brg: Add optimized ldind(reg) rules.
6905
6906         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
6907
6908 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
6909
6910         * mini.c: when running under valgrind, set the stack bottom for
6911         the GC at the actual approximate stack for the app (fixes running
6912         mono with valgrind).
6913
6914 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
6915
6916         * mini.c: do no break at the first valuetype to init found
6917         (fixes bug #75791).
6918
6919 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
6920
6921         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
6922
6923 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
6924
6925         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
6926
6927 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
6928
6929         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
6930
6931 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6932
6933         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
6934
6935         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
6936         code.
6937
6938         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
6939         code.
6940
6941         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
6942         methods.
6943
6944 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
6945
6946         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
6947
6948 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6949
6950         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
6951         in the tail recursion optimization.
6952
6953         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
6954         debug info into the assembly file.
6955
6956         * iltests.il: Add test for filter regions.
6957
6958         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
6959         initial stack of filter regions. Fixes #75755.
6960
6961 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
6962
6963         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
6964         stack requirements.
6965
6966 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6967
6968         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
6969         the check for an already compiled method on non-ia64 platforms.
6970         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
6971         proper domain.
6972
6973         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
6974
6975         * inssel-x86.brg: Add some optimized call rules.
6976
6977 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
6978
6979         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
6980         method here.
6981
6982         * mini.h mini-trampolines.c: Pass the trampoline argument to 
6983         mono_arch_patch_delegate_trampoline.
6984
6985         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
6986
6987         * mini-trampolines.c: Fix build.
6988
6989         * mini-amd64.h: Add delegate trampolines.
6990
6991         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
6992
6993         * inssel-amd64.brg: Add optimized call rules.
6994         
6995         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
6996
6997         * inssel-ia64.brg: Add optimized ldind(reg) rules.
6998
6999 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
7000
7001         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
7002         change.
7003
7004         * mini-ia64.c: Remove LMF fixmes.
7005
7006         * mini-ia64.h: Remove most fields from LMF.
7007
7008         * inssel-ia64.brg (stmt): Fix unaligned access errors.
7009
7010         * mini-trampolines.c: Add support for IA64 function descriptors.
7011
7012         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
7013         for IA64 function descriptors.
7014
7015 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
7016
7017         * tramp-arm.c: patch the vtable for virtual calls. Added
7018         support code to register/unregister the LMF.
7019         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
7020         more LMF work.
7021
7022 2005-08-19  Dick Porter  <dick@ximian.com>
7023
7024         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
7025         bit value if needed.
7026
7027 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
7028
7029         * mini.c (mini_get_method): Move handling of wrapper data here.
7030
7031         * mini.c (mono_method_to_ir): Add support for dynamic methods.
7032
7033         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
7034         virtual.
7035
7036         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
7037         bblock->code does not remain empty.
7038
7039 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
7040
7041         * arrays.cs: Add regression test for #75832.
7042
7043         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
7044         rules. Fixes #75832.
7045
7046         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
7047         instruction scheduling.
7048
7049 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
7050
7051         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
7052
7053 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
7054
7055         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
7056
7057         * mini-codegen.c: Fix VC build.
7058
7059         * cpu-pentium.md: Increase length of atomic_exhange_i4.
7060
7061 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7062
7063         * mini.h: fix signature for mono_register_opcode_emulation.
7064
7065 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
7066
7067         * mini.c: Get rid of most of the helper_sig_... constants using
7068         mono_create_icall_signature ().
7069
7070 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
7071
7072         * jit-icalls.c (helper_ldstr): New helper function.
7073
7074         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
7075
7076         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
7077         throw, load the string using a helper call instead of creating a string object.
7078
7079         * aot.c: Update after LDSTR changes.
7080
7081         * mini.h: Bump AOT file version.
7082         
7083         * aot.c: Save class size info into the AOT file. Print more statistics during
7084         compilation.
7085
7086         * mini.h: Bump AOT file version.
7087
7088         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
7089         ordering of disasm cases. Fixes #74957.
7090
7091 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
7092
7093         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
7094         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
7095         the generic code needed for the ARM port.
7096
7097 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
7098
7099         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
7100         inssel-arm.brg: more ARM features and fixes.
7101
7102 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
7103
7104         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
7105         ARM port work in progress.
7106
7107 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
7108
7109         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
7110
7111         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
7112
7113         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
7114
7115         * inssel.brg (mini_emit_memset): Add support for unaligned access.
7116
7117         * *-ia64.*: Ongoing IA64 work.
7118         
7119         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
7120
7121 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
7122
7123         * TODO: Remove out-of-data todo stuff.
7124
7125         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
7126         dead code.
7127
7128         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
7129
7130         * mini.h: Bump corlib version.
7131
7132 2005-07-27  Martin Baulig  <martin@ximian.com>
7133
7134         * mini-codegen.c
7135         (create_copy_ins): Added `const unsigned char *ip' argument; set
7136         `copy->cil_code' from it.
7137
7138 2005-07-27  Martin Baulig  <martin@ximian.com>
7139
7140         * mini-exceptions.c (mono_handle_exception): Don't call
7141         mono_debugger_handle_exception() for filters.
7142
7143 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
7144
7145         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
7146         as well.
7147
7148 2005-07-26  Martin Baulig  <martin@ximian.com>
7149
7150         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
7151
7152         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
7153         helper_compile_generic_method() if the method is actually virtual
7154         and non-final.
7155
7156 2005-07-26  Martin Baulig  <martin@ximian.com>
7157
7158         * mini.c
7159         (trampoline_code): Renamed to `mono_trampoline_code' and made it
7160         public; this is now accessed directly by the debugger.
7161         (mono_generic_trampoline_code): Removed.
7162
7163         * debug-mini.c
7164         (mono_debug_init_method): Also add interncalls and wrappers.
7165
7166 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
7167
7168         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
7169
7170 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
7171
7172         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
7173
7174 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
7175
7176         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
7177
7178 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7179
7180         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
7181         getting TLS offsets on AMD64 too.
7182
7183 2005-07-20  KornĂ©l Pál <kornelpal@hotmail.com>
7184
7185         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
7186
7187 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
7188
7189         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
7190         inssel-arm.brg, mini-arm.h: ARM port work in progress.
7191
7192 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7193
7194         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
7195
7196         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
7197         to mini.c.
7198
7199         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
7200         mono_sparc_is_virtual_call ().
7201         
7202         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
7203
7204         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
7205         trampoline parameters.
7206
7207         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
7208         
7209         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
7210         to mono_arch_get_vcall_slot_addr.
7211
7212         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
7213         trampoline code.
7214
7215         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
7216
7217 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7218
7219         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
7220
7221 2005-07-19  Martin Baulig  <martin@ximian.com>
7222
7223         * exceptions-amd64.c (throw_exception): Call
7224         mono_debugger_throw_exception() here like we're doing it on i386.
7225
7226 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7227
7228         * mini-ia64.c: Add optimized TLS access support.
7229
7230 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
7231
7232         * mini-exceptions.c: Ongoing IA64 work.
7233
7234         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
7235
7236         * mini.c: Use the default optimization set when embedding. Fixes
7237         #75194.
7238
7239 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
7240
7241         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
7242         of trampolines to a separate file.
7243
7244         * mini-trampolines.c: New file.
7245
7246         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
7247         separate file.
7248         
7249         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
7250         amd64/ia64 code.
7251
7252         * mini-codegen.c: Fix cygwin build.
7253
7254 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
7255
7256         * mini.c: Add some minor changes needed by the IA64 port.
7257
7258         * *-ia64.*: Ongoing IA64 work.
7259
7260 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
7261
7262         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
7263         trampolines into arch-independent and arch-dependent parts.
7264
7265         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
7266
7267 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
7268
7269         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
7270
7271         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
7272         the xp-regalloc-branch for amd64.
7273
7274         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
7275         xp-regalloc-branch for x86.
7276
7277 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
7278
7279         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
7280
7281 2005-07-06  Martin Baulig  <martin@ximian.com>
7282
7283         * mini.c
7284         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
7285         (mono_jit_runtime_invoke): Likewise.
7286
7287 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
7288
7289         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
7290         on x86 too.
7291         
7292         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
7293         without loading their metadata. Reorganize the file format so exception handling+
7294         debug info is kept separate from normal method info. Create MonoJitInfo 
7295         structures for methods lazily.
7296
7297         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
7298         loading metadata.
7299         (x86_class_init_trampoline): Patch AOT class init trampolines too.
7300
7301         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
7302
7303         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
7304         in AOT code.
7305
7306         * mini.h: Bump AOT file version.
7307
7308 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
7309
7310         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7311
7312 2005-07-01  Raja R Harinath  <rharinath@novell.com>
7313
7314         * Makefile.am (check-local): Call semdel-wrapper.
7315
7316 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
7317
7318         * mini-x86.c: Revert the last change as it seems to break the build..
7319
7320 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
7321
7322         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7323         
7324         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
7325
7326 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
7327
7328         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
7329         outside of the macro, so strange stuff doesn't happen with gcc4
7330         (NEW_AOTCONST_TOKEN): Likewise.
7331
7332 2005-06-28  Martin Baulig  <martin@ximian.com>
7333
7334         * mini.c (mini_class_is_system_array): New static method; use this
7335         instead of `klass->parent == mono_defaults.array_class' everywhere
7336         since this also works for the new generic array class.
7337
7338 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
7339
7340         * inssel.brg: Remove warnings.
7341
7342 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
7343
7344         * mini-ia64.c: Ongoing IA64 work.
7345
7346         * basic-float.cs: Add float->i1 conversion test.
7347
7348         * iltests.il: Add conv.u4 test.
7349
7350 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
7351
7352         * inssel-long.brg: Fix bug caused by last change.
7353
7354 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
7355
7356         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
7357         BSDs.  Allows the x86 JIT to work on OSX86
7358
7359 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
7360
7361         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
7362         u4->i8 conversion.
7363
7364         * mini-ia64.c: Ongoing IA64 work.
7365
7366 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
7367
7368         * mini-ia64.c: Ongoing IA64 work.
7369
7370         * driver.c: Clean up jit_code_hash as well when using --regression.
7371
7372         * inssel-long.brg: Fix long->i4/u4 conversion rules.
7373
7374         * basic-long.cs: Add tests for long->u4 conversion.
7375
7376 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
7377
7378         * mini.c: Take mono_get_domainvar out of macros. This makes sure
7379         that we do not depend on undefined C behavior: the order stuff
7380         gets evaluated within an expression. Fixes mono when compiled on
7381         GCC 4.
7382
7383 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
7384
7385         * *-ia64.*: Ongoing IA64 work.
7386
7387         * aot.c: Lower memory usage while loading AOT methods.
7388
7389         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
7390
7391         * mini.h: Bump AOT file format version.
7392
7393 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
7394
7395         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
7396
7397 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
7398
7399         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
7400         not on callee assembly). Fixed some comments.
7401
7402 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
7403
7404         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
7405         it gets proper disassembly.
7406         (emit_method_info): Remove some dead code.
7407
7408         * mini.c (mini_method_compile): Allways allocate the GOT var in
7409         mono_method_to_ir for emulating opcodes.
7410
7411 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
7412
7413         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
7414         before freeing the code memory. Fixes #74990.
7415
7416         * objects.cs: Add regression test for #74992.
7417
7418         * liveness.c: Extend live ranges of arguments to the beginning of the
7419         method. Fixes #74992.
7420
7421         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
7422         so it points into the faulting instruction.
7423
7424 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
7425
7426         * jit-icalls.c (mono_imul_ovf): Add exception handling.
7427
7428         * *-ia64.*: Ongoing IA64 work.
7429
7430         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
7431
7432 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
7433
7434         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
7435
7436         * *-ia64.*: Ongoing IA64 work.
7437
7438 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
7439
7440         * basic-long.cs: Add tests for add/sub.ovf.
7441
7442         * basic.cs: Add tests for sub.ovf.
7443
7444         * *-ia64.*: Ongoing IA64 work.
7445
7446 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
7447
7448         * *-ia64.*: Ongoing IA64 work.
7449
7450         * basic.cs: Add conv.ovf.i4.un test.
7451
7452 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
7453
7454         * mini.c: (remove_block_if_useless) Fixed bug 75061.
7455         
7456 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7457
7458         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
7459
7460 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
7461
7462         * *-ia64.*: Ongoing IA64 work.
7463
7464 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7465
7466         * trace.[ch]:
7467         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
7468
7469 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
7470
7471         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
7472
7473 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
7474
7475         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
7476
7477         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
7478         of a call is callable by a near call.
7479
7480 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
7481
7482         * mini-ia64.c: Ongoing IA64 work.
7483
7484 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
7485
7486         * genmdesc.c: Make the generated array non-static.
7487
7488         * inssel-long.brg: Fix LSHR_IMM rule.
7489
7490         * *-ia64.*: Ongoing IA64 work.
7491
7492         * *-ia64.*: Ongoing IA64 work.
7493
7494 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7495
7496         * *-ia64.*: Ongoing IA64 work.
7497
7498         * *-ia64.*: Ongoing IA64 work.
7499         
7500         * mini-ia64.c: Ongoing IA64 work.
7501
7502         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
7503
7504 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7505
7506         * objects.cs basic-calls.cs: Move some tests to objects.cs.
7507         
7508         * objects.cs basic-long.cs: Move some tests to objects.cs.
7509
7510 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
7511
7512         * *-ia64.*: Ongoing IA64 work.
7513
7514         * iltests.il: Add a new test.
7515
7516         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
7517         newobj. Fixes #75042.
7518
7519 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
7520
7521         * *-ia64.*: Ongoing IA64 work.
7522         
7523         * *-ia64.*: Ongoing IA64 work.
7524         
7525         * *-ia64.*: Ongoing IA64 work.
7526
7527         * basic.cs objects.cs: Move tests accessing static variables as well.
7528
7529         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
7530
7531 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
7532
7533         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
7534
7535         * driver.c: Always print failed tests.
7536
7537         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
7538         frame pointer.
7539
7540         * *ia64*: Ongoing IA64 work.
7541
7542 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
7543
7544         * basic.cs: Add tests for add.ovf. Fix warnings.
7545
7546 2005-05-18  Miguel de Icaza  <miguel@novell.com>
7547
7548         * driver.c (mono_main): Avoid crash if no argument is passed to
7549         --break;  Do not use g_error, but f_printf.   And fix all other
7550         ocurrences of the same crash.
7551
7552 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
7553
7554         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
7555         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
7556         Fixes #74742.
7557
7558 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
7559
7560         * *-ia64.*: Add beginnings of IA64 backend.
7561
7562         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
7563
7564 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
7565
7566         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
7567         Fixes #74925.
7568
7569         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
7570
7571         * mini-amd64.c: Fix a warning.
7572
7573 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
7574
7575         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
7576         in float_neg. Fixes #74897.
7577
7578         * mini-amd64.c (emit_call): Fix another near call bug.
7579
7580 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
7581
7582         * declsec.c: Keep the appdomain information in the structure. Added a 
7583         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
7584         value gets overwritten).
7585         * declsec.h: Set the default MonoArray for the the stack to 6. Added
7586         an MonoAppDomain member to MonoSecurityFrame.
7587         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
7588         used in the stack walk. Now use a MonoArray which grow (double) when
7589         it gets full.
7590
7591 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
7592
7593         * mini.c: Re-enabled runtime cleanup, since running threads should
7594         now properly stop when exiting.
7595
7596 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
7597
7598         * mini-codegen.c: New file contaning the arch-independent local
7599         register allocator. Not used by any architectures yet.
7600
7601         * mini.h linear-scan.c: Merge some changes from the 
7602         mini-xp-local-regalloc branch.
7603
7604 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
7605
7606         * mini-amd64.c (emit_call): Fix calls to native functions when the
7607         runtime is compiled as a shared library. Fixes #74756.
7608
7609         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
7610         on a literal field. Fixes #74751.
7611
7612 2005-04-25  Raja R Harinath  <rharinath@novell.com>
7613
7614         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
7615
7616 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
7617
7618         * objects.cs: Add missing null casting test.
7619
7620 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
7621
7622         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
7623         in wrapper methods. Also rename 'address' variable to 'offset'.
7624
7625 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
7626
7627         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
7628         warnings.
7629         
7630         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
7631
7632         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
7633         work on windows.
7634
7635 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
7636
7637         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
7638
7639 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7640
7641         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
7642         just the last bytes.
7643
7644 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7645
7646         * aot.c (mono_compile_assembly): Fix warning.
7647
7648         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
7649         by the _MSC_VER stuff.
7650
7651 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
7652
7653         * inssel-long.brg: Fix #74588.
7654
7655         * cpu-amd64.md: Fix #74591.
7656
7657         * iltests.il: Add new regression tests.
7658
7659 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
7660
7661         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
7662         valuetype.
7663
7664 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
7665
7666         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
7667
7668         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
7669         from Bill Middleton <flashdict@gmail.com>.
7670
7671 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
7672
7673         * arrays.cs: Add new regression test. Fix warnings.
7674
7675 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
7676
7677         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
7678         and leakage in CKFINITE.
7679
7680         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
7681         this to a null op since it is called on amd64 too.
7682
7683         * exceptions-amd64.c (get_throw_trampoline): Align stack.
7684
7685         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
7686         body since this is not used on amd64.
7687         
7688         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
7689
7690         * mini-amd64.c: Remove obsolete fixmes.
7691
7692         * mini.c (print_method_from_ip): Fix debugging support.
7693
7694 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
7695
7696         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
7697         so that expressions that don't give much gain are not reduced.
7698         * ssapre.h: Likewise.
7699
7700 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
7701
7702         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
7703
7704         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
7705
7706         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
7707
7708 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
7709
7710         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
7711
7712         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
7713
7714 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
7715
7716         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
7717         stack touching.
7718
7719         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
7720
7721         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
7722
7723         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
7724
7725         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
7726         MONO_ARCH_USE_SIGACTION. Fixes #74252.
7727
7728         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
7729
7730         * mini-x86.c: Fix up stack overflow handling.   
7731
7732         * exceptions.cs: Add new regression test.
7733
7734 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
7735
7736         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
7737         mono_jit_thread_attach.
7738
7739         * mini.c (mono_method_to_ir): Verify called method is not abstract.
7740
7741 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7742
7743         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
7744         avoid calling constructors using callvirt.
7745
7746         * inssel.brg: Fix #74073.
7747
7748 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
7749
7750         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
7751         compilation with non-GCC compilers.
7752         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
7753         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
7754
7755 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
7756
7757         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
7758         klass->interface_offsets (will likely fix bug#74073).
7759
7760 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7761
7762         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
7763
7764 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
7765
7766         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
7767         to amd64_div_reg_size ().
7768         
7769         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
7770
7771 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
7772
7773         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
7774
7775 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7776
7777         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
7778
7779 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7780
7781         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
7782         
7783         * mini.c (mono_precompile_assembly): Load and precompile referenced
7784         assemblies as well. Fixes #74015.
7785
7786 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
7787
7788         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
7789
7790 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
7791
7792         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
7793         a lot of checks and (anyway) permissions cannot work until corlib is 
7794         loaded.
7795
7796 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
7797
7798         * mini-ppc.c: fixed ABI issue on sysv/ppc.
7799
7800 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
7801
7802         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
7803         calls (fixes bug#72824).
7804
7805 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
7806
7807         * mini.c: fix tail recursion elimination (see test in bug#73936).
7808
7809 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
7810
7811         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
7812         some fp functions in sse2 mode.
7813
7814 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
7815
7816         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
7817
7818 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
7819
7820         * mini.h mini.c: Add mono_get_jit_tls_key ().
7821
7822         * mini-x86.c: Enable fast TLS support on windows.
7823
7824 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
7825
7826         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
7827         * mini.c: Check for p/invoke method when generating code. If a
7828         p/invoke method, or it's class, isn't decorated with [Suppress
7829         UnmanagedCodeSecurity] then generate code to call System.Security.
7830         UnmanagedDemand (only if the security manager is active).
7831
7832 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7833
7834         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
7835         last change as it seems to cause strange crashes.
7836         
7837 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
7838
7839         * *.c: handle unsafe function pointers where needed.
7840
7841 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7842
7843         * mini.c (mono_jit_free_method): Remove the fixme too.
7844
7845 2005-03-15  Miguel de Icaza  <miguel@novell.com>
7846
7847         * mini.c: As discussed, make the code actually free the delegate
7848         thunk now, to enable the debugging of delegate problems, use
7849         MONO_DEBUG=1 when running Mono. 
7850
7851         This takes also care of parts of the leaks as seen by Joe.
7852
7853 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
7854
7855         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
7856         thread_tls_offset calculation.
7857
7858 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
7859
7860         * declsec.c: Reworked linkdemand checks for icall. The previous code
7861         was using the declaration code (untrusted) and didn't work as expected
7862         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
7863         specific case.
7864
7865 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
7866
7867         * iltests.il: Add new localloc test.
7868
7869         * mini-amd64.c: Handle large stack allocations the same way as on
7870         windows if stack overflow handling is working.
7871         
7872         * mini-amd64.c: Allocate the signal stack using mmap.
7873
7874         * mini.c (sigsegv_signal_handler): Fix reading of context.
7875
7876         * mini-exceptions.c: Fix up stack overflow handling.
7877
7878         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
7879
7880         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
7881
7882         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
7883
7884         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
7885
7886         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
7887         tramp_init functions as they are no longer needed.
7888
7889 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
7890
7891         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
7892         
7893         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
7894
7895         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
7896         
7897         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
7898         support that now.
7899
7900         * mini-ops.h: Add OP_LMUL_IMM.
7901
7902         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
7903         long mul/div opcodes as intrinsic.
7904
7905         * mini-amd64.c (emit_call): Handle the case when the callee might be
7906         an AOT method.
7907
7908 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
7909
7910         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
7911         extra safe.
7912         
7913         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
7914
7915         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
7916
7917 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
7918
7919         * mini.c (mono_codegen): Don't leak here, to help people running
7920         monogrind.
7921
7922 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
7923
7924         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
7925         conversions in sse2 mode.
7926
7927         * basic-float.cs: Add regression test.
7928         
7929         * mini-amd64.c: Reenable sse2.
7930
7931 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
7932
7933         * mini-amd64.c: Disable sse2 until some regressions are fixed.
7934
7935 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
7936
7937         * driver.c: Copyright text should include 2005.
7938         
7939 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
7940
7941         * cpu-amd64.md (load_membase): Fix more max lengths.
7942
7943 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
7944
7945         * cpu-amd64.md (load_membase): Fix max length.
7946
7947         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
7948
7949         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
7950
7951         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
7952         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
7953
7954         * basic-float.cs: Add rounding regression test.
7955
7956         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
7957
7958 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
7959
7960         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
7961         structures in registers for pinvoke wrappers.
7962
7963 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
7964
7965         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
7966
7967 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
7968
7969         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
7970         wrapper to mono_jit_thread_attach.
7971
7972         * mini.c (mini_jit_thread_attach): New jit icall.
7973
7974         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
7975         native->managed wrappers.
7976
7977         * exceptions.cs: Add new regression test.
7978
7979         * mini.c (optimize_branches): Check regions in the cbranch to throw
7980         block case as well. Fixes #73242.
7981
7982 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7983
7984         * mini.c: thread safety fixes.
7985
7986 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
7987
7988         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
7989         patching stuff, since delegates use jump trampolines so there is
7990         no caller.
7991
7992         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
7993         jump trampolines.
7994         
7995         * tramp-amd64.c: Fix build.
7996
7997         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
7998         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
7999
8000         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
8001         Rename this to mono_arch....
8002         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
8003
8004         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
8005
8006         * mini-amd64.c (emit_call): If both the caller and the callee is
8007         guaranteed to have 32 bit addresses, emit a normal call.
8008
8009         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
8010
8011         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
8012         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
8013         method_ptr inside delegates.
8014
8015 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
8016
8017         * mini.c (mono_jit_free_method): Free the method info even if the native code is
8018         invalidated. Fixes #73001.
8019
8020         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
8021
8022         * mini-x86.c: Only use stdcall for pinvokes on windows.
8023
8024 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
8025
8026         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
8027         * mini-x86.c: remove unreliable __thread var offset detection,
8028         use the correct accessors and enable by default.
8029
8030 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
8031
8032         * mini.c (mono_jit_free_method): Fix memory leak.
8033
8034 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
8035
8036         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
8037
8038 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
8039
8040         * cpu-amd64.md: Fix lengths of atomic opcodes.
8041
8042 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
8043
8044         * driver.c: try to not imply using ICU is any good.
8045
8046 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
8047
8048         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
8049         functions as inline ops.
8050
8051         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
8052         some Interlocked functions as inline ops.
8053
8054         * mini.c (move_basic_block_to_end): Fix bug in last patch.
8055
8056         * mini.h (MonoBasicBlock): Reorganize fields a bit.
8057
8058         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
8059
8060         * mini.c: Add support for OP_NOT_TAKEN.
8061
8062         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
8063         structures in registers for pinvoke wrappers.
8064
8065         * mini-amd64.c: Fix warnings.
8066
8067 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
8068
8069         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
8070
8071         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
8072
8073         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
8074         address instead of loading the address from it.
8075
8076         * mini-x86.c: Add support for returning small structs in registers
8077         on Win32. Fixes part of #70864.
8078         
8079 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
8080
8081         * trace.c (get_token): Improve error checking.
8082
8083 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
8084
8085         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
8086
8087 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
8088  
8089         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
8090         it can be reused for MonoClass.
8091         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
8092         _LINKDEMAND.
8093
8094 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
8095
8096         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
8097         instead of a MonoReflectionMethod. The method information wasn't used
8098         when displaying SecurityException details (but will be now).
8099
8100 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
8101
8102         * Makefile.am : windows build fix.
8103
8104 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
8105
8106         * iltests.il: Add new regression test.
8107
8108         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
8109         #72522.
8110
8111 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
8112  
8113         * mini.c: Moved linkdemand check into helper function check_linkdemand
8114         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
8115         LDFTN, LDVIRTFTN).
8116
8117 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
8118
8119         * declsec.c: Added statistics counter for different kinds of 
8120         LinkDemands.
8121         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
8122         (and commented) declaration.
8123         * mini.c: Added statistics counter for security Demand code 
8124         generation. Added display of security statistics.
8125
8126 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
8127
8128         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
8129         Fix compilation errors under gcc-2.95.
8130
8131 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
8132
8133         * mini.c, driver.c: Use the new jit trampoline hashtable
8134
8135 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8136
8137         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
8138
8139 2005-02-11  Martin Baulig  <martin@ximian.com>
8140
8141         * debug-mini.c (mono_debug_close_method): Free the line number array.
8142
8143 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8144
8145         * aot.c: Break up large methods into smaller ones. Share GOT slots for
8146         icalls.
8147
8148         * mini.h: Bump AOT file format version. 
8149
8150 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
8151
8152         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
8153         APTC and P/Invoke.
8154         * declsec.h: Added macros to get/set lazyly initialized security 
8155         informations about assemblies. Added new enum for different type of
8156         possible LinkDemand violation. Added function to check LinkDemands.
8157         * mini.h: Added a field to MonoCompile to hold any security violation
8158         detected when JITting a method (so it can be thrown later).
8159         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
8160         and CEE_CALLVIRT. Added code to throw exception at the end of
8161         mini_method_compile (note: the exception is unhandled right now).
8162
8163 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
8164
8165         * mini.c, jit-icalls.c: use the managed implementation of
8166         memset for initobj and memset, to avoid managed <-> unmanaged
8167         transitions.
8168
8169 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8170
8171         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
8172         optimization if it would need a GOT var.
8173
8174         * basic.cs: Add tests for constant propagation and switch statements.
8175
8176         * ssa.c: Fix out-of-range constant propagation and switch statements.
8177
8178 2005-02-09    <vargaz@freemail.hu>
8179
8180         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
8181
8182 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
8183
8184         * cpu-amd64.md (load_membase): Fix max length of load_membase.
8185
8186 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8187
8188         * mini.c: update to new signature of mono_class_get_allocation_ftn().
8189
8190 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
8191
8192         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
8193         arithmetic operations.
8194
8195 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
8196
8197         * mini-ppc.c: add a workaround for broken user code that
8198         DllImports vararg functions with non-vararg signatures.
8199
8200 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
8201
8202         * mini.c (mono_jit_compile_method_inner): Add detection and a 
8203         meaningfull error message for assemblies written in Managed C++.
8204
8205         * tramp-amd64.c mini-amd64.h: Add support for 
8206         create_trampoline_from_token ().
8207
8208         * aot.c mini-x86.c abcremoval.c: Applied patch from
8209         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
8210
8211 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
8212
8213         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
8214         which takes a MonoImage/token as parameter instead of a MonoMethod.
8215
8216         * aot.c: Use the new trampoline for initializing vtables.
8217
8218         * aot.c: Add support for ldfld/stfld_remote wrappers.
8219
8220         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
8221         rules for compare <MEM>, IMM.
8222
8223         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
8224
8225         * aot.c: Handle inherited finalizers correctly.
8226
8227 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
8228
8229         * inssel.brg (stmt): Add a missing _setup_... ().
8230
8231         * aot.c: Save some parts of the class state to the AOT file and use it
8232         to recompute that state when a class is initialized.
8233
8234         * mini.c: Install AOT hooks into the runtime.
8235
8236         * mini.h: Bump AOT file format version.
8237         
8238         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
8239         Fixes #72148.
8240
8241         * iltests.il: Add new test.
8242
8243 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8244
8245         * mini.c: fix typo.
8246
8247 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
8248
8249         * mini.c: setup the statistical profiler in the thread attach
8250         callback to cope with the new single thread code.
8251
8252 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
8253
8254         * mini-ppc.c: ensure we have enough room for the profiler
8255         calls (fixed bug#72084).
8256
8257 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
8258
8259         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
8260         it.
8261
8262 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8263
8264         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
8265
8266 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8267
8268         * ssapre.c: Fixed an issue with down safety (this allows IronPython
8269         to succesfully execute parrotbench).
8270         * ssapre.h: Likewise.
8271
8272 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8273
8274         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
8275         variable for stores to method arguments (fixes a SSAPRE issue).
8276
8277 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8278
8279         * mini.c: handle value types in dup, fixes gen-112.cs.
8280
8281 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
8282
8283         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
8284         sequence for calls in dynamic methods to avoid thunks.
8285
8286 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
8287
8288         * mini.c: correctly remove dynamic methods from the hashtable.
8289
8290 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8291
8292         * driver.c: Disabled SSAPRE until fix the bug that appears
8293         in IronPython's parrotbench.
8294
8295 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
8296
8297         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
8298
8299         * mini.c (mono_method_to_ir): Revert the previous change.
8300         
8301         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
8302         when AOT compiling.
8303
8304         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
8305         mono_jit_info_table_find () etc. when running under valgrind.
8306
8307         * inssel.brg: Fix warnings.
8308
8309         * mini-exceptions.c: Fix warnings.
8310
8311 2005-01-31  Martin Baulig  <martin@ximian.com>
8312
8313         * driver.c (compile_all_methods_thread_main): Don't try to compile
8314         generic methods or anything which has type parameters.
8315
8316 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
8317
8318         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
8319
8320         * TestDriver.cs: Add --verbose flags.
8321
8322         * graph.c ssa.c: Fix 64 bit warnings.
8323         
8324         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
8325         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
8326         Fix 64 bit warnings.
8327
8328         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
8329         variable not spotted by gcc.
8330         
8331         * mini-amd64.c inssel-amd64.brg: Applied patch from  
8332         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
8333         X86_COMPARE_MEMBASE opcodes.
8334
8335         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
8336
8337 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
8338
8339         * *: MonoMethod->signature might be NULL now. You *MUST* use
8340         mono_method_signature.
8341
8342 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8343
8344         * driver.c (compile_all_methods_thread_main): Compile the methods
8345         without invoking cctors.
8346
8347 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8348
8349         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
8350         * basic-calls.cs: test for the above.
8351
8352 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8353
8354         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
8355         MonoJitInfo changes.
8356
8357 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
8358
8359         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
8360         eagerly if it contains dynamic methods.
8361         
8362         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
8363
8364         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
8365         trace, it is now computed by an icall from trace_ips.
8366         
8367         * mini-exceptions.c: Fix a warning.
8368
8369 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
8370
8371         * mini-exceptions.c: don't bother getting stack trace info if
8372         it's not going to be used.
8373
8374 2005-01-27  Raja R Harinath  <rharinath@novell.com>
8375
8376         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
8377         ssapre-mini-ops.h.
8378
8379 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
8380
8381         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
8382
8383         * aot.c: Avoid calling mono_method_get_header () if not needed.
8384
8385         * mini.h: Bump AOT file format version.
8386         
8387         * mini.c (mono_emit_native_call): Allocate a GOT var here.
8388
8389         * mini.c (mono_print_tree): Print more info for calls.
8390
8391 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
8392
8393         * declsec.h: Remove warning by adding missing include for marshal.h
8394
8395 2005-01-26  Martin Baulig  <martin@ximian.com>
8396
8397         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
8398         `ip' twice.
8399
8400 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
8401
8402         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
8403         flags.
8404
8405         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
8406
8407         * aot.c (mono_compile_assembly): Fix a warning.
8408
8409 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
8410
8411         * declsec.c: Look for security attributes on the original MonoMethod 
8412         (and not the wrapped one). This fix permissions on icalls.
8413
8414 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8415
8416         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8417
8418         * mini.c (mono_allocate_stack_slots): Add a fixme.
8419
8420         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8421
8422 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
8423
8424         * inssel.brg: optimize casts of sealed types (more
8425         optimizations waiting for fixes in remoting).
8426
8427 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8428
8429         * inssel.brg (stmt): Add another dummy rule.
8430
8431         * driver.c: Fix warnings.
8432
8433         * driver.c (mono_main): If running under valgrind, instruct glib to use
8434         the system allocation functions so valgrind can track the memory
8435         allocated by the g_... functions.
8436
8437         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
8438
8439         * mini-ops.h: Add OP_DUMMY_STORE opcode.
8440
8441         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
8442
8443         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
8444         variables in try regions.
8445
8446         * mini.c (mini_method_compile): Don't disable optimizations on large
8447         methods when AOT compiling.
8448
8449         * mini.c (mono_allocate_stack_slots): New arch independent method to 
8450         allocate stack slots. Not yet used.
8451
8452 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
8453
8454         * debug-mini.c (mono_debug_close_method): Plug some leaks.
8455
8456 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
8457
8458         * mini-ppc.c: make the branch info relative as the code
8459         buffer can be reallocated.
8460
8461 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
8462
8463         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
8464         * driver.c: Removed the AOT/security restriction. Now initialize the
8465         security manager (in metadata) if --security is used.
8466         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
8467         rather than the pointer to declarative security, when AOT is used.
8468
8469 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
8470
8471         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
8472         basic blocks, reduced intrinsic exception throwing code size.
8473
8474 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
8475
8476         * driver.c (mini_usage): Reorder the usage screen.
8477
8478 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
8479
8480         * mini.c (mono_resolve_patch_target): Fix warning.
8481
8482 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
8483
8484         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
8485         previous patch.
8486
8487         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8488
8489         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
8490         breaks the amd64 build.
8491
8492         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
8493         register allocation. Fixes #71454.
8494
8495         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8496
8497         * arrays.cs: Add new regression test.   
8498
8499 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8500
8501         * ssapre.c: Turned usage of snprintf to GString.
8502         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
8503         (I left it on by mistake in my previous commit).
8504
8505 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
8506
8507         * mini.c, cfold.c, basic-calls.cs: preserve side effects
8508         on cond branch optimization (fixes bug# 71515).
8509
8510 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8511
8512         * abcremoval.c: Fixed bug 71062.
8513         * abcremoval.h: Likewise.
8514
8515 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8516
8517         * mini.c: Added a new functionality to optimize_branches, the removal
8518         of useless basic blocks, and fixed some problem in the removal of
8519         critical edges; some utility functions added for both purposes.
8520         * ssapre.c: Added complex expression support, and fixed bug 70637.
8521         * ssapre.h: Likewise.
8522         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
8523         enabled in SSAPRE.
8524         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
8525         * driver.c: Re-enabled SSAPRE.
8526
8527 2005-01-19  Martin Baulig  <martin@ximian.com>
8528
8529         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
8530         the result of mono_get_method_constrained().
8531
8532 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
8533
8534         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
8535         manager.
8536
8537 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
8538
8539         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
8540         be detected.  Fixes #59296.
8541
8542 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8543
8544         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
8545         which can happen. Fixes #71361.
8546
8547 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8548
8549         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
8550         manager.
8551
8552 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8553
8554         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
8555         appdomain-unload.exe to fail.
8556         
8557         * mini.c: Fix some memory leaks.
8558
8559 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
8560
8561         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
8562         Fixed bug and sped up some codepaths.
8563
8564 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8565
8566         * mini.c: Fix some memory leaks.
8567
8568         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
8569         conversion.
8570
8571         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
8572
8573         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
8574         #71320.
8575
8576         * iltests.il: Add regression test for #71320.
8577
8578 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
8579
8580         * mini.c (mono_codegen): Fix installation of profiler hooks.
8581
8582         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
8583
8584 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8585
8586         * mini.h, mini.c, cfold.c: optimize access to enum
8587         readonly fields, too. Eval conditional branches if possible
8588         to perform unreachable code removal in more cases.
8589
8590 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
8591
8592         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
8593
8594         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
8595         code manager.
8596
8597         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
8598         WinXP DEP. Fixes #71244.
8599
8600 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
8601
8602         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
8603
8604 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
8605
8606         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
8607
8608 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
8609
8610         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
8611         changes.
8612
8613         * mini.h: Bump AOT version.
8614
8615         * mini.h (MonoCompile): Change exvar to a hash table.
8616
8617         * mini.c: Allocate a separate exvar for each handler block.
8618
8619         * mini.c: Get rid of the computation of filter_lengths, its not needed.
8620
8621         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
8622         ex var with the pending exception and only throw if the two are equal.
8623         Fixes #68552.
8624         
8625         * exceptions.cs: Add tests for rethrow and nested catch clauses.
8626
8627         * mini-x86.c: Fix warnings.
8628
8629         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
8630         used by all the ports now.
8631
8632         * aot.c: Add write-symbols and save-temps options.
8633
8634 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8635
8636         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
8637
8638 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
8639
8640         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
8641         operations.
8642
8643         * tramp-s390.c: Check vtable slot belongs to the domain.
8644
8645         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
8646         as per other platforms.
8647
8648         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
8649
8650 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
8651
8652         * driver.c: we don't run the Main() code in a subthread anymore.
8653
8654 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
8655
8656         * mini.c: added experimental rtc support in the statistical
8657         profiler: if the user has the permission, more accurate statistics
8658         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
8659         The MONO_RTC value must be restricted to what the linux rtc allows:
8660         power of two from 64 to 8192 Hz.
8661
8662 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8663
8664         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
8665
8666 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
8667
8668         * mini-ppc.c: better icache flush for smp.
8669
8670 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
8671
8672         * mini-amd64.c (emit_move_return_value): Fix memory leak.
8673
8674         * mini-x86.c (get_call_info): Add the get_call_info () code from the
8675         amd64 port, not yet used.
8676
8677 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8678
8679         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
8680         a struct type.
8681
8682 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
8683
8684         * driver.c: Added --security option to activate the security manager.
8685         Right now this will allow code generation for declarative demands and
8686         is disabled when AOT is specified.
8687         * mini.c: Add code generation for declarative security demands.
8688         * mini.h: Add mono_use_security_manager as an extern gboolean.
8689
8690 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8691
8692         * aot.c (mono_compile_assembly): Speed up compilation a bit by
8693         emitting more dense assembly code.
8694
8695         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
8696         exception throwing stuff.
8697
8698 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
8699
8700         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
8701         dead code.
8702
8703         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
8704         left in by mistake.
8705
8706         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
8707         fixed.
8708
8709         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
8710
8711         * tramp-*.c: Only patch vtable slots if the object is in the current
8712         domain. Fixes appdomain-unload.exe.
8713
8714         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
8715         
8716         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
8717         x86 branch.
8718
8719 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8720
8721         * mini.c (reverse_branch_op): New helper function.
8722
8723         * mini.c (optimize_branches): Run the new optimization only on 
8724         platforms which support it. Also reverse all kinds of branches.
8725
8726         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
8727
8728         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
8729         a throw statement.
8730
8731         * mini.c (optimize_branches): Reverse not-equals branches if the false
8732         bblock is a throw. This happens a lot of time with argument checking in
8733         corlib.
8734
8735         * mini.c (mono_codegen): Add support for placing basic blocks after
8736         the function epilogue.
8737
8738         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
8739         function epilogue.
8740         
8741 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
8742
8743         * mini.c (setup_stat_profiler): Only set this up if the platform
8744         supports ITIMER_PROF.
8745
8746 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8747
8748         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
8749         previous patch.
8750
8751         * inssel.brg: Fix a warning.
8752
8753 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
8754
8755         * mini.c: added support for statistical profiler 
8756         (run with: --profile=default:stat).
8757
8758 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
8759
8760         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
8761
8762         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
8763
8764         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
8765         related to global registers from the amd64 port.
8766
8767 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
8768
8769         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
8770
8771         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
8772         with global registers.
8773         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
8774
8775         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
8776
8777 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
8778
8779         * debug-mini.c (encode_value): Fix off-by-one.
8780
8781         * aot.c (encode_value): Likewise.
8782
8783         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
8784
8785 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
8786
8787         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
8788         AOT.
8789
8790         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
8791         
8792         * aot.c (emit_method_info): Increase size of temp buffer.
8793
8794         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
8795         the AOT case.
8796
8797 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
8798
8799         * aot.c (emit_method_info): Fix build.
8800         
8801         * aot.c: Further rework of the AOT file format to reduce the size of
8802         the method info data.
8803
8804         * mini.h: Bump AOT file format version.
8805
8806 2004-12-27  Martin Baulig  <martin@ximian.com>
8807
8808         * mini.c (mini_get_method): New static method; call
8809         mono_get_method_full() and mono_get_inflated_method().
8810         (mono_method_to_ir): Use mini_get_method() instead of
8811         mono_get_method_full(). 
8812
8813 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
8814
8815         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
8816
8817 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
8818
8819         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
8820
8821         * inssel-amd64.brg: Add some optimization rules.
8822
8823 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
8824
8825         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
8826         standard not GC'd stuff is fine.
8827
8828 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
8829
8830         * aot.c: Rework the AOT file format to get rid of most of the global
8831         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
8832
8833         * mini.h: Bump AOT file format version.
8834         
8835 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
8836
8837         * mini.h: Bump AOT file format version.
8838
8839         * aot.c (mono_aot_is_got_entry): New function to determine if an 
8840         address is inside a GOT.
8841
8842         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
8843
8844         * cpu-pentium.md: Increase the maximum size of some instructions which
8845         might involve a got access.
8846         
8847         * mini.c (get_method_from_ip): Another debug helper function.
8848
8849         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
8850         when got var accesses are created during the decompose phase.
8851
8852         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
8853
8854         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
8855         argument mini_compile_method and to MonoCompile, and use this to
8856         determine whenever a given method is compiled for AOT. This allows the
8857         other methods compiled during AOT compilation to be free of AOT stuff,
8858         so the backends does not need to add special support for them by
8859         creating a fake GOT etc.
8860
8861         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
8862         longer needed.
8863
8864 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
8865
8866         * mini.c (mono_method_to_ir): It turns out that some of the
8867         x-appdomain wrappers are lax with types, so just ignore this for
8868         all wrappers.
8869
8870         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
8871         at the vtable->klass. If it is non-shared code we can just use the
8872         vtable.
8873
8874 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
8875
8876         * mini-ppc.c: access MonoDomain from tls, too.
8877
8878 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
8879
8880         * declsec.c: Removed unused variable (and related warning ;-)
8881
8882 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
8883
8884         * iltests.il: New test for LDELEMA on an array of ref types.
8885
8886         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
8887         all ldelema's on reftypes.
8888         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
8889         it was the wrong place to put it.
8890
8891         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
8892         register to pop to make this cleaner, at the request of Paolo.
8893
8894 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8895
8896         * mini-ops.h (OP_GETHASHCODE): New op.
8897
8898         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
8899
8900         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
8901         operation.
8902
8903         For a microbenchmark, this reduces the cost of Hashtable.get_Item
8904         by 25%.
8905         
8906         * mini-x86.c (mono_arch_output_basic_block): Rather than
8907
8908         add ebp, 4
8909
8910         Emit
8911
8912         pop edx
8913
8914         The first is 3 bytes while the second is 1. This saves 36 kb on
8915         mscorlib, quite a big saving. When bootstraping mcs, I was able to
8916         see a small boost because of icache locality.
8917
8918         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
8919
8920 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
8921
8922         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
8923         started code sharing with the generic code.
8924
8925 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
8926
8927         * mini-ppc.c, cpu-g4.md: added code for direct access to
8928         tls data slots.
8929
8930 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
8931
8932         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
8933          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
8934         to OP_TLS_GET.
8935
8936 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
8937
8938         * declsec.c|h: Added functions to cache the declarative stack modifiers
8939         in MonoJitInfo and to create a security frame from a MonoJitInfo 
8940         structure.
8941         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
8942         created. Register internal calls for System.Security.SecurityFrame::
8943         _GetSecurityFrame and _GetSecurityStack.
8944         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
8945         the definitions for the new stack walk/callback mechanism.
8946         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
8947         first security frame for LinkDemands and InheritanceDemands) and
8948         GetSecurityStack for Demands. Both use the new mono_walk_stack code
8949         from lupus.
8950         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
8951         walk initialization (lupus).
8952
8953 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8954
8955         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
8956         idiom.
8957         (handle_loaded_temps): Do not create a temporary variable for
8958         things that we know are temps. They will never be modified.
8959         (mono_spill_call): Set MONO_INST_IS_TEMP
8960         (mono_emulate_opcode): ditto
8961         (emit_tree): ditto
8962         (mono_method_to_ir.CEE_DUP): ditto
8963
8964 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
8965
8966         * mini.c (type_to_eval_stack_type): Make this handle the void type
8967         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
8968         (emit_tree): use ip_in_bb to special case some common idioms
8969         Update all callers to pass in the IP.
8970         (mono_method_to_ir): Make CEE_CALL* do the above as well.
8971
8972         This gives us a nice 2% speedup in mcs bootstrap.
8973
8974         * mini-x86.c (peephole_pass): Peephole pass to make
8975         mov  [foo], eax
8976         push [foo]
8977
8978         into
8979
8980         mov [foo], eax
8981         push eax
8982
8983         * mini.c (ip_in_bb): new method.
8984         (mono_method_to_ir): use this method rather than doing the hash
8985         lookup ourselves.
8986
8987         * linear-scan.c (mono_linear_scan): When expiring actives, you
8988         don't need to keep around variables that expire on this
8989         instruction. This makes it so that:
8990              a = b + 1
8991         will turn into:
8992              store (ebx add (ebx, 1))
8993         which will become
8994              add ebx, 1
8995
8996 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
8997
8998         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
8999         combination to avoid doing two copies. Fix up problems with previous
9000         patch.
9001
9002         * mini.c: Fix 64 bit warnings.
9003
9004         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
9005
9006 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
9007
9008         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
9009         changes from the x86 code.
9010
9011         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
9012
9013 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
9014
9015         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
9016         throwing code to reduce its size, unify the AOT and non-aot code and 
9017         get rid of relocations in the AOT case.
9018
9019         * mini-x86.h mini.c exceptions-x86.c 
9020         (mono_arch_get_throw_corlib_exception): New arch specific function to 
9021         raise corlib exceptions which doesn't require relocations in the 
9022         caller.
9023
9024         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
9025
9026 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
9027
9028         * mini.c (mono_emit_method_call): Only allocate the got var when it is
9029         needed.
9030
9031         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
9032         in the AOT case.
9033
9034 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9035
9036         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
9037         with add function when used from Inc/dec atomic 
9038         functions. Re-enabled optimization on x86.
9039         * mini-ops.h: renamed atomic_add functions to
9040         allow _add to match the Interlocked::Add and
9041         _add_next to match Interlocked::Inc/Dec.
9042
9043 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
9044
9045         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
9046         linking of BBs to the end BB, and enabled SSAPRE also with
9047         consprop and copyprop (which was prevented by that bug).
9048
9049 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9050
9051         * mini-x86.c: disabling the Interlocked optimizing code. 
9052
9053 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
9054
9055         * aot.c (load_aot_module): Move reading of got_addr after the AOT
9056         file version check.
9057         
9058 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9059
9060         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
9061         interlocked optimization due lack of support on x86, rewrote 
9062         exchange to take into account that base may be in eax.
9063         
9064         xsp works again; activated Interlocked optimizing code.
9065         
9066 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
9067
9068         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
9069
9070 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
9071
9072         * mini-ops.h: Add new opcodes.
9073
9074         * mini.h: Add new patch types. Add got_var to MonoCompile.
9075
9076         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
9077         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
9078         make it work with all kinds of patchable code.
9079
9080         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
9081         address of the GOT, and referencing entries in the GOT.
9082
9083         * mini.c: Add code to load the GOT address if needed by an opcode.
9084
9085         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
9086         independent AOT code on the x86 using an elf-style Global Offset Table.
9087
9088 2004-12-14  Raja R Harinath  <rharinath@novell.com>
9089
9090         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
9091
9092 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9093
9094         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
9095         when running xsp.
9096
9097 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
9098
9099         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
9100         of Interlocked:Increment/Decrement/Add as inline ops.
9101         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
9102
9103 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
9104
9105         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
9106         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
9107
9108 2004-12-12  Duncan Mak  <duncan@ximian.com>
9109
9110         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
9111         again. `patch_info->table_size' is no longer valid after Zoltan's
9112         commit #37636.
9113
9114 2004-12-12  Martin Baulig  <martin@ximian.com>
9115
9116         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
9117         if we are the "real" method, ie. not an inlined method inside it.
9118
9119 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
9120
9121         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
9122         before we look in the special fields table. This fixes
9123         ../tests/thread-static-init.cs.
9124
9125 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9126
9127         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
9128         for Array get_Rank and get_Length. Fixes bug #70465.
9129
9130 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
9131
9132         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
9133         separate structure to reduce the size of MonoJumpInfo.
9134
9135 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
9136
9137         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
9138
9139 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
9140
9141         * mini.c (mini_get_inst_for_method): Changed to allow ports
9142         to return a MonoInst instead of opcode 
9143         (renamed mini_get_opcode_for_method to better reflect the new functionality)
9144         
9145         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
9146         Allow ports to return a created MonoInst instead of op-code, will enable
9147         new optimizations.
9148         (renamed mini_get_opcode_for_method to better reflected the functionality)
9149
9150 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
9151
9152         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
9153
9154 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9155
9156         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
9157         Fixes #69985.
9158
9159 2004-12-08  Martin Baulig  <martin@ximian.com>
9160
9161         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
9162         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
9163
9164 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9165
9166         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
9167         correctly.
9168
9169         * exceptions.cs: Disable some tests which depend on properties of x86 fp
9170         arithmetic.
9171
9172 2004-12-08  Raja R Harinath  <rharinath@novell.com>
9173
9174         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
9175
9176 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
9177
9178         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
9179         bug introduced by the previous patch.
9180
9181 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9182
9183         * mini-ppc.c, objectc.cs: handle large structs passed by value
9184         (fixes bug #69972).
9185
9186 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
9187
9188         * mini-ppc.c: OP_ARGLIST implementation from
9189         Geoff Norton  <gnorton@customerdna.com>.
9190
9191 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
9192
9193         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
9194         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
9195
9196 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9197
9198         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
9199
9200 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9201
9202         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
9203         support.
9204
9205 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
9206
9207         * mini-sparc.c: Zero out localled-ed memory.
9208
9209         * iltests.il: Add tests for zeroing out localloc-ed memory.
9210
9211 2004-12-04  Martin Baulig  <martin@ximian.com>
9212
9213         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
9214         mono_method_get_signature_full().       
9215
9216 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
9217
9218         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
9219         and some utility functions (always for SSAPRE), integrated SSAPRE.
9220         * mini.h: Likewise.
9221         * driver.c: Added ssapre option.
9222         * ssa.c: Small fix on OP_ARG handling.
9223         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
9224         * Makefile.am: Likewise.
9225
9226 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
9227
9228         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
9229         now in the xp code.
9230
9231         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
9232         icall.
9233
9234 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9235
9236         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
9237         
9238         * cpu-s390.md : Increase instruction length of oparglist.
9239
9240         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
9241
9242 2004-11-30  Martin Baulig  <martin@ximian.com>
9243
9244         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
9245         virtual generic methods.  We call a special helper_compile_generic_method()
9246         icall to retrieve the method from the vtable, inflate and compile
9247         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
9248
9249         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
9250
9251 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
9252
9253         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
9254
9255 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
9256
9257         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
9258         Fixes #69929.
9259
9260 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
9261
9262         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
9263         platforms with PIC aot.
9264
9265 2004-11-28  Martin Baulig  <martin@ximian.com>
9266
9267         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
9268         Fixes gen-112.cs.
9269
9270 2004-11-28  Martin Baulig  <martin@ximian.com>
9271
9272         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
9273         the result of mono_type_get_underlying_type() to check whether
9274         we're byref.
9275
9276 2004-11-26  Martin Baulig  <martin@ximian.com>
9277
9278         * mini.c
9279         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
9280         in the g_assert().
9281
9282 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
9283
9284         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
9285         the same way as the other arguments so they won't get clobbered.
9286
9287         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
9288         calls through R11 since it is clobbered by the trampoline code.
9289
9290 2004-11-26  Raja R Harinath  <rharinath@novell.com>
9291
9292         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
9293         pick up in-tree mscorlib.dll.
9294
9295 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
9296
9297         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
9298
9299         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
9300         runtime data/code are now stored in a table similar to the GOT in ELF. 
9301         This allows the code itself to be position independent.
9302
9303         * aot.c: Fix loading of referenced assemblies after the lazy assembly
9304         loading changes.
9305
9306         * aot.c: Attach ELF type (object/function) directives to all global
9307         symbols.
9308
9309         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
9310
9311         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
9312
9313         * mini-amd64.h: Turn on PIC AOT code.
9314
9315         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
9316         returning the offset within an OP_AOTCONST instruction where the GOT
9317         offset needs to be added.
9318
9319         * mini.h: Bump AOT file format version.
9320
9321 2004-11-25  Martin Baulig  <martin@ximian.com>
9322
9323         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
9324         uninflated generic methods.
9325
9326 2004-11-25  Martin Baulig  <martin@ximian.com>
9327
9328         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
9329
9330 2004-11-24  Martin Baulig  <martin@ximian.com>
9331
9332         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
9333         original klass (this only applies for generic instances).
9334
9335 2004-11-24  Martin Baulig  <martin@ximian.com>
9336
9337         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
9338         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
9339         that array).
9340
9341 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
9342
9343         * mini.c (mono_method_to_ir): Disable inlining for methods containing
9344         localloc. Fixes #69678.
9345
9346         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
9347         
9348 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
9349
9350         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
9351         used SSE registers on pinvoke calls. Fixes #69774.
9352
9353 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
9354
9355         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
9356         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
9357
9358 2004-11-23  Raja R Harinath  <rharinath@novell.com>
9359
9360         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
9361         Refer directly to the mcs/ tree.
9362
9363 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9364
9365         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
9366         Check if a trampoline for a synchronized method is required. 
9367
9368 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
9369
9370         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
9371         with localloc if needed. Throe arithmetric exception in
9372         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
9373         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
9374
9375 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
9376
9377         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
9378         types before switching on type.  Fixes #69622.
9379
9380 2004-11-19  Raja R Harinath  <rharinath@novell.com>
9381
9382         * Makefile.am (check-local): New.  Integrate into 'make check'.
9383         (MCS,RUNTIME): Define using in-tree mono and mcs.
9384         (ILASM): New.
9385         (%.exe): Use $(ILASM).
9386
9387 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
9388
9389         * mini-ppc.c: adjust initial prolog size (bug #69691).
9390
9391 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
9392
9393         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
9394         #69664.
9395
9396 2004-11-17  Raja R Harinath  <rharinath@novell.com>
9397
9398         * Makefile.am (clean-local): Rename from 'clean'.
9399
9400 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9401
9402         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
9403         to mono_arch_is_int_overflow. 
9404         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
9405         SIGFPE events.
9406
9407 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
9408
9409         * declsec.c|h: New files to support declarative security attributes.
9410         Added function to check if a method has (applicable) security.
9411         * mini.c|h: Add check for declarative security attributes in
9412         mono_method_check_inlining.
9413         * Makefile.am: Added declsec.c and declsec.h to the build.
9414
9415 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
9416
9417         * mini.c, mini.h: update to keep dynamic code info per-domain.
9418
9419 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
9420
9421         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
9422         (mini_init): Get rid of it from here too.
9423
9424 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
9425
9426         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
9427         implemented OP_RETHROW (patch by Geoff Norton
9428         <gnorton@customerdna.com>).
9429
9430 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
9431
9432         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
9433         between appdomains.  Fixes appdomain-unload on PPC.
9434
9435 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
9436
9437         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9438         mini-exceptions.c: handle the new wrapper types.
9439         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
9440         token value as a MonoClass* when compiling a wrapper.
9441         mono_jit_create_remoting_trampoline now takes an additional
9442         MonoRemotingTarget parameter.
9443         
9444 2004-11-10  Martin Baulig  <martin@localhost>
9445
9446         * mini.c (mono_method_to_ir): Use `generic_container->context'
9447         rather than creating a new one.
9448
9449 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9450
9451         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
9452
9453         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
9454
9455 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
9456
9457         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
9458         the experimental aot cache stuff.
9459
9460 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
9461
9462         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9463         mini-exceptions.c: update to exception clause structure changes.
9464
9465 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9466
9467         * exceptions-x86.c (throw_exception): Fix warnings.
9468
9469         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
9470         for OP_RETHROW.
9471
9472 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9473
9474         * exceptions-sparc.c (get_throw_exception): Really fix this.
9475
9476 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
9477
9478         * tramp-*.c: we no longer support icalls without wrappers, so
9479         a bit of code can be removed here
9480
9481 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
9482
9483         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
9484         patch.
9485
9486         * cpu-sparc.md: Add op_rethrow.
9487
9488         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
9489
9490         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
9491
9492         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
9493         * mini-ops.h: Add OP_RETHROW.
9494
9495         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
9496
9497         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
9498
9499 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
9500         
9501         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
9502         Makes the output much easier to read
9503
9504 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
9505
9506         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
9507         prevents another huge leak when compiling with ssa. Secondly, the
9508         performance of doing this rather than freeing the lists is much
9509         better. GList does a lock every time you allocate a list link,
9510         so that it can use a memory pool. So, it is better to just use
9511         a memory pool of our own.
9512         
9513         * ssa.c, linear-scan.c: replace g_list_remove_link with
9514         g_list_delete.  The remove one does not free the GList, so we were
9515         leaking memory. On -O=all --compile-all with corlib, this cut down
9516         3 MB of allocations.
9517
9518 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
9519
9520         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
9521
9522         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
9523
9524         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
9525         into a new function mono_create_jit_trampoline ().
9526
9527 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
9528
9529         * trace.c (get_spec): Allow tracing of classes without a namespace.
9530
9531 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
9532
9533         * mini.c: Fix pointer overwrite in mini_method_compile.
9534
9535 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
9536
9537         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
9538         The darwin ABI needs some special handling for 1 and 2 byte structs
9539         Lets use lbz/lhz instead of lwz everywhere.
9540         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
9541         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
9542         Use stb/sth for the former, and put the latter always on stack instead of in
9543         argument registers.
9544
9545 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
9546
9547         * trace.c (is_filenamechar): Add '_'.
9548
9549 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
9550
9551         * mini-s390.c: Fix prolog length to allow for large trace requirements.
9552
9553         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
9554
9555 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
9556
9557         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
9558         depends on libmonogc. Fixes #68805.
9559
9560 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
9561
9562         * mini.c (mono_jit_free_method): Provide extra information for
9563         this error.  Currently this leaks, but will be turned into a
9564         developer option in the future.
9565
9566 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
9567
9568         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
9569
9570 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
9571
9572         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
9573         boundary. Fixes reading of PATCH_INFO_R4 and R8.
9574         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
9575
9576 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
9577
9578         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
9579         trampolines for AOT code.
9580
9581 2004-10-22    <vargaz@freemail.hu>
9582
9583         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
9584         constructed types. Fixes #68136.
9585
9586 2004-10-21  Martin Baulig  <martin@ximian.com>
9587
9588         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
9589         if it returns true, unwind the stack to the call instruction.
9590
9591 2004-10-21    <vargaz@freemail.hu>
9592
9593         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
9594
9595         * mini.h: Bump AOT version number.
9596
9597         * objects.cs: Add another test for unbox trampolines.
9598
9599         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
9600         valuetype methods.
9601
9602 2004-10-20    <vargaz@freemail.hu>
9603
9604         * driver.c: Add SHARED to the set of optimizations tested.
9605
9606         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
9607
9608         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
9609         used by CEE_NEWARR.
9610
9611         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
9612
9613 2004-10-20  Martin Baulig  <martin@ximian.com>
9614
9615         * mini-exceptions.c (mono_handle_exception): Call
9616         mono_debugger_handle_exception() to tell the debugger about
9617         catch/finally clauses.
9618
9619 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
9620
9621         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
9622
9623         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
9624         #68447.
9625
9626 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
9627
9628         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
9629         methods as their native size, fixed bug #57543, #57545.
9630         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
9631         This saves a temporary register and mullw call down into 1 (minor perf
9632         increase for cases like sum = sum * 5;  This use to translate into:
9633             li r11,5
9634             mullw r28,r28,r11
9635         It now translates to
9636             mulli r28,r28,5
9637
9638 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
9639
9640         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
9641         #68388.
9642
9643 2004-10-11  Martin Baulig  <martin@ximian.com>
9644
9645         * mini.c (mono_method_to_ir): If we're a generic method, get the
9646         MonoGenericContainer from our MonoMethodNormal and create a
9647         MonoGenericContext from it.
9648
9649 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
9650
9651         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
9652
9653         * basic-long.cs: Add test for checked i8->i2 cast.
9654
9655 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9656
9657         * inssel-ppc.brg: added a couple of speedup rules.
9658
9659 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
9660
9661         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
9662         to speed up rebuilds.
9663
9664 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9665
9666         * mini-s390.c: Minor fix to OP_OR_IMM.
9667
9668 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
9669
9670         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
9671         better. Fixes appdomain-unload.exe on sparc.
9672
9673 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
9674
9675         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
9676         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
9677         see bug 67324.
9678
9679 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
9680
9681         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
9682
9683 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
9684
9685         * mini.c: Always generate a field read/write wrapper for members
9686         of the class MarshalByRefObject since the actual instance could
9687         be a CBO.
9688
9689 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
9690
9691         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
9692
9693 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
9694
9695         * driver.c mini.h trace.c: Move the setting of the main assembly into
9696         a separate function called mono_trace_set_assembly () and call it after
9697         actually loading the main assembly. Fixes #66872.
9698
9699 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
9700
9701         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
9702         using the code manager.
9703
9704 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
9705
9706         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
9707
9708 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
9709
9710         * cpu-amd64.md: Fix bug in previous patch.
9711         
9712         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
9713         #66650.
9714
9715 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
9716
9717         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9718         mini-exceptions.c: updates for changed stack walk interface.
9719
9720 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9721
9722         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
9723
9724 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
9725
9726         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
9727
9728 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
9729
9730         * driver.c (mini_regression_list): Do not call mono_assembly_close 
9731         since assemblies can't be unloaded.
9732         
9733 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9734
9735         * cpu-amd64.md: Fix more instruction lengths.
9736
9737         * cpu-amd64.md: Fix lengths of some instructions.
9738
9739 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
9740
9741         * inssel.brg: Make the array ldelema check aot friendly.
9742
9743 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9744
9745         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
9746
9747         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
9748
9749 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
9750
9751         * mini-x86.c: Fix build.
9752
9753         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
9754         mono_type_get_underlying_type () helper function to simplify code.
9755         
9756 2004-09-09  Martin Baulig  <martin@ximian.com>
9757
9758         * mini-amd64.c: Don't access `type->data.klass' directly, call
9759         mono_class_from_mono_type() instead since the type may be a
9760         generic instance.
9761
9762 2004-09-09  Martin Baulig  <martin@ximian.com>
9763
9764         * mini-amd64.c (get_call_info): Fix support for generic instances.
9765         (add_valuetype): Use mono_class_from_mono_type() to get the class
9766         since we can be a generic instance.
9767
9768 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
9769
9770         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
9771
9772 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
9773
9774         * liveness.c: reset spill costs on each scan: bug 62107
9775
9776 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
9777
9778         * exceptions-sparc.c (mono_arch_find_jit_info): remove
9779         unnecessary line that doesn't compile
9780
9781 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
9782
9783         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
9784         trampolines, make them call an error function so people can fix their
9785         code.
9786
9787 2004-09-06  Martin Baulig  <martin@ximian.com>
9788
9789         * mini.c (mono_method_to_ir): When initializing locals, handle a
9790         generic instances like a valuetype if it's a valuetype and like a
9791         class if it's a class.
9792
9793 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9794
9795         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
9796         stack. Fixes #64674.
9797
9798         * exceptions.cs: Add test for unwinding of call arguments.
9799
9800 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
9801
9802         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
9803         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
9804         set the carry/borrow flag). The sparc and s390 implementations
9805         can now use optimized versions (and simplify the code). ppc bugfixes.
9806
9807 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9808
9809         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
9810
9811 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
9812
9813         * inssel-amd64.brg: Remove leftover 32 bit rule.
9814
9815         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
9816
9817 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
9818
9819         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
9820         mono_arch_find_jit_info functions into a new function. Fix a memory
9821         leak.
9822
9823         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
9824         refactored code.
9825         
9826 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9827
9828         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
9829         as well.
9830         
9831         * exceptions.cs: Add array size tests.
9832
9833         * mini.c: Allocate a separate icall wrapper for each arity of 
9834         mono_array_new_va. Fixes #59509.
9835
9836         * exceptions.cs: Add testcase for 64578.
9837
9838         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
9839
9840         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
9841         
9842 2004-09-02  Martin Baulig  <martin@ximian.com>
9843
9844         * mini.c (mono_method_to_ir): When initializing the locals, call
9845         handle_initobj() on the generic instance itself, not its
9846         underlying type.
9847
9848 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9849
9850         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
9851         MonoJitInfo for dynamic methods.
9852
9853         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
9854
9855         * mini.c: Add support for freeing JIT data for dynamic methods.
9856         
9857 2004-09-01  Martin Baulig  <martin@ximian.com>
9858
9859         * mini-x86.c (is_regsize_var): Added support for generic
9860         instances.
9861         (mono_arch_emit_prolog): Make this compile again, use
9862         `x86_push_imm_template (code)'.
9863
9864 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
9865
9866         * mini-x86.c: make all push_imm instructions that get
9867         patched always emit the long form
9868
9869 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
9870
9871         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
9872         in a per-domain hash.
9873
9874         * mini-amd64.c (merge_argument_class_from_type): Handle generic
9875         types.
9876
9877 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
9878
9879         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
9880         work.
9881         
9882         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
9883         work.
9884
9885         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
9886         Beginnings of SSE2 support.
9887
9888         * exceptions.cs: Add more tests for checked int<->uint casts.
9889
9890 2004-08-28  Martin Baulig  <martin@ximian.com>
9891
9892         * mini-x86.c (mono_arch_instrument_epilog): Added support for
9893         generic instances.
9894
9895         * mini.c
9896         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
9897         Handle generic instances recursively.
9898
9899 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9900
9901         * iltests.il: test for conv.u8 on a constant
9902
9903 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9904
9905         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
9906         LCONV_x4 (shrun_32 (membase)).
9907
9908 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9909
9910         * inssel-x86.brg: c&p rules for push/setret of long
9911
9912 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
9913
9914         * inssel-x86.brg: c&p rules for compare (base, regvar) and
9915         compare (regvar, base)
9916
9917         * inssel-x86.brg: more burg love
9918
9919         * inssel.brg: more cleanup
9920
9921         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
9922
9923 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
9924
9925         * basic-long.cs, basic-calls.cs: new tests for optimization.
9926
9927 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
9928
9929         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
9930         patch.
9931
9932 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
9933
9934         * mini-amd64.c (read_tls_offset_from_method): Add another case.
9935         
9936 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
9937
9938         * inssel.brg (mini_emit_memcpy): use 
9939         NO_UNALIGNED_ACCESS to disable memcpy optimization
9940
9941 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
9942
9943         * mini-amd64.c: Handle generic types in various places.
9944
9945         * mini.c (mono_method_to_ir): Handle generic types in init locals.
9946
9947 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
9948
9949         * mini.c (handle_box): Fix warning.
9950
9951         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
9952
9953         * mini-amd64.h: Enable the emit_state optimization.
9954
9955         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
9956
9957         * mini-amd64.c: Add some new 64 bit peephole opts.
9958
9959         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
9960
9961         * cpu-amd64.md: sreg1 of div instructions must be %rax.
9962
9963         * mini-amd64.c: Register allocator fixes.
9964
9965         * mini.c: Add an optimization to emit_state to avoid allocation of new
9966         registers on some platforms.
9967
9968 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
9969
9970         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
9971
9972         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
9973         allocation. Fixes #63085.
9974
9975         * basic-long.cs: Add new regression test.
9976
9977         * mini-amd64.c: Register allocator improvements.
9978
9979 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
9980
9981         * mini-amd64.c (read_tls_offset_from_method): Add another code
9982         sequence.
9983
9984         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
9985         instruction sequence for nullifying class init trampolines.
9986
9987         * objects.cs: Add new regalloc test.
9988
9989         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
9990
9991 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
9992
9993         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
9994         
9995         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
9996         arguments.
9997
9998         * driver.c: Fix profiling after TLS changes.
9999         
10000         * driver.c (mono_main): Set mono_stats.enabled if needed.
10001
10002         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
10003         CEE_BOX.
10004
10005 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
10006
10007         * mini-x86.c: use a 1 op rather than a 2 op tls access
10008         instruction -> faster.
10009
10010 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
10011
10012         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
10013         x86 backend.
10014
10015 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
10016
10017         * exceptions-sparc.c (throw_exception): fix typo
10018
10019 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
10020
10021         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
10022         set tree->dreg correctly with tls. Allow any
10023         register to be used.
10024
10025         * mini-x86.c (read_tls_offset_from_method): add new code
10026         generation pattern seen with GCC.
10027
10028
10029 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
10030
10031         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
10032         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10033         exceptions-sparc.c: fix some performance issues in exception
10034         handling and setting of the stack trace for exceptions that were
10035         already thrown.
10036
10037 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
10038
10039         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
10040         x86 backend.
10041         
10042         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
10043         registers.
10044
10045 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
10046
10047         This patch inlines tls access, when possible.
10048         
10049         * mini.h: new arch functions for TLS intrinsics.
10050         All platforms updated with a stub.
10051
10052         * mini.c: use the new intrinsics
10053
10054         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
10055         arch specific intrinsic for tls variables
10056
10057 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
10058
10059         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
10060         under windows.
10061
10062 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10063
10064         * mini.c: thread local allocation
10065
10066 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
10067
10068         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
10069
10070         * Makefile.am: Link against the static version of libmonogc.
10071         
10072         * Makefile.am: Link the static versions of the convenience libraries
10073         into the mono executable.
10074
10075         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
10076
10077 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
10078
10079         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
10080         on integer overflow.
10081
10082         * mini-amd64.c: Reorganize function call code.
10083
10084         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
10085
10086 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10087
10088         * inssel-x86.brg: use xor eax,eax.
10089         
10090         * basic.cs: new tests
10091
10092 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10093
10094         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
10095         in exception throwing code.
10096         
10097 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10098
10099         * inssel-x86.brg: use xor esi,esi.
10100
10101 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10102
10103         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
10104         can trace methods compiled during mini_init () too.
10105
10106         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
10107         CEE_CONV_U4.
10108
10109 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10110
10111         * Makefile.am: static link on x86 (r=zoltan)
10112
10113 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10114
10115         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
10116         code since it causes some programs to fail.
10117
10118 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
10119
10120         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
10121
10122 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10123
10124         * mini.c: ovfops_op_map - add STACK_OBJ case for
10125         CONV_I 
10126         * basic.cs: add test_0_pin_string as test
10127         case for above.
10128
10129 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10130
10131         * Makefile.am: build C# if srcdir != builddir
10132
10133 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10134
10135         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
10136         fall-through blocks.
10137
10138 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10139
10140         * driver.c: enable loop by default again and include abcrem in -O=all.
10141
10142 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
10143
10144         * iltests.il: Add some localloc tests.
10145
10146         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
10147
10148         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
10149         Fixes #62574.
10150
10151         * inssel-amd64.brg: Add some optimizations.
10152
10153         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
10154         for gcc-3.4.
10155
10156         * Makefile.am: Statically link mono against libmono on AMD64.
10157         
10158         * mini-amd64.c inssel-amd64.brg: Optimizations.
10159
10160 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
10161
10162         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
10163
10164         * tramp-amd64.c: Patch calling code in trampolines.
10165
10166 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
10167
10168         * mini-amd64.c: pinvoke struct passing fixes.
10169
10170 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
10171
10172         * mini-sparc.c: redo change, make mono_arch_cpu_init call
10173         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
10174
10175 2004-08-05  Duncan Mak  <duncan@ximian.com>
10176
10177         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
10178         CEE_LDELEM_ANY.
10179
10180 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10181
10182         * mini-amd64.c (emit_move_return_value): Move return value for normal
10183         calls too.
10184
10185 2004-08-05  Martin Baulig  <martin@ximian.com>
10186
10187         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
10188         `type->type'; just modify `type' itself when dealing with enums
10189         and generic instances.
10190         (check_call_signature): Make `simple_type' a `MonoType *'.
10191
10192 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10193
10194         * mini.c: Use OP_PADD to add offsets to addresses.
10195
10196         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
10197
10198 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
10199
10200         * mini-sparc.c (mono_arch_emit_epilog): fix check
10201         for folding last op into restore instruction
10202
10203 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10204
10205         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
10206         helper methods using the code manager.
10207         
10208         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
10209
10210         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
10211
10212 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10213         
10214         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
10215           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
10216
10217         * mini-s390.c: fix tail processing
10218
10219 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
10220
10221         * mini-ppc.c: mul.ovf.un exception name fix.
10222
10223 2004-08-03  Martin Baulig  <martin@ximian.com>
10224
10225         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
10226         instances; before jumping to `handle_enum', also modify `ptype'.
10227
10228 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
10229
10230         * cpu-sparc.md: fcall maximal length too small.
10231
10232 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
10233
10234         * mini-amd64.c mini.h: Add initial support for passing/returning 
10235         structures to/from pinvoked methods.
10236
10237 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
10238
10239         * mini-ppc.c: reg allocator fix.
10240
10241 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
10242
10243         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
10244
10245         * inssel.brg: Optimize memset on 64 bit machines.
10246
10247         * mini-amd64.c: Fix some vararg cases.
10248
10249 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10250
10251         * mini-s390.c: Corrected macro in emit_float_to_int
10252
10253         * s390-abi.cs: Tests to exercise the s390 ABI
10254
10255 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10256
10257         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
10258         caller saved regs.
10259
10260         * basic.cs: Add a test for add.ovf.un.
10261
10262 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
10263
10264         * mini-sparc.c: add case for OP_IDIV_UN
10265
10266 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10267
10268         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
10269         
10270         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
10271
10272 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
10273
10274         * basic.cs: regression tests.
10275
10276         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
10277         regressions.
10278
10279 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10280
10281         * basic.cs: Add a new test.
10282
10283         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
10284         and AOT. Various fixes and optimizations.
10285
10286         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
10287
10288 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10289
10290         * mini-ppc.c: make sure temp regs are not used for global reg
10291         allocation.
10292
10293 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
10294
10295         * cpu-sparc.md: conv_i8 fix for 64bits
10296
10297         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
10298
10299 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
10300         
10301         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
10302         add opcode for cmp BYTE PTR [eax], imm.
10303
10304         * inssel.brg: Make memcpy and memset takes bases.
10305
10306 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10307
10308         * *-amd64.*: More AMD64 work.
10309         
10310 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10311
10312         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
10313         add a compare-not-equal opcode.
10314         
10315 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
10316
10317         * mini.c: Use mono_init_from_assembly instead of mono_init.
10318         
10319 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10320
10321         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
10322
10323         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
10324
10325         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
10326
10327         * inssel.brg: 64 bit fixes.
10328
10329         * mini.h (MonoCallInst): Add some AMD64 specific data.
10330
10331         * mini.h: Add some OP_P opcodes.
10332
10333 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10334
10335         * basic.cs: tests for 61797 and 61740
10336
10337 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10338
10339         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
10340         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
10341
10342 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
10343
10344         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
10345
10346         * *-amd64*.*: Ongoing AMD64 work.
10347
10348 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
10349
10350         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
10351
10352         * *-amd64*: Ongoing AMD64 work.
10353
10354         * mini-arch.h: Add AMD64 support.
10355
10356         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
10357
10358         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
10359
10360         * mini-ops.h: Add new opcodes.
10361
10362         * Makefile.am: Add AMD64 support.
10363
10364         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
10365         rules into the inssel-long*.brg files.
10366
10367         * *-amd64.*: Add beginnings of AMD64 backend.
10368
10369 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
10370
10371         * mini.c (print_dfn): commenting out the code that prints
10372         the cil. With -O=deadce, this makes -v -v crash.
10373         
10374         * cpu-pentium.md: make checkthis have a length of 2
10375
10376 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
10377
10378         * mini-sparc.h: fix implementations of __builtin
10379         functions for Sun compiler for V9.
10380
10381 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
10382
10383         * mini.c: use the new stelem.ref wrapper
10384         * exceptions.cs, arrays.cs: new stelem.ref tests
10385
10386 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10387
10388         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
10389         new XSP should work with these changes).
10390
10391 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
10392         
10393         * inssel-{long32,x86,}.brg: trivial optimizations.
10394         
10395 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
10396
10397         * mini.c: load value when emitting box operation in
10398         constrained calls.
10399
10400 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
10401
10402         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
10403         is one byte shorter than cmp DWORD PTR [eax], 0.
10404
10405 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10406
10407         * inssel-ppc.brg: arguments on the stack are always
10408         relative to the stack pointer (spotted by Neale Ferguson).
10409
10410 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10411
10412         * exceptions-x86.c: delay appending the method name to the trace until
10413         after mono_jit_info_table_find is called, as this gets the real
10414         MonoMethod.
10415
10416 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
10417
10418         * aot.c: register roots
10419
10420 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10421
10422         * aot.c : I could just use PLATFORM_WIN32 flag.
10423
10424 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10425
10426         * aot.c : Reverting the previous fix. This time it broke linux build.
10427
10428 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10429
10430         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
10431
10432 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
10433
10434         * mini.c (handle_stack_args): Remove some more debugging code.
10435         
10436         * mini.c (handle_stack_args): Remove debug output left in by mistake.
10437
10438         * driver.c mini.h aot.c: Allow additional options to be specified with
10439         --aot and pass them to mono_compile_assembly.
10440
10441         * aot.c: Add experimental code to AOT compile all loaded assemblies
10442         on demand and save the code into a cache in the filesystem.
10443
10444         * aot.c: Add support for more wrapper methods.
10445         
10446         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
10447         58863.
10448
10449         * cpu-*.md: Remove removed opcodes.
10450
10451         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
10452         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
10453         related icalls to marshal.c.
10454
10455 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
10456
10457         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
10458
10459         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
10460
10461         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
10462
10463 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
10464         * liveness.c: If liveness is recomputated we need to reset the information
10465         for each variable. This way, if the liveness range has been narrowed
10466         by optimizations that happened after the last computation, we can return
10467         a smaller range.
10468         
10469         For example, if you have
10470         
10471         {
10472                 int i = 0;
10473                 
10474                 // Tons of code that does not affect i
10475                 
10476                 i = foo ();
10477                 ...
10478         }
10479         
10480         i = 0 is dead code and will be removed by SSA. However, when
10481         linear scan gets to the code, i will still appear to be live
10482         throughout the entire block. This prevents good register allocation.
10483
10484 2004-07-06  Martin Baulig  <martin@ximian.com>
10485
10486         * debug-mini.c (mono_debug_init_method): Allow
10487         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
10488         (mono_debug_add_icall_wrapper): New method.
10489
10490         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
10491
10492 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
10493
10494         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
10495         optimization.
10496
10497 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
10498
10499         * aot.c (mono_aot_load_method): Fix loading of debug info.
10500
10501 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10502
10503         * aot.c: Add logging support.
10504
10505 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10506
10507         * mini.h: Add prototype for mono_print_method_from_ip.
10508
10509         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
10510
10511         * inssel.brg: 64 bit fixes.
10512
10513         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
10514         inssel-long32.brg.
10515
10516         * Makefile.am: Add SPARC64 support.
10517
10518 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10519
10520         * aot.c: Fix alignment problems on 32 bit platforms.
10521
10522 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10523
10524         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
10525         SPARC64.
10526
10527         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
10528         problems.
10529
10530         * mini.h: Bump AOT file version. Some 64 bit fixes.
10531
10532 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10533
10534         * inssel-sparc.brg: Add new rule to avoid register moves.
10535
10536         * inssel.brg: Add ldind_to_load_membase helper function.
10537
10538 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
10539
10540         * mini.c: OffsetToStringData intrinsic.
10541         
10542 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10543
10544         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
10545
10546         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
10547         regression tests.
10548
10549         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
10550 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
10551
10552         * mini.c: reinstated mono_compile_get_interface_var()
10553         on x86, too, since the change breaks the Gtk# build there as well.
10554
10555 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10556
10557         * driver.c: remove loop from the default optimizations: it seems to
10558         interact badly with some of the other options (see bug #60613).
10559
10560 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
10561
10562         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
10563         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
10564
10565 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
10566
10567         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
10568         vararg-using methods.
10569
10570 2004-06-21  Martin Baulig  <martin@ximian.com>
10571
10572         * mini/mini-exceptions.c
10573         (mono_handle_exception): Added `gpointer original_ip' argument.
10574         After calling mono_unhandled_exception(), call
10575         mono_debugger_unhandled_exception() and if that returns true,
10576         restore the context and return.
10577
10578 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10579
10580         * mini-ppc.c: prefer the use of relative branches so
10581         they won't need to be patched in aot code (patch from Patrick Beard).
10582
10583 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10584
10585         * aot.c: patch from Patrick Beard to make the output assembly
10586         more correct for the MacOSX assembler. Small tweak to
10587         generate sane images on Linux/PPC, too.
10588
10589 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10590
10591         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
10592         case until bug #59509 is fixed (shows up in #60332).
10593
10594 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10595
10596         * mini.c: make sure the needed wrappers are compiled, too, with
10597         precomp.
10598
10599 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
10600
10601         * driver.c: remove NPTL reference in --version output.
10602
10603 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10604
10605         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
10606         generate valid assembly for the Mach-O assembler.
10607
10608 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10609
10610         * driver.c: don't include abcrem in the all optimization specifier
10611         since it slows down jit compilation too much for now.
10612
10613 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
10614
10615         * mini.c: use BIGMUL only if both operands have the same signage.
10616         * iltests.il: Test for bug 60056. (errors related to signage in
10617         BIGMUL).
10618
10619         r=lupus.
10620
10621 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
10622
10623         * mini.c, aot.c: memory leak fixes.
10624
10625 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10626
10627         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
10628
10629 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
10630
10631         * Makefile.am: remove the -static hack completely, it links in
10632         statically glib as well.
10633
10634 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
10635
10636         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
10637         * exceptions.cs: make it compile with new mcs/csc.
10638
10639 2004-06-03 Massimiliano Mantione <massi@ximian.com>
10640         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
10641         and added relevant test case.
10642
10643 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10644
10645         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
10646         regressions in gtk-sharp.
10647
10648 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
10649
10650         * exceptions.cs: New regression tests.
10651
10652         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
10653
10654 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
10655
10656         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
10657
10658 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
10659
10660         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
10661
10662         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
10663
10664 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
10665
10666         * mini.c (mono_jit_runtime_invoke): Init class in this
10667         method instead of trusting mono_jit_compile_method to
10668         do the work (because wrappers can be in object class)
10669
10670 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
10671
10672         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
10673
10674         * basic-long.cs: New regression test.
10675
10676 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
10677
10678         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
10679         and div/rem checks.
10680
10681 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
10682
10683         * Makefile.am: fix miguel's change to build mono statically against
10684         libmono (track build dependencies).
10685
10686 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10687
10688         * cfold.c: Some glib versions do not have G_MININT32.
10689
10690 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
10691
10692         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
10693         with precision of tan, atan, sin and cos, and implemented related
10694         regressions tests (fixes bug 54467, but one new problem appeared and
10695         is not fixed yet).
10696
10697 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10698
10699         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
10700
10701         * exceptions.cs: Add test for constant folding && division by zero.
10702
10703         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
10704         since driver.c is in libmono too, so the optimization was useless.
10705
10706         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
10707         variable to driver.c so the compiler can emit more efficient code to
10708         access them.
10709
10710 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10711
10712         * Makefile.am: don't distribute generated inssel.[ch] files.
10713
10714 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
10715
10716         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
10717         into the default appdomain. Fixes #58707.
10718
10719         * jit-icalls.c: Remove the broken approximation for truncl, doing
10720         no conversion is better.
10721
10722         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
10723         Fixes #58863.
10724
10725 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
10726
10727         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
10728         of the mcrxr instruction which is not available on some processors
10729         even if it's documented to be. Implement add and sub overflow correctly
10730         (still not complete for long unsigned). Speed up icalls a bit.
10731
10732 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
10733
10734         * mini.c (mono_jit_compile_method_with_opt): Make sure that
10735         we run .cctor in the current domain instead of target_domain.
10736         
10737         Fixes bug #58558, .cctor not being called in -O=shared.
10738
10739 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10740
10741         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
10742
10743 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
10744
10745         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
10746         which can be done with an imm8, do it that way.
10747         (mono_arch_output_basic_block): ditto for a jmp
10748         (mono_arch_emit_prolog): Computate maximum offset of a label.
10749
10750 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
10751
10752         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
10753         now tries to allocate prefered physical reg's for virtual
10754         regs. This reduces the number of emited spills/loads with
10755         20-30% on our core assemblies.
10756
10757 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10758
10759         * jit-icalls.c: truncl() is not needed and trunc() is
10760         the correct thing to do anyway (bug #58287).
10761
10762 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
10763
10764         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
10765         if available.
10766
10767 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10768
10769         * driver.c: enable loop optimizations by default.
10770
10771 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10772
10773         * mini-x86.c: fix calc of max loop size when aligning loops start.
10774
10775 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
10776
10777         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
10778         the stack.
10779
10780 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
10781
10782         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
10783         should set carry.
10784
10785         * basic-long.cs: Add tests for add/subtract of immediates with carry.
10786
10787         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
10788         
10789         * mini.c (inline_method): Allways inline some wrappers even if the cost
10790         is too large. Fixes #58785.
10791
10792         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
10793         
10794 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
10795
10796         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
10797         (crichton@gimp.org). Beginning of support for sparc/linux.
10798
10799         * mini-sparc.c: Optimize retrieval of LMF address.
10800
10801 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
10802
10803         * exceptions-ppc.c:  handle alloca in methods with clauses.
10804
10805 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
10806
10807         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
10808
10809 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
10810
10811         * mini.c: Delegate most of the abort signal work to 
10812           mono_thread_request_interruption, which also handles Stop and Suspend
10813           states.
10814
10815 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
10816
10817         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
10818         supports the save/restore lmf opcodes.
10819
10820 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
10821
10822         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
10823         by gcc-3.4 as well.
10824
10825         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
10826
10827 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10828
10829         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
10830         methods which contain array accesses.
10831
10832         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
10833         boundaries. Fixes #58537.
10834
10835         * iltests.il: Add regression test for #58537.
10836
10837 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10838
10839         * mini-x86.c (mono_arch_local_regalloc): Last part of
10840         fix for bug #58633 (releasing register to early).
10841
10842 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
10843
10844         * basic-long.cs: Add new regression test.
10845
10846 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10847
10848         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
10849         register too early on the chain.
10850
10851 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10852
10853         * mini.c (create_helper_signature): Use a helper function to reduce
10854         the code which needs to be written. Also set the calling convention of
10855         icalls on windows. Fixes #57840.
10856
10857 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10858
10859         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
10860         exceptions-ppc.c: added helper function to get the instruction address
10861         from a signal handler context.
10862
10863 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10864
10865         * helpers.c: use g_get_tmp_dir. Invokes happyness 
10866         from gonzalo.
10867
10868 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10869
10870         * helpers.c: Add new env variable to pass args to objdump.
10871         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
10872
10873 2004-05-17  Radek Doulik  <rodo@ximian.com>
10874
10875         * Makefile.am (common_sources): added abcremoval.h so it get
10876         disted and daily mono packages on go-mono.com will build again
10877
10878 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
10879
10880         * abcremoval.c: Fixed coding style, added copyright header.
10881
10882         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
10883
10884         * mini.h: Added prototype for abc removal main function.
10885
10886         * build_relations_propagation_table.pl: Added copyright header.
10887
10888 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
10889
10890         * basic-long.cs: reg test for complex ceq_long bug.
10891
10892 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
10893
10894         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
10895         reg in long and clob case (bug #58343). Fixed/added comments.
10896
10897 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
10898
10899         * mini.c (mono_jit_runtime_invoke): Follow new convention
10900         of calling the invoke method with an function pointer.
10901
10902 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
10903
10904         * ChangeLog: Fix author of memory leak patch.
10905
10906 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
10907
10908         * Makefile.am: fix make dist as well...
10909
10910
10911 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
10912
10913         * cfold.c: Made so that conversions from pointer to int4 are no-ops
10914         on archs where pointers are 4 bytes long.
10915
10916         * Makefile.am: Added abcremoval.c source file.
10917
10918         * abcremoval.c: Added abcremoval.c.
10919
10920         * abcremoval.h: Added abcremoval.h.
10921
10922         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
10923
10924         * inssel.brg: Enabled bounds check removal.
10925
10926         * mini.c: Added support for abcrem optimization.
10927
10928         * mini.h: Added abcrem optimization label.
10929
10930         * driver.c: Added support for abcrem optimization.
10931
10932         * propagated_relations_table.def: Added propagated_relations_table.def.
10933
10934 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
10935
10936         * mini.c, cfold.c: fix style.
10937
10938 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10939
10940         * mini.c: handle issue with the low-level implementation of
10941         some long opcodes (bug #54209).
10942
10943 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
10944
10945         * basic.cs: test for my new cmov stuff.
10946
10947 2004-05-13      Patrik Torstensson
10948
10949         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
10950         opt and added peephole documentation.
10951
10952 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
10953
10954         * tramp-ppc.c: rewrote the generic trampoline code.
10955
10956 2004-05-11      Patrik Torstensson
10957
10958         * mini-x86.c: optimize long shl/shr asm code (one less branch)
10959
10960 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
10961
10962         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
10963
10964         * mini.h mini.c dominators.c: Applied patch from Derek Woo
10965         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
10966
10967         * mini.c: Add new icalls for AsAny marshalling.
10968
10969 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10970
10971         * tramp-ppc.c, mini-ppc.c: more cleanups.
10972
10973 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10974
10975         * mini.c: no warnings.
10976
10977 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10978
10979         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
10980
10981 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
10982
10983         * mini.c: In the thread abort signal handler, if the thread is in the
10984         process of being stoped, don't throw the Abort exception, just stop the
10985         thread.
10986
10987 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
10988
10989         * tramp-ppc.c: removed old code.
10990
10991 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10992
10993         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
10994         do some simple speed optimizations on ppc.
10995
10996 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10997
10998         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
10999         and large offsets in load/store.
11000
11001 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
11002
11003         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
11004         it causes regressions.
11005
11006 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
11007
11008         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
11009         support.
11010
11011 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
11012
11013         * jit-icalls.c: remove warnings.
11014         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
11015         speedups for unsafe code.
11016
11017 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
11018
11019         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
11020
11021 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
11022
11023         * basic-calls.cs: Add new regression test.
11024
11025         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
11026         more portable.
11027
11028         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
11029
11030         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
11031         is no longer used.
11032
11033 2004-05-06      Patrik Torstensson
11034
11035         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
11036         long reg allocation in any reg (not only eax:edx) and implemented 
11037         long shl/shr ops in asm instead of helpers.
11038
11039 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
11040
11041         * mini-sparc.h: Fix warnings.
11042
11043         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
11044         stack.
11045
11046         * mini-exceptions.c (mono_handle_exception): Call the filter in a
11047         separate statement for clarity.
11048
11049         * mini-sparc.c: Update status.
11050
11051 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
11052
11053         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
11054         here.
11055
11056 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11057
11058         * inssel-ppc.brg: another small pre-release workaround:
11059         we don't do overflow detection for long_sub_un.
11060
11061 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11062
11063         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
11064         (also works around a weird ppc bug: 57957).
11065
11066 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
11067
11068         * tramp-ppc.c: trampoline fixes.
11069
11070 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
11071
11072         * mini-ppc.c: fixed typos.
11073
11074 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11075
11076         * mini-ppc.c, exceptions-ppc.c: more code saves registers
11077         at the top of the stack. Fixed typos. Use a frame registers
11078         for all the methods with exception clauses.
11079
11080 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11081
11082         * exceptions-ppc.c: restore fp registers.
11083
11084 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
11085
11086         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
11087         order from the stack top (moved the stack room to save the
11088         return value for trace after the param area). Fixed corruption
11089         in restoring registers on unwind.
11090
11091 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11092
11093         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
11094
11095 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11096
11097         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
11098         and prolog/epilog for methods that use it. Allow
11099         enough param area room for varargs methods. Fix miguel's
11100         breakage in exception handling.
11101
11102 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11103
11104         * Makefile.am: run genmdesc only on current arch.
11105
11106 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11107
11108         * exceptions-x86.c:
11109         * mini-x86.h: fix the build on windows.
11110
11111 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
11112
11113         * 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.
11114
11115         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
11116
11117         * mini-exceptions.c: New file.
11118         
11119         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
11120         Move some parts of the x86 exception handling code to an 
11121         arch-independent file so it can be shared with other ports.
11122
11123 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
11124
11125         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
11126
11127 2004-04-26  David Waite  <mass@akuma.org>
11128
11129         * driver.c: remove comma from end of enumeration declaration
11130
11131 2004-04-26  Jackson Harper  <jackson@ximian.com>
11132
11133         * driver.c: parse config file before loading first assembly. This
11134         allows the user gac to be enabled/disabled. 
11135         
11136 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
11137
11138         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
11139         simpler mechanism: we do not care what is encoded initially
11140         (branch absolute or relative), we care about the code and its
11141         target.  I kept the old code for reference for now.
11142
11143         The new code tries first to determine if the jump is anywhere in
11144         the -/+32 absolute meg range, if it succeeds, it encodes using the
11145         absolute branch;  If not, it tried to find something in the
11146         relative range, if not, it uses the handle_thunk code. 
11147
11148 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
11149
11150         * exceptions-ppc.c: use the correct ip register on macosx.
11151
11152 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
11153
11154         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
11155
11156 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
11157
11158         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
11159         Raise exception on integer divide by zero by hand since the hw
11160         doesn't support it. Handle NaNs in FP compares.
11161
11162 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
11163
11164         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
11165         code reducing duplication between the platforms and enabled
11166         signal exception handling (on linux for now).
11167
11168 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
11169
11170         * exceptions-ppc.c: more macosx support.
11171
11172 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11173
11174         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
11175
11176 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
11177
11178         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
11179
11180 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11181
11182         * iltests.il: more tests.
11183
11184 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11185
11186         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
11187         vars as well.
11188
11189 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11190
11191         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
11192
11193 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11194
11195         * liveness.c: Mark variables as volatile in all basic blocks reachable
11196         from exception clauses.
11197
11198 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
11199
11200         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
11201         inlining.
11202
11203 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11204
11205         * iltests.il, basic.cs: more tests for regalloc.
11206
11207 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11208
11209         * iltests.il: Some tests for register allocation modifications
11210         I have locally.
11211
11212 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
11213
11214         * exceptions.cs: Add regression test for bug #56782.
11215
11216         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
11217         original stack trace if an exception is rethrown. Fixes #56782. Oh,
11218         the beauty of fixing the same thing in 5 different files...
11219
11220 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
11221
11222         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
11223         methods.
11224
11225 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
11226
11227         * mini.c: Add support for STRWLPARRAY marshalling convention.
11228
11229 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11230
11231         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
11232         to init the context to setup the regs pointer).
11233
11234 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11235
11236         * exceptions-ppc.c: more exceptions work.
11237
11238 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11239
11240         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
11241         not allowed.
11242
11243 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11244
11245         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
11246         can use the memory directly.
11247
11248         * cpu-pentium.md: Update documentation from a post from Zoltan. 
11249
11250         add x86_add_membase, x86_sub_membase, x86_mul_membase
11251
11252 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11253
11254         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
11255         GENERAL_REGS they were also hardcoded for all PPC ports.
11256
11257         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
11258
11259         Remove hard-coded limit for floating point registers, use
11260         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
11261
11262         Notice that in MacOS X calling conventions you can fit a lot more
11263         floating point values in registers, so I should update the PInvoke
11264         test to excercise the passing of floating point values on the
11265         stack (currently broken).
11266         
11267 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
11268
11269         * tramp-ppc.c (create_trampoline_code): Added
11270         JUMP_TRAMPOLINE_SIZE. 
11271         (ppc_magic_trampoline): Follow the pattern from
11272         x86_magic_trampoline: if code is set to zero, return. 
11273         (create_trampoline_code): Always pass MonoMethod to the jump
11274         trampoline, before it was passing a null.
11275         (mono_arch_create_jump_trampoline): Implement the jump stub, could
11276         share the code with mono_arch_create_jit_trampoline. 
11277
11278         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
11279         implemented.
11280         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
11281         implemented.  
11282
11283         * cpu-g4.md: Added length for jmp instruction, the worst case
11284         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
11285         for save_lmf).
11286
11287 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
11288
11289         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
11290
11291 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
11292
11293         * mini.c: Only set bblock->real_offset when adding a new bblock, and
11294         before each IL instruction.
11295
11296         * mini.c (CEE_BOX): Fix warnings.
11297
11298 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11299
11300         * mini.c: removed a few unused vars and extra whitespace.
11301
11302 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
11303
11304         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
11305         checks.
11306         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
11307         index.
11308         (OP_GETCHR): use the above
11309         (CEE_LDELEMA): use the above.
11310
11311         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
11312         version of the generic impl.
11313         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
11314         (CEE_LDELEMA): use the above.
11315
11316 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11317
11318         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
11319         Fixes #56317.
11320
11321         * iltests.il: Added new regression test for #56317.
11322
11323 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11324
11325         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
11326         under NetBSD. Fixes #56450.
11327
11328         * liveness.c (update_gen_kill_set): Fix previous patch.
11329
11330 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11331
11332         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
11333
11334 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
11335
11336         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
11337         ldsfld and ldsflda.
11338
11339         * inssel-sparc.brg: Add more optimizations.
11340
11341         * mini-sparc.c: Replace multiply/divide with shifts if possible.
11342
11343 2004-04-01  Martin Baulig  <martin@ximian.com>
11344
11345         * mini.c (handle_box): New static function; moved the
11346         implementation of CEE_BOX here.
11347         (mono_method_to_ir): Added `constrained_call' variable.
11348         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
11349         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
11350         mono_method_get_constrained() to get the method.
11351
11352 2004-04-01  Martin Baulig  <martin@ximian.com>
11353
11354         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
11355         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
11356         (mono_method_to_ir): We don't need these macros anymore since
11357         mono_class_get_full() already takes care of it. 
11358
11359 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11360
11361         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
11362         use @function (as doesn't accept #function here) and check the return
11363         value of system and stop if fails.
11364
11365 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11366
11367         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
11368
11369 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
11370
11371         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
11372
11373         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
11374
11375         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
11376         #56223.
11377
11378         * basic-long.cs: Add test for negation of Int64.MinValue.
11379
11380 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
11381
11382         * mini-sparc.c: Update status.
11383
11384         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
11385
11386         * exceptions-sparc.c: Fix return value in filters.
11387
11388         * inssel-sparc.brg: Fix register allocation in some rules.
11389
11390 2004-03-28  Martin Baulig  <martin@ximian.com>
11391
11392         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
11393         if neccessary.  
11394
11395 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
11396
11397         * mini-x86.c (mono_arch_patch_code): Fix warnings.
11398         
11399         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
11400         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
11401         remove unused conv_u4 opcode.
11402
11403         * mini-x86.c: Remove valgrind workaround since it slows down things
11404         even when mono is not run under valgrind.
11405
11406 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
11407
11408         * mini-sparc.c: Update status.
11409
11410         * inssel-sparc.brg: Add some optimizations.
11411
11412         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
11413         future delay slot filling. Add support for varargs, tail calls and JMP.
11414
11415         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
11416         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
11417
11418         * inssel.brg: Fix register allocation in OP_ARGLIST.
11419
11420         * inssel.brg: Fix warnings.
11421
11422 2004-03-25  Martin Baulig  <martin@ximian.com>
11423
11424         * mini.c (inflate_generic_field): Removed.
11425         (mini_get_method): Removed, use mono_get_method_full(),
11426         (mini_get_class): Removed, use mono_class_get_full().
11427         (mono_method_to_ir): Pass our generic context to
11428         mono_field_from_token().        
11429
11430 2004-03-25  Martin Baulig  <martin@ximian.com>
11431
11432         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
11433         of a `MonoMethod *'.
11434         (mini_get_method): Take a `MonoGenericContext *' instead
11435         of a `MonoMethod *'.
11436         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
11437         a new local variable called `generic_context' which holds the
11438         current `MonoGenericContext *'; use it to lookup things.
11439
11440 2004-03-24  Martin Baulig  <martin@ximian.com>
11441
11442         * mini.c (mini_get_class): New static method; if we're inside a
11443         generic instance, inflate the class if neccessary.
11444         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
11445
11446 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
11447
11448         * iltests.il: New regression test for #55976.
11449
11450         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
11451         #55976.
11452
11453 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11454
11455         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
11456         output.
11457
11458 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11459
11460         * liveness.c: Consider SSA stores as well as loads when making vars
11461         volatile.
11462
11463         * exceptions.cs: New regression tests for register allocation.
11464         
11465 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
11466
11467         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
11468         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
11469           domain lock only to protect puntual access to data structures.
11470           Added access lock for sighash, jit_icall_hash_name, 
11471           jit_icall_hash_addr and domain->code_mp.
11472
11473 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
11474
11475         * driver.c: Print SIGSEGV handling method.
11476
11477         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
11478
11479         * mini.c (setup_jit_tls_data): Handle case when this is called
11480         multiple times for a thread.
11481
11482         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
11483         is different from fbxx_un. Fixes #54303. Also use constants instead of
11484         magic numbers in a lot of places.
11485
11486 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
11487
11488         * exceptions.cs: Fix cctor test when --regression is used.
11489
11490 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
11491
11492         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
11493         for Linux/ppc.
11494
11495 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11496
11497         * inssel-ppc.brg: fixed register assignments for some rules.
11498
11499 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11500
11501         * exceptions.cs: Add test for exceptions in static constructors.
11502
11503         * mini.c (mono_jit_compile_method_with_out): Move the calling of
11504         static constructors outside the domain lock. Fixes #55720.
11505
11506 2004-03-17  Martin Baulig  <martin@ximian.com>
11507
11508         * mini.c (get_generic_field_inst): Removed, this'll never happen.
11509         (inflate_generic_field): Take the `MonoMethod *' instead of the
11510         `MonoClass *' and added support for generic method.
11511         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
11512         have a `field->parent->gen_params', only inflate the field if it's
11513         an open constructed type.
11514
11515 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11516
11517         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
11518         exception object instead of the preconstructed ones.
11519
11520 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11521
11522         * mini.c: reverted changed to sigsegv_signal_handler commited
11523         accidentally in the previous patch.
11524
11525 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11526
11527         * mini.c:
11528         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
11529         running --aot with an old assembly.
11530
11531 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
11532
11533         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
11534         point values.
11535
11536         * mini-sparc.c: Add support for v9 branches with prediction.
11537
11538 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
11539
11540         * mini.c (mini_init): #warning is GNUC only
11541
11542         * mini-sparc.h: implement __builtin_frame_address
11543         and __builtin_return_address for Sun C compiler
11544
11545 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
11546
11547         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
11548
11549 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
11550
11551         * basic-calls.cs: Add test for unaligned byref long argument passing.
11552
11553         * mini-ops.h: Add sparcv9 compare and branch instructions.
11554
11555         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
11556         v9 instructions if we have a v9 cpu.
11557
11558         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
11559         registers for global allocation.
11560
11561         * exceptions-sparc.c: Fixes.
11562         
11563 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
11564
11565         * liveness.c (mono_analyze_liveness): Optimized version.
11566
11567         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
11568
11569         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
11570         sparc work.
11571
11572         * basic-float.cs basic-calls.cs: New regression tests.
11573
11574 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
11575
11576         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
11577         sigaltstack implementation.
11578
11579         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
11580         
11581         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
11582         stuff if SIGSEGV_ON_ALTSTACK is not defined.
11583
11584 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
11585
11586         * mini.c: Fix warnings.
11587         
11588         * mini.c (mono_resolve_patch_target): New function which contains the
11589         arch independent part of the patching process.
11590
11591         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
11592         patching code to a separate function.
11593
11594 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
11595
11596         * mini.c (add_signal_handler): ifdef out on Windows
11597
11598 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
11599
11600         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
11601         cpu-sparc.md: Add exception handling support + other fixes.
11602
11603         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
11604         typed GC detection in --version.
11605
11606         * basic.cs exceptions.cs: New regression tests.
11607
11608         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
11609         the arch specific code can store data during a compilation.
11610
11611         * mini-ops.h: Add OP_SETFRET.
11612
11613         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
11614         function, register a separate icall for each arity, so the icalls can
11615         get a wrapper.
11616         
11617         * mini.c (mono_print_tree): Print negative offsets in a more readable
11618         form.
11619         
11620         * mini.c: Make signal handling work on sparc.
11621         
11622         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
11623
11624         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
11625
11626         * jit-icalls.c: Emulate truncl by aintl on solaris.
11627
11628         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
11629
11630 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
11631
11632         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
11633
11634 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
11635
11636         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
11637         a MarshalByRef type, inline a method that performs the check, taking into
11638         account that the object can be a proxy. Also implemented tow new opcodes:
11639         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11640         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
11641         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11642
11643 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11644
11645         * mini-ppc.c: if a relative branch displacement is too big
11646         but it points to and area reachable with an absolute branch, 
11647         avoid the thunks.
11648
11649 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11650
11651         * mini.c: optimize small copies in cpblk.
11652
11653 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
11654
11655         * basic-calls.cs basic-float.cs: New regression tests.
11656
11657         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
11658         negative offsets from %fp. Implement localloc. Fix local register 
11659         allocation. Fix the case when the this argument needs to be saved to
11660         the stack. Implement some missing opcodes.
11661
11662 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
11663
11664         * mini.c (mini_method_compile): Reenable global regalloc in methods
11665         with exception handlers.
11666
11667         * linear-scan.c (mono_varlist_sort): Fix warning.
11668
11669         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
11670
11671         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
11672         regalloc costs.
11673
11674         * liveness.c: Make all variables uses in exception clauses volatile, to
11675         prevent them from being allocated to registers. Fixes #42136.
11676
11677 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
11678
11679         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
11680         causes regressions.
11681
11682         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
11683         argument to mono_arch_regalloc_cost.
11684
11685         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
11686         precisely.
11687
11688 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
11689
11690         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
11691         Make the cost of allocating a variable to a register arch dependent.
11692
11693         * basic-calls.cs: Fix compilation of tests.
11694         
11695         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
11696         helper function to cut back on the number of #ifdefs needed.
11697
11698         * mini-ppc.c: Fix compilation.
11699
11700         * basic-calls.cs: New regression tests.
11701
11702         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
11703
11704         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
11705         of l0 since that is callee saved.
11706
11707         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
11708         to virtual calls.
11709
11710         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
11711         of delay instruction.
11712
11713         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
11714
11715         * mini.h (MonoCallInst): Add 'virtual' flag.
11716
11717         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
11718
11719 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
11720
11721         * *.cs: New regression tests.
11722
11723         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
11724         work.
11725
11726         * mini.c (mono_runtime_install_handlers): Fix build.
11727
11728         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
11729         'signal_stack_size' members.
11730
11731         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
11732         alternate signal stack.
11733
11734         * exceptions-x86.c: Add stack overflow handling.
11735
11736         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
11737         functions to arch independent code.
11738
11739         * mini.c (mono_print_tree): Print more detailed info for load_membase
11740         opcodes.
11741         
11742 2004-02-23  Martin Baulig  <martin@ximian.com>
11743
11744         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
11745
11746 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11747
11748         * mini-x86.c: fixed reg allocation for div/rem.
11749
11750 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
11751
11752         * driver.c (mono_main): Report some configuratio options on --version.
11753
11754 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
11755
11756         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
11757         low in the address space. Correctly flush memory in thunks where we
11758         output native code.
11759
11760 2004-02-20  Martin Baulig  <martin@ximian.com>
11761
11762         * mini.c (mini_get_method): New static method; inflate all generic
11763         methods and methods in open generic instances.
11764         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
11765         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
11766
11767 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11768
11769         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
11770
11771         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
11772
11773 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
11774
11775         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
11776
11777         * mini-sparc.c (flushi mono_arch_output_basic_block): make
11778         it compile using Sun's compiler.
11779
11780 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11781
11782         * 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.
11783
11784         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
11785
11786 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11787
11788         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
11789         code.
11790         * mini-ppc.c: handle calls outside of the allowed range with thunks
11791         allocated using the code manager.
11792         * tramp-ppc.c: use the code manager to hold generated native code.
11793         Fixed the magic trampoline to just patch vtable entries.
11794
11795 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
11796
11797         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
11798         independent file.
11799
11800 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
11801
11802         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
11803         PPC.
11804
11805         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
11806         if we have a working __thread implementation.
11807
11808         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
11809         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
11810
11811 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
11812
11813         * mini-x86.c: Fix compilation under gcc 2.
11814         
11815 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
11816
11817         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
11818         contains a call to the wrapped function.
11819
11820         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
11821         OP_<CALL>_IMM opcodes, and use them under X86.
11822         
11823         * mini.c (mono_jit_find_compiled_method): Fix warning.
11824
11825         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
11826
11827         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
11828
11829         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
11830         functionality to mini.c.
11831
11832         * mini.c (mono_create_jump_trampoline): New function to create a jump
11833         trampoline. Return a compiled method instead of a trampoline if it
11834         exists. Add a cache for jump trampolines.
11835
11836         * mini.c (mono_jit_find_compiled_method): New function to return a
11837         compiled method if it exists.
11838
11839         * mini-x86.c: Call mono_create_jump_trampoline instead of 
11840         mono_arch_create_jit_trampoline.
11841
11842         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
11843         a jump trampoline. Fixes #52092.
11844         
11845 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
11846
11847         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
11848         which is not up-to-date. Add check_corlib_version () instead.
11849
11850         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
11851         have to call it.
11852         
11853         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
11854         since newer valgrind versions do not need it.
11855
11856         * mini.c (mono_jit_compile_method_with_opt): New helper function to
11857         compile a method with a given set of optimizations.
11858
11859         * mini.c: Compile icall wrappers on-demand instead of at startup.
11860
11861         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
11862         wrapper for an icall.
11863
11864 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
11865
11866         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
11867         #54063.
11868
11869         * iltests.il: Add test for non-empty stack before switch instruction.
11870
11871 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
11872
11873         * mini.c: Add support for new stringbuilder marshalling conventions.
11874
11875         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
11876
11877 2004-02-01  Martin Baulig  <martin@ximian.com>
11878
11879         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
11880         in `ginst->mtype_argv'.
11881
11882 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
11883
11884         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
11885         facilitate grepping.
11886
11887 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
11888
11889         * mini.c: fixed buglet in initobj generic implementation for references.
11890
11891 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
11892
11893         * Makefile.am: make the version script conditional.
11894         * jit-icalls.c: handle missing truncl().
11895
11896 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
11897
11898         * exceptions.cs: Add more tests for double->int conversion.
11899
11900         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
11901         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
11902
11903 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
11904
11905         * driver.c: make --verbose --version emit an error
11906         if the loaded corlib doesn't match the runtime version.
11907
11908 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
11909
11910         * mini-ppc.h: export ppc_patch().
11911         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
11912         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
11913         on par or better than on MacOSX.
11914
11915 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
11916
11917         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
11918         mono_lookup_pinvoke_call.
11919
11920         * mini-x86.c: Under windows, the default pinvoke calling convention is
11921         stdcall. Fixes #52834.
11922
11923         * mini.c (optimize_branches): Add an upper bound to the number of
11924         iterations to prevent infinite loops on strange loops. Fixes #53003.
11925
11926 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11927
11928         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
11929         and ISINST. Fixes #52093.
11930
11931         * objects.cs (test_0_vector_array_cast): New tests.
11932         
11933 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
11934
11935         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
11936         checking in Array.Set ().
11937
11938         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
11939         #52590.
11940
11941         * object.cs (test_0_multi_array_cast): New regression test.
11942
11943 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
11944
11945         * exceptions-ppc.c: fix build on Linux/PPC.
11946
11947 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
11948
11949         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
11950         running under valgrind.
11951         (x86_magic_trampoline): Fix build bustage.
11952
11953         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
11954         negative values as well. This is needed for the encoding of the line number
11955         info, since sometimes the line numbers are not in increasing order.
11956
11957 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
11958
11959         * cpu-pentium.md (localloc): Increase the size of the localloc 
11960         instruction since it is a loop under Win32.
11961
11962         * debug-mini.c (record_line_number): Get rid of unneccesary memory
11963         allocation.
11964
11965 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
11966
11967         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
11968         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
11969         Max Horn (max@quendi.de). Fix file names in comments.
11970
11971 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
11972
11973         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
11974         avoid stack overflow.
11975         (replace_usage): Avoid uninitialized variable warnings.
11976
11977         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
11978         and taking the address of valuetype variables.
11979
11980 2004-01-03  Patrik Torstensson
11981
11982         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
11983         for other purposes than FP later on.
11984
11985 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
11986
11987         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
11988         of tail calls.
11989
11990 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11991
11992         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
11993
11994 2003-12-30  Patrik Torstensson <p@rxc.se>
11995
11996         * mini-x86.h: Decreased number of availiable fp regs.
11997         Solves corner cases with FP spilling.
11998
11999 2003-12-23  Patrik Torstensson <p@rxc.se>
12000
12001         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
12002         for floating point stack tracking / spilling on x86. 
12003         Fixes bug #49012.
12004         
12005         * basic-float.cs: added float mul overflow test.
12006
12007 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
12008
12009         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
12010
12011 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12012
12013         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
12014         supports for cond branches that overflow the immediate
12015         overflow offset. mcs can compile simple programs.
12016
12017 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12018
12019         * exceptions-ppc.c: exception handling support wip:
12020         finally handlers get run on exception.
12021
12022 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
12023
12024         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
12025         profiling.
12026
12027 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12028
12029         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
12030         initial support for stack walking and unwinding.
12031
12032 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
12033
12034         * driver.c (mono_main): Make corlib-out-of-sync message more 
12035         descriptive. Also remove verify_corlib call.
12036
12037 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12038
12039         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
12040         not overlap with other call's arguments, too.
12041
12042 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
12043
12044         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
12045         move to arch-specific code the choice of arch-specific
12046         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
12047         * mini.c: ensure emulation calls will not interleave
12048         with other calls.
12049
12050 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
12051
12052         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
12053         the magic trampoline stack frame is dropped before executing
12054         the new method.
12055
12056 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
12057
12058         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
12059         and integer to fp conversions. Added support for overflowing
12060         arguments on the stack. Reserve a couple more registers as temps.
12061         Added support for aot compilation (as output still needs to be
12062         tweaked, though).
12063
12064 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12065
12066         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
12067         Don't overwrite return register in some corner cases.
12068
12069 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
12070
12071         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
12072         static constructors when AOT compiling.
12073
12074         * driver.c (mono_main): Call mono_check_corlib_version.
12075
12076 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12077
12078         * cpu-g4.md, basic.cs: fixed div target register.
12079
12080 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
12081
12082         * mini-ppc.c, basic.cs: shl_imm fix with test.
12083
12084 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12085
12086         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
12087         structures by value. Misc fixes.
12088         * objects.cs: more tests.
12089
12090 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
12091
12092         * mini-ppc.c: lconv.ovf.i implemented.
12093
12094 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12095
12096         * mini.c:
12097         (mini_init): don't error out if someone already called g_thread_init.
12098
12099 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12100
12101         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
12102         to be any type per the spec. Fix abnormal memory usage when
12103         the same object is repeatedly thrown.
12104
12105 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
12106
12107         * mini.c: check for overruns in IL code.
12108
12109 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
12110
12111         * TODO: Add/remove some todo entries.
12112
12113 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
12114
12115         * driver.c (mono_main): Call mono_verify_corlib.
12116
12117 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
12118
12119         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
12120         This has been moved to mini.c
12121         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
12122         type being casted is marshalbyref it could be a proxy, so instead of
12123         emitting the type check code, emit a call to a runtime method that will
12124         perform the check by calling CanCastTo if needed.
12125
12126 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
12127
12128         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
12129         methods with large stack frames under Win32.
12130
12131 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
12132
12133         * Makefile.am: Distribute regression tests.
12134
12135         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
12136         at the end instead of inserting each variable into the sorted list.
12137
12138         * linear-scan.c (mono_varlist_sort): New helper function.
12139         
12140 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12141
12142         * mini.c: ensure arguments and locals are within bounds.
12143
12144 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12145
12146         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
12147         related fixes.
12148
12149 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12150
12151         * mini.c (mono_cprop_copy_values): Fix crash.
12152
12153         * aot.c: Set verbosity back to 0.
12154         
12155 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12156
12157         * regalloc.c: complete memory leak fix by Laurent Morichetti
12158         (l_m@pacbell.net).
12159
12160 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12161
12162         * driver.c (main_thread_handler): Revert the previous patch.
12163
12164         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
12165         under valgrind.
12166
12167         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
12168         memory from the memory pool.
12169
12170         * driver.c (main_thread_handler): Turn on all optimizations when
12171         --aot is used.
12172
12173         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
12174         an array for better performance.
12175
12176         * regalloc.c (mono_regstate_assign): Fix memory leak.
12177
12178         * debug-mini.c (mono_debug_serialize_debug_info): New function to
12179         serialize the debug info.
12180
12181         * debug-mini.c (mono_debug_add_aot_method): New function to load the
12182         debug info from the serialized representation.
12183
12184         * aot.c: Save debug info into the generated file and load it when 
12185         loading a method.
12186
12187         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12188
12189 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12190
12191         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
12192         More FP-related fixes.
12193
12194 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
12195
12196         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
12197         and register allocation buglet. Hello world now runs.
12198
12199 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12200
12201         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
12202         * tramp-ppc.c: fixed class init trampoline.
12203         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
12204
12205 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12206
12207         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
12208         mini.c: more ppc changes/fixes.
12209
12210 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12211
12212         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
12213         Also optimize the case when the arguments are the same in the caller 
12214         and in the callee.
12215
12216         * iltests.il: Add tests for tail calls with valuetype arguments.
12217
12218 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12219
12220         * mini-ppc.c: fixes for struct return type.
12221
12222 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
12223
12224         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
12225         mono_spillvar_offset() to arch-specific code.
12226
12227 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
12228
12229         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
12230
12231 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12232
12233         * exceptions-x86.c: Fix stack space leaks.
12234         
12235         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
12236         registers from the lmf if the method has save_lmf set.
12237
12238 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
12239
12240         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
12241         of icall wrappers into InvokeInDomain, since these are now per-domain.
12242
12243 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
12244
12245         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
12246         make some opcode emulation and intrinsic ops enabled/disabled 
12247         according to the architecture. More fixes.
12248
12249 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12250
12251         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
12252
12253 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12254
12255         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
12256         arch-specific handling for 'this' and struct return type to
12257         arch-specific code.
12258
12259 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12260
12261         * aot.c: prevent divide by zero error when reporting (it happened with
12262         Accessibility.dll).
12263
12264 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
12265
12266         * mini.h (inst_switch): Remove unused macro.
12267
12268 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12269
12270         * aot.c:
12271         (load_aot_module): free 'info->methods' and 'info' properly. No more
12272         "free(): invalid pointer blah" messages when you have an old aot
12273         compiled assembly.
12274
12275 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
12276
12277         * jit-icalls.c, mini.c: Added support for context static fields.
12278
12279 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12280
12281         * mini.c (mono_method_blittable): Methods which set LastError are not 
12282         blittable either. Fixes #51108.
12283         
12284 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12285
12286         * mini.c: flush icache.
12287         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
12288
12289 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12290
12291         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
12292
12293 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
12294
12295         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
12296         safe on IA32.
12297
12298         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
12299         vararg calls.
12300
12301         * inssel.brg (CEE_MKREFANY): Fix AOT case.
12302
12303 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
12304
12305         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
12306         instruction when the result is discarded.
12307
12308         * iltests.il (test_0_div_regalloc): New regression test.
12309
12310         * arrays.cs: Fix compilation error.
12311
12312 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
12313
12314         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
12315         float rules to inssel-x86.brg: sane architectures with FP registers
12316         don't need to implement these rules.
12317
12318 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12319
12320         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
12321
12322 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12323
12324         * mini.h, inssel-long32.brg: fixed endianess issues in int64
12325         implementation of 32 bit systems.
12326
12327 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12328
12329         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
12330         (Jeroen Zwartepoorte).
12331
12332 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12333
12334         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
12335         the caller and the callee matches.
12336         
12337         * mini.c (mono_method_to_ir): Add comment.
12338
12339         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
12340         signbit is missing on some platforms.
12341
12342 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
12343
12344         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
12345
12346         * mini.c (setup_jit_tls_data): Call the new function.
12347         
12348         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
12349
12350         * mini-x86.c: Add experimental support for fast access to the lmf
12351         structure under NPTL/Linux 2.6.x.
12352
12353 2003-11-06  Martin Baulig  <martin@ximian.com>
12354
12355         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
12356         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
12357         the debugger.
12358
12359 2003-11-02  Martin Baulig  <martin@ximian.com>
12360
12361         * mini.c (inflate_generic_field): New static method.
12362         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
12363         generic instance and the field is declared in a generic type, call
12364         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
12365
12366 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
12367
12368         * mini.h mini.c (mono_method_same_domain): New function to return
12369         whenever the caller and the callee are in the same domain.
12370
12371         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
12372
12373 2003-10-30  Martin Baulig  <martin@ximian.com>
12374
12375         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
12376         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
12377         method parameters.
12378         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
12379         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
12380
12381 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
12382
12383         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
12384         propagation.
12385
12386         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
12387         object here, so it is in the correct appdomain etc.
12388
12389 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
12390
12391         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
12392         already done.
12393         (mono_method_to_ir): Avoid freeing the type created returned from
12394         mono_type_create_from_typespec, since it is put into an internal cache
12395         by the function. Fixes pointer.exe.
12396
12397         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
12398         trampolines for icalls and pinvokes as well. Fixes #33569.
12399
12400 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
12401
12402         * mini.c: Update after appdomain changes.
12403
12404         * mini.c (mono_jit_compile_method_inner): Allways compile native
12405         method wrappers in the root domain, since there can only be one
12406         instance of them, whose address is stored in method->info.
12407
12408 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12409
12410         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
12411         environment variable. Instead detect automatically whenever running
12412         under valgrind using the magic macro RUNNING_ON_VALGRIND from
12413         valgrind.h.
12414
12415 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
12416
12417         * trace.c, trace.h: New files that implement the new trace option
12418         parsing. 
12419
12420         * driver.c: Document new --trace options.
12421
12422         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
12423         mini-x86.c: Apply:
12424
12425         -       if (mono_jit_trace_calls)
12426         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
12427
12428         * mini.h: prototypes.
12429         
12430 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12431
12432         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
12433
12434         * mini.c inssel.brg: Implement typedefbyref opcodes.
12435
12436         * mini.c (mono_jit_compile_method): Remove unused local variable.
12437
12438         * mini.c (mono_jit_compile_method_inner): Ditto.
12439         
12440 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
12441
12442         * tramp-x86.c (x86_class_init_trampoline): Fix build.
12443         
12444         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
12445
12446 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12447
12448         * mini.c (mono_no_aot): Remove unused global variable.
12449
12450         * mini.c: Thread safety fixes.
12451
12452 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12453
12454         * mini.c (mono_create_class_init_trampoline): Add a lock around
12455         class_init_hash_addr.
12456
12457         * arrays.cs (test_0_newarr_emulation): Add new regression test for
12458         #30073.
12459
12460         * mini.c: Decompose the NEWARR instruction before decomposing its
12461         arguments. Fixes #30073.
12462
12463 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
12464
12465         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
12466         convention.
12467
12468 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
12469
12470         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
12471
12472         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
12473
12474         * driver.c: Add support for compiling icall wrappers to --compile.
12475
12476 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
12477
12478         * inssel.brg: The empty value in class->interface_offsets is -1, not
12479         0. Fixes #49287.
12480
12481 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
12482
12483         * objects.cs: New test for 'is' operator on an array of interfaces.
12484
12485 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12486
12487         * tramp-ppc.c: update trampoline code to support jumps
12488         and class initialization.
12489
12490 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
12491
12492         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
12493
12494         * inssel.brg (OP_UNBOXCAST): Fix #46027.
12495
12496         * inssel.brg (OP_UNBOX): Remove unused rule.
12497
12498         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
12499         region instead of one for each method. Fixes #47813.
12500
12501 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
12502
12503         * exceptions.cs (test_0_nested_finally): New regression test for
12504         nested exception handlers.
12505
12506         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
12507
12508         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
12509
12510         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
12511         inlining.
12512
12513         * mini.c (mono_method_check_inlining): Make the inlining limit 
12514         configurable by an environment variable.
12515         
12516         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
12517
12518         * mini.h: Bump AOT file version.
12519
12520         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
12521         token, store the image along with the token, since the token might not 
12522         refer to the same image as the method containing the relocation, 
12523         because of inlining.
12524
12525 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
12526
12527         * mini.c (mono_precompile_assemblies): New function to compile
12528         all methods in all loaded assemblies.
12529
12530         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
12531
12532         * regalloc.h regalloc.c (MonoRegState): Change the type of 
12533         iassign and fassign to int*, since they can contain large negative
12534         values if the register is spilled. Also added some comments. Fixes
12535         #45817.
12536
12537         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
12538         under Win32. Fixes #42964.
12539
12540 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
12541
12542         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
12543
12544         * aot.c: Added support for AOT compiling methods which contain calls
12545         to wrappers. Currently, only remoting-invoke-with-check wrappers are
12546         handled.
12547         
12548         * driver.c (compile_all_methods): Run the compilation in a thread
12549         managed by mono. Fixes #44023.
12550
12551         * mini.c (mono_codegen): Print full method name in verbose output.
12552
12553         * mini-x86.c (mono_arch_patch_code): Fix warning.
12554         
12555         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
12556         jumps, since the method we are jumping to might be domain-specific.
12557
12558         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
12559
12560 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12561
12562         * inssel.brg: string chars are unsigned.
12563
12564 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
12565
12566         * TODO: New todo item.
12567
12568         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
12569         which calls mono_runtime_class_init and patches the call site to
12570         avoid further calls.
12571         (mono_arch_create_class_init_trampoline): New arch specific function 
12572         to create a class init trampoline.
12573         (create_trampoline_code): Generalized so it can create
12574         class init trampolines as well.
12575
12576         * mini.c (helper_sig_class_init_trampoline): New helper variable.
12577         (mono_create_class_init_trampoline): New function to create and cache
12578         class init trampolines.
12579         (mono_find_class_init_trampoline_by_addr): New function to lookup the
12580         vtable given the address of a class init trampoline. Used by the
12581         patching process.
12582         (mono_codegen): Generate a call to a trampoline instead of
12583         mono_runtime_class_init in LDSFLD[A].
12584         (mono_codegen): Add relocations for the new trampoline.
12585         
12586         * mini.h mini-x86.c aot.c: Added a new relocation type: 
12587         MONO_PATCH_INFO_CLASS_INIT.
12588
12589         * mini.h: Bump AOT version number.
12590
12591         * aot.c: Create a copy of the loaded code instead of using the original
12592         so methods which call each other will be close in memory, improving
12593         cache behaviour.
12594         
12595         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
12596         patch since it breaks the regression tests.
12597         
12598         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
12599         for the register saving instruction sequence since the 
12600         frame_state_for function in glibc 2.3.2 don't seem to detect it.
12601
12602 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
12603
12604         * TODO: Fix todo item && remove another.
12605
12606 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
12607
12608         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
12609         previous checkin.
12610
12611         * aot.c: Moved the check for MONO_LASTAOT into the initialization
12612         function of the module.
12613
12614         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
12615         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
12616         --no-aot command line option.
12617
12618 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
12619
12620         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
12621         by Bernie Solomon (bernard@ugsolutions.com).
12622
12623         * inssel.brg: Refactor the interface offset table related code into
12624         its separate functions and add support for the AOT case.
12625
12626 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
12627
12628         * aot.c (mono_aot_get_method_inner): Fix memory leak.
12629         
12630         * aot.c: Added mono_aot_verbose variable and made all debugging
12631         output depend on the value of this variable.
12632
12633         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
12634         method_label and info_label.
12635
12636         * mini.h mini-x86.c aot.c: Added a new relocation type 
12637         MONO_PATCH_INFO_IID for klass->interface_id.
12638
12639         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
12640         the MonoJitInfo structure.
12641
12642         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
12643         a non-root appdomain in shared mode.
12644
12645 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
12646
12647         * aot.c: make aot loader less verbose. Remove free of unused variable.
12648
12649 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
12650
12651         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
12652
12653         * .cvsignore: Added *.dll.
12654
12655         * mini.c (mono_print_tree_nl): New function callable while debugging.
12656
12657         * mini.c (mono_print_code): Export this.
12658
12659         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
12660         patched code.
12661
12662 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
12663
12664         * mini.h (MonoCompile): Added 'jit_info' field.
12665
12666         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
12667         the cfg structure, since it is needed by the AOT compiler.
12668
12669         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12670
12671         * aot.c: A major rewrite. Changes include:
12672         - save exception tables for methods which have them.
12673         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
12674         to g_module_symbol.
12675         - reworked the file format so it is now much smaller and needs
12676         fewer relocation entries.
12677         
12678 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12679
12680         * aot.c (load_aot_module): Fix build bustage on platforms without
12681         Boehm GC.
12682
12683 2003-09-04  Martin Baulig  <martin@ximian.com>
12684
12685         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
12686
12687 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12688
12689         * TODO: Some new optimization ideas.
12690
12691         * aot.c: Move AOT module loading logic here from mono_assembly_open.
12692
12693         * aot.c: Save the optimization flags used to compile the code into
12694         the AOT module.
12695
12696         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
12697         support emitting domain specific code.
12698         
12699         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
12700         no longer domain neutral. It can be made domain neutral by compiling 
12701         with --optimize=shared.
12702
12703         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
12704         between appdomains.
12705
12706         * driver.c mini.h mini.c: New --no-aot debugging option which disables
12707         loading of AOT code.
12708
12709         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
12710         
12711         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
12712         if there is no domain neutrality information.
12713
12714 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
12715
12716         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
12717         format version into the generated library.
12718
12719         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
12720         callee method into the caller since one of them could be shared.
12721
12722         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
12723         system exceptions from AOT code now works.
12724
12725         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
12726         method if it is domain neutral and the callee is not.
12727
12728         * graph.c (cfg_emit_one_loop_level): Fix warning.
12729
12730 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
12731
12732         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
12733         last checkin.
12734
12735 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
12736
12737         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
12738         is needed  by code which is executed before mono_runtime_init ().
12739         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
12740         
12741         * mini.c (mono_thread_abort): Fix warning.
12742         (mono_jit_compile_method): Call static constructor in the AOT case too.
12743
12744         * aot.c (mono_compile_assembly): Fix warning.
12745
12746 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12747
12748         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
12749
12750 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
12751
12752         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
12753
12754         * cpu-pentium.md: Fix the length of call opcodes so they include the
12755         ESP restoring instruction. Fixes #47968.
12756
12757 2003-08-28  Martin Baulig  <martin@ximian.com>
12758
12759         * mini-x86.c (mono_arch_call_opcode): Added support for
12760         MONO_TYPE_GENERICINST.
12761
12762         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
12763
12764 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
12765
12766         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
12767         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
12768
12769         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
12770         metadata_section.
12771
12772 2003-08-26  Martin Baulig  <martin@ximian.com>
12773
12774         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
12775         when reporting an error, set this to the actual error location.
12776         (mono_method_to_ir): Report the correct error location if
12777         get_basic_blocks() returned an error.
12778
12779 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
12780
12781         * mini.c (mono_type_blittable): OBJECT is not blittable.
12782         (mono_method_blittable): Methods which have marshalling descriptors
12783         are not blittable either. Fixes #47842.
12784
12785 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
12786
12787         * driver.c mini.c: Use an environment variable instead of a global 
12788         variable. Also fix the build.
12789
12790         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
12791         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
12792         reporting this. 
12793
12794         * driver.c mini.c: Added --with-valgrind option to turn off some
12795         code which prevents mono from running under valgrind.
12796
12797         * mini.c (mono_emit_call_args): Fixed warning.
12798
12799         * mini.c (mono_emulate_opcode): Fixed warning.
12800
12801 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12802
12803         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
12804         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
12805         regalloc.c, regalloc.h: specify available registers in arch-specific
12806         code and support floats in the regallocator (patch by Laurent Morichetti 
12807         <l_m@pacbell.net>)
12808
12809 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
12810
12811         * mini.c: mono_thread_current() can be called only after
12812         mono_runtime_init(): rearrange code to not call it early on.
12813
12814 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12815
12816         * mini.c: allocate jump tables in the code mempools.
12817
12818 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12819
12820         * mini.c, mini.h: make sure per-thread data allocated by the jit is
12821         freed.
12822
12823 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
12824
12825         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
12826         12 to 16.  This fixes bug #47453.
12827
12828
12829 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12830
12831         * mini-ppc.c: fixed indexed load and unsigned compares.
12832
12833 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
12834
12835         * mini.c: reenabled installation of handler for
12836           thread abort signal.
12837
12838 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12839
12840         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
12841         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
12842         until it's fixed and actually useful.
12843
12844 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
12845
12846         * inssel-long32.brg: couple more opcodes implemented.
12847
12848 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
12849         
12850         * mini-sparc.c: Even more opcodes implemeted.
12851
12852 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
12853
12854         * mini-sparc.c: More opcodes implemented.
12855
12856 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
12857
12858         * mini-sparc.c: More opcodes implemented.
12859
12860 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
12861
12862         * inssel-sparc.brg: Add some needed rules.  Direct
12863         copy from PPC.
12864         * Makefile.am: Use inssel-sparc.brg
12865         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
12866         an assert happy for now.
12867
12868 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
12869
12870         * mini-sparc.c: Fixed compile errors.
12871         * exceptions-sparc.c: Same.  We now produce a mono binary 
12872         on sparc-linux.  Yea.
12873
12874 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
12875
12876         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
12877         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
12878         They compile, but do not work.
12879
12880 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12881
12882         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
12883         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
12884         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
12885         (ct@gentoo.org).
12886
12887 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12888
12889         * mini.c: more opcodes implemented and better support for generics.
12890
12891 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
12892
12893         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
12894         * mini.c, mini.h: first cut at generics support: some new instructions 
12895         added and changed the behaviour of some of the existing ones.
12896
12897 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
12898
12899         * mini.c: Removed definition of metadata_shared mutex here.
12900
12901 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
12902
12903         * mini-x86.c: make vararg calls work for instance methods.
12904
12905 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12906
12907         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
12908         returns the arguments in a separte list, now.
12909
12910 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
12911
12912         * aot.c, mini.c: updates for array type representation changes.
12913
12914 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
12915
12916         * mini.c: register function to perform jit shutdown.
12917
12918 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12919
12920         * mini.c: use a faster allocator if possible.
12921
12922 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
12923
12924         * aot.c: some cleanups and portability changes.
12925
12926 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12927
12928         * mini.c: use faster allocation for CEE_BOX if possible.
12929
12930 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
12931
12932         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
12933         Moved inlined mempcy code to its own function so that is can be
12934         reused. Added an inline memset function as well (optimized initobj).
12935         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
12936
12937 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12938
12939         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
12940
12941 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
12942
12943         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
12944         arch code can setup the cpu for CLR execution, if needed.
12945         We use it on x86 to set the precision of FP operations.
12946
12947 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12948
12949         * mini.c: disable some optimizations if we can guess they'll cost too
12950         much for a given method.
12951
12952 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12953
12954         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
12955         
12956 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12957         * mini.h mini.c mini-x86.c: Added instruction level coverage 
12958         info collection support.
12959
12960 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12961
12962         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
12963         is now implemented in the profiling API. Get rid of a couple of
12964         unnecessary global variables.
12965
12966 2003-06-15  Nick Drochak <ndrochak@gol.com>
12967
12968         * basic-long.cs: tests for negative values for bigmul, and unsigned.
12969         * cpu-g4.md: add op_bigmul and op_bigmul_un
12970         * cpu_pentium.md: add op_bigmul_un
12971         * inssel-long32.brg: add rule for unsigned bigmul
12972         * mini-ops.h: define OP_BIGMUL_UN
12973         * mini-x86.c: THE BUG: handle (un)signed properly
12974         * mini.c: choose unsigned opcode if needed.
12975         This set of patches fixes bug #44291
12976
12977 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
12978
12979         * mini.c (optimize_branches): improved to handle all kinds of
12980         conditional branches.
12981
12982 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
12983
12984         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
12985         don't raise exceptions.
12986
12987 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12988
12989         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
12990         to arch-specific files.
12991
12992 2003-06-09  Martin Baulig  <martin@ximian.com>
12993
12994         * Makefile.am (libs): Added $(LIBGC_LIBS).
12995
12996 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
12997
12998         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
12999         and OP_ATAN (fixes bug#44293).
13000
13001 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
13002
13003         * Makefile.am, mini-x86.c: rename cpu description array to
13004         pentium_desc, since some compilers define the 'pentium' preprocessor
13005         symbol.
13006
13007 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
13008
13009         * mini.c (mini_select_instructions): add explicit branch if the
13010         following block is not the false target of a conditional branch -
13011         we need this with any optimization that reorder or remove bblocks
13012
13013         * mini.c (optimize_branches): bug fixes
13014
13015 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
13016
13017         * mini.c (mono_method_to_ir): inline static readonly fields
13018
13019         * ssa.c (fold_tree): start cfold support for long (very simple
13020         cases only)
13021
13022         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
13023
13024 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13025
13026         * inssel.brg: fixed memcpy (bug #44219).
13027
13028 2003-06-05  Dick Porter  <dick@ximian.com>
13029
13030         * driver.c: Set the glib log levels to not abort if g_message
13031         recurses.
13032
13033         g_set_prgname() has to happen before mini_init() so that the
13034         process handle gets the info.
13035         
13036 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13037
13038         * driver.c: add intrins to the default optimizations to get wider
13039         exposure.
13040
13041 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13042
13043         * mini.h: some large basic blocks will overflow a 16-bit
13044         integers for symbolic registers.
13045
13046 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13047
13048         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
13049         (mono_arch_output_basic_block): fix bug 43499 
13050
13051 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13052
13053         * mini.c: kill duplicated definition of mono_debug_format.
13054
13055 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13056
13057         * mini-x86.c, arrays.cs: fixed register allocation bug.
13058
13059 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13060
13061         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
13062
13063         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
13064
13065 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13066
13067         * mini.c:
13068         (print_method_from_ip): also print source location information if
13069         available.
13070
13071 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
13072
13073         * mini.c (mono_find_block_region): bug fix in region code
13074         (mini_method_compile): enable removing unreachable code again, but
13075         only in methods without exception clauses.
13076
13077 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
13078
13079         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
13080         Implemented arglist opcode and handling of TypedReference type.
13081         Fixed x86 call convention when a structure is returned.
13082         Minimal support for calling static vararg methods.
13083
13084 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
13085
13086         * mini.c (mini_method_compile):  always remove unreachable code,
13087         because the code in them may be inconsistent  (access to dead
13088         variables for example).
13089
13090 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13091
13092         * driver.c, debug-mini.c: warning fixes.
13093
13094 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13095
13096         * Makefile.am, jit.h, mini.h: install header for embedding mono.
13097
13098 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
13099
13100         * mini.c: thread-static fields are registered in mono_class_vtable(),
13101         so ensure the function is called before checking for them.
13102
13103 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
13104
13105         * mini.c (optimize_branches): fix for bug 43586
13106
13107         * jit-icalls.c (mono_llmult_ovf): added an additional check for
13108         overflow (fixes Bug #43639)
13109
13110 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13111
13112         * mini.c, objects.cs: allow the use of stobj for primitive types.
13113
13114 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13115
13116         * mini.c: be less strict about argument checking until we support
13117         running the verifier.
13118
13119 2003-05-27  Nick Drochak <ndrochak@gol.com>
13120
13121         * basic-long.cs: tests for (ulong)int * (ulong)int also
13122         * mini.c: use the same trick for (ulong)int * (ulong)int
13123
13124 2003-05-27  Nick Drochak <ndrochak@gol.com>
13125
13126         * basic-long.cs: add regression test for (long)int * (long)int
13127         * cpu-pentium.md: add op_bigmul specification
13128         * inssel-long32.brg: add OP_BIGMUL rule
13129         * mini-ops.h: add OP_BIGMUL
13130         * mini-x86.c: register allocator: handle case where src1 needs to be
13131         in EAX.
13132         * mini.c: substitute special BIGMUL opcode in the tree for 
13133         (long)int * (long)int
13134
13135 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13136
13137         * jit-icalls.c: call the type ctor on field access if needed.
13138
13139 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13140
13141         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
13142         to a method (including results of ldelema, bug#43207).
13143
13144 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13145
13146         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
13147         colors to show exception handler blocks.
13148
13149         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
13150         (fix for pinvoke7.cs).
13151
13152 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13153
13154         * mini.h, mini.c: ensure correct initialization order for types that
13155         require it. Prepare for lazy compilation of jit icall wrappers.
13156         Provide a name for opcode emulation to reduce unneeded mallocing.
13157
13158 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13159
13160         * mini-x86.c: better register restoring code and profiling
13161         support for tail calls.
13162
13163 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13164
13165         * mini.h, driver.c: prepare for leaf methods optimization.
13166
13167 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13168
13169         * mini.c: get targets of branches before converting a method.
13170
13171 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
13172
13173         * mini.c (optimize_branches): added some experimental code (disbaled) 
13174
13175 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
13176
13177         * mini.c (optimize_branches): fix branch to branch optimization 
13178
13179         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
13180
13181         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
13182
13183         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
13184
13185         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
13186         if needed.
13187
13188 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13189
13190         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
13191         enable use of interface variables again.
13192
13193         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
13194         I1 to registers because there is no simply way to sign extend 8bit
13195         quantities in caller saved registers on x86.
13196
13197         * inssel-float.brg: set costs of some rules to 2 so
13198         that monobure always select the arch. specific ones if supplied,
13199         regardless of the order we pass the files to monoburg.
13200
13201 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13202
13203         * mini.c, mini-x86.c: since the magic trampoline for jumps
13204         can't patch the code directly, we do it as soon as the
13205         method gets compiled.
13206
13207 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13208
13209         * mini-x86.c, mini.h: introduce a new patching method
13210         to support CEE_JMP and tail calls.
13211         * mini.c: obey tail.call. Don't precompile methods target
13212         of CEE_JMP.
13213         * tramp-x86.c: new trampoline code to handle methods
13214         reached through a jump.
13215
13216 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
13217
13218         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
13219         bit values to registers
13220
13221 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
13222
13223         * mini.c (mono_compile_get_interface_var): share interface
13224         variables if possible.
13225
13226 2003-05-16  Martin Baulig  <martin@ximian.com>
13227
13228         * debug-mini.c (mono_init_debugger): New function to initialize
13229         the debugger.  This is not in the debugger since it needs to
13230         access some of mini's internals.
13231
13232 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13233
13234         * mini.c (mono_method_to_ir): inlining fixes/cleanups
13235
13236 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
13237
13238         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
13239         for value type handling.
13240
13241 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13242
13243         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
13244         (mono_method_check_inlining): enable inlining of all kinds of wrappers
13245
13246 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
13247
13248         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
13249           the constructor through a proxy.
13250
13251 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13252
13253         * jit-icalls.c, inssel.brg: fixes to array element address
13254         calculations.
13255
13256 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
13257
13258         * mini-x86.c (is_regsize_var): allocate pointer to registers
13259
13260 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13261
13262         * driver.c: fixed typo, added intrins to the set of optimizations
13263         tested with regressions.
13264
13265 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13266
13267         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
13268         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
13269         test case.
13270
13271 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
13272
13273         * inssel.brg: remove some common pop instructions without side effects
13274
13275 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13276
13277         * inssel-x86.brg: fixed thinko in int to double conversions.
13278
13279 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13280
13281         * mini.c, jit-icalls.c: added runtime thread-static variable support.
13282
13283 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13284
13285         * inssel-long32.brg: two more missing instructions.
13286
13287 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
13288
13289         * mini.c (mono_emit_call_args): set the cil_code for all arguments
13290         if not already set.
13291
13292 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
13293
13294         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
13295         correctly.
13296
13297         * basic-float.cs: Added tests for negative zero.
13298
13299 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13300
13301         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
13302         a couple of missing operations for long casts, with test cases.
13303
13304 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13305
13306         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
13307
13308 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
13309
13310         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
13311         code size estimation.
13312
13313 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
13314
13315         * mini.c (mono_jit_create_remoting_trampoline): make it work with
13316         abstract methods (fix bug 42542)
13317
13318         * aot.c: add ability to handle array types
13319         
13320 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
13321
13322         * mini.c: Call the _specific versions of the object allocation
13323         functions if possible.
13324
13325 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13326
13327         * driver.c: call setlocale ().
13328
13329 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13330
13331         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
13332         windows build.
13333
13334 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
13335
13336         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
13337
13338         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
13339         wrappers (fix bug 42122)
13340
13341 2003-05-04  Martin Baulig  <martin@ximian.com>
13342
13343         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
13344
13345         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
13346         s/mini_set_defaults/mono_set_defaults/g.
13347
13348 2003-05-04  Martin Baulig  <martin@ximian.com>
13349
13350         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
13351
13352 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13353
13354         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
13355         (reported by Don Roberts).
13356
13357 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
13358
13359         * mini.c: temporarily work around two bugs for this release.
13360
13361 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13362
13363         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
13364         that contains -export-dynamic and it makes using the ld script
13365         useless.
13366         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
13367
13368 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13369
13370         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
13371         specific cpu.
13372
13373 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13374
13375         * mini.c: make sure leave calls all the needed finally blocks,
13376         even when the target jumps out of multiple exception clauses.
13377
13378 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13379
13380         * ldscript, Makefile.am: add linker script to reduce the number of
13381         exported symbols (should also fix the issues with libwine defining
13382         some of the same symbols in io-layer).
13383
13384 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
13385
13386         * driver.c (mini_main): Avoid assertion when no file name is given on 
13387         the command line.
13388
13389 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
13390
13391         * driver.c: added --version/-V command line option.
13392         Added the inline optimization in the regression tests.
13393
13394 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13395
13396         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
13397         to the type in the method signature (fixes bug#42134).
13398
13399 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
13400
13401         * mini.c: when inlining, check this is not null only when needed (bug #42135).
13402
13403 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
13404
13405         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
13406
13407 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13408
13409         * driver.c: fixed bug #42100.
13410
13411 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
13412
13413         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
13414
13415 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13416
13417         * mini.c: moved most of the code required to do inlining to its own
13418         function so it can be reused. Inline also ctors if appropriate.
13419
13420 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
13421
13422         * Makefile.am: Link with -export-dynamic so shared libs loaded by
13423         the runtime can call mono API functions.
13424
13425 2003-04-27  Martin Baulig  <martin@ximian.com>
13426
13427         * debug-mini.c (mono_debug_init_method): Added
13428         `guint32 breakpoint_id' argument; if the method has a breakpoint,
13429         send a notification to the debugger.
13430
13431         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
13432         running in the Mono Debugger, just pass the breakpoint number to
13433         mono_debug_init_method().
13434
13435         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
13436
13437 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
13438
13439         * mini.c: allow some more unsafe compares.
13440
13441 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13442
13443         * mini-x86.c, Makefile.am: make distcheck works (partially from
13444         a patch by Richard Lee <r.h.lee@attbi.com>).
13445         * regset.c, regset.h: removed, they are unused.
13446
13447 2003-04-25  Dick Porter  <dick@ximian.com>
13448
13449         * driver.c: Usage reports the name as 'mono' not 'mini'
13450         * exceptions-x86.c: Build and run on freebsd
13451
13452 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13453
13454         * Makefile.am: install the program with the 'mono' name and
13455         the library as libmono instead of mini and libmini.
13456
13457 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13458
13459         * driver.c: provide the APIs for the embedding interface of the old jit.
13460
13461 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
13462
13463         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
13464
13465 2003-04-23  Martin Baulig  <martin@ximian.com>
13466
13467         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
13468
13469         * driver.c: Added `--debug' command line argument to enable
13470         debugging support.
13471
13472 2003-04-23  Martin Baulig  <martin@ximian.com>
13473
13474         * debug.[ch]: Removed.  The code is now in
13475         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
13476
13477         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
13478         last six months.
13479
13480 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
13481
13482         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
13483
13484 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13485
13486         * mini.c:
13487         (mini_cleanup): moved mono_runtime_cleanup call after the call to
13488         mono_domain_finalize.
13489         (mini_method_compile): use mono_method_profile* if the the option is
13490         enabled.
13491
13492 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
13493
13494         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13495         methods with their wrapper.
13496
13497         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13498         methods with their wrapper.
13499
13500         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
13501         their wrapper.
13502
13503         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
13504         wrapper.
13505
13506         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
13507         methods.
13508
13509 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
13510
13511         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
13512
13513 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
13514
13515         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
13516         of the mempool. This is slightly faster and uses less memory
13517
13518 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13519
13520         * mini.c: avoid O(n) allocation for variables.
13521
13522 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13523
13524         * mini.c: handle items on the stack after inlining methods.
13525
13526 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13527
13528         * mini.c: make the method->opcode optimization dependent
13529         on MONO_OPT_INSTRINS and do it lazily.
13530
13531 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13532
13533         * driver.c: print overall results at the end of regression run.
13534
13535 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13536
13537         * inssel.brg: don't overwrite symbolic registers.
13538
13539 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13540
13541         * inssel-x86.brg: fix conversion from long to float.
13542
13543 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
13544
13545         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
13546
13547 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
13548
13549         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
13550
13551         * driver.c: Added --print-vtable option as in the old JIT.
13552
13553 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13554
13555         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
13556
13557 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13558
13559         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
13560
13561 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
13562
13563         * mini.c regalloc.c regalloc.h: Fix memory leak.
13564
13565 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
13566
13567         * aot.c (mono_aot_get_method): register all used strings
13568
13569 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13570
13571         * mini.c: always intern strings references with ldstr at compile time.
13572
13573 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13574
13575         * Makefile.am: add BUILT_SOURCES.
13576
13577 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13578
13579         * driver.c: give a better error message when the assembly to execute
13580         doesn't have an entry point.
13581
13582 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
13583
13584         * Makefile.am: added hack for automake
13585
13586         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
13587         correct sematics.
13588
13589         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
13590
13591 22003-04-07  Martin Baulig  <martin@ximian.com>
13592
13593         * Makefile.am: Added Makefile.am.
13594
13595         * debugger-main.c: Removed, this is now in the debugger where it
13596         belongs.
13597
13598         * mini.pc.in: Call this package `mini' for the moment.
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608