2008-06-13 Mark Probst <mark.probst@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2
3         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
4         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
5         with calculated IMT.
6
7         * mini.c: Generic sharing of calls via generic interfaces.
8
9         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
10         generic method with non-constant MonoGenericContext*.  Instead,
11         the context is taken out of the method itself.
12
13 2008-06-13  Mark Probst  <mark.probst@gmail.com>
14
15         * mini.c: Generic sharing of ldvirtftn.
16
17 2008-06-13  Mark Probst  <mark.probst@gmail.com>
18
19         * mini.c: Generic sharing of ldftn.
20
21 2008-06-13  Mark Probst  <mark.probst@gmail.com>
22
23         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
24
25 2008-06-13  Mark Probst  <mark.probst@gmail.com>
26
27         * mini.c: Generic sharing of the special case of ldtoken followed
28         by a call to GetTypeFromHandle.
29
30 2008-06-13  Mark Probst  <mark.probst@gmail.com>
31
32         * mini.c: Generic sharing of box for nullable types.
33
34 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
35
36         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
37         are passed on the stack. Fixes #324807.
38
39 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
40
41         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
42         for the ArgValuetypeAddrInIReg case.
43
44         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
45         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
46
47         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
48         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
49         local variable and pass the local variable by reference to the called method.
50           
51         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
52         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
53
54         Contributed under MIT/X11 license.
55
56 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
57
58         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
59
60         * debug-mini.c (mono_debug_print_vars): Release memory after printing
61         everything.
62
63 2008-06-10  Martin Baulig  <martin@ximian.com>
64
65         * debug-mini.c
66         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
67
68 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
69
70         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
71         possible error when no arguments are passed.
72
73         Contributed under MIT/X11 license.
74
75 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
76
77         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
78         where the file name is NULL.
79
80 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
81
82         * mini.c: Fix s390 build.
83
84 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
85
86         * trace.c (mono_trace_parse_options): Fix warnings.
87
88         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
89
90 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
91
92         * mini.c (remove_block_if_useless): Avoid printing the method name.
93         
94         * mini.c: Remove needless setting of ins->cil_code which is now done by 
95         MONO_INST_NEW.
96
97         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
98         LMF. Not yet used.
99
100         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
101         translated code after it has been patched.
102
103 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
104
105         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
106         avoid problems during code patching on SMP systems.
107         (emit_call): Avoid adding a patch info which is already added by 
108         emit_call_body.
109         (mono_arch_emit_exceptions): Ditto.
110
111 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
112
113         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
114         MONO_TYPE_ISSTRUCT already checks for it.
115
116 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
117
118         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
119           structs with floats on Winx64 the float registers are not used.  
120           The integer registers are always used..
121         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
122           only one register will be used and only if the size of the struct 
123           is 1,2,4, or 8 bytes.
124
125         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
126           to work for Winx64.
127
128         Contributed under MIT/X11 license.
129
130 2008-06-05  Martin Baulig  <martin@ximian.com>
131
132         * debug-debugger.c (debugger_lookup_class): Also call
133         mono_class_setup_methods() here; we're only called from RTI.
134
135 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
136
137         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
138         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
139         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
140         Post-process object files and add dtrace-generated object, if necessary.
141
142         Contributed under MIT/X11 license.
143
144 2008-06-04  Mark Probst  <mark.probst@gmail.com>
145
146         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
147         element class.
148
149         * mini.c: Generic sharing for unbox.any and castclass.
150
151 2008-06-04  Mark Probst  <mark.probst@gmail.com>
152
153         * mini.c: Ignore tailcall prefix in shared generic code and when
154         doing calls which require a vtable/rgctx argument.
155
156 2008-06-04  Mark Probst  <mark.probst@gmail.com>
157
158         * mini.c: Don't free the JIT info.
159
160         * driver.c: Changes in the JIT info table testing code.
161
162 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
163
164         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
165         interruption. Fix some warnings.
166
167         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
168         interruption_checkpoint.
169
170 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
171
172         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
173         from embedding applications.
174
175 2008-06-02  William Holmes  <billholmes54@gmail.com>
176
177         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
178           reserving 32 bytes on the stack when making calls. 
179
180         Contributed under MIT/X11 license.
181
182 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
183
184         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
185         the linear IL branch.
186
187         * driver.c: Print out more information for --version on arm.
188
189 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
190
191         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
192         bb_exit instead, since out of line bblocks might not actually be emitted
193         out-of-line.
194         
195         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
196         maximum epilog size for out of line bblocks if tracing is enabled.
197
198         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
199
200 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
201
202         * arrays.cs: Regression tests for allocating arrays with negative sizes.
203
204 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
205
206         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
207         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
208         opcodes.
209
210 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
211
212         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
213         the 'value' to store is a constant.
214
215         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
216
217         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
218         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
219
220 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
221
222         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
223         for accessing method->generic_container.
224
225 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
226
227         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
228         
229         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
230
231         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
232
233         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
234         fails.
235
236 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
237
238         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
239
240         * mini.c: Handle the case when mono_class_vtable () fails.
241
242 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
243         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
244         the stat profiler.
245
246 2008-05-22  Mark Probst  <mark.probst@gmail.com>
247
248         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
249         together with domain sharing.
250
251 2008-05-22  Mark Probst  <mark.probst@gmail.com>
252
253         * mini.c: Treat callvirts to final methods like non-virtual calls
254         when doing generic sharing, i.e. look them up in the runtime
255         generic context.
256
257 2008-05-22  Mark Probst  <mark.probst@gmail.com>
258
259         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
260         with computed types (for generic sharing).
261
262         * mini.c: Generic sharing for mkrefany and refanyval.
263
264 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
265
266         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
267         possible.
268
269         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
270         the generic sharing code.
271         
272         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
273         when needed.
274
275 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
276
277         * mini.h: Remove the declaration of mono_aot_init_vtable ().
278
279 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
280
281         * driver.c: updated copyright date
282
283 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
284
285         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
286         needed.
287
288 2008-05-19  Martin Baulig  <martin@ximian.com>
289
290         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
291         pointing to the new `_mono_debug_using_mono_debugger' variable.
292
293         * driver.c
294         (mono_main): Check mono_debug_using_mono_debugger() rather than
295         the `MONO_INSIDE_MDB' environment variable to check whether we're
296         inside the debugger.
297
298 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
299
300         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
301         argument.
302
303 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
304
305         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
306
307         * mini.c: Added mini_assembly_can_skip_verification. This
308         function checks if the assembly requested to skip verification. 
309         Fixes part of #387274.
310
311 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
312
313         * mini.c (mini_get_method): Disable the check for open generic classes when
314         using generic sharing.
315
316         * generics.cs: Add a test #387034.
317
318         * mini.c (mini_get_method): Check whenever the method class is an open generic
319         type, and return NULL in that case, causing a verification error. Fixes
320         #384123.
321
322 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
323
324         * driver.c (mono_main): Revert r102623. The right
325         thing to do is to enable the verifier under verifiable
326         unless a --security flag was passed.
327
328         We need this non-trivial behavior for --verify-all otherwise
329         mcs-compileall won't be able to use it. As it needs everything to
330         be verified under validil.
331
332 2008-05-06  Martin Baulig  <martin@ximian.com>
333
334         Fix #383749.
335
336         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
337         (mono_debugger_thread_cleanup): Likewise.
338         (mono_debugger_extended_notification): Likewise.
339
340 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
341
342         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
343         against both inflated and non-inflated methods. We need to check against the
344         generic definition for cases where the instantiated method is not visible.
345         We need to check against the inflated types for cases where the instantiation
346         changes any super type. This fixes #382986.
347
348         Note that this doesn't need to be applied to other parts of mono_method_to_ir
349         that check for visibiliy as generic params only appears as the type subject
350         of tokens on call opcodes. Field manipulation and ldftn must always
351         target an exact type.
352
353 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
354
355         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
356         if no related --security flag is passed.
357
358 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
359
360         * mini-arch.h: Prepare support for ppc64.
361
362         Contributed under MIT/X11 license.
363
364 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
365
366         * aot-runtime.c: Prepare support for ppc64.
367
368         Contributed under MIT/X11 license.
369
370 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
371
372         * mini-ops.h: Prepare support for ppc64.
373
374         Contributed under MIT/X11 license.
375
376 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
377
378         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
379
380         Contributed under MIT/X11 license.
381
382 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
383
384         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
385         assemblies, since aot_name is not a full path, causing us to load MS.NET 
386         assemblies on windows.
387
388 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
389
390         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
391         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
392         * main.c: Use UTF-8 encoded command line instead of Windows default code
393         page on Windows to support Unicode.
394         * driver.c (DllMain): New function for mixed-mode assembly support.
395         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
396         export __stdcall functions without decoration.
397
398         Contributed under MIT/X11 license.
399
400 2008-04-28  Mark Probst  <mark.probst@gmail.com>
401
402         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
403         saving it very early.
404
405 2008-04-28  Mark Probst  <mark.probst@gmail.com>
406
407         * mini.h, mini.c: Lots of code for accessing the old RGCTX
408         deleted.  The only way to access the new RGCTX is via the
409         trampline.
410
411         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
412         vtable instead of the RGCTX to static methods.
413
414         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
415         accessing the new RGCTX.
416
417         * generic-sharing.c: There is no separation between self, type
418         arguments and other types in the RGCTX anymore.
419
420 2008-04-25  Jonathan Chambers <joncham@gmail.com>
421
422         * mini-amd64.c (add_general): Remove previous stack adjustment.
423         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
424         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
425         for 32 bytes of stack space reserved for all calls.
426         
427         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
428         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
429         adjustment.
430         
431         Code contributed under MIT/X11 license.
432
433 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
434
435         * mini.c (mini_method_verify): Only verify non-inflated methods, check
436         against the root definition, peeling out method and type instantiations.
437         Cache verify success results, code that fails verification is still
438         checked multiple times.
439
440 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
441
442         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
443
444 2008-04-23  Jonathan Chambers <joncham@gmail.com>
445
446         * mini-amd64.c (add_general): Always increment stack on Win64.
447         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
448         on Win64.
449         
450         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
451         stack based argument handling on Win64.
452         
453         Code contributed under MIT/X11 license.
454
455 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
456
457         * Makefile.am (version.h): Add support for git-svn.
458
459 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
460
461         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
462         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
463         avoiding allocations and libc functions which might deadlock.
464         
465         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
466         'no-gdb-backtrace' option is set.
467
468         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
469
470         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
471
472 2008-04-21  Martin Baulig  <martin@ximian.com>
473
474         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
475         and `get_lmf_addr'; `notification_address' is no longer a pointer.
476
477 2008-04-21  Martin Baulig  <martin@ximian.com>
478
479         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
480         `thread_vtable', `event_handler_ptr' and `event_handler'.
481
482 2008-04-21  Martin Baulig  <martin@ximian.com>
483
484         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
485         allows delayed initialization of the `executable_code_buffer' when
486         attaching.
487
488 2008-04-21  Martin Baulig  <martin@ximian.com>
489
490         * mini.h (mono_debugger_create_notification_function): Removed.
491         * tramp-*.c (mono_debugger_create_notification_function): Removed.
492
493         * mdb-debug-info64.s
494         (MONO_DEBUGGER__notification_function): Added this in the .text section.
495
496         * mdb-debug-info32.s
497         (MONO_DEBUGGER__notification_function): Added this in the .text section.
498
499         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
500         currently only works on x86 and x86_64, so don't create it on ppc.
501
502 2008-04-21  Martin Baulig  <martin@ximian.com>
503
504         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
505
506         * mini.c
507         (mini_method_compile): In the fp elimination check, check
508         `debug_options.mdb_optimizations' in addition to
509         mono_debug_using_mono_debugger().       
510
511         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
512         disable some JIT optimizations which are only disabled when
513         running inside the debugger.
514         Added `--help-debug' option to describe the debugging options.
515         (parse_debug_options): New static function to parse the `--debug'
516         options, so we can easily add more stuff in future.
517
518 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
519
520         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
521         the method has no body.
522
523 2008-04-19  Jonathan Chambers <joncham@gmail.com>
524
525         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
526         assembly is not allowed in MSVC 64-bit compiler. 
527         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
528         as we get floating point exceptions everywhere.
529         
530         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
531         correctly align arguments for call to throw_exception.
532         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
533         
534         Code contributed under MIT/X11 license.
535
536 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
537
538         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
539
540 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
541
542         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
543
544         * mini-amd64.c (NEW_INS): Set cil_code.
545
546         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
547         from mini-amd64.c so all debugger related logic is in one place.
548
549         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
550         later won't have a random ip assigned to them.
551
552 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
553
554         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
555         the arch specific function initializes code_size.
556         (mono_create_delegate_trampoline): Ditto.
557
558         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
559         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
560         platforms.
561
562         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
563         running under the debugger.
564
565         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
566         debugger.
567
568         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
569         debugger. Also move the disabling of optimizations here from driver.c.
570         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
571         debugger.
572
573         * mini.h (MonoCompile): Add a few new flags.
574
575 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
576
577         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
578         so the cil_code field of created MonoInst's is properly set.
579         (mini_select_instructions): Ditto.
580
581         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
582         (MONO_INST_NEW_CALL): Ditto.
583
584         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
585         in many places so the ins->cil_code field is properly initialized.
586
587         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
588         place.
589
590 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
591
592         * mini.c (mini_method_compile): Print a different message when compiling a 
593         shared method.
594         
595         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
596         > 1.
597
598 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
599
600         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
601         SSE2 instructions.
602
603         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
604         
605 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
606
607         * mini.c (handle_stack_args): Make this return void since its return value was
608         never used. Also set cfg->unverifiable for invalid IL instead of calling
609         G_BREAKPOINT ().
610
611 2008-04-10  Mark Probst  <mark.probst@gmail.com>
612
613         * mini.c: Make sure "this" is live in catch clauses with type
614         variables in shared generic code.
615
616 2008-04-08  Mark Probst  <mark.probst@gmail.com>
617
618         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
619         generic_class_is_reference_type() to ensure the proper behaviour
620         when sharing generic code and the type in question is a type
621         argument.
622
623 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
624
625         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
626         race conditions when printing thread dumps. Fixes #377738.
627
628 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
629         
630         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
631         shows up when both MonoInst arguments can cause aliasig.
632         There is likely no way in the current JIT to trigger this problem, but
633         it showed up in the development of generics sharing, when in a new
634         opcode both args of an OP_GROUP can be aliases (addresses of a local).
635         When the generics sharing code will be committed, its tests will be
636         valid also for this bug.
637
638 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
639
640         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
641         PATCH_INFO_METHOD.
642
643         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
644         NULL.
645
646 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
647
648         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
649         use a more detailed exception message for InvalidCastException.
650
651         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
652
653         * driver.c (mono_main): Add --debug=casts option to turn on better 
654         InvalidCastException message details.
655
656         * mini.c (mini_get_debug_options): New helper function to return the address of
657         the debug_options variable.
658
659         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
660         the jit_tls TLS variable.
661
662         * mini.c (mono_jit_tls): New TLS variable.
663
664         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
665         option is used.
666
667 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
668
669         * mini.h: Removed verifer related stuff. This code was moved to verify.c
670
671         * mini.c: Removed verifer related stuff, code moved to verify.c.
672
673         * driver.c: Using code from verify.c instead of mini.c.
674
675 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
676
677         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
678         longer valid.
679
680 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
681
682         * mini.c (check_for_method_verify): Enabling verification of
683         corlib if mono_verify_all is set. Bugs in the verifier preventing that
684         have been fixed.
685
686 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
687
688         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
689         caller saved registers as well.
690         
691         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
692         saved registers as well.
693
694 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
695
696         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
697
698         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
699         code.
700
701 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
702
703         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
704         to get_call_info.
705         (get_call_info): Take a gsctx argument instead of 'cfg'.
706
707 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
708
709         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
710         mono_verify_all is set.
711
712         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
713
714         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
715
716 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
717
718         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
719         an exception.
720
721         * driver.c mini.c mini.h: Add a --verify-all development option to test the
722         verifier and the code generated by the compiler.
723
724 2008-03-25  Mark Probst  <mark.probst@gmail.com>
725
726         * mini.c: Generic sharing of the non-nullable case of the box
727         instruction.
728
729 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
730
731         * inssel.brg: Fix the build.
732
733         * iltests.il.in: Add a test for lconv.ovf.u8.un.
734
735 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
736
737         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
738         Array:Address. Fixes #372410.
739
740         * iltests.il.in: New tests for readonly prefix.
741
742 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
743
744         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
745         mini-trampolines.c.
746
747         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
748         mini-exceptions.c.
749
750         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
751         
752         * mini.c (mono_decompose_op_imm): New helper function.
753
754         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
755         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
756         return value.
757
758         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
759         mono_arch_output_basic_block. Fix warnings.
760
761         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
762         for now.
763
764 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
765
766         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
767         since the extra frame is now detected automatically inside the loop.
768
769         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
770         opts which are now in mono_peephole_ins ().
771         
772         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
773
774         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
775         frames and skip duplicate managed-to-native frames. Fixes #367665.
776
777         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
778         opts which are now in mono_peephole_ins ().
779         (mono_arch_peephole_pass_2): Ditto.
780
781         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
782
783         * mini-codegen.c (mono_peephole_ins): New helper function containing the
784         arch independent peephole optimizations.
785
786         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
787         opts which are now in mono_peephole_ins ().
788
789         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
790         
791         * mini-s390.c (mono_arch_output_basic_block): Fix build.
792
793         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
794         pattern.
795
796         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
797         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
798         opcode. 
799
800 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
801
802         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
803         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
804         return value.
805
806         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
807         mono_arch_output_basic_block. Fix warnings.
808
809 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
810
811         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
812         conv.ovf.u.un.
813
814 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
815
816         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
817         conv.ovf.u.un.
818
819         * iltests.il: Add new tests.
820
821 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
822
823         * mini.c: Removed Windows version macros.
824
825 2008-03-20  Mark Probst  <mark.probst@gmail.com>
826
827         * generic-sharing.c: Put reflection types in the extensible part
828         of the runtime generic context.
829
830         * mini.c: Generic sharing of the GetTypeHandle special case of the
831         ldtoken instruction.
832
833 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
834
835         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
836
837         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
838         
839         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
840         consistency with the other version on the linear IR branch.
841
842         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
843
844         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
845
846         * iltests.il.in: Add new tests.
847
848 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
849
850         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
851
852         * iltests.il.in: Add new tests.
853
854 2008-03-19  Mark Probst  <mark.probst@gmail.com>
855
856         * mini.c: Two variables with the same name were declared in
857         nesting contexts and one wasn't initialized.  Fixed.
858
859 2008-03-19  Mark Probst  <mark.probst@gmail.com>
860
861         * mini.c: Generic sharing of the initobj instruction.
862
863 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
864
865         * mini.c: make the test to optimize ldtoken from typeof() more
866         precise.
867
868 2008-03-18  Mark Probst  <mark.probst@gmail.com>
869
870         * mini.c: Generic sharing of the initobj instruction for reference
871         types.
872
873 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
874
875         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
876         the mono_breakpoint_clean_code() code to perform bound checks.
877
878 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
879
880         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
881         mono_arch_patch_callsite() to include the start of the managed method
882         to be able to perform bound checks.
883
884 2008-03-17  Mark Probst  <mark.probst@gmail.com>
885
886         * mini.c: Generic sharing for the isinst instruction.
887
888 2008-03-17  Mark Probst  <mark.probst@gmail.com>
889
890         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
891         inssel-long32-mips.brg: Added opcodes for doing indirect calls
892         with the runtime generic context argument.
893
894         * mini.c: Share calls to several types of unsharable methods by
895         putting the address of the method code in the runtime generic
896         context and doing an indirect call.
897
898         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
899         to switches.
900
901 2008-03-16  Mark Probst  <mark.probst@gmail.com>
902
903         * generic-sharing.c: Change due to a change in the runtime genric
904         context API.
905
906 2008-03-15  Martin Baulig  <martin@ximian.com>
907
908         * tramp-x86.c
909         (mono_arch_nullify_class_init_trampoline): Add call to
910         mono_breakpoint_clean_code() to make things work when running
911         inside the debugger.
912
913         * tramp-amd64.c
914         (mono_arch_nullify_class_init_trampoline): Add call to
915         mono_breakpoint_clean_code() to make things work when running
916         inside the debugger.
917
918 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
919
920         * inssel-long.brg (reg): Fix 64 bit build.
921
922 2008-03-14  Mark Probst  <mark.probst@gmail.com>
923
924         * mini.c, mini.h: Share static generic code by passing it an
925         implicit argument pointing to the runtime generic context.
926
927         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
928         inssel-long32-mips.brg: New opcodes for calling shared static,
929         which need to be passed the runtime generic context.
930
931         * mini-amd64.c, mini-x86.c: Save the runtime generic context
932         argument on the stack in the prologue if needed.  New function for
933         finding the runtime generic context argument from the registers
934         saved by the trampoline.
935
936         * mini-amd64.h, mini-x86.h: Specify which register to use for the
937         runtime generic context argument.
938
939         * tramp-amd64.c: Also restore the register used for the runtime
940         generic context argument.
941
942         * mini-trampoline.c: Resolve shared static calls by consulting the
943         runtime generic context via the new argument.
944
945         * generic-sharing.c: Add an argument to sharability-checking
946         functions that specifies whether type variables should be treated
947         as sharable type arguments.
948
949         * inssel-x86.brg: Removed a superfluous, buggy rule.
950
951         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
952         to switches.
953
954 2008-03-14  Martin Baulig  <martin@ximian.com>
955
956         * debug-debugger.c (main_thread_handler): Call
957         mono_runtime_run_main() without sending any notifications.
958
959         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
960
961 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
962
963         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
964
965 2008-03-14  Mark Probst  <mark.probst@gmail.com>
966
967         * tramp-x86.c: Fixed register restore offsets in the trampoline
968         code for ECX and EDX.
969
970 2008-03-12  Geoff Norton  <gnorton@novell.com>
971
972         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
973         different ucontext_t implementations.
974         * exceptions-arm.c: Use the above defines to get exceptions working on 
975         iPhone (based on a patch by Luke Howard lukeh@padl.com)
976         * mini-arm.c: Implement iPhone icache support (based on a patch by
977         Luke Howard lukeh@padl.com)
978
979 2008-03-12  Mark Probst  <mark.probst@gmail.com>
980
981         * mini.c: Enable generic sharing of calls to non-static
982         non-interface non-generic non-value-type methods.
983
984         * mini-trampolines.c: Resolve calls from shared generic code.
985
986 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
987
988         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
989
990         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
991
992 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
993
994         * mini.c: some fixes for the AOT compiler.
995
996 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
997
998         * cpu-amd64.md: Add clob:1 to some float opcodes.
999
1000 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
1001
1002         * mini.h: Added MiniVerifierMode enumeration.
1003
1004         * mini.c: Added mini_verifier_set_mode to control
1005         the usage of the new verifier.
1006
1007         * mini.c (mono_method): Integrated the new verifier.
1008
1009         * driver.c: Extended --security option with validil and
1010         verifiable options to activate the new verifier.
1011
1012 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
1013
1014         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
1015         optimization to ctors taking 0 or 2 arguments too.
1016
1017         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
1018         a bit.
1019
1020         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
1021
1022         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
1023
1024 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
1025
1026         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
1027         non-aot case as well.
1028
1029         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
1030
1031         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
1032         changes.
1033
1034         * aot-compiler.c (encode_patch): Ditto.
1035
1036         * mini.h (G_MININT32): Fix the definition of this.
1037
1038 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
1039
1040         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
1041
1042         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
1043
1044 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
1045
1046         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
1047         methods returning vtypes in registers.
1048         (mono_arch_allocate_vars): Ditto.
1049
1050         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
1051
1052         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
1053
1054         * generics.cs: Add a test from the linear IR branch.
1055
1056         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
1057
1058         * mini.c (inline_method): Cache failed inline attempts.
1059
1060 2008-03-04  Mark Probst  <mark.probst@gmail.com>
1061
1062         * mini.c: For shared methods of generic classes put the location
1063         of "this" into the MonoGenericJitInfo.
1064
1065         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
1066         register out of a MonoContext by register number.  Add the generic
1067         sharing context as an argument to mono_arch_find_this_argument().
1068
1069         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
1070         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
1071         for new arch function.
1072
1073         * mini-exception.c: Handle open exception clauses in shared
1074         generic code.
1075
1076         * mini-trampolines.c: Supply additional argument to
1077         mono_arch_find_this_argument().
1078
1079 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
1080
1081         * Makefile.am (regtests): Run the bench.exe tests last.
1082
1083 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
1084
1085         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
1086         a bit.
1087
1088 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
1089
1090         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
1091         with MS.
1092
1093         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
1094         
1095         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
1096
1097         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
1098         whose class has no cctor.
1099
1100         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
1101
1102 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
1103
1104         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
1105         unverified.
1106
1107 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
1108
1109         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
1110         to be in sync with the code on the linear IR branch.
1111
1112         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
1113
1114         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
1115
1116 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
1117
1118         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
1119
1120         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
1121
1122         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
1123
1124         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
1125
1126         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
1127         
1128         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
1129         body.
1130
1131 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
1132
1133         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
1134         OP_LOADR4_MEMBASE emission.
1135
1136         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
1137         (mono_spillvar_offset_float): Ditto.
1138
1139         * mini-mips.c (mono_arch_emit_prolog): Ditto.
1140
1141         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
1142         emission.
1143
1144         * basic-long.cs: Add regression tests for them.
1145
1146         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
1147         use.
1148         (mono_arch_allocate_vars): Fix representation of single-precision float
1149         argument.
1150         (mono_arch_output_basic_block): Ditto.
1151
1152         * inssel-mips.brg: Ditto, remove duplicate items.
1153
1154         * mini-mips.c (emit_load_volatile_arguments): New function to handle
1155         arguments of tail calls as on other platforms.
1156         (mono_arch_output_basic_block): Handle tail calls.
1157
1158         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
1159         register.
1160
1161         * objects.cs (test_5_pass_static_struct): Add test for it.
1162
1163         Contributed under MIT/X11 license.
1164
1165 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
1166
1167         * Makefile.am: Use gmcs for compiling the regression tests.
1168
1169         * *.2.cs *.2.il: Rename to *.cs and *.il.
1170
1171 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
1172
1173         * regalloc.h: Make the vassign array smaller.
1174
1175         * mini.c (mini_method_compile): Remove an unused field in cfg.
1176
1177         * mini-codegen.c: Add a bunch of micro optimizations.
1178
1179 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
1180
1181         * regalloc.h: Remove some unused fields.
1182
1183 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
1184
1185         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
1186
1187         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
1188
1189 2008-02-22  Mark Probst  <mark.probst@gmail.com>
1190
1191         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
1192
1193         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
1194         trampoline: Fetch an entry from the runtime generic context.  If
1195         it's NULL, jump to the actual trampoline to fill the runtime
1196         generic context.  Otherwise, return it.
1197
1198         * mini.c: Call the lazy fetch trampoline to get entries out of the
1199         runtime generic context.
1200
1201         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
1202         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
1203         tramp-sparc.c: Stubs for the lazy fetch trampoline.
1204
1205 2008-02-21  Mark Probst  <mark.probst@gmail.com>
1206
1207         * mini.c: Fetch data out of the extensible part of the runtime
1208         generic context instead of calling a helper function.
1209
1210         * generic-sharing.c: Some functions moved into
1211         metadata/generic-sharing.c.  Helper function for fetching other
1212         types now checks and asserts against extensible rgctx (just for
1213         debugging purposes - the helper function isn't called anymore
1214         unless for debugging).
1215
1216 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1217
1218         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
1219         for tail calls up to the point that the tests in iltests.exe run. Also add a
1220         dummy CKFINITE implementation.
1221         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
1222         needed for trampoline LMF frames.
1223
1224         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
1225         trampoline LMF frames.
1226
1227 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
1228
1229         * mini.c (inline_method): clean any pending loader error when inlining fail.
1230         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
1231
1232 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1233
1234         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
1235
1236         * aot-runtime.c (decode_patch_info): Ditto.
1237
1238         * mini.c (mono_resolve_patch_target): Ditto.
1239         
1240         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
1241         icall wrappers.
1242
1243         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
1244         
1245         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
1246         if it references an icall address.
1247
1248 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
1249
1250         * cpu-s390x.md: Remove some more unused opcodes.
1251         
1252         * cpu-s390x.md: Remove some unused opcodes.
1253
1254         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
1255         mono_op_imm_to_op ().
1256
1257         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
1258         instead of a switch statement.
1259         
1260         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
1261         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
1262
1263         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
1264         
1265         * mini-codegen.c: Remove unused mono_regstate2_... functions.
1266
1267         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
1268         -1.
1269
1270 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
1271
1272         * driver.c (mono_main): Improve error reporting when an assembly cannot be
1273         opened. Fixes #362607.
1274
1275         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
1276
1277         * iltests.il.in: Add a test for static methods in interfaces.
1278
1279 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
1280
1281         * genmdesc.c (build_table): Fix a crash on older glib versions.
1282
1283         * cpu-sparc.md: Remove some unused opcodes.
1284         
1285         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
1286         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
1287
1288         * cpu-amd64.md: Remove some unused opcodes.
1289
1290         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
1291         like the other opcodes.
1292
1293 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
1294
1295         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
1296
1297         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
1298
1299         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
1300         variables 'cfg' instead of 'm' for consistency.
1301
1302         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
1303
1304         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
1305         argument holding the vtype return address, to avoid the ambigious use of
1306         cfg->ret for this purpose.
1307
1308         * mini.c (NEW_RETLOADA): Use vret_addr if set.
1309
1310         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
1311         
1312         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
1313         new mono_print_ins () function which only takes one argument.
1314
1315 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
1316
1317         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
1318         macro arguments.
1319
1320 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
1321
1322         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
1323
1324         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
1325
1326         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
1327         opcodes and other small changes.
1328
1329         * mini-ops.h: Add some new opcodes from the linear IR branch.
1330
1331         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
1332
1333         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
1334         opcodes, use the REG_MEMBASE opcodes instead.
1335         
1336         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
1337         opcodes, use the REG_MEMBASE opcodes instead.
1338         
1339         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
1340         linear IR branch.
1341
1342         * mini.c (mono_op_imm_to_op): New helper function.
1343
1344         * mini-ops.h: Add some opcodes from linear IR branch.
1345
1346 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
1347
1348         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
1349         <tsv@solvo.ru>.
1350
1351 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
1352
1353         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
1354         OP_ICONV_TO_R4/R8.
1355
1356         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
1357
1358 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
1359
1360         * aot-compiler.c (emit_method_code): Add an assert.
1361
1362         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
1363         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
1364         methods.
1365
1366 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
1367
1368         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
1369         some load/store opcodes so they are consistent. 
1370         (mono_arch_emit_prolog): Simplify some code.
1371
1372         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
1373
1374         * objects.cs: Add tests for large argument offsets on ARM.
1375
1376         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
1377         stack offsets. Fixes #359651.
1378
1379         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
1380
1381         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
1382
1383         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
1384
1385         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
1386
1387         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
1388
1389         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
1390         rid of CEE_CONV_R_UN.
1391
1392         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
1393
1394 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
1395
1396         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
1397
1398         * mini.c (mono_normalize_opcodes): Add some more opcodes.
1399
1400         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
1401
1402         * cpu-amd64.md: Remove some unused opcodes.
1403
1404         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
1405
1406         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
1407
1408         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
1409         arch specific functions for its parts. Call the peephole pass after local
1410         regalloc so the prolog can compute a more accurate max_offset.
1411         
1412         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
1413         the corresponding OP_I/OP_L opcodes.
1414
1415         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
1416
1417         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
1418
1419 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1420
1421         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
1422         as they are handled in mini.c.
1423
1424         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
1425         
1426         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
1427         case since it is handled in mini.c.
1428
1429         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
1430
1431         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
1432
1433         * *.c: Use the new opcodes in the IR and back end code.
1434
1435         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
1436
1437         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
1438
1439 2008-02-06  Mark Probst  <mark.probst@gmail.com>
1440
1441         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
1442         an assert because it has a race condition.
1443
1444 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1445
1446         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
1447
1448         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
1449
1450         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
1451
1452         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
1453         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
1454
1455 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
1456
1457         * cpu-amd64.md (move): Correct the maximum size of move.
1458
1459 2008-02-05  Mark Probst  <mark.probst@gmail.com>
1460
1461         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
1462         the generic class init trampoline to return quickly if the class
1463         is already inited.
1464
1465 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
1466
1467         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
1468         issues where an 32 bit callsite cannot be patched by a 64 bit address.
1469
1470 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
1471
1472         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
1473         branch.
1474
1475 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
1476
1477         * objects.cs: Add some soft-float tests.
1478
1479         * mini.c: Fix a couple more soft-float issues.
1480
1481         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
1482
1483         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
1484         avoid a REX prefix.
1485
1486 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
1487
1488         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
1489         exception happens while compiling a virtual method.
1490
1491 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
1492
1493         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
1494         
1495         * mini-sparc.c: Fix build.
1496
1497         * mini-sparc.c (get_call_info): Add support for generic sharing.
1498
1499         * mini-exceptions.c: Add a FIXME.
1500
1501 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
1502
1503         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
1504         altstack handling code.
1505
1506         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
1507         
1508         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
1509
1510         * mini-s390.c: Add support for generic sharing.
1511
1512         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1513         Fix CAS on s390.
1514         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1515
1516         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
1517
1518         * mini-s390x.c: Add support for generic sharing.
1519         
1520         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1521         Fix CAS on ia64.
1522         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1523
1524         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
1525         can be used since it takes a 16 bit signed immediate.
1526
1527         * inssel-s390x.brg: Fix OP_SETRET.
1528
1529         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
1530
1531         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
1532
1533         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
1534
1535         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
1536
1537         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
1538         in one place.
1539
1540         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
1541         stuff.
1542
1543         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
1544         of the unused mono_arch_patch_delegate_trampoline stuff.
1545
1546 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
1547
1548         * basic-long.cs: Move the fp related tests to basic-float.cs.
1549
1550         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
1551
1552         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
1553
1554         * basic-calls.cs: Add a test for proper float argument passing.
1555
1556         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
1557         if the context corresponds to an exception received through a signal.
1558
1559         * exceptions.cs: Add a test for nullref handling at the start of a try
1560         clause.
1561
1562         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
1563
1564         * jit-icalls.c (mono_break): New JIT icall.
1565
1566         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
1567
1568         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
1569
1570 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
1571
1572         * cpu-*.md: Get rid of unused opcodes.
1573
1574         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
1575
1576         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
1577         by all platforms.
1578
1579         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
1580         define.
1581
1582         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
1583         the arch independent trampoline code in mini-trampolines.c.
1584
1585         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
1586
1587         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
1588
1589         * mini-s390.h: Remove an unused define.
1590         
1591         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
1592         the arch independent trampoline code in mini-trampolines.c.
1593
1594         * mini-arm.c (mono_arch_emit_prolog): Fix build.
1595
1596 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
1597
1598         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
1599
1600         * mini-s390.c (mono_arch_emit_prolog): Fix build.
1601
1602         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
1603
1604         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
1605
1606         * cpu-amd64.md: Use smaller sizes for int opcodes.
1607
1608         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
1609
1610         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
1611         objects.cs.
1612
1613         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
1614         debugging.
1615
1616         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
1617         instead of though a pointer to save an indirection when accessing elements of
1618         the array.
1619
1620         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
1621         some typos.
1622         (NOT_IMPLEMENTED): New helper macro.
1623         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
1624         of a bb.
1625
1626         * *.c: Use the new helper macro.
1627
1628 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
1629
1630         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
1631
1632 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
1633
1634         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
1635         stack slots.
1636
1637 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
1638
1639         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
1640         profiling is enabled.
1641         
1642         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
1643         the end.
1644         (mono_arch_emit_prolog): Add more first bblock optimizations.
1645
1646         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
1647         in order if possible.
1648         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
1649         bblock, since the arguments are still in their original registers.
1650
1651         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
1652
1653 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
1654
1655         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
1656         as well.
1657
1658         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
1659         offset 0.
1660
1661         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
1662
1663         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
1664         process async exceptions received while in unmanaged code.
1665
1666         * mini.c (mini_init): Install a callback with the runtime which will be called
1667         when a thread receives an async exception while in unmanaged code.
1668
1669         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
1670
1671         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
1672
1673 2008-01-16  Wade Berrier  <wberrier@novell.com>
1674
1675         * cpu-g4.md:
1676         * cpu-arm.md:
1677         * cpu-s390x.md:
1678         fix build
1679
1680 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
1681
1682         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
1683         compilation with sun cc.
1684
1685         * cpu-*.md: Fix the build.
1686
1687         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
1688
1689         * mini-amd64.h: Add some comments to the MonoLMF structure.
1690
1691         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
1692         
1693         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
1694         in the LMF structure if possible. This saves two instructions in the
1695         managed->native wrappers.
1696
1697         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
1698
1699 2008-01-16  Mark Probst  <mark.probst@gmail.com>
1700
1701         * generic-sharing.c: New type argument lookup code which uses the
1702         runtime generic context template.
1703
1704 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
1705
1706         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
1707
1708         * mini-arm.c (add_general): Fix arm eabi parameter passing.
1709         (mono_arch_output_basic_block): Fix localloc implementation.
1710
1711         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
1712
1713         * mini-ia64.c (peephole_pass): Fix ia64 build.
1714
1715         * mini-amd64.c (peephole_pass): Fix a warning.
1716         
1717         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
1718         at a constant offset from sp/fp.
1719
1720         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
1721         instead of obtaining it from *lmf in the managed method case.
1722
1723 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
1724
1725         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
1726
1727 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
1728
1729         * mini.h (MonoInstList): New type.
1730         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
1731         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
1732         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
1733         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
1734         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
1735         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
1736         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
1737         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
1738         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
1739         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
1740         MONO_INST_LIST_FOR_EACH_ENTRY,
1741         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
1742         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
1743         mono_inst_list_first, mono_inst_list_last,
1744         mono_inst_list_next, mono_inst_list_prev): New instruction
1745         list handling interfaces.
1746         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
1747         list head 'ins_list'.
1748         (MonoInst): Replace next pointer with list head 'node'.
1749         (MonoCallInst): Make 'out_args' a MonoInstList.
1750         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
1751         (MonoCompile): Delete reverse_inst_list and
1752         reverse_inst_list_len.
1753         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
1754         mono_arch_lowering_pass, mono_arch_local_regalloc,
1755         mono_arch_output_basic_block, mono_arch_emit_prolog):
1756         Convert to new instruction lists.
1757         (insert_after_ins): Delete.
1758         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
1759         instruction lists.
1760         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
1761         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
1762         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
1763         mono_emulate_opcode, mono_emit_load_got_addr,
1764         inline_method, mono_method_to_ir, mono_print_bb_code,
1765         print_dfn, decompose_pass, nullify_basic_block,
1766         replace_out_block_in_code, remove_block_if_useless,
1767         merge_basic_blocks, move_basic_block_to_end,
1768         try_unsigned_compare, optimize_branches, mono_print_code,
1769         mini_select_instructions, remove_critical_edges): Likewise.
1770         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
1771         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
1772         mono_arch_output_basic_block, mono_arch_emit_prolog):
1773         Likewise.
1774         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
1775         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1776         mono_arch_output_basic_block): Likewise.
1777         (inst_list_prepend, insert_after_ins): Delete.
1778         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
1779         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
1780         instruction lists.
1781         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
1782         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
1783         mono_arch_emit_prolog): Likewise.
1784         * cfold.c (mono_constant_fold): Likewise.
1785         * liveness.c (visit_bb, mono_analyze_liveness,
1786         optimize_initlocals): Likewise.
1787         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
1788         * graph.c (mono_draw_code_cfg): Likewise.
1789         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
1790         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
1791         mono_ssa_cprop): Likewise.
1792         * abcremoval (get_relations_from_previous_bb, process_block):
1793         Likewise.
1794         * local-propagation (mono_cprop_invalidate_values,
1795         mono_local_cprop_bb): Likewise.
1796         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
1797         peephole_pass, mono_arch_output_basic_block,
1798         mono_arch_emit_prolog): Likewise.
1799         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
1800         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1801         mono_arch_emit_prolog): Likewise.
1802         (insert_after_ins): Delete.
1803         * aliasing.c (print_code_with_aliasing_information,
1804         mono_build_aliasing_information, mono_aliasing_deadce):
1805         Convert to new instruction lists.
1806         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
1807         peephole_pass, NEW_INS, mono_arch_lowering_pass,
1808         mono_arch_local_regalloc, mono_arch_output_basic_block):
1809         Likewise.
1810         (insert_after_ins): Delete.
1811         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
1812         peephole_pass, mono_arch_output_basic_block): Convert to
1813         new instruction lists.
1814         * mini-codegen (InstList, inst_list_prepend,
1815         insert_after_ins): Delete.
1816         (insert_before_ins, get_register_force_spilling,
1817         get_register_spilling, free_up_ireg, free_up_reg,
1818         create_copy_ins, create_spilled_store, alloc_int_reg,
1819         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
1820         to new instruction lists.
1821         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
1822         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1823         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
1824         (insert_after_ins): Delete.
1825         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
1826         mono_arch_local_regalloc, mono_arch_output_basic_block,
1827         mono_arch_call_opcode): Convert to new instruction lists.
1828         (insert_after_ins): Delete.
1829         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
1830         peephole_pass, mono_arch_output_basic_block,
1831         mono_arch_emit_prolog): Convert to new instruction lists.
1832
1833 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
1834
1835         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
1836
1837         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
1838         Fixes #353182.
1839
1840         * Makefile.am (version.h): Make this work with non-bash shells.
1841
1842 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
1843
1844         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
1845
1846 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
1847
1848         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
1849         the InitializeArray optimization.
1850
1851 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
1852
1853         * mini.c driver.c: Don't include os/gc_wrapper.h.
1854
1855 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
1856
1857         * mini.c (print_jit_stats): Print GC statistics if available.
1858
1859 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
1860
1861         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
1862
1863 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
1864
1865         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
1866
1867 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
1868
1869         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
1870         
1871         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
1872
1873         * driver.c (mono_main): Ditto.
1874
1875 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
1876
1877         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
1878
1879         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
1880         in the vtable can't be encoded.
1881         (compile_method): Ditto.
1882
1883 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
1884
1885         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
1886         defined.
1887
1888         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
1889         lmf->rbp.
1890
1891         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
1892         the top LMF entry belongs to the current method.
1893
1894         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
1895
1896 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
1897
1898         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
1899         
1900         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
1901
1902         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
1903
1904         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
1905
1906         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
1907
1908         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
1909         implementation.
1910
1911         * basic-float.cs: Add an ulong->double cast test.
1912
1913 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
1914
1915         * mini.c (mono_method_to_ir): Fix a warning.
1916
1917 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
1918
1919         * mini-ops.h: Add OP_SWITCH.
1920
1921         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
1922         CEE_SWITCH in back-end code, use OP_SWITCH instead.
1923
1924 2007-12-11  Geoff Norton  <gnorton@novell.com>
1925
1926         * mini-s390x.c: Minor change to the MAX() define to allow
1927         it to compile with other gcc versions.
1928
1929 2007-12-11  Geoff Norton  <gnorton@novell.com>
1930
1931         * cpu-s390x.md:
1932         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
1933
1934 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
1935
1936         exceptions-arm.c (mono_arch_get_restore_context): Restore
1937         the frame pointer.
1938
1939         exceptions-arm.c (throw_exception): Save the frame pointer.
1940         This is a partial fix for #323747. Only the client side is
1941         fixed.
1942
1943 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
1944
1945         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
1946         was using an unrelated variable to log the class which
1947         needed the cctor to be called. This was crashing on arm.
1948
1949 2007-12-09  Robert Jordan  <robertj@gmx.net>
1950
1951         * mini-x86.c (mono_arch_emit_epilog):
1952         Consider all kinds of 64-bit types. Fixes #323114.
1953
1954 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
1955
1956         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
1957
1958 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1959
1960         * mini-amd64.c (peephole_pass): Add a missing instruction check.
1961
1962 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
1963
1964         * mini.c: run type ctor before allocating an object, not only
1965         when running it's constructor method (fixes at least part of bug #342507).
1966
1967 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1968         
1969         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
1970         
1971         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
1972         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
1973         function.
1974
1975         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
1976         mono_generic_class_init_trampoline () the same as it is done with the other
1977         trampolines.
1978
1979         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
1980         aot-runtime.c aot-compiler.c: Implement AOT support.    
1981
1982 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1983
1984         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
1985         build for archs which don't have the vtable trampoline defined
1986         yet.
1987
1988 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
1989
1990         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
1991
1992         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
1993
1994         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
1995
1996         * tramp-<ARCH>.c: Use the new helper function.
1997
1998 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1999
2000         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
2001         trampoline call, which takes a vtable argument.
2002
2003         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
2004         OP_TRAMPCALL_VTABLEs like other calls.
2005
2006         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
2007         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
2008         call.  Implemented a support function which fetches the vtable
2009         from a register set.
2010
2011         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
2012         Implemented a generic class init trampoline, using the
2013         OP_TRAMPCALL_VTABLE opcode.
2014
2015         * mini.c: Implemented static field access when sharing generic
2016         code.  This implies initing the class using the new
2017         OP_TRAMPCALL_VTABLE call.
2018
2019 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2020
2021         * mini.c: Don't compile methods with sharing enabled if their
2022         classes are disabled for sharing.
2023
2024 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
2025
2026         * inssel.brg: Add a missing sign extension to the GETCHR and array access
2027         opcodes. Fixes #346563.
2028
2029         * objects.cs: Add a new test.
2030
2031         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
2032
2033         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
2034         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
2035
2036 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
2037
2038         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
2039
2040 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
2041
2042         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
2043         code stream.
2044
2045 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
2046
2047         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
2048
2049         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
2050         optimization in the AOT case.
2051         
2052 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
2053
2054         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
2055         
2056         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
2057
2058         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
2059
2060         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
2061
2062         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
2063         is created by the inlined delegate ctor.
2064
2065         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
2066
2067         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
2068
2069 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
2070
2071         * cpu-x86.md: Fix the length of ckfinite.
2072
2073 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
2074
2075         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
2076         
2077         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
2078         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
2079
2080         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
2081
2082         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
2083         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
2084
2085 2007-11-28  Martin Baulig  <martin@ximian.com>
2086
2087         * mini-x86.c
2088         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
2089         after creating the trampoline.
2090
2091 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
2092
2093         * aot-runtime.c (load_aot_module): Check runtime version if needed.
2094
2095         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
2096         the same version.
2097
2098         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
2099         instead of the calling method to help AOT.
2100
2101         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
2102
2103 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
2104
2105         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
2106         is defined.
2107
2108 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
2109
2110         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
2111         
2112         * aot-compiler.c (compile_method): Correct check for generic method definitions.
2113         (encode_method_ref): No need to handle generic method definitions specially.
2114
2115         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2116
2117         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
2118         decode_klass_info.
2119
2120         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
2121         encode_klass_info.
2122         (compile_method): Enable generic sharing.
2123
2124 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
2125
2126         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
2127         (mini_method_compile): Add preliminary support for AOTing shared generic code.
2128
2129         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
2130         generic code.
2131
2132         * mini-trampolines.c: Fix a warning.
2133
2134         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
2135         NEW_PCONST.
2136         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
2137         (generic_class_is_reference_type): Remove unused function.
2138
2139         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
2140         in the generic vtable trampoline case.
2141
2142         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
2143         
2144         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
2145         return an AOT method based on a vtable slot.
2146
2147         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
2148
2149         * mini.c (mini_get_vtable_trampoline): Export this.
2150
2151 2007-11-22  Martin Baulig  <martin@ximian.com>
2152
2153         * debug-debugger.h
2154         (MonoDebuggerInfo): Move `debugger_version' up.
2155
2156 2007-11-22  Martin Baulig  <martin@ximian.com>
2157
2158         * mini-amd64.c
2159         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
2160
2161         * mini-trampolines.c
2162         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
2163         after compiling the method.
2164
2165 2007-11-20  Martin Baulig  <martin@ximian.com>
2166
2167         * debug-mini.c
2168         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
2169         (mono_debugger_remove_breakpoint): Likewise.
2170         (mono_debugger_check_breakpoints): Likewise.
2171
2172         * debug-debugger.c: Implement the new breakpoint interface here.
2173
2174 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
2175
2176         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
2177         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
2178
2179         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
2180
2181 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
2182
2183         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
2184
2185         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
2186         mini.c.
2187
2188         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
2189         mini.c.
2190
2191         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
2192         returning a vtype in a register.
2193
2194         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
2195         here from the arch specific code.
2196
2197         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
2198         mini.c.
2199
2200         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
2201         (mono_arch_emit_prolog): Increment maximum prolog size.
2202
2203         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
2204         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
2205
2206         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
2207         MonoGenericSharingContext.
2208
2209         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
2210         MonoGenericSharingContext. Allocate memory from the cfg mempool.
2211
2212 2007-11-15  Mark Probst  <mark.probst@gmail.com>
2213
2214         * mini.c, mini.h, generic-sharing.c: Functions for producing code
2215         which extract fields out of the runtime generic context.  Full
2216         sharing of the NEWARR opcode.
2217
2218 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
2219
2220         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
2221         --enable-minimal=ssa.
2222
2223 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
2224
2225         * mini-trampolines.c (mono_delegate_trampoline): Update after 
2226         mono_marshal_get_delegate_invoke () signature change.
2227
2228 2007-11-13  Mark Probst  <mark.probst@gmail.com>
2229
2230         * mini.c: Removed the shared context in favor of the generic
2231         sharing context.  Allocate the MonoJitInfo structure with room for
2232         the generic sharing context if it's needed.
2233
2234         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
2235         domain-internals.h now.
2236
2237         * mini-x86.c: Pass the generic sharing context to get_call_info ().
2238
2239         * generic-sharing.c: Several changes for working without a shared
2240         context and instead operating on open types instead.
2241
2242 2007-11-12  David S. Miller  <davem@davemloft.net>
2243
2244        * inssel-sparc.brg: Fix double instruction emit.
2245
2246 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
2247
2248         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
2249         Get/Set/Address methods.
2250         
2251         * mini.c debug-debugger.c mini-trampolines.c: Update after 
2252         mono_marshal_get_delegate_invoke signature change.
2253
2254 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2255
2256         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
2257         This can happens with dynamic methods. Fixes the other bug in #322722.
2258
2259 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2260
2261         * tramp-arm.c (mono_arch_patch_callsite): Support patching
2262         BX call sequence.
2263
2264         * mini-arm.c (arm_patch): Implement patching of BX call
2265         sequence. Fixes one of the bugs in #322722.
2266
2267 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
2268
2269        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
2270        under Linux.  We only need to flush every 32-byte cache line.    
2271
2272 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
2273
2274         * mini.c:
2275         move_basic_block_to_end: Add branches when needed, eventually creating
2276         a new BB.
2277         optimize_branches: added a parameter that tells if it's ok to create
2278         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
2279         and avoid calling move_basic_block_to_end when it's not ok.
2280         Fixes bug 318677.
2281
2282 2007-11-07  Mark Probst  <mark.probst@gmail.com>
2283
2284         * mini.c: Abort inlining call to InitializeArray if something
2285         looks wrong.  Let the icall handle it, which now has proper safety
2286         checks.
2287
2288 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2289
2290         * mini.c (mono_spill_call): add support for soft-float.
2291
2292         * mini.c (mono_method_to_ir): add support for soft-float
2293         to inlined functions that return float.
2294
2295         * mini.c (mono_method_to_ir): add support for soft-float
2296         to cee_stsfld opcode on float fields.
2297
2298 2007-11-05  Geoff Norton  <gnorton@novell.com>
2299
2300         * mini-x86.h: Fix the structure access for X86 Leopard.
2301
2302
2303 2007-11-05  Martin Baulig  <martin@ximian.com>
2304
2305         * mini-trampolines.c
2306         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
2307         after compiling the method to notify the debugger.
2308
2309 2007-11-05  Martin Baulig  <martin@ximian.com>
2310
2311         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
2312
2313 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
2314
2315         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
2316         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
2317
2318 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
2319
2320         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
2321         native-to-managed wrappers.
2322         
2323 2007-11-01  Geoff Norton  <gnorton@novell.com>
2324
2325         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
2326         members.
2327
2328 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
2329
2330         * mini.c, mini-x86.c: when getting back from unmanaged code
2331         to managed via a marshaled delegate we also need to set the
2332         right domain.
2333
2334 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
2335
2336         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
2337         for amd64.
2338
2339 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
2340
2341         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
2342         let the debugger or other external agents to tell the JIT when
2343         a sw breakpoint has been inserted in the code that the JIT needs
2344         to be able to inspect.
2345
2346 2007-10-31  Martin Baulig  <martin@ximian.com>
2347
2348         * debug-debugger.h
2349         (MonoDebuggerInfo): Remove `runtime_class_init'.
2350
2351 2007-10-30  Martin Baulig  <martin@ximian.com>
2352
2353         * debug-mini.h
2354         (mono_debugger_thread_created): Added `MonoThread *' argument.
2355         (mono_debugger_extended_notification): New public method.
2356         (mono_debugger_trampoline_compiled): New public method.
2357
2358         * debug-mini.c
2359         (MonoDebuggerThreadInfo): Added `thread' and
2360         `extended_notifications' fields.
2361
2362         * debug-debugger.c
2363         (debugger_executable_code_buffer): New static variable.
2364
2365         * debug-debugger.h
2366         (MonoDebuggerInfo): Added `executable_code_buffer',
2367         `executable_code_buffer_size', `breakpoint_info_area',
2368         `breakpoint_table' and `breakpoint_table_size'.
2369
2370 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
2371
2372         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
2373         that IP  either is an unused value or the vtable pointer. IMT 
2374         calls use vtable + offset now. Reduced by almost half the size
2375         of IMT entries.
2376
2377 2007-10-26  Jonathan Chambers <joncham@gmail.com>
2378
2379         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
2380         defines to access param registers. Replace long usage with
2381         gsize as sizeof(long) != sizeof(void*) on Win64.
2382
2383         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
2384         on Win64. Fix intrinsic, use _AddressOfReturnAddress
2385         instead of non-existant _GetAddressOfReturnAddress.
2386
2387         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
2388         param registers. Save/restore %rdi and %rsi in MonoLMF.
2389
2390         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
2391         param registers. Modify (throw_exception) signature to take 
2392         %rdi and %rsi on Win64. 
2393
2394         Code is contributed under MIT/X11 license.
2395
2396 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
2397
2398         * helpers.c: unlink debugging output files.
2399
2400 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
2401
2402         * mini.c: Move mono_create_ftnptr () to object.c.
2403
2404 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2405
2406         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
2407         optional. This function can now be used to disassemble code generated
2408         outside the JIT such as trampolines and IMT thunks.
2409
2410         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
2411
2412         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
2413         vtable pointer from a ldr instruction.
2414
2415         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
2416         new IMT call sequence.
2417
2418         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
2419         call sequence for interface invocations.
2420
2421         * mini-arm.c (mono_arch_emit_imt_argument): added, required
2422         for imt support. This function is empty since IMT on ARM requires no
2423         special handling on the IR side.
2424
2425         * mini-arm.c (mono_arch_find_imt_method): added, required for
2426         imt support.
2427
2428         * mini-arm.c (mono_arch_find_this_argument): added, required
2429         for imt support.
2430
2431         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
2432         a ldr instruction to load a value stored in the code stream.
2433
2434         * mini-arm.c (mono_arch_build_imt_thunk):added, required
2435         for imt support.
2436
2437
2438 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
2439
2440         * mini.c (mini_init): Install the jump trampoline callback.
2441
2442 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2443
2444         * mini-trampolines.c: handle synchronized methods with the common
2445         vtable trampoline (bug #335601).
2446
2447 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
2448
2449         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
2450
2451         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
2452         64 bit platforms.
2453
2454         * mini-ia64.h mini-ia64.c: Add support for IMT.
2455
2456         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
2457         prolog. Fixes #331958.
2458
2459 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
2460
2461         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
2462
2463 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2464
2465         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
2466         trampoline.
2467
2468 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2469
2470         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
2471         trampoline.
2472
2473 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
2474
2475         * mini-x86.c, mini-x86.h: x86 support for the common vtable
2476         trampoline.
2477
2478 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
2479
2480         * mini-trampolines.c: changed the magic rampoline to understand
2481         the common vtable trampoline method: the method to invoke is
2482         determined by the vtable displacement of the call.
2483
2484 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2485
2486         * mini.c, mini.h: register the common vtable trampoline if the
2487         architecture supports it.
2488
2489 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2490
2491         * cpu-amd64.md: use the correct max length for tls_get.
2492
2493 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
2494
2495         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
2496         CEE_STELEM_ANY. Fixes #333696.
2497
2498 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2499
2500         * exceptions-x86.c: provide more graceful handling of the case where
2501         we followed a bogus function pointer from managed code (bug #332866).
2502
2503 2007-10-11  Mark Probst  <mark.probst@gmail.com>
2504
2505         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
2506         replaces the generic_shared flag and will carry more information
2507         in the future.
2508
2509         * generic-sharing.c: Added mini_type_stack_size() which allows
2510         allows open types if given a generic sharing context.
2511         mini_get_basic_type_from_generic() takes a
2512         MonoGenericSharingContext* instead of a MonoCompile* now.
2513
2514         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
2515         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
2516         mini-sparc.c, mini-x86.c: Trivial changes required by the two
2517         changes above.  Just passing arguments through to the right
2518         places.
2519
2520 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2521
2522         * mini-arm.c: unify the call emission to emit_code_seq().
2523
2524 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
2525
2526         * tramp-arm.c: reduced the trampoline size.
2527
2528 2007-10-10  Mark Probst  <mark.probst@gmail.com>
2529
2530         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
2531         variable handling out of arch-specific code.
2532
2533 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
2534
2535         * mini-arm.c: implemented fast delegate dispatch.
2536
2537 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2538
2539         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
2540         that fp elimination is turned off if the space required by locals is too
2541         big. Fixes #331958.
2542
2543 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
2544
2545         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
2546         ARM to the new style trampoline.
2547
2548 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2549
2550         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
2551
2552         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
2553
2554 2007-10-09  Martin Baulig  <martin@ximian.com>
2555
2556         * debug-debugger.h
2557         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
2558         `field_info_offset_offset'.     
2559
2560 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
2561
2562         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
2563         removed more internal usage of the r11 register and made it available
2564         to the register allocator.
2565
2566 2007-10-08  Mark Probst  <mark.probst@gmail.com>
2567
2568         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
2569         when sharing generics and treat type variables as references.
2570
2571 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2572
2573         * mini-ppc.c: started removing the internal uses of register r11
2574         to eventually allow the register allocator to manage it as an
2575         additional available register.
2576
2577 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2578
2579         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
2580
2581 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
2582
2583         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
2584         specific trampolines as they are not performance critical as a jump
2585         target (maybe align as before only for AOT code?). This saves about
2586         200 KB of native code on x86 for monodevelop startup.
2587
2588 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
2589
2590         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
2591         monodevelop startup.
2592
2593 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
2594
2595         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
2596
2597         * mini-sparc.h mini-sparc.c: Implement IMT support.
2598
2599         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
2600         its smaller and doesn't clobber sparc_g1.
2601
2602         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
2603
2604 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
2605
2606         * mini-ppc.c: optimized the size of the IMT thunks a bit.
2607
2608 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
2609
2610         * mini-ppc.c: implemented fast delegate invocation.
2611
2612 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
2613
2614         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
2615
2616 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2617
2618         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
2619         code to the new style trampoline in preparation for IMT support.
2620
2621 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
2622
2623         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
2624         systems already. This also reduces the specific trampiline sizes and
2625         prepares for the use of r12 as the IMT identifier register.
2626
2627 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2628
2629         * mini-mips.h: endianess fix (simplified from a patch by
2630         Thomas Kunze <thommy@tabao.de>, bug #323737).
2631
2632 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2633
2634         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
2635         to access ucontext fields and enable netbsd support
2636         (partially from Magnus Henoch <mange@freemail.hu>).
2637
2638 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2639
2640         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
2641         use the preprocessor from the CPP env var if it is set.
2642
2643 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2644
2645         * mini-trampolines.c: fixed an assertion and moved it earlier in the
2646         code, before interface_offset gets used.
2647
2648 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
2649
2650         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
2651         mono_class_setup_vtable () before accessing klass->vtable.
2652
2653 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
2654
2655         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
2656         hackish.
2657
2658 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2659
2660         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
2661         IMT slots (this saves hundreds of KB of memory in programs like
2662         IronPython and Monodevelop).
2663
2664 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2665
2666         * mini.c: print the delegate counter.
2667
2668 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
2669
2670         * mini-x86.c: make it easier to enable the debugging code for IMT
2671         slots.
2672
2673 2007-09-28  Martin Baulig  <martin@ximian.com>
2674
2675         * debug-debugger.h
2676         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
2677         `mono_method_klass_offset' and `mono_method_token_offset'.
2678
2679 2007-09-20  Mark Probst  <mark.probst@gmail.com>
2680
2681         * mini.c: First generics sharing implementation.  Can only share
2682         in very simple cases.  If sharing doesn't work it falls back to
2683         dedicated compilation.
2684
2685         * mini.h: Flag in MonoCompile to specify whether generic
2686         compilation is shared.  Flags enum for marking which generic inst
2687         of a context is used.  Prototypes for helper functions.
2688
2689         * generic-sharing.c: Helper functions for generic method sharing.
2690
2691         * optflags-def.h: Optimization flag (gshared) for enabling generic
2692         method sharing added.
2693
2694         * Makefile.am: generic-sharing.c added.
2695
2696 2007-09-19 Daniel Nauck <dna@mono-project.de>
2697
2698         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
2699
2700 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
2701         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
2702         fixes bug 325507.
2703
2704 2007-09-19  Martin Baulig  <martin@ximian.com>
2705
2706         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
2707         mono_debug_cleanup() is now part of mono_cleanup().
2708
2709 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
2710
2711         * driver.c (mono_main): Fix a warning.
2712
2713 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
2714
2715         * aot-compiler.c: Optimize various parts when processing large assemblies.
2716         Fixes ##325568.
2717
2718         * mini.c (mono_patch_info_hash): Improve hash function.
2719
2720 2007-09-14  Jonathan Chambers <joncham@gmail.com>
2721
2722         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
2723         
2724         Code is contributed under MIT/X11 license.
2725
2726 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2727
2728         * mini.c (mini_init): Fix a leak.
2729
2730         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
2731
2732 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2733
2734         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
2735
2736 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2737
2738         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
2739
2740 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
2741
2742         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
2743         variance tests.
2744
2745         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
2746
2747         * mini.c (handle_alloc): Enable managed allocators in AOT code.
2748
2749         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
2750
2751         * aot-runtime.c (decode_patch_info): Ditto.
2752
2753 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2754
2755         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
2756         static case. Cache delegates in architecture specific code, 
2757         based on number of parameters.
2758         
2759         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
2760         in architecture specific code, based on number of parameters.
2761         
2762         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
2763         caching happen in architecture specific code now.
2764         
2765         Code is contributed under MIT/X11 license.
2766
2767 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2768
2769         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
2770         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
2771         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
2772
2773         Code is contributed under MIT/X11 license.
2774
2775 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
2776         * mini.c: (mono_thread_abort) Fixed bug #82416.
2777
2778 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2779
2780         * mini.: hook the new managed GC allocation feature into the JIT.
2781
2782 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2783
2784         * mini.c: implementation for the new runtime tls opcode.
2785
2786 2007-09-11  Martin Baulig  <martin@ximian.com>
2787
2788         * debug-debugger.h
2789         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
2790         `mono_method_inflated_offset'.
2791
2792 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
2793
2794         * driver.c mini.h mini.c: Add a new devel command line option for injecting
2795         async exceptions into a method.
2796
2797         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
2798         purpose of testing whenever the unwinder works at every instruction.
2799
2800 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
2801
2802         * mini.c: check accessibility of method used in ldftn (fixes
2803         bug #82635).
2804
2805 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
2806
2807         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
2808
2809         * inssel.brg: Fix a warning.
2810
2811 2007-09-03  Martin Baulig  <martin@ximian.com>
2812
2813         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
2814         now takes the `main_method' as argument.
2815
2816 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
2817
2818         * cpu-sparc.md (endfilter): Add missing src1:i argument.
2819
2820 2007-08-30  Jonathan Chambers <joncham@gmail.com>
2821
2822         * driver.c: include the cil-coff.h header on Windows.
2823         
2824         Code is contributed under MIT/X11 license.
2825
2826 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2827
2828         * mini.c, driver.c: don't include the cil-coff.h header.
2829
2830 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2831
2832         * mini.c: flag places that needs fixes fo soft-float support.
2833
2834 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
2835
2836         * mini.h, inssel-float.brg: fix soft-float constant loads on big
2837         endian systems (partially from Dean Jenkins, bug #81924).
2838
2839 2007-08-28  Mark Probst  <mark.probst@gmail.com>
2840
2841         * mini.c (check_linkdemand): Remove embedded reference object in
2842         call to LinkDemandSecurityException.
2843         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
2844         with an IntPtr instead of a reference object.
2845
2846 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
2847
2848         * mini.c (handle_initobj): Handle alignment properly.
2849
2850         * inssel.brg (mini_emit_memset): Ditto. 
2851
2852         * inssel.brg (mini_emit_memcpy): Ditto. 
2853
2854         * inssel-sparc.brg: Ditto.              
2855
2856         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
2857
2858 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
2859
2860         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
2861         exceptions raised in unmanaged code. Fixes part of #82594.
2862
2863 2007-08-24  Mark Probst  <mark.probst@gmail.com>
2864
2865         * mini.c (mono_method_to_ir), declsec.c
2866         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
2867
2868 2007-08-22  Martin Baulig  <martin@ximian.com>
2869
2870         * debug-mini.h
2871         (MonoDebuggerThreadInfo): New typedef.
2872         (mono_debugger_thread_table): New global variable.
2873         (mono_debugger_thread_created): New public function.
2874         (mono_debugger_thread_cleanup): New public function.
2875
2876         * debug-debugger.h
2877         (MonoDebuggerInfo):
2878         - removed `get_current_thread' and `lookup_assembly'.
2879         - removed `data_table'.
2880         - added `thread_table'.
2881
2882         * mini.c
2883         (mono_thread_start_cb): Call mono_debugger_thread_created().
2884         (mono_thread_attach_cb): Likewise.
2885         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
2886         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
2887         initial domain.
2888
2889         * driver.c (mono_main): Move mono_debug_init() up, before calling
2890         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
2891
2892 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
2893
2894         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
2895         together when passing several arguments of type double (gives a small
2896         speedup and saves a few bytes of generated code).
2897
2898 2007-08-20  Jb Evain  <jbevain@novell.com>
2899
2900         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
2901
2902 2007-08-20  Jb Evain  <jbevain@novell.com>
2903
2904         * mini.c (mono_method_to_ir): throw MethodAccessException
2905         and FieldAccessException instead of InvalidProgramException.
2906
2907 2007-08-20  Mark Probst  <mark.probst@gmail.com>
2908
2909         * mini.c: CoreCLR security checks.
2910
2911         * mini.h: Removed MonoSecurityMode (moved to
2912         metadata/security-manager.h) and mono_security_mode global var
2913         (replaced by set/get functions in security-manager.h).
2914
2915         * driver.c: Added "core-clr-test" security mode for testing.  Used
2916         set-function for setting security mode.
2917
2918 2007-08-17  Mark Probst  <mark.probst@gmail.com>
2919
2920         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
2921         the new jit_info_table.
2922
2923         * driver.c: Test code for the new jit_info_table (enabled by the
2924         define MONO_JIT_INFO_TABLE_TEST).
2925
2926 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
2927
2928         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
2929         detection of call <REG> instruction sequence. Fixes build on freebsd.
2930
2931 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
2932
2933         * mini-exceptions.c: Fix a warning.
2934
2935 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
2936
2937         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
2938         stack overflow handling code on amd64 too.
2939
2940         * mini-exceptions.c (mono_setup_altstack): Make this use 
2941         mono_thread_get_stack_bounds ().
2942
2943         * mini-x86.h: Disable sigaltstack on solaris x86.
2944
2945 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
2946
2947         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
2948
2949 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
2950
2951         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
2952
2953 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
2954
2955         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
2956
2957         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
2958
2959 2007-08-03  Neale Ferguson <neale@sinenomine.net>
2960
2961         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
2962         due to alignment.
2963
2964 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2965
2966         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
2967         to be emitted (bug #82281).
2968
2969 2007-08-01  Martin Baulig  <martin@ximian.com>
2970
2971         Merged the `debugger-dublin' branch.
2972
2973         * debug-debugger.h (MonoDebuggerInfo):
2974         Removed the `old_*' compatibility entries.
2975         Added `debugger_version' and `data_table'.
2976         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
2977         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
2978
2979         * debug-mini.c
2980         (MiniDebugMethodBreakpointInfo): Add `address_list'.
2981         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
2982         instead of a `gconstpointer'.
2983         (mono_debugger_insert_method_breakpoint): Return a
2984         `MonoDebugMethodAddressList *'.
2985
2986 2007-06-28  Martin Baulig  <martin@ximian.com>
2987
2988         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
2989
2990 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
2991
2992         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
2993         __builtin_frame_address () since it is broken on older gcc versions.
2994
2995 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2996
2997         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
2998         on the stack overflow handling and made the managed stack overflows
2999         catchable in most cases using soft guard pages.
3000         * exceptions-x86.c: added code to restore the protection in the soft
3001         guard pages at the end of exception handling.
3002
3003 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
3004
3005         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
3006
3007 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3008
3009         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
3010         exception handling.
3011
3012 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3013
3014         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
3015         signal handling support until it has been ported to the new mechanism.
3016         * mini.c: fixed stack overflow detection and use the new
3017         architecture code  to handle signals on the altstack.
3018
3019 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
3020
3021         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
3022         stack overflows on the alt stack.
3023
3024 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
3025
3026         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
3027         stack overflows on the alt stack.
3028
3029 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
3030
3031         * exceptions-ppc.c: cleanup preparing for altstack support.
3032
3033 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3034
3035         * exceptions-arm.c: cleanup preparing for altstack support.
3036
3037 2007-07-27  Mark Probst  <mark.probst@gmail.com>
3038
3039         * mini.c (print_jit_stats): Output hazard pointer stats.
3040
3041 2007-07-26  Mark Probst  <mark.probst@gmail.com>
3042
3043         * driver.c, mini.c: Replaced security mode flags with a single
3044         enum variable.
3045
3046 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3047
3048         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
3049
3050 2007-07-25  Mark Probst  <mark.probst@gmail.com>
3051
3052         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
3053         (which doesn't do anything yet) for activating Core CLR
3054         (Silverlight) security.
3055
3056 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
3057
3058         * mini-codegen.c: work around a possible gcc bug on arm.
3059
3060 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
3061
3062         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
3063         message for platforms that don't support AOT compilation.
3064
3065 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
3066
3067         * mini.h, mini.c, driver.c: temporary smcs hack.
3068
3069 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
3070
3071         * mini-arm.h, mini-arm.c: arm EABI fixes.
3072
3073 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
3074
3075         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
3076         case.
3077
3078         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
3079         trampolines taking a method argument.
3080
3081         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
3082
3083         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
3084         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
3085
3086         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
3087         JIT compilation throws an exception. Fixes #82050.
3088
3089 2007-07-19  Mark Probst  <mark.probst@gmail.com>
3090
3091         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
3092         with the MONO_EXCEPTION_ defines.
3093
3094 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
3095
3096         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
3097         #82117.
3098         
3099         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
3100         the cause of an assertion.
3101
3102 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
3103
3104         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
3105         removed.
3106
3107 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
3108
3109         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
3110         assert. Should fix #82103.
3111
3112 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
3113
3114         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
3115         here too. Fixes #82095.
3116
3117         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
3118         addresses.
3119
3120         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
3121
3122         * mini-amd64.h: Enable IMT for amd64.
3123         
3124         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
3125
3126 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
3127
3128         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
3129
3130 2007-07-12  Mark Probst  <mark.probst@gmail.com>
3131
3132         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
3133         as soon as check_linkdemand sets an exception_type.
3134
3135 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
3136
3137         * mini-x86.c: fixed offsets for IMT call sequence.
3138         * mini-x86.h: enable IMT again.
3139
3140 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
3141
3142         * trace.c (mono_trace_enter_method): Decode MonoType too.
3143
3144         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
3145
3146         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
3147
3148         * mini-amd64.c: Add preliminary IMT implementation.
3149         
3150 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
3151
3152         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
3153         understand the new IMT-base interface invocation (thanks to
3154         Daniel Nauck for the report and the remote debugging session).
3155
3156 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
3157
3158         * mini-x86.c: size and speed optimizations for the IMT bsearch.
3159
3160 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
3161
3162         * Makefile.am (aotcheck): Make this actually use the AOTed code.
3163
3164 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
3165
3166         * mini-trampolines.c: implement AOT IMT support.
3167         * mini-x86.h: enable IMT support for wider testing.
3168
3169 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3170
3171         * inssel.brg (emit_imt_argument): Add aot support here.
3172
3173         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
3174
3175 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3176
3177         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
3178         of the IMT implementation, partially from massi, with my
3179         implementation of the bsearch sequence. Disabled by default until
3180         the AOT code is implemented.
3181
3182 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3183
3184         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
3185
3186         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
3187
3188 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3189
3190         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
3191         arch-independent IMT JIT code from Massimiliano
3192         Mantione (massi@ximian.com) with small cleanups from me.
3193
3194 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3195
3196         * Makefile.am: fix svn invocation to get the svn revision to be
3197         independent of the local language (build fix).
3198
3199 2007-07-09  Mark Probst  <mark.probst@gmail.com>
3200
3201         * mini.c (inline_method): Reset cfg->exception_type if the
3202         inlining is aborted.  Fixes: 82049.
3203
3204 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
3205
3206         * mini.c: remove assert from exception handling code when exception_ptr
3207         is not set.
3208
3209 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3210
3211         * mini.c (mono_codegen): Add an assert.
3212
3213         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
3214         enter and leave code.
3215         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
3216
3217 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3218
3219         * mini-ppc.c: fixed memory corruption for localloc(0)
3220         (bug #81852).
3221
3222 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3223         
3224         * mini.c: Fix warnings.
3225
3226 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
3227
3228         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
3229         to emit better double->int conversions.
3230
3231 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
3232
3233         * mini.c: the provided Min/Max optimizations are valid for unisgned
3234         ints.
3235
3236 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
3237
3238         * 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
3239
3240 2007-06-28  Miguel de Icaza  <miguel@novell.com>
3241
3242         * mini.c (mono_running_on_valgrind): Add support for reporting the
3243         method and  its boundaries to valgrind.
3244
3245 2007-06-28  Martin Baulig  <martin@ximian.com>
3246
3247         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3248
3249 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
3250
3251         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
3252
3253         * generic.2.cs: Add new test case.
3254
3255 2007-06-25  Martin Baulig  <martin@ximian.com>
3256
3257         Merged the `debugger-dublin' branch.
3258
3259         * debug-mini.c
3260         (mono_debugger_insert_method_breakpoint): New public method.
3261         (mono_debugger_remove_method_breakpoint): Likewise.
3262         (mono_debugger_check_breakpoints): New static method.
3263         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
3264
3265         * debug-debugger.h (MonoDebuggerInfo):
3266         Renamed (to keep backward compatibility in the vtable):
3267         `insert_breakpoint' -> `old_insert_breakpoint'.
3268         `remove_breakpoint' -> `old_remove_breakpoint'.
3269         `create_string' -> `old_create_string'.
3270         `lookup_class' -> `old_lookup_class'.
3271         `lookup_type' -> removed; changed into a dummy field.
3272         `lookup_assembly' -> `old_lookup_assembly'.
3273         Added (same functionality, but different signature):
3274         `create_string', `lookup_class', `lookup_assembly'
3275         Added new:
3276         `get_method_addr_or_bpt', `remove_method_breakpoint',
3277         `runtime_class_init'.
3278
3279         * debug-debugger.c: Merged the `debugger-dublin' branch.
3280
3281 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
3282
3283         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
3284         well.
3285         (peephole_pass): Likewise.
3286
3287 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
3288
3289         * driver.c: hopefully make setaffinity work also for ancient
3290         versions of linux.
3291
3292 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
3293
3294         * driver.c : win32 build fix.
3295
3296 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3297
3298         * driver.c: check for the MONO_NO_SMP env var and bind to a single
3299         processor if it is set.
3300
3301 2007-06-21  Martin Baulig  <martin@ximian.com>
3302
3303         * debug-mini.h: New file.
3304
3305         * debug-mini.c
3306         (mono_debugger_insert_breakpoint_full): Moved here from
3307         ../metadata/mono-debug-debugger.c.
3308         (mono_debugger_remove_breakpoint): Likewise.
3309         (mono_debugger_breakpoint_callback): Likewise.
3310
3311 2007-06-15  Raja R Harinath  <rharinath@novell.com>
3312
3313         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3314         changes in MonoGenericClass.
3315
3316 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
3317
3318         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
3319
3320 2007-06-14  Raja R Harinath  <rharinath@novell.com>
3321
3322         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3323         removal of MonoGenericMethod.
3324
3325 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3326
3327         * mini-exceptions.c: hooks for the exception events profiling API.
3328
3329 2007-06-14  Randolph Chung  <tausq@debian.org>
3330
3331         * Makefile.ma: Add hppa target.
3332         * mini-arch.h: Include mini-hppa.h
3333         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
3334         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
3335         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3336
3337 2007-06-14  Randolph Chung  <tausq@debian.org>
3338
3339         * inssel.brg: Add rules for "chained" compare-branch operations so that
3340         a single compare op can affect multiple branches.  Adjust cost for
3341         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
3342         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
3343         cost for some rules so that they can more easily be overridden by
3344         per-arch rules (with fixes from lupus).
3345         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3346
3347 2007-06-13  Randolph Chung  <tausq@debian.org>
3348
3349         * mini-ops.h: Reorder branch ops so that they match the order of the
3350         corresponding CEE_* ops.  The code expects them this way.
3351         Add new ops for HPPA target.
3352         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3353
3354 2007-06-13  Randolph Chung  <tausq@debian.org>
3355
3356         * mini-exceptions.c: Handle cases where the stack grows towards
3357         larger addresses.
3358         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3359
3360 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
3361
3362         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
3363         counter.
3364         * driver.c: explain where a non-matching corlib is found.
3365
3366 2007-06-13  Mark Probst  <mark.probst@gmail.com>
3367
3368         * mini.c (print_jit_stats): Output dynamic code allocation stats.
3369
3370 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
3371
3372         * mini-exceptions.c: Generate a method profile leave event during
3373         an exception to ensure that the profiler gets notified.
3374
3375 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
3376
3377         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
3378         branch.
3379
3380         * cpu-amd64.md: Add long_and/or/xor opcodes.
3381
3382 2007-06-06  Wade Berrier  <wberrier@novell.com>
3383
3384         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
3385         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
3386         length of instruction shr_imm (expected 8, got 10)
3387
3388 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
3389
3390         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
3391
3392 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3393
3394         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3395         MonoInternalHashTable again (fixed bug in the internal hash table
3396         code).
3397
3398 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3399
3400         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
3401         Have to figure out what makes it crash the SWF regression.
3402
3403 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
3404
3405         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
3406
3407 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3408
3409         * mini.c: optimize out the type check when storing null in a
3410         reference array.
3411
3412 2007-06-04  Mark Probst  <mark.probst@gmail.com>
3413
3414         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3415         MonoInternalHashTable.
3416
3417 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
3418
3419         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
3420         signed integer methods.
3421
3422 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3423
3424         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
3425         permanently since the current approach doesn't work.
3426
3427 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3428
3429         * inssel.brg (stmt): Only call delegate->invoke_impl if 
3430         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
3431
3432 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3433
3434         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
3435         the sreg2==rdx case.
3436         
3437         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
3438         account if it contains a rex prefix.
3439         (peephole_pass): Handle OP_FMOVE as well.
3440
3441 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3442
3443         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
3444         as it causes regressions.
3445
3446 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
3447
3448         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
3449         static case as well.
3450
3451         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
3452
3453         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3454         (mono_arch_get_this_arg_from_call): Ditto.
3455
3456         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
3457
3458         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
3459         invoke_impl field.
3460
3461         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3462         (mono_arch_get_this_arg_from_call): Ditto.
3463
3464         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
3465         
3466         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
3467         try to create optimized invoke code and use that for further invocations. 
3468         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
3469
3470         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
3471
3472 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
3473
3474         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
3475         sealed classes or methods.
3476         *devirtualization.cs: tests for the new optimization
3477
3478 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
3479
3480         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
3481         by the update_volatile () function.
3482
3483 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
3484
3485         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
3486         require it.
3487
3488         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
3489
3490 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
3491
3492         * mini.c: Add configure checks for header files.
3493         * mini-x86.c: Add configure checks for header files.
3494         * trace.c: Add configure checks for header files.
3495         * aot-runtime.c: Add configure checks for header files.
3496         * aot-compiler.c: Add configure checks for header files.
3497         * driver.c: Add configure checks for header files.
3498         * mini-codegen.c: Add configure checks for header files.
3499         
3500         Code is contributed under MIT/X11 license.
3501
3502 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
3503
3504         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
3505         icompare_imm -128 + op_iclt. Fixes #81703.
3506
3507 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
3508
3509         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
3510
3511 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
3512
3513         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
3514         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
3515         so that all isinst checks now use "interface_bitmap".
3516
3517 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
3518
3519         * cpu-amd64.md (jmp): Fix a warning.
3520
3521         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
3522
3523         * basic.cs: Add new regression test.
3524
3525         * basic.cs: Remove test which is now in basic-long.cs.
3526
3527         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
3528
3529         * basic-long.cs: Add new test.
3530         
3531 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
3532
3533         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
3534
3535 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
3536
3537         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
3538
3539         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
3540         places.
3541         
3542         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
3543         throwing code a bit.
3544
3545         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
3546         the exception throwing code a bit.
3547
3548         * mini-x86.c (get_call_info): Allocate result from a mempool.
3549
3550 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
3551
3552         * aot-compiler.c (find_typespec_for_class): Fix the assert.
3553
3554         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
3555
3556         * mini.h (MonoCompile): Add 'token_info_hash' field.
3557
3558         * mini.c: Save token->method associations during compilation so the AOT 
3559         compiler can use it.
3560         
3561         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
3562         which reference generic classes and methods.
3563
3564 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
3565
3566         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
3567
3568         * aot-compiler.c (compile_method): Fix a typo in a comment.
3569
3570         * aot-runtime.c (decode_cached_class_info): Skip generic types.
3571
3572         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
3573         everything generic.
3574
3575         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
3576
3577 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
3578
3579         * mini.h (MonoCompile): Add 'args' field.
3580
3581         * mini.c (mono_compile_create_vars): Store variables representing the arguments
3582         into cfg->args.
3583
3584         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
3585
3586 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
3587
3588         * mini.c (mono_compile_get_interface_var): Remove this unused function.
3589
3590         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
3591
3592         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
3593         opcodes for some opcodes.
3594
3595         * mini.h *.brg *.c: Use the new opcodes.
3596
3597 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
3598
3599         * mini.h: Bumped aot revision.
3600
3601         * inssel.brg: modified code generation of type checks for interfaces
3602         to use the new "MonoClass.interface_bitmap" instead of the old
3603         "MonoClass.interface_offsets".
3604
3605 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
3606
3607         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
3608
3609 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
3610
3611         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
3612         64 bit platforms.
3613
3614 2007-04-27  Neale Ferguson <neale@sinenomine.net>
3615
3616         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
3617
3618 2007-04-27  Wade Berrier  <wberrier@novell.com>
3619
3620         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
3621         mini.h) to fix build.
3622
3623 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
3624
3625         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
3626         
3627         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
3628         causes the corlib unit tests to fail.
3629
3630 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
3631
3632         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
3633
3634         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
3635
3636         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
3637         opcodes to the comparison relations.
3638
3639         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
3640         opcodes to their types.
3641         
3642         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
3643
3644         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
3645         it in cfg->arch.cinfo.
3646
3647         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
3648
3649         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
3650         cfg->cil_offset_to_bb.
3651
3652 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
3653
3654         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
3655         created becase of initlocals.
3656
3657 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
3658
3659         * mini-alpha.c cpu-alpha.md: More alpha port work from 
3660         Sergey Tikhonov <tsv@solvo.ru>.
3661
3662 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
3663
3664         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
3665
3666 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
3667
3668         * cpu-s390.md (break): Correct the length of break instruction.
3669
3670 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3671
3672         * mini.c: fix a couple of soft-float issues and comments.
3673
3674 2007-04-15  Miguel de Icaza  <miguel@novell.com>
3675
3676         * trace.c (is_filenamechar): - is also a filename char.
3677
3678 2007-04-15  Neale Ferguson <neale@sinenomine.net>
3679
3680         * mini-s390.c: Correct checking for enum type in return value processing.
3681
3682 2007-04-14  Raja R Harinath  <rharinath@novell.com>
3683
3684         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
3685         (version.h): Makefile is in the build directory.
3686
3687 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
3688
3689         * mini-amd64.h: fix for assertion failure on Solaris/amd64
3690
3691 2007-04-11  Martin Baulig  <martin@ximian.com>
3692
3693         * mini.c (can_access_member): Fix handling of generic classes;
3694         fixes #81259.
3695
3696 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
3697
3698         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
3699
3700 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
3701
3702         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
3703
3704 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3705
3706         * mini-codegen.c: make sure the right spill amount is
3707         used for fp or integer registers (fixes the float_sub_spill() on ppc).
3708
3709 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
3710
3711         * mini-ppc.c: fixes for the fp_branch_nan test.
3712
3713 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
3714
3715         * basic.cs: Comment out new test which still fails on ia64.
3716
3717 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3718
3719         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
3720
3721 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3722
3723         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
3724
3725 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
3726
3727         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
3728         on 64 bit machines. Fixes part of #80738.
3729
3730         * basic.cs: Add regression test.
3731
3732 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3733
3734         * inssel.brg basic.cs: Revert previous change to fix build.
3735
3736         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
3737         platforms.
3738         
3739         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
3740
3741         * basic.cs: Add new regression test.
3742
3743 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3744
3745         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
3746         many arguments.
3747
3748 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3749
3750         * cpu-s390x.md: Correct length of break instruction.
3751
3752 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3753
3754         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
3755         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
3756
3757 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
3758
3759         * *.c: Begin WIN64 port.
3760         * mini.c:  Use correct register in profiler.
3761         * mini-amd64.c: No inline assembly on Win64.
3762         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
3763         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
3764         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
3765         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
3766         mono_arch_ip_from_context for Win64.
3767         
3768         Contributed under MIT/X11 license.
3769
3770 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
3771
3772         * exceptions-amd64.c (seh_handler): Ditto.
3773
3774         * exceptions-x86.c (seh_handler): Fix a memory leak.
3775
3776 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
3777
3778         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
3779         mini-s390x.c: fixed peephole optimizations to deal
3780         correctly with 1 and 2 byte reload avoidance.
3781
3782 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
3783
3784         * cpu-s390.md, cpu-s390x.md: update localloc length.
3785
3786 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3787
3788         * cpu-g4.md: added missing descriptions.
3789
3790 2007-03-14  Miguel de Icaza  <miguel@novell.com>
3791
3792         *  Makefile.am: Add support so the tail tests are not executed on
3793         PowerPC as that is a known limitation of the PowerPC port.
3794
3795 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3796
3797         * runmdesc.bat:  Move to msvc directory.
3798         
3799 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3800
3801         * runmdesc.bat:  Run executable that was produced by the current
3802         target and sent via an argument.
3803         
3804 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
3805
3806         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
3807         #81102.
3808
3809         * generics.2.cs: Add regression test.
3810
3811 2007-03-09  Wade berrier  <wberrier@novell.com>
3812
3813         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
3814
3815 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
3816
3817         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
3818         AOT code depends on this.
3819
3820 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3821
3822         * mini.c: more precise tracking of types in the eval stack
3823         (part of fix for bug #81044).
3824
3825 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
3826
3827         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
3828
3829         * aot-compiler.c (encode_patch): Remove an obsolete comment.
3830
3831 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
3832
3833         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
3834
3835         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
3836
3837 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
3838
3839         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
3840         a pointer on 64 bit systems. Fixes #80190.
3841
3842         * iltests.il: Add new regression test.
3843
3844 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3845
3846         * mini.c: inline a constant for Environment.IsRunningOnWindows.
3847
3848 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
3849
3850         * trace.c: Remove an erroneous alignemnt check when tracing.
3851           Fixes --trace on OSX86.
3852
3853 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3854
3855         * mini-$(arch).h: initialize SP in context for all the archs.
3856
3857 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
3858
3859         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
3860         regressions in the thread tests.
3861
3862 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
3863
3864         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
3865         - fixed implementation of LOCALLOC opcode
3866         - implemented non-un compare for floats
3867         - code cleanup
3868         - implementation of FDIV and CKFINITE opcodes
3869         - fixes for latest mono updates
3870         - additional arch opcodes
3871
3872 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3873
3874         * Makefile.am: simplify and merge rules for cross-compilation.
3875
3876 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
3877
3878         * local-propagation.c: Actually *apply* the fix for bug 80591...
3879
3880 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3881
3882         * mini-exceptions.c: backuot part of the last change
3883         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
3884
3885 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
3886         * inssel.brg: Fix bug 59286.
3887
3888
3889 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
3890
3891         * mini-exceptions.c: patch from Zoltan to correctly check for
3892         stack boundaries (using the stack register, not the frame register),
3893         fixes bugs #80724, #79717.
3894
3895 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
3896
3897         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
3898         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
3899
3900         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
3901         presence of frame pointer elimination.
3902
3903 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
3904         
3905         * mini-x86.h: NetBSD UCONTEX_REG defines.
3906
3907 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
3908
3909         * inssel-amd64.brg: Fix amd64 build.
3910
3911 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
3912
3913         * mini.h: remove extern to workaround what looks likes gcc bug 26905
3914         on amd64.
3915
3916 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
3917
3918         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
3919         ends.
3920
3921         * mini-<ARCH>.c: Use mono_is_regsize_var ().
3922
3923 2007-01-30 Mark Mason <mason@broadcom.com>
3924
3925            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
3926            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
3927            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
3928            beginning support for CEE_JMP [not quite working yet]
3929            * tramp-mips.c: LMF handling now works
3930         
3931 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
3932
3933         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
3934
3935         * mini.h (NULLIFY_INS): New macro.
3936
3937 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3938
3939         * mini.c: statistical profiler fix for windows, patch
3940         from Tor Lillqvist (tml@novell.com).
3941
3942 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
3943         * local-propagation.c: Fix bug 80591.
3944
3945 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
3946
3947         * Makefile.am: put back the --export-dynamic option as with
3948         the previous gmodule flags (thanks to Robert Jordan).
3949
3950 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
3951
3952         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
3953
3954         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
3955         simplify and speed up the local register allocator. Also rename some fields
3956         like iassign->vassign.
3957         
3958         * regalloc.c: Remove some functions which are no longer used since their
3959         inlined version is in mini-codegen.c.
3960         
3961         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
3962
3963         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
3964
3965 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
3966
3967         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
3968         narrowing. Fixes #80622.
3969
3970         * iltests.il: Add new regresssion test. 
3971
3972 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3973
3974         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
3975         debug-debugger.c, debug-debugger.h: warning fixes.
3976         * driver.c: updated copyright year and made it fit in one line.
3977
3978 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
3979
3980         * aot-runtime.c: updated to use mono-dl instead of gmodule.
3981
3982 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
3983
3984         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
3985
3986         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
3987
3988         * iltests.il: Add new test for bug #80507.
3989
3990 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3991
3992         * mini-arm.h: use soft-float also on vfp for now.
3993
3994 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3995
3996         * mini.c: fix some more soft-float issues.
3997
3998 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
3999
4000         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
4001
4002 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
4003         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
4004         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
4005         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
4006
4007 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
4008
4009         * mini-arm.c: typo fix.
4010
4011 2007-01-23  Neale Ferguson <neale@sinenomine.net>
4012
4013         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
4014
4015 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
4016
4017         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
4018         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
4019
4020         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
4021
4022         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
4023
4024         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
4025         
4026         * inssel.brg: Fix a warning.
4027
4028         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
4029
4030         * abcremoval.c ssa.c ssapre.c: Update after this change.
4031         
4032         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
4033
4034         * dominators.c (df_set): Use mono_bitset_union_fast.    
4035
4036 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
4037
4038         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
4039         mini-codegen.c: reduce relocations and memory usage for the cpu
4040         description.
4041
4042 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
4043
4044         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
4045
4046         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
4047         to reduce their size.
4048
4049 2007-01-19 Mark Mason <mason@broadcom.com>
4050
4051         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
4052         * mini-mips.c: more configuration macros, support long conditional branches, additional
4053         asserts, fix epilog instrumentation.
4054         * mini-mips.h: use standard stack walk
4055         * cpu-mips.md: increase size of div, rem and conditional branches
4056         
4057 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
4058
4059         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
4060         to cpu spec data.
4061
4062 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
4063
4064         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
4065         (compile_method): Ditto.
4066
4067         * aot-runtime.c (decode_klass_info): Ditto.
4068
4069         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
4070         needed by the code generated by inssel.brg. Also fix a warning.
4071
4072 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
4073
4074         * mini.c: deal with enums that become genericinsts by
4075         being nested in a generic class (bug #79956).
4076
4077 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
4078
4079         * mini.c: match the generic definition to check for
4080         private access with generic types (bug #78431).
4081
4082 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
4083
4084         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
4085         to make life easier for people cross-compiling that insist on not
4086         using scratchbox.
4087
4088 2007-01-17 Mark Mason <mason@broadcom.com>
4089
4090         * inssel-long.brg: patch to deal with mips missing flags
4091         * inssel-long32-mips.brg: implement overflow checks
4092         * insset-mips.brg: implement overflow checks
4093         * mini-mips.h: implement conditional exception handling
4094         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
4095           Remove unused code, minor cleanups.
4096         * exceptions-mips.c: minor cleanups
4097         * mini-ops.h: add mips conditional exception ops
4098         * cpu-mips.md: add mips conditional exception ops
4099
4100         
4101 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
4102
4103         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
4104         to deal with mips missing of flags.
4105
4106 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
4107
4108         * exceptions-ppc.c: execute fault handlers.
4109
4110 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
4111
4112         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
4113
4114 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
4115
4116         * mini.c: handle also floating point values in initialize_array.
4117
4118 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
4119
4120         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
4121         array initialization and make it conditional on the intrins option.
4122
4123 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
4124
4125         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
4126         relocations and put the patch info names close to the enum definition.
4127
4128 2007-01-15 Mark Mason <mason@broadcom.com>
4129
4130         * basic.cs, exceptions.cs: break up large tests to increase debugability.
4131
4132 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4133
4134         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
4135
4136 2007-01-12  Raja R Harinath  <rharinath@novell.com>
4137
4138         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
4139
4140 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
4141
4142         * Makefile.am: distribute the mips sources.
4143
4144 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4145
4146         * mini-codegen.h: handle bug #80489 here, by excluding ecx
4147         directly.
4148
4149 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
4150
4151         * cpu-x86.md: back out for now as this triggers other regressions.
4152
4153 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
4154
4155         * cpu-x86.md: force src1 and dest regpair for long shift instructions
4156         to eax:edx, so ecx can't get allocated to them (bug #80489).
4157
4158 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
4159
4160         * mini.c, mini-exceptions.c: enabled running fault handlers
4161         (bug #80469).
4162
4163 2007-01-03  Miguel de Icaza  <miguel@novell.com>
4164
4165         * driver.c: If nothing fail, do not use the string "failed",
4166         because it makes it very annoying to view test result logs on the
4167         web. 
4168
4169 2006-12-30  Miguel de Icaza  <miguel@novell.com>
4170
4171         * debug-debugger.c (mono_debugger_main): Rename "main" to
4172         "main_method" to prevent a warning.
4173
4174         Remove a warning for unused field.
4175
4176 2006-12-28  Martin Baulig  <martin@ximian.com>
4177
4178         * debug-debugger.c
4179         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
4180
4181 2006-12-22  Martin Baulig  <martin@ximian.com>
4182
4183         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
4184         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
4185         seperate `.mdb_debug_info' section, so we can access it from the
4186         debugger even if the binary is stripped.
4187
4188         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
4189         from the `.mdb_debug_info' here to prevent the linker from
4190         removing that section.
4191
4192         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
4193         mdb-debug-info64.s.
4194
4195 2006-12-19  Robert Jordan  <robertj@gmx.net>
4196
4197         * mini-x86: enable the code to return small structures in
4198         registers for FreeBSD as well. Fixes bug #80278.
4199         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
4200
4201 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4202
4203         * mini-x86.c: align the stack when calling the profiler
4204         function instrumenting the prolog (on OSX).
4205
4206 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4207
4208         * mini.c: emit a break opcode where Debugger.Break () is called.
4209
4210 2006-12-13  Miguel de Icaza  <miguel@novell.com>
4211
4212         * mini.c (mono_method_to_ir): Provide useful information on this
4213         assert, to prevent others from debugging like I did.
4214
4215 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4216
4217         * mini.c: enable code which was incorrectly commented
4218         (bug #80235).
4219
4220 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4221
4222         * mini-x86.c: enable on OSX, too, the code to return small
4223         structures in registers.
4224
4225 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4226
4227         * mini-x86.c: remove the use of the dynamic code manager here, too.
4228
4229 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4230
4231         * mini.h, debug-debugger.c, tramp-*.c: fixed 
4232         mono_debugger_create_notification_function() to use
4233         mono_global_codeman_reserve () instead of a dynamic code manager.
4234
4235 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4236
4237         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
4238         ves_array_element_address() jit icall and use a generated
4239         managed method instead (which is about 4 times faster for a rank 3
4240         array access).
4241
4242 2006-11-29  Mark Mason  <mason@broadcom.com>
4243
4244         * basic-calls.cs: additional tests for passing
4245         structures as function arguments.
4246
4247 2006-11-29  Mark Mason  <mason@broadcom.com>
4248
4249         * mini-mips.h: disable custom exception handling
4250         * mini-mips.c: throw/rethrow should use jalr to call
4251         exception stubs.  Fixed bug with passing structures
4252         by value. More support for tracing floating point
4253         functions.
4254
4255 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4256
4257         * mini.c: fixed typo in the soft-float ldind.r4 handling
4258         (bug #80086).
4259
4260 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4261
4262         * mini.c, mini.h, driver.c: added --runtime command line
4263         option to select a different runtime than the autodetected one.
4264         * jit.h: added API for embedders to initialize with a specific
4265         runtime version.
4266
4267 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
4268
4269         * mini.c: handle also boxing of r4 values (bug #80024).
4270
4271 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4272
4273         * mini-ppc.c: force indirect calls until we reserve
4274         enough address space for all the generated code.
4275
4276 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
4277
4278         * exceptions-arm.c: workaround bugs in the libc definition
4279         of struct ucontext.
4280
4281 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
4282
4283         * inssel.brg: fixes from me and Mark Mason.
4284
4285 2006-11-23  Dick Porter  <dick@ximian.com>
4286
4287         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
4288         semaphore display now we've fixed the initial value
4289
4290 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4291
4292         * inssel.brg: partially revert the last change to fix the build.
4293
4294 2006-11-21  Mark Mason  <mason@broadcom.com>
4295
4296         * inssel.brg: Add and use compare-and-branch macros to support
4297         architectures that do not have condition code registers (ie. MIPS).
4298         * *-mips.{c,brg,md}: Fix copyright statements
4299
4300 2006-11-20  Mark Mason  <mason@broadcom.com>
4301
4302         * Makefile.am: remove mini-codegen.c from list of MIPS sources
4303         * mini.c: Allow GET_CONTEXT to be specified by the arch port
4304         * mini.h: Added declaration for mono_print_ins()
4305         * mini-codegen.c: added ins_spec initializer for MIPS
4306         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
4307         vreg to be virtual and hreg to be non-virtual.
4308         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
4309         is not yet working/implemented correctly.
4310         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
4311         non-static, fixup calls to print_ins() from other parts in the file.
4312
4313 2006-11-20  Mark Mason  <mason@broadcom.com>
4314
4315         * basic-calls.cs: added tests for passing structures as arguments
4316         to calls.
4317
4318 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
4319
4320         * inssel-long32.brg: optimize signed division by power of two.
4321
4322 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4323
4324         * mini-arm.c: added support for interworking with thumb code
4325         (mono must be still be built using the ARM instruction encoding).
4326
4327 2006-11-19  Miguel de Icaza  <miguel@novell.com>
4328
4329         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
4330         verifier has different rules for it.   Fixes a few verifier issues
4331         in the test suite.
4332
4333         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
4334         at the end, so people know what happened.
4335
4336 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
4337
4338         * brach-opts.c: in optimize_exception_target() make sure we
4339         are in a catch clause (fixes bug #79871).
4340
4341 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4342
4343         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
4344         more soft-float support fixes.
4345
4346 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
4347
4348         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
4349         that are passed half on the stack and half in registers.
4350
4351 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
4352
4353         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
4354         more mips integration work from Mark E Mason 
4355         <mark.e.mason@broadcom.com>.
4356
4357 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4358
4359         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
4360         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
4361         tramp-mips.c: added sources for the mips port, not
4362         integrated in the build yet. Contributed by
4363         Mark E Mason <mark.e.mason@broadcom.com>.
4364
4365 2006-11-14  Neale Ferguson <neale@sinenomine.net>
4366
4367         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
4368
4369 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4370
4371         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
4372         put the soft-float rules in its own file since it seems to
4373         break s390 compilation.
4374
4375 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4376
4377         * mini-arm.c: fixed wrnings.
4378
4379 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
4380
4381         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
4382         inssel-arm.brg: ARM support for soft-float.
4383
4384 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4385
4386         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
4387         loads and stores of 32 bit fp values.
4388
4389 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
4390
4391         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
4392
4393         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
4394         works. Fixes #79852 and #79463.
4395
4396 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4397
4398         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
4399         more soft-float support WIP and fixes.
4400
4401 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
4402
4403         * mini-arm.c: some VFP updates.
4404
4405 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4406
4407         * mini-exceptions.c: 0 is a valid local var offset in some
4408         architectures, don't assert (bug #78508).
4409
4410 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
4411
4412         * exceptions-arm.c: fixed off by one error in stack walk code.
4413
4414 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
4415
4416         * mini.h, mini.c: more precise tracking of type load exceptions.
4417
4418 2006-11-03  Robert Jordan  <robertj@gmx.net>
4419
4420         * Makefile.am: [WIN32] Add monow.exe target.
4421         * driver.c: [WIN32] Don't detach the console when debugging.
4422         Fixes bug #79797.
4423         
4424 2006-10-30  Miguel de Icaza  <miguel@novell.com>
4425
4426         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
4427
4428 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
4429
4430         * aot-compiler.c (emit_method_info): Add a case missed earlier.
4431
4432         * driver.c (mini_regression): Fix --regression with AOT.
4433
4434         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
4435
4436 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
4437
4438         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
4439
4440         * mini-sparc.h: Don't use sigaction on sparc/linux.
4441
4442         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
4443
4444         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
4445
4446         * mini-exceptions.c: Add proper include files for getpid ().
4447
4448 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
4449
4450         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
4451         address instead of a MonoJitInfo* to avoid decoding the exception info for the
4452         method.
4453
4454         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
4455         name cache to reduce its size.
4456
4457         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
4458
4459 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
4460
4461         * mini-x86.c: Save/restore the current LMF structure more efficiently using
4462         the mono_lmf TLS variable.
4463
4464         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
4465         trampoline lmf frames.  
4466
4467         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
4468
4469 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
4470
4471         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
4472         the mono_lmf TLS variable.
4473
4474         * mini-exceptions.c: Access the LMF structure through accessors.
4475
4476         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
4477         variable instead of in jit_tls->lmf.
4478
4479         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
4480         
4481         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
4482         trampoline lmf frames.
4483
4484         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
4485
4486 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
4487
4488        * mini.c trace.c mini-x86.c: Revert these too.
4489         
4490        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
4491        signature change.
4492
4493 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
4494
4495         * genmdesc.c: removed now dead code.
4496
4497 2006-10-09  Robert Jordan <robertj@gmx.net>
4498
4499         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
4500
4501 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
4502
4503         * mini.h: do not leave gaps in the opcode values.
4504
4505 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
4506
4507         * jit-icalls.h: flag functions as internal here, too.
4508
4509 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
4510
4511         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
4512         functions with the internal attribute.
4513
4514 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
4515
4516         * aot-compiler.c: fclose the file descriptor in the profile read loop.
4517
4518 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
4519
4520         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
4521         for soft-float.
4522
4523 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
4524
4525         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
4526         tail calls as on other platforms.
4527
4528         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
4529
4530         * iltests.il: Add a few tailcall tests.
4531
4532 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4533
4534         * driver.c: fix loop for old compilers (bug #79521).
4535
4536 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
4537
4538         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
4539
4540         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
4541
4542         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
4543         metadata without any code.
4544
4545         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
4546         more precise debugging information using gdb.
4547
4548 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
4549
4550         * inssel-ia64.brg: Make the helper methods static.
4551
4552 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4553
4554         * inssel-x86.brg: make the helper methods static.
4555
4556 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
4557
4558         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
4559
4560 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4561
4562         * mini.c: updates for monoburg changes.
4563         * inssel.brg: make a few helper functions static as they should.
4564
4565 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
4566
4567         * Makefile.am: Move mini-codegen.c to common_sources.
4568
4569 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4570
4571         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
4572         instructions.
4573         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
4574         mini-ppc.h: port to use the common local register allocator.
4575
4576 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4577
4578         * mini.h: Remove the comment too then.
4579
4580 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
4581
4582         * mini.h: put back backend.data which is to be used shortly and
4583         doesn't increase the size of MonoInst. If any 64 bit arch aligned
4584         pointers on 4 byte boundaries it'd have much bigger issues running
4585         and you can ifdef it out anyway.
4586
4587 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4588
4589         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
4590         MonoInst size by 4 bytes on 64 bit machines.
4591
4592 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4593
4594         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
4595         replacement with more meaningful field names. Arch maintainers, please
4596         check the assigned names are good enough for your arch.
4597
4598 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4599
4600         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
4601         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
4602
4603 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
4604
4605         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
4606         relocations and memory requirements, put the optimization flags
4607         definitions in their own file.
4608
4609 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
4610
4611         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
4612
4613         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
4614
4615 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
4616
4617         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
4618
4619 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
4620
4621         * inssel.brg: use the correct function to get the size of an item
4622         in an array, given an element class.
4623         * aot-compiler.c: do not access class->class_size directly.
4624
4625 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4626
4627         * mini.h, debug-mini.c: added a debugging function to print
4628         info about local variables and arguments in a jitted method.
4629
4630 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
4631
4632         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4633
4634         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
4635
4636 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4637
4638         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
4639         inner and outer loops when passing vtypes.
4640
4641 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
4642
4643         * mini-ppc.c: take into account the cpu errata for cache flushing
4644         which caused some random errors (bug #79381).
4645
4646 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4647
4648         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
4649         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
4650
4651 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
4652
4653         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
4654         loaded.
4655
4656         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
4657         freebsd ports tree.
4658
4659         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
4660         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
4661
4662         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
4663         displacement.
4664
4665 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
4666
4667         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
4668
4669 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
4670
4671         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
4672         macro does not have to be changed during debugging.
4673
4674         * 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>.
4675
4676         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
4677
4678         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
4679         
4680         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
4681         MONO_ARCH_NO_EMULATE_MUL is defined.
4682
4683         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
4684
4685         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
4686
4687         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
4688
4689         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
4690         
4691 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
4692
4693         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
4694         stuff to mini-exceptions.c where it is used.
4695
4696         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
4697         setup code, the real one is in mini-exceptions.c.
4698
4699         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
4700         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
4701         some changes from the freebsd ports tree.
4702
4703         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
4704         constants.
4705         
4706         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
4707
4708 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
4709
4710         * mini.c: on Linux, check for /proc to be mounted
4711         (bug# 79351, novell bug#201204).
4712
4713 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
4714
4715         * mini.c: handle cases where pthread_attr_getstack() behaves
4716         incorrectly (bug #78096).
4717
4718 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
4719
4720         * mini-arm.c: support larger stack frames (bug #79272).
4721
4722 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
4723
4724         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
4725
4726         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
4727         tokens.
4728
4729         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
4730         mono_class_from_name () to find a class from its name.
4731
4732         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
4733
4734 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
4735
4736         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
4737
4738 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
4739
4740         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
4741
4742 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
4743
4744         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
4745         callinfo->trampoline.
4746
4747         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
4748         fixes #79271.
4749         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
4750         future.
4751
4752 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
4753
4754         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
4755
4756 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
4757
4758         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
4759         stats.method_trampolines, it is already done by the generic trampoline code.
4760
4761         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
4762         
4763 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
4764
4765         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
4766
4767         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
4768
4769         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
4770
4771         * mini.c (print_jit_stats): Print mscorlib mempool size too.
4772         
4773         * mini.c (print_jit_stats): Print new stats.
4774
4775         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4776
4777 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
4778
4779         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
4780         Address on two dimensional arrays. Fixes #78729.
4781
4782         * mini.h (MonoCompile): Add a 'skip_visibility' field.
4783
4784         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
4785         a method.
4786
4787         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
4788
4789         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
4790         #79130.
4791         
4792         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
4793         a race condition.
4794         (mini_get_ldelema_ins): Ditto.
4795
4796 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
4797
4798         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
4799         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
4800         Fixes #79213.
4801
4802 2006-08-29 Neale Ferguson <neale@sinenomine.net>
4803
4804         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
4805         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
4806
4807         * exceptions-s390x.c: Cosmetic change.
4808
4809         * tramp-s390.c: Fix warning.
4810
4811         * cpu-s390.md: Correct length of mul_imm.
4812
4813 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
4814
4815         * aot-compiler.c: added binary writer with ELF backend
4816         implementation (only on Linux/x86 for now).
4817
4818 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4819
4820         * Makefile.am: Don't run net 2.0 AOT tests.
4821
4822         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
4823         (mono_compile_assembly): Skip net 2.0 assemblies as well.
4824
4825         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
4826
4827 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
4828
4829         * aot-compiler.c: simplified and refactored the asm-writing code
4830         to allow different backends.
4831
4832 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4833
4834         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4835
4836         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
4837         little. Share patches of type TYPE_FROM_HANDLE as well.
4838
4839         * mini.c (mono_patch_info_equal): New helper function.
4840         (mono_patch_info_hash): Ditto.
4841
4842         * aot-compiler.c (emit_method_code): Fix s390 build.
4843
4844         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
4845         is not handled because it is stored as a flag and not as a type ctor. Fixes
4846         #79016.
4847
4848 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
4849
4850         * aot-compiler.c: Fix computation of GOT slot statistics.
4851         
4852         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
4853         Also remove support for not PIC AOT.
4854
4855         * mini.h: Bump AOT file format version.
4856
4857         * objects.cs: Add a test for #78990.
4858
4859         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
4860         (peter.dettman@iinet.net.au). Fixes #79087.
4861
4862         * basic-long.cs: Add a test for the above.
4863
4864 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
4865
4866         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
4867         
4868         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
4869         code somewhat.
4870
4871 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
4872
4873         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
4874         exceptions.
4875
4876 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
4877
4878         * mini.c: Don't verify COM proxy invoke calls
4879         
4880
4881 2006-08-10  Dick Porter  <dick@ximian.com>
4882
4883         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
4884         which process is holding semaphores locked.
4885
4886 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
4887
4888         * mini-ia64.c mini-amd64.c: Fix #79027.
4889
4890         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
4891
4892         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
4893
4894         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
4895         implicit arguments in a vararg call. Fixes #79027.
4896
4897 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
4898
4899         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
4900         (mono_get_array_new_va_signature): Ditto.
4901
4902 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
4903
4904         * aot-runtime.c: Call init_plt lazily.
4905
4906         * inssel-long.brg: Fix unsigned long->int conversion.
4907
4908         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
4909
4910         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
4911         that most data is now in the .rss/.data section.
4912
4913 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
4914
4915         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
4916
4917         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
4918
4919         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
4920
4921         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
4922
4923         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
4924         virtual call. Fixes #79010.
4925
4926         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
4927         and use the result as the this argument in the real call.
4928
4929         * generics.2.cs: Add a new test for #79010.
4930         
4931 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
4932
4933         * mini-x86.c: Fix a warning.
4934
4935         * aot-compiler.c: Add a bunch of statistics.
4936
4937         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
4938
4939 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
4940
4941         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
4942
4943 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
4944
4945         * 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>.
4946
4947 2006-07-13  Miguel de Icaza  <miguel@novell.com>
4948
4949         * mini.c (mono_method_to_ir): Obtain the original method in the
4950         CIL stream and use this to perform validation.
4951
4952         Fixed: #78816
4953
4954 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
4955
4956         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
4957         (mono_arch_call_opcode): Ditto.
4958
4959         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
4960         #78826.
4961
4962         * mini.c (mono_patch_info_dup_mp): New helper function.
4963         
4964         * aot-compiler.c (compile_method): Fix some of the memory allocated during
4965         compilation. Fixes #78827.
4966
4967 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
4968
4969         * declsec.c: Use original security informations for
4970           MONO_WRAPPER_MANAGED_TO_MANAGED.
4971
4972 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
4973
4974         * mini.c: Allow Com Interop methods/classes and
4975         don't verify COM wrapper calls
4976         
4977
4978 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
4979
4980         * inssel-long32.brg: Fix long->i4 checked conversion.
4981
4982         * exceptions.cs: Add a test for the above.
4983
4984 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
4985
4986         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
4987
4988         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
4989         leaks.
4990
4991         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
4992         #78775.
4993
4994 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
4995
4996         * mini.c: Fix solaris/x86 exception handling.
4997
4998         * Makefile.am: Get rid of $(ICU_LIBS).
4999
5000 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
5001
5002         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
5003         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
5004         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
5005
5006         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
5007
5008         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
5009         this function causes a SIGSEGV.
5010
5011 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
5012
5013         * mini.c: Remove unused solaris/x86 includes.
5014
5015 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
5016
5017         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
5018
5019 2006-06-20  Jb Evain  <jbevain@gmail.com>
5020
5021         * cpu-g4.md: fix max length of start_handler instruction.
5022
5023 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
5024         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
5025
5026 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
5027         * ssa.c: Fixed bug 78653 for SSA based deadce.
5028         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
5029         MonoInst.flags, used in SSA based deadce.
5030         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
5031         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
5032
5033 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
5034
5035         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
5036         it can end up using non executable memory on ppc64 systems
5037         running ppc32 userspace (fix from Johannes Berg).
5038
5039 2006-06-14  Dick Porter  <dick@ximian.com>
5040
5041         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
5042         4.1.1
5043
5044 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
5045         * mini.c: Made so that inline is locally disabled if it would
5046         trigger a .cctor, because too many apps depend on this behavior
5047         (which seems to be also the one of the MS CLR).
5048
5049 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
5050
5051         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
5052         No idea why this worked before.
5053
5054         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
5055         which branch to outer exception clauses since they could skip the
5056         inner finally clauses. Fixes #78633.
5057
5058         * exceptions.cs: Add a test for the above.
5059
5060         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
5061         Fixes #78629.
5062
5063         * iltests.il: Add a test for the above.
5064
5065 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
5066
5067         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
5068         after the end of a try bblock, to prevent asserts in mini_method_compile ().
5069
5070         * iltests.il: Add a test for the above.
5071
5072 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
5073
5074         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
5075         
5076         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
5077         methods as instrinsics.
5078
5079 2006-06-09  Wade Berrier <wberrier@novell.com>
5080
5081         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
5082         (simple-cee-ops.h ssapre-mini-ops.h)
5083
5084 2006-06-09  Neale Ferguson <neale@sinenomine.net>
5085
5086         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
5087         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
5088         instruction).
5089         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
5090         * cpu-s390x.md: Fix max. length values for a couple of instructions.
5091
5092 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
5093
5094         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
5095
5096 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
5097
5098         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
5099         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
5100         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
5101         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
5102         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
5103         of opcodes, so that bug 78549 should not happen again.
5104         * ssapre.c: Updated to use the renamed files.
5105
5106 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
5107
5108         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
5109         in OP_ATOMIC_EXCHANGE_I4.
5110
5111 2006-06-07  Wade Berrier <wberrier@novell.com>
5112
5113         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
5114         in mono_debugger_create_notification_function)
5115
5116 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
5117
5118         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
5119         
5120         * mini.c (type_from_stack_type): Disable some changes which do not
5121         seem to work.
5122
5123         * driver.c: Reenable opts.
5124
5125         * mini.h (MonoStackSlot): New structure to keep track of the verification state
5126         of the evaluation stack.
5127         
5128         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
5129         evaluation stack trace at entry to the bblock.
5130
5131         * mini.c (merge_stacks): New function to perform verification of stack merges.
5132         Turned off by default.
5133
5134         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
5135         STACK_MP.
5136         
5137 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
5138
5139         * local-propagation.c: Fixed bug 78549.
5140
5141 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
5142
5143         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
5144
5145 2006-06-02  Miguel de Icaza  <miguel@novell.com>
5146
5147         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
5148         tramp-arm.c, tramp-ia64.c
5149         (mono_debugger_create_notification_function): Update signature to
5150         new signature and use new protocol for creating the notification
5151         function.  
5152
5153         Should fix the build.
5154
5155 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
5156
5157         * exceptions-ppc.c (mono_jit_walk_stack)
5158         (ves_icall_get_frame_info): Fix the build
5159
5160 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
5161
5162         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
5163
5164 2006-05-31  Raja R Harinath  <rharinath@novell.com>
5165
5166         * il2tests.2.il: New file for generics CIL tests.  Add test for
5167         #78019.
5168         * Makefile.am: Update.
5169
5170         Fix #78019
5171         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
5172         to nullable types.
5173
5174 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
5175
5176         * aliasing.c: Fixed bug 78311.
5177
5178 2006-05-29  Martin Baulig  <martin@ximian.com>
5179
5180         * mini-exceptions.c (mono_find_jit_info): When computing the
5181         native offset, check whether we're actually inside the method's
5182         code; call mono_debug_print_stack_frame() to format the frame.
5183         (ves_icall_System_Exception_get_trace): Call
5184         mono_debug_print_stack_frame() to format the stack frame.
5185         (ves_icall_get_trace): Update to the new debugging API.
5186         (mono_jit_walk_stack_from_ctx): Likewise.
5187         (ves_icall_get_frame_info): Likewise.
5188
5189         * mini.c (get_method_from_ip): Use the new debugging API.
5190         (mono_print_method_from_ip): Likewise.
5191
5192         * exceptions-ppc.c
5193         (mono_jit_walk_stack): Use the new debugging API.
5194         (ves_icall_get_frame_info): Likewise.   
5195
5196 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
5197
5198         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
5199
5200 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
5201
5202         * mini.c: Added "limitator" to inline for debugging.
5203
5204 2006-05-24  Martin Baulig  <martin@ximian.com>
5205
5206         * debug-debugger.c (mono_debugger_init): Create a private,
5207         malloc()-based code manager for the notification function and
5208         intentionally leak it on exit.  This fixes the crash-on-exit race
5209         condition.
5210
5211         * tramp-amd64.c
5212         (mono_debugger_create_notification_function): Added
5213         `MonoCodeManager *' argument.
5214
5215         * tramp-x86.c
5216         (mono_debugger_create_notification_function): Added
5217         `MonoCodeManager *' argument.
5218
5219 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
5220
5221         * aliasing.c: Fixed 64 bit issue.
5222         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5223         default since all known bugs are fixed (one more time!).
5224
5225 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
5226
5227         * mini.c: write barrier support.
5228
5229 2006-05-23  Martin Baulig  <martin@ximian.com>
5230
5231         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
5232         check at the top of the file.
5233
5234 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
5235
5236         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
5237         reverting changes without reason and without changelog entries.
5238
5239 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
5240
5241         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
5242         to a few opcodes. Fixes #78439.
5243
5244         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
5245         consistency with other archs.
5246
5247         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
5248
5249 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5250
5251         * debug-debugger.c: fix the build.
5252
5253 2006-05-17  Martin Baulig  <martin@ximian.com>
5254
5255         * debug-debugger.c
5256         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
5257         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
5258         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
5259         (debugger_attach): Call GC_mono_debugger_add_all_threads().
5260
5261 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
5262
5263         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
5264
5265 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
5266
5267         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
5268         MONO_TYPE_GENERICINST.
5269         
5270         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
5271         MONO_TYPE_GENERICINST.
5272
5273 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
5274
5275         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
5276         #78325.
5277
5278 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
5279
5280         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
5281         mempool.
5282         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
5283
5284 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
5285
5286         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
5287         mono_trace_cleanup ().
5288
5289         * iltests.il: Fix problem with the newly added test.
5290
5291         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
5292         due to register constraints, free up the previous hreg. Fixes #78314.
5293
5294         * iltests.il: Add new test for #78314.  
5295
5296         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
5297         Interlocked.Add. Fixes #78312.
5298
5299         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
5300         
5301 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
5302
5303         * inssel.brg (mini_emit_virtual_call): Fix a warning.
5304
5305 2006-05-05  Martin Baulig  <martin@ximian.com>
5306
5307         * debug-mini.c (mono_debug_open_block): New method.
5308
5309         * mini-amd64.c
5310         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5311         the beginning of each basic block.
5312
5313         * mini-x86.c
5314         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5315         the beginning of each basic block.
5316
5317 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5318
5319         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5320         default until I understand why they break the build on amd64.
5321
5322 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
5323
5324         * mini.c (mini_cleanup): Call mono_cleanup ().
5325
5326         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
5327         errors.
5328
5329 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5330
5331         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
5332         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5333         default since all known bugs are fixed, and I cannot reproduce bug
5334         77944... I'm asking Matt Hargett to test again after this commit.
5335
5336 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
5337
5338         * mini-codegen.c: Fixed typo that thrashed inline.
5339
5340 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
5341
5342         * dominators.c (compute_dominators): Avoid using a worklist since
5343         it is not correct in some cases. Instead, iterate over all bblocks as
5344         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
5345
5346 2006-04-28  Miguel de Icaza  <miguel@novell.com>
5347
5348         * mini.c (mono_jit_compile_method_inner): Use
5349         mono_prepare_exception_from_error that resets the value
5350         internally.
5351
5352 2006-04-27  Miguel de Icaza  <miguel@novell.com>
5353
5354         * mini.c: Move the mini_loader_error_to_exception to metadata. 
5355         
5356 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5357
5358         * aliasing.c: Fixed bug 78210.
5359
5360 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5361
5362         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5363         default until all their problems (or the ones they trigger) are fixed.
5364
5365 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
5366
5367         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
5368         
5369         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
5370         as loaded only after resolving patches since that could invoke the same method.
5371
5372         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
5373
5374         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
5375         functions.
5376
5377         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
5378         AOT loader.
5379
5380         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
5381         stack.
5382
5383         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
5384         made from AOT code through the PLT table.
5385
5386         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
5387         holding the plt offset when a call is made to the aot plt trampoline.
5388         
5389 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5390
5391         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
5392         amd64 AOT support.
5393
5394         * Makefile.am (common_sources): Fix build breakage.
5395
5396         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
5397         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
5398         intra-assembly calls if possible.
5399         
5400         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
5401
5402         * mini-trampolines.c: Handle PLT entries.
5403
5404         * mini.c: Avoid creating a GOT var for calls.
5405
5406         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
5407         from mscorlib code.
5408
5409         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
5410         from mscorlib code.
5411
5412         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
5413         AOT code.       
5414
5415         * mini.h: Bump AOT file format version.
5416         
5417         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
5418         covers more cases.
5419
5420 2006-04-25  Martin Baulig  <martin@ximian.com>
5421
5422         * driver.c: Disable copyprop, consprop and inline when running
5423         inside the debugger.
5424
5425 2006-04-25  Martin Baulig  <martin@ximian.com>
5426
5427         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
5428         with `get_current_thread' and added `detach'.
5429         (MonoDebuggerMetadataInfo): Added `thread_size',
5430         `thread_tid_offset', `thread_stack_ptr_offset' and
5431         `thread_end_stack_offset'.
5432
5433 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5434
5435         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
5436         aot-runtime.c.
5437
5438         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
5439         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
5440
5441         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
5442
5443         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
5444
5445         * aot.c: Add support for ADJUSTED_IID.  
5446
5447 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
5448
5449         * aot.c (emit_method_order): Don't align method_order_end.
5450
5451         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
5452         the interface ID changes.
5453
5454 2006-04-21  Dick Porter  <dick@ximian.com>
5455
5456         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
5457         cleaning up a thread.  Fixes the new part of bug 77470.
5458
5459 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
5460
5461         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
5462         to managed wrapper.
5463                      
5464 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
5465
5466         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
5467         
5468         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
5469         SIGSEGV. Fixes #78072.
5470
5471         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
5472         unregister our SIGABRT handler.
5473
5474 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
5475
5476         * mini.c: Disabled inline where it can alter the call stack in a
5477         way visible from managed code.
5478         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
5479         default.
5480
5481 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
5482
5483         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
5484         on other platforms. Fixes #78089.
5485
5486 2006-04-13  Martin Baulig  <martin@ximian.com>
5487
5488         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
5489         determine whether we're inside the debugger.
5490
5491         * debug-debugger.h
5492         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
5493
5494 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
5495
5496         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
5497         handler clauses. Fixes #78024.
5498
5499         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
5500         in the CALL_MEMBASE opcodes. Fixes #78088.
5501         (mono_arch_get_vcall_slot_addr): Ditto.
5502
5503 2006-04-10  Martin Baulig  <martin@ximian.com>
5504
5505         * debug-debugger.c: The thread handling code has now been moved
5506         into ../metadata/threads.c.
5507
5508 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5509
5510         * driver.c (mono_main): Fix --with-gc=none build.
5511
5512         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
5513         (mono_spillvar_offset_float): Ditto.
5514         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
5515         hreg, not when its !global, since on ia64, there is a third category: stacked
5516         registers.      
5517
5518 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
5519
5520         * mini.c: set MonoInst->klass for load field address and a few other
5521         places.
5522
5523 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5524
5525         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
5526
5527 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
5528
5529         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
5530         the branch opt changes.
5531
5532 2006-04-06  Dick Porter  <dick@ximian.com>
5533
5534         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
5535         
5536         * wapihandles.c (mini_wapi_seminfo): 
5537         * driver.c (mono_main): Add semaphore info option
5538
5539 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
5540
5541         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
5542         branch optimization changes. Fixes #78009.
5543
5544 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5545
5546         * mini.c: ignore accessibility of methods in managed->native wrappers.
5547
5548 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
5549
5550         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
5551         
5552         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
5553
5554 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
5555
5556         * mini.c: Modify the branch optimizations to preserve the invariant that
5557         the entries inside the in_bb and out_bb arrays are unique.
5558         (mono_unlink_bblock): Avoid creation of new arrays.
5559
5560 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
5561
5562         * mini.c (mono_unlink_bblock): Fix regression caused by previous
5563         change (#77992).
5564
5565 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
5566
5567         * mini.c (optimize_branches): Remove the "optimizations" in
5568         the cbranch1/cbranch2 -> branch cases which were causing several
5569         problems in the past. Fixes #77986.
5570
5571 2006-03-31  Chris Toshok  <toshok@ximian.com>
5572
5573         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
5574         default optimizations :(
5575
5576 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
5577
5578         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
5579         branch.
5580
5581 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
5582
5583         * local-propagation.c: Added comments to structs and removed
5584         "Mono" prefixes from local tree mover types.
5585
5586 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
5587
5588         * Makefile.am (arch_sources): Define this for each architecture so 
5589         libmono_la_SOURCES is defined in one place.
5590
5591 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
5592
5593         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
5594         from handles/.
5595
5596 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
5597
5598         * driver.c: print the GC name supplied by configure.
5599
5600 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
5601
5602         * local-propagation.c: Added tree mover, and moved here all the
5603         local propagation code from mini.c
5604         * mini.c: Added support for treeprop, and moved all the local
5605         propagation code to local-propagation.c
5606         * mini.h: Added support for treeprop
5607         * driver.c: Added support for treeprop, enabled consprop, copyprop,
5608         treeprop, inline and deadce by default
5609         * Makefile.am: Added local-propagation.c
5610
5611 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
5612
5613         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
5614
5615 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
5616
5617         * debug-debugger.c: make it compile without the Boehm GC.
5618
5619 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
5620
5621         * mini.c: fixed issue with mismatch when an icall is registered
5622         with multiple names but same address.
5623
5624 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5625
5626         * declsec.c, mini-exceptions.c: use write barrier to set reference
5627         fields of managed objects.
5628
5629 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5630
5631         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
5632         (can_access_internals): Fix a warning.
5633
5634         * mini.c (print_method_from_ip): Rename this to 
5635         mono_print_method_from_ip so it gets exported.
5636
5637         * trace.c: Deal with strings inside StringBuilder's containing garbage
5638         and fix memory leaks. Fixes #77848.
5639
5640 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5641
5642         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
5643         fixes #77787.
5644
5645 2006-03-16 Neale Ferguson <neale@sinenomine.net>
5646         
5647         * mini-s390.c: Remove OP_X86_TEST_NULL.
5648
5649 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5650
5651         * mini.c: use the correct GetHashCode() for the moving collector.
5652
5653 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
5654
5655         * liveness.c: Regalloc spill cost tuning.
5656
5657 2006-03-15 Neale Ferguson <neale@sinenomine.net>
5658         
5659         * mini-s390x.h: Correct S390_LONG macro.
5660
5661         * mini-s390x.c: Cleanup unused code.
5662
5663 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
5664
5665         * jit-icalls.h: New file.
5666
5667         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
5668         icalls and include that instead of including jit-icalls.c.
5669
5670         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
5671         OP_X86 opcodes.
5672
5673 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
5674
5675         * mini.c: when checking for member accessibility, also check for
5676         friend assemblies and for explicit interface implementations.
5677
5678 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
5679
5680         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
5681
5682         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
5683
5684         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5685         common cases are done first.    
5686
5687         * mini-ops.h: Only define platform specific opcodes on the given platform.
5688
5689         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
5690         branch.
5691         
5692 2006-03-14  Martin Baulig  <martin@ximian.com>
5693
5694         Revert Paolo's change from r57348:
5695
5696         * mini.h: don't use gboolean for bitfields.
5697         * mini.c: verifier changes for fields and methods accessibility.
5698
5699 2006-03-13  Neale Ferguson <neale@sinenomine.net>
5700
5701         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
5702
5703         * mini-s390x.c: Fix conv_r_un.
5704
5705         * cpu-s390, cpu-s390x.md: Fix lengths.
5706
5707 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
5708
5709         * mini.c: nested types have access to all the nesting
5710         levels, not just the enclosing types.
5711
5712 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5713
5714         * mini.c: added a few more verification checks.
5715
5716 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
5717
5718         * liveness.c: Merge optimizations from the linear-il branch.
5719
5720 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5721
5722         * mini-ia64.c (emit_call): Add a comment.
5723
5724         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
5725
5726         * tramp-ia64.c: Fix some warnings.
5727
5728 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
5729
5730         * mini.h: don't use gboolean for bitfields.
5731         * mini.c: verifier changes for fields and methods accessibility.
5732
5733 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5734
5735         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
5736         lazy icall wrapper changes.
5737
5738         * dominators.c: Replace all the dominator algorithms with faster
5739         ones from the linear-il branch.
5740
5741         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
5742         the mempool.
5743
5744         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5745         common cases are done first.
5746
5747         * mini-amd64.c: Fix some warnings.
5748
5749         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
5750         from the mempool.
5751
5752         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
5753         added code.
5754
5755         * mini.h: Add a missing prototype.
5756
5757 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
5758
5759         * mini.c: Compile icall wrappers lazily.
5760
5761         * mini-codegen.c: Use printf instead of g_print since its much faster.
5762
5763         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
5764         function.
5765
5766         * mini.c (optimize_branches): Cache the negative result from 
5767         remove_block_if_useless ().
5768
5769         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
5770         Also fix some bblock linking issues.
5771
5772         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
5773         assembly files.
5774
5775         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
5776
5777         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
5778         accessed fields first, for better cache behavior.
5779         
5780 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
5781
5782         * mini.c: speedup IList<T> array accesses.
5783
5784 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
5785
5786         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
5787         inline_costs counter. Fixes #77190.
5788
5789 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
5790
5791         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
5792         trace messages. Fixes #77706.
5793
5794 2006-03-04  Martin Baulig  <martin@ximian.com>
5795
5796         * tramp-amd64.c, tramp-x86.c
5797         (mono_debugger_create_notification_function): Use
5798         mono_global_codeman_reserve() to allocate a buffer at runtime and
5799         return it.
5800
5801         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
5802
5803         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
5804         notification function at runtime and then call `initialize' in the
5805         `MONO_DEBUGGER__debugger_info' vtable.
5806
5807 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
5808
5809         * iltests.il: Fix a visibility problem.
5810
5811 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5812
5813         * driver.c, mini.c: add hooks for the counters API.
5814
5815 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5816
5817         * driver.c: show disabled options.
5818
5819 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
5820
5821         * linear-scan.c: always use cost-driven selection.
5822
5823 2006-02-28  Raja R Harinath  <rharinath@novell.com>
5824
5825         * jit-icalls.c (helper_compile_generic_method): Revert change from
5826         2006-02-24.
5827
5828 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
5829
5830         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
5831
5832 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
5833
5834         * inssel.brg: style fixes, mostly to force the updated monoburg
5835         to run for people using svn.
5836
5837 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
5838
5839         * mini.c: match monoburg changes.
5840
5841 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5842
5843         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
5844         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
5845         declaration in the header file.
5846
5847 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
5848
5849         * helpers.c: reduce relocations and mem usage.
5850
5851 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
5852
5853         * mini.h, mini-codegen.c: disable logging features if
5854         requested by configure.
5855
5856 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
5857
5858         * mini.c: tiny verifier changes.
5859
5860 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5861
5862         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
5863         cpu-pentium.md: stack alignment changes for osx/x86,
5864         partially from Geoff Norton <gnorton@customerdna.com>.
5865
5866 2006-02-24  Raja R Harinath  <harinath@gmail.com>
5867
5868         * jit-icalls.c (helper_compile_generic_method): Update to changes
5869         in metadata/class.c.
5870
5871 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
5872         
5873         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
5874         
5875         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
5876         interface calls with large offsets.
5877
5878 2006-02-23  Raja R Harinath  <rharinath@novell.com>
5879
5880         * jit-icalls.c (helper_compile_generic_method): Document the
5881         special-case we depend on so that we can inflate the method twice
5882         with the same context with no bad side-effects.
5883
5884 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
5885
5886         * mini-x86.c, mini-amd64.c: fix for case when xen support
5887         is disabled.
5888
5889 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
5890
5891         * mini-x86.c, mini-amd64.c: generate code to access tls items
5892         in a faster way for Xen systems.
5893
5894 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5895
5896         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
5897         updates and compilation fixes for the OSX/x86 port, mostly from
5898         Geoff Norton <gnorton@customerdna.com>.
5899
5900 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
5901
5902         * inssel.brg: faster interface call implementation
5903         to sync with the interface_offsets MonoVTable changes.
5904
5905 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5906
5907         * mini.c: more verification checks.
5908
5909 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
5910
5911         * mini.c: added a few more verification checks.
5912
5913 2006-02-17      Neale Ferguson <neale@sinenomine.net>
5914
5915         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
5916         facility on the processor and use it if available.
5917
5918 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5919
5920         * driver.c, aot.c, mini.c: throw exception if the IL code is
5921         invalid or unverifiable.
5922
5923 2006-02-17  Raja R Harinath  <rharinath@novell.com>
5924
5925         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
5926         m.StructField.
5927
5928 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
5929
5930         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
5931
5932 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5933
5934         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
5935         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
5936         handling of instantiated generic valuetypes.
5937
5938 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
5939
5940         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
5941         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
5942         instead.
5943
5944         * generics.2.cs: Revert the nullable reftypes tests.
5945
5946 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
5947
5948         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
5949         using __builtin_frame_address (1) as it doesn't work in the presence
5950         of optimizations. Hopefully fixes #77273.
5951
5952         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
5953         -> generics.cs change as it doesn't work with some automake versions.
5954
5955 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5956
5957         * mini.c: handle systems that sue a different way to
5958         retrieve the stack address of the current thread.
5959
5960 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
5961
5962         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
5963         it specially in the makefile.
5964
5965         * generics.2.cs: Add tests for nullable reference types.
5966
5967 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5968
5969         * mini.c: always handle the case when mono_jit_init()
5970         is called in a thread different from the main thread,
5971         confusing libgc (bug #77309).
5972
5973 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
5974
5975         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
5976
5977 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5978
5979         * mini.c: change optimize_branches () to use a single loop
5980         and introduce a new optimization to simplify some range checks.
5981
5982 2006-02-03  Martin Baulig  <martin@ximian.com>
5983
5984         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
5985         and merged with debugger_thread_manager_add_thread().
5986         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
5987         inform the debugger about the main thread.
5988
5989 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
5990
5991         * basic.cs: Add test for div.un/rem.un constant folding.
5992
5993 2006-02-03  Neale Ferguson <neale@sinenomine.net>
5994
5995         * cpu-s390x.md: correct int_xor_imm length
5996
5997 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
5998
5999         * generics.2.cs: New test for #77442.
6000
6001         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
6002         #77442.
6003
6004 2006-02-02  Martin Baulig  <martin@ximian.com>
6005
6006         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
6007         <mono/metadata/mono-debug-debugger.h>   
6008
6009         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
6010
6011 2006-02-02  Martin Baulig  <martin@ximian.com>
6012
6013         * debug-debugger.h: New header file for debug-debugger.c.
6014
6015         * debug-debugger.c: Big API cleanup; don't run the managed Main()
6016         function is a separate thread anymore; add support for attaching.
6017
6018 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
6019
6020         * tramp-x86.c: Fix a warning.
6021
6022 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
6023
6024         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
6025         on very large methods.
6026
6027         * aot.c (load_patch_info): Fix a warning.
6028
6029 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
6030
6031         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
6032         mini-ops.h: alu membase optimizations.
6033
6034 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
6035
6036         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
6037         to speedup StringBuilder.
6038
6039 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
6040
6041         * dominators.c (mono_compute_natural_loops): Fix detection of
6042         loop body start blocks.
6043
6044         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
6045
6046 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
6047
6048         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
6049         #75145.
6050
6051 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
6052
6053         * aliasing.c: Fixed aliasing issue on 64 bit archs.
6054
6055 2006-01-25  Martin Baulig  <martin@ximian.com>
6056
6057         * debug-debugger.c: Moved the `MonoDebuggerManager' and
6058         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
6059         started to cleanup this file a little bit.
6060
6061 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
6062
6063         * mini.c: optimize a codepath frequently happening in generics code.
6064
6065 2006-01-23  Martin Baulig  <martin@ximian.com>
6066
6067         * Makefile.am: Only compile debug-debugger.c on supported platforms.
6068
6069         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
6070         functions directly.
6071
6072         * driver.c: debug-debugger.c is only available if
6073         `MONO_DEBUGGER_SUPPORTED' is defined.   
6074
6075 2006-01-23  Martin Baulig  <martin@ximian.com>
6076
6077         * debug-debugger.c: Only enable this on platforms where the Mono
6078         Debugger is working (x86 and x86_64).
6079
6080 2006-01-21  Martin Baulig  <martin@ximian.com>
6081
6082         The Mono Debugger is now using the normal `mono' instead of the
6083         `mono-debugger-mini-wrapper' when executing managed code.
6084
6085         * debug-debugger.c: New file; previously known as
6086         debugger/wrapper/wrapper.c.
6087
6088         * debug-mini.c (mono_init_debugger): Removed.
6089
6090         * driver.c (mono_main): Added new `--inside-mdb' command line
6091         argument which is used when running inside the debugger.
6092
6093 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
6094
6095         * liveness.c (mono_analyze_liveness): Remove some unused data
6096         structures.
6097
6098 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
6099
6100         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
6101
6102 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
6103
6104         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
6105         depends on implementation details of monobitset.
6106
6107         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
6108         Fixes #77271.
6109
6110 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
6111
6112         * liveness.c: Update after monobitset changes.
6113
6114 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
6115
6116         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
6117
6118 2006-01-11 Neale Ferguson <neale@sinenomine.net>
6119
6120         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
6121
6122         * mini-s390x.c: Remove warning messages.
6123
6124 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
6125
6126         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
6127
6128 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
6129
6130         * generics.2.cs: Add ldelem/stelem_any test.
6131
6132 2006-01-10 Neale Ferguson <neale@sinenomine.net>
6133
6134         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
6135
6136 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
6137
6138         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
6139         
6140 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
6141
6142         * generics.2.cs: Reenable vtype tests.
6143
6144         * inssel-x86.brg: Remove an icorrect valuetype rule.
6145
6146 2006-01-06 Neale Ferguson <neale@sinenomine.net>
6147
6148         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
6149         initial support for OP_ABS.
6150
6151 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6152
6153         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
6154
6155 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6156
6157         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
6158         conversion and implement LADD/LSUB.
6159
6160         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
6161         architectures.
6162
6163 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6164
6165         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
6166
6167         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
6168         architectures.
6169
6170 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6171
6172         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
6173         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
6174         (stack walk problem).
6175
6176 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
6177
6178         * aot.c (mono_aot_load_method): Fix a warning.
6179
6180 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6181
6182         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
6183
6184 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6185
6186         * iltests.il: Add test for #77148.
6187
6188         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
6189         #77148.
6190
6191 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6192
6193         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
6194
6195 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6196
6197         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
6198         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
6199
6200         * basic-long.cs: Add lconv-to-r4/r8 tests.
6201
6202 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6203
6204         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
6205
6206         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
6207         here as on other archs.
6208
6209 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6210
6211         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
6212
6213 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6214
6215         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
6216         
6217         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
6218
6219         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
6220         instrument_prolog; Add memory_barrier instruction.
6221
6222 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
6223
6224         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
6225
6226 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
6227
6228         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
6229
6230         * aliasing.c inssel.brg: Fix warnings.
6231
6232         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
6233         could skip initialization of some parts of memory.
6234
6235         * mini.c mini-ia64.c: Fix warnings.
6236
6237         * inssel-sparc.brg: Add an implementation of lneg which actually works.
6238
6239 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
6240
6241         * aliasing.c (mono_build_aliasing_information): Add a workaround for
6242         a crash seen on sparc.
6243
6244         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
6245         
6246         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
6247
6248 2005-12-21 Neale Ferguson <neale@sinenomine.net>
6249
6250         * mini-ops.h: Add s390_backchain instruction
6251
6252         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
6253
6254         * cpu-s390.md: Add s390_backchain instruction
6255
6256         * mini-s390.c: Significant ABI changes
6257
6258         * mini-s390.h: Cater for zero length structures
6259
6260 2005-12-20 Neale Ferguson <neale@sinenomine.net>
6261
6262         * mini-s390.c: ABI fixes
6263
6264         * inssel-s390.brg: Remove debug statements
6265
6266         * cpu-s390.md: Fix length of ATOMIC_xx operations
6267
6268 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
6269
6270         * basic-float.cs: Add float<->long conversion tests.
6271
6272 2005-12-16 Neale Ferguson <neale@sinenomine.net>
6273
6274         * mini-s390.c: Fix LOCALLOC processing.
6275
6276         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
6277
6278 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
6279
6280         * iltests.il: Add tests for some opcodes not covered by the other
6281         tests.
6282
6283 2005-12-15 Neale Ferguson <neale@sinenomine.net>
6284
6285         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
6286         register loading for Tail processing; Correct trace output.
6287
6288         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
6289
6290         * cpu-s390.md: Correct size of jmp instruction. 
6291
6292 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6293
6294         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
6295
6296 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6297
6298         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
6299           Bring s390 up to current level.
6300
6301 2005-12-12  Zltan Varga  <vargaz@gmail.com>
6302
6303         * generics.2.cs: Disable the newly added tests as they do not work yet.
6304         
6305         * generics.2.cs: Add valuetype tests.
6306
6307 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
6308
6309         * basic-long.cs: Add i4->u8 test.
6310
6311         * objects.cs: Add tests for JIT intrinsic.
6312
6313         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
6314         optimizations lost by a mistake.
6315
6316 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
6317
6318         * basic-long.cs: Remove a test moved to objects.cs.
6319
6320         * arrays.cs: Add more array tests.
6321
6322 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
6323
6324         * arrays.cs: Add new tests for multi-dimensional arrays.
6325
6326 2005-12-06  Raja R Harinath  <rharinath@novell.com>
6327
6328         * Makefile.am (test_sources2): Add generics.2.cs.
6329         (EXTRA_DIST): Add test_sources2.
6330
6331 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
6332
6333         Support for boxing and unboxing nullable types as well as the
6334         isinst operation on nullables, per the CLI ammendment.
6335
6336         * inssel.brg (CEE_ISINST): Special case for nullable
6337
6338         * mini.c (handle_unbox_nullable): new method
6339         (handle_box): Special case for nullable types
6340         (mono_method_to_ir): Call handle_unbox_nullable in correct
6341         places.
6342
6343         * generics.2.cs: New test suite
6344
6345         * Makefile.am: Support for regression tests with generics.
6346
6347 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
6348
6349         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
6350         allocated to registers. Fixes #76800.
6351
6352 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
6353
6354         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
6355
6356 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
6357
6358         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
6359         of platforms.
6360
6361 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
6362
6363         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
6364         objects.cs.
6365
6366         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
6367         
6368         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
6369 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
6370
6371         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
6372         single precision before storing to a single precision location.
6373
6374 2005-11-28  Raja R Harinath  <rharinath@novell.com>
6375
6376         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
6377
6378 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
6379
6380         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
6381         correct files.
6382
6383         * basic.cs: Remove test_0_byte_compares test which was moved to
6384         objects.cs a long time ago.
6385
6386 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
6387
6388         * aliasing.c: Fixed aliasing issue on 64 bit archs.
6389
6390 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
6391
6392         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
6393         handlers are called.
6394
6395         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
6396         throwing code.
6397
6398          * mini-ia64.c: Add support for the throw->branch exception 
6399         optimization.   
6400
6401         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
6402
6403 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6404
6405         * mini.c: Enabled "fastpath" deadce :-)
6406         
6407 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6408
6409         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
6410         alias analysis pass to support it.
6411         * mini.h: Likewise.
6412         * ssa.c: Likewise.
6413         * liveness.c: Likewise (liveness computation can use aliasing
6414         information to be more accurate).
6415         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
6416         moreover made so that "--compile-all" uses the given optimization
6417         flags and not the default ones.
6418         * aliasing.c: Alias analysis (new file).
6419         * aliasing.h: Likewise.
6420         * Makefile.am: added "aliasing.c" and "aliasing.h".
6421         
6422 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
6423
6424         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
6425         OP_L opcodes.
6426
6427 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
6428
6429         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
6430         fp >= end_of_stack exit condition, as it is not needed, and it might
6431         become true for fp eliminated frames.
6432
6433 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
6434
6435         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
6436         coded offsets.
6437
6438 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
6439
6440         * mini-arm.c: fixed alignment of doubles/longs to match
6441         the C ABI (bug #76635).
6442
6443 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
6444
6445         * aot.c: fix compilation with --enable-minimal=aot.
6446
6447 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
6448
6449         * mini-arm.c: fixed compatibility with the new
6450         floating point emulator package for compares.
6451
6452 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
6453
6454         * mini.c : reverted sig->pinvoke changes (r51396-51397).
6455
6456 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
6457
6458         * mini-exceptions.c (print_stack_frame): Output to stderr.
6459         (mono_handle_native_sigsegv): Ditto.
6460
6461 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6462
6463         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
6464         OP_LCONV_TO_OVF_I implementation.
6465
6466         * mini-amd64.c: Add support for the throw->branch exception 
6467         optimization.
6468
6469         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
6470         when the catch clause catches a more general exception, i.e. Object.
6471
6472 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
6473
6474         * cpu-ia64.md: Remove unused opcodes.
6475
6476         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
6477         specific defines for architectures defining USE_SIGACTION.
6478
6479         * mini-ia64.c: Fix some warnings.
6480
6481         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
6482         version seemed to skip a frame.
6483
6484 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6485
6486         * mini.c: Clean up the usage of sig->pinvoke flag. Now
6487         only calls which are made to native code use this flag.
6488
6489 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
6490
6491         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
6492         varargs methods as well.
6493         
6494         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
6495         which have save_lmf set. Reorganize methods prologs a bit.
6496
6497         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
6498         debugger to the proper place.
6499
6500 2005-10-29  Martin Baulig  <martin@ximian.com>
6501
6502         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
6503         when running inside the debugger until the debugger has support
6504         for it.
6505
6506 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
6507
6508         * mini.h: Fix a warning.
6509
6510 2005-10-24  Miguel de Icaza  <miguel@novell.com>
6511
6512         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
6513         we expose publicly, this returns the string.
6514
6515 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
6516
6517         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
6518         with fp elimination.
6519
6520 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
6521
6522         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
6523         native stacktrace using the glibc 'backtrace' function if available.
6524
6525 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
6526
6527         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
6528
6529         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
6530         handle SIGSEGVs received while in native code.
6531
6532         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
6533         code, call mono_handle_native_sigsegv which will abort the runtime
6534         after printing some diagnostics, instead of converting it into a
6535         confusing NullReferenceException.
6536
6537 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
6538
6539         * cpu-pentium.md: Remove unused opcodes.
6540
6541 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
6542
6543         * mini-amd64.h (MonoLMF): Add rsp field.
6544
6545         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
6546         the lmf too.
6547
6548 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
6549
6550         * mini-codegen.c (get_register_spilling): Fix some warnings.
6551
6552 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
6553
6554         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
6555         elimination during exception handling. Enable fp elimination by
6556         default.
6557
6558         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
6559         elimination.
6560
6561 2005-10-16  Martin Baulig  <martin@ximian.com>
6562
6563         * mini-exceptions.c
6564         (mono_debugger_run_finally): New public method for the debugger.
6565
6566 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
6567
6568         * debug-mini.c (mono_debug_init_method): Fix warning.
6569
6570         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
6571         the 'exname' parameter const to fix some warnings.
6572
6573 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
6574
6575         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
6576         introduced by the previous patch.
6577
6578 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
6579
6580         * basic-float.cs: Add test for precision of float arithmetic.
6581
6582         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
6583         when loading/storing single values from/to memory.
6584
6585         * mini.c (mono_jit_compile_method_with_opt): Create the function
6586         pointers in the correct domain.
6587
6588 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
6589
6590         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
6591         introduced by previous patch.
6592         
6593         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
6594         when out_filter_idx is NULL.
6595
6596         * mini-exceptions.c: Don't run filter clauses twice during exception
6597         handling. Fixes #75755.
6598
6599 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
6600
6601         * aot.c: Add support for ldflda wrappers.
6602
6603         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
6604         #75902.
6605
6606 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
6607
6608         * mini.c, mini.h: do not consider exception handlers blocks when
6609         setting up interface variables.
6610
6611 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
6612
6613         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
6614
6615 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
6616
6617         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
6618         causes a regression.
6619
6620         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
6621
6622 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
6623
6624         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
6625         of the OP_P definitions.
6626
6627         * TODO: Add a proposal for dealing with the CEE/OP mess.
6628
6629         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
6630         optimizations from the x86 port.
6631
6632         * cpu-amd64.md: Ditto.
6633
6634         * basic.cs basic-long.cs: Add tests.
6635
6636 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
6637
6638         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
6639         Patrik Torstensson's implementation of my exception-handling
6640         optimization idea, when the exception object is not used
6641         (bug #62150).
6642
6643 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
6644
6645         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
6646         of the mul_imm optimizations from the old jit.
6647
6648 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
6649
6650         * mini.c, liveness.c: patch by Patrik Torstensson and
6651         Zoltan Varga to improve performance in methods with
6652         exception clauses.
6653
6654 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
6655
6656         * driver.c: Remove 'Globalization' entry from --version.
6657
6658 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
6659
6660         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
6661         there is a profiler interested in JIT events.
6662
6663         * aot.c: Load profile files produced by the AOT profiling module, and
6664         reorder methods based on the profiling info. Add a 'method_order' table
6665         to the AOT file to make mono_aot_find_jit_info work with the reordered
6666         methods.
6667
6668         * mini.h: Bump AOT file version info.
6669
6670 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
6671
6672         * mini-arm.h: work around what looks like a gcc bug when optimizations
6673         are enabled.
6674
6675 2005-09-28  Raja R Harinath  <rharinath@novell.com>
6676
6677         * Makefile.am (AM_CFLAGS): Don't use += to append inside
6678         conditionals.  Use ...
6679         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
6680
6681 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
6682
6683         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
6684         to determine the amount of memory to copy when passing valuetypes.
6685
6686         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
6687         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
6688
6689 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
6690
6691         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
6692         information about aot.
6693
6694 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
6695
6696         * *.c: Replace the use of {Enter,Leave}CriticalSection with
6697         macros. This will allow a deadlock debugger to easily be plugged
6698         in.
6699
6700 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
6701
6702         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
6703
6704 2005-09-27  Raja R Harinath  <rharinath@novell.com>
6705
6706         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
6707         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
6708         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
6709         ($(arch_built)) [CROSS_COMPILING]: Error out.
6710
6711 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
6712
6713         * aot.c: Add support for the no_special_static flag for classes.
6714
6715 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6716
6717         * Reapply reverted patches.
6718
6719         * *: Revert r50174 as well.
6720
6721         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
6722
6723 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6724
6725         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
6726
6727 2005-09-23  Miguel de Icaza  <miguel@novell.com>
6728
6729         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
6730         part of the SIG_HANDLER_SIGNATURE.  
6731
6732 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
6733
6734         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
6735         statistics.
6736
6737         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
6738         introduced by previous patch.
6739
6740 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
6741
6742         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
6743         saved registers too.
6744
6745         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
6746         upon the information returned by get_call_info ().
6747         
6748         * mini-x86.c (add_float): Fix stack size calculation.
6749         (mono_arch_call_opcode): Rewrite this so it works based up the
6750         information returned by get_call_info ().
6751         (mono_arch_get_this_vret_args): Ditto.
6752
6753 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
6754
6755         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
6756         in cinfo to determine the registers which need to be used.
6757
6758 2005-09-20  Miguel de Icaza  <miguel@novell.com>
6759
6760         * driver.c (mono_main): Add --server and --desktop flags. 
6761
6762 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
6763
6764         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
6765         registers as global registers.
6766
6767         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
6768         longer needed with the new register allocator.
6769
6770         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
6771
6772         * cpu-ia64.md: Remove unused opcodes.
6773         
6774         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
6775         
6776 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
6777
6778         * cpu-amd64.md: Remove unused opcodes.
6779
6780         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
6781         needed with the new register allocator.
6782
6783         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
6784         reg-reg moves.
6785
6786 2005-09-16  Raja R Harinath  <rharinath@novell.com>
6787
6788         * Makefile.am (check-local): Don't invoke semdel-wrapper.
6789
6790 2005-09-16  Martin Baulig  <martin@ximian.com>
6791
6792         * exceptions-amd64.c
6793         (throw_exception): Don't call mono_debugger_throw_exception() if
6794         we're a rethrow - see the FIXME in the code.
6795
6796 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
6797
6798         * mini.c (mono_init_exceptions): This only works on some architectures.
6799         
6800 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6801
6802         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
6803         on ia64.
6804
6805         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
6806
6807         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
6808         now in mini-exceptions.c.
6809
6810 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
6811
6812         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
6813         now in mini-exceptions.c.
6814
6815 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6816
6817         * exceptions-x86.c: Applied patch from Patrik Torstensson 
6818         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
6819
6820         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
6821         code into mini-exceptions.c. Add some assertions to it.
6822
6823 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
6824
6825         * aot.c (emit_section_change): Applied patch from "The Software Team" 
6826         (<software@solmersa.com>). Fix as errors on windows.
6827
6828 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6829
6830         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
6831         method info into the LMF.
6832
6833 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6834         
6835         * mini-ia64.c: Add proper unwind info for method epilogs.
6836
6837         * exceptions-ia64.c: Add some code to help debugging.
6838         
6839         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
6840
6841         * mini-exceptions.c: Fix warning.
6842
6843 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6844
6845         * mini.c: Really fix build.
6846
6847         * mini-x86.c mini-amd64.c: Fix build.
6848
6849 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6850
6851         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
6852
6853         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
6854         some Interlocked methods as intrinsics.
6855
6856         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
6857         for Thread methods as well.
6858
6859         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
6860
6861         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
6862
6863         * mini-ia64.c mini-x86.c mini-amd64.c 
6864         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
6865         OP_MEMORY_BARRIER.
6866         
6867         * mini.c (mono_init_exceptions): Fix build breakage.
6868
6869 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
6870
6871         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
6872         of instructions. Use the new ia64_unw_op macros for emitting unwind
6873         info.
6874
6875         * mini.c (mono_init_exceptions): Initialize exception handling
6876         related trampolines at startup.
6877
6878 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
6879
6880         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
6881
6882 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
6883
6884         * mini.c: Handle type loading errors gracefully during compilation and
6885         throw the appropriate exception.
6886
6887 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
6888
6889         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
6890         for the mono binary.
6891
6892 2005-09-09  Martin Baulig  <martin@ximian.com>
6893
6894         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
6895         the release.
6896
6897 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6898
6899         * mini-arm.h: use emulation for conv.r.un for the release.
6900
6901 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6902
6903         * mini-arm.c, objects.cs: more fixes and tests for them.
6904
6905 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6906
6907         * mini-arm.c: align structures to at least 4 bytes to be able
6908         to keep our current optimized memcpy.
6909
6910 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
6911
6912         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
6913
6914 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6915
6916         * mini.c: ignore SIGPIPE.
6917
6918 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
6919
6920         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
6921
6922         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
6923
6924 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
6925
6926         * mini.h: Add prototype for mono_allocate_stack_slots_full.
6927
6928 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6929
6930         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
6931         exception handling support.
6932         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
6933         patch by Brian Koropoff <briank@marakicorp.com>).
6934
6935 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
6936
6937         * mini.c: revert another 'optimization' which breaks when
6938         items on the eval stack need to be saved at a basic block end
6939         (bug #75940).
6940
6941 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
6942
6943         * jit-icalls.c: for arrays, ensure we always provide
6944         lower bounds.
6945
6946 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
6947
6948         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
6949         
6950         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
6951
6952 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
6953
6954         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
6955         arguments in their original register.
6956
6957 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
6958
6959         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
6960         memset/memcpy.
6961
6962         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
6963         when ssapre is enabled.
6964
6965         * inssel-long.brg: Fix bug in previous patch.
6966
6967         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
6968         multiplication by a constant.
6969
6970 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
6971
6972         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
6973         icc.
6974
6975         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
6976         saving registers.
6977
6978 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
6979
6980         * inssel-arm.brg: apply changes tested by Brian Koropoff
6981         <briank@marakicorp.com>.
6982
6983 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
6984
6985         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
6986         
6987 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
6988
6989         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
6990         to the same register if dreg is just a base register.
6991         (print_ins): Improve printing of membase opcodes.
6992
6993         * inssel-x86.brg: Add optimized ldind(reg) rules.
6994
6995         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
6996
6997 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
6998
6999         * mini.c: when running under valgrind, set the stack bottom for
7000         the GC at the actual approximate stack for the app (fixes running
7001         mono with valgrind).
7002
7003 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
7004
7005         * mini.c: do no break at the first valuetype to init found
7006         (fixes bug #75791).
7007
7008 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
7009
7010         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
7011
7012 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
7013
7014         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
7015
7016 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
7017
7018         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
7019
7020 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7021
7022         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
7023
7024         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
7025         code.
7026
7027         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
7028         code.
7029
7030         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
7031         methods.
7032
7033 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
7034
7035         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
7036
7037 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7038
7039         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
7040         in the tail recursion optimization.
7041
7042         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
7043         debug info into the assembly file.
7044
7045         * iltests.il: Add test for filter regions.
7046
7047         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
7048         initial stack of filter regions. Fixes #75755.
7049
7050 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
7051
7052         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
7053         stack requirements.
7054
7055 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7056
7057         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
7058         the check for an already compiled method on non-ia64 platforms.
7059         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
7060         proper domain.
7061
7062         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
7063
7064         * inssel-x86.brg: Add some optimized call rules.
7065
7066 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
7067
7068         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
7069         method here.
7070
7071         * mini.h mini-trampolines.c: Pass the trampoline argument to 
7072         mono_arch_patch_delegate_trampoline.
7073
7074         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
7075
7076         * mini-trampolines.c: Fix build.
7077
7078         * mini-amd64.h: Add delegate trampolines.
7079
7080         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
7081
7082         * inssel-amd64.brg: Add optimized call rules.
7083         
7084         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
7085
7086         * inssel-ia64.brg: Add optimized ldind(reg) rules.
7087
7088 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
7089
7090         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
7091         change.
7092
7093         * mini-ia64.c: Remove LMF fixmes.
7094
7095         * mini-ia64.h: Remove most fields from LMF.
7096
7097         * inssel-ia64.brg (stmt): Fix unaligned access errors.
7098
7099         * mini-trampolines.c: Add support for IA64 function descriptors.
7100
7101         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
7102         for IA64 function descriptors.
7103
7104 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
7105
7106         * tramp-arm.c: patch the vtable for virtual calls. Added
7107         support code to register/unregister the LMF.
7108         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
7109         more LMF work.
7110
7111 2005-08-19  Dick Porter  <dick@ximian.com>
7112
7113         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
7114         bit value if needed.
7115
7116 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
7117
7118         * mini.c (mini_get_method): Move handling of wrapper data here.
7119
7120         * mini.c (mono_method_to_ir): Add support for dynamic methods.
7121
7122         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
7123         virtual.
7124
7125         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
7126         bblock->code does not remain empty.
7127
7128 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
7129
7130         * arrays.cs: Add regression test for #75832.
7131
7132         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
7133         rules. Fixes #75832.
7134
7135         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
7136         instruction scheduling.
7137
7138 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
7139
7140         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
7141
7142 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
7143
7144         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
7145
7146         * mini-codegen.c: Fix VC build.
7147
7148         * cpu-pentium.md: Increase length of atomic_exhange_i4.
7149
7150 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7151
7152         * mini.h: fix signature for mono_register_opcode_emulation.
7153
7154 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
7155
7156         * mini.c: Get rid of most of the helper_sig_... constants using
7157         mono_create_icall_signature ().
7158
7159 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
7160
7161         * jit-icalls.c (helper_ldstr): New helper function.
7162
7163         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
7164
7165         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
7166         throw, load the string using a helper call instead of creating a string object.
7167
7168         * aot.c: Update after LDSTR changes.
7169
7170         * mini.h: Bump AOT file version.
7171         
7172         * aot.c: Save class size info into the AOT file. Print more statistics during
7173         compilation.
7174
7175         * mini.h: Bump AOT file version.
7176
7177         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
7178         ordering of disasm cases. Fixes #74957.
7179
7180 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
7181
7182         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
7183         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
7184         the generic code needed for the ARM port.
7185
7186 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
7187
7188         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
7189         inssel-arm.brg: more ARM features and fixes.
7190
7191 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
7192
7193         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
7194         ARM port work in progress.
7195
7196 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
7197
7198         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
7199
7200         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
7201
7202         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
7203
7204         * inssel.brg (mini_emit_memset): Add support for unaligned access.
7205
7206         * *-ia64.*: Ongoing IA64 work.
7207         
7208         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
7209
7210 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
7211
7212         * TODO: Remove out-of-data todo stuff.
7213
7214         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
7215         dead code.
7216
7217         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
7218
7219         * mini.h: Bump corlib version.
7220
7221 2005-07-27  Martin Baulig  <martin@ximian.com>
7222
7223         * mini-codegen.c
7224         (create_copy_ins): Added `const unsigned char *ip' argument; set
7225         `copy->cil_code' from it.
7226
7227 2005-07-27  Martin Baulig  <martin@ximian.com>
7228
7229         * mini-exceptions.c (mono_handle_exception): Don't call
7230         mono_debugger_handle_exception() for filters.
7231
7232 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
7233
7234         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
7235         as well.
7236
7237 2005-07-26  Martin Baulig  <martin@ximian.com>
7238
7239         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
7240
7241         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
7242         helper_compile_generic_method() if the method is actually virtual
7243         and non-final.
7244
7245 2005-07-26  Martin Baulig  <martin@ximian.com>
7246
7247         * mini.c
7248         (trampoline_code): Renamed to `mono_trampoline_code' and made it
7249         public; this is now accessed directly by the debugger.
7250         (mono_generic_trampoline_code): Removed.
7251
7252         * debug-mini.c
7253         (mono_debug_init_method): Also add interncalls and wrappers.
7254
7255 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
7256
7257         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
7258
7259 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
7260
7261         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
7262
7263 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
7264
7265         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
7266
7267 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7268
7269         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
7270         getting TLS offsets on AMD64 too.
7271
7272 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
7273
7274         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
7275
7276 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
7277
7278         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
7279         inssel-arm.brg, mini-arm.h: ARM port work in progress.
7280
7281 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7282
7283         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
7284
7285         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
7286         to mini.c.
7287
7288         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
7289         mono_sparc_is_virtual_call ().
7290         
7291         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
7292
7293         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
7294         trampoline parameters.
7295
7296         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
7297         
7298         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
7299         to mono_arch_get_vcall_slot_addr.
7300
7301         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
7302         trampoline code.
7303
7304         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
7305
7306 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7307
7308         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
7309
7310 2005-07-19  Martin Baulig  <martin@ximian.com>
7311
7312         * exceptions-amd64.c (throw_exception): Call
7313         mono_debugger_throw_exception() here like we're doing it on i386.
7314
7315 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7316
7317         * mini-ia64.c: Add optimized TLS access support.
7318
7319 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
7320
7321         * mini-exceptions.c: Ongoing IA64 work.
7322
7323         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
7324
7325         * mini.c: Use the default optimization set when embedding. Fixes
7326         #75194.
7327
7328 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
7329
7330         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
7331         of trampolines to a separate file.
7332
7333         * mini-trampolines.c: New file.
7334
7335         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
7336         separate file.
7337         
7338         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
7339         amd64/ia64 code.
7340
7341         * mini-codegen.c: Fix cygwin build.
7342
7343 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
7344
7345         * mini.c: Add some minor changes needed by the IA64 port.
7346
7347         * *-ia64.*: Ongoing IA64 work.
7348
7349 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
7350
7351         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
7352         trampolines into arch-independent and arch-dependent parts.
7353
7354         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
7355
7356 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
7357
7358         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
7359
7360         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
7361         the xp-regalloc-branch for amd64.
7362
7363         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
7364         xp-regalloc-branch for x86.
7365
7366 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
7367
7368         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
7369
7370 2005-07-06  Martin Baulig  <martin@ximian.com>
7371
7372         * mini.c
7373         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
7374         (mono_jit_runtime_invoke): Likewise.
7375
7376 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
7377
7378         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
7379         on x86 too.
7380         
7381         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
7382         without loading their metadata. Reorganize the file format so exception handling+
7383         debug info is kept separate from normal method info. Create MonoJitInfo 
7384         structures for methods lazily.
7385
7386         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
7387         loading metadata.
7388         (x86_class_init_trampoline): Patch AOT class init trampolines too.
7389
7390         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
7391
7392         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
7393         in AOT code.
7394
7395         * mini.h: Bump AOT file version.
7396
7397 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
7398
7399         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7400
7401 2005-07-01  Raja R Harinath  <rharinath@novell.com>
7402
7403         * Makefile.am (check-local): Call semdel-wrapper.
7404
7405 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
7406
7407         * mini-x86.c: Revert the last change as it seems to break the build..
7408
7409 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
7410
7411         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7412         
7413         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
7414
7415 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
7416
7417         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
7418         outside of the macro, so strange stuff doesn't happen with gcc4
7419         (NEW_AOTCONST_TOKEN): Likewise.
7420
7421 2005-06-28  Martin Baulig  <martin@ximian.com>
7422
7423         * mini.c (mini_class_is_system_array): New static method; use this
7424         instead of `klass->parent == mono_defaults.array_class' everywhere
7425         since this also works for the new generic array class.
7426
7427 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
7428
7429         * inssel.brg: Remove warnings.
7430
7431 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
7432
7433         * mini-ia64.c: Ongoing IA64 work.
7434
7435         * basic-float.cs: Add float->i1 conversion test.
7436
7437         * iltests.il: Add conv.u4 test.
7438
7439 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
7440
7441         * inssel-long.brg: Fix bug caused by last change.
7442
7443 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
7444
7445         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
7446         BSDs.  Allows the x86 JIT to work on OSX86
7447
7448 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
7449
7450         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
7451         u4->i8 conversion.
7452
7453         * mini-ia64.c: Ongoing IA64 work.
7454
7455 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
7456
7457         * mini-ia64.c: Ongoing IA64 work.
7458
7459         * driver.c: Clean up jit_code_hash as well when using --regression.
7460
7461         * inssel-long.brg: Fix long->i4/u4 conversion rules.
7462
7463         * basic-long.cs: Add tests for long->u4 conversion.
7464
7465 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
7466
7467         * mini.c: Take mono_get_domainvar out of macros. This makes sure
7468         that we do not depend on undefined C behavior: the order stuff
7469         gets evaluated within an expression. Fixes mono when compiled on
7470         GCC 4.
7471
7472 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
7473
7474         * *-ia64.*: Ongoing IA64 work.
7475
7476         * aot.c: Lower memory usage while loading AOT methods.
7477
7478         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
7479
7480         * mini.h: Bump AOT file format version.
7481
7482 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
7483
7484         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
7485
7486 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
7487
7488         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
7489         not on callee assembly). Fixed some comments.
7490
7491 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
7492
7493         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
7494         it gets proper disassembly.
7495         (emit_method_info): Remove some dead code.
7496
7497         * mini.c (mini_method_compile): Allways allocate the GOT var in
7498         mono_method_to_ir for emulating opcodes.
7499
7500 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
7501
7502         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
7503         before freeing the code memory. Fixes #74990.
7504
7505         * objects.cs: Add regression test for #74992.
7506
7507         * liveness.c: Extend live ranges of arguments to the beginning of the
7508         method. Fixes #74992.
7509
7510         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
7511         so it points into the faulting instruction.
7512
7513 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
7514
7515         * jit-icalls.c (mono_imul_ovf): Add exception handling.
7516
7517         * *-ia64.*: Ongoing IA64 work.
7518
7519         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
7520
7521 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
7522
7523         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
7524
7525         * *-ia64.*: Ongoing IA64 work.
7526
7527 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
7528
7529         * basic-long.cs: Add tests for add/sub.ovf.
7530
7531         * basic.cs: Add tests for sub.ovf.
7532
7533         * *-ia64.*: Ongoing IA64 work.
7534
7535 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
7536
7537         * *-ia64.*: Ongoing IA64 work.
7538
7539         * basic.cs: Add conv.ovf.i4.un test.
7540
7541 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
7542
7543         * mini.c: (remove_block_if_useless) Fixed bug 75061.
7544         
7545 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7546
7547         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
7548
7549 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
7550
7551         * *-ia64.*: Ongoing IA64 work.
7552
7553 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7554
7555         * trace.[ch]:
7556         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
7557
7558 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
7559
7560         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
7561
7562 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
7563
7564         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
7565
7566         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
7567         of a call is callable by a near call.
7568
7569 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
7570
7571         * mini-ia64.c: Ongoing IA64 work.
7572
7573 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
7574
7575         * genmdesc.c: Make the generated array non-static.
7576
7577         * inssel-long.brg: Fix LSHR_IMM rule.
7578
7579         * *-ia64.*: Ongoing IA64 work.
7580
7581         * *-ia64.*: Ongoing IA64 work.
7582
7583 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7584
7585         * *-ia64.*: Ongoing IA64 work.
7586
7587         * *-ia64.*: Ongoing IA64 work.
7588         
7589         * mini-ia64.c: Ongoing IA64 work.
7590
7591         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
7592
7593 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7594
7595         * objects.cs basic-calls.cs: Move some tests to objects.cs.
7596         
7597         * objects.cs basic-long.cs: Move some tests to objects.cs.
7598
7599 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
7600
7601         * *-ia64.*: Ongoing IA64 work.
7602
7603         * iltests.il: Add a new test.
7604
7605         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
7606         newobj. Fixes #75042.
7607
7608 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
7609
7610         * *-ia64.*: Ongoing IA64 work.
7611         
7612         * *-ia64.*: Ongoing IA64 work.
7613         
7614         * *-ia64.*: Ongoing IA64 work.
7615
7616         * basic.cs objects.cs: Move tests accessing static variables as well.
7617
7618         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
7619
7620 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
7621
7622         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
7623
7624         * driver.c: Always print failed tests.
7625
7626         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
7627         frame pointer.
7628
7629         * *ia64*: Ongoing IA64 work.
7630
7631 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
7632
7633         * basic.cs: Add tests for add.ovf. Fix warnings.
7634
7635 2005-05-18  Miguel de Icaza  <miguel@novell.com>
7636
7637         * driver.c (mono_main): Avoid crash if no argument is passed to
7638         --break;  Do not use g_error, but f_printf.   And fix all other
7639         ocurrences of the same crash.
7640
7641 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
7642
7643         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
7644         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
7645         Fixes #74742.
7646
7647 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
7648
7649         * *-ia64.*: Add beginnings of IA64 backend.
7650
7651         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
7652
7653 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
7654
7655         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
7656         Fixes #74925.
7657
7658         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
7659
7660         * mini-amd64.c: Fix a warning.
7661
7662 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
7663
7664         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
7665         in float_neg. Fixes #74897.
7666
7667         * mini-amd64.c (emit_call): Fix another near call bug.
7668
7669 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
7670
7671         * declsec.c: Keep the appdomain information in the structure. Added a 
7672         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
7673         value gets overwritten).
7674         * declsec.h: Set the default MonoArray for the the stack to 6. Added
7675         an MonoAppDomain member to MonoSecurityFrame.
7676         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
7677         used in the stack walk. Now use a MonoArray which grow (double) when
7678         it gets full.
7679
7680 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
7681
7682         * mini.c: Re-enabled runtime cleanup, since running threads should
7683         now properly stop when exiting.
7684
7685 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
7686
7687         * mini-codegen.c: New file contaning the arch-independent local
7688         register allocator. Not used by any architectures yet.
7689
7690         * mini.h linear-scan.c: Merge some changes from the 
7691         mini-xp-local-regalloc branch.
7692
7693 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
7694
7695         * mini-amd64.c (emit_call): Fix calls to native functions when the
7696         runtime is compiled as a shared library. Fixes #74756.
7697
7698         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
7699         on a literal field. Fixes #74751.
7700
7701 2005-04-25  Raja R Harinath  <rharinath@novell.com>
7702
7703         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
7704
7705 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
7706
7707         * objects.cs: Add missing null casting test.
7708
7709 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
7710
7711         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
7712         in wrapper methods. Also rename 'address' variable to 'offset'.
7713
7714 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
7715
7716         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
7717         warnings.
7718         
7719         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
7720
7721         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
7722         work on windows.
7723
7724 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
7725
7726         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
7727
7728 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7729
7730         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
7731         just the last bytes.
7732
7733 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7734
7735         * aot.c (mono_compile_assembly): Fix warning.
7736
7737         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
7738         by the _MSC_VER stuff.
7739
7740 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
7741
7742         * inssel-long.brg: Fix #74588.
7743
7744         * cpu-amd64.md: Fix #74591.
7745
7746         * iltests.il: Add new regression tests.
7747
7748 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
7749
7750         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
7751         valuetype.
7752
7753 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
7754
7755         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
7756
7757         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
7758         from Bill Middleton <flashdict@gmail.com>.
7759
7760 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
7761
7762         * arrays.cs: Add new regression test. Fix warnings.
7763
7764 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
7765
7766         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
7767         and leakage in CKFINITE.
7768
7769         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
7770         this to a null op since it is called on amd64 too.
7771
7772         * exceptions-amd64.c (get_throw_trampoline): Align stack.
7773
7774         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
7775         body since this is not used on amd64.
7776         
7777         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
7778
7779         * mini-amd64.c: Remove obsolete fixmes.
7780
7781         * mini.c (print_method_from_ip): Fix debugging support.
7782
7783 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
7784
7785         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
7786         so that expressions that don't give much gain are not reduced.
7787         * ssapre.h: Likewise.
7788
7789 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
7790
7791         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
7792
7793         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
7794
7795         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
7796
7797 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
7798
7799         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
7800
7801         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
7802
7803 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
7804
7805         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
7806         stack touching.
7807
7808         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
7809
7810         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
7811
7812         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
7813
7814         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
7815         MONO_ARCH_USE_SIGACTION. Fixes #74252.
7816
7817         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
7818
7819         * mini-x86.c: Fix up stack overflow handling.   
7820
7821         * exceptions.cs: Add new regression test.
7822
7823 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
7824
7825         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
7826         mono_jit_thread_attach.
7827
7828         * mini.c (mono_method_to_ir): Verify called method is not abstract.
7829
7830 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7831
7832         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
7833         avoid calling constructors using callvirt.
7834
7835         * inssel.brg: Fix #74073.
7836
7837 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
7838
7839         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
7840         compilation with non-GCC compilers.
7841         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
7842         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
7843
7844 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
7845
7846         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
7847         klass->interface_offsets (will likely fix bug#74073).
7848
7849 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7850
7851         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
7852
7853 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
7854
7855         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
7856         to amd64_div_reg_size ().
7857         
7858         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
7859
7860 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
7861
7862         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
7863
7864 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7865
7866         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
7867
7868 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7869
7870         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
7871         
7872         * mini.c (mono_precompile_assembly): Load and precompile referenced
7873         assemblies as well. Fixes #74015.
7874
7875 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
7876
7877         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
7878
7879 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
7880
7881         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
7882         a lot of checks and (anyway) permissions cannot work until corlib is 
7883         loaded.
7884
7885 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
7886
7887         * mini-ppc.c: fixed ABI issue on sysv/ppc.
7888
7889 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
7890
7891         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
7892         calls (fixes bug#72824).
7893
7894 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
7895
7896         * mini.c: fix tail recursion elimination (see test in bug#73936).
7897
7898 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
7899
7900         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
7901         some fp functions in sse2 mode.
7902
7903 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
7904
7905         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
7906
7907 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
7908
7909         * mini.h mini.c: Add mono_get_jit_tls_key ().
7910
7911         * mini-x86.c: Enable fast TLS support on windows.
7912
7913 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
7914
7915         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
7916         * mini.c: Check for p/invoke method when generating code. If a
7917         p/invoke method, or it's class, isn't decorated with [Suppress
7918         UnmanagedCodeSecurity] then generate code to call System.Security.
7919         UnmanagedDemand (only if the security manager is active).
7920
7921 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7922
7923         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
7924         last change as it seems to cause strange crashes.
7925         
7926 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
7927
7928         * *.c: handle unsafe function pointers where needed.
7929
7930 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7931
7932         * mini.c (mono_jit_free_method): Remove the fixme too.
7933
7934 2005-03-15  Miguel de Icaza  <miguel@novell.com>
7935
7936         * mini.c: As discussed, make the code actually free the delegate
7937         thunk now, to enable the debugging of delegate problems, use
7938         MONO_DEBUG=1 when running Mono. 
7939
7940         This takes also care of parts of the leaks as seen by Joe.
7941
7942 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
7943
7944         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
7945         thread_tls_offset calculation.
7946
7947 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
7948
7949         * declsec.c: Reworked linkdemand checks for icall. The previous code
7950         was using the declaration code (untrusted) and didn't work as expected
7951         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
7952         specific case.
7953
7954 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
7955
7956         * iltests.il: Add new localloc test.
7957
7958         * mini-amd64.c: Handle large stack allocations the same way as on
7959         windows if stack overflow handling is working.
7960         
7961         * mini-amd64.c: Allocate the signal stack using mmap.
7962
7963         * mini.c (sigsegv_signal_handler): Fix reading of context.
7964
7965         * mini-exceptions.c: Fix up stack overflow handling.
7966
7967         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
7968
7969         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
7970
7971         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
7972
7973         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
7974
7975         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
7976         tramp_init functions as they are no longer needed.
7977
7978 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
7979
7980         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
7981         
7982         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
7983
7984         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
7985         
7986         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
7987         support that now.
7988
7989         * mini-ops.h: Add OP_LMUL_IMM.
7990
7991         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
7992         long mul/div opcodes as intrinsic.
7993
7994         * mini-amd64.c (emit_call): Handle the case when the callee might be
7995         an AOT method.
7996
7997 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
7998
7999         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
8000         extra safe.
8001         
8002         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
8003
8004         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
8005
8006 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
8007
8008         * mini.c (mono_codegen): Don't leak here, to help people running
8009         monogrind.
8010
8011 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
8012
8013         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
8014         conversions in sse2 mode.
8015
8016         * basic-float.cs: Add regression test.
8017         
8018         * mini-amd64.c: Reenable sse2.
8019
8020 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
8021
8022         * mini-amd64.c: Disable sse2 until some regressions are fixed.
8023
8024 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
8025
8026         * driver.c: Copyright text should include 2005.
8027         
8028 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
8029
8030         * cpu-amd64.md (load_membase): Fix more max lengths.
8031
8032 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
8033
8034         * cpu-amd64.md (load_membase): Fix max length.
8035
8036         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
8037
8038         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
8039
8040         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
8041         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
8042
8043         * basic-float.cs: Add rounding regression test.
8044
8045         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
8046
8047 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
8048
8049         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
8050         structures in registers for pinvoke wrappers.
8051
8052 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
8053
8054         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
8055
8056 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
8057
8058         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
8059         wrapper to mono_jit_thread_attach.
8060
8061         * mini.c (mini_jit_thread_attach): New jit icall.
8062
8063         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
8064         native->managed wrappers.
8065
8066         * exceptions.cs: Add new regression test.
8067
8068         * mini.c (optimize_branches): Check regions in the cbranch to throw
8069         block case as well. Fixes #73242.
8070
8071 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
8072
8073         * mini.c: thread safety fixes.
8074
8075 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
8076
8077         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
8078         patching stuff, since delegates use jump trampolines so there is
8079         no caller.
8080
8081         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
8082         jump trampolines.
8083         
8084         * tramp-amd64.c: Fix build.
8085
8086         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
8087         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
8088
8089         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
8090         Rename this to mono_arch....
8091         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
8092
8093         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
8094
8095         * mini-amd64.c (emit_call): If both the caller and the callee is
8096         guaranteed to have 32 bit addresses, emit a normal call.
8097
8098         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
8099
8100         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
8101         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
8102         method_ptr inside delegates.
8103
8104 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
8105
8106         * mini.c (mono_jit_free_method): Free the method info even if the native code is
8107         invalidated. Fixes #73001.
8108
8109         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
8110
8111         * mini-x86.c: Only use stdcall for pinvokes on windows.
8112
8113 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
8114
8115         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
8116         * mini-x86.c: remove unreliable __thread var offset detection,
8117         use the correct accessors and enable by default.
8118
8119 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
8120
8121         * mini.c (mono_jit_free_method): Fix memory leak.
8122
8123 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
8124
8125         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
8126
8127 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
8128
8129         * cpu-amd64.md: Fix lengths of atomic opcodes.
8130
8131 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
8132
8133         * driver.c: try to not imply using ICU is any good.
8134
8135 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
8136
8137         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
8138         functions as inline ops.
8139
8140         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
8141         some Interlocked functions as inline ops.
8142
8143         * mini.c (move_basic_block_to_end): Fix bug in last patch.
8144
8145         * mini.h (MonoBasicBlock): Reorganize fields a bit.
8146
8147         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
8148
8149         * mini.c: Add support for OP_NOT_TAKEN.
8150
8151         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
8152         structures in registers for pinvoke wrappers.
8153
8154         * mini-amd64.c: Fix warnings.
8155
8156 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
8157
8158         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
8159
8160         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
8161
8162         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
8163         address instead of loading the address from it.
8164
8165         * mini-x86.c: Add support for returning small structs in registers
8166         on Win32. Fixes part of #70864.
8167         
8168 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
8169
8170         * trace.c (get_token): Improve error checking.
8171
8172 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
8173
8174         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
8175
8176 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
8177  
8178         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
8179         it can be reused for MonoClass.
8180         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
8181         _LINKDEMAND.
8182
8183 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
8184
8185         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
8186         instead of a MonoReflectionMethod. The method information wasn't used
8187         when displaying SecurityException details (but will be now).
8188
8189 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
8190
8191         * Makefile.am : windows build fix.
8192
8193 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
8194
8195         * iltests.il: Add new regression test.
8196
8197         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
8198         #72522.
8199
8200 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
8201  
8202         * mini.c: Moved linkdemand check into helper function check_linkdemand
8203         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
8204         LDFTN, LDVIRTFTN).
8205
8206 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
8207
8208         * declsec.c: Added statistics counter for different kinds of 
8209         LinkDemands.
8210         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
8211         (and commented) declaration.
8212         * mini.c: Added statistics counter for security Demand code 
8213         generation. Added display of security statistics.
8214
8215 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
8216
8217         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
8218         Fix compilation errors under gcc-2.95.
8219
8220 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
8221
8222         * mini.c, driver.c: Use the new jit trampoline hashtable
8223
8224 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8225
8226         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
8227
8228 2005-02-11  Martin Baulig  <martin@ximian.com>
8229
8230         * debug-mini.c (mono_debug_close_method): Free the line number array.
8231
8232 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8233
8234         * aot.c: Break up large methods into smaller ones. Share GOT slots for
8235         icalls.
8236
8237         * mini.h: Bump AOT file format version. 
8238
8239 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
8240
8241         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
8242         APTC and P/Invoke.
8243         * declsec.h: Added macros to get/set lazyly initialized security 
8244         informations about assemblies. Added new enum for different type of
8245         possible LinkDemand violation. Added function to check LinkDemands.
8246         * mini.h: Added a field to MonoCompile to hold any security violation
8247         detected when JITting a method (so it can be thrown later).
8248         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
8249         and CEE_CALLVIRT. Added code to throw exception at the end of
8250         mini_method_compile (note: the exception is unhandled right now).
8251
8252 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
8253
8254         * mini.c, jit-icalls.c: use the managed implementation of
8255         memset for initobj and memset, to avoid managed <-> unmanaged
8256         transitions.
8257
8258 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8259
8260         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
8261         optimization if it would need a GOT var.
8262
8263         * basic.cs: Add tests for constant propagation and switch statements.
8264
8265         * ssa.c: Fix out-of-range constant propagation and switch statements.
8266
8267 2005-02-09    <vargaz@freemail.hu>
8268
8269         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
8270
8271 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
8272
8273         * cpu-amd64.md (load_membase): Fix max length of load_membase.
8274
8275 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8276
8277         * mini.c: update to new signature of mono_class_get_allocation_ftn().
8278
8279 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
8280
8281         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
8282         arithmetic operations.
8283
8284 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
8285
8286         * mini-ppc.c: add a workaround for broken user code that
8287         DllImports vararg functions with non-vararg signatures.
8288
8289 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
8290
8291         * mini.c (mono_jit_compile_method_inner): Add detection and a 
8292         meaningfull error message for assemblies written in Managed C++.
8293
8294         * tramp-amd64.c mini-amd64.h: Add support for 
8295         create_trampoline_from_token ().
8296
8297         * aot.c mini-x86.c abcremoval.c: Applied patch from
8298         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
8299
8300 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
8301
8302         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
8303         which takes a MonoImage/token as parameter instead of a MonoMethod.
8304
8305         * aot.c: Use the new trampoline for initializing vtables.
8306
8307         * aot.c: Add support for ldfld/stfld_remote wrappers.
8308
8309         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
8310         rules for compare <MEM>, IMM.
8311
8312         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
8313
8314         * aot.c: Handle inherited finalizers correctly.
8315
8316 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
8317
8318         * inssel.brg (stmt): Add a missing _setup_... ().
8319
8320         * aot.c: Save some parts of the class state to the AOT file and use it
8321         to recompute that state when a class is initialized.
8322
8323         * mini.c: Install AOT hooks into the runtime.
8324
8325         * mini.h: Bump AOT file format version.
8326         
8327         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
8328         Fixes #72148.
8329
8330         * iltests.il: Add new test.
8331
8332 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8333
8334         * mini.c: fix typo.
8335
8336 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
8337
8338         * mini.c: setup the statistical profiler in the thread attach
8339         callback to cope with the new single thread code.
8340
8341 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
8342
8343         * mini-ppc.c: ensure we have enough room for the profiler
8344         calls (fixed bug#72084).
8345
8346 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
8347
8348         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
8349         it.
8350
8351 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8352
8353         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
8354
8355 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8356
8357         * ssapre.c: Fixed an issue with down safety (this allows IronPython
8358         to succesfully execute parrotbench).
8359         * ssapre.h: Likewise.
8360
8361 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8362
8363         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
8364         variable for stores to method arguments (fixes a SSAPRE issue).
8365
8366 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8367
8368         * mini.c: handle value types in dup, fixes gen-112.cs.
8369
8370 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
8371
8372         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
8373         sequence for calls in dynamic methods to avoid thunks.
8374
8375 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
8376
8377         * mini.c: correctly remove dynamic methods from the hashtable.
8378
8379 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8380
8381         * driver.c: Disabled SSAPRE until fix the bug that appears
8382         in IronPython's parrotbench.
8383
8384 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
8385
8386         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
8387
8388         * mini.c (mono_method_to_ir): Revert the previous change.
8389         
8390         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
8391         when AOT compiling.
8392
8393         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
8394         mono_jit_info_table_find () etc. when running under valgrind.
8395
8396         * inssel.brg: Fix warnings.
8397
8398         * mini-exceptions.c: Fix warnings.
8399
8400 2005-01-31  Martin Baulig  <martin@ximian.com>
8401
8402         * driver.c (compile_all_methods_thread_main): Don't try to compile
8403         generic methods or anything which has type parameters.
8404
8405 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
8406
8407         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
8408
8409         * TestDriver.cs: Add --verbose flags.
8410
8411         * graph.c ssa.c: Fix 64 bit warnings.
8412         
8413         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
8414         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
8415         Fix 64 bit warnings.
8416
8417         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
8418         variable not spotted by gcc.
8419         
8420         * mini-amd64.c inssel-amd64.brg: Applied patch from  
8421         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
8422         X86_COMPARE_MEMBASE opcodes.
8423
8424         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
8425
8426 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
8427
8428         * *: MonoMethod->signature might be NULL now. You *MUST* use
8429         mono_method_signature.
8430
8431 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8432
8433         * driver.c (compile_all_methods_thread_main): Compile the methods
8434         without invoking cctors.
8435
8436 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8437
8438         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
8439         * basic-calls.cs: test for the above.
8440
8441 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8442
8443         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
8444         MonoJitInfo changes.
8445
8446 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
8447
8448         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
8449         eagerly if it contains dynamic methods.
8450         
8451         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
8452
8453         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
8454         trace, it is now computed by an icall from trace_ips.
8455         
8456         * mini-exceptions.c: Fix a warning.
8457
8458 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
8459
8460         * mini-exceptions.c: don't bother getting stack trace info if
8461         it's not going to be used.
8462
8463 2005-01-27  Raja R Harinath  <rharinath@novell.com>
8464
8465         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
8466         ssapre-mini-ops.h.
8467
8468 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
8469
8470         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
8471
8472         * aot.c: Avoid calling mono_method_get_header () if not needed.
8473
8474         * mini.h: Bump AOT file format version.
8475         
8476         * mini.c (mono_emit_native_call): Allocate a GOT var here.
8477
8478         * mini.c (mono_print_tree): Print more info for calls.
8479
8480 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
8481
8482         * declsec.h: Remove warning by adding missing include for marshal.h
8483
8484 2005-01-26  Martin Baulig  <martin@ximian.com>
8485
8486         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
8487         `ip' twice.
8488
8489 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
8490
8491         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
8492         flags.
8493
8494         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
8495
8496         * aot.c (mono_compile_assembly): Fix a warning.
8497
8498 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
8499
8500         * declsec.c: Look for security attributes on the original MonoMethod 
8501         (and not the wrapped one). This fix permissions on icalls.
8502
8503 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8504
8505         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8506
8507         * mini.c (mono_allocate_stack_slots): Add a fixme.
8508
8509         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8510
8511 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
8512
8513         * inssel.brg: optimize casts of sealed types (more
8514         optimizations waiting for fixes in remoting).
8515
8516 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8517
8518         * inssel.brg (stmt): Add another dummy rule.
8519
8520         * driver.c: Fix warnings.
8521
8522         * driver.c (mono_main): If running under valgrind, instruct glib to use
8523         the system allocation functions so valgrind can track the memory
8524         allocated by the g_... functions.
8525
8526         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
8527
8528         * mini-ops.h: Add OP_DUMMY_STORE opcode.
8529
8530         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
8531
8532         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
8533         variables in try regions.
8534
8535         * mini.c (mini_method_compile): Don't disable optimizations on large
8536         methods when AOT compiling.
8537
8538         * mini.c (mono_allocate_stack_slots): New arch independent method to 
8539         allocate stack slots. Not yet used.
8540
8541 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
8542
8543         * debug-mini.c (mono_debug_close_method): Plug some leaks.
8544
8545 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
8546
8547         * mini-ppc.c: make the branch info relative as the code
8548         buffer can be reallocated.
8549
8550 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
8551
8552         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
8553         * driver.c: Removed the AOT/security restriction. Now initialize the
8554         security manager (in metadata) if --security is used.
8555         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
8556         rather than the pointer to declarative security, when AOT is used.
8557
8558 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
8559
8560         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
8561         basic blocks, reduced intrinsic exception throwing code size.
8562
8563 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
8564
8565         * driver.c (mini_usage): Reorder the usage screen.
8566
8567 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
8568
8569         * mini.c (mono_resolve_patch_target): Fix warning.
8570
8571 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
8572
8573         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
8574         previous patch.
8575
8576         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8577
8578         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
8579         breaks the amd64 build.
8580
8581         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
8582         register allocation. Fixes #71454.
8583
8584         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8585
8586         * arrays.cs: Add new regression test.   
8587
8588 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8589
8590         * ssapre.c: Turned usage of snprintf to GString.
8591         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
8592         (I left it on by mistake in my previous commit).
8593
8594 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
8595
8596         * mini.c, cfold.c, basic-calls.cs: preserve side effects
8597         on cond branch optimization (fixes bug# 71515).
8598
8599 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8600
8601         * abcremoval.c: Fixed bug 71062.
8602         * abcremoval.h: Likewise.
8603
8604 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8605
8606         * mini.c: Added a new functionality to optimize_branches, the removal
8607         of useless basic blocks, and fixed some problem in the removal of
8608         critical edges; some utility functions added for both purposes.
8609         * ssapre.c: Added complex expression support, and fixed bug 70637.
8610         * ssapre.h: Likewise.
8611         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
8612         enabled in SSAPRE.
8613         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
8614         * driver.c: Re-enabled SSAPRE.
8615
8616 2005-01-19  Martin Baulig  <martin@ximian.com>
8617
8618         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
8619         the result of mono_get_method_constrained().
8620
8621 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
8622
8623         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
8624         manager.
8625
8626 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
8627
8628         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
8629         be detected.  Fixes #59296.
8630
8631 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8632
8633         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
8634         which can happen. Fixes #71361.
8635
8636 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8637
8638         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
8639         manager.
8640
8641 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8642
8643         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
8644         appdomain-unload.exe to fail.
8645         
8646         * mini.c: Fix some memory leaks.
8647
8648 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
8649
8650         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
8651         Fixed bug and sped up some codepaths.
8652
8653 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8654
8655         * mini.c: Fix some memory leaks.
8656
8657         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
8658         conversion.
8659
8660         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
8661
8662         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
8663         #71320.
8664
8665         * iltests.il: Add regression test for #71320.
8666
8667 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
8668
8669         * mini.c (mono_codegen): Fix installation of profiler hooks.
8670
8671         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
8672
8673 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8674
8675         * mini.h, mini.c, cfold.c: optimize access to enum
8676         readonly fields, too. Eval conditional branches if possible
8677         to perform unreachable code removal in more cases.
8678
8679 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
8680
8681         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
8682
8683         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
8684         code manager.
8685
8686         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
8687         WinXP DEP. Fixes #71244.
8688
8689 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
8690
8691         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
8692
8693 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
8694
8695         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
8696
8697 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
8698
8699         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
8700         changes.
8701
8702         * mini.h: Bump AOT version.
8703
8704         * mini.h (MonoCompile): Change exvar to a hash table.
8705
8706         * mini.c: Allocate a separate exvar for each handler block.
8707
8708         * mini.c: Get rid of the computation of filter_lengths, its not needed.
8709
8710         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
8711         ex var with the pending exception and only throw if the two are equal.
8712         Fixes #68552.
8713         
8714         * exceptions.cs: Add tests for rethrow and nested catch clauses.
8715
8716         * mini-x86.c: Fix warnings.
8717
8718         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
8719         used by all the ports now.
8720
8721         * aot.c: Add write-symbols and save-temps options.
8722
8723 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8724
8725         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
8726
8727 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
8728
8729         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
8730         operations.
8731
8732         * tramp-s390.c: Check vtable slot belongs to the domain.
8733
8734         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
8735         as per other platforms.
8736
8737         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
8738
8739 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
8740
8741         * driver.c: we don't run the Main() code in a subthread anymore.
8742
8743 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
8744
8745         * mini.c: added experimental rtc support in the statistical
8746         profiler: if the user has the permission, more accurate statistics
8747         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
8748         The MONO_RTC value must be restricted to what the linux rtc allows:
8749         power of two from 64 to 8192 Hz.
8750
8751 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8752
8753         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
8754
8755 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
8756
8757         * mini-ppc.c: better icache flush for smp.
8758
8759 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
8760
8761         * mini-amd64.c (emit_move_return_value): Fix memory leak.
8762
8763         * mini-x86.c (get_call_info): Add the get_call_info () code from the
8764         amd64 port, not yet used.
8765
8766 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8767
8768         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
8769         a struct type.
8770
8771 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
8772
8773         * driver.c: Added --security option to activate the security manager.
8774         Right now this will allow code generation for declarative demands and
8775         is disabled when AOT is specified.
8776         * mini.c: Add code generation for declarative security demands.
8777         * mini.h: Add mono_use_security_manager as an extern gboolean.
8778
8779 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8780
8781         * aot.c (mono_compile_assembly): Speed up compilation a bit by
8782         emitting more dense assembly code.
8783
8784         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
8785         exception throwing stuff.
8786
8787 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
8788
8789         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
8790         dead code.
8791
8792         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
8793         left in by mistake.
8794
8795         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
8796         fixed.
8797
8798         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
8799
8800         * tramp-*.c: Only patch vtable slots if the object is in the current
8801         domain. Fixes appdomain-unload.exe.
8802
8803         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
8804         
8805         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
8806         x86 branch.
8807
8808 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8809
8810         * mini.c (reverse_branch_op): New helper function.
8811
8812         * mini.c (optimize_branches): Run the new optimization only on 
8813         platforms which support it. Also reverse all kinds of branches.
8814
8815         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
8816
8817         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
8818         a throw statement.
8819
8820         * mini.c (optimize_branches): Reverse not-equals branches if the false
8821         bblock is a throw. This happens a lot of time with argument checking in
8822         corlib.
8823
8824         * mini.c (mono_codegen): Add support for placing basic blocks after
8825         the function epilogue.
8826
8827         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
8828         function epilogue.
8829         
8830 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
8831
8832         * mini.c (setup_stat_profiler): Only set this up if the platform
8833         supports ITIMER_PROF.
8834
8835 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8836
8837         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
8838         previous patch.
8839
8840         * inssel.brg: Fix a warning.
8841
8842 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
8843
8844         * mini.c: added support for statistical profiler 
8845         (run with: --profile=default:stat).
8846
8847 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
8848
8849         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
8850
8851         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
8852
8853         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
8854         related to global registers from the amd64 port.
8855
8856 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
8857
8858         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
8859
8860         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
8861         with global registers.
8862         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
8863
8864         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
8865
8866 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
8867
8868         * debug-mini.c (encode_value): Fix off-by-one.
8869
8870         * aot.c (encode_value): Likewise.
8871
8872         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
8873
8874 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
8875
8876         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
8877         AOT.
8878
8879         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
8880         
8881         * aot.c (emit_method_info): Increase size of temp buffer.
8882
8883         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
8884         the AOT case.
8885
8886 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
8887
8888         * aot.c (emit_method_info): Fix build.
8889         
8890         * aot.c: Further rework of the AOT file format to reduce the size of
8891         the method info data.
8892
8893         * mini.h: Bump AOT file format version.
8894
8895 2004-12-27  Martin Baulig  <martin@ximian.com>
8896
8897         * mini.c (mini_get_method): New static method; call
8898         mono_get_method_full() and mono_get_inflated_method().
8899         (mono_method_to_ir): Use mini_get_method() instead of
8900         mono_get_method_full(). 
8901
8902 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
8903
8904         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
8905
8906 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
8907
8908         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
8909
8910         * inssel-amd64.brg: Add some optimization rules.
8911
8912 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
8913
8914         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
8915         standard not GC'd stuff is fine.
8916
8917 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
8918
8919         * aot.c: Rework the AOT file format to get rid of most of the global
8920         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
8921
8922         * mini.h: Bump AOT file format version.
8923         
8924 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
8925
8926         * mini.h: Bump AOT file format version.
8927
8928         * aot.c (mono_aot_is_got_entry): New function to determine if an 
8929         address is inside a GOT.
8930
8931         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
8932
8933         * cpu-pentium.md: Increase the maximum size of some instructions which
8934         might involve a got access.
8935         
8936         * mini.c (get_method_from_ip): Another debug helper function.
8937
8938         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
8939         when got var accesses are created during the decompose phase.
8940
8941         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
8942
8943         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
8944         argument mini_compile_method and to MonoCompile, and use this to
8945         determine whenever a given method is compiled for AOT. This allows the
8946         other methods compiled during AOT compilation to be free of AOT stuff,
8947         so the backends does not need to add special support for them by
8948         creating a fake GOT etc.
8949
8950         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
8951         longer needed.
8952
8953 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
8954
8955         * mini.c (mono_method_to_ir): It turns out that some of the
8956         x-appdomain wrappers are lax with types, so just ignore this for
8957         all wrappers.
8958
8959         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
8960         at the vtable->klass. If it is non-shared code we can just use the
8961         vtable.
8962
8963 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
8964
8965         * mini-ppc.c: access MonoDomain from tls, too.
8966
8967 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
8968
8969         * declsec.c: Removed unused variable (and related warning ;-)
8970
8971 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
8972
8973         * iltests.il: New test for LDELEMA on an array of ref types.
8974
8975         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
8976         all ldelema's on reftypes.
8977         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
8978         it was the wrong place to put it.
8979
8980         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
8981         register to pop to make this cleaner, at the request of Paolo.
8982
8983 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8984
8985         * mini-ops.h (OP_GETHASHCODE): New op.
8986
8987         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
8988
8989         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
8990         operation.
8991
8992         For a microbenchmark, this reduces the cost of Hashtable.get_Item
8993         by 25%.
8994         
8995         * mini-x86.c (mono_arch_output_basic_block): Rather than
8996
8997         add ebp, 4
8998
8999         Emit
9000
9001         pop edx
9002
9003         The first is 3 bytes while the second is 1. This saves 36 kb on
9004         mscorlib, quite a big saving. When bootstraping mcs, I was able to
9005         see a small boost because of icache locality.
9006
9007         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
9008
9009 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
9010
9011         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
9012         started code sharing with the generic code.
9013
9014 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
9015
9016         * mini-ppc.c, cpu-g4.md: added code for direct access to
9017         tls data slots.
9018
9019 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
9020
9021         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
9022          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
9023         to OP_TLS_GET.
9024
9025 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
9026
9027         * declsec.c|h: Added functions to cache the declarative stack modifiers
9028         in MonoJitInfo and to create a security frame from a MonoJitInfo 
9029         structure.
9030         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
9031         created. Register internal calls for System.Security.SecurityFrame::
9032         _GetSecurityFrame and _GetSecurityStack.
9033         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
9034         the definitions for the new stack walk/callback mechanism.
9035         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
9036         first security frame for LinkDemands and InheritanceDemands) and
9037         GetSecurityStack for Demands. Both use the new mono_walk_stack code
9038         from lupus.
9039         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
9040         walk initialization (lupus).
9041
9042 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
9043
9044         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
9045         idiom.
9046         (handle_loaded_temps): Do not create a temporary variable for
9047         things that we know are temps. They will never be modified.
9048         (mono_spill_call): Set MONO_INST_IS_TEMP
9049         (mono_emulate_opcode): ditto
9050         (emit_tree): ditto
9051         (mono_method_to_ir.CEE_DUP): ditto
9052
9053 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
9054
9055         * mini.c (type_to_eval_stack_type): Make this handle the void type
9056         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
9057         (emit_tree): use ip_in_bb to special case some common idioms
9058         Update all callers to pass in the IP.
9059         (mono_method_to_ir): Make CEE_CALL* do the above as well.
9060
9061         This gives us a nice 2% speedup in mcs bootstrap.
9062
9063         * mini-x86.c (peephole_pass): Peephole pass to make
9064         mov  [foo], eax
9065         push [foo]
9066
9067         into
9068
9069         mov [foo], eax
9070         push eax
9071
9072         * mini.c (ip_in_bb): new method.
9073         (mono_method_to_ir): use this method rather than doing the hash
9074         lookup ourselves.
9075
9076         * linear-scan.c (mono_linear_scan): When expiring actives, you
9077         don't need to keep around variables that expire on this
9078         instruction. This makes it so that:
9079              a = b + 1
9080         will turn into:
9081              store (ebx add (ebx, 1))
9082         which will become
9083              add ebx, 1
9084
9085 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
9086
9087         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
9088         combination to avoid doing two copies. Fix up problems with previous
9089         patch.
9090
9091         * mini.c: Fix 64 bit warnings.
9092
9093         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
9094
9095 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
9096
9097         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
9098         changes from the x86 code.
9099
9100         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
9101
9102 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
9103
9104         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
9105         throwing code to reduce its size, unify the AOT and non-aot code and 
9106         get rid of relocations in the AOT case.
9107
9108         * mini-x86.h mini.c exceptions-x86.c 
9109         (mono_arch_get_throw_corlib_exception): New arch specific function to 
9110         raise corlib exceptions which doesn't require relocations in the 
9111         caller.
9112
9113         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
9114
9115 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
9116
9117         * mini.c (mono_emit_method_call): Only allocate the got var when it is
9118         needed.
9119
9120         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
9121         in the AOT case.
9122
9123 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9124
9125         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
9126         with add function when used from Inc/dec atomic 
9127         functions. Re-enabled optimization on x86.
9128         * mini-ops.h: renamed atomic_add functions to
9129         allow _add to match the Interlocked::Add and
9130         _add_next to match Interlocked::Inc/Dec.
9131
9132 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
9133
9134         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
9135         linking of BBs to the end BB, and enabled SSAPRE also with
9136         consprop and copyprop (which was prevented by that bug).
9137
9138 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9139
9140         * mini-x86.c: disabling the Interlocked optimizing code. 
9141
9142 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
9143
9144         * aot.c (load_aot_module): Move reading of got_addr after the AOT
9145         file version check.
9146         
9147 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9148
9149         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
9150         interlocked optimization due lack of support on x86, rewrote 
9151         exchange to take into account that base may be in eax.
9152         
9153         xsp works again; activated Interlocked optimizing code.
9154         
9155 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
9156
9157         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
9158
9159 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
9160
9161         * mini-ops.h: Add new opcodes.
9162
9163         * mini.h: Add new patch types. Add got_var to MonoCompile.
9164
9165         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
9166         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
9167         make it work with all kinds of patchable code.
9168
9169         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
9170         address of the GOT, and referencing entries in the GOT.
9171
9172         * mini.c: Add code to load the GOT address if needed by an opcode.
9173
9174         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
9175         independent AOT code on the x86 using an elf-style Global Offset Table.
9176
9177 2004-12-14  Raja R Harinath  <rharinath@novell.com>
9178
9179         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
9180
9181 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9182
9183         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
9184         when running xsp.
9185
9186 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
9187
9188         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
9189         of Interlocked:Increment/Decrement/Add as inline ops.
9190         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
9191
9192 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
9193
9194         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
9195         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
9196
9197 2004-12-12  Duncan Mak  <duncan@ximian.com>
9198
9199         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
9200         again. `patch_info->table_size' is no longer valid after Zoltan's
9201         commit #37636.
9202
9203 2004-12-12  Martin Baulig  <martin@ximian.com>
9204
9205         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
9206         if we are the "real" method, ie. not an inlined method inside it.
9207
9208 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
9209
9210         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
9211         before we look in the special fields table. This fixes
9212         ../tests/thread-static-init.cs.
9213
9214 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9215
9216         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
9217         for Array get_Rank and get_Length. Fixes bug #70465.
9218
9219 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
9220
9221         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
9222         separate structure to reduce the size of MonoJumpInfo.
9223
9224 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
9225
9226         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
9227
9228 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
9229
9230         * mini.c (mini_get_inst_for_method): Changed to allow ports
9231         to return a MonoInst instead of opcode 
9232         (renamed mini_get_opcode_for_method to better reflect the new functionality)
9233         
9234         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
9235         Allow ports to return a created MonoInst instead of op-code, will enable
9236         new optimizations.
9237         (renamed mini_get_opcode_for_method to better reflected the functionality)
9238
9239 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
9240
9241         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
9242
9243 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9244
9245         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
9246         Fixes #69985.
9247
9248 2004-12-08  Martin Baulig  <martin@ximian.com>
9249
9250         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
9251         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
9252
9253 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9254
9255         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
9256         correctly.
9257
9258         * exceptions.cs: Disable some tests which depend on properties of x86 fp
9259         arithmetic.
9260
9261 2004-12-08  Raja R Harinath  <rharinath@novell.com>
9262
9263         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
9264
9265 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
9266
9267         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
9268         bug introduced by the previous patch.
9269
9270 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9271
9272         * mini-ppc.c, objectc.cs: handle large structs passed by value
9273         (fixes bug #69972).
9274
9275 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
9276
9277         * mini-ppc.c: OP_ARGLIST implementation from
9278         Geoff Norton  <gnorton@customerdna.com>.
9279
9280 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
9281
9282         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
9283         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
9284
9285 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9286
9287         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
9288
9289 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9290
9291         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
9292         support.
9293
9294 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
9295
9296         * mini-sparc.c: Zero out localled-ed memory.
9297
9298         * iltests.il: Add tests for zeroing out localloc-ed memory.
9299
9300 2004-12-04  Martin Baulig  <martin@ximian.com>
9301
9302         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
9303         mono_method_get_signature_full().       
9304
9305 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
9306
9307         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
9308         and some utility functions (always for SSAPRE), integrated SSAPRE.
9309         * mini.h: Likewise.
9310         * driver.c: Added ssapre option.
9311         * ssa.c: Small fix on OP_ARG handling.
9312         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
9313         * Makefile.am: Likewise.
9314
9315 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
9316
9317         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
9318         now in the xp code.
9319
9320         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
9321         icall.
9322
9323 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9324
9325         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
9326         
9327         * cpu-s390.md : Increase instruction length of oparglist.
9328
9329         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
9330
9331 2004-11-30  Martin Baulig  <martin@ximian.com>
9332
9333         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
9334         virtual generic methods.  We call a special helper_compile_generic_method()
9335         icall to retrieve the method from the vtable, inflate and compile
9336         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
9337
9338         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
9339
9340 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
9341
9342         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
9343
9344 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
9345
9346         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
9347         Fixes #69929.
9348
9349 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
9350
9351         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
9352         platforms with PIC aot.
9353
9354 2004-11-28  Martin Baulig  <martin@ximian.com>
9355
9356         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
9357         Fixes gen-112.cs.
9358
9359 2004-11-28  Martin Baulig  <martin@ximian.com>
9360
9361         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
9362         the result of mono_type_get_underlying_type() to check whether
9363         we're byref.
9364
9365 2004-11-26  Martin Baulig  <martin@ximian.com>
9366
9367         * mini.c
9368         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
9369         in the g_assert().
9370
9371 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
9372
9373         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
9374         the same way as the other arguments so they won't get clobbered.
9375
9376         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
9377         calls through R11 since it is clobbered by the trampoline code.
9378
9379 2004-11-26  Raja R Harinath  <rharinath@novell.com>
9380
9381         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
9382         pick up in-tree mscorlib.dll.
9383
9384 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
9385
9386         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
9387
9388         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
9389         runtime data/code are now stored in a table similar to the GOT in ELF. 
9390         This allows the code itself to be position independent.
9391
9392         * aot.c: Fix loading of referenced assemblies after the lazy assembly
9393         loading changes.
9394
9395         * aot.c: Attach ELF type (object/function) directives to all global
9396         symbols.
9397
9398         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
9399
9400         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
9401
9402         * mini-amd64.h: Turn on PIC AOT code.
9403
9404         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
9405         returning the offset within an OP_AOTCONST instruction where the GOT
9406         offset needs to be added.
9407
9408         * mini.h: Bump AOT file format version.
9409
9410 2004-11-25  Martin Baulig  <martin@ximian.com>
9411
9412         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
9413         uninflated generic methods.
9414
9415 2004-11-25  Martin Baulig  <martin@ximian.com>
9416
9417         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
9418
9419 2004-11-24  Martin Baulig  <martin@ximian.com>
9420
9421         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
9422         original klass (this only applies for generic instances).
9423
9424 2004-11-24  Martin Baulig  <martin@ximian.com>
9425
9426         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
9427         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
9428         that array).
9429
9430 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
9431
9432         * mini.c (mono_method_to_ir): Disable inlining for methods containing
9433         localloc. Fixes #69678.
9434
9435         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
9436         
9437 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
9438
9439         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
9440         used SSE registers on pinvoke calls. Fixes #69774.
9441
9442 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
9443
9444         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
9445         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
9446
9447 2004-11-23  Raja R Harinath  <rharinath@novell.com>
9448
9449         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
9450         Refer directly to the mcs/ tree.
9451
9452 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9453
9454         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
9455         Check if a trampoline for a synchronized method is required. 
9456
9457 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
9458
9459         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
9460         with localloc if needed. Throe arithmetric exception in
9461         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
9462         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
9463
9464 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
9465
9466         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
9467         types before switching on type.  Fixes #69622.
9468
9469 2004-11-19  Raja R Harinath  <rharinath@novell.com>
9470
9471         * Makefile.am (check-local): New.  Integrate into 'make check'.
9472         (MCS,RUNTIME): Define using in-tree mono and mcs.
9473         (ILASM): New.
9474         (%.exe): Use $(ILASM).
9475
9476 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
9477
9478         * mini-ppc.c: adjust initial prolog size (bug #69691).
9479
9480 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
9481
9482         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
9483         #69664.
9484
9485 2004-11-17  Raja R Harinath  <rharinath@novell.com>
9486
9487         * Makefile.am (clean-local): Rename from 'clean'.
9488
9489 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9490
9491         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
9492         to mono_arch_is_int_overflow. 
9493         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
9494         SIGFPE events.
9495
9496 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
9497
9498         * declsec.c|h: New files to support declarative security attributes.
9499         Added function to check if a method has (applicable) security.
9500         * mini.c|h: Add check for declarative security attributes in
9501         mono_method_check_inlining.
9502         * Makefile.am: Added declsec.c and declsec.h to the build.
9503
9504 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
9505
9506         * mini.c, mini.h: update to keep dynamic code info per-domain.
9507
9508 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
9509
9510         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
9511         (mini_init): Get rid of it from here too.
9512
9513 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
9514
9515         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
9516         implemented OP_RETHROW (patch by Geoff Norton
9517         <gnorton@customerdna.com>).
9518
9519 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
9520
9521         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
9522         between appdomains.  Fixes appdomain-unload on PPC.
9523
9524 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
9525
9526         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9527         mini-exceptions.c: handle the new wrapper types.
9528         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
9529         token value as a MonoClass* when compiling a wrapper.
9530         mono_jit_create_remoting_trampoline now takes an additional
9531         MonoRemotingTarget parameter.
9532         
9533 2004-11-10  Martin Baulig  <martin@localhost>
9534
9535         * mini.c (mono_method_to_ir): Use `generic_container->context'
9536         rather than creating a new one.
9537
9538 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9539
9540         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
9541
9542         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
9543
9544 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
9545
9546         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
9547         the experimental aot cache stuff.
9548
9549 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
9550
9551         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9552         mini-exceptions.c: update to exception clause structure changes.
9553
9554 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9555
9556         * exceptions-x86.c (throw_exception): Fix warnings.
9557
9558         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
9559         for OP_RETHROW.
9560
9561 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9562
9563         * exceptions-sparc.c (get_throw_exception): Really fix this.
9564
9565 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
9566
9567         * tramp-*.c: we no longer support icalls without wrappers, so
9568         a bit of code can be removed here
9569
9570 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
9571
9572         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
9573         patch.
9574
9575         * cpu-sparc.md: Add op_rethrow.
9576
9577         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
9578
9579         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
9580
9581         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
9582         * mini-ops.h: Add OP_RETHROW.
9583
9584         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
9585
9586         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
9587
9588 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
9589         
9590         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
9591         Makes the output much easier to read
9592
9593 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
9594
9595         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
9596         prevents another huge leak when compiling with ssa. Secondly, the
9597         performance of doing this rather than freeing the lists is much
9598         better. GList does a lock every time you allocate a list link,
9599         so that it can use a memory pool. So, it is better to just use
9600         a memory pool of our own.
9601         
9602         * ssa.c, linear-scan.c: replace g_list_remove_link with
9603         g_list_delete.  The remove one does not free the GList, so we were
9604         leaking memory. On -O=all --compile-all with corlib, this cut down
9605         3 MB of allocations.
9606
9607 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
9608
9609         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
9610
9611         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
9612
9613         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
9614         into a new function mono_create_jit_trampoline ().
9615
9616 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
9617
9618         * trace.c (get_spec): Allow tracing of classes without a namespace.
9619
9620 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
9621
9622         * mini.c: Fix pointer overwrite in mini_method_compile.
9623
9624 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
9625
9626         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
9627         The darwin ABI needs some special handling for 1 and 2 byte structs
9628         Lets use lbz/lhz instead of lwz everywhere.
9629         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
9630         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
9631         Use stb/sth for the former, and put the latter always on stack instead of in
9632         argument registers.
9633
9634 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
9635
9636         * trace.c (is_filenamechar): Add '_'.
9637
9638 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
9639
9640         * mini-s390.c: Fix prolog length to allow for large trace requirements.
9641
9642         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
9643
9644 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
9645
9646         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
9647         depends on libmonogc. Fixes #68805.
9648
9649 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
9650
9651         * mini.c (mono_jit_free_method): Provide extra information for
9652         this error.  Currently this leaks, but will be turned into a
9653         developer option in the future.
9654
9655 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
9656
9657         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
9658
9659 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
9660
9661         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
9662         boundary. Fixes reading of PATCH_INFO_R4 and R8.
9663         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
9664
9665 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
9666
9667         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
9668         trampolines for AOT code.
9669
9670 2004-10-22    <vargaz@freemail.hu>
9671
9672         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
9673         constructed types. Fixes #68136.
9674
9675 2004-10-21  Martin Baulig  <martin@ximian.com>
9676
9677         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
9678         if it returns true, unwind the stack to the call instruction.
9679
9680 2004-10-21    <vargaz@freemail.hu>
9681
9682         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
9683
9684         * mini.h: Bump AOT version number.
9685
9686         * objects.cs: Add another test for unbox trampolines.
9687
9688         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
9689         valuetype methods.
9690
9691 2004-10-20    <vargaz@freemail.hu>
9692
9693         * driver.c: Add SHARED to the set of optimizations tested.
9694
9695         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
9696
9697         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
9698         used by CEE_NEWARR.
9699
9700         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
9701
9702 2004-10-20  Martin Baulig  <martin@ximian.com>
9703
9704         * mini-exceptions.c (mono_handle_exception): Call
9705         mono_debugger_handle_exception() to tell the debugger about
9706         catch/finally clauses.
9707
9708 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
9709
9710         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
9711
9712         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
9713         #68447.
9714
9715 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
9716
9717         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
9718         methods as their native size, fixed bug #57543, #57545.
9719         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
9720         This saves a temporary register and mullw call down into 1 (minor perf
9721         increase for cases like sum = sum * 5;  This use to translate into:
9722             li r11,5
9723             mullw r28,r28,r11
9724         It now translates to
9725             mulli r28,r28,5
9726
9727 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
9728
9729         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
9730         #68388.
9731
9732 2004-10-11  Martin Baulig  <martin@ximian.com>
9733
9734         * mini.c (mono_method_to_ir): If we're a generic method, get the
9735         MonoGenericContainer from our MonoMethodNormal and create a
9736         MonoGenericContext from it.
9737
9738 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
9739
9740         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
9741
9742         * basic-long.cs: Add test for checked i8->i2 cast.
9743
9744 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9745
9746         * inssel-ppc.brg: added a couple of speedup rules.
9747
9748 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
9749
9750         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
9751         to speed up rebuilds.
9752
9753 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9754
9755         * mini-s390.c: Minor fix to OP_OR_IMM.
9756
9757 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
9758
9759         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
9760         better. Fixes appdomain-unload.exe on sparc.
9761
9762 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
9763
9764         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
9765         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
9766         see bug 67324.
9767
9768 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
9769
9770         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
9771
9772 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
9773
9774         * mini.c: Always generate a field read/write wrapper for members
9775         of the class MarshalByRefObject since the actual instance could
9776         be a CBO.
9777
9778 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
9779
9780         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
9781
9782 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
9783
9784         * driver.c mini.h trace.c: Move the setting of the main assembly into
9785         a separate function called mono_trace_set_assembly () and call it after
9786         actually loading the main assembly. Fixes #66872.
9787
9788 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
9789
9790         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
9791         using the code manager.
9792
9793 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
9794
9795         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
9796
9797 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
9798
9799         * cpu-amd64.md: Fix bug in previous patch.
9800         
9801         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
9802         #66650.
9803
9804 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
9805
9806         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9807         mini-exceptions.c: updates for changed stack walk interface.
9808
9809 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9810
9811         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
9812
9813 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
9814
9815         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
9816
9817 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
9818
9819         * driver.c (mini_regression_list): Do not call mono_assembly_close 
9820         since assemblies can't be unloaded.
9821         
9822 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9823
9824         * cpu-amd64.md: Fix more instruction lengths.
9825
9826         * cpu-amd64.md: Fix lengths of some instructions.
9827
9828 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
9829
9830         * inssel.brg: Make the array ldelema check aot friendly.
9831
9832 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9833
9834         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
9835
9836         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
9837
9838 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
9839
9840         * mini-x86.c: Fix build.
9841
9842         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
9843         mono_type_get_underlying_type () helper function to simplify code.
9844         
9845 2004-09-09  Martin Baulig  <martin@ximian.com>
9846
9847         * mini-amd64.c: Don't access `type->data.klass' directly, call
9848         mono_class_from_mono_type() instead since the type may be a
9849         generic instance.
9850
9851 2004-09-09  Martin Baulig  <martin@ximian.com>
9852
9853         * mini-amd64.c (get_call_info): Fix support for generic instances.
9854         (add_valuetype): Use mono_class_from_mono_type() to get the class
9855         since we can be a generic instance.
9856
9857 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
9858
9859         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
9860
9861 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
9862
9863         * liveness.c: reset spill costs on each scan: bug 62107
9864
9865 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
9866
9867         * exceptions-sparc.c (mono_arch_find_jit_info): remove
9868         unnecessary line that doesn't compile
9869
9870 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
9871
9872         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
9873         trampolines, make them call an error function so people can fix their
9874         code.
9875
9876 2004-09-06  Martin Baulig  <martin@ximian.com>
9877
9878         * mini.c (mono_method_to_ir): When initializing locals, handle a
9879         generic instances like a valuetype if it's a valuetype and like a
9880         class if it's a class.
9881
9882 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9883
9884         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
9885         stack. Fixes #64674.
9886
9887         * exceptions.cs: Add test for unwinding of call arguments.
9888
9889 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
9890
9891         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
9892         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
9893         set the carry/borrow flag). The sparc and s390 implementations
9894         can now use optimized versions (and simplify the code). ppc bugfixes.
9895
9896 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9897
9898         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
9899
9900 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
9901
9902         * inssel-amd64.brg: Remove leftover 32 bit rule.
9903
9904         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
9905
9906 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
9907
9908         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
9909         mono_arch_find_jit_info functions into a new function. Fix a memory
9910         leak.
9911
9912         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
9913         refactored code.
9914         
9915 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9916
9917         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
9918         as well.
9919         
9920         * exceptions.cs: Add array size tests.
9921
9922         * mini.c: Allocate a separate icall wrapper for each arity of 
9923         mono_array_new_va. Fixes #59509.
9924
9925         * exceptions.cs: Add testcase for 64578.
9926
9927         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
9928
9929         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
9930         
9931 2004-09-02  Martin Baulig  <martin@ximian.com>
9932
9933         * mini.c (mono_method_to_ir): When initializing the locals, call
9934         handle_initobj() on the generic instance itself, not its
9935         underlying type.
9936
9937 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9938
9939         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
9940         MonoJitInfo for dynamic methods.
9941
9942         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
9943
9944         * mini.c: Add support for freeing JIT data for dynamic methods.
9945         
9946 2004-09-01  Martin Baulig  <martin@ximian.com>
9947
9948         * mini-x86.c (is_regsize_var): Added support for generic
9949         instances.
9950         (mono_arch_emit_prolog): Make this compile again, use
9951         `x86_push_imm_template (code)'.
9952
9953 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
9954
9955         * mini-x86.c: make all push_imm instructions that get
9956         patched always emit the long form
9957
9958 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
9959
9960         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
9961         in a per-domain hash.
9962
9963         * mini-amd64.c (merge_argument_class_from_type): Handle generic
9964         types.
9965
9966 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
9967
9968         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
9969         work.
9970         
9971         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
9972         work.
9973
9974         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
9975         Beginnings of SSE2 support.
9976
9977         * exceptions.cs: Add more tests for checked int<->uint casts.
9978
9979 2004-08-28  Martin Baulig  <martin@ximian.com>
9980
9981         * mini-x86.c (mono_arch_instrument_epilog): Added support for
9982         generic instances.
9983
9984         * mini.c
9985         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
9986         Handle generic instances recursively.
9987
9988 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9989
9990         * iltests.il: test for conv.u8 on a constant
9991
9992 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9993
9994         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
9995         LCONV_x4 (shrun_32 (membase)).
9996
9997 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
9998
9999         * inssel-x86.brg: c&p rules for push/setret of long
10000
10001 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
10002
10003         * inssel-x86.brg: c&p rules for compare (base, regvar) and
10004         compare (regvar, base)
10005
10006         * inssel-x86.brg: more burg love
10007
10008         * inssel.brg: more cleanup
10009
10010         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
10011
10012 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
10013
10014         * basic-long.cs, basic-calls.cs: new tests for optimization.
10015
10016 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
10017
10018         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
10019         patch.
10020
10021 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
10022
10023         * mini-amd64.c (read_tls_offset_from_method): Add another case.
10024         
10025 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
10026
10027         * inssel.brg (mini_emit_memcpy): use 
10028         NO_UNALIGNED_ACCESS to disable memcpy optimization
10029
10030 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
10031
10032         * mini-amd64.c: Handle generic types in various places.
10033
10034         * mini.c (mono_method_to_ir): Handle generic types in init locals.
10035
10036 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
10037
10038         * mini.c (handle_box): Fix warning.
10039
10040         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
10041
10042         * mini-amd64.h: Enable the emit_state optimization.
10043
10044         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
10045
10046         * mini-amd64.c: Add some new 64 bit peephole opts.
10047
10048         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
10049
10050         * cpu-amd64.md: sreg1 of div instructions must be %rax.
10051
10052         * mini-amd64.c: Register allocator fixes.
10053
10054         * mini.c: Add an optimization to emit_state to avoid allocation of new
10055         registers on some platforms.
10056
10057 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
10058
10059         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
10060
10061         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
10062         allocation. Fixes #63085.
10063
10064         * basic-long.cs: Add new regression test.
10065
10066         * mini-amd64.c: Register allocator improvements.
10067
10068 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
10069
10070         * mini-amd64.c (read_tls_offset_from_method): Add another code
10071         sequence.
10072
10073         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
10074         instruction sequence for nullifying class init trampolines.
10075
10076         * objects.cs: Add new regalloc test.
10077
10078         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
10079
10080 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
10081
10082         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
10083         
10084         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
10085         arguments.
10086
10087         * driver.c: Fix profiling after TLS changes.
10088         
10089         * driver.c (mono_main): Set mono_stats.enabled if needed.
10090
10091         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
10092         CEE_BOX.
10093
10094 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
10095
10096         * mini-x86.c: use a 1 op rather than a 2 op tls access
10097         instruction -> faster.
10098
10099 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
10100
10101         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
10102         x86 backend.
10103
10104 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
10105
10106         * exceptions-sparc.c (throw_exception): fix typo
10107
10108 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
10109
10110         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
10111         set tree->dreg correctly with tls. Allow any
10112         register to be used.
10113
10114         * mini-x86.c (read_tls_offset_from_method): add new code
10115         generation pattern seen with GCC.
10116
10117
10118 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
10119
10120         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
10121         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10122         exceptions-sparc.c: fix some performance issues in exception
10123         handling and setting of the stack trace for exceptions that were
10124         already thrown.
10125
10126 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
10127
10128         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
10129         x86 backend.
10130         
10131         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
10132         registers.
10133
10134 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
10135
10136         This patch inlines tls access, when possible.
10137         
10138         * mini.h: new arch functions for TLS intrinsics.
10139         All platforms updated with a stub.
10140
10141         * mini.c: use the new intrinsics
10142
10143         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
10144         arch specific intrinsic for tls variables
10145
10146 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
10147
10148         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
10149         under windows.
10150
10151 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10152
10153         * mini.c: thread local allocation
10154
10155 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
10156
10157         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
10158
10159         * Makefile.am: Link against the static version of libmonogc.
10160         
10161         * Makefile.am: Link the static versions of the convenience libraries
10162         into the mono executable.
10163
10164         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
10165
10166 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
10167
10168         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
10169         on integer overflow.
10170
10171         * mini-amd64.c: Reorganize function call code.
10172
10173         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
10174
10175 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10176
10177         * inssel-x86.brg: use xor eax,eax.
10178         
10179         * basic.cs: new tests
10180
10181 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10182
10183         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
10184         in exception throwing code.
10185         
10186 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10187
10188         * inssel-x86.brg: use xor esi,esi.
10189
10190 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10191
10192         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
10193         can trace methods compiled during mini_init () too.
10194
10195         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
10196         CEE_CONV_U4.
10197
10198 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10199
10200         * Makefile.am: static link on x86 (r=zoltan)
10201
10202 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10203
10204         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
10205         code since it causes some programs to fail.
10206
10207 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
10208
10209         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
10210
10211 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10212
10213         * mini.c: ovfops_op_map - add STACK_OBJ case for
10214         CONV_I 
10215         * basic.cs: add test_0_pin_string as test
10216         case for above.
10217
10218 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10219
10220         * Makefile.am: build C# if srcdir != builddir
10221
10222 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10223
10224         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
10225         fall-through blocks.
10226
10227 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10228
10229         * driver.c: enable loop by default again and include abcrem in -O=all.
10230
10231 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
10232
10233         * iltests.il: Add some localloc tests.
10234
10235         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
10236
10237         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
10238         Fixes #62574.
10239
10240         * inssel-amd64.brg: Add some optimizations.
10241
10242         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
10243         for gcc-3.4.
10244
10245         * Makefile.am: Statically link mono against libmono on AMD64.
10246         
10247         * mini-amd64.c inssel-amd64.brg: Optimizations.
10248
10249 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
10250
10251         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
10252
10253         * tramp-amd64.c: Patch calling code in trampolines.
10254
10255 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
10256
10257         * mini-amd64.c: pinvoke struct passing fixes.
10258
10259 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
10260
10261         * mini-sparc.c: redo change, make mono_arch_cpu_init call
10262         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
10263
10264 2004-08-05  Duncan Mak  <duncan@ximian.com>
10265
10266         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
10267         CEE_LDELEM_ANY.
10268
10269 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10270
10271         * mini-amd64.c (emit_move_return_value): Move return value for normal
10272         calls too.
10273
10274 2004-08-05  Martin Baulig  <martin@ximian.com>
10275
10276         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
10277         `type->type'; just modify `type' itself when dealing with enums
10278         and generic instances.
10279         (check_call_signature): Make `simple_type' a `MonoType *'.
10280
10281 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10282
10283         * mini.c: Use OP_PADD to add offsets to addresses.
10284
10285         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
10286
10287 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
10288
10289         * mini-sparc.c (mono_arch_emit_epilog): fix check
10290         for folding last op into restore instruction
10291
10292 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10293
10294         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
10295         helper methods using the code manager.
10296         
10297         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
10298
10299         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
10300
10301 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10302         
10303         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
10304           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
10305
10306         * mini-s390.c: fix tail processing
10307
10308 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
10309
10310         * mini-ppc.c: mul.ovf.un exception name fix.
10311
10312 2004-08-03  Martin Baulig  <martin@ximian.com>
10313
10314         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
10315         instances; before jumping to `handle_enum', also modify `ptype'.
10316
10317 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
10318
10319         * cpu-sparc.md: fcall maximal length too small.
10320
10321 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
10322
10323         * mini-amd64.c mini.h: Add initial support for passing/returning 
10324         structures to/from pinvoked methods.
10325
10326 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
10327
10328         * mini-ppc.c: reg allocator fix.
10329
10330 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
10331
10332         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
10333
10334         * inssel.brg: Optimize memset on 64 bit machines.
10335
10336         * mini-amd64.c: Fix some vararg cases.
10337
10338 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10339
10340         * mini-s390.c: Corrected macro in emit_float_to_int
10341
10342         * s390-abi.cs: Tests to exercise the s390 ABI
10343
10344 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10345
10346         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
10347         caller saved regs.
10348
10349         * basic.cs: Add a test for add.ovf.un.
10350
10351 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
10352
10353         * mini-sparc.c: add case for OP_IDIV_UN
10354
10355 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10356
10357         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
10358         
10359         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
10360
10361 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
10362
10363         * basic.cs: regression tests.
10364
10365         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
10366         regressions.
10367
10368 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10369
10370         * basic.cs: Add a new test.
10371
10372         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
10373         and AOT. Various fixes and optimizations.
10374
10375         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
10376
10377 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10378
10379         * mini-ppc.c: make sure temp regs are not used for global reg
10380         allocation.
10381
10382 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
10383
10384         * cpu-sparc.md: conv_i8 fix for 64bits
10385
10386         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
10387
10388 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
10389         
10390         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
10391         add opcode for cmp BYTE PTR [eax], imm.
10392
10393         * inssel.brg: Make memcpy and memset takes bases.
10394
10395 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10396
10397         * *-amd64.*: More AMD64 work.
10398         
10399 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10400
10401         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
10402         add a compare-not-equal opcode.
10403         
10404 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
10405
10406         * mini.c: Use mono_init_from_assembly instead of mono_init.
10407         
10408 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10409
10410         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
10411
10412         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
10413
10414         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
10415
10416         * inssel.brg: 64 bit fixes.
10417
10418         * mini.h (MonoCallInst): Add some AMD64 specific data.
10419
10420         * mini.h: Add some OP_P opcodes.
10421
10422 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10423
10424         * basic.cs: tests for 61797 and 61740
10425
10426 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10427
10428         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
10429         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
10430
10431 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
10432
10433         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
10434
10435         * *-amd64*.*: Ongoing AMD64 work.
10436
10437 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
10438
10439         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
10440
10441         * *-amd64*: Ongoing AMD64 work.
10442
10443         * mini-arch.h: Add AMD64 support.
10444
10445         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
10446
10447         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
10448
10449         * mini-ops.h: Add new opcodes.
10450
10451         * Makefile.am: Add AMD64 support.
10452
10453         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
10454         rules into the inssel-long*.brg files.
10455
10456         * *-amd64.*: Add beginnings of AMD64 backend.
10457
10458 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
10459
10460         * mini.c (print_dfn): commenting out the code that prints
10461         the cil. With -O=deadce, this makes -v -v crash.
10462         
10463         * cpu-pentium.md: make checkthis have a length of 2
10464
10465 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
10466
10467         * mini-sparc.h: fix implementations of __builtin
10468         functions for Sun compiler for V9.
10469
10470 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
10471
10472         * mini.c: use the new stelem.ref wrapper
10473         * exceptions.cs, arrays.cs: new stelem.ref tests
10474
10475 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10476
10477         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
10478         new XSP should work with these changes).
10479
10480 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
10481         
10482         * inssel-{long32,x86,}.brg: trivial optimizations.
10483         
10484 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
10485
10486         * mini.c: load value when emitting box operation in
10487         constrained calls.
10488
10489 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
10490
10491         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
10492         is one byte shorter than cmp DWORD PTR [eax], 0.
10493
10494 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10495
10496         * inssel-ppc.brg: arguments on the stack are always
10497         relative to the stack pointer (spotted by Neale Ferguson).
10498
10499 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10500
10501         * exceptions-x86.c: delay appending the method name to the trace until
10502         after mono_jit_info_table_find is called, as this gets the real
10503         MonoMethod.
10504
10505 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
10506
10507         * aot.c: register roots
10508
10509 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10510
10511         * aot.c : I could just use PLATFORM_WIN32 flag.
10512
10513 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10514
10515         * aot.c : Reverting the previous fix. This time it broke linux build.
10516
10517 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10518
10519         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
10520
10521 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
10522
10523         * mini.c (handle_stack_args): Remove some more debugging code.
10524         
10525         * mini.c (handle_stack_args): Remove debug output left in by mistake.
10526
10527         * driver.c mini.h aot.c: Allow additional options to be specified with
10528         --aot and pass them to mono_compile_assembly.
10529
10530         * aot.c: Add experimental code to AOT compile all loaded assemblies
10531         on demand and save the code into a cache in the filesystem.
10532
10533         * aot.c: Add support for more wrapper methods.
10534         
10535         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
10536         58863.
10537
10538         * cpu-*.md: Remove removed opcodes.
10539
10540         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
10541         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
10542         related icalls to marshal.c.
10543
10544 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
10545
10546         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
10547
10548         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
10549
10550         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
10551
10552 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
10553         * liveness.c: If liveness is recomputated we need to reset the information
10554         for each variable. This way, if the liveness range has been narrowed
10555         by optimizations that happened after the last computation, we can return
10556         a smaller range.
10557         
10558         For example, if you have
10559         
10560         {
10561                 int i = 0;
10562                 
10563                 // Tons of code that does not affect i
10564                 
10565                 i = foo ();
10566                 ...
10567         }
10568         
10569         i = 0 is dead code and will be removed by SSA. However, when
10570         linear scan gets to the code, i will still appear to be live
10571         throughout the entire block. This prevents good register allocation.
10572
10573 2004-07-06  Martin Baulig  <martin@ximian.com>
10574
10575         * debug-mini.c (mono_debug_init_method): Allow
10576         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
10577         (mono_debug_add_icall_wrapper): New method.
10578
10579         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
10580
10581 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
10582
10583         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
10584         optimization.
10585
10586 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
10587
10588         * aot.c (mono_aot_load_method): Fix loading of debug info.
10589
10590 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10591
10592         * aot.c: Add logging support.
10593
10594 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10595
10596         * mini.h: Add prototype for mono_print_method_from_ip.
10597
10598         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
10599
10600         * inssel.brg: 64 bit fixes.
10601
10602         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
10603         inssel-long32.brg.
10604
10605         * Makefile.am: Add SPARC64 support.
10606
10607 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10608
10609         * aot.c: Fix alignment problems on 32 bit platforms.
10610
10611 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10612
10613         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
10614         SPARC64.
10615
10616         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
10617         problems.
10618
10619         * mini.h: Bump AOT file version. Some 64 bit fixes.
10620
10621 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10622
10623         * inssel-sparc.brg: Add new rule to avoid register moves.
10624
10625         * inssel.brg: Add ldind_to_load_membase helper function.
10626
10627 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
10628
10629         * mini.c: OffsetToStringData intrinsic.
10630         
10631 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10632
10633         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
10634
10635         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
10636         regression tests.
10637
10638         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
10639 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
10640
10641         * mini.c: reinstated mono_compile_get_interface_var()
10642         on x86, too, since the change breaks the Gtk# build there as well.
10643
10644 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10645
10646         * driver.c: remove loop from the default optimizations: it seems to
10647         interact badly with some of the other options (see bug #60613).
10648
10649 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
10650
10651         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
10652         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
10653
10654 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
10655
10656         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
10657         vararg-using methods.
10658
10659 2004-06-21  Martin Baulig  <martin@ximian.com>
10660
10661         * mini/mini-exceptions.c
10662         (mono_handle_exception): Added `gpointer original_ip' argument.
10663         After calling mono_unhandled_exception(), call
10664         mono_debugger_unhandled_exception() and if that returns true,
10665         restore the context and return.
10666
10667 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10668
10669         * mini-ppc.c: prefer the use of relative branches so
10670         they won't need to be patched in aot code (patch from Patrick Beard).
10671
10672 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10673
10674         * aot.c: patch from Patrick Beard to make the output assembly
10675         more correct for the MacOSX assembler. Small tweak to
10676         generate sane images on Linux/PPC, too.
10677
10678 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10679
10680         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
10681         case until bug #59509 is fixed (shows up in #60332).
10682
10683 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10684
10685         * mini.c: make sure the needed wrappers are compiled, too, with
10686         precomp.
10687
10688 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
10689
10690         * driver.c: remove NPTL reference in --version output.
10691
10692 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10693
10694         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
10695         generate valid assembly for the Mach-O assembler.
10696
10697 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10698
10699         * driver.c: don't include abcrem in the all optimization specifier
10700         since it slows down jit compilation too much for now.
10701
10702 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
10703
10704         * mini.c: use BIGMUL only if both operands have the same signage.
10705         * iltests.il: Test for bug 60056. (errors related to signage in
10706         BIGMUL).
10707
10708         r=lupus.
10709
10710 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
10711
10712         * mini.c, aot.c: memory leak fixes.
10713
10714 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10715
10716         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
10717
10718 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
10719
10720         * Makefile.am: remove the -static hack completely, it links in
10721         statically glib as well.
10722
10723 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
10724
10725         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
10726         * exceptions.cs: make it compile with new mcs/csc.
10727
10728 2004-06-03 Massimiliano Mantione <massi@ximian.com>
10729         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
10730         and added relevant test case.
10731
10732 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10733
10734         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
10735         regressions in gtk-sharp.
10736
10737 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
10738
10739         * exceptions.cs: New regression tests.
10740
10741         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
10742
10743 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
10744
10745         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
10746
10747 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
10748
10749         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
10750
10751         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
10752
10753 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
10754
10755         * mini.c (mono_jit_runtime_invoke): Init class in this
10756         method instead of trusting mono_jit_compile_method to
10757         do the work (because wrappers can be in object class)
10758
10759 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
10760
10761         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
10762
10763         * basic-long.cs: New regression test.
10764
10765 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
10766
10767         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
10768         and div/rem checks.
10769
10770 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
10771
10772         * Makefile.am: fix miguel's change to build mono statically against
10773         libmono (track build dependencies).
10774
10775 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10776
10777         * cfold.c: Some glib versions do not have G_MININT32.
10778
10779 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
10780
10781         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
10782         with precision of tan, atan, sin and cos, and implemented related
10783         regressions tests (fixes bug 54467, but one new problem appeared and
10784         is not fixed yet).
10785
10786 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10787
10788         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
10789
10790         * exceptions.cs: Add test for constant folding && division by zero.
10791
10792         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
10793         since driver.c is in libmono too, so the optimization was useless.
10794
10795         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
10796         variable to driver.c so the compiler can emit more efficient code to
10797         access them.
10798
10799 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10800
10801         * Makefile.am: don't distribute generated inssel.[ch] files.
10802
10803 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
10804
10805         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
10806         into the default appdomain. Fixes #58707.
10807
10808         * jit-icalls.c: Remove the broken approximation for truncl, doing
10809         no conversion is better.
10810
10811         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
10812         Fixes #58863.
10813
10814 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
10815
10816         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
10817         of the mcrxr instruction which is not available on some processors
10818         even if it's documented to be. Implement add and sub overflow correctly
10819         (still not complete for long unsigned). Speed up icalls a bit.
10820
10821 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
10822
10823         * mini.c (mono_jit_compile_method_with_opt): Make sure that
10824         we run .cctor in the current domain instead of target_domain.
10825         
10826         Fixes bug #58558, .cctor not being called in -O=shared.
10827
10828 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10829
10830         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
10831
10832 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
10833
10834         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
10835         which can be done with an imm8, do it that way.
10836         (mono_arch_output_basic_block): ditto for a jmp
10837         (mono_arch_emit_prolog): Computate maximum offset of a label.
10838
10839 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
10840
10841         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
10842         now tries to allocate prefered physical reg's for virtual
10843         regs. This reduces the number of emited spills/loads with
10844         20-30% on our core assemblies.
10845
10846 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10847
10848         * jit-icalls.c: truncl() is not needed and trunc() is
10849         the correct thing to do anyway (bug #58287).
10850
10851 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
10852
10853         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
10854         if available.
10855
10856 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10857
10858         * driver.c: enable loop optimizations by default.
10859
10860 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10861
10862         * mini-x86.c: fix calc of max loop size when aligning loops start.
10863
10864 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
10865
10866         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
10867         the stack.
10868
10869 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
10870
10871         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
10872         should set carry.
10873
10874         * basic-long.cs: Add tests for add/subtract of immediates with carry.
10875
10876         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
10877         
10878         * mini.c (inline_method): Allways inline some wrappers even if the cost
10879         is too large. Fixes #58785.
10880
10881         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
10882         
10883 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
10884
10885         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
10886         (crichton@gimp.org). Beginning of support for sparc/linux.
10887
10888         * mini-sparc.c: Optimize retrieval of LMF address.
10889
10890 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
10891
10892         * exceptions-ppc.c:  handle alloca in methods with clauses.
10893
10894 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
10895
10896         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
10897
10898 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
10899
10900         * mini.c: Delegate most of the abort signal work to 
10901           mono_thread_request_interruption, which also handles Stop and Suspend
10902           states.
10903
10904 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
10905
10906         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
10907         supports the save/restore lmf opcodes.
10908
10909 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
10910
10911         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
10912         by gcc-3.4 as well.
10913
10914         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
10915
10916 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10917
10918         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
10919         methods which contain array accesses.
10920
10921         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
10922         boundaries. Fixes #58537.
10923
10924         * iltests.il: Add regression test for #58537.
10925
10926 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10927
10928         * mini-x86.c (mono_arch_local_regalloc): Last part of
10929         fix for bug #58633 (releasing register to early).
10930
10931 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
10932
10933         * basic-long.cs: Add new regression test.
10934
10935 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10936
10937         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
10938         register too early on the chain.
10939
10940 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10941
10942         * mini.c (create_helper_signature): Use a helper function to reduce
10943         the code which needs to be written. Also set the calling convention of
10944         icalls on windows. Fixes #57840.
10945
10946 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10947
10948         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
10949         exceptions-ppc.c: added helper function to get the instruction address
10950         from a signal handler context.
10951
10952 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10953
10954         * helpers.c: use g_get_tmp_dir. Invokes happyness 
10955         from gonzalo.
10956
10957 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10958
10959         * helpers.c: Add new env variable to pass args to objdump.
10960         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
10961
10962 2004-05-17  Radek Doulik  <rodo@ximian.com>
10963
10964         * Makefile.am (common_sources): added abcremoval.h so it get
10965         disted and daily mono packages on go-mono.com will build again
10966
10967 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
10968
10969         * abcremoval.c: Fixed coding style, added copyright header.
10970
10971         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
10972
10973         * mini.h: Added prototype for abc removal main function.
10974
10975         * build_relations_propagation_table.pl: Added copyright header.
10976
10977 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
10978
10979         * basic-long.cs: reg test for complex ceq_long bug.
10980
10981 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
10982
10983         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
10984         reg in long and clob case (bug #58343). Fixed/added comments.
10985
10986 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
10987
10988         * mini.c (mono_jit_runtime_invoke): Follow new convention
10989         of calling the invoke method with an function pointer.
10990
10991 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
10992
10993         * ChangeLog: Fix author of memory leak patch.
10994
10995 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
10996
10997         * Makefile.am: fix make dist as well...
10998
10999
11000 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
11001
11002         * cfold.c: Made so that conversions from pointer to int4 are no-ops
11003         on archs where pointers are 4 bytes long.
11004
11005         * Makefile.am: Added abcremoval.c source file.
11006
11007         * abcremoval.c: Added abcremoval.c.
11008
11009         * abcremoval.h: Added abcremoval.h.
11010
11011         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
11012
11013         * inssel.brg: Enabled bounds check removal.
11014
11015         * mini.c: Added support for abcrem optimization.
11016
11017         * mini.h: Added abcrem optimization label.
11018
11019         * driver.c: Added support for abcrem optimization.
11020
11021         * propagated_relations_table.def: Added propagated_relations_table.def.
11022
11023 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
11024
11025         * mini.c, cfold.c: fix style.
11026
11027 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11028
11029         * mini.c: handle issue with the low-level implementation of
11030         some long opcodes (bug #54209).
11031
11032 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
11033
11034         * basic.cs: test for my new cmov stuff.
11035
11036 2004-05-13      Patrik Torstensson
11037
11038         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
11039         opt and added peephole documentation.
11040
11041 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
11042
11043         * tramp-ppc.c: rewrote the generic trampoline code.
11044
11045 2004-05-11      Patrik Torstensson
11046
11047         * mini-x86.c: optimize long shl/shr asm code (one less branch)
11048
11049 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
11050
11051         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
11052
11053         * mini.h mini.c dominators.c: Applied patch from Derek Woo
11054         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
11055
11056         * mini.c: Add new icalls for AsAny marshalling.
11057
11058 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
11059
11060         * tramp-ppc.c, mini-ppc.c: more cleanups.
11061
11062 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11063
11064         * mini.c: no warnings.
11065
11066 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11067
11068         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
11069
11070 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
11071
11072         * mini.c: In the thread abort signal handler, if the thread is in the
11073         process of being stoped, don't throw the Abort exception, just stop the
11074         thread.
11075
11076 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
11077
11078         * tramp-ppc.c: removed old code.
11079
11080 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11081
11082         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
11083         do some simple speed optimizations on ppc.
11084
11085 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
11086
11087         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
11088         and large offsets in load/store.
11089
11090 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
11091
11092         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
11093         it causes regressions.
11094
11095 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
11096
11097         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
11098         support.
11099
11100 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
11101
11102         * jit-icalls.c: remove warnings.
11103         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
11104         speedups for unsafe code.
11105
11106 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
11107
11108         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
11109
11110 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
11111
11112         * basic-calls.cs: Add new regression test.
11113
11114         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
11115         more portable.
11116
11117         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
11118
11119         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
11120         is no longer used.
11121
11122 2004-05-06      Patrik Torstensson
11123
11124         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
11125         long reg allocation in any reg (not only eax:edx) and implemented 
11126         long shl/shr ops in asm instead of helpers.
11127
11128 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
11129
11130         * mini-sparc.h: Fix warnings.
11131
11132         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
11133         stack.
11134
11135         * mini-exceptions.c (mono_handle_exception): Call the filter in a
11136         separate statement for clarity.
11137
11138         * mini-sparc.c: Update status.
11139
11140 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
11141
11142         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
11143         here.
11144
11145 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11146
11147         * inssel-ppc.brg: another small pre-release workaround:
11148         we don't do overflow detection for long_sub_un.
11149
11150 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11151
11152         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
11153         (also works around a weird ppc bug: 57957).
11154
11155 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
11156
11157         * tramp-ppc.c: trampoline fixes.
11158
11159 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
11160
11161         * mini-ppc.c: fixed typos.
11162
11163 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11164
11165         * mini-ppc.c, exceptions-ppc.c: more code saves registers
11166         at the top of the stack. Fixed typos. Use a frame registers
11167         for all the methods with exception clauses.
11168
11169 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11170
11171         * exceptions-ppc.c: restore fp registers.
11172
11173 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
11174
11175         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
11176         order from the stack top (moved the stack room to save the
11177         return value for trace after the param area). Fixed corruption
11178         in restoring registers on unwind.
11179
11180 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11181
11182         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
11183
11184 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11185
11186         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
11187         and prolog/epilog for methods that use it. Allow
11188         enough param area room for varargs methods. Fix miguel's
11189         breakage in exception handling.
11190
11191 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11192
11193         * Makefile.am: run genmdesc only on current arch.
11194
11195 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11196
11197         * exceptions-x86.c:
11198         * mini-x86.h: fix the build on windows.
11199
11200 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
11201
11202         * 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.
11203
11204         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
11205
11206         * mini-exceptions.c: New file.
11207         
11208         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
11209         Move some parts of the x86 exception handling code to an 
11210         arch-independent file so it can be shared with other ports.
11211
11212 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
11213
11214         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
11215
11216 2004-04-26  David Waite  <mass@akuma.org>
11217
11218         * driver.c: remove comma from end of enumeration declaration
11219
11220 2004-04-26  Jackson Harper  <jackson@ximian.com>
11221
11222         * driver.c: parse config file before loading first assembly. This
11223         allows the user gac to be enabled/disabled. 
11224         
11225 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
11226
11227         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
11228         simpler mechanism: we do not care what is encoded initially
11229         (branch absolute or relative), we care about the code and its
11230         target.  I kept the old code for reference for now.
11231
11232         The new code tries first to determine if the jump is anywhere in
11233         the -/+32 absolute meg range, if it succeeds, it encodes using the
11234         absolute branch;  If not, it tried to find something in the
11235         relative range, if not, it uses the handle_thunk code. 
11236
11237 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
11238
11239         * exceptions-ppc.c: use the correct ip register on macosx.
11240
11241 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
11242
11243         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
11244
11245 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
11246
11247         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
11248         Raise exception on integer divide by zero by hand since the hw
11249         doesn't support it. Handle NaNs in FP compares.
11250
11251 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
11252
11253         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
11254         code reducing duplication between the platforms and enabled
11255         signal exception handling (on linux for now).
11256
11257 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
11258
11259         * exceptions-ppc.c: more macosx support.
11260
11261 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11262
11263         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
11264
11265 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
11266
11267         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
11268
11269 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11270
11271         * iltests.il: more tests.
11272
11273 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11274
11275         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
11276         vars as well.
11277
11278 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11279
11280         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
11281
11282 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11283
11284         * liveness.c: Mark variables as volatile in all basic blocks reachable
11285         from exception clauses.
11286
11287 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
11288
11289         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
11290         inlining.
11291
11292 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11293
11294         * iltests.il, basic.cs: more tests for regalloc.
11295
11296 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11297
11298         * iltests.il: Some tests for register allocation modifications
11299         I have locally.
11300
11301 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
11302
11303         * exceptions.cs: Add regression test for bug #56782.
11304
11305         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
11306         original stack trace if an exception is rethrown. Fixes #56782. Oh,
11307         the beauty of fixing the same thing in 5 different files...
11308
11309 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
11310
11311         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
11312         methods.
11313
11314 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
11315
11316         * mini.c: Add support for STRWLPARRAY marshalling convention.
11317
11318 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11319
11320         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
11321         to init the context to setup the regs pointer).
11322
11323 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11324
11325         * exceptions-ppc.c: more exceptions work.
11326
11327 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11328
11329         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
11330         not allowed.
11331
11332 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11333
11334         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
11335         can use the memory directly.
11336
11337         * cpu-pentium.md: Update documentation from a post from Zoltan. 
11338
11339         add x86_add_membase, x86_sub_membase, x86_mul_membase
11340
11341 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11342
11343         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
11344         GENERAL_REGS they were also hardcoded for all PPC ports.
11345
11346         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
11347
11348         Remove hard-coded limit for floating point registers, use
11349         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
11350
11351         Notice that in MacOS X calling conventions you can fit a lot more
11352         floating point values in registers, so I should update the PInvoke
11353         test to excercise the passing of floating point values on the
11354         stack (currently broken).
11355         
11356 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
11357
11358         * tramp-ppc.c (create_trampoline_code): Added
11359         JUMP_TRAMPOLINE_SIZE. 
11360         (ppc_magic_trampoline): Follow the pattern from
11361         x86_magic_trampoline: if code is set to zero, return. 
11362         (create_trampoline_code): Always pass MonoMethod to the jump
11363         trampoline, before it was passing a null.
11364         (mono_arch_create_jump_trampoline): Implement the jump stub, could
11365         share the code with mono_arch_create_jit_trampoline. 
11366
11367         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
11368         implemented.
11369         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
11370         implemented.  
11371
11372         * cpu-g4.md: Added length for jmp instruction, the worst case
11373         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
11374         for save_lmf).
11375
11376 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
11377
11378         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
11379
11380 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
11381
11382         * mini.c: Only set bblock->real_offset when adding a new bblock, and
11383         before each IL instruction.
11384
11385         * mini.c (CEE_BOX): Fix warnings.
11386
11387 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11388
11389         * mini.c: removed a few unused vars and extra whitespace.
11390
11391 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
11392
11393         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
11394         checks.
11395         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
11396         index.
11397         (OP_GETCHR): use the above
11398         (CEE_LDELEMA): use the above.
11399
11400         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
11401         version of the generic impl.
11402         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
11403         (CEE_LDELEMA): use the above.
11404
11405 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11406
11407         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
11408         Fixes #56317.
11409
11410         * iltests.il: Added new regression test for #56317.
11411
11412 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11413
11414         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
11415         under NetBSD. Fixes #56450.
11416
11417         * liveness.c (update_gen_kill_set): Fix previous patch.
11418
11419 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11420
11421         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
11422
11423 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
11424
11425         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
11426         ldsfld and ldsflda.
11427
11428         * inssel-sparc.brg: Add more optimizations.
11429
11430         * mini-sparc.c: Replace multiply/divide with shifts if possible.
11431
11432 2004-04-01  Martin Baulig  <martin@ximian.com>
11433
11434         * mini.c (handle_box): New static function; moved the
11435         implementation of CEE_BOX here.
11436         (mono_method_to_ir): Added `constrained_call' variable.
11437         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
11438         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
11439         mono_method_get_constrained() to get the method.
11440
11441 2004-04-01  Martin Baulig  <martin@ximian.com>
11442
11443         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
11444         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
11445         (mono_method_to_ir): We don't need these macros anymore since
11446         mono_class_get_full() already takes care of it. 
11447
11448 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11449
11450         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
11451         use @function (as doesn't accept #function here) and check the return
11452         value of system and stop if fails.
11453
11454 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11455
11456         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
11457
11458 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
11459
11460         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
11461
11462         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
11463
11464         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
11465         #56223.
11466
11467         * basic-long.cs: Add test for negation of Int64.MinValue.
11468
11469 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
11470
11471         * mini-sparc.c: Update status.
11472
11473         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
11474
11475         * exceptions-sparc.c: Fix return value in filters.
11476
11477         * inssel-sparc.brg: Fix register allocation in some rules.
11478
11479 2004-03-28  Martin Baulig  <martin@ximian.com>
11480
11481         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
11482         if neccessary.  
11483
11484 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
11485
11486         * mini-x86.c (mono_arch_patch_code): Fix warnings.
11487         
11488         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
11489         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
11490         remove unused conv_u4 opcode.
11491
11492         * mini-x86.c: Remove valgrind workaround since it slows down things
11493         even when mono is not run under valgrind.
11494
11495 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
11496
11497         * mini-sparc.c: Update status.
11498
11499         * inssel-sparc.brg: Add some optimizations.
11500
11501         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
11502         future delay slot filling. Add support for varargs, tail calls and JMP.
11503
11504         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
11505         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
11506
11507         * inssel.brg: Fix register allocation in OP_ARGLIST.
11508
11509         * inssel.brg: Fix warnings.
11510
11511 2004-03-25  Martin Baulig  <martin@ximian.com>
11512
11513         * mini.c (inflate_generic_field): Removed.
11514         (mini_get_method): Removed, use mono_get_method_full(),
11515         (mini_get_class): Removed, use mono_class_get_full().
11516         (mono_method_to_ir): Pass our generic context to
11517         mono_field_from_token().        
11518
11519 2004-03-25  Martin Baulig  <martin@ximian.com>
11520
11521         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
11522         of a `MonoMethod *'.
11523         (mini_get_method): Take a `MonoGenericContext *' instead
11524         of a `MonoMethod *'.
11525         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
11526         a new local variable called `generic_context' which holds the
11527         current `MonoGenericContext *'; use it to lookup things.
11528
11529 2004-03-24  Martin Baulig  <martin@ximian.com>
11530
11531         * mini.c (mini_get_class): New static method; if we're inside a
11532         generic instance, inflate the class if neccessary.
11533         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
11534
11535 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
11536
11537         * iltests.il: New regression test for #55976.
11538
11539         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
11540         #55976.
11541
11542 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11543
11544         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
11545         output.
11546
11547 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11548
11549         * liveness.c: Consider SSA stores as well as loads when making vars
11550         volatile.
11551
11552         * exceptions.cs: New regression tests for register allocation.
11553         
11554 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
11555
11556         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
11557         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
11558           domain lock only to protect puntual access to data structures.
11559           Added access lock for sighash, jit_icall_hash_name, 
11560           jit_icall_hash_addr and domain->code_mp.
11561
11562 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
11563
11564         * driver.c: Print SIGSEGV handling method.
11565
11566         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
11567
11568         * mini.c (setup_jit_tls_data): Handle case when this is called
11569         multiple times for a thread.
11570
11571         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
11572         is different from fbxx_un. Fixes #54303. Also use constants instead of
11573         magic numbers in a lot of places.
11574
11575 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
11576
11577         * exceptions.cs: Fix cctor test when --regression is used.
11578
11579 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
11580
11581         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
11582         for Linux/ppc.
11583
11584 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11585
11586         * inssel-ppc.brg: fixed register assignments for some rules.
11587
11588 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11589
11590         * exceptions.cs: Add test for exceptions in static constructors.
11591
11592         * mini.c (mono_jit_compile_method_with_out): Move the calling of
11593         static constructors outside the domain lock. Fixes #55720.
11594
11595 2004-03-17  Martin Baulig  <martin@ximian.com>
11596
11597         * mini.c (get_generic_field_inst): Removed, this'll never happen.
11598         (inflate_generic_field): Take the `MonoMethod *' instead of the
11599         `MonoClass *' and added support for generic method.
11600         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
11601         have a `field->parent->gen_params', only inflate the field if it's
11602         an open constructed type.
11603
11604 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11605
11606         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
11607         exception object instead of the preconstructed ones.
11608
11609 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11610
11611         * mini.c: reverted changed to sigsegv_signal_handler commited
11612         accidentally in the previous patch.
11613
11614 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11615
11616         * mini.c:
11617         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
11618         running --aot with an old assembly.
11619
11620 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
11621
11622         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
11623         point values.
11624
11625         * mini-sparc.c: Add support for v9 branches with prediction.
11626
11627 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
11628
11629         * mini.c (mini_init): #warning is GNUC only
11630
11631         * mini-sparc.h: implement __builtin_frame_address
11632         and __builtin_return_address for Sun C compiler
11633
11634 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
11635
11636         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
11637
11638 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
11639
11640         * basic-calls.cs: Add test for unaligned byref long argument passing.
11641
11642         * mini-ops.h: Add sparcv9 compare and branch instructions.
11643
11644         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
11645         v9 instructions if we have a v9 cpu.
11646
11647         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
11648         registers for global allocation.
11649
11650         * exceptions-sparc.c: Fixes.
11651         
11652 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
11653
11654         * liveness.c (mono_analyze_liveness): Optimized version.
11655
11656         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
11657
11658         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
11659         sparc work.
11660
11661         * basic-float.cs basic-calls.cs: New regression tests.
11662
11663 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
11664
11665         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
11666         sigaltstack implementation.
11667
11668         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
11669         
11670         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
11671         stuff if SIGSEGV_ON_ALTSTACK is not defined.
11672
11673 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
11674
11675         * mini.c: Fix warnings.
11676         
11677         * mini.c (mono_resolve_patch_target): New function which contains the
11678         arch independent part of the patching process.
11679
11680         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
11681         patching code to a separate function.
11682
11683 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
11684
11685         * mini.c (add_signal_handler): ifdef out on Windows
11686
11687 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
11688
11689         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
11690         cpu-sparc.md: Add exception handling support + other fixes.
11691
11692         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
11693         typed GC detection in --version.
11694
11695         * basic.cs exceptions.cs: New regression tests.
11696
11697         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
11698         the arch specific code can store data during a compilation.
11699
11700         * mini-ops.h: Add OP_SETFRET.
11701
11702         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
11703         function, register a separate icall for each arity, so the icalls can
11704         get a wrapper.
11705         
11706         * mini.c (mono_print_tree): Print negative offsets in a more readable
11707         form.
11708         
11709         * mini.c: Make signal handling work on sparc.
11710         
11711         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
11712
11713         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
11714
11715         * jit-icalls.c: Emulate truncl by aintl on solaris.
11716
11717         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
11718
11719 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
11720
11721         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
11722
11723 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
11724
11725         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
11726         a MarshalByRef type, inline a method that performs the check, taking into
11727         account that the object can be a proxy. Also implemented tow new opcodes:
11728         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11729         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
11730         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11731
11732 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11733
11734         * mini-ppc.c: if a relative branch displacement is too big
11735         but it points to and area reachable with an absolute branch, 
11736         avoid the thunks.
11737
11738 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11739
11740         * mini.c: optimize small copies in cpblk.
11741
11742 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
11743
11744         * basic-calls.cs basic-float.cs: New regression tests.
11745
11746         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
11747         negative offsets from %fp. Implement localloc. Fix local register 
11748         allocation. Fix the case when the this argument needs to be saved to
11749         the stack. Implement some missing opcodes.
11750
11751 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
11752
11753         * mini.c (mini_method_compile): Reenable global regalloc in methods
11754         with exception handlers.
11755
11756         * linear-scan.c (mono_varlist_sort): Fix warning.
11757
11758         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
11759
11760         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
11761         regalloc costs.
11762
11763         * liveness.c: Make all variables uses in exception clauses volatile, to
11764         prevent them from being allocated to registers. Fixes #42136.
11765
11766 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
11767
11768         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
11769         causes regressions.
11770
11771         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
11772         argument to mono_arch_regalloc_cost.
11773
11774         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
11775         precisely.
11776
11777 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
11778
11779         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
11780         Make the cost of allocating a variable to a register arch dependent.
11781
11782         * basic-calls.cs: Fix compilation of tests.
11783         
11784         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
11785         helper function to cut back on the number of #ifdefs needed.
11786
11787         * mini-ppc.c: Fix compilation.
11788
11789         * basic-calls.cs: New regression tests.
11790
11791         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
11792
11793         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
11794         of l0 since that is callee saved.
11795
11796         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
11797         to virtual calls.
11798
11799         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
11800         of delay instruction.
11801
11802         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
11803
11804         * mini.h (MonoCallInst): Add 'virtual' flag.
11805
11806         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
11807
11808 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
11809
11810         * *.cs: New regression tests.
11811
11812         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
11813         work.
11814
11815         * mini.c (mono_runtime_install_handlers): Fix build.
11816
11817         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
11818         'signal_stack_size' members.
11819
11820         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
11821         alternate signal stack.
11822
11823         * exceptions-x86.c: Add stack overflow handling.
11824
11825         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
11826         functions to arch independent code.
11827
11828         * mini.c (mono_print_tree): Print more detailed info for load_membase
11829         opcodes.
11830         
11831 2004-02-23  Martin Baulig  <martin@ximian.com>
11832
11833         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
11834
11835 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11836
11837         * mini-x86.c: fixed reg allocation for div/rem.
11838
11839 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
11840
11841         * driver.c (mono_main): Report some configuratio options on --version.
11842
11843 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
11844
11845         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
11846         low in the address space. Correctly flush memory in thunks where we
11847         output native code.
11848
11849 2004-02-20  Martin Baulig  <martin@ximian.com>
11850
11851         * mini.c (mini_get_method): New static method; inflate all generic
11852         methods and methods in open generic instances.
11853         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
11854         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
11855
11856 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11857
11858         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
11859
11860         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
11861
11862 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
11863
11864         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
11865
11866         * mini-sparc.c (flushi mono_arch_output_basic_block): make
11867         it compile using Sun's compiler.
11868
11869 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11870
11871         * 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.
11872
11873         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
11874
11875 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11876
11877         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
11878         code.
11879         * mini-ppc.c: handle calls outside of the allowed range with thunks
11880         allocated using the code manager.
11881         * tramp-ppc.c: use the code manager to hold generated native code.
11882         Fixed the magic trampoline to just patch vtable entries.
11883
11884 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
11885
11886         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
11887         independent file.
11888
11889 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
11890
11891         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
11892         PPC.
11893
11894         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
11895         if we have a working __thread implementation.
11896
11897         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
11898         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
11899
11900 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
11901
11902         * mini-x86.c: Fix compilation under gcc 2.
11903         
11904 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
11905
11906         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
11907         contains a call to the wrapped function.
11908
11909         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
11910         OP_<CALL>_IMM opcodes, and use them under X86.
11911         
11912         * mini.c (mono_jit_find_compiled_method): Fix warning.
11913
11914         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
11915
11916         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
11917
11918         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
11919         functionality to mini.c.
11920
11921         * mini.c (mono_create_jump_trampoline): New function to create a jump
11922         trampoline. Return a compiled method instead of a trampoline if it
11923         exists. Add a cache for jump trampolines.
11924
11925         * mini.c (mono_jit_find_compiled_method): New function to return a
11926         compiled method if it exists.
11927
11928         * mini-x86.c: Call mono_create_jump_trampoline instead of 
11929         mono_arch_create_jit_trampoline.
11930
11931         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
11932         a jump trampoline. Fixes #52092.
11933         
11934 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
11935
11936         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
11937         which is not up-to-date. Add check_corlib_version () instead.
11938
11939         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
11940         have to call it.
11941         
11942         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
11943         since newer valgrind versions do not need it.
11944
11945         * mini.c (mono_jit_compile_method_with_opt): New helper function to
11946         compile a method with a given set of optimizations.
11947
11948         * mini.c: Compile icall wrappers on-demand instead of at startup.
11949
11950         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
11951         wrapper for an icall.
11952
11953 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
11954
11955         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
11956         #54063.
11957
11958         * iltests.il: Add test for non-empty stack before switch instruction.
11959
11960 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
11961
11962         * mini.c: Add support for new stringbuilder marshalling conventions.
11963
11964         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
11965
11966 2004-02-01  Martin Baulig  <martin@ximian.com>
11967
11968         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
11969         in `ginst->mtype_argv'.
11970
11971 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
11972
11973         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
11974         facilitate grepping.
11975
11976 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
11977
11978         * mini.c: fixed buglet in initobj generic implementation for references.
11979
11980 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
11981
11982         * Makefile.am: make the version script conditional.
11983         * jit-icalls.c: handle missing truncl().
11984
11985 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
11986
11987         * exceptions.cs: Add more tests for double->int conversion.
11988
11989         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
11990         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
11991
11992 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
11993
11994         * driver.c: make --verbose --version emit an error
11995         if the loaded corlib doesn't match the runtime version.
11996
11997 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
11998
11999         * mini-ppc.h: export ppc_patch().
12000         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
12001         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
12002         on par or better than on MacOSX.
12003
12004 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
12005
12006         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
12007         mono_lookup_pinvoke_call.
12008
12009         * mini-x86.c: Under windows, the default pinvoke calling convention is
12010         stdcall. Fixes #52834.
12011
12012         * mini.c (optimize_branches): Add an upper bound to the number of
12013         iterations to prevent infinite loops on strange loops. Fixes #53003.
12014
12015 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
12016
12017         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
12018         and ISINST. Fixes #52093.
12019
12020         * objects.cs (test_0_vector_array_cast): New tests.
12021         
12022 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
12023
12024         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
12025         checking in Array.Set ().
12026
12027         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
12028         #52590.
12029
12030         * object.cs (test_0_multi_array_cast): New regression test.
12031
12032 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
12033
12034         * exceptions-ppc.c: fix build on Linux/PPC.
12035
12036 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
12037
12038         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
12039         running under valgrind.
12040         (x86_magic_trampoline): Fix build bustage.
12041
12042         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
12043         negative values as well. This is needed for the encoding of the line number
12044         info, since sometimes the line numbers are not in increasing order.
12045
12046 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
12047
12048         * cpu-pentium.md (localloc): Increase the size of the localloc 
12049         instruction since it is a loop under Win32.
12050
12051         * debug-mini.c (record_line_number): Get rid of unneccesary memory
12052         allocation.
12053
12054 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
12055
12056         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
12057         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
12058         Max Horn (max@quendi.de). Fix file names in comments.
12059
12060 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
12061
12062         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
12063         avoid stack overflow.
12064         (replace_usage): Avoid uninitialized variable warnings.
12065
12066         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
12067         and taking the address of valuetype variables.
12068
12069 2004-01-03  Patrik Torstensson
12070
12071         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
12072         for other purposes than FP later on.
12073
12074 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
12075
12076         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
12077         of tail calls.
12078
12079 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12080
12081         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
12082
12083 2003-12-30  Patrik Torstensson <p@rxc.se>
12084
12085         * mini-x86.h: Decreased number of availiable fp regs.
12086         Solves corner cases with FP spilling.
12087
12088 2003-12-23  Patrik Torstensson <p@rxc.se>
12089
12090         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
12091         for floating point stack tracking / spilling on x86. 
12092         Fixes bug #49012.
12093         
12094         * basic-float.cs: added float mul overflow test.
12095
12096 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
12097
12098         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
12099
12100 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12101
12102         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
12103         supports for cond branches that overflow the immediate
12104         overflow offset. mcs can compile simple programs.
12105
12106 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12107
12108         * exceptions-ppc.c: exception handling support wip:
12109         finally handlers get run on exception.
12110
12111 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
12112
12113         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
12114         profiling.
12115
12116 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12117
12118         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
12119         initial support for stack walking and unwinding.
12120
12121 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
12122
12123         * driver.c (mono_main): Make corlib-out-of-sync message more 
12124         descriptive. Also remove verify_corlib call.
12125
12126 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12127
12128         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
12129         not overlap with other call's arguments, too.
12130
12131 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
12132
12133         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
12134         move to arch-specific code the choice of arch-specific
12135         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
12136         * mini.c: ensure emulation calls will not interleave
12137         with other calls.
12138
12139 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
12140
12141         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
12142         the magic trampoline stack frame is dropped before executing
12143         the new method.
12144
12145 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
12146
12147         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
12148         and integer to fp conversions. Added support for overflowing
12149         arguments on the stack. Reserve a couple more registers as temps.
12150         Added support for aot compilation (as output still needs to be
12151         tweaked, though).
12152
12153 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12154
12155         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
12156         Don't overwrite return register in some corner cases.
12157
12158 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
12159
12160         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
12161         static constructors when AOT compiling.
12162
12163         * driver.c (mono_main): Call mono_check_corlib_version.
12164
12165 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12166
12167         * cpu-g4.md, basic.cs: fixed div target register.
12168
12169 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
12170
12171         * mini-ppc.c, basic.cs: shl_imm fix with test.
12172
12173 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12174
12175         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
12176         structures by value. Misc fixes.
12177         * objects.cs: more tests.
12178
12179 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
12180
12181         * mini-ppc.c: lconv.ovf.i implemented.
12182
12183 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12184
12185         * mini.c:
12186         (mini_init): don't error out if someone already called g_thread_init.
12187
12188 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12189
12190         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
12191         to be any type per the spec. Fix abnormal memory usage when
12192         the same object is repeatedly thrown.
12193
12194 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
12195
12196         * mini.c: check for overruns in IL code.
12197
12198 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
12199
12200         * TODO: Add/remove some todo entries.
12201
12202 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
12203
12204         * driver.c (mono_main): Call mono_verify_corlib.
12205
12206 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
12207
12208         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
12209         This has been moved to mini.c
12210         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
12211         type being casted is marshalbyref it could be a proxy, so instead of
12212         emitting the type check code, emit a call to a runtime method that will
12213         perform the check by calling CanCastTo if needed.
12214
12215 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
12216
12217         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
12218         methods with large stack frames under Win32.
12219
12220 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
12221
12222         * Makefile.am: Distribute regression tests.
12223
12224         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
12225         at the end instead of inserting each variable into the sorted list.
12226
12227         * linear-scan.c (mono_varlist_sort): New helper function.
12228         
12229 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12230
12231         * mini.c: ensure arguments and locals are within bounds.
12232
12233 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12234
12235         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
12236         related fixes.
12237
12238 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12239
12240         * mini.c (mono_cprop_copy_values): Fix crash.
12241
12242         * aot.c: Set verbosity back to 0.
12243         
12244 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12245
12246         * regalloc.c: complete memory leak fix by Laurent Morichetti
12247         (l_m@pacbell.net).
12248
12249 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12250
12251         * driver.c (main_thread_handler): Revert the previous patch.
12252
12253         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
12254         under valgrind.
12255
12256         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
12257         memory from the memory pool.
12258
12259         * driver.c (main_thread_handler): Turn on all optimizations when
12260         --aot is used.
12261
12262         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
12263         an array for better performance.
12264
12265         * regalloc.c (mono_regstate_assign): Fix memory leak.
12266
12267         * debug-mini.c (mono_debug_serialize_debug_info): New function to
12268         serialize the debug info.
12269
12270         * debug-mini.c (mono_debug_add_aot_method): New function to load the
12271         debug info from the serialized representation.
12272
12273         * aot.c: Save debug info into the generated file and load it when 
12274         loading a method.
12275
12276         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12277
12278 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12279
12280         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
12281         More FP-related fixes.
12282
12283 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
12284
12285         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
12286         and register allocation buglet. Hello world now runs.
12287
12288 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12289
12290         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
12291         * tramp-ppc.c: fixed class init trampoline.
12292         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
12293
12294 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12295
12296         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
12297         mini.c: more ppc changes/fixes.
12298
12299 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12300
12301         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
12302         Also optimize the case when the arguments are the same in the caller 
12303         and in the callee.
12304
12305         * iltests.il: Add tests for tail calls with valuetype arguments.
12306
12307 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12308
12309         * mini-ppc.c: fixes for struct return type.
12310
12311 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
12312
12313         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
12314         mono_spillvar_offset() to arch-specific code.
12315
12316 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
12317
12318         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
12319
12320 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12321
12322         * exceptions-x86.c: Fix stack space leaks.
12323         
12324         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
12325         registers from the lmf if the method has save_lmf set.
12326
12327 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
12328
12329         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
12330         of icall wrappers into InvokeInDomain, since these are now per-domain.
12331
12332 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
12333
12334         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
12335         make some opcode emulation and intrinsic ops enabled/disabled 
12336         according to the architecture. More fixes.
12337
12338 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12339
12340         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
12341
12342 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12343
12344         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
12345         arch-specific handling for 'this' and struct return type to
12346         arch-specific code.
12347
12348 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12349
12350         * aot.c: prevent divide by zero error when reporting (it happened with
12351         Accessibility.dll).
12352
12353 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
12354
12355         * mini.h (inst_switch): Remove unused macro.
12356
12357 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12358
12359         * aot.c:
12360         (load_aot_module): free 'info->methods' and 'info' properly. No more
12361         "free(): invalid pointer blah" messages when you have an old aot
12362         compiled assembly.
12363
12364 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
12365
12366         * jit-icalls.c, mini.c: Added support for context static fields.
12367
12368 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12369
12370         * mini.c (mono_method_blittable): Methods which set LastError are not 
12371         blittable either. Fixes #51108.
12372         
12373 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12374
12375         * mini.c: flush icache.
12376         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
12377
12378 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12379
12380         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
12381
12382 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
12383
12384         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
12385         safe on IA32.
12386
12387         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
12388         vararg calls.
12389
12390         * inssel.brg (CEE_MKREFANY): Fix AOT case.
12391
12392 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
12393
12394         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
12395         instruction when the result is discarded.
12396
12397         * iltests.il (test_0_div_regalloc): New regression test.
12398
12399         * arrays.cs: Fix compilation error.
12400
12401 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
12402
12403         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
12404         float rules to inssel-x86.brg: sane architectures with FP registers
12405         don't need to implement these rules.
12406
12407 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12408
12409         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
12410
12411 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12412
12413         * mini.h, inssel-long32.brg: fixed endianess issues in int64
12414         implementation of 32 bit systems.
12415
12416 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12417
12418         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
12419         (Jeroen Zwartepoorte).
12420
12421 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12422
12423         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
12424         the caller and the callee matches.
12425         
12426         * mini.c (mono_method_to_ir): Add comment.
12427
12428         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
12429         signbit is missing on some platforms.
12430
12431 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
12432
12433         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
12434
12435         * mini.c (setup_jit_tls_data): Call the new function.
12436         
12437         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
12438
12439         * mini-x86.c: Add experimental support for fast access to the lmf
12440         structure under NPTL/Linux 2.6.x.
12441
12442 2003-11-06  Martin Baulig  <martin@ximian.com>
12443
12444         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
12445         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
12446         the debugger.
12447
12448 2003-11-02  Martin Baulig  <martin@ximian.com>
12449
12450         * mini.c (inflate_generic_field): New static method.
12451         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
12452         generic instance and the field is declared in a generic type, call
12453         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
12454
12455 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
12456
12457         * mini.h mini.c (mono_method_same_domain): New function to return
12458         whenever the caller and the callee are in the same domain.
12459
12460         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
12461
12462 2003-10-30  Martin Baulig  <martin@ximian.com>
12463
12464         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
12465         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
12466         method parameters.
12467         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
12468         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
12469
12470 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
12471
12472         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
12473         propagation.
12474
12475         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
12476         object here, so it is in the correct appdomain etc.
12477
12478 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
12479
12480         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
12481         already done.
12482         (mono_method_to_ir): Avoid freeing the type created returned from
12483         mono_type_create_from_typespec, since it is put into an internal cache
12484         by the function. Fixes pointer.exe.
12485
12486         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
12487         trampolines for icalls and pinvokes as well. Fixes #33569.
12488
12489 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
12490
12491         * mini.c: Update after appdomain changes.
12492
12493         * mini.c (mono_jit_compile_method_inner): Allways compile native
12494         method wrappers in the root domain, since there can only be one
12495         instance of them, whose address is stored in method->info.
12496
12497 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12498
12499         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
12500         environment variable. Instead detect automatically whenever running
12501         under valgrind using the magic macro RUNNING_ON_VALGRIND from
12502         valgrind.h.
12503
12504 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
12505
12506         * trace.c, trace.h: New files that implement the new trace option
12507         parsing. 
12508
12509         * driver.c: Document new --trace options.
12510
12511         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
12512         mini-x86.c: Apply:
12513
12514         -       if (mono_jit_trace_calls)
12515         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
12516
12517         * mini.h: prototypes.
12518         
12519 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12520
12521         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
12522
12523         * mini.c inssel.brg: Implement typedefbyref opcodes.
12524
12525         * mini.c (mono_jit_compile_method): Remove unused local variable.
12526
12527         * mini.c (mono_jit_compile_method_inner): Ditto.
12528         
12529 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
12530
12531         * tramp-x86.c (x86_class_init_trampoline): Fix build.
12532         
12533         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
12534
12535 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12536
12537         * mini.c (mono_no_aot): Remove unused global variable.
12538
12539         * mini.c: Thread safety fixes.
12540
12541 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12542
12543         * mini.c (mono_create_class_init_trampoline): Add a lock around
12544         class_init_hash_addr.
12545
12546         * arrays.cs (test_0_newarr_emulation): Add new regression test for
12547         #30073.
12548
12549         * mini.c: Decompose the NEWARR instruction before decomposing its
12550         arguments. Fixes #30073.
12551
12552 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
12553
12554         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
12555         convention.
12556
12557 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
12558
12559         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
12560
12561         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
12562
12563         * driver.c: Add support for compiling icall wrappers to --compile.
12564
12565 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
12566
12567         * inssel.brg: The empty value in class->interface_offsets is -1, not
12568         0. Fixes #49287.
12569
12570 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
12571
12572         * objects.cs: New test for 'is' operator on an array of interfaces.
12573
12574 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12575
12576         * tramp-ppc.c: update trampoline code to support jumps
12577         and class initialization.
12578
12579 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
12580
12581         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
12582
12583         * inssel.brg (OP_UNBOXCAST): Fix #46027.
12584
12585         * inssel.brg (OP_UNBOX): Remove unused rule.
12586
12587         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
12588         region instead of one for each method. Fixes #47813.
12589
12590 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
12591
12592         * exceptions.cs (test_0_nested_finally): New regression test for
12593         nested exception handlers.
12594
12595         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
12596
12597         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
12598
12599         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
12600         inlining.
12601
12602         * mini.c (mono_method_check_inlining): Make the inlining limit 
12603         configurable by an environment variable.
12604         
12605         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
12606
12607         * mini.h: Bump AOT file version.
12608
12609         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
12610         token, store the image along with the token, since the token might not 
12611         refer to the same image as the method containing the relocation, 
12612         because of inlining.
12613
12614 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
12615
12616         * mini.c (mono_precompile_assemblies): New function to compile
12617         all methods in all loaded assemblies.
12618
12619         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
12620
12621         * regalloc.h regalloc.c (MonoRegState): Change the type of 
12622         iassign and fassign to int*, since they can contain large negative
12623         values if the register is spilled. Also added some comments. Fixes
12624         #45817.
12625
12626         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
12627         under Win32. Fixes #42964.
12628
12629 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
12630
12631         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
12632
12633         * aot.c: Added support for AOT compiling methods which contain calls
12634         to wrappers. Currently, only remoting-invoke-with-check wrappers are
12635         handled.
12636         
12637         * driver.c (compile_all_methods): Run the compilation in a thread
12638         managed by mono. Fixes #44023.
12639
12640         * mini.c (mono_codegen): Print full method name in verbose output.
12641
12642         * mini-x86.c (mono_arch_patch_code): Fix warning.
12643         
12644         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
12645         jumps, since the method we are jumping to might be domain-specific.
12646
12647         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
12648
12649 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12650
12651         * inssel.brg: string chars are unsigned.
12652
12653 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
12654
12655         * TODO: New todo item.
12656
12657         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
12658         which calls mono_runtime_class_init and patches the call site to
12659         avoid further calls.
12660         (mono_arch_create_class_init_trampoline): New arch specific function 
12661         to create a class init trampoline.
12662         (create_trampoline_code): Generalized so it can create
12663         class init trampolines as well.
12664
12665         * mini.c (helper_sig_class_init_trampoline): New helper variable.
12666         (mono_create_class_init_trampoline): New function to create and cache
12667         class init trampolines.
12668         (mono_find_class_init_trampoline_by_addr): New function to lookup the
12669         vtable given the address of a class init trampoline. Used by the
12670         patching process.
12671         (mono_codegen): Generate a call to a trampoline instead of
12672         mono_runtime_class_init in LDSFLD[A].
12673         (mono_codegen): Add relocations for the new trampoline.
12674         
12675         * mini.h mini-x86.c aot.c: Added a new relocation type: 
12676         MONO_PATCH_INFO_CLASS_INIT.
12677
12678         * mini.h: Bump AOT version number.
12679
12680         * aot.c: Create a copy of the loaded code instead of using the original
12681         so methods which call each other will be close in memory, improving
12682         cache behaviour.
12683         
12684         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
12685         patch since it breaks the regression tests.
12686         
12687         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
12688         for the register saving instruction sequence since the 
12689         frame_state_for function in glibc 2.3.2 don't seem to detect it.
12690
12691 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
12692
12693         * TODO: Fix todo item && remove another.
12694
12695 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
12696
12697         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
12698         previous checkin.
12699
12700         * aot.c: Moved the check for MONO_LASTAOT into the initialization
12701         function of the module.
12702
12703         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
12704         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
12705         --no-aot command line option.
12706
12707 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
12708
12709         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
12710         by Bernie Solomon (bernard@ugsolutions.com).
12711
12712         * inssel.brg: Refactor the interface offset table related code into
12713         its separate functions and add support for the AOT case.
12714
12715 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
12716
12717         * aot.c (mono_aot_get_method_inner): Fix memory leak.
12718         
12719         * aot.c: Added mono_aot_verbose variable and made all debugging
12720         output depend on the value of this variable.
12721
12722         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
12723         method_label and info_label.
12724
12725         * mini.h mini-x86.c aot.c: Added a new relocation type 
12726         MONO_PATCH_INFO_IID for klass->interface_id.
12727
12728         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
12729         the MonoJitInfo structure.
12730
12731         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
12732         a non-root appdomain in shared mode.
12733
12734 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
12735
12736         * aot.c: make aot loader less verbose. Remove free of unused variable.
12737
12738 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
12739
12740         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
12741
12742         * .cvsignore: Added *.dll.
12743
12744         * mini.c (mono_print_tree_nl): New function callable while debugging.
12745
12746         * mini.c (mono_print_code): Export this.
12747
12748         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
12749         patched code.
12750
12751 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
12752
12753         * mini.h (MonoCompile): Added 'jit_info' field.
12754
12755         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
12756         the cfg structure, since it is needed by the AOT compiler.
12757
12758         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12759
12760         * aot.c: A major rewrite. Changes include:
12761         - save exception tables for methods which have them.
12762         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
12763         to g_module_symbol.
12764         - reworked the file format so it is now much smaller and needs
12765         fewer relocation entries.
12766         
12767 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12768
12769         * aot.c (load_aot_module): Fix build bustage on platforms without
12770         Boehm GC.
12771
12772 2003-09-04  Martin Baulig  <martin@ximian.com>
12773
12774         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
12775
12776 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12777
12778         * TODO: Some new optimization ideas.
12779
12780         * aot.c: Move AOT module loading logic here from mono_assembly_open.
12781
12782         * aot.c: Save the optimization flags used to compile the code into
12783         the AOT module.
12784
12785         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
12786         support emitting domain specific code.
12787         
12788         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
12789         no longer domain neutral. It can be made domain neutral by compiling 
12790         with --optimize=shared.
12791
12792         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
12793         between appdomains.
12794
12795         * driver.c mini.h mini.c: New --no-aot debugging option which disables
12796         loading of AOT code.
12797
12798         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
12799         
12800         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
12801         if there is no domain neutrality information.
12802
12803 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
12804
12805         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
12806         format version into the generated library.
12807
12808         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
12809         callee method into the caller since one of them could be shared.
12810
12811         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
12812         system exceptions from AOT code now works.
12813
12814         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
12815         method if it is domain neutral and the callee is not.
12816
12817         * graph.c (cfg_emit_one_loop_level): Fix warning.
12818
12819 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
12820
12821         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
12822         last checkin.
12823
12824 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
12825
12826         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
12827         is needed  by code which is executed before mono_runtime_init ().
12828         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
12829         
12830         * mini.c (mono_thread_abort): Fix warning.
12831         (mono_jit_compile_method): Call static constructor in the AOT case too.
12832
12833         * aot.c (mono_compile_assembly): Fix warning.
12834
12835 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12836
12837         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
12838
12839 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
12840
12841         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
12842
12843         * cpu-pentium.md: Fix the length of call opcodes so they include the
12844         ESP restoring instruction. Fixes #47968.
12845
12846 2003-08-28  Martin Baulig  <martin@ximian.com>
12847
12848         * mini-x86.c (mono_arch_call_opcode): Added support for
12849         MONO_TYPE_GENERICINST.
12850
12851         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
12852
12853 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
12854
12855         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
12856         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
12857
12858         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
12859         metadata_section.
12860
12861 2003-08-26  Martin Baulig  <martin@ximian.com>
12862
12863         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
12864         when reporting an error, set this to the actual error location.
12865         (mono_method_to_ir): Report the correct error location if
12866         get_basic_blocks() returned an error.
12867
12868 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
12869
12870         * mini.c (mono_type_blittable): OBJECT is not blittable.
12871         (mono_method_blittable): Methods which have marshalling descriptors
12872         are not blittable either. Fixes #47842.
12873
12874 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
12875
12876         * driver.c mini.c: Use an environment variable instead of a global 
12877         variable. Also fix the build.
12878
12879         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
12880         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
12881         reporting this. 
12882
12883         * driver.c mini.c: Added --with-valgrind option to turn off some
12884         code which prevents mono from running under valgrind.
12885
12886         * mini.c (mono_emit_call_args): Fixed warning.
12887
12888         * mini.c (mono_emulate_opcode): Fixed warning.
12889
12890 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12891
12892         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
12893         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
12894         regalloc.c, regalloc.h: specify available registers in arch-specific
12895         code and support floats in the regallocator (patch by Laurent Morichetti 
12896         <l_m@pacbell.net>)
12897
12898 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
12899
12900         * mini.c: mono_thread_current() can be called only after
12901         mono_runtime_init(): rearrange code to not call it early on.
12902
12903 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12904
12905         * mini.c: allocate jump tables in the code mempools.
12906
12907 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12908
12909         * mini.c, mini.h: make sure per-thread data allocated by the jit is
12910         freed.
12911
12912 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
12913
12914         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
12915         12 to 16.  This fixes bug #47453.
12916
12917
12918 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12919
12920         * mini-ppc.c: fixed indexed load and unsigned compares.
12921
12922 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
12923
12924         * mini.c: reenabled installation of handler for
12925           thread abort signal.
12926
12927 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12928
12929         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
12930         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
12931         until it's fixed and actually useful.
12932
12933 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
12934
12935         * inssel-long32.brg: couple more opcodes implemented.
12936
12937 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
12938         
12939         * mini-sparc.c: Even more opcodes implemeted.
12940
12941 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
12942
12943         * mini-sparc.c: More opcodes implemented.
12944
12945 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
12946
12947         * mini-sparc.c: More opcodes implemented.
12948
12949 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
12950
12951         * inssel-sparc.brg: Add some needed rules.  Direct
12952         copy from PPC.
12953         * Makefile.am: Use inssel-sparc.brg
12954         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
12955         an assert happy for now.
12956
12957 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
12958
12959         * mini-sparc.c: Fixed compile errors.
12960         * exceptions-sparc.c: Same.  We now produce a mono binary 
12961         on sparc-linux.  Yea.
12962
12963 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
12964
12965         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
12966         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
12967         They compile, but do not work.
12968
12969 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12970
12971         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
12972         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
12973         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
12974         (ct@gentoo.org).
12975
12976 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12977
12978         * mini.c: more opcodes implemented and better support for generics.
12979
12980 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
12981
12982         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
12983         * mini.c, mini.h: first cut at generics support: some new instructions 
12984         added and changed the behaviour of some of the existing ones.
12985
12986 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
12987
12988         * mini.c: Removed definition of metadata_shared mutex here.
12989
12990 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
12991
12992         * mini-x86.c: make vararg calls work for instance methods.
12993
12994 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12995
12996         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
12997         returns the arguments in a separte list, now.
12998
12999 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13000
13001         * aot.c, mini.c: updates for array type representation changes.
13002
13003 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
13004
13005         * mini.c: register function to perform jit shutdown.
13006
13007 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13008
13009         * mini.c: use a faster allocator if possible.
13010
13011 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13012
13013         * aot.c: some cleanups and portability changes.
13014
13015 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13016
13017         * mini.c: use faster allocation for CEE_BOX if possible.
13018
13019 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13020
13021         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
13022         Moved inlined mempcy code to its own function so that is can be
13023         reused. Added an inline memset function as well (optimized initobj).
13024         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
13025
13026 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13027
13028         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
13029
13030 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13031
13032         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
13033         arch code can setup the cpu for CLR execution, if needed.
13034         We use it on x86 to set the precision of FP operations.
13035
13036 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13037
13038         * mini.c: disable some optimizations if we can guess they'll cost too
13039         much for a given method.
13040
13041 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13042
13043         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
13044         
13045 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13046         * mini.h mini.c mini-x86.c: Added instruction level coverage 
13047         info collection support.
13048
13049 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13050
13051         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
13052         is now implemented in the profiling API. Get rid of a couple of
13053         unnecessary global variables.
13054
13055 2003-06-15  Nick Drochak <ndrochak@gol.com>
13056
13057         * basic-long.cs: tests for negative values for bigmul, and unsigned.
13058         * cpu-g4.md: add op_bigmul and op_bigmul_un
13059         * cpu_pentium.md: add op_bigmul_un
13060         * inssel-long32.brg: add rule for unsigned bigmul
13061         * mini-ops.h: define OP_BIGMUL_UN
13062         * mini-x86.c: THE BUG: handle (un)signed properly
13063         * mini.c: choose unsigned opcode if needed.
13064         This set of patches fixes bug #44291
13065
13066 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
13067
13068         * mini.c (optimize_branches): improved to handle all kinds of
13069         conditional branches.
13070
13071 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13072
13073         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
13074         don't raise exceptions.
13075
13076 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13077
13078         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
13079         to arch-specific files.
13080
13081 2003-06-09  Martin Baulig  <martin@ximian.com>
13082
13083         * Makefile.am (libs): Added $(LIBGC_LIBS).
13084
13085 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
13086
13087         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
13088         and OP_ATAN (fixes bug#44293).
13089
13090 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
13091
13092         * Makefile.am, mini-x86.c: rename cpu description array to
13093         pentium_desc, since some compilers define the 'pentium' preprocessor
13094         symbol.
13095
13096 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
13097
13098         * mini.c (mini_select_instructions): add explicit branch if the
13099         following block is not the false target of a conditional branch -
13100         we need this with any optimization that reorder or remove bblocks
13101
13102         * mini.c (optimize_branches): bug fixes
13103
13104 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
13105
13106         * mini.c (mono_method_to_ir): inline static readonly fields
13107
13108         * ssa.c (fold_tree): start cfold support for long (very simple
13109         cases only)
13110
13111         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
13112
13113 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13114
13115         * inssel.brg: fixed memcpy (bug #44219).
13116
13117 2003-06-05  Dick Porter  <dick@ximian.com>
13118
13119         * driver.c: Set the glib log levels to not abort if g_message
13120         recurses.
13121
13122         g_set_prgname() has to happen before mini_init() so that the
13123         process handle gets the info.
13124         
13125 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13126
13127         * driver.c: add intrins to the default optimizations to get wider
13128         exposure.
13129
13130 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13131
13132         * mini.h: some large basic blocks will overflow a 16-bit
13133         integers for symbolic registers.
13134
13135 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13136
13137         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
13138         (mono_arch_output_basic_block): fix bug 43499 
13139
13140 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13141
13142         * mini.c: kill duplicated definition of mono_debug_format.
13143
13144 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13145
13146         * mini-x86.c, arrays.cs: fixed register allocation bug.
13147
13148 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13149
13150         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
13151
13152         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
13153
13154 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13155
13156         * mini.c:
13157         (print_method_from_ip): also print source location information if
13158         available.
13159
13160 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
13161
13162         * mini.c (mono_find_block_region): bug fix in region code
13163         (mini_method_compile): enable removing unreachable code again, but
13164         only in methods without exception clauses.
13165
13166 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
13167
13168         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
13169         Implemented arglist opcode and handling of TypedReference type.
13170         Fixed x86 call convention when a structure is returned.
13171         Minimal support for calling static vararg methods.
13172
13173 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
13174
13175         * mini.c (mini_method_compile):  always remove unreachable code,
13176         because the code in them may be inconsistent  (access to dead
13177         variables for example).
13178
13179 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13180
13181         * driver.c, debug-mini.c: warning fixes.
13182
13183 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13184
13185         * Makefile.am, jit.h, mini.h: install header for embedding mono.
13186
13187 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
13188
13189         * mini.c: thread-static fields are registered in mono_class_vtable(),
13190         so ensure the function is called before checking for them.
13191
13192 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
13193
13194         * mini.c (optimize_branches): fix for bug 43586
13195
13196         * jit-icalls.c (mono_llmult_ovf): added an additional check for
13197         overflow (fixes Bug #43639)
13198
13199 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13200
13201         * mini.c, objects.cs: allow the use of stobj for primitive types.
13202
13203 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13204
13205         * mini.c: be less strict about argument checking until we support
13206         running the verifier.
13207
13208 2003-05-27  Nick Drochak <ndrochak@gol.com>
13209
13210         * basic-long.cs: tests for (ulong)int * (ulong)int also
13211         * mini.c: use the same trick for (ulong)int * (ulong)int
13212
13213 2003-05-27  Nick Drochak <ndrochak@gol.com>
13214
13215         * basic-long.cs: add regression test for (long)int * (long)int
13216         * cpu-pentium.md: add op_bigmul specification
13217         * inssel-long32.brg: add OP_BIGMUL rule
13218         * mini-ops.h: add OP_BIGMUL
13219         * mini-x86.c: register allocator: handle case where src1 needs to be
13220         in EAX.
13221         * mini.c: substitute special BIGMUL opcode in the tree for 
13222         (long)int * (long)int
13223
13224 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13225
13226         * jit-icalls.c: call the type ctor on field access if needed.
13227
13228 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13229
13230         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
13231         to a method (including results of ldelema, bug#43207).
13232
13233 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13234
13235         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
13236         colors to show exception handler blocks.
13237
13238         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
13239         (fix for pinvoke7.cs).
13240
13241 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13242
13243         * mini.h, mini.c: ensure correct initialization order for types that
13244         require it. Prepare for lazy compilation of jit icall wrappers.
13245         Provide a name for opcode emulation to reduce unneeded mallocing.
13246
13247 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13248
13249         * mini-x86.c: better register restoring code and profiling
13250         support for tail calls.
13251
13252 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13253
13254         * mini.h, driver.c: prepare for leaf methods optimization.
13255
13256 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13257
13258         * mini.c: get targets of branches before converting a method.
13259
13260 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
13261
13262         * mini.c (optimize_branches): added some experimental code (disbaled) 
13263
13264 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
13265
13266         * mini.c (optimize_branches): fix branch to branch optimization 
13267
13268         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
13269
13270         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
13271
13272         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
13273
13274         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
13275         if needed.
13276
13277 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13278
13279         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
13280         enable use of interface variables again.
13281
13282         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
13283         I1 to registers because there is no simply way to sign extend 8bit
13284         quantities in caller saved registers on x86.
13285
13286         * inssel-float.brg: set costs of some rules to 2 so
13287         that monobure always select the arch. specific ones if supplied,
13288         regardless of the order we pass the files to monoburg.
13289
13290 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13291
13292         * mini.c, mini-x86.c: since the magic trampoline for jumps
13293         can't patch the code directly, we do it as soon as the
13294         method gets compiled.
13295
13296 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13297
13298         * mini-x86.c, mini.h: introduce a new patching method
13299         to support CEE_JMP and tail calls.
13300         * mini.c: obey tail.call. Don't precompile methods target
13301         of CEE_JMP.
13302         * tramp-x86.c: new trampoline code to handle methods
13303         reached through a jump.
13304
13305 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
13306
13307         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
13308         bit values to registers
13309
13310 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
13311
13312         * mini.c (mono_compile_get_interface_var): share interface
13313         variables if possible.
13314
13315 2003-05-16  Martin Baulig  <martin@ximian.com>
13316
13317         * debug-mini.c (mono_init_debugger): New function to initialize
13318         the debugger.  This is not in the debugger since it needs to
13319         access some of mini's internals.
13320
13321 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13322
13323         * mini.c (mono_method_to_ir): inlining fixes/cleanups
13324
13325 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
13326
13327         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
13328         for value type handling.
13329
13330 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13331
13332         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
13333         (mono_method_check_inlining): enable inlining of all kinds of wrappers
13334
13335 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
13336
13337         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
13338           the constructor through a proxy.
13339
13340 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13341
13342         * jit-icalls.c, inssel.brg: fixes to array element address
13343         calculations.
13344
13345 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
13346
13347         * mini-x86.c (is_regsize_var): allocate pointer to registers
13348
13349 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13350
13351         * driver.c: fixed typo, added intrins to the set of optimizations
13352         tested with regressions.
13353
13354 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13355
13356         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
13357         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
13358         test case.
13359
13360 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
13361
13362         * inssel.brg: remove some common pop instructions without side effects
13363
13364 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13365
13366         * inssel-x86.brg: fixed thinko in int to double conversions.
13367
13368 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13369
13370         * mini.c, jit-icalls.c: added runtime thread-static variable support.
13371
13372 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13373
13374         * inssel-long32.brg: two more missing instructions.
13375
13376 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
13377
13378         * mini.c (mono_emit_call_args): set the cil_code for all arguments
13379         if not already set.
13380
13381 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
13382
13383         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
13384         correctly.
13385
13386         * basic-float.cs: Added tests for negative zero.
13387
13388 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13389
13390         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
13391         a couple of missing operations for long casts, with test cases.
13392
13393 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13394
13395         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
13396
13397 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
13398
13399         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
13400         code size estimation.
13401
13402 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
13403
13404         * mini.c (mono_jit_create_remoting_trampoline): make it work with
13405         abstract methods (fix bug 42542)
13406
13407         * aot.c: add ability to handle array types
13408         
13409 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
13410
13411         * mini.c: Call the _specific versions of the object allocation
13412         functions if possible.
13413
13414 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13415
13416         * driver.c: call setlocale ().
13417
13418 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13419
13420         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
13421         windows build.
13422
13423 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
13424
13425         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
13426
13427         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
13428         wrappers (fix bug 42122)
13429
13430 2003-05-04  Martin Baulig  <martin@ximian.com>
13431
13432         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
13433
13434         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
13435         s/mini_set_defaults/mono_set_defaults/g.
13436
13437 2003-05-04  Martin Baulig  <martin@ximian.com>
13438
13439         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
13440
13441 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13442
13443         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
13444         (reported by Don Roberts).
13445
13446 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
13447
13448         * mini.c: temporarily work around two bugs for this release.
13449
13450 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13451
13452         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
13453         that contains -export-dynamic and it makes using the ld script
13454         useless.
13455         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
13456
13457 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13458
13459         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
13460         specific cpu.
13461
13462 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13463
13464         * mini.c: make sure leave calls all the needed finally blocks,
13465         even when the target jumps out of multiple exception clauses.
13466
13467 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13468
13469         * ldscript, Makefile.am: add linker script to reduce the number of
13470         exported symbols (should also fix the issues with libwine defining
13471         some of the same symbols in io-layer).
13472
13473 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
13474
13475         * driver.c (mini_main): Avoid assertion when no file name is given on 
13476         the command line.
13477
13478 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
13479
13480         * driver.c: added --version/-V command line option.
13481         Added the inline optimization in the regression tests.
13482
13483 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13484
13485         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
13486         to the type in the method signature (fixes bug#42134).
13487
13488 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
13489
13490         * mini.c: when inlining, check this is not null only when needed (bug #42135).
13491
13492 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
13493
13494         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
13495
13496 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13497
13498         * driver.c: fixed bug #42100.
13499
13500 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
13501
13502         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
13503
13504 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13505
13506         * mini.c: moved most of the code required to do inlining to its own
13507         function so it can be reused. Inline also ctors if appropriate.
13508
13509 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
13510
13511         * Makefile.am: Link with -export-dynamic so shared libs loaded by
13512         the runtime can call mono API functions.
13513
13514 2003-04-27  Martin Baulig  <martin@ximian.com>
13515
13516         * debug-mini.c (mono_debug_init_method): Added
13517         `guint32 breakpoint_id' argument; if the method has a breakpoint,
13518         send a notification to the debugger.
13519
13520         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
13521         running in the Mono Debugger, just pass the breakpoint number to
13522         mono_debug_init_method().
13523
13524         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
13525
13526 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
13527
13528         * mini.c: allow some more unsafe compares.
13529
13530 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13531
13532         * mini-x86.c, Makefile.am: make distcheck works (partially from
13533         a patch by Richard Lee <r.h.lee@attbi.com>).
13534         * regset.c, regset.h: removed, they are unused.
13535
13536 2003-04-25  Dick Porter  <dick@ximian.com>
13537
13538         * driver.c: Usage reports the name as 'mono' not 'mini'
13539         * exceptions-x86.c: Build and run on freebsd
13540
13541 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13542
13543         * Makefile.am: install the program with the 'mono' name and
13544         the library as libmono instead of mini and libmini.
13545
13546 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13547
13548         * driver.c: provide the APIs for the embedding interface of the old jit.
13549
13550 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
13551
13552         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
13553
13554 2003-04-23  Martin Baulig  <martin@ximian.com>
13555
13556         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
13557
13558         * driver.c: Added `--debug' command line argument to enable
13559         debugging support.
13560
13561 2003-04-23  Martin Baulig  <martin@ximian.com>
13562
13563         * debug.[ch]: Removed.  The code is now in
13564         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
13565
13566         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
13567         last six months.
13568
13569 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
13570
13571         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
13572
13573 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13574
13575         * mini.c:
13576         (mini_cleanup): moved mono_runtime_cleanup call after the call to
13577         mono_domain_finalize.
13578         (mini_method_compile): use mono_method_profile* if the the option is
13579         enabled.
13580
13581 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
13582
13583         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13584         methods with their wrapper.
13585
13586         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13587         methods with their wrapper.
13588
13589         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
13590         their wrapper.
13591
13592         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
13593         wrapper.
13594
13595         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
13596         methods.
13597
13598 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
13599
13600         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
13601
13602 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
13603
13604         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
13605         of the mempool. This is slightly faster and uses less memory
13606
13607 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13608
13609         * mini.c: avoid O(n) allocation for variables.
13610
13611 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13612
13613         * mini.c: handle items on the stack after inlining methods.
13614
13615 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13616
13617         * mini.c: make the method->opcode optimization dependent
13618         on MONO_OPT_INSTRINS and do it lazily.
13619
13620 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13621
13622         * driver.c: print overall results at the end of regression run.
13623
13624 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13625
13626         * inssel.brg: don't overwrite symbolic registers.
13627
13628 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13629
13630         * inssel-x86.brg: fix conversion from long to float.
13631
13632 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
13633
13634         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
13635
13636 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
13637
13638         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
13639
13640         * driver.c: Added --print-vtable option as in the old JIT.
13641
13642 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13643
13644         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
13645
13646 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13647
13648         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
13649
13650 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
13651
13652         * mini.c regalloc.c regalloc.h: Fix memory leak.
13653
13654 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
13655
13656         * aot.c (mono_aot_get_method): register all used strings
13657
13658 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13659
13660         * mini.c: always intern strings references with ldstr at compile time.
13661
13662 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13663
13664         * Makefile.am: add BUILT_SOURCES.
13665
13666 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13667
13668         * driver.c: give a better error message when the assembly to execute
13669         doesn't have an entry point.
13670
13671 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
13672
13673         * Makefile.am: added hack for automake
13674
13675         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
13676         correct sematics.
13677
13678         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
13679
13680 22003-04-07  Martin Baulig  <martin@ximian.com>
13681
13682         * Makefile.am: Added Makefile.am.
13683
13684         * debugger-main.c: Removed, this is now in the debugger where it
13685         belongs.
13686
13687         * mini.pc.in: Call this package `mini' for the moment.
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697