2008-06-13 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2
3         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
4         intrinsics.
5
6         * mini-ops.h: Add MIN/MAX_UN opcodes.
7
8         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
9         intrinsics.
10
11         * basic-math.cs: Add more min/max tests.
12
13         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
14
15 2008-06-13  Mark Probst  <mark.probst@gmail.com>
16
17         * mini.c: Small fix in the prologue of emit_castclass.
18
19 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
20
21         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
22
23         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
24         do not work even for unsigned types. Fixes #400014.
25
26         * basic-math.cs: Add regression tests for unsigned Min/Max.
27
28 2008-06-13  Mark Probst  <mark.probst@gmail.com>
29
30         * mini.c: Added additional context_used argument to several
31         functions, which will be needed for sharing generic methods.  Use
32         GET_RGCTX macro wherever appropriate.  Declare only one
33         context_used in mono_method_to_ir().
34
35 2008-06-13  Mark Probst  <mark.probst@gmail.com>
36
37         * mini.c, generic-sharing.c: Removed generic class relations.
38
39         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
40         functions due to MRGCTX changes.
41
42 2008-06-13  Mark Probst  <mark.probst@gmail.com>
43
44         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
45         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
46         with calculated IMT.
47
48         * mini.c: Generic sharing of calls via generic interfaces.
49
50         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
51         generic method with non-constant MonoGenericContext*.  Instead,
52         the context is taken out of the method itself.
53
54 2008-06-13  Mark Probst  <mark.probst@gmail.com>
55
56         * mini.c: Generic sharing of ldvirtftn.
57
58 2008-06-13  Mark Probst  <mark.probst@gmail.com>
59
60         * mini.c: Generic sharing of ldftn.
61
62 2008-06-13  Mark Probst  <mark.probst@gmail.com>
63
64         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
65
66 2008-06-13  Mark Probst  <mark.probst@gmail.com>
67
68         * mini.c: Generic sharing of the special case of ldtoken followed
69         by a call to GetTypeFromHandle.
70
71 2008-06-13  Mark Probst  <mark.probst@gmail.com>
72
73         * mini.c: Generic sharing of box for nullable types.
74
75 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
76
77         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
78         are passed on the stack. Fixes #324807.
79
80 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
81
82         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
83         for the ArgValuetypeAddrInIReg case.
84
85         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
86         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
87
88         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
89         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
90         local variable and pass the local variable by reference to the called method.
91           
92         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
93         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
94
95         Contributed under MIT/X11 license.
96
97 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
98
99         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
100
101         * debug-mini.c (mono_debug_print_vars): Release memory after printing
102         everything.
103
104 2008-06-10  Martin Baulig  <martin@ximian.com>
105
106         * debug-mini.c
107         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
108
109 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
110
111         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
112         possible error when no arguments are passed.
113
114         Contributed under MIT/X11 license.
115
116 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
117
118         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
119         where the file name is NULL.
120
121 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
122
123         * mini.c: Fix s390 build.
124
125 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
126
127         * trace.c (mono_trace_parse_options): Fix warnings.
128
129         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
130
131 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
132
133         * mini.c (remove_block_if_useless): Avoid printing the method name.
134         
135         * mini.c: Remove needless setting of ins->cil_code which is now done by 
136         MONO_INST_NEW.
137
138         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
139         LMF. Not yet used.
140
141         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
142         translated code after it has been patched.
143
144 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
145
146         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
147         avoid problems during code patching on SMP systems.
148         (emit_call): Avoid adding a patch info which is already added by 
149         emit_call_body.
150         (mono_arch_emit_exceptions): Ditto.
151
152 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
153
154         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
155         MONO_TYPE_ISSTRUCT already checks for it.
156
157 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
158
159         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
160           structs with floats on Winx64 the float registers are not used.  
161           The integer registers are always used..
162         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
163           only one register will be used and only if the size of the struct 
164           is 1,2,4, or 8 bytes.
165
166         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
167           to work for Winx64.
168
169         Contributed under MIT/X11 license.
170
171 2008-06-05  Martin Baulig  <martin@ximian.com>
172
173         * debug-debugger.c (debugger_lookup_class): Also call
174         mono_class_setup_methods() here; we're only called from RTI.
175
176 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
177
178         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
179         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
180         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
181         Post-process object files and add dtrace-generated object, if necessary.
182
183         Contributed under MIT/X11 license.
184
185 2008-06-04  Mark Probst  <mark.probst@gmail.com>
186
187         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
188         element class.
189
190         * mini.c: Generic sharing for unbox.any and castclass.
191
192 2008-06-04  Mark Probst  <mark.probst@gmail.com>
193
194         * mini.c: Ignore tailcall prefix in shared generic code and when
195         doing calls which require a vtable/rgctx argument.
196
197 2008-06-04  Mark Probst  <mark.probst@gmail.com>
198
199         * mini.c: Don't free the JIT info.
200
201         * driver.c: Changes in the JIT info table testing code.
202
203 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
204
205         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
206         interruption. Fix some warnings.
207
208         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
209         interruption_checkpoint.
210
211 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
212
213         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
214         from embedding applications.
215
216 2008-06-02  William Holmes  <billholmes54@gmail.com>
217
218         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
219           reserving 32 bytes on the stack when making calls. 
220
221         Contributed under MIT/X11 license.
222
223 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
224
225         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
226         the linear IL branch.
227
228         * driver.c: Print out more information for --version on arm.
229
230 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
231
232         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
233         bb_exit instead, since out of line bblocks might not actually be emitted
234         out-of-line.
235         
236         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
237         maximum epilog size for out of line bblocks if tracing is enabled.
238
239         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
240
241 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
242
243         * arrays.cs: Regression tests for allocating arrays with negative sizes.
244
245 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
246
247         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
248         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
249         opcodes.
250
251 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
252
253         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
254         the 'value' to store is a constant.
255
256         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
257
258         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
259         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
260
261 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
262
263         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
264         for accessing method->generic_container.
265
266 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
267
268         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
269         
270         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
271
272         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
273
274         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
275         fails.
276
277 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
278
279         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
280
281         * mini.c: Handle the case when mono_class_vtable () fails.
282
283 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
284         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
285         the stat profiler.
286
287 2008-05-22  Mark Probst  <mark.probst@gmail.com>
288
289         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
290         together with domain sharing.
291
292 2008-05-22  Mark Probst  <mark.probst@gmail.com>
293
294         * mini.c: Treat callvirts to final methods like non-virtual calls
295         when doing generic sharing, i.e. look them up in the runtime
296         generic context.
297
298 2008-05-22  Mark Probst  <mark.probst@gmail.com>
299
300         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
301         with computed types (for generic sharing).
302
303         * mini.c: Generic sharing for mkrefany and refanyval.
304
305 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
306
307         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
308         possible.
309
310         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
311         the generic sharing code.
312         
313         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
314         when needed.
315
316 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
317
318         * mini.h: Remove the declaration of mono_aot_init_vtable ().
319
320 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
321
322         * driver.c: updated copyright date
323
324 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
325
326         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
327         needed.
328
329 2008-05-19  Martin Baulig  <martin@ximian.com>
330
331         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
332         pointing to the new `_mono_debug_using_mono_debugger' variable.
333
334         * driver.c
335         (mono_main): Check mono_debug_using_mono_debugger() rather than
336         the `MONO_INSIDE_MDB' environment variable to check whether we're
337         inside the debugger.
338
339 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
340
341         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
342         argument.
343
344 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
345
346         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
347
348         * mini.c: Added mini_assembly_can_skip_verification. This
349         function checks if the assembly requested to skip verification. 
350         Fixes part of #387274.
351
352 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
353
354         * mini.c (mini_get_method): Disable the check for open generic classes when
355         using generic sharing.
356
357         * generics.cs: Add a test #387034.
358
359         * mini.c (mini_get_method): Check whenever the method class is an open generic
360         type, and return NULL in that case, causing a verification error. Fixes
361         #384123.
362
363 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
364
365         * driver.c (mono_main): Revert r102623. The right
366         thing to do is to enable the verifier under verifiable
367         unless a --security flag was passed.
368
369         We need this non-trivial behavior for --verify-all otherwise
370         mcs-compileall won't be able to use it. As it needs everything to
371         be verified under validil.
372
373 2008-05-06  Martin Baulig  <martin@ximian.com>
374
375         Fix #383749.
376
377         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
378         (mono_debugger_thread_cleanup): Likewise.
379         (mono_debugger_extended_notification): Likewise.
380
381 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
382
383         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
384         against both inflated and non-inflated methods. We need to check against the
385         generic definition for cases where the instantiated method is not visible.
386         We need to check against the inflated types for cases where the instantiation
387         changes any super type. This fixes #382986.
388
389         Note that this doesn't need to be applied to other parts of mono_method_to_ir
390         that check for visibiliy as generic params only appears as the type subject
391         of tokens on call opcodes. Field manipulation and ldftn must always
392         target an exact type.
393
394 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
395
396         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
397         if no related --security flag is passed.
398
399 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
400
401         * mini-arch.h: Prepare support for ppc64.
402
403         Contributed under MIT/X11 license.
404
405 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
406
407         * aot-runtime.c: Prepare support for ppc64.
408
409         Contributed under MIT/X11 license.
410
411 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
412
413         * mini-ops.h: Prepare support for ppc64.
414
415         Contributed under MIT/X11 license.
416
417 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
418
419         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
420
421         Contributed under MIT/X11 license.
422
423 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
424
425         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
426         assemblies, since aot_name is not a full path, causing us to load MS.NET 
427         assemblies on windows.
428
429 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
430
431         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
432         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
433         * main.c: Use UTF-8 encoded command line instead of Windows default code
434         page on Windows to support Unicode.
435         * driver.c (DllMain): New function for mixed-mode assembly support.
436         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
437         export __stdcall functions without decoration.
438
439         Contributed under MIT/X11 license.
440
441 2008-04-28  Mark Probst  <mark.probst@gmail.com>
442
443         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
444         saving it very early.
445
446 2008-04-28  Mark Probst  <mark.probst@gmail.com>
447
448         * mini.h, mini.c: Lots of code for accessing the old RGCTX
449         deleted.  The only way to access the new RGCTX is via the
450         trampline.
451
452         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
453         vtable instead of the RGCTX to static methods.
454
455         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
456         accessing the new RGCTX.
457
458         * generic-sharing.c: There is no separation between self, type
459         arguments and other types in the RGCTX anymore.
460
461 2008-04-25  Jonathan Chambers <joncham@gmail.com>
462
463         * mini-amd64.c (add_general): Remove previous stack adjustment.
464         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
465         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
466         for 32 bytes of stack space reserved for all calls.
467         
468         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
469         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
470         adjustment.
471         
472         Code contributed under MIT/X11 license.
473
474 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
475
476         * mini.c (mini_method_verify): Only verify non-inflated methods, check
477         against the root definition, peeling out method and type instantiations.
478         Cache verify success results, code that fails verification is still
479         checked multiple times.
480
481 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
482
483         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
484
485 2008-04-23  Jonathan Chambers <joncham@gmail.com>
486
487         * mini-amd64.c (add_general): Always increment stack on Win64.
488         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
489         on Win64.
490         
491         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
492         stack based argument handling on Win64.
493         
494         Code contributed under MIT/X11 license.
495
496 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
497
498         * Makefile.am (version.h): Add support for git-svn.
499
500 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
501
502         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
503         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
504         avoiding allocations and libc functions which might deadlock.
505         
506         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
507         'no-gdb-backtrace' option is set.
508
509         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
510
511         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
512
513 2008-04-21  Martin Baulig  <martin@ximian.com>
514
515         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
516         and `get_lmf_addr'; `notification_address' is no longer a pointer.
517
518 2008-04-21  Martin Baulig  <martin@ximian.com>
519
520         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
521         `thread_vtable', `event_handler_ptr' and `event_handler'.
522
523 2008-04-21  Martin Baulig  <martin@ximian.com>
524
525         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
526         allows delayed initialization of the `executable_code_buffer' when
527         attaching.
528
529 2008-04-21  Martin Baulig  <martin@ximian.com>
530
531         * mini.h (mono_debugger_create_notification_function): Removed.
532         * tramp-*.c (mono_debugger_create_notification_function): Removed.
533
534         * mdb-debug-info64.s
535         (MONO_DEBUGGER__notification_function): Added this in the .text section.
536
537         * mdb-debug-info32.s
538         (MONO_DEBUGGER__notification_function): Added this in the .text section.
539
540         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
541         currently only works on x86 and x86_64, so don't create it on ppc.
542
543 2008-04-21  Martin Baulig  <martin@ximian.com>
544
545         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
546
547         * mini.c
548         (mini_method_compile): In the fp elimination check, check
549         `debug_options.mdb_optimizations' in addition to
550         mono_debug_using_mono_debugger().       
551
552         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
553         disable some JIT optimizations which are only disabled when
554         running inside the debugger.
555         Added `--help-debug' option to describe the debugging options.
556         (parse_debug_options): New static function to parse the `--debug'
557         options, so we can easily add more stuff in future.
558
559 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
560
561         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
562         the method has no body.
563
564 2008-04-19  Jonathan Chambers <joncham@gmail.com>
565
566         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
567         assembly is not allowed in MSVC 64-bit compiler. 
568         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
569         as we get floating point exceptions everywhere.
570         
571         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
572         correctly align arguments for call to throw_exception.
573         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
574         
575         Code contributed under MIT/X11 license.
576
577 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
578
579         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
580
581 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
582
583         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
584
585         * mini-amd64.c (NEW_INS): Set cil_code.
586
587         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
588         from mini-amd64.c so all debugger related logic is in one place.
589
590         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
591         later won't have a random ip assigned to them.
592
593 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
594
595         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
596         the arch specific function initializes code_size.
597         (mono_create_delegate_trampoline): Ditto.
598
599         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
600         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
601         platforms.
602
603         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
604         running under the debugger.
605
606         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
607         debugger.
608
609         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
610         debugger. Also move the disabling of optimizations here from driver.c.
611         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
612         debugger.
613
614         * mini.h (MonoCompile): Add a few new flags.
615
616 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
617
618         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
619         so the cil_code field of created MonoInst's is properly set.
620         (mini_select_instructions): Ditto.
621
622         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
623         (MONO_INST_NEW_CALL): Ditto.
624
625         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
626         in many places so the ins->cil_code field is properly initialized.
627
628         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
629         place.
630
631 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
632
633         * mini.c (mini_method_compile): Print a different message when compiling a 
634         shared method.
635         
636         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
637         > 1.
638
639 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
640
641         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
642         SSE2 instructions.
643
644         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
645         
646 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
647
648         * mini.c (handle_stack_args): Make this return void since its return value was
649         never used. Also set cfg->unverifiable for invalid IL instead of calling
650         G_BREAKPOINT ().
651
652 2008-04-10  Mark Probst  <mark.probst@gmail.com>
653
654         * mini.c: Make sure "this" is live in catch clauses with type
655         variables in shared generic code.
656
657 2008-04-08  Mark Probst  <mark.probst@gmail.com>
658
659         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
660         generic_class_is_reference_type() to ensure the proper behaviour
661         when sharing generic code and the type in question is a type
662         argument.
663
664 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
665
666         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
667         race conditions when printing thread dumps. Fixes #377738.
668
669 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
670         
671         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
672         shows up when both MonoInst arguments can cause aliasig.
673         There is likely no way in the current JIT to trigger this problem, but
674         it showed up in the development of generics sharing, when in a new
675         opcode both args of an OP_GROUP can be aliases (addresses of a local).
676         When the generics sharing code will be committed, its tests will be
677         valid also for this bug.
678
679 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
680
681         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
682         PATCH_INFO_METHOD.
683
684         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
685         NULL.
686
687 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
688
689         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
690         use a more detailed exception message for InvalidCastException.
691
692         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
693
694         * driver.c (mono_main): Add --debug=casts option to turn on better 
695         InvalidCastException message details.
696
697         * mini.c (mini_get_debug_options): New helper function to return the address of
698         the debug_options variable.
699
700         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
701         the jit_tls TLS variable.
702
703         * mini.c (mono_jit_tls): New TLS variable.
704
705         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
706         option is used.
707
708 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
709
710         * mini.h: Removed verifer related stuff. This code was moved to verify.c
711
712         * mini.c: Removed verifer related stuff, code moved to verify.c.
713
714         * driver.c: Using code from verify.c instead of mini.c.
715
716 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
717
718         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
719         longer valid.
720
721 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
722
723         * mini.c (check_for_method_verify): Enabling verification of
724         corlib if mono_verify_all is set. Bugs in the verifier preventing that
725         have been fixed.
726
727 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
728
729         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
730         caller saved registers as well.
731         
732         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
733         saved registers as well.
734
735 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
736
737         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
738
739         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
740         code.
741
742 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
743
744         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
745         to get_call_info.
746         (get_call_info): Take a gsctx argument instead of 'cfg'.
747
748 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
749
750         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
751         mono_verify_all is set.
752
753         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
754
755         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
756
757 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
758
759         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
760         an exception.
761
762         * driver.c mini.c mini.h: Add a --verify-all development option to test the
763         verifier and the code generated by the compiler.
764
765 2008-03-25  Mark Probst  <mark.probst@gmail.com>
766
767         * mini.c: Generic sharing of the non-nullable case of the box
768         instruction.
769
770 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
771
772         * inssel.brg: Fix the build.
773
774         * iltests.il.in: Add a test for lconv.ovf.u8.un.
775
776 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
777
778         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
779         Array:Address. Fixes #372410.
780
781         * iltests.il.in: New tests for readonly prefix.
782
783 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
784
785         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
786         mini-trampolines.c.
787
788         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
789         mini-exceptions.c.
790
791         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
792         
793         * mini.c (mono_decompose_op_imm): New helper function.
794
795         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
796         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
797         return value.
798
799         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
800         mono_arch_output_basic_block. Fix warnings.
801
802         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
803         for now.
804
805 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
806
807         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
808         since the extra frame is now detected automatically inside the loop.
809
810         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
811         opts which are now in mono_peephole_ins ().
812         
813         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
814
815         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
816         frames and skip duplicate managed-to-native frames. Fixes #367665.
817
818         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
819         opts which are now in mono_peephole_ins ().
820         (mono_arch_peephole_pass_2): Ditto.
821
822         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
823
824         * mini-codegen.c (mono_peephole_ins): New helper function containing the
825         arch independent peephole optimizations.
826
827         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
828         opts which are now in mono_peephole_ins ().
829
830         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
831         
832         * mini-s390.c (mono_arch_output_basic_block): Fix build.
833
834         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
835         pattern.
836
837         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
838         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
839         opcode. 
840
841 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
842
843         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
844         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
845         return value.
846
847         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
848         mono_arch_output_basic_block. Fix warnings.
849
850 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
851
852         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
853         conv.ovf.u.un.
854
855 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
856
857         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
858         conv.ovf.u.un.
859
860         * iltests.il: Add new tests.
861
862 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
863
864         * mini.c: Removed Windows version macros.
865
866 2008-03-20  Mark Probst  <mark.probst@gmail.com>
867
868         * generic-sharing.c: Put reflection types in the extensible part
869         of the runtime generic context.
870
871         * mini.c: Generic sharing of the GetTypeHandle special case of the
872         ldtoken instruction.
873
874 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
875
876         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
877
878         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
879         
880         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
881         consistency with the other version on the linear IR branch.
882
883         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
884
885         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
886
887         * iltests.il.in: Add new tests.
888
889 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
890
891         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
892
893         * iltests.il.in: Add new tests.
894
895 2008-03-19  Mark Probst  <mark.probst@gmail.com>
896
897         * mini.c: Two variables with the same name were declared in
898         nesting contexts and one wasn't initialized.  Fixed.
899
900 2008-03-19  Mark Probst  <mark.probst@gmail.com>
901
902         * mini.c: Generic sharing of the initobj instruction.
903
904 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
905
906         * mini.c: make the test to optimize ldtoken from typeof() more
907         precise.
908
909 2008-03-18  Mark Probst  <mark.probst@gmail.com>
910
911         * mini.c: Generic sharing of the initobj instruction for reference
912         types.
913
914 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
915
916         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
917         the mono_breakpoint_clean_code() code to perform bound checks.
918
919 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
920
921         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
922         mono_arch_patch_callsite() to include the start of the managed method
923         to be able to perform bound checks.
924
925 2008-03-17  Mark Probst  <mark.probst@gmail.com>
926
927         * mini.c: Generic sharing for the isinst instruction.
928
929 2008-03-17  Mark Probst  <mark.probst@gmail.com>
930
931         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
932         inssel-long32-mips.brg: Added opcodes for doing indirect calls
933         with the runtime generic context argument.
934
935         * mini.c: Share calls to several types of unsharable methods by
936         putting the address of the method code in the runtime generic
937         context and doing an indirect call.
938
939         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
940         to switches.
941
942 2008-03-16  Mark Probst  <mark.probst@gmail.com>
943
944         * generic-sharing.c: Change due to a change in the runtime genric
945         context API.
946
947 2008-03-15  Martin Baulig  <martin@ximian.com>
948
949         * tramp-x86.c
950         (mono_arch_nullify_class_init_trampoline): Add call to
951         mono_breakpoint_clean_code() to make things work when running
952         inside the debugger.
953
954         * tramp-amd64.c
955         (mono_arch_nullify_class_init_trampoline): Add call to
956         mono_breakpoint_clean_code() to make things work when running
957         inside the debugger.
958
959 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
960
961         * inssel-long.brg (reg): Fix 64 bit build.
962
963 2008-03-14  Mark Probst  <mark.probst@gmail.com>
964
965         * mini.c, mini.h: Share static generic code by passing it an
966         implicit argument pointing to the runtime generic context.
967
968         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
969         inssel-long32-mips.brg: New opcodes for calling shared static,
970         which need to be passed the runtime generic context.
971
972         * mini-amd64.c, mini-x86.c: Save the runtime generic context
973         argument on the stack in the prologue if needed.  New function for
974         finding the runtime generic context argument from the registers
975         saved by the trampoline.
976
977         * mini-amd64.h, mini-x86.h: Specify which register to use for the
978         runtime generic context argument.
979
980         * tramp-amd64.c: Also restore the register used for the runtime
981         generic context argument.
982
983         * mini-trampoline.c: Resolve shared static calls by consulting the
984         runtime generic context via the new argument.
985
986         * generic-sharing.c: Add an argument to sharability-checking
987         functions that specifies whether type variables should be treated
988         as sharable type arguments.
989
990         * inssel-x86.brg: Removed a superfluous, buggy rule.
991
992         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
993         to switches.
994
995 2008-03-14  Martin Baulig  <martin@ximian.com>
996
997         * debug-debugger.c (main_thread_handler): Call
998         mono_runtime_run_main() without sending any notifications.
999
1000         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
1001
1002 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
1003
1004         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
1005
1006 2008-03-14  Mark Probst  <mark.probst@gmail.com>
1007
1008         * tramp-x86.c: Fixed register restore offsets in the trampoline
1009         code for ECX and EDX.
1010
1011 2008-03-12  Geoff Norton  <gnorton@novell.com>
1012
1013         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
1014         different ucontext_t implementations.
1015         * exceptions-arm.c: Use the above defines to get exceptions working on 
1016         iPhone (based on a patch by Luke Howard lukeh@padl.com)
1017         * mini-arm.c: Implement iPhone icache support (based on a patch by
1018         Luke Howard lukeh@padl.com)
1019
1020 2008-03-12  Mark Probst  <mark.probst@gmail.com>
1021
1022         * mini.c: Enable generic sharing of calls to non-static
1023         non-interface non-generic non-value-type methods.
1024
1025         * mini-trampolines.c: Resolve calls from shared generic code.
1026
1027 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
1028
1029         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
1030
1031         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
1032
1033 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
1034
1035         * mini.c: some fixes for the AOT compiler.
1036
1037 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
1038
1039         * cpu-amd64.md: Add clob:1 to some float opcodes.
1040
1041 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
1042
1043         * mini.h: Added MiniVerifierMode enumeration.
1044
1045         * mini.c: Added mini_verifier_set_mode to control
1046         the usage of the new verifier.
1047
1048         * mini.c (mono_method): Integrated the new verifier.
1049
1050         * driver.c: Extended --security option with validil and
1051         verifiable options to activate the new verifier.
1052
1053 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
1054
1055         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
1056         optimization to ctors taking 0 or 2 arguments too.
1057
1058         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
1059         a bit.
1060
1061         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
1062
1063         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
1064
1065 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
1066
1067         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
1068         non-aot case as well.
1069
1070         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
1071
1072         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
1073         changes.
1074
1075         * aot-compiler.c (encode_patch): Ditto.
1076
1077         * mini.h (G_MININT32): Fix the definition of this.
1078
1079 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
1080
1081         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
1082
1083         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
1084
1085 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
1086
1087         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
1088         methods returning vtypes in registers.
1089         (mono_arch_allocate_vars): Ditto.
1090
1091         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
1092
1093         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
1094
1095         * generics.cs: Add a test from the linear IR branch.
1096
1097         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
1098
1099         * mini.c (inline_method): Cache failed inline attempts.
1100
1101 2008-03-04  Mark Probst  <mark.probst@gmail.com>
1102
1103         * mini.c: For shared methods of generic classes put the location
1104         of "this" into the MonoGenericJitInfo.
1105
1106         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
1107         register out of a MonoContext by register number.  Add the generic
1108         sharing context as an argument to mono_arch_find_this_argument().
1109
1110         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
1111         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
1112         for new arch function.
1113
1114         * mini-exception.c: Handle open exception clauses in shared
1115         generic code.
1116
1117         * mini-trampolines.c: Supply additional argument to
1118         mono_arch_find_this_argument().
1119
1120 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
1121
1122         * Makefile.am (regtests): Run the bench.exe tests last.
1123
1124 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
1125
1126         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
1127         a bit.
1128
1129 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
1130
1131         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
1132         with MS.
1133
1134         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
1135         
1136         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
1137
1138         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
1139         whose class has no cctor.
1140
1141         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
1142
1143 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
1144
1145         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
1146         unverified.
1147
1148 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
1149
1150         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
1151         to be in sync with the code on the linear IR branch.
1152
1153         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
1154
1155         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
1156
1157 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
1158
1159         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
1160
1161         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
1162
1163         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
1164
1165         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
1166
1167         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
1168         
1169         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
1170         body.
1171
1172 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
1173
1174         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
1175         OP_LOADR4_MEMBASE emission.
1176
1177         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
1178         (mono_spillvar_offset_float): Ditto.
1179
1180         * mini-mips.c (mono_arch_emit_prolog): Ditto.
1181
1182         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
1183         emission.
1184
1185         * basic-long.cs: Add regression tests for them.
1186
1187         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
1188         use.
1189         (mono_arch_allocate_vars): Fix representation of single-precision float
1190         argument.
1191         (mono_arch_output_basic_block): Ditto.
1192
1193         * inssel-mips.brg: Ditto, remove duplicate items.
1194
1195         * mini-mips.c (emit_load_volatile_arguments): New function to handle
1196         arguments of tail calls as on other platforms.
1197         (mono_arch_output_basic_block): Handle tail calls.
1198
1199         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
1200         register.
1201
1202         * objects.cs (test_5_pass_static_struct): Add test for it.
1203
1204         Contributed under MIT/X11 license.
1205
1206 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
1207
1208         * Makefile.am: Use gmcs for compiling the regression tests.
1209
1210         * *.2.cs *.2.il: Rename to *.cs and *.il.
1211
1212 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
1213
1214         * regalloc.h: Make the vassign array smaller.
1215
1216         * mini.c (mini_method_compile): Remove an unused field in cfg.
1217
1218         * mini-codegen.c: Add a bunch of micro optimizations.
1219
1220 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
1221
1222         * regalloc.h: Remove some unused fields.
1223
1224 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
1225
1226         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
1227
1228         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
1229
1230 2008-02-22  Mark Probst  <mark.probst@gmail.com>
1231
1232         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
1233
1234         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
1235         trampoline: Fetch an entry from the runtime generic context.  If
1236         it's NULL, jump to the actual trampoline to fill the runtime
1237         generic context.  Otherwise, return it.
1238
1239         * mini.c: Call the lazy fetch trampoline to get entries out of the
1240         runtime generic context.
1241
1242         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
1243         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
1244         tramp-sparc.c: Stubs for the lazy fetch trampoline.
1245
1246 2008-02-21  Mark Probst  <mark.probst@gmail.com>
1247
1248         * mini.c: Fetch data out of the extensible part of the runtime
1249         generic context instead of calling a helper function.
1250
1251         * generic-sharing.c: Some functions moved into
1252         metadata/generic-sharing.c.  Helper function for fetching other
1253         types now checks and asserts against extensible rgctx (just for
1254         debugging purposes - the helper function isn't called anymore
1255         unless for debugging).
1256
1257 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1258
1259         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
1260         for tail calls up to the point that the tests in iltests.exe run. Also add a
1261         dummy CKFINITE implementation.
1262         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
1263         needed for trampoline LMF frames.
1264
1265         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
1266         trampoline LMF frames.
1267
1268 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
1269
1270         * mini.c (inline_method): clean any pending loader error when inlining fail.
1271         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
1272
1273 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1274
1275         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
1276
1277         * aot-runtime.c (decode_patch_info): Ditto.
1278
1279         * mini.c (mono_resolve_patch_target): Ditto.
1280         
1281         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
1282         icall wrappers.
1283
1284         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
1285         
1286         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
1287         if it references an icall address.
1288
1289 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
1290
1291         * cpu-s390x.md: Remove some more unused opcodes.
1292         
1293         * cpu-s390x.md: Remove some unused opcodes.
1294
1295         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
1296         mono_op_imm_to_op ().
1297
1298         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
1299         instead of a switch statement.
1300         
1301         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
1302         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
1303
1304         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
1305         
1306         * mini-codegen.c: Remove unused mono_regstate2_... functions.
1307
1308         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
1309         -1.
1310
1311 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
1312
1313         * driver.c (mono_main): Improve error reporting when an assembly cannot be
1314         opened. Fixes #362607.
1315
1316         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
1317
1318         * iltests.il.in: Add a test for static methods in interfaces.
1319
1320 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
1321
1322         * genmdesc.c (build_table): Fix a crash on older glib versions.
1323
1324         * cpu-sparc.md: Remove some unused opcodes.
1325         
1326         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
1327         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
1328
1329         * cpu-amd64.md: Remove some unused opcodes.
1330
1331         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
1332         like the other opcodes.
1333
1334 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
1335
1336         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
1337
1338         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
1339
1340         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
1341         variables 'cfg' instead of 'm' for consistency.
1342
1343         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
1344
1345         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
1346         argument holding the vtype return address, to avoid the ambigious use of
1347         cfg->ret for this purpose.
1348
1349         * mini.c (NEW_RETLOADA): Use vret_addr if set.
1350
1351         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
1352         
1353         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
1354         new mono_print_ins () function which only takes one argument.
1355
1356 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
1357
1358         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
1359         macro arguments.
1360
1361 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
1362
1363         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
1364
1365         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
1366
1367         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
1368         opcodes and other small changes.
1369
1370         * mini-ops.h: Add some new opcodes from the linear IR branch.
1371
1372         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
1373
1374         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
1375         opcodes, use the REG_MEMBASE opcodes instead.
1376         
1377         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
1378         opcodes, use the REG_MEMBASE opcodes instead.
1379         
1380         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
1381         linear IR branch.
1382
1383         * mini.c (mono_op_imm_to_op): New helper function.
1384
1385         * mini-ops.h: Add some opcodes from linear IR branch.
1386
1387 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
1388
1389         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
1390         <tsv@solvo.ru>.
1391
1392 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
1393
1394         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
1395         OP_ICONV_TO_R4/R8.
1396
1397         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
1398
1399 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
1400
1401         * aot-compiler.c (emit_method_code): Add an assert.
1402
1403         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
1404         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
1405         methods.
1406
1407 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
1408
1409         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
1410         some load/store opcodes so they are consistent. 
1411         (mono_arch_emit_prolog): Simplify some code.
1412
1413         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
1414
1415         * objects.cs: Add tests for large argument offsets on ARM.
1416
1417         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
1418         stack offsets. Fixes #359651.
1419
1420         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
1421
1422         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
1423
1424         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
1425
1426         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
1427
1428         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
1429
1430         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
1431         rid of CEE_CONV_R_UN.
1432
1433         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
1434
1435 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
1436
1437         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
1438
1439         * mini.c (mono_normalize_opcodes): Add some more opcodes.
1440
1441         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
1442
1443         * cpu-amd64.md: Remove some unused opcodes.
1444
1445         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
1446
1447         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
1448
1449         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
1450         arch specific functions for its parts. Call the peephole pass after local
1451         regalloc so the prolog can compute a more accurate max_offset.
1452         
1453         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
1454         the corresponding OP_I/OP_L opcodes.
1455
1456         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
1457
1458         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
1459
1460 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1461
1462         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
1463         as they are handled in mini.c.
1464
1465         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
1466         
1467         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
1468         case since it is handled in mini.c.
1469
1470         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
1471
1472         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
1473
1474         * *.c: Use the new opcodes in the IR and back end code.
1475
1476         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
1477
1478         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
1479
1480 2008-02-06  Mark Probst  <mark.probst@gmail.com>
1481
1482         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
1483         an assert because it has a race condition.
1484
1485 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
1486
1487         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
1488
1489         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
1490
1491         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
1492
1493         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
1494         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
1495
1496 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
1497
1498         * cpu-amd64.md (move): Correct the maximum size of move.
1499
1500 2008-02-05  Mark Probst  <mark.probst@gmail.com>
1501
1502         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
1503         the generic class init trampoline to return quickly if the class
1504         is already inited.
1505
1506 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
1507
1508         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
1509         issues where an 32 bit callsite cannot be patched by a 64 bit address.
1510
1511 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
1512
1513         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
1514         branch.
1515
1516 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
1517
1518         * objects.cs: Add some soft-float tests.
1519
1520         * mini.c: Fix a couple more soft-float issues.
1521
1522         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
1523
1524         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
1525         avoid a REX prefix.
1526
1527 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
1528
1529         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
1530         exception happens while compiling a virtual method.
1531
1532 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
1533
1534         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
1535         
1536         * mini-sparc.c: Fix build.
1537
1538         * mini-sparc.c (get_call_info): Add support for generic sharing.
1539
1540         * mini-exceptions.c: Add a FIXME.
1541
1542 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
1543
1544         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
1545         altstack handling code.
1546
1547         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
1548         
1549         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
1550
1551         * mini-s390.c: Add support for generic sharing.
1552
1553         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1554         Fix CAS on s390.
1555         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1556
1557         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
1558
1559         * mini-s390x.c: Add support for generic sharing.
1560         
1561         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
1562         Fix CAS on ia64.
1563         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
1564
1565         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
1566         can be used since it takes a 16 bit signed immediate.
1567
1568         * inssel-s390x.brg: Fix OP_SETRET.
1569
1570         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
1571
1572         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
1573
1574         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
1575
1576         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
1577
1578         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
1579         in one place.
1580
1581         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
1582         stuff.
1583
1584         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
1585         of the unused mono_arch_patch_delegate_trampoline stuff.
1586
1587 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
1588
1589         * basic-long.cs: Move the fp related tests to basic-float.cs.
1590
1591         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
1592
1593         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
1594
1595         * basic-calls.cs: Add a test for proper float argument passing.
1596
1597         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
1598         if the context corresponds to an exception received through a signal.
1599
1600         * exceptions.cs: Add a test for nullref handling at the start of a try
1601         clause.
1602
1603         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
1604
1605         * jit-icalls.c (mono_break): New JIT icall.
1606
1607         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
1608
1609         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
1610
1611 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
1612
1613         * cpu-*.md: Get rid of unused opcodes.
1614
1615         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
1616
1617         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
1618         by all platforms.
1619
1620         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
1621         define.
1622
1623         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
1624         the arch independent trampoline code in mini-trampolines.c.
1625
1626         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
1627
1628         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
1629
1630         * mini-s390.h: Remove an unused define.
1631         
1632         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
1633         the arch independent trampoline code in mini-trampolines.c.
1634
1635         * mini-arm.c (mono_arch_emit_prolog): Fix build.
1636
1637 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
1638
1639         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
1640
1641         * mini-s390.c (mono_arch_emit_prolog): Fix build.
1642
1643         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
1644
1645         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
1646
1647         * cpu-amd64.md: Use smaller sizes for int opcodes.
1648
1649         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
1650
1651         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
1652         objects.cs.
1653
1654         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
1655         debugging.
1656
1657         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
1658         instead of though a pointer to save an indirection when accessing elements of
1659         the array.
1660
1661         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
1662         some typos.
1663         (NOT_IMPLEMENTED): New helper macro.
1664         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
1665         of a bb.
1666
1667         * *.c: Use the new helper macro.
1668
1669 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
1670
1671         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
1672
1673 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
1674
1675         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
1676         stack slots.
1677
1678 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
1679
1680         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
1681         profiling is enabled.
1682         
1683         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
1684         the end.
1685         (mono_arch_emit_prolog): Add more first bblock optimizations.
1686
1687         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
1688         in order if possible.
1689         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
1690         bblock, since the arguments are still in their original registers.
1691
1692         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
1693
1694 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
1695
1696         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
1697         as well.
1698
1699         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
1700         offset 0.
1701
1702         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
1703
1704         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
1705         process async exceptions received while in unmanaged code.
1706
1707         * mini.c (mini_init): Install a callback with the runtime which will be called
1708         when a thread receives an async exception while in unmanaged code.
1709
1710         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
1711
1712         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
1713
1714 2008-01-16  Wade Berrier  <wberrier@novell.com>
1715
1716         * cpu-g4.md:
1717         * cpu-arm.md:
1718         * cpu-s390x.md:
1719         fix build
1720
1721 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
1722
1723         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
1724         compilation with sun cc.
1725
1726         * cpu-*.md: Fix the build.
1727
1728         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
1729
1730         * mini-amd64.h: Add some comments to the MonoLMF structure.
1731
1732         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
1733         
1734         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
1735         in the LMF structure if possible. This saves two instructions in the
1736         managed->native wrappers.
1737
1738         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
1739
1740 2008-01-16  Mark Probst  <mark.probst@gmail.com>
1741
1742         * generic-sharing.c: New type argument lookup code which uses the
1743         runtime generic context template.
1744
1745 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
1746
1747         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
1748
1749         * mini-arm.c (add_general): Fix arm eabi parameter passing.
1750         (mono_arch_output_basic_block): Fix localloc implementation.
1751
1752         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
1753
1754         * mini-ia64.c (peephole_pass): Fix ia64 build.
1755
1756         * mini-amd64.c (peephole_pass): Fix a warning.
1757         
1758         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
1759         at a constant offset from sp/fp.
1760
1761         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
1762         instead of obtaining it from *lmf in the managed method case.
1763
1764 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
1765
1766         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
1767
1768 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
1769
1770         * mini.h (MonoInstList): New type.
1771         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
1772         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
1773         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
1774         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
1775         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
1776         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
1777         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
1778         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
1779         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
1780         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
1781         MONO_INST_LIST_FOR_EACH_ENTRY,
1782         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
1783         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
1784         mono_inst_list_first, mono_inst_list_last,
1785         mono_inst_list_next, mono_inst_list_prev): New instruction
1786         list handling interfaces.
1787         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
1788         list head 'ins_list'.
1789         (MonoInst): Replace next pointer with list head 'node'.
1790         (MonoCallInst): Make 'out_args' a MonoInstList.
1791         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
1792         (MonoCompile): Delete reverse_inst_list and
1793         reverse_inst_list_len.
1794         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
1795         mono_arch_lowering_pass, mono_arch_local_regalloc,
1796         mono_arch_output_basic_block, mono_arch_emit_prolog):
1797         Convert to new instruction lists.
1798         (insert_after_ins): Delete.
1799         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
1800         instruction lists.
1801         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
1802         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
1803         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
1804         mono_emulate_opcode, mono_emit_load_got_addr,
1805         inline_method, mono_method_to_ir, mono_print_bb_code,
1806         print_dfn, decompose_pass, nullify_basic_block,
1807         replace_out_block_in_code, remove_block_if_useless,
1808         merge_basic_blocks, move_basic_block_to_end,
1809         try_unsigned_compare, optimize_branches, mono_print_code,
1810         mini_select_instructions, remove_critical_edges): Likewise.
1811         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
1812         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
1813         mono_arch_output_basic_block, mono_arch_emit_prolog):
1814         Likewise.
1815         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
1816         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1817         mono_arch_output_basic_block): Likewise.
1818         (inst_list_prepend, insert_after_ins): Delete.
1819         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
1820         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
1821         instruction lists.
1822         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
1823         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
1824         mono_arch_emit_prolog): Likewise.
1825         * cfold.c (mono_constant_fold): Likewise.
1826         * liveness.c (visit_bb, mono_analyze_liveness,
1827         optimize_initlocals): Likewise.
1828         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
1829         * graph.c (mono_draw_code_cfg): Likewise.
1830         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
1831         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
1832         mono_ssa_cprop): Likewise.
1833         * abcremoval (get_relations_from_previous_bb, process_block):
1834         Likewise.
1835         * local-propagation (mono_cprop_invalidate_values,
1836         mono_local_cprop_bb): Likewise.
1837         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
1838         peephole_pass, mono_arch_output_basic_block,
1839         mono_arch_emit_prolog): Likewise.
1840         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
1841         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1842         mono_arch_emit_prolog): Likewise.
1843         (insert_after_ins): Delete.
1844         * aliasing.c (print_code_with_aliasing_information,
1845         mono_build_aliasing_information, mono_aliasing_deadce):
1846         Convert to new instruction lists.
1847         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
1848         peephole_pass, NEW_INS, mono_arch_lowering_pass,
1849         mono_arch_local_regalloc, mono_arch_output_basic_block):
1850         Likewise.
1851         (insert_after_ins): Delete.
1852         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
1853         peephole_pass, mono_arch_output_basic_block): Convert to
1854         new instruction lists.
1855         * mini-codegen (InstList, inst_list_prepend,
1856         insert_after_ins): Delete.
1857         (insert_before_ins, get_register_force_spilling,
1858         get_register_spilling, free_up_ireg, free_up_reg,
1859         create_copy_ins, create_spilled_store, alloc_int_reg,
1860         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
1861         to new instruction lists.
1862         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
1863         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
1864         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
1865         (insert_after_ins): Delete.
1866         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
1867         mono_arch_local_regalloc, mono_arch_output_basic_block,
1868         mono_arch_call_opcode): Convert to new instruction lists.
1869         (insert_after_ins): Delete.
1870         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
1871         peephole_pass, mono_arch_output_basic_block,
1872         mono_arch_emit_prolog): Convert to new instruction lists.
1873
1874 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
1875
1876         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
1877
1878         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
1879         Fixes #353182.
1880
1881         * Makefile.am (version.h): Make this work with non-bash shells.
1882
1883 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
1884
1885         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
1886
1887 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
1888
1889         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
1890         the InitializeArray optimization.
1891
1892 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
1893
1894         * mini.c driver.c: Don't include os/gc_wrapper.h.
1895
1896 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
1897
1898         * mini.c (print_jit_stats): Print GC statistics if available.
1899
1900 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
1901
1902         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
1903
1904 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
1905
1906         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
1907
1908 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
1909
1910         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
1911         
1912         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
1913
1914         * driver.c (mono_main): Ditto.
1915
1916 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
1917
1918         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
1919
1920         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
1921         in the vtable can't be encoded.
1922         (compile_method): Ditto.
1923
1924 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
1925
1926         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
1927         defined.
1928
1929         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
1930         lmf->rbp.
1931
1932         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
1933         the top LMF entry belongs to the current method.
1934
1935         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
1936
1937 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
1938
1939         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
1940         
1941         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
1942
1943         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
1944
1945         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
1946
1947         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
1948
1949         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
1950         implementation.
1951
1952         * basic-float.cs: Add an ulong->double cast test.
1953
1954 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
1955
1956         * mini.c (mono_method_to_ir): Fix a warning.
1957
1958 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
1959
1960         * mini-ops.h: Add OP_SWITCH.
1961
1962         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
1963         CEE_SWITCH in back-end code, use OP_SWITCH instead.
1964
1965 2007-12-11  Geoff Norton  <gnorton@novell.com>
1966
1967         * mini-s390x.c: Minor change to the MAX() define to allow
1968         it to compile with other gcc versions.
1969
1970 2007-12-11  Geoff Norton  <gnorton@novell.com>
1971
1972         * cpu-s390x.md:
1973         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
1974
1975 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
1976
1977         exceptions-arm.c (mono_arch_get_restore_context): Restore
1978         the frame pointer.
1979
1980         exceptions-arm.c (throw_exception): Save the frame pointer.
1981         This is a partial fix for #323747. Only the client side is
1982         fixed.
1983
1984 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
1985
1986         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
1987         was using an unrelated variable to log the class which
1988         needed the cctor to be called. This was crashing on arm.
1989
1990 2007-12-09  Robert Jordan  <robertj@gmx.net>
1991
1992         * mini-x86.c (mono_arch_emit_epilog):
1993         Consider all kinds of 64-bit types. Fixes #323114.
1994
1995 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
1996
1997         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
1998
1999 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2000
2001         * mini-amd64.c (peephole_pass): Add a missing instruction check.
2002
2003 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2004
2005         * mini.c: run type ctor before allocating an object, not only
2006         when running it's constructor method (fixes at least part of bug #342507).
2007
2008 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2009         
2010         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
2011         
2012         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
2013         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
2014         function.
2015
2016         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
2017         mono_generic_class_init_trampoline () the same as it is done with the other
2018         trampolines.
2019
2020         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
2021         aot-runtime.c aot-compiler.c: Implement AOT support.    
2022
2023 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2024
2025         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
2026         build for archs which don't have the vtable trampoline defined
2027         yet.
2028
2029 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2030
2031         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
2032
2033         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
2034
2035         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
2036
2037         * tramp-<ARCH>.c: Use the new helper function.
2038
2039 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2040
2041         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
2042         trampoline call, which takes a vtable argument.
2043
2044         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
2045         OP_TRAMPCALL_VTABLEs like other calls.
2046
2047         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
2048         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
2049         call.  Implemented a support function which fetches the vtable
2050         from a register set.
2051
2052         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
2053         Implemented a generic class init trampoline, using the
2054         OP_TRAMPCALL_VTABLE opcode.
2055
2056         * mini.c: Implemented static field access when sharing generic
2057         code.  This implies initing the class using the new
2058         OP_TRAMPCALL_VTABLE call.
2059
2060 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2061
2062         * mini.c: Don't compile methods with sharing enabled if their
2063         classes are disabled for sharing.
2064
2065 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
2066
2067         * inssel.brg: Add a missing sign extension to the GETCHR and array access
2068         opcodes. Fixes #346563.
2069
2070         * objects.cs: Add a new test.
2071
2072         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
2073
2074         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
2075         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
2076
2077 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
2078
2079         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
2080
2081 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
2082
2083         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
2084         code stream.
2085
2086 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
2087
2088         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
2089
2090         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
2091         optimization in the AOT case.
2092         
2093 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
2094
2095         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
2096         
2097         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
2098
2099         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
2100
2101         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
2102
2103         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
2104         is created by the inlined delegate ctor.
2105
2106         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
2107
2108         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
2109
2110 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
2111
2112         * cpu-x86.md: Fix the length of ckfinite.
2113
2114 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
2115
2116         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
2117         
2118         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
2119         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
2120
2121         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
2122
2123         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
2124         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
2125
2126 2007-11-28  Martin Baulig  <martin@ximian.com>
2127
2128         * mini-x86.c
2129         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
2130         after creating the trampoline.
2131
2132 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
2133
2134         * aot-runtime.c (load_aot_module): Check runtime version if needed.
2135
2136         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
2137         the same version.
2138
2139         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
2140         instead of the calling method to help AOT.
2141
2142         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
2143
2144 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
2145
2146         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
2147         is defined.
2148
2149 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
2150
2151         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
2152         
2153         * aot-compiler.c (compile_method): Correct check for generic method definitions.
2154         (encode_method_ref): No need to handle generic method definitions specially.
2155
2156         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2157
2158         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
2159         decode_klass_info.
2160
2161         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
2162         encode_klass_info.
2163         (compile_method): Enable generic sharing.
2164
2165 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
2166
2167         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
2168         (mini_method_compile): Add preliminary support for AOTing shared generic code.
2169
2170         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
2171         generic code.
2172
2173         * mini-trampolines.c: Fix a warning.
2174
2175         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
2176         NEW_PCONST.
2177         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
2178         (generic_class_is_reference_type): Remove unused function.
2179
2180         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
2181         in the generic vtable trampoline case.
2182
2183         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
2184         
2185         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
2186         return an AOT method based on a vtable slot.
2187
2188         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
2189
2190         * mini.c (mini_get_vtable_trampoline): Export this.
2191
2192 2007-11-22  Martin Baulig  <martin@ximian.com>
2193
2194         * debug-debugger.h
2195         (MonoDebuggerInfo): Move `debugger_version' up.
2196
2197 2007-11-22  Martin Baulig  <martin@ximian.com>
2198
2199         * mini-amd64.c
2200         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
2201
2202         * mini-trampolines.c
2203         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
2204         after compiling the method.
2205
2206 2007-11-20  Martin Baulig  <martin@ximian.com>
2207
2208         * debug-mini.c
2209         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
2210         (mono_debugger_remove_breakpoint): Likewise.
2211         (mono_debugger_check_breakpoints): Likewise.
2212
2213         * debug-debugger.c: Implement the new breakpoint interface here.
2214
2215 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
2216
2217         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
2218         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
2219
2220         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
2221
2222 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
2223
2224         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
2225
2226         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
2227         mini.c.
2228
2229         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
2230         mini.c.
2231
2232         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
2233         returning a vtype in a register.
2234
2235         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
2236         here from the arch specific code.
2237
2238         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
2239         mini.c.
2240
2241         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
2242         (mono_arch_emit_prolog): Increment maximum prolog size.
2243
2244         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
2245         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
2246
2247         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
2248         MonoGenericSharingContext.
2249
2250         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
2251         MonoGenericSharingContext. Allocate memory from the cfg mempool.
2252
2253 2007-11-15  Mark Probst  <mark.probst@gmail.com>
2254
2255         * mini.c, mini.h, generic-sharing.c: Functions for producing code
2256         which extract fields out of the runtime generic context.  Full
2257         sharing of the NEWARR opcode.
2258
2259 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
2260
2261         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
2262         --enable-minimal=ssa.
2263
2264 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
2265
2266         * mini-trampolines.c (mono_delegate_trampoline): Update after 
2267         mono_marshal_get_delegate_invoke () signature change.
2268
2269 2007-11-13  Mark Probst  <mark.probst@gmail.com>
2270
2271         * mini.c: Removed the shared context in favor of the generic
2272         sharing context.  Allocate the MonoJitInfo structure with room for
2273         the generic sharing context if it's needed.
2274
2275         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
2276         domain-internals.h now.
2277
2278         * mini-x86.c: Pass the generic sharing context to get_call_info ().
2279
2280         * generic-sharing.c: Several changes for working without a shared
2281         context and instead operating on open types instead.
2282
2283 2007-11-12  David S. Miller  <davem@davemloft.net>
2284
2285        * inssel-sparc.brg: Fix double instruction emit.
2286
2287 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
2288
2289         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
2290         Get/Set/Address methods.
2291         
2292         * mini.c debug-debugger.c mini-trampolines.c: Update after 
2293         mono_marshal_get_delegate_invoke signature change.
2294
2295 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2296
2297         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
2298         This can happens with dynamic methods. Fixes the other bug in #322722.
2299
2300 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2301
2302         * tramp-arm.c (mono_arch_patch_callsite): Support patching
2303         BX call sequence.
2304
2305         * mini-arm.c (arm_patch): Implement patching of BX call
2306         sequence. Fixes one of the bugs in #322722.
2307
2308 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
2309
2310        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
2311        under Linux.  We only need to flush every 32-byte cache line.    
2312
2313 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
2314
2315         * mini.c:
2316         move_basic_block_to_end: Add branches when needed, eventually creating
2317         a new BB.
2318         optimize_branches: added a parameter that tells if it's ok to create
2319         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
2320         and avoid calling move_basic_block_to_end when it's not ok.
2321         Fixes bug 318677.
2322
2323 2007-11-07  Mark Probst  <mark.probst@gmail.com>
2324
2325         * mini.c: Abort inlining call to InitializeArray if something
2326         looks wrong.  Let the icall handle it, which now has proper safety
2327         checks.
2328
2329 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2330
2331         * mini.c (mono_spill_call): add support for soft-float.
2332
2333         * mini.c (mono_method_to_ir): add support for soft-float
2334         to inlined functions that return float.
2335
2336         * mini.c (mono_method_to_ir): add support for soft-float
2337         to cee_stsfld opcode on float fields.
2338
2339 2007-11-05  Geoff Norton  <gnorton@novell.com>
2340
2341         * mini-x86.h: Fix the structure access for X86 Leopard.
2342
2343
2344 2007-11-05  Martin Baulig  <martin@ximian.com>
2345
2346         * mini-trampolines.c
2347         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
2348         after compiling the method to notify the debugger.
2349
2350 2007-11-05  Martin Baulig  <martin@ximian.com>
2351
2352         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
2353
2354 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
2355
2356         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
2357         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
2358
2359 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
2360
2361         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
2362         native-to-managed wrappers.
2363         
2364 2007-11-01  Geoff Norton  <gnorton@novell.com>
2365
2366         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
2367         members.
2368
2369 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
2370
2371         * mini.c, mini-x86.c: when getting back from unmanaged code
2372         to managed via a marshaled delegate we also need to set the
2373         right domain.
2374
2375 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
2376
2377         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
2378         for amd64.
2379
2380 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
2381
2382         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
2383         let the debugger or other external agents to tell the JIT when
2384         a sw breakpoint has been inserted in the code that the JIT needs
2385         to be able to inspect.
2386
2387 2007-10-31  Martin Baulig  <martin@ximian.com>
2388
2389         * debug-debugger.h
2390         (MonoDebuggerInfo): Remove `runtime_class_init'.
2391
2392 2007-10-30  Martin Baulig  <martin@ximian.com>
2393
2394         * debug-mini.h
2395         (mono_debugger_thread_created): Added `MonoThread *' argument.
2396         (mono_debugger_extended_notification): New public method.
2397         (mono_debugger_trampoline_compiled): New public method.
2398
2399         * debug-mini.c
2400         (MonoDebuggerThreadInfo): Added `thread' and
2401         `extended_notifications' fields.
2402
2403         * debug-debugger.c
2404         (debugger_executable_code_buffer): New static variable.
2405
2406         * debug-debugger.h
2407         (MonoDebuggerInfo): Added `executable_code_buffer',
2408         `executable_code_buffer_size', `breakpoint_info_area',
2409         `breakpoint_table' and `breakpoint_table_size'.
2410
2411 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
2412
2413         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
2414         that IP  either is an unused value or the vtable pointer. IMT 
2415         calls use vtable + offset now. Reduced by almost half the size
2416         of IMT entries.
2417
2418 2007-10-26  Jonathan Chambers <joncham@gmail.com>
2419
2420         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
2421         defines to access param registers. Replace long usage with
2422         gsize as sizeof(long) != sizeof(void*) on Win64.
2423
2424         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
2425         on Win64. Fix intrinsic, use _AddressOfReturnAddress
2426         instead of non-existant _GetAddressOfReturnAddress.
2427
2428         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
2429         param registers. Save/restore %rdi and %rsi in MonoLMF.
2430
2431         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
2432         param registers. Modify (throw_exception) signature to take 
2433         %rdi and %rsi on Win64. 
2434
2435         Code is contributed under MIT/X11 license.
2436
2437 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
2438
2439         * helpers.c: unlink debugging output files.
2440
2441 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
2442
2443         * mini.c: Move mono_create_ftnptr () to object.c.
2444
2445 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2446
2447         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
2448         optional. This function can now be used to disassemble code generated
2449         outside the JIT such as trampolines and IMT thunks.
2450
2451         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
2452
2453         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
2454         vtable pointer from a ldr instruction.
2455
2456         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
2457         new IMT call sequence.
2458
2459         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
2460         call sequence for interface invocations.
2461
2462         * mini-arm.c (mono_arch_emit_imt_argument): added, required
2463         for imt support. This function is empty since IMT on ARM requires no
2464         special handling on the IR side.
2465
2466         * mini-arm.c (mono_arch_find_imt_method): added, required for
2467         imt support.
2468
2469         * mini-arm.c (mono_arch_find_this_argument): added, required
2470         for imt support.
2471
2472         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
2473         a ldr instruction to load a value stored in the code stream.
2474
2475         * mini-arm.c (mono_arch_build_imt_thunk):added, required
2476         for imt support.
2477
2478
2479 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
2480
2481         * mini.c (mini_init): Install the jump trampoline callback.
2482
2483 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2484
2485         * mini-trampolines.c: handle synchronized methods with the common
2486         vtable trampoline (bug #335601).
2487
2488 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
2489
2490         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
2491
2492         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
2493         64 bit platforms.
2494
2495         * mini-ia64.h mini-ia64.c: Add support for IMT.
2496
2497         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
2498         prolog. Fixes #331958.
2499
2500 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
2501
2502         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
2503
2504 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2505
2506         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
2507         trampoline.
2508
2509 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2510
2511         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
2512         trampoline.
2513
2514 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
2515
2516         * mini-x86.c, mini-x86.h: x86 support for the common vtable
2517         trampoline.
2518
2519 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
2520
2521         * mini-trampolines.c: changed the magic rampoline to understand
2522         the common vtable trampoline method: the method to invoke is
2523         determined by the vtable displacement of the call.
2524
2525 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2526
2527         * mini.c, mini.h: register the common vtable trampoline if the
2528         architecture supports it.
2529
2530 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2531
2532         * cpu-amd64.md: use the correct max length for tls_get.
2533
2534 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
2535
2536         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
2537         CEE_STELEM_ANY. Fixes #333696.
2538
2539 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2540
2541         * exceptions-x86.c: provide more graceful handling of the case where
2542         we followed a bogus function pointer from managed code (bug #332866).
2543
2544 2007-10-11  Mark Probst  <mark.probst@gmail.com>
2545
2546         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
2547         replaces the generic_shared flag and will carry more information
2548         in the future.
2549
2550         * generic-sharing.c: Added mini_type_stack_size() which allows
2551         allows open types if given a generic sharing context.
2552         mini_get_basic_type_from_generic() takes a
2553         MonoGenericSharingContext* instead of a MonoCompile* now.
2554
2555         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
2556         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
2557         mini-sparc.c, mini-x86.c: Trivial changes required by the two
2558         changes above.  Just passing arguments through to the right
2559         places.
2560
2561 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2562
2563         * mini-arm.c: unify the call emission to emit_code_seq().
2564
2565 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
2566
2567         * tramp-arm.c: reduced the trampoline size.
2568
2569 2007-10-10  Mark Probst  <mark.probst@gmail.com>
2570
2571         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
2572         variable handling out of arch-specific code.
2573
2574 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
2575
2576         * mini-arm.c: implemented fast delegate dispatch.
2577
2578 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2579
2580         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
2581         that fp elimination is turned off if the space required by locals is too
2582         big. Fixes #331958.
2583
2584 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
2585
2586         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
2587         ARM to the new style trampoline.
2588
2589 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
2590
2591         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
2592
2593         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
2594
2595 2007-10-09  Martin Baulig  <martin@ximian.com>
2596
2597         * debug-debugger.h
2598         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
2599         `field_info_offset_offset'.     
2600
2601 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
2602
2603         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
2604         removed more internal usage of the r11 register and made it available
2605         to the register allocator.
2606
2607 2007-10-08  Mark Probst  <mark.probst@gmail.com>
2608
2609         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
2610         when sharing generics and treat type variables as references.
2611
2612 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2613
2614         * mini-ppc.c: started removing the internal uses of register r11
2615         to eventually allow the register allocator to manage it as an
2616         additional available register.
2617
2618 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2619
2620         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
2621
2622 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
2623
2624         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
2625         specific trampolines as they are not performance critical as a jump
2626         target (maybe align as before only for AOT code?). This saves about
2627         200 KB of native code on x86 for monodevelop startup.
2628
2629 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
2630
2631         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
2632         monodevelop startup.
2633
2634 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
2635
2636         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
2637
2638         * mini-sparc.h mini-sparc.c: Implement IMT support.
2639
2640         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
2641         its smaller and doesn't clobber sparc_g1.
2642
2643         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
2644
2645 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
2646
2647         * mini-ppc.c: optimized the size of the IMT thunks a bit.
2648
2649 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
2650
2651         * mini-ppc.c: implemented fast delegate invocation.
2652
2653 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
2654
2655         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
2656
2657 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2658
2659         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
2660         code to the new style trampoline in preparation for IMT support.
2661
2662 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
2663
2664         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
2665         systems already. This also reduces the specific trampiline sizes and
2666         prepares for the use of r12 as the IMT identifier register.
2667
2668 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2669
2670         * mini-mips.h: endianess fix (simplified from a patch by
2671         Thomas Kunze <thommy@tabao.de>, bug #323737).
2672
2673 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2674
2675         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
2676         to access ucontext fields and enable netbsd support
2677         (partially from Magnus Henoch <mange@freemail.hu>).
2678
2679 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2680
2681         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
2682         use the preprocessor from the CPP env var if it is set.
2683
2684 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2685
2686         * mini-trampolines.c: fixed an assertion and moved it earlier in the
2687         code, before interface_offset gets used.
2688
2689 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
2690
2691         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
2692         mono_class_setup_vtable () before accessing klass->vtable.
2693
2694 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
2695
2696         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
2697         hackish.
2698
2699 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
2700
2701         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
2702         IMT slots (this saves hundreds of KB of memory in programs like
2703         IronPython and Monodevelop).
2704
2705 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2706
2707         * mini.c: print the delegate counter.
2708
2709 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
2710
2711         * mini-x86.c: make it easier to enable the debugging code for IMT
2712         slots.
2713
2714 2007-09-28  Martin Baulig  <martin@ximian.com>
2715
2716         * debug-debugger.h
2717         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
2718         `mono_method_klass_offset' and `mono_method_token_offset'.
2719
2720 2007-09-20  Mark Probst  <mark.probst@gmail.com>
2721
2722         * mini.c: First generics sharing implementation.  Can only share
2723         in very simple cases.  If sharing doesn't work it falls back to
2724         dedicated compilation.
2725
2726         * mini.h: Flag in MonoCompile to specify whether generic
2727         compilation is shared.  Flags enum for marking which generic inst
2728         of a context is used.  Prototypes for helper functions.
2729
2730         * generic-sharing.c: Helper functions for generic method sharing.
2731
2732         * optflags-def.h: Optimization flag (gshared) for enabling generic
2733         method sharing added.
2734
2735         * Makefile.am: generic-sharing.c added.
2736
2737 2007-09-19 Daniel Nauck <dna@mono-project.de>
2738
2739         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
2740
2741 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
2742         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
2743         fixes bug 325507.
2744
2745 2007-09-19  Martin Baulig  <martin@ximian.com>
2746
2747         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
2748         mono_debug_cleanup() is now part of mono_cleanup().
2749
2750 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
2751
2752         * driver.c (mono_main): Fix a warning.
2753
2754 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
2755
2756         * aot-compiler.c: Optimize various parts when processing large assemblies.
2757         Fixes ##325568.
2758
2759         * mini.c (mono_patch_info_hash): Improve hash function.
2760
2761 2007-09-14  Jonathan Chambers <joncham@gmail.com>
2762
2763         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
2764         
2765         Code is contributed under MIT/X11 license.
2766
2767 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2768
2769         * mini.c (mini_init): Fix a leak.
2770
2771         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
2772
2773 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2774
2775         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
2776
2777 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
2778
2779         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
2780
2781 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
2782
2783         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
2784         variance tests.
2785
2786         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
2787
2788         * mini.c (handle_alloc): Enable managed allocators in AOT code.
2789
2790         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
2791
2792         * aot-runtime.c (decode_patch_info): Ditto.
2793
2794 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2795
2796         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
2797         static case. Cache delegates in architecture specific code, 
2798         based on number of parameters.
2799         
2800         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
2801         in architecture specific code, based on number of parameters.
2802         
2803         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
2804         caching happen in architecture specific code now.
2805         
2806         Code is contributed under MIT/X11 license.
2807
2808 2007-09-12  Jonathan Chambers <joncham@gmail.com>
2809
2810         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
2811         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
2812         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
2813
2814         Code is contributed under MIT/X11 license.
2815
2816 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
2817         * mini.c: (mono_thread_abort) Fixed bug #82416.
2818
2819 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2820
2821         * mini.: hook the new managed GC allocation feature into the JIT.
2822
2823 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2824
2825         * mini.c: implementation for the new runtime tls opcode.
2826
2827 2007-09-11  Martin Baulig  <martin@ximian.com>
2828
2829         * debug-debugger.h
2830         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
2831         `mono_method_inflated_offset'.
2832
2833 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
2834
2835         * driver.c mini.h mini.c: Add a new devel command line option for injecting
2836         async exceptions into a method.
2837
2838         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
2839         purpose of testing whenever the unwinder works at every instruction.
2840
2841 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
2842
2843         * mini.c: check accessibility of method used in ldftn (fixes
2844         bug #82635).
2845
2846 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
2847
2848         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
2849
2850         * inssel.brg: Fix a warning.
2851
2852 2007-09-03  Martin Baulig  <martin@ximian.com>
2853
2854         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
2855         now takes the `main_method' as argument.
2856
2857 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
2858
2859         * cpu-sparc.md (endfilter): Add missing src1:i argument.
2860
2861 2007-08-30  Jonathan Chambers <joncham@gmail.com>
2862
2863         * driver.c: include the cil-coff.h header on Windows.
2864         
2865         Code is contributed under MIT/X11 license.
2866
2867 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2868
2869         * mini.c, driver.c: don't include the cil-coff.h header.
2870
2871 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
2872
2873         * mini.c: flag places that needs fixes fo soft-float support.
2874
2875 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
2876
2877         * mini.h, inssel-float.brg: fix soft-float constant loads on big
2878         endian systems (partially from Dean Jenkins, bug #81924).
2879
2880 2007-08-28  Mark Probst  <mark.probst@gmail.com>
2881
2882         * mini.c (check_linkdemand): Remove embedded reference object in
2883         call to LinkDemandSecurityException.
2884         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
2885         with an IntPtr instead of a reference object.
2886
2887 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
2888
2889         * mini.c (handle_initobj): Handle alignment properly.
2890
2891         * inssel.brg (mini_emit_memset): Ditto. 
2892
2893         * inssel.brg (mini_emit_memcpy): Ditto. 
2894
2895         * inssel-sparc.brg: Ditto.              
2896
2897         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
2898
2899 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
2900
2901         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
2902         exceptions raised in unmanaged code. Fixes part of #82594.
2903
2904 2007-08-24  Mark Probst  <mark.probst@gmail.com>
2905
2906         * mini.c (mono_method_to_ir), declsec.c
2907         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
2908
2909 2007-08-22  Martin Baulig  <martin@ximian.com>
2910
2911         * debug-mini.h
2912         (MonoDebuggerThreadInfo): New typedef.
2913         (mono_debugger_thread_table): New global variable.
2914         (mono_debugger_thread_created): New public function.
2915         (mono_debugger_thread_cleanup): New public function.
2916
2917         * debug-debugger.h
2918         (MonoDebuggerInfo):
2919         - removed `get_current_thread' and `lookup_assembly'.
2920         - removed `data_table'.
2921         - added `thread_table'.
2922
2923         * mini.c
2924         (mono_thread_start_cb): Call mono_debugger_thread_created().
2925         (mono_thread_attach_cb): Likewise.
2926         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
2927         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
2928         initial domain.
2929
2930         * driver.c (mono_main): Move mono_debug_init() up, before calling
2931         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
2932
2933 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
2934
2935         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
2936         together when passing several arguments of type double (gives a small
2937         speedup and saves a few bytes of generated code).
2938
2939 2007-08-20  Jb Evain  <jbevain@novell.com>
2940
2941         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
2942
2943 2007-08-20  Jb Evain  <jbevain@novell.com>
2944
2945         * mini.c (mono_method_to_ir): throw MethodAccessException
2946         and FieldAccessException instead of InvalidProgramException.
2947
2948 2007-08-20  Mark Probst  <mark.probst@gmail.com>
2949
2950         * mini.c: CoreCLR security checks.
2951
2952         * mini.h: Removed MonoSecurityMode (moved to
2953         metadata/security-manager.h) and mono_security_mode global var
2954         (replaced by set/get functions in security-manager.h).
2955
2956         * driver.c: Added "core-clr-test" security mode for testing.  Used
2957         set-function for setting security mode.
2958
2959 2007-08-17  Mark Probst  <mark.probst@gmail.com>
2960
2961         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
2962         the new jit_info_table.
2963
2964         * driver.c: Test code for the new jit_info_table (enabled by the
2965         define MONO_JIT_INFO_TABLE_TEST).
2966
2967 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
2968
2969         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
2970         detection of call <REG> instruction sequence. Fixes build on freebsd.
2971
2972 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
2973
2974         * mini-exceptions.c: Fix a warning.
2975
2976 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
2977
2978         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
2979         stack overflow handling code on amd64 too.
2980
2981         * mini-exceptions.c (mono_setup_altstack): Make this use 
2982         mono_thread_get_stack_bounds ().
2983
2984         * mini-x86.h: Disable sigaltstack on solaris x86.
2985
2986 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
2987
2988         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
2989
2990 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
2991
2992         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
2993
2994 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
2995
2996         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
2997
2998         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
2999
3000 2007-08-03  Neale Ferguson <neale@sinenomine.net>
3001
3002         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
3003         due to alignment.
3004
3005 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
3006
3007         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
3008         to be emitted (bug #82281).
3009
3010 2007-08-01  Martin Baulig  <martin@ximian.com>
3011
3012         Merged the `debugger-dublin' branch.
3013
3014         * debug-debugger.h (MonoDebuggerInfo):
3015         Removed the `old_*' compatibility entries.
3016         Added `debugger_version' and `data_table'.
3017         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
3018         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
3019
3020         * debug-mini.c
3021         (MiniDebugMethodBreakpointInfo): Add `address_list'.
3022         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
3023         instead of a `gconstpointer'.
3024         (mono_debugger_insert_method_breakpoint): Return a
3025         `MonoDebugMethodAddressList *'.
3026
3027 2007-06-28  Martin Baulig  <martin@ximian.com>
3028
3029         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3030
3031 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
3032
3033         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
3034         __builtin_frame_address () since it is broken on older gcc versions.
3035
3036 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3037
3038         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
3039         on the stack overflow handling and made the managed stack overflows
3040         catchable in most cases using soft guard pages.
3041         * exceptions-x86.c: added code to restore the protection in the soft
3042         guard pages at the end of exception handling.
3043
3044 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
3045
3046         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
3047
3048 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3049
3050         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
3051         exception handling.
3052
3053 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3054
3055         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
3056         signal handling support until it has been ported to the new mechanism.
3057         * mini.c: fixed stack overflow detection and use the new
3058         architecture code  to handle signals on the altstack.
3059
3060 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
3061
3062         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
3063         stack overflows on the alt stack.
3064
3065 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
3066
3067         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
3068         stack overflows on the alt stack.
3069
3070 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
3071
3072         * exceptions-ppc.c: cleanup preparing for altstack support.
3073
3074 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3075
3076         * exceptions-arm.c: cleanup preparing for altstack support.
3077
3078 2007-07-27  Mark Probst  <mark.probst@gmail.com>
3079
3080         * mini.c (print_jit_stats): Output hazard pointer stats.
3081
3082 2007-07-26  Mark Probst  <mark.probst@gmail.com>
3083
3084         * driver.c, mini.c: Replaced security mode flags with a single
3085         enum variable.
3086
3087 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3088
3089         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
3090
3091 2007-07-25  Mark Probst  <mark.probst@gmail.com>
3092
3093         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
3094         (which doesn't do anything yet) for activating Core CLR
3095         (Silverlight) security.
3096
3097 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
3098
3099         * mini-codegen.c: work around a possible gcc bug on arm.
3100
3101 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
3102
3103         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
3104         message for platforms that don't support AOT compilation.
3105
3106 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
3107
3108         * mini.h, mini.c, driver.c: temporary smcs hack.
3109
3110 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
3111
3112         * mini-arm.h, mini-arm.c: arm EABI fixes.
3113
3114 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
3115
3116         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
3117         case.
3118
3119         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
3120         trampolines taking a method argument.
3121
3122         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
3123
3124         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
3125         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
3126
3127         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
3128         JIT compilation throws an exception. Fixes #82050.
3129
3130 2007-07-19  Mark Probst  <mark.probst@gmail.com>
3131
3132         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
3133         with the MONO_EXCEPTION_ defines.
3134
3135 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
3136
3137         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
3138         #82117.
3139         
3140         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
3141         the cause of an assertion.
3142
3143 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
3144
3145         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
3146         removed.
3147
3148 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
3149
3150         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
3151         assert. Should fix #82103.
3152
3153 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
3154
3155         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
3156         here too. Fixes #82095.
3157
3158         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
3159         addresses.
3160
3161         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
3162
3163         * mini-amd64.h: Enable IMT for amd64.
3164         
3165         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
3166
3167 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
3168
3169         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
3170
3171 2007-07-12  Mark Probst  <mark.probst@gmail.com>
3172
3173         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
3174         as soon as check_linkdemand sets an exception_type.
3175
3176 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
3177
3178         * mini-x86.c: fixed offsets for IMT call sequence.
3179         * mini-x86.h: enable IMT again.
3180
3181 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
3182
3183         * trace.c (mono_trace_enter_method): Decode MonoType too.
3184
3185         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
3186
3187         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
3188
3189         * mini-amd64.c: Add preliminary IMT implementation.
3190         
3191 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
3192
3193         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
3194         understand the new IMT-base interface invocation (thanks to
3195         Daniel Nauck for the report and the remote debugging session).
3196
3197 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
3198
3199         * mini-x86.c: size and speed optimizations for the IMT bsearch.
3200
3201 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
3202
3203         * Makefile.am (aotcheck): Make this actually use the AOTed code.
3204
3205 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
3206
3207         * mini-trampolines.c: implement AOT IMT support.
3208         * mini-x86.h: enable IMT support for wider testing.
3209
3210 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3211
3212         * inssel.brg (emit_imt_argument): Add aot support here.
3213
3214         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
3215
3216 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3217
3218         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
3219         of the IMT implementation, partially from massi, with my
3220         implementation of the bsearch sequence. Disabled by default until
3221         the AOT code is implemented.
3222
3223 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3224
3225         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
3226
3227         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
3228
3229 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3230
3231         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
3232         arch-independent IMT JIT code from Massimiliano
3233         Mantione (massi@ximian.com) with small cleanups from me.
3234
3235 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3236
3237         * Makefile.am: fix svn invocation to get the svn revision to be
3238         independent of the local language (build fix).
3239
3240 2007-07-09  Mark Probst  <mark.probst@gmail.com>
3241
3242         * mini.c (inline_method): Reset cfg->exception_type if the
3243         inlining is aborted.  Fixes: 82049.
3244
3245 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
3246
3247         * mini.c: remove assert from exception handling code when exception_ptr
3248         is not set.
3249
3250 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3251
3252         * mini.c (mono_codegen): Add an assert.
3253
3254         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
3255         enter and leave code.
3256         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
3257
3258 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3259
3260         * mini-ppc.c: fixed memory corruption for localloc(0)
3261         (bug #81852).
3262
3263 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3264         
3265         * mini.c: Fix warnings.
3266
3267 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
3268
3269         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
3270         to emit better double->int conversions.
3271
3272 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
3273
3274         * mini.c: the provided Min/Max optimizations are valid for unisgned
3275         ints.
3276
3277 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
3278
3279         * 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
3280
3281 2007-06-28  Miguel de Icaza  <miguel@novell.com>
3282
3283         * mini.c (mono_running_on_valgrind): Add support for reporting the
3284         method and  its boundaries to valgrind.
3285
3286 2007-06-28  Martin Baulig  <martin@ximian.com>
3287
3288         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3289
3290 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
3291
3292         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
3293
3294         * generic.2.cs: Add new test case.
3295
3296 2007-06-25  Martin Baulig  <martin@ximian.com>
3297
3298         Merged the `debugger-dublin' branch.
3299
3300         * debug-mini.c
3301         (mono_debugger_insert_method_breakpoint): New public method.
3302         (mono_debugger_remove_method_breakpoint): Likewise.
3303         (mono_debugger_check_breakpoints): New static method.
3304         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
3305
3306         * debug-debugger.h (MonoDebuggerInfo):
3307         Renamed (to keep backward compatibility in the vtable):
3308         `insert_breakpoint' -> `old_insert_breakpoint'.
3309         `remove_breakpoint' -> `old_remove_breakpoint'.
3310         `create_string' -> `old_create_string'.
3311         `lookup_class' -> `old_lookup_class'.
3312         `lookup_type' -> removed; changed into a dummy field.
3313         `lookup_assembly' -> `old_lookup_assembly'.
3314         Added (same functionality, but different signature):
3315         `create_string', `lookup_class', `lookup_assembly'
3316         Added new:
3317         `get_method_addr_or_bpt', `remove_method_breakpoint',
3318         `runtime_class_init'.
3319
3320         * debug-debugger.c: Merged the `debugger-dublin' branch.
3321
3322 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
3323
3324         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
3325         well.
3326         (peephole_pass): Likewise.
3327
3328 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
3329
3330         * driver.c: hopefully make setaffinity work also for ancient
3331         versions of linux.
3332
3333 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
3334
3335         * driver.c : win32 build fix.
3336
3337 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3338
3339         * driver.c: check for the MONO_NO_SMP env var and bind to a single
3340         processor if it is set.
3341
3342 2007-06-21  Martin Baulig  <martin@ximian.com>
3343
3344         * debug-mini.h: New file.
3345
3346         * debug-mini.c
3347         (mono_debugger_insert_breakpoint_full): Moved here from
3348         ../metadata/mono-debug-debugger.c.
3349         (mono_debugger_remove_breakpoint): Likewise.
3350         (mono_debugger_breakpoint_callback): Likewise.
3351
3352 2007-06-15  Raja R Harinath  <rharinath@novell.com>
3353
3354         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3355         changes in MonoGenericClass.
3356
3357 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
3358
3359         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
3360
3361 2007-06-14  Raja R Harinath  <rharinath@novell.com>
3362
3363         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3364         removal of MonoGenericMethod.
3365
3366 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3367
3368         * mini-exceptions.c: hooks for the exception events profiling API.
3369
3370 2007-06-14  Randolph Chung  <tausq@debian.org>
3371
3372         * Makefile.ma: Add hppa target.
3373         * mini-arch.h: Include mini-hppa.h
3374         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
3375         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
3376         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3377
3378 2007-06-14  Randolph Chung  <tausq@debian.org>
3379
3380         * inssel.brg: Add rules for "chained" compare-branch operations so that
3381         a single compare op can affect multiple branches.  Adjust cost for
3382         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
3383         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
3384         cost for some rules so that they can more easily be overridden by
3385         per-arch rules (with fixes from lupus).
3386         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3387
3388 2007-06-13  Randolph Chung  <tausq@debian.org>
3389
3390         * mini-ops.h: Reorder branch ops so that they match the order of the
3391         corresponding CEE_* ops.  The code expects them this way.
3392         Add new ops for HPPA target.
3393         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3394
3395 2007-06-13  Randolph Chung  <tausq@debian.org>
3396
3397         * mini-exceptions.c: Handle cases where the stack grows towards
3398         larger addresses.
3399         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3400
3401 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
3402
3403         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
3404         counter.
3405         * driver.c: explain where a non-matching corlib is found.
3406
3407 2007-06-13  Mark Probst  <mark.probst@gmail.com>
3408
3409         * mini.c (print_jit_stats): Output dynamic code allocation stats.
3410
3411 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
3412
3413         * mini-exceptions.c: Generate a method profile leave event during
3414         an exception to ensure that the profiler gets notified.
3415
3416 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
3417
3418         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
3419         branch.
3420
3421         * cpu-amd64.md: Add long_and/or/xor opcodes.
3422
3423 2007-06-06  Wade Berrier  <wberrier@novell.com>
3424
3425         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
3426         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
3427         length of instruction shr_imm (expected 8, got 10)
3428
3429 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
3430
3431         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
3432
3433 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3434
3435         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3436         MonoInternalHashTable again (fixed bug in the internal hash table
3437         code).
3438
3439 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3440
3441         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
3442         Have to figure out what makes it crash the SWF regression.
3443
3444 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
3445
3446         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
3447
3448 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3449
3450         * mini.c: optimize out the type check when storing null in a
3451         reference array.
3452
3453 2007-06-04  Mark Probst  <mark.probst@gmail.com>
3454
3455         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3456         MonoInternalHashTable.
3457
3458 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
3459
3460         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
3461         signed integer methods.
3462
3463 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3464
3465         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
3466         permanently since the current approach doesn't work.
3467
3468 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
3469
3470         * inssel.brg (stmt): Only call delegate->invoke_impl if 
3471         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
3472
3473 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3474
3475         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
3476         the sreg2==rdx case.
3477         
3478         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
3479         account if it contains a rex prefix.
3480         (peephole_pass): Handle OP_FMOVE as well.
3481
3482 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
3483
3484         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
3485         as it causes regressions.
3486
3487 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
3488
3489         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
3490         static case as well.
3491
3492         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
3493
3494         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3495         (mono_arch_get_this_arg_from_call): Ditto.
3496
3497         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
3498
3499         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
3500         invoke_impl field.
3501
3502         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
3503         (mono_arch_get_this_arg_from_call): Ditto.
3504
3505         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
3506         
3507         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
3508         try to create optimized invoke code and use that for further invocations. 
3509         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
3510
3511         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
3512
3513 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
3514
3515         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
3516         sealed classes or methods.
3517         *devirtualization.cs: tests for the new optimization
3518
3519 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
3520
3521         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
3522         by the update_volatile () function.
3523
3524 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
3525
3526         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
3527         require it.
3528
3529         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
3530
3531 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
3532
3533         * mini.c: Add configure checks for header files.
3534         * mini-x86.c: Add configure checks for header files.
3535         * trace.c: Add configure checks for header files.
3536         * aot-runtime.c: Add configure checks for header files.
3537         * aot-compiler.c: Add configure checks for header files.
3538         * driver.c: Add configure checks for header files.
3539         * mini-codegen.c: Add configure checks for header files.
3540         
3541         Code is contributed under MIT/X11 license.
3542
3543 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
3544
3545         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
3546         icompare_imm -128 + op_iclt. Fixes #81703.
3547
3548 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
3549
3550         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
3551
3552 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
3553
3554         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
3555         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
3556         so that all isinst checks now use "interface_bitmap".
3557
3558 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
3559
3560         * cpu-amd64.md (jmp): Fix a warning.
3561
3562         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
3563
3564         * basic.cs: Add new regression test.
3565
3566         * basic.cs: Remove test which is now in basic-long.cs.
3567
3568         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
3569
3570         * basic-long.cs: Add new test.
3571         
3572 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
3573
3574         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
3575
3576 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
3577
3578         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
3579
3580         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
3581         places.
3582         
3583         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
3584         throwing code a bit.
3585
3586         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
3587         the exception throwing code a bit.
3588
3589         * mini-x86.c (get_call_info): Allocate result from a mempool.
3590
3591 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
3592
3593         * aot-compiler.c (find_typespec_for_class): Fix the assert.
3594
3595         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
3596
3597         * mini.h (MonoCompile): Add 'token_info_hash' field.
3598
3599         * mini.c: Save token->method associations during compilation so the AOT 
3600         compiler can use it.
3601         
3602         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
3603         which reference generic classes and methods.
3604
3605 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
3606
3607         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
3608
3609         * aot-compiler.c (compile_method): Fix a typo in a comment.
3610
3611         * aot-runtime.c (decode_cached_class_info): Skip generic types.
3612
3613         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
3614         everything generic.
3615
3616         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
3617
3618 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
3619
3620         * mini.h (MonoCompile): Add 'args' field.
3621
3622         * mini.c (mono_compile_create_vars): Store variables representing the arguments
3623         into cfg->args.
3624
3625         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
3626
3627 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
3628
3629         * mini.c (mono_compile_get_interface_var): Remove this unused function.
3630
3631         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
3632
3633         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
3634         opcodes for some opcodes.
3635
3636         * mini.h *.brg *.c: Use the new opcodes.
3637
3638 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
3639
3640         * mini.h: Bumped aot revision.
3641
3642         * inssel.brg: modified code generation of type checks for interfaces
3643         to use the new "MonoClass.interface_bitmap" instead of the old
3644         "MonoClass.interface_offsets".
3645
3646 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
3647
3648         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
3649
3650 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
3651
3652         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
3653         64 bit platforms.
3654
3655 2007-04-27  Neale Ferguson <neale@sinenomine.net>
3656
3657         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
3658
3659 2007-04-27  Wade Berrier  <wberrier@novell.com>
3660
3661         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
3662         mini.h) to fix build.
3663
3664 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
3665
3666         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
3667         
3668         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
3669         causes the corlib unit tests to fail.
3670
3671 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
3672
3673         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
3674
3675         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
3676
3677         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
3678         opcodes to the comparison relations.
3679
3680         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
3681         opcodes to their types.
3682         
3683         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
3684
3685         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
3686         it in cfg->arch.cinfo.
3687
3688         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
3689
3690         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
3691         cfg->cil_offset_to_bb.
3692
3693 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
3694
3695         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
3696         created becase of initlocals.
3697
3698 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
3699
3700         * mini-alpha.c cpu-alpha.md: More alpha port work from 
3701         Sergey Tikhonov <tsv@solvo.ru>.
3702
3703 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
3704
3705         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
3706
3707 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
3708
3709         * cpu-s390.md (break): Correct the length of break instruction.
3710
3711 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3712
3713         * mini.c: fix a couple of soft-float issues and comments.
3714
3715 2007-04-15  Miguel de Icaza  <miguel@novell.com>
3716
3717         * trace.c (is_filenamechar): - is also a filename char.
3718
3719 2007-04-15  Neale Ferguson <neale@sinenomine.net>
3720
3721         * mini-s390.c: Correct checking for enum type in return value processing.
3722
3723 2007-04-14  Raja R Harinath  <rharinath@novell.com>
3724
3725         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
3726         (version.h): Makefile is in the build directory.
3727
3728 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
3729
3730         * mini-amd64.h: fix for assertion failure on Solaris/amd64
3731
3732 2007-04-11  Martin Baulig  <martin@ximian.com>
3733
3734         * mini.c (can_access_member): Fix handling of generic classes;
3735         fixes #81259.
3736
3737 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
3738
3739         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
3740
3741 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
3742
3743         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
3744
3745 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3746
3747         * mini-codegen.c: make sure the right spill amount is
3748         used for fp or integer registers (fixes the float_sub_spill() on ppc).
3749
3750 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
3751
3752         * mini-ppc.c: fixes for the fp_branch_nan test.
3753
3754 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
3755
3756         * basic.cs: Comment out new test which still fails on ia64.
3757
3758 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3759
3760         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
3761
3762 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3763
3764         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
3765
3766 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
3767
3768         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
3769         on 64 bit machines. Fixes part of #80738.
3770
3771         * basic.cs: Add regression test.
3772
3773 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3774
3775         * inssel.brg basic.cs: Revert previous change to fix build.
3776
3777         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
3778         platforms.
3779         
3780         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
3781
3782         * basic.cs: Add new regression test.
3783
3784 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
3785
3786         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
3787         many arguments.
3788
3789 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3790
3791         * cpu-s390x.md: Correct length of break instruction.
3792
3793 2007-03-16  Neale Ferguson <neale@sinenomine.net>
3794
3795         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
3796         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
3797
3798 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
3799
3800         * *.c: Begin WIN64 port.
3801         * mini.c:  Use correct register in profiler.
3802         * mini-amd64.c: No inline assembly on Win64.
3803         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
3804         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
3805         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
3806         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
3807         mono_arch_ip_from_context for Win64.
3808         
3809         Contributed under MIT/X11 license.
3810
3811 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
3812
3813         * exceptions-amd64.c (seh_handler): Ditto.
3814
3815         * exceptions-x86.c (seh_handler): Fix a memory leak.
3816
3817 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
3818
3819         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
3820         mini-s390x.c: fixed peephole optimizations to deal
3821         correctly with 1 and 2 byte reload avoidance.
3822
3823 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
3824
3825         * cpu-s390.md, cpu-s390x.md: update localloc length.
3826
3827 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3828
3829         * cpu-g4.md: added missing descriptions.
3830
3831 2007-03-14  Miguel de Icaza  <miguel@novell.com>
3832
3833         *  Makefile.am: Add support so the tail tests are not executed on
3834         PowerPC as that is a known limitation of the PowerPC port.
3835
3836 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3837
3838         * runmdesc.bat:  Move to msvc directory.
3839         
3840 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3841
3842         * runmdesc.bat:  Run executable that was produced by the current
3843         target and sent via an argument.
3844         
3845 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
3846
3847         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
3848         #81102.
3849
3850         * generics.2.cs: Add regression test.
3851
3852 2007-03-09  Wade berrier  <wberrier@novell.com>
3853
3854         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
3855
3856 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
3857
3858         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
3859         AOT code depends on this.
3860
3861 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3862
3863         * mini.c: more precise tracking of types in the eval stack
3864         (part of fix for bug #81044).
3865
3866 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
3867
3868         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
3869
3870         * aot-compiler.c (encode_patch): Remove an obsolete comment.
3871
3872 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
3873
3874         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
3875
3876         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
3877
3878 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
3879
3880         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
3881         a pointer on 64 bit systems. Fixes #80190.
3882
3883         * iltests.il: Add new regression test.
3884
3885 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3886
3887         * mini.c: inline a constant for Environment.IsRunningOnWindows.
3888
3889 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
3890
3891         * trace.c: Remove an erroneous alignemnt check when tracing.
3892           Fixes --trace on OSX86.
3893
3894 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3895
3896         * mini-$(arch).h: initialize SP in context for all the archs.
3897
3898 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
3899
3900         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
3901         regressions in the thread tests.
3902
3903 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
3904
3905         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
3906         - fixed implementation of LOCALLOC opcode
3907         - implemented non-un compare for floats
3908         - code cleanup
3909         - implementation of FDIV and CKFINITE opcodes
3910         - fixes for latest mono updates
3911         - additional arch opcodes
3912
3913 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3914
3915         * Makefile.am: simplify and merge rules for cross-compilation.
3916
3917 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
3918
3919         * local-propagation.c: Actually *apply* the fix for bug 80591...
3920
3921 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3922
3923         * mini-exceptions.c: backuot part of the last change
3924         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
3925
3926 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
3927         * inssel.brg: Fix bug 59286.
3928
3929
3930 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
3931
3932         * mini-exceptions.c: patch from Zoltan to correctly check for
3933         stack boundaries (using the stack register, not the frame register),
3934         fixes bugs #80724, #79717.
3935
3936 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
3937
3938         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
3939         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
3940
3941         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
3942         presence of frame pointer elimination.
3943
3944 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
3945         
3946         * mini-x86.h: NetBSD UCONTEX_REG defines.
3947
3948 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
3949
3950         * inssel-amd64.brg: Fix amd64 build.
3951
3952 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
3953
3954         * mini.h: remove extern to workaround what looks likes gcc bug 26905
3955         on amd64.
3956
3957 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
3958
3959         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
3960         ends.
3961
3962         * mini-<ARCH>.c: Use mono_is_regsize_var ().
3963
3964 2007-01-30 Mark Mason <mason@broadcom.com>
3965
3966            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
3967            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
3968            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
3969            beginning support for CEE_JMP [not quite working yet]
3970            * tramp-mips.c: LMF handling now works
3971         
3972 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
3973
3974         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
3975
3976         * mini.h (NULLIFY_INS): New macro.
3977
3978 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3979
3980         * mini.c: statistical profiler fix for windows, patch
3981         from Tor Lillqvist (tml@novell.com).
3982
3983 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
3984         * local-propagation.c: Fix bug 80591.
3985
3986 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
3987
3988         * Makefile.am: put back the --export-dynamic option as with
3989         the previous gmodule flags (thanks to Robert Jordan).
3990
3991 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
3992
3993         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
3994
3995         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
3996         simplify and speed up the local register allocator. Also rename some fields
3997         like iassign->vassign.
3998         
3999         * regalloc.c: Remove some functions which are no longer used since their
4000         inlined version is in mini-codegen.c.
4001         
4002         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
4003
4004         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
4005
4006 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
4007
4008         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
4009         narrowing. Fixes #80622.
4010
4011         * iltests.il: Add new regresssion test. 
4012
4013 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
4014
4015         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
4016         debug-debugger.c, debug-debugger.h: warning fixes.
4017         * driver.c: updated copyright year and made it fit in one line.
4018
4019 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
4020
4021         * aot-runtime.c: updated to use mono-dl instead of gmodule.
4022
4023 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
4024
4025         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
4026
4027         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
4028
4029         * iltests.il: Add new test for bug #80507.
4030
4031 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4032
4033         * mini-arm.h: use soft-float also on vfp for now.
4034
4035 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
4036
4037         * mini.c: fix some more soft-float issues.
4038
4039 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
4040
4041         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
4042
4043 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
4044         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
4045         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
4046         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
4047
4048 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
4049
4050         * mini-arm.c: typo fix.
4051
4052 2007-01-23  Neale Ferguson <neale@sinenomine.net>
4053
4054         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
4055
4056 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
4057
4058         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
4059         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
4060
4061         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
4062
4063         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
4064
4065         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
4066         
4067         * inssel.brg: Fix a warning.
4068
4069         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
4070
4071         * abcremoval.c ssa.c ssapre.c: Update after this change.
4072         
4073         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
4074
4075         * dominators.c (df_set): Use mono_bitset_union_fast.    
4076
4077 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
4078
4079         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
4080         mini-codegen.c: reduce relocations and memory usage for the cpu
4081         description.
4082
4083 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
4084
4085         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
4086
4087         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
4088         to reduce their size.
4089
4090 2007-01-19 Mark Mason <mason@broadcom.com>
4091
4092         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
4093         * mini-mips.c: more configuration macros, support long conditional branches, additional
4094         asserts, fix epilog instrumentation.
4095         * mini-mips.h: use standard stack walk
4096         * cpu-mips.md: increase size of div, rem and conditional branches
4097         
4098 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
4099
4100         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
4101         to cpu spec data.
4102
4103 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
4104
4105         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
4106         (compile_method): Ditto.
4107
4108         * aot-runtime.c (decode_klass_info): Ditto.
4109
4110         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
4111         needed by the code generated by inssel.brg. Also fix a warning.
4112
4113 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
4114
4115         * mini.c: deal with enums that become genericinsts by
4116         being nested in a generic class (bug #79956).
4117
4118 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
4119
4120         * mini.c: match the generic definition to check for
4121         private access with generic types (bug #78431).
4122
4123 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
4124
4125         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
4126         to make life easier for people cross-compiling that insist on not
4127         using scratchbox.
4128
4129 2007-01-17 Mark Mason <mason@broadcom.com>
4130
4131         * inssel-long.brg: patch to deal with mips missing flags
4132         * inssel-long32-mips.brg: implement overflow checks
4133         * insset-mips.brg: implement overflow checks
4134         * mini-mips.h: implement conditional exception handling
4135         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
4136           Remove unused code, minor cleanups.
4137         * exceptions-mips.c: minor cleanups
4138         * mini-ops.h: add mips conditional exception ops
4139         * cpu-mips.md: add mips conditional exception ops
4140
4141         
4142 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
4143
4144         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
4145         to deal with mips missing of flags.
4146
4147 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
4148
4149         * exceptions-ppc.c: execute fault handlers.
4150
4151 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
4152
4153         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
4154
4155 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
4156
4157         * mini.c: handle also floating point values in initialize_array.
4158
4159 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
4160
4161         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
4162         array initialization and make it conditional on the intrins option.
4163
4164 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
4165
4166         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
4167         relocations and put the patch info names close to the enum definition.
4168
4169 2007-01-15 Mark Mason <mason@broadcom.com>
4170
4171         * basic.cs, exceptions.cs: break up large tests to increase debugability.
4172
4173 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4174
4175         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
4176
4177 2007-01-12  Raja R Harinath  <rharinath@novell.com>
4178
4179         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
4180
4181 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
4182
4183         * Makefile.am: distribute the mips sources.
4184
4185 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4186
4187         * mini-codegen.h: handle bug #80489 here, by excluding ecx
4188         directly.
4189
4190 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
4191
4192         * cpu-x86.md: back out for now as this triggers other regressions.
4193
4194 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
4195
4196         * cpu-x86.md: force src1 and dest regpair for long shift instructions
4197         to eax:edx, so ecx can't get allocated to them (bug #80489).
4198
4199 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
4200
4201         * mini.c, mini-exceptions.c: enabled running fault handlers
4202         (bug #80469).
4203
4204 2007-01-03  Miguel de Icaza  <miguel@novell.com>
4205
4206         * driver.c: If nothing fail, do not use the string "failed",
4207         because it makes it very annoying to view test result logs on the
4208         web. 
4209
4210 2006-12-30  Miguel de Icaza  <miguel@novell.com>
4211
4212         * debug-debugger.c (mono_debugger_main): Rename "main" to
4213         "main_method" to prevent a warning.
4214
4215         Remove a warning for unused field.
4216
4217 2006-12-28  Martin Baulig  <martin@ximian.com>
4218
4219         * debug-debugger.c
4220         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
4221
4222 2006-12-22  Martin Baulig  <martin@ximian.com>
4223
4224         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
4225         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
4226         seperate `.mdb_debug_info' section, so we can access it from the
4227         debugger even if the binary is stripped.
4228
4229         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
4230         from the `.mdb_debug_info' here to prevent the linker from
4231         removing that section.
4232
4233         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
4234         mdb-debug-info64.s.
4235
4236 2006-12-19  Robert Jordan  <robertj@gmx.net>
4237
4238         * mini-x86: enable the code to return small structures in
4239         registers for FreeBSD as well. Fixes bug #80278.
4240         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
4241
4242 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4243
4244         * mini-x86.c: align the stack when calling the profiler
4245         function instrumenting the prolog (on OSX).
4246
4247 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4248
4249         * mini.c: emit a break opcode where Debugger.Break () is called.
4250
4251 2006-12-13  Miguel de Icaza  <miguel@novell.com>
4252
4253         * mini.c (mono_method_to_ir): Provide useful information on this
4254         assert, to prevent others from debugging like I did.
4255
4256 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4257
4258         * mini.c: enable code which was incorrectly commented
4259         (bug #80235).
4260
4261 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4262
4263         * mini-x86.c: enable on OSX, too, the code to return small
4264         structures in registers.
4265
4266 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4267
4268         * mini-x86.c: remove the use of the dynamic code manager here, too.
4269
4270 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4271
4272         * mini.h, debug-debugger.c, tramp-*.c: fixed 
4273         mono_debugger_create_notification_function() to use
4274         mono_global_codeman_reserve () instead of a dynamic code manager.
4275
4276 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4277
4278         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
4279         ves_array_element_address() jit icall and use a generated
4280         managed method instead (which is about 4 times faster for a rank 3
4281         array access).
4282
4283 2006-11-29  Mark Mason  <mason@broadcom.com>
4284
4285         * basic-calls.cs: additional tests for passing
4286         structures as function arguments.
4287
4288 2006-11-29  Mark Mason  <mason@broadcom.com>
4289
4290         * mini-mips.h: disable custom exception handling
4291         * mini-mips.c: throw/rethrow should use jalr to call
4292         exception stubs.  Fixed bug with passing structures
4293         by value. More support for tracing floating point
4294         functions.
4295
4296 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4297
4298         * mini.c: fixed typo in the soft-float ldind.r4 handling
4299         (bug #80086).
4300
4301 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4302
4303         * mini.c, mini.h, driver.c: added --runtime command line
4304         option to select a different runtime than the autodetected one.
4305         * jit.h: added API for embedders to initialize with a specific
4306         runtime version.
4307
4308 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
4309
4310         * mini.c: handle also boxing of r4 values (bug #80024).
4311
4312 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4313
4314         * mini-ppc.c: force indirect calls until we reserve
4315         enough address space for all the generated code.
4316
4317 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
4318
4319         * exceptions-arm.c: workaround bugs in the libc definition
4320         of struct ucontext.
4321
4322 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
4323
4324         * inssel.brg: fixes from me and Mark Mason.
4325
4326 2006-11-23  Dick Porter  <dick@ximian.com>
4327
4328         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
4329         semaphore display now we've fixed the initial value
4330
4331 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4332
4333         * inssel.brg: partially revert the last change to fix the build.
4334
4335 2006-11-21  Mark Mason  <mason@broadcom.com>
4336
4337         * inssel.brg: Add and use compare-and-branch macros to support
4338         architectures that do not have condition code registers (ie. MIPS).
4339         * *-mips.{c,brg,md}: Fix copyright statements
4340
4341 2006-11-20  Mark Mason  <mason@broadcom.com>
4342
4343         * Makefile.am: remove mini-codegen.c from list of MIPS sources
4344         * mini.c: Allow GET_CONTEXT to be specified by the arch port
4345         * mini.h: Added declaration for mono_print_ins()
4346         * mini-codegen.c: added ins_spec initializer for MIPS
4347         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
4348         vreg to be virtual and hreg to be non-virtual.
4349         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
4350         is not yet working/implemented correctly.
4351         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
4352         non-static, fixup calls to print_ins() from other parts in the file.
4353
4354 2006-11-20  Mark Mason  <mason@broadcom.com>
4355
4356         * basic-calls.cs: added tests for passing structures as arguments
4357         to calls.
4358
4359 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
4360
4361         * inssel-long32.brg: optimize signed division by power of two.
4362
4363 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4364
4365         * mini-arm.c: added support for interworking with thumb code
4366         (mono must be still be built using the ARM instruction encoding).
4367
4368 2006-11-19  Miguel de Icaza  <miguel@novell.com>
4369
4370         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
4371         verifier has different rules for it.   Fixes a few verifier issues
4372         in the test suite.
4373
4374         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
4375         at the end, so people know what happened.
4376
4377 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
4378
4379         * brach-opts.c: in optimize_exception_target() make sure we
4380         are in a catch clause (fixes bug #79871).
4381
4382 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4383
4384         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
4385         more soft-float support fixes.
4386
4387 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
4388
4389         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
4390         that are passed half on the stack and half in registers.
4391
4392 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
4393
4394         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
4395         more mips integration work from Mark E Mason 
4396         <mark.e.mason@broadcom.com>.
4397
4398 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4399
4400         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
4401         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
4402         tramp-mips.c: added sources for the mips port, not
4403         integrated in the build yet. Contributed by
4404         Mark E Mason <mark.e.mason@broadcom.com>.
4405
4406 2006-11-14  Neale Ferguson <neale@sinenomine.net>
4407
4408         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
4409
4410 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4411
4412         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
4413         put the soft-float rules in its own file since it seems to
4414         break s390 compilation.
4415
4416 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4417
4418         * mini-arm.c: fixed wrnings.
4419
4420 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
4421
4422         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
4423         inssel-arm.brg: ARM support for soft-float.
4424
4425 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4426
4427         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
4428         loads and stores of 32 bit fp values.
4429
4430 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
4431
4432         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
4433
4434         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
4435         works. Fixes #79852 and #79463.
4436
4437 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4438
4439         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
4440         more soft-float support WIP and fixes.
4441
4442 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
4443
4444         * mini-arm.c: some VFP updates.
4445
4446 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4447
4448         * mini-exceptions.c: 0 is a valid local var offset in some
4449         architectures, don't assert (bug #78508).
4450
4451 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
4452
4453         * exceptions-arm.c: fixed off by one error in stack walk code.
4454
4455 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
4456
4457         * mini.h, mini.c: more precise tracking of type load exceptions.
4458
4459 2006-11-03  Robert Jordan  <robertj@gmx.net>
4460
4461         * Makefile.am: [WIN32] Add monow.exe target.
4462         * driver.c: [WIN32] Don't detach the console when debugging.
4463         Fixes bug #79797.
4464         
4465 2006-10-30  Miguel de Icaza  <miguel@novell.com>
4466
4467         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
4468
4469 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
4470
4471         * aot-compiler.c (emit_method_info): Add a case missed earlier.
4472
4473         * driver.c (mini_regression): Fix --regression with AOT.
4474
4475         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
4476
4477 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
4478
4479         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
4480
4481         * mini-sparc.h: Don't use sigaction on sparc/linux.
4482
4483         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
4484
4485         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
4486
4487         * mini-exceptions.c: Add proper include files for getpid ().
4488
4489 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
4490
4491         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
4492         address instead of a MonoJitInfo* to avoid decoding the exception info for the
4493         method.
4494
4495         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
4496         name cache to reduce its size.
4497
4498         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
4499
4500 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
4501
4502         * mini-x86.c: Save/restore the current LMF structure more efficiently using
4503         the mono_lmf TLS variable.
4504
4505         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
4506         trampoline lmf frames.  
4507
4508         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
4509
4510 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
4511
4512         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
4513         the mono_lmf TLS variable.
4514
4515         * mini-exceptions.c: Access the LMF structure through accessors.
4516
4517         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
4518         variable instead of in jit_tls->lmf.
4519
4520         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
4521         
4522         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
4523         trampoline lmf frames.
4524
4525         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
4526
4527 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
4528
4529        * mini.c trace.c mini-x86.c: Revert these too.
4530         
4531        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
4532        signature change.
4533
4534 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
4535
4536         * genmdesc.c: removed now dead code.
4537
4538 2006-10-09  Robert Jordan <robertj@gmx.net>
4539
4540         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
4541
4542 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
4543
4544         * mini.h: do not leave gaps in the opcode values.
4545
4546 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
4547
4548         * jit-icalls.h: flag functions as internal here, too.
4549
4550 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
4551
4552         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
4553         functions with the internal attribute.
4554
4555 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
4556
4557         * aot-compiler.c: fclose the file descriptor in the profile read loop.
4558
4559 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
4560
4561         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
4562         for soft-float.
4563
4564 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
4565
4566         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
4567         tail calls as on other platforms.
4568
4569         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
4570
4571         * iltests.il: Add a few tailcall tests.
4572
4573 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4574
4575         * driver.c: fix loop for old compilers (bug #79521).
4576
4577 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
4578
4579         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
4580
4581         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
4582
4583         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
4584         metadata without any code.
4585
4586         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
4587         more precise debugging information using gdb.
4588
4589 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
4590
4591         * inssel-ia64.brg: Make the helper methods static.
4592
4593 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4594
4595         * inssel-x86.brg: make the helper methods static.
4596
4597 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
4598
4599         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
4600
4601 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
4602
4603         * mini.c: updates for monoburg changes.
4604         * inssel.brg: make a few helper functions static as they should.
4605
4606 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
4607
4608         * Makefile.am: Move mini-codegen.c to common_sources.
4609
4610 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4611
4612         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
4613         instructions.
4614         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
4615         mini-ppc.h: port to use the common local register allocator.
4616
4617 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4618
4619         * mini.h: Remove the comment too then.
4620
4621 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
4622
4623         * mini.h: put back backend.data which is to be used shortly and
4624         doesn't increase the size of MonoInst. If any 64 bit arch aligned
4625         pointers on 4 byte boundaries it'd have much bigger issues running
4626         and you can ifdef it out anyway.
4627
4628 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4629
4630         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
4631         MonoInst size by 4 bytes on 64 bit machines.
4632
4633 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4634
4635         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
4636         replacement with more meaningful field names. Arch maintainers, please
4637         check the assigned names are good enough for your arch.
4638
4639 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4640
4641         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
4642         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
4643
4644 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
4645
4646         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
4647         relocations and memory requirements, put the optimization flags
4648         definitions in their own file.
4649
4650 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
4651
4652         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
4653
4654         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
4655
4656 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
4657
4658         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
4659
4660 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
4661
4662         * inssel.brg: use the correct function to get the size of an item
4663         in an array, given an element class.
4664         * aot-compiler.c: do not access class->class_size directly.
4665
4666 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4667
4668         * mini.h, debug-mini.c: added a debugging function to print
4669         info about local variables and arguments in a jitted method.
4670
4671 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
4672
4673         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4674
4675         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
4676
4677 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4678
4679         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
4680         inner and outer loops when passing vtypes.
4681
4682 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
4683
4684         * mini-ppc.c: take into account the cpu errata for cache flushing
4685         which caused some random errors (bug #79381).
4686
4687 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
4688
4689         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
4690         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
4691
4692 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
4693
4694         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
4695         loaded.
4696
4697         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
4698         freebsd ports tree.
4699
4700         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
4701         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
4702
4703         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
4704         displacement.
4705
4706 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
4707
4708         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
4709
4710 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
4711
4712         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
4713         macro does not have to be changed during debugging.
4714
4715         * 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>.
4716
4717         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
4718
4719         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
4720         
4721         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
4722         MONO_ARCH_NO_EMULATE_MUL is defined.
4723
4724         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
4725
4726         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
4727
4728         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
4729
4730         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
4731         
4732 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
4733
4734         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
4735         stuff to mini-exceptions.c where it is used.
4736
4737         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
4738         setup code, the real one is in mini-exceptions.c.
4739
4740         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
4741         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
4742         some changes from the freebsd ports tree.
4743
4744         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
4745         constants.
4746         
4747         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
4748
4749 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
4750
4751         * mini.c: on Linux, check for /proc to be mounted
4752         (bug# 79351, novell bug#201204).
4753
4754 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
4755
4756         * mini.c: handle cases where pthread_attr_getstack() behaves
4757         incorrectly (bug #78096).
4758
4759 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
4760
4761         * mini-arm.c: support larger stack frames (bug #79272).
4762
4763 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
4764
4765         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
4766
4767         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
4768         tokens.
4769
4770         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
4771         mono_class_from_name () to find a class from its name.
4772
4773         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
4774
4775 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
4776
4777         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
4778
4779 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
4780
4781         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
4782
4783 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
4784
4785         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
4786         callinfo->trampoline.
4787
4788         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
4789         fixes #79271.
4790         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
4791         future.
4792
4793 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
4794
4795         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
4796
4797 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
4798
4799         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
4800         stats.method_trampolines, it is already done by the generic trampoline code.
4801
4802         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
4803         
4804 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
4805
4806         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
4807
4808         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
4809
4810         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
4811
4812         * mini.c (print_jit_stats): Print mscorlib mempool size too.
4813         
4814         * mini.c (print_jit_stats): Print new stats.
4815
4816         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
4817
4818 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
4819
4820         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
4821         Address on two dimensional arrays. Fixes #78729.
4822
4823         * mini.h (MonoCompile): Add a 'skip_visibility' field.
4824
4825         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
4826         a method.
4827
4828         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
4829
4830         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
4831         #79130.
4832         
4833         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
4834         a race condition.
4835         (mini_get_ldelema_ins): Ditto.
4836
4837 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
4838
4839         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
4840         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
4841         Fixes #79213.
4842
4843 2006-08-29 Neale Ferguson <neale@sinenomine.net>
4844
4845         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
4846         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
4847
4848         * exceptions-s390x.c: Cosmetic change.
4849
4850         * tramp-s390.c: Fix warning.
4851
4852         * cpu-s390.md: Correct length of mul_imm.
4853
4854 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
4855
4856         * aot-compiler.c: added binary writer with ELF backend
4857         implementation (only on Linux/x86 for now).
4858
4859 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4860
4861         * Makefile.am: Don't run net 2.0 AOT tests.
4862
4863         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
4864         (mono_compile_assembly): Skip net 2.0 assemblies as well.
4865
4866         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
4867
4868 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
4869
4870         * aot-compiler.c: simplified and refactored the asm-writing code
4871         to allow different backends.
4872
4873 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
4874
4875         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4876
4877         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
4878         little. Share patches of type TYPE_FROM_HANDLE as well.
4879
4880         * mini.c (mono_patch_info_equal): New helper function.
4881         (mono_patch_info_hash): Ditto.
4882
4883         * aot-compiler.c (emit_method_code): Fix s390 build.
4884
4885         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
4886         is not handled because it is stored as a flag and not as a type ctor. Fixes
4887         #79016.
4888
4889 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
4890
4891         * aot-compiler.c: Fix computation of GOT slot statistics.
4892         
4893         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
4894         Also remove support for not PIC AOT.
4895
4896         * mini.h: Bump AOT file format version.
4897
4898         * objects.cs: Add a test for #78990.
4899
4900         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
4901         (peter.dettman@iinet.net.au). Fixes #79087.
4902
4903         * basic-long.cs: Add a test for the above.
4904
4905 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
4906
4907         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
4908         
4909         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
4910         code somewhat.
4911
4912 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
4913
4914         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
4915         exceptions.
4916
4917 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
4918
4919         * mini.c: Don't verify COM proxy invoke calls
4920         
4921
4922 2006-08-10  Dick Porter  <dick@ximian.com>
4923
4924         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
4925         which process is holding semaphores locked.
4926
4927 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
4928
4929         * mini-ia64.c mini-amd64.c: Fix #79027.
4930
4931         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
4932
4933         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
4934
4935         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
4936         implicit arguments in a vararg call. Fixes #79027.
4937
4938 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
4939
4940         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
4941         (mono_get_array_new_va_signature): Ditto.
4942
4943 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
4944
4945         * aot-runtime.c: Call init_plt lazily.
4946
4947         * inssel-long.brg: Fix unsigned long->int conversion.
4948
4949         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
4950
4951         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
4952         that most data is now in the .rss/.data section.
4953
4954 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
4955
4956         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
4957
4958         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
4959
4960         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
4961
4962         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
4963
4964         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
4965         virtual call. Fixes #79010.
4966
4967         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
4968         and use the result as the this argument in the real call.
4969
4970         * generics.2.cs: Add a new test for #79010.
4971         
4972 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
4973
4974         * mini-x86.c: Fix a warning.
4975
4976         * aot-compiler.c: Add a bunch of statistics.
4977
4978         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
4979
4980 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
4981
4982         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
4983
4984 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
4985
4986         * 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>.
4987
4988 2006-07-13  Miguel de Icaza  <miguel@novell.com>
4989
4990         * mini.c (mono_method_to_ir): Obtain the original method in the
4991         CIL stream and use this to perform validation.
4992
4993         Fixed: #78816
4994
4995 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
4996
4997         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
4998         (mono_arch_call_opcode): Ditto.
4999
5000         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
5001         #78826.
5002
5003         * mini.c (mono_patch_info_dup_mp): New helper function.
5004         
5005         * aot-compiler.c (compile_method): Fix some of the memory allocated during
5006         compilation. Fixes #78827.
5007
5008 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
5009
5010         * declsec.c: Use original security informations for
5011           MONO_WRAPPER_MANAGED_TO_MANAGED.
5012
5013 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
5014
5015         * mini.c: Allow Com Interop methods/classes and
5016         don't verify COM wrapper calls
5017         
5018
5019 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
5020
5021         * inssel-long32.brg: Fix long->i4 checked conversion.
5022
5023         * exceptions.cs: Add a test for the above.
5024
5025 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
5026
5027         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
5028
5029         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
5030         leaks.
5031
5032         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
5033         #78775.
5034
5035 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
5036
5037         * mini.c: Fix solaris/x86 exception handling.
5038
5039         * Makefile.am: Get rid of $(ICU_LIBS).
5040
5041 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
5042
5043         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
5044         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
5045         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
5046
5047         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
5048
5049         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
5050         this function causes a SIGSEGV.
5051
5052 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
5053
5054         * mini.c: Remove unused solaris/x86 includes.
5055
5056 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
5057
5058         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
5059
5060 2006-06-20  Jb Evain  <jbevain@gmail.com>
5061
5062         * cpu-g4.md: fix max length of start_handler instruction.
5063
5064 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
5065         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
5066
5067 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
5068         * ssa.c: Fixed bug 78653 for SSA based deadce.
5069         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
5070         MonoInst.flags, used in SSA based deadce.
5071         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
5072         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
5073
5074 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
5075
5076         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
5077         it can end up using non executable memory on ppc64 systems
5078         running ppc32 userspace (fix from Johannes Berg).
5079
5080 2006-06-14  Dick Porter  <dick@ximian.com>
5081
5082         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
5083         4.1.1
5084
5085 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
5086         * mini.c: Made so that inline is locally disabled if it would
5087         trigger a .cctor, because too many apps depend on this behavior
5088         (which seems to be also the one of the MS CLR).
5089
5090 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
5091
5092         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
5093         No idea why this worked before.
5094
5095         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
5096         which branch to outer exception clauses since they could skip the
5097         inner finally clauses. Fixes #78633.
5098
5099         * exceptions.cs: Add a test for the above.
5100
5101         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
5102         Fixes #78629.
5103
5104         * iltests.il: Add a test for the above.
5105
5106 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
5107
5108         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
5109         after the end of a try bblock, to prevent asserts in mini_method_compile ().
5110
5111         * iltests.il: Add a test for the above.
5112
5113 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
5114
5115         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
5116         
5117         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
5118         methods as instrinsics.
5119
5120 2006-06-09  Wade Berrier <wberrier@novell.com>
5121
5122         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
5123         (simple-cee-ops.h ssapre-mini-ops.h)
5124
5125 2006-06-09  Neale Ferguson <neale@sinenomine.net>
5126
5127         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
5128         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
5129         instruction).
5130         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
5131         * cpu-s390x.md: Fix max. length values for a couple of instructions.
5132
5133 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
5134
5135         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
5136
5137 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
5138
5139         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
5140         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
5141         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
5142         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
5143         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
5144         of opcodes, so that bug 78549 should not happen again.
5145         * ssapre.c: Updated to use the renamed files.
5146
5147 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
5148
5149         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
5150         in OP_ATOMIC_EXCHANGE_I4.
5151
5152 2006-06-07  Wade Berrier <wberrier@novell.com>
5153
5154         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
5155         in mono_debugger_create_notification_function)
5156
5157 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
5158
5159         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
5160         
5161         * mini.c (type_from_stack_type): Disable some changes which do not
5162         seem to work.
5163
5164         * driver.c: Reenable opts.
5165
5166         * mini.h (MonoStackSlot): New structure to keep track of the verification state
5167         of the evaluation stack.
5168         
5169         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
5170         evaluation stack trace at entry to the bblock.
5171
5172         * mini.c (merge_stacks): New function to perform verification of stack merges.
5173         Turned off by default.
5174
5175         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
5176         STACK_MP.
5177         
5178 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
5179
5180         * local-propagation.c: Fixed bug 78549.
5181
5182 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
5183
5184         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
5185
5186 2006-06-02  Miguel de Icaza  <miguel@novell.com>
5187
5188         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
5189         tramp-arm.c, tramp-ia64.c
5190         (mono_debugger_create_notification_function): Update signature to
5191         new signature and use new protocol for creating the notification
5192         function.  
5193
5194         Should fix the build.
5195
5196 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
5197
5198         * exceptions-ppc.c (mono_jit_walk_stack)
5199         (ves_icall_get_frame_info): Fix the build
5200
5201 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
5202
5203         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
5204
5205 2006-05-31  Raja R Harinath  <rharinath@novell.com>
5206
5207         * il2tests.2.il: New file for generics CIL tests.  Add test for
5208         #78019.
5209         * Makefile.am: Update.
5210
5211         Fix #78019
5212         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
5213         to nullable types.
5214
5215 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
5216
5217         * aliasing.c: Fixed bug 78311.
5218
5219 2006-05-29  Martin Baulig  <martin@ximian.com>
5220
5221         * mini-exceptions.c (mono_find_jit_info): When computing the
5222         native offset, check whether we're actually inside the method's
5223         code; call mono_debug_print_stack_frame() to format the frame.
5224         (ves_icall_System_Exception_get_trace): Call
5225         mono_debug_print_stack_frame() to format the stack frame.
5226         (ves_icall_get_trace): Update to the new debugging API.
5227         (mono_jit_walk_stack_from_ctx): Likewise.
5228         (ves_icall_get_frame_info): Likewise.
5229
5230         * mini.c (get_method_from_ip): Use the new debugging API.
5231         (mono_print_method_from_ip): Likewise.
5232
5233         * exceptions-ppc.c
5234         (mono_jit_walk_stack): Use the new debugging API.
5235         (ves_icall_get_frame_info): Likewise.   
5236
5237 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
5238
5239         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
5240
5241 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
5242
5243         * mini.c: Added "limitator" to inline for debugging.
5244
5245 2006-05-24  Martin Baulig  <martin@ximian.com>
5246
5247         * debug-debugger.c (mono_debugger_init): Create a private,
5248         malloc()-based code manager for the notification function and
5249         intentionally leak it on exit.  This fixes the crash-on-exit race
5250         condition.
5251
5252         * tramp-amd64.c
5253         (mono_debugger_create_notification_function): Added
5254         `MonoCodeManager *' argument.
5255
5256         * tramp-x86.c
5257         (mono_debugger_create_notification_function): Added
5258         `MonoCodeManager *' argument.
5259
5260 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
5261
5262         * aliasing.c: Fixed 64 bit issue.
5263         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5264         default since all known bugs are fixed (one more time!).
5265
5266 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
5267
5268         * mini.c: write barrier support.
5269
5270 2006-05-23  Martin Baulig  <martin@ximian.com>
5271
5272         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
5273         check at the top of the file.
5274
5275 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
5276
5277         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
5278         reverting changes without reason and without changelog entries.
5279
5280 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
5281
5282         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
5283         to a few opcodes. Fixes #78439.
5284
5285         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
5286         consistency with other archs.
5287
5288         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
5289
5290 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5291
5292         * debug-debugger.c: fix the build.
5293
5294 2006-05-17  Martin Baulig  <martin@ximian.com>
5295
5296         * debug-debugger.c
5297         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
5298         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
5299         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
5300         (debugger_attach): Call GC_mono_debugger_add_all_threads().
5301
5302 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
5303
5304         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
5305
5306 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
5307
5308         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
5309         MONO_TYPE_GENERICINST.
5310         
5311         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
5312         MONO_TYPE_GENERICINST.
5313
5314 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
5315
5316         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
5317         #78325.
5318
5319 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
5320
5321         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
5322         mempool.
5323         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
5324
5325 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
5326
5327         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
5328         mono_trace_cleanup ().
5329
5330         * iltests.il: Fix problem with the newly added test.
5331
5332         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
5333         due to register constraints, free up the previous hreg. Fixes #78314.
5334
5335         * iltests.il: Add new test for #78314.  
5336
5337         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
5338         Interlocked.Add. Fixes #78312.
5339
5340         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
5341         
5342 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
5343
5344         * inssel.brg (mini_emit_virtual_call): Fix a warning.
5345
5346 2006-05-05  Martin Baulig  <martin@ximian.com>
5347
5348         * debug-mini.c (mono_debug_open_block): New method.
5349
5350         * mini-amd64.c
5351         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5352         the beginning of each basic block.
5353
5354         * mini-x86.c
5355         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5356         the beginning of each basic block.
5357
5358 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5359
5360         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5361         default until I understand why they break the build on amd64.
5362
5363 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
5364
5365         * mini.c (mini_cleanup): Call mono_cleanup ().
5366
5367         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
5368         errors.
5369
5370 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5371
5372         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
5373         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5374         default since all known bugs are fixed, and I cannot reproduce bug
5375         77944... I'm asking Matt Hargett to test again after this commit.
5376
5377 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
5378
5379         * mini-codegen.c: Fixed typo that thrashed inline.
5380
5381 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
5382
5383         * dominators.c (compute_dominators): Avoid using a worklist since
5384         it is not correct in some cases. Instead, iterate over all bblocks as
5385         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
5386
5387 2006-04-28  Miguel de Icaza  <miguel@novell.com>
5388
5389         * mini.c (mono_jit_compile_method_inner): Use
5390         mono_prepare_exception_from_error that resets the value
5391         internally.
5392
5393 2006-04-27  Miguel de Icaza  <miguel@novell.com>
5394
5395         * mini.c: Move the mini_loader_error_to_exception to metadata. 
5396         
5397 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5398
5399         * aliasing.c: Fixed bug 78210.
5400
5401 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5402
5403         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5404         default until all their problems (or the ones they trigger) are fixed.
5405
5406 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
5407
5408         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
5409         
5410         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
5411         as loaded only after resolving patches since that could invoke the same method.
5412
5413         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
5414
5415         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
5416         functions.
5417
5418         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
5419         AOT loader.
5420
5421         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
5422         stack.
5423
5424         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
5425         made from AOT code through the PLT table.
5426
5427         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
5428         holding the plt offset when a call is made to the aot plt trampoline.
5429         
5430 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5431
5432         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
5433         amd64 AOT support.
5434
5435         * Makefile.am (common_sources): Fix build breakage.
5436
5437         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
5438         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
5439         intra-assembly calls if possible.
5440         
5441         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
5442
5443         * mini-trampolines.c: Handle PLT entries.
5444
5445         * mini.c: Avoid creating a GOT var for calls.
5446
5447         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
5448         from mscorlib code.
5449
5450         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
5451         from mscorlib code.
5452
5453         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
5454         AOT code.       
5455
5456         * mini.h: Bump AOT file format version.
5457         
5458         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
5459         covers more cases.
5460
5461 2006-04-25  Martin Baulig  <martin@ximian.com>
5462
5463         * driver.c: Disable copyprop, consprop and inline when running
5464         inside the debugger.
5465
5466 2006-04-25  Martin Baulig  <martin@ximian.com>
5467
5468         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
5469         with `get_current_thread' and added `detach'.
5470         (MonoDebuggerMetadataInfo): Added `thread_size',
5471         `thread_tid_offset', `thread_stack_ptr_offset' and
5472         `thread_end_stack_offset'.
5473
5474 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5475
5476         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
5477         aot-runtime.c.
5478
5479         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
5480         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
5481
5482         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
5483
5484         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
5485
5486         * aot.c: Add support for ADJUSTED_IID.  
5487
5488 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
5489
5490         * aot.c (emit_method_order): Don't align method_order_end.
5491
5492         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
5493         the interface ID changes.
5494
5495 2006-04-21  Dick Porter  <dick@ximian.com>
5496
5497         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
5498         cleaning up a thread.  Fixes the new part of bug 77470.
5499
5500 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
5501
5502         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
5503         to managed wrapper.
5504                      
5505 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
5506
5507         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
5508         
5509         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
5510         SIGSEGV. Fixes #78072.
5511
5512         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
5513         unregister our SIGABRT handler.
5514
5515 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
5516
5517         * mini.c: Disabled inline where it can alter the call stack in a
5518         way visible from managed code.
5519         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
5520         default.
5521
5522 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
5523
5524         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
5525         on other platforms. Fixes #78089.
5526
5527 2006-04-13  Martin Baulig  <martin@ximian.com>
5528
5529         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
5530         determine whether we're inside the debugger.
5531
5532         * debug-debugger.h
5533         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
5534
5535 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
5536
5537         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
5538         handler clauses. Fixes #78024.
5539
5540         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
5541         in the CALL_MEMBASE opcodes. Fixes #78088.
5542         (mono_arch_get_vcall_slot_addr): Ditto.
5543
5544 2006-04-10  Martin Baulig  <martin@ximian.com>
5545
5546         * debug-debugger.c: The thread handling code has now been moved
5547         into ../metadata/threads.c.
5548
5549 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5550
5551         * driver.c (mono_main): Fix --with-gc=none build.
5552
5553         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
5554         (mono_spillvar_offset_float): Ditto.
5555         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
5556         hreg, not when its !global, since on ia64, there is a third category: stacked
5557         registers.      
5558
5559 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
5560
5561         * mini.c: set MonoInst->klass for load field address and a few other
5562         places.
5563
5564 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5565
5566         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
5567
5568 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
5569
5570         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
5571         the branch opt changes.
5572
5573 2006-04-06  Dick Porter  <dick@ximian.com>
5574
5575         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
5576         
5577         * wapihandles.c (mini_wapi_seminfo): 
5578         * driver.c (mono_main): Add semaphore info option
5579
5580 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
5581
5582         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
5583         branch optimization changes. Fixes #78009.
5584
5585 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5586
5587         * mini.c: ignore accessibility of methods in managed->native wrappers.
5588
5589 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
5590
5591         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
5592         
5593         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
5594
5595 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
5596
5597         * mini.c: Modify the branch optimizations to preserve the invariant that
5598         the entries inside the in_bb and out_bb arrays are unique.
5599         (mono_unlink_bblock): Avoid creation of new arrays.
5600
5601 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
5602
5603         * mini.c (mono_unlink_bblock): Fix regression caused by previous
5604         change (#77992).
5605
5606 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
5607
5608         * mini.c (optimize_branches): Remove the "optimizations" in
5609         the cbranch1/cbranch2 -> branch cases which were causing several
5610         problems in the past. Fixes #77986.
5611
5612 2006-03-31  Chris Toshok  <toshok@ximian.com>
5613
5614         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
5615         default optimizations :(
5616
5617 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
5618
5619         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
5620         branch.
5621
5622 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
5623
5624         * local-propagation.c: Added comments to structs and removed
5625         "Mono" prefixes from local tree mover types.
5626
5627 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
5628
5629         * Makefile.am (arch_sources): Define this for each architecture so 
5630         libmono_la_SOURCES is defined in one place.
5631
5632 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
5633
5634         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
5635         from handles/.
5636
5637 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
5638
5639         * driver.c: print the GC name supplied by configure.
5640
5641 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
5642
5643         * local-propagation.c: Added tree mover, and moved here all the
5644         local propagation code from mini.c
5645         * mini.c: Added support for treeprop, and moved all the local
5646         propagation code to local-propagation.c
5647         * mini.h: Added support for treeprop
5648         * driver.c: Added support for treeprop, enabled consprop, copyprop,
5649         treeprop, inline and deadce by default
5650         * Makefile.am: Added local-propagation.c
5651
5652 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
5653
5654         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
5655
5656 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
5657
5658         * debug-debugger.c: make it compile without the Boehm GC.
5659
5660 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
5661
5662         * mini.c: fixed issue with mismatch when an icall is registered
5663         with multiple names but same address.
5664
5665 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5666
5667         * declsec.c, mini-exceptions.c: use write barrier to set reference
5668         fields of managed objects.
5669
5670 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5671
5672         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
5673         (can_access_internals): Fix a warning.
5674
5675         * mini.c (print_method_from_ip): Rename this to 
5676         mono_print_method_from_ip so it gets exported.
5677
5678         * trace.c: Deal with strings inside StringBuilder's containing garbage
5679         and fix memory leaks. Fixes #77848.
5680
5681 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
5682
5683         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
5684         fixes #77787.
5685
5686 2006-03-16 Neale Ferguson <neale@sinenomine.net>
5687         
5688         * mini-s390.c: Remove OP_X86_TEST_NULL.
5689
5690 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5691
5692         * mini.c: use the correct GetHashCode() for the moving collector.
5693
5694 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
5695
5696         * liveness.c: Regalloc spill cost tuning.
5697
5698 2006-03-15 Neale Ferguson <neale@sinenomine.net>
5699         
5700         * mini-s390x.h: Correct S390_LONG macro.
5701
5702         * mini-s390x.c: Cleanup unused code.
5703
5704 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
5705
5706         * jit-icalls.h: New file.
5707
5708         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
5709         icalls and include that instead of including jit-icalls.c.
5710
5711         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
5712         OP_X86 opcodes.
5713
5714 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
5715
5716         * mini.c: when checking for member accessibility, also check for
5717         friend assemblies and for explicit interface implementations.
5718
5719 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
5720
5721         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
5722
5723         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
5724
5725         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5726         common cases are done first.    
5727
5728         * mini-ops.h: Only define platform specific opcodes on the given platform.
5729
5730         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
5731         branch.
5732         
5733 2006-03-14  Martin Baulig  <martin@ximian.com>
5734
5735         Revert Paolo's change from r57348:
5736
5737         * mini.h: don't use gboolean for bitfields.
5738         * mini.c: verifier changes for fields and methods accessibility.
5739
5740 2006-03-13  Neale Ferguson <neale@sinenomine.net>
5741
5742         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
5743
5744         * mini-s390x.c: Fix conv_r_un.
5745
5746         * cpu-s390, cpu-s390x.md: Fix lengths.
5747
5748 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
5749
5750         * mini.c: nested types have access to all the nesting
5751         levels, not just the enclosing types.
5752
5753 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5754
5755         * mini.c: added a few more verification checks.
5756
5757 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
5758
5759         * liveness.c: Merge optimizations from the linear-il branch.
5760
5761 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5762
5763         * mini-ia64.c (emit_call): Add a comment.
5764
5765         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
5766
5767         * tramp-ia64.c: Fix some warnings.
5768
5769 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
5770
5771         * mini.h: don't use gboolean for bitfields.
5772         * mini.c: verifier changes for fields and methods accessibility.
5773
5774 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
5775
5776         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
5777         lazy icall wrapper changes.
5778
5779         * dominators.c: Replace all the dominator algorithms with faster
5780         ones from the linear-il branch.
5781
5782         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
5783         the mempool.
5784
5785         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
5786         common cases are done first.
5787
5788         * mini-amd64.c: Fix some warnings.
5789
5790         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
5791         from the mempool.
5792
5793         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
5794         added code.
5795
5796         * mini.h: Add a missing prototype.
5797
5798 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
5799
5800         * mini.c: Compile icall wrappers lazily.
5801
5802         * mini-codegen.c: Use printf instead of g_print since its much faster.
5803
5804         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
5805         function.
5806
5807         * mini.c (optimize_branches): Cache the negative result from 
5808         remove_block_if_useless ().
5809
5810         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
5811         Also fix some bblock linking issues.
5812
5813         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
5814         assembly files.
5815
5816         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
5817
5818         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
5819         accessed fields first, for better cache behavior.
5820         
5821 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
5822
5823         * mini.c: speedup IList<T> array accesses.
5824
5825 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
5826
5827         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
5828         inline_costs counter. Fixes #77190.
5829
5830 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
5831
5832         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
5833         trace messages. Fixes #77706.
5834
5835 2006-03-04  Martin Baulig  <martin@ximian.com>
5836
5837         * tramp-amd64.c, tramp-x86.c
5838         (mono_debugger_create_notification_function): Use
5839         mono_global_codeman_reserve() to allocate a buffer at runtime and
5840         return it.
5841
5842         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
5843
5844         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
5845         notification function at runtime and then call `initialize' in the
5846         `MONO_DEBUGGER__debugger_info' vtable.
5847
5848 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
5849
5850         * iltests.il: Fix a visibility problem.
5851
5852 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5853
5854         * driver.c, mini.c: add hooks for the counters API.
5855
5856 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
5857
5858         * driver.c: show disabled options.
5859
5860 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
5861
5862         * linear-scan.c: always use cost-driven selection.
5863
5864 2006-02-28  Raja R Harinath  <rharinath@novell.com>
5865
5866         * jit-icalls.c (helper_compile_generic_method): Revert change from
5867         2006-02-24.
5868
5869 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
5870
5871         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
5872
5873 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
5874
5875         * inssel.brg: style fixes, mostly to force the updated monoburg
5876         to run for people using svn.
5877
5878 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
5879
5880         * mini.c: match monoburg changes.
5881
5882 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5883
5884         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
5885         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
5886         declaration in the header file.
5887
5888 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
5889
5890         * helpers.c: reduce relocations and mem usage.
5891
5892 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
5893
5894         * mini.h, mini-codegen.c: disable logging features if
5895         requested by configure.
5896
5897 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
5898
5899         * mini.c: tiny verifier changes.
5900
5901 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5902
5903         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
5904         cpu-pentium.md: stack alignment changes for osx/x86,
5905         partially from Geoff Norton <gnorton@customerdna.com>.
5906
5907 2006-02-24  Raja R Harinath  <harinath@gmail.com>
5908
5909         * jit-icalls.c (helper_compile_generic_method): Update to changes
5910         in metadata/class.c.
5911
5912 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
5913         
5914         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
5915         
5916         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
5917         interface calls with large offsets.
5918
5919 2006-02-23  Raja R Harinath  <rharinath@novell.com>
5920
5921         * jit-icalls.c (helper_compile_generic_method): Document the
5922         special-case we depend on so that we can inflate the method twice
5923         with the same context with no bad side-effects.
5924
5925 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
5926
5927         * mini-x86.c, mini-amd64.c: fix for case when xen support
5928         is disabled.
5929
5930 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
5931
5932         * mini-x86.c, mini-amd64.c: generate code to access tls items
5933         in a faster way for Xen systems.
5934
5935 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
5936
5937         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
5938         updates and compilation fixes for the OSX/x86 port, mostly from
5939         Geoff Norton <gnorton@customerdna.com>.
5940
5941 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
5942
5943         * inssel.brg: faster interface call implementation
5944         to sync with the interface_offsets MonoVTable changes.
5945
5946 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
5947
5948         * mini.c: more verification checks.
5949
5950 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
5951
5952         * mini.c: added a few more verification checks.
5953
5954 2006-02-17      Neale Ferguson <neale@sinenomine.net>
5955
5956         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
5957         facility on the processor and use it if available.
5958
5959 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
5960
5961         * driver.c, aot.c, mini.c: throw exception if the IL code is
5962         invalid or unverifiable.
5963
5964 2006-02-17  Raja R Harinath  <rharinath@novell.com>
5965
5966         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
5967         m.StructField.
5968
5969 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
5970
5971         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
5972
5973 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5974
5975         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
5976         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
5977         handling of instantiated generic valuetypes.
5978
5979 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
5980
5981         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
5982         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
5983         instead.
5984
5985         * generics.2.cs: Revert the nullable reftypes tests.
5986
5987 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
5988
5989         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
5990         using __builtin_frame_address (1) as it doesn't work in the presence
5991         of optimizations. Hopefully fixes #77273.
5992
5993         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
5994         -> generics.cs change as it doesn't work with some automake versions.
5995
5996 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5997
5998         * mini.c: handle systems that sue a different way to
5999         retrieve the stack address of the current thread.
6000
6001 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
6002
6003         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
6004         it specially in the makefile.
6005
6006         * generics.2.cs: Add tests for nullable reference types.
6007
6008 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6009
6010         * mini.c: always handle the case when mono_jit_init()
6011         is called in a thread different from the main thread,
6012         confusing libgc (bug #77309).
6013
6014 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
6015
6016         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
6017
6018 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6019
6020         * mini.c: change optimize_branches () to use a single loop
6021         and introduce a new optimization to simplify some range checks.
6022
6023 2006-02-03  Martin Baulig  <martin@ximian.com>
6024
6025         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
6026         and merged with debugger_thread_manager_add_thread().
6027         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
6028         inform the debugger about the main thread.
6029
6030 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
6031
6032         * basic.cs: Add test for div.un/rem.un constant folding.
6033
6034 2006-02-03  Neale Ferguson <neale@sinenomine.net>
6035
6036         * cpu-s390x.md: correct int_xor_imm length
6037
6038 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
6039
6040         * generics.2.cs: New test for #77442.
6041
6042         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
6043         #77442.
6044
6045 2006-02-02  Martin Baulig  <martin@ximian.com>
6046
6047         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
6048         <mono/metadata/mono-debug-debugger.h>   
6049
6050         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
6051
6052 2006-02-02  Martin Baulig  <martin@ximian.com>
6053
6054         * debug-debugger.h: New header file for debug-debugger.c.
6055
6056         * debug-debugger.c: Big API cleanup; don't run the managed Main()
6057         function is a separate thread anymore; add support for attaching.
6058
6059 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
6060
6061         * tramp-x86.c: Fix a warning.
6062
6063 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
6064
6065         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
6066         on very large methods.
6067
6068         * aot.c (load_patch_info): Fix a warning.
6069
6070 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
6071
6072         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
6073         mini-ops.h: alu membase optimizations.
6074
6075 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
6076
6077         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
6078         to speedup StringBuilder.
6079
6080 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
6081
6082         * dominators.c (mono_compute_natural_loops): Fix detection of
6083         loop body start blocks.
6084
6085         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
6086
6087 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
6088
6089         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
6090         #75145.
6091
6092 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
6093
6094         * aliasing.c: Fixed aliasing issue on 64 bit archs.
6095
6096 2006-01-25  Martin Baulig  <martin@ximian.com>
6097
6098         * debug-debugger.c: Moved the `MonoDebuggerManager' and
6099         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
6100         started to cleanup this file a little bit.
6101
6102 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
6103
6104         * mini.c: optimize a codepath frequently happening in generics code.
6105
6106 2006-01-23  Martin Baulig  <martin@ximian.com>
6107
6108         * Makefile.am: Only compile debug-debugger.c on supported platforms.
6109
6110         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
6111         functions directly.
6112
6113         * driver.c: debug-debugger.c is only available if
6114         `MONO_DEBUGGER_SUPPORTED' is defined.   
6115
6116 2006-01-23  Martin Baulig  <martin@ximian.com>
6117
6118         * debug-debugger.c: Only enable this on platforms where the Mono
6119         Debugger is working (x86 and x86_64).
6120
6121 2006-01-21  Martin Baulig  <martin@ximian.com>
6122
6123         The Mono Debugger is now using the normal `mono' instead of the
6124         `mono-debugger-mini-wrapper' when executing managed code.
6125
6126         * debug-debugger.c: New file; previously known as
6127         debugger/wrapper/wrapper.c.
6128
6129         * debug-mini.c (mono_init_debugger): Removed.
6130
6131         * driver.c (mono_main): Added new `--inside-mdb' command line
6132         argument which is used when running inside the debugger.
6133
6134 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
6135
6136         * liveness.c (mono_analyze_liveness): Remove some unused data
6137         structures.
6138
6139 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
6140
6141         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
6142
6143 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
6144
6145         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
6146         depends on implementation details of monobitset.
6147
6148         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
6149         Fixes #77271.
6150
6151 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
6152
6153         * liveness.c: Update after monobitset changes.
6154
6155 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
6156
6157         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
6158
6159 2006-01-11 Neale Ferguson <neale@sinenomine.net>
6160
6161         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
6162
6163         * mini-s390x.c: Remove warning messages.
6164
6165 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
6166
6167         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
6168
6169 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
6170
6171         * generics.2.cs: Add ldelem/stelem_any test.
6172
6173 2006-01-10 Neale Ferguson <neale@sinenomine.net>
6174
6175         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
6176
6177 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
6178
6179         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
6180         
6181 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
6182
6183         * generics.2.cs: Reenable vtype tests.
6184
6185         * inssel-x86.brg: Remove an icorrect valuetype rule.
6186
6187 2006-01-06 Neale Ferguson <neale@sinenomine.net>
6188
6189         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
6190         initial support for OP_ABS.
6191
6192 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6193
6194         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
6195
6196 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6197
6198         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
6199         conversion and implement LADD/LSUB.
6200
6201         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
6202         architectures.
6203
6204 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6205
6206         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
6207
6208         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
6209         architectures.
6210
6211 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6212
6213         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
6214         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
6215         (stack walk problem).
6216
6217 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
6218
6219         * aot.c (mono_aot_load_method): Fix a warning.
6220
6221 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6222
6223         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
6224
6225 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6226
6227         * iltests.il: Add test for #77148.
6228
6229         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
6230         #77148.
6231
6232 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6233
6234         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
6235
6236 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6237
6238         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
6239         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
6240
6241         * basic-long.cs: Add lconv-to-r4/r8 tests.
6242
6243 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6244
6245         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
6246
6247         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
6248         here as on other archs.
6249
6250 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6251
6252         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
6253
6254 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6255
6256         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
6257         
6258         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
6259
6260         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
6261         instrument_prolog; Add memory_barrier instruction.
6262
6263 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
6264
6265         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
6266
6267 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
6268
6269         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
6270
6271         * aliasing.c inssel.brg: Fix warnings.
6272
6273         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
6274         could skip initialization of some parts of memory.
6275
6276         * mini.c mini-ia64.c: Fix warnings.
6277
6278         * inssel-sparc.brg: Add an implementation of lneg which actually works.
6279
6280 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
6281
6282         * aliasing.c (mono_build_aliasing_information): Add a workaround for
6283         a crash seen on sparc.
6284
6285         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
6286         
6287         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
6288
6289 2005-12-21 Neale Ferguson <neale@sinenomine.net>
6290
6291         * mini-ops.h: Add s390_backchain instruction
6292
6293         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
6294
6295         * cpu-s390.md: Add s390_backchain instruction
6296
6297         * mini-s390.c: Significant ABI changes
6298
6299         * mini-s390.h: Cater for zero length structures
6300
6301 2005-12-20 Neale Ferguson <neale@sinenomine.net>
6302
6303         * mini-s390.c: ABI fixes
6304
6305         * inssel-s390.brg: Remove debug statements
6306
6307         * cpu-s390.md: Fix length of ATOMIC_xx operations
6308
6309 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
6310
6311         * basic-float.cs: Add float<->long conversion tests.
6312
6313 2005-12-16 Neale Ferguson <neale@sinenomine.net>
6314
6315         * mini-s390.c: Fix LOCALLOC processing.
6316
6317         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
6318
6319 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
6320
6321         * iltests.il: Add tests for some opcodes not covered by the other
6322         tests.
6323
6324 2005-12-15 Neale Ferguson <neale@sinenomine.net>
6325
6326         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
6327         register loading for Tail processing; Correct trace output.
6328
6329         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
6330
6331         * cpu-s390.md: Correct size of jmp instruction. 
6332
6333 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6334
6335         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
6336
6337 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6338
6339         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
6340           Bring s390 up to current level.
6341
6342 2005-12-12  Zltan Varga  <vargaz@gmail.com>
6343
6344         * generics.2.cs: Disable the newly added tests as they do not work yet.
6345         
6346         * generics.2.cs: Add valuetype tests.
6347
6348 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
6349
6350         * basic-long.cs: Add i4->u8 test.
6351
6352         * objects.cs: Add tests for JIT intrinsic.
6353
6354         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
6355         optimizations lost by a mistake.
6356
6357 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
6358
6359         * basic-long.cs: Remove a test moved to objects.cs.
6360
6361         * arrays.cs: Add more array tests.
6362
6363 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
6364
6365         * arrays.cs: Add new tests for multi-dimensional arrays.
6366
6367 2005-12-06  Raja R Harinath  <rharinath@novell.com>
6368
6369         * Makefile.am (test_sources2): Add generics.2.cs.
6370         (EXTRA_DIST): Add test_sources2.
6371
6372 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
6373
6374         Support for boxing and unboxing nullable types as well as the
6375         isinst operation on nullables, per the CLI ammendment.
6376
6377         * inssel.brg (CEE_ISINST): Special case for nullable
6378
6379         * mini.c (handle_unbox_nullable): new method
6380         (handle_box): Special case for nullable types
6381         (mono_method_to_ir): Call handle_unbox_nullable in correct
6382         places.
6383
6384         * generics.2.cs: New test suite
6385
6386         * Makefile.am: Support for regression tests with generics.
6387
6388 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
6389
6390         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
6391         allocated to registers. Fixes #76800.
6392
6393 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
6394
6395         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
6396
6397 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
6398
6399         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
6400         of platforms.
6401
6402 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
6403
6404         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
6405         objects.cs.
6406
6407         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
6408         
6409         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
6410 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
6411
6412         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
6413         single precision before storing to a single precision location.
6414
6415 2005-11-28  Raja R Harinath  <rharinath@novell.com>
6416
6417         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
6418
6419 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
6420
6421         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
6422         correct files.
6423
6424         * basic.cs: Remove test_0_byte_compares test which was moved to
6425         objects.cs a long time ago.
6426
6427 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
6428
6429         * aliasing.c: Fixed aliasing issue on 64 bit archs.
6430
6431 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
6432
6433         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
6434         handlers are called.
6435
6436         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
6437         throwing code.
6438
6439          * mini-ia64.c: Add support for the throw->branch exception 
6440         optimization.   
6441
6442         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
6443
6444 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6445
6446         * mini.c: Enabled "fastpath" deadce :-)
6447         
6448 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6449
6450         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
6451         alias analysis pass to support it.
6452         * mini.h: Likewise.
6453         * ssa.c: Likewise.
6454         * liveness.c: Likewise (liveness computation can use aliasing
6455         information to be more accurate).
6456         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
6457         moreover made so that "--compile-all" uses the given optimization
6458         flags and not the default ones.
6459         * aliasing.c: Alias analysis (new file).
6460         * aliasing.h: Likewise.
6461         * Makefile.am: added "aliasing.c" and "aliasing.h".
6462         
6463 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
6464
6465         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
6466         OP_L opcodes.
6467
6468 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
6469
6470         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
6471         fp >= end_of_stack exit condition, as it is not needed, and it might
6472         become true for fp eliminated frames.
6473
6474 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
6475
6476         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
6477         coded offsets.
6478
6479 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
6480
6481         * mini-arm.c: fixed alignment of doubles/longs to match
6482         the C ABI (bug #76635).
6483
6484 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
6485
6486         * aot.c: fix compilation with --enable-minimal=aot.
6487
6488 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
6489
6490         * mini-arm.c: fixed compatibility with the new
6491         floating point emulator package for compares.
6492
6493 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
6494
6495         * mini.c : reverted sig->pinvoke changes (r51396-51397).
6496
6497 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
6498
6499         * mini-exceptions.c (print_stack_frame): Output to stderr.
6500         (mono_handle_native_sigsegv): Ditto.
6501
6502 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6503
6504         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
6505         OP_LCONV_TO_OVF_I implementation.
6506
6507         * mini-amd64.c: Add support for the throw->branch exception 
6508         optimization.
6509
6510         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
6511         when the catch clause catches a more general exception, i.e. Object.
6512
6513 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
6514
6515         * cpu-ia64.md: Remove unused opcodes.
6516
6517         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
6518         specific defines for architectures defining USE_SIGACTION.
6519
6520         * mini-ia64.c: Fix some warnings.
6521
6522         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
6523         version seemed to skip a frame.
6524
6525 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
6526
6527         * mini.c: Clean up the usage of sig->pinvoke flag. Now
6528         only calls which are made to native code use this flag.
6529
6530 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
6531
6532         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
6533         varargs methods as well.
6534         
6535         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
6536         which have save_lmf set. Reorganize methods prologs a bit.
6537
6538         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
6539         debugger to the proper place.
6540
6541 2005-10-29  Martin Baulig  <martin@ximian.com>
6542
6543         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
6544         when running inside the debugger until the debugger has support
6545         for it.
6546
6547 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
6548
6549         * mini.h: Fix a warning.
6550
6551 2005-10-24  Miguel de Icaza  <miguel@novell.com>
6552
6553         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
6554         we expose publicly, this returns the string.
6555
6556 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
6557
6558         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
6559         with fp elimination.
6560
6561 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
6562
6563         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
6564         native stacktrace using the glibc 'backtrace' function if available.
6565
6566 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
6567
6568         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
6569
6570         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
6571         handle SIGSEGVs received while in native code.
6572
6573         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
6574         code, call mono_handle_native_sigsegv which will abort the runtime
6575         after printing some diagnostics, instead of converting it into a
6576         confusing NullReferenceException.
6577
6578 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
6579
6580         * cpu-pentium.md: Remove unused opcodes.
6581
6582 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
6583
6584         * mini-amd64.h (MonoLMF): Add rsp field.
6585
6586         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
6587         the lmf too.
6588
6589 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
6590
6591         * mini-codegen.c (get_register_spilling): Fix some warnings.
6592
6593 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
6594
6595         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
6596         elimination during exception handling. Enable fp elimination by
6597         default.
6598
6599         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
6600         elimination.
6601
6602 2005-10-16  Martin Baulig  <martin@ximian.com>
6603
6604         * mini-exceptions.c
6605         (mono_debugger_run_finally): New public method for the debugger.
6606
6607 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
6608
6609         * debug-mini.c (mono_debug_init_method): Fix warning.
6610
6611         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
6612         the 'exname' parameter const to fix some warnings.
6613
6614 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
6615
6616         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
6617         introduced by the previous patch.
6618
6619 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
6620
6621         * basic-float.cs: Add test for precision of float arithmetic.
6622
6623         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
6624         when loading/storing single values from/to memory.
6625
6626         * mini.c (mono_jit_compile_method_with_opt): Create the function
6627         pointers in the correct domain.
6628
6629 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
6630
6631         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
6632         introduced by previous patch.
6633         
6634         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
6635         when out_filter_idx is NULL.
6636
6637         * mini-exceptions.c: Don't run filter clauses twice during exception
6638         handling. Fixes #75755.
6639
6640 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
6641
6642         * aot.c: Add support for ldflda wrappers.
6643
6644         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
6645         #75902.
6646
6647 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
6648
6649         * mini.c, mini.h: do not consider exception handlers blocks when
6650         setting up interface variables.
6651
6652 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
6653
6654         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
6655
6656 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
6657
6658         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
6659         causes a regression.
6660
6661         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
6662
6663 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
6664
6665         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
6666         of the OP_P definitions.
6667
6668         * TODO: Add a proposal for dealing with the CEE/OP mess.
6669
6670         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
6671         optimizations from the x86 port.
6672
6673         * cpu-amd64.md: Ditto.
6674
6675         * basic.cs basic-long.cs: Add tests.
6676
6677 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
6678
6679         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
6680         Patrik Torstensson's implementation of my exception-handling
6681         optimization idea, when the exception object is not used
6682         (bug #62150).
6683
6684 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
6685
6686         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
6687         of the mul_imm optimizations from the old jit.
6688
6689 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
6690
6691         * mini.c, liveness.c: patch by Patrik Torstensson and
6692         Zoltan Varga to improve performance in methods with
6693         exception clauses.
6694
6695 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
6696
6697         * driver.c: Remove 'Globalization' entry from --version.
6698
6699 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
6700
6701         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
6702         there is a profiler interested in JIT events.
6703
6704         * aot.c: Load profile files produced by the AOT profiling module, and
6705         reorder methods based on the profiling info. Add a 'method_order' table
6706         to the AOT file to make mono_aot_find_jit_info work with the reordered
6707         methods.
6708
6709         * mini.h: Bump AOT file version info.
6710
6711 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
6712
6713         * mini-arm.h: work around what looks like a gcc bug when optimizations
6714         are enabled.
6715
6716 2005-09-28  Raja R Harinath  <rharinath@novell.com>
6717
6718         * Makefile.am (AM_CFLAGS): Don't use += to append inside
6719         conditionals.  Use ...
6720         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
6721
6722 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
6723
6724         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
6725         to determine the amount of memory to copy when passing valuetypes.
6726
6727         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
6728         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
6729
6730 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
6731
6732         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
6733         information about aot.
6734
6735 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
6736
6737         * *.c: Replace the use of {Enter,Leave}CriticalSection with
6738         macros. This will allow a deadlock debugger to easily be plugged
6739         in.
6740
6741 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
6742
6743         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
6744
6745 2005-09-27  Raja R Harinath  <rharinath@novell.com>
6746
6747         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
6748         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
6749         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
6750         ($(arch_built)) [CROSS_COMPILING]: Error out.
6751
6752 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
6753
6754         * aot.c: Add support for the no_special_static flag for classes.
6755
6756 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6757
6758         * Reapply reverted patches.
6759
6760         * *: Revert r50174 as well.
6761
6762         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
6763
6764 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
6765
6766         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
6767
6768 2005-09-23  Miguel de Icaza  <miguel@novell.com>
6769
6770         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
6771         part of the SIG_HANDLER_SIGNATURE.  
6772
6773 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
6774
6775         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
6776         statistics.
6777
6778         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
6779         introduced by previous patch.
6780
6781 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
6782
6783         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
6784         saved registers too.
6785
6786         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
6787         upon the information returned by get_call_info ().
6788         
6789         * mini-x86.c (add_float): Fix stack size calculation.
6790         (mono_arch_call_opcode): Rewrite this so it works based up the
6791         information returned by get_call_info ().
6792         (mono_arch_get_this_vret_args): Ditto.
6793
6794 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
6795
6796         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
6797         in cinfo to determine the registers which need to be used.
6798
6799 2005-09-20  Miguel de Icaza  <miguel@novell.com>
6800
6801         * driver.c (mono_main): Add --server and --desktop flags. 
6802
6803 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
6804
6805         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
6806         registers as global registers.
6807
6808         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
6809         longer needed with the new register allocator.
6810
6811         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
6812
6813         * cpu-ia64.md: Remove unused opcodes.
6814         
6815         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
6816         
6817 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
6818
6819         * cpu-amd64.md: Remove unused opcodes.
6820
6821         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
6822         needed with the new register allocator.
6823
6824         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
6825         reg-reg moves.
6826
6827 2005-09-16  Raja R Harinath  <rharinath@novell.com>
6828
6829         * Makefile.am (check-local): Don't invoke semdel-wrapper.
6830
6831 2005-09-16  Martin Baulig  <martin@ximian.com>
6832
6833         * exceptions-amd64.c
6834         (throw_exception): Don't call mono_debugger_throw_exception() if
6835         we're a rethrow - see the FIXME in the code.
6836
6837 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
6838
6839         * mini.c (mono_init_exceptions): This only works on some architectures.
6840         
6841 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6842
6843         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
6844         on ia64.
6845
6846         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
6847
6848         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
6849         now in mini-exceptions.c.
6850
6851 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
6852
6853         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
6854         now in mini-exceptions.c.
6855
6856 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
6857
6858         * exceptions-x86.c: Applied patch from Patrik Torstensson 
6859         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
6860
6861         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
6862         code into mini-exceptions.c. Add some assertions to it.
6863
6864 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
6865
6866         * aot.c (emit_section_change): Applied patch from "The Software Team" 
6867         (<software@solmersa.com>). Fix as errors on windows.
6868
6869 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6870
6871         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
6872         method info into the LMF.
6873
6874 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6875         
6876         * mini-ia64.c: Add proper unwind info for method epilogs.
6877
6878         * exceptions-ia64.c: Add some code to help debugging.
6879         
6880         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
6881
6882         * mini-exceptions.c: Fix warning.
6883
6884 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
6885
6886         * mini.c: Really fix build.
6887
6888         * mini-x86.c mini-amd64.c: Fix build.
6889
6890 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
6891
6892         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
6893
6894         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
6895         some Interlocked methods as intrinsics.
6896
6897         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
6898         for Thread methods as well.
6899
6900         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
6901
6902         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
6903
6904         * mini-ia64.c mini-x86.c mini-amd64.c 
6905         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
6906         OP_MEMORY_BARRIER.
6907         
6908         * mini.c (mono_init_exceptions): Fix build breakage.
6909
6910 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
6911
6912         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
6913         of instructions. Use the new ia64_unw_op macros for emitting unwind
6914         info.
6915
6916         * mini.c (mono_init_exceptions): Initialize exception handling
6917         related trampolines at startup.
6918
6919 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
6920
6921         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
6922
6923 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
6924
6925         * mini.c: Handle type loading errors gracefully during compilation and
6926         throw the appropriate exception.
6927
6928 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
6929
6930         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
6931         for the mono binary.
6932
6933 2005-09-09  Martin Baulig  <martin@ximian.com>
6934
6935         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
6936         the release.
6937
6938 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6939
6940         * mini-arm.h: use emulation for conv.r.un for the release.
6941
6942 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
6943
6944         * mini-arm.c, objects.cs: more fixes and tests for them.
6945
6946 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6947
6948         * mini-arm.c: align structures to at least 4 bytes to be able
6949         to keep our current optimized memcpy.
6950
6951 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
6952
6953         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
6954
6955 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6956
6957         * mini.c: ignore SIGPIPE.
6958
6959 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
6960
6961         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
6962
6963         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
6964
6965 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
6966
6967         * mini.h: Add prototype for mono_allocate_stack_slots_full.
6968
6969 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
6970
6971         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
6972         exception handling support.
6973         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
6974         patch by Brian Koropoff <briank@marakicorp.com>).
6975
6976 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
6977
6978         * mini.c: revert another 'optimization' which breaks when
6979         items on the eval stack need to be saved at a basic block end
6980         (bug #75940).
6981
6982 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
6983
6984         * jit-icalls.c: for arrays, ensure we always provide
6985         lower bounds.
6986
6987 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
6988
6989         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
6990         
6991         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
6992
6993 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
6994
6995         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
6996         arguments in their original register.
6997
6998 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
6999
7000         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
7001         memset/memcpy.
7002
7003         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
7004         when ssapre is enabled.
7005
7006         * inssel-long.brg: Fix bug in previous patch.
7007
7008         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
7009         multiplication by a constant.
7010
7011 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
7012
7013         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
7014         icc.
7015
7016         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
7017         saving registers.
7018
7019 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
7020
7021         * inssel-arm.brg: apply changes tested by Brian Koropoff
7022         <briank@marakicorp.com>.
7023
7024 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
7025
7026         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
7027         
7028 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
7029
7030         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
7031         to the same register if dreg is just a base register.
7032         (print_ins): Improve printing of membase opcodes.
7033
7034         * inssel-x86.brg: Add optimized ldind(reg) rules.
7035
7036         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
7037
7038 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
7039
7040         * mini.c: when running under valgrind, set the stack bottom for
7041         the GC at the actual approximate stack for the app (fixes running
7042         mono with valgrind).
7043
7044 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
7045
7046         * mini.c: do no break at the first valuetype to init found
7047         (fixes bug #75791).
7048
7049 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
7050
7051         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
7052
7053 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
7054
7055         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
7056
7057 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
7058
7059         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
7060
7061 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7062
7063         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
7064
7065         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
7066         code.
7067
7068         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
7069         code.
7070
7071         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
7072         methods.
7073
7074 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
7075
7076         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
7077
7078 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7079
7080         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
7081         in the tail recursion optimization.
7082
7083         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
7084         debug info into the assembly file.
7085
7086         * iltests.il: Add test for filter regions.
7087
7088         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
7089         initial stack of filter regions. Fixes #75755.
7090
7091 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
7092
7093         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
7094         stack requirements.
7095
7096 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7097
7098         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
7099         the check for an already compiled method on non-ia64 platforms.
7100         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
7101         proper domain.
7102
7103         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
7104
7105         * inssel-x86.brg: Add some optimized call rules.
7106
7107 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
7108
7109         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
7110         method here.
7111
7112         * mini.h mini-trampolines.c: Pass the trampoline argument to 
7113         mono_arch_patch_delegate_trampoline.
7114
7115         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
7116
7117         * mini-trampolines.c: Fix build.
7118
7119         * mini-amd64.h: Add delegate trampolines.
7120
7121         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
7122
7123         * inssel-amd64.brg: Add optimized call rules.
7124         
7125         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
7126
7127         * inssel-ia64.brg: Add optimized ldind(reg) rules.
7128
7129 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
7130
7131         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
7132         change.
7133
7134         * mini-ia64.c: Remove LMF fixmes.
7135
7136         * mini-ia64.h: Remove most fields from LMF.
7137
7138         * inssel-ia64.brg (stmt): Fix unaligned access errors.
7139
7140         * mini-trampolines.c: Add support for IA64 function descriptors.
7141
7142         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
7143         for IA64 function descriptors.
7144
7145 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
7146
7147         * tramp-arm.c: patch the vtable for virtual calls. Added
7148         support code to register/unregister the LMF.
7149         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
7150         more LMF work.
7151
7152 2005-08-19  Dick Porter  <dick@ximian.com>
7153
7154         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
7155         bit value if needed.
7156
7157 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
7158
7159         * mini.c (mini_get_method): Move handling of wrapper data here.
7160
7161         * mini.c (mono_method_to_ir): Add support for dynamic methods.
7162
7163         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
7164         virtual.
7165
7166         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
7167         bblock->code does not remain empty.
7168
7169 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
7170
7171         * arrays.cs: Add regression test for #75832.
7172
7173         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
7174         rules. Fixes #75832.
7175
7176         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
7177         instruction scheduling.
7178
7179 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
7180
7181         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
7182
7183 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
7184
7185         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
7186
7187         * mini-codegen.c: Fix VC build.
7188
7189         * cpu-pentium.md: Increase length of atomic_exhange_i4.
7190
7191 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7192
7193         * mini.h: fix signature for mono_register_opcode_emulation.
7194
7195 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
7196
7197         * mini.c: Get rid of most of the helper_sig_... constants using
7198         mono_create_icall_signature ().
7199
7200 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
7201
7202         * jit-icalls.c (helper_ldstr): New helper function.
7203
7204         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
7205
7206         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
7207         throw, load the string using a helper call instead of creating a string object.
7208
7209         * aot.c: Update after LDSTR changes.
7210
7211         * mini.h: Bump AOT file version.
7212         
7213         * aot.c: Save class size info into the AOT file. Print more statistics during
7214         compilation.
7215
7216         * mini.h: Bump AOT file version.
7217
7218         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
7219         ordering of disasm cases. Fixes #74957.
7220
7221 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
7222
7223         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
7224         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
7225         the generic code needed for the ARM port.
7226
7227 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
7228
7229         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
7230         inssel-arm.brg: more ARM features and fixes.
7231
7232 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
7233
7234         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
7235         ARM port work in progress.
7236
7237 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
7238
7239         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
7240
7241         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
7242
7243         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
7244
7245         * inssel.brg (mini_emit_memset): Add support for unaligned access.
7246
7247         * *-ia64.*: Ongoing IA64 work.
7248         
7249         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
7250
7251 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
7252
7253         * TODO: Remove out-of-data todo stuff.
7254
7255         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
7256         dead code.
7257
7258         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
7259
7260         * mini.h: Bump corlib version.
7261
7262 2005-07-27  Martin Baulig  <martin@ximian.com>
7263
7264         * mini-codegen.c
7265         (create_copy_ins): Added `const unsigned char *ip' argument; set
7266         `copy->cil_code' from it.
7267
7268 2005-07-27  Martin Baulig  <martin@ximian.com>
7269
7270         * mini-exceptions.c (mono_handle_exception): Don't call
7271         mono_debugger_handle_exception() for filters.
7272
7273 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
7274
7275         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
7276         as well.
7277
7278 2005-07-26  Martin Baulig  <martin@ximian.com>
7279
7280         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
7281
7282         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
7283         helper_compile_generic_method() if the method is actually virtual
7284         and non-final.
7285
7286 2005-07-26  Martin Baulig  <martin@ximian.com>
7287
7288         * mini.c
7289         (trampoline_code): Renamed to `mono_trampoline_code' and made it
7290         public; this is now accessed directly by the debugger.
7291         (mono_generic_trampoline_code): Removed.
7292
7293         * debug-mini.c
7294         (mono_debug_init_method): Also add interncalls and wrappers.
7295
7296 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
7297
7298         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
7299
7300 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
7301
7302         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
7303
7304 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
7305
7306         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
7307
7308 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7309
7310         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
7311         getting TLS offsets on AMD64 too.
7312
7313 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
7314
7315         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
7316
7317 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
7318
7319         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
7320         inssel-arm.brg, mini-arm.h: ARM port work in progress.
7321
7322 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7323
7324         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
7325
7326         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
7327         to mini.c.
7328
7329         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
7330         mono_sparc_is_virtual_call ().
7331         
7332         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
7333
7334         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
7335         trampoline parameters.
7336
7337         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
7338         
7339         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
7340         to mono_arch_get_vcall_slot_addr.
7341
7342         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
7343         trampoline code.
7344
7345         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
7346
7347 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7348
7349         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
7350
7351 2005-07-19  Martin Baulig  <martin@ximian.com>
7352
7353         * exceptions-amd64.c (throw_exception): Call
7354         mono_debugger_throw_exception() here like we're doing it on i386.
7355
7356 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7357
7358         * mini-ia64.c: Add optimized TLS access support.
7359
7360 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
7361
7362         * mini-exceptions.c: Ongoing IA64 work.
7363
7364         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
7365
7366         * mini.c: Use the default optimization set when embedding. Fixes
7367         #75194.
7368
7369 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
7370
7371         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
7372         of trampolines to a separate file.
7373
7374         * mini-trampolines.c: New file.
7375
7376         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
7377         separate file.
7378         
7379         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
7380         amd64/ia64 code.
7381
7382         * mini-codegen.c: Fix cygwin build.
7383
7384 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
7385
7386         * mini.c: Add some minor changes needed by the IA64 port.
7387
7388         * *-ia64.*: Ongoing IA64 work.
7389
7390 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
7391
7392         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
7393         trampolines into arch-independent and arch-dependent parts.
7394
7395         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
7396
7397 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
7398
7399         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
7400
7401         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
7402         the xp-regalloc-branch for amd64.
7403
7404         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
7405         xp-regalloc-branch for x86.
7406
7407 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
7408
7409         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
7410
7411 2005-07-06  Martin Baulig  <martin@ximian.com>
7412
7413         * mini.c
7414         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
7415         (mono_jit_runtime_invoke): Likewise.
7416
7417 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
7418
7419         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
7420         on x86 too.
7421         
7422         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
7423         without loading their metadata. Reorganize the file format so exception handling+
7424         debug info is kept separate from normal method info. Create MonoJitInfo 
7425         structures for methods lazily.
7426
7427         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
7428         loading metadata.
7429         (x86_class_init_trampoline): Patch AOT class init trampolines too.
7430
7431         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
7432
7433         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
7434         in AOT code.
7435
7436         * mini.h: Bump AOT file version.
7437
7438 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
7439
7440         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7441
7442 2005-07-01  Raja R Harinath  <rharinath@novell.com>
7443
7444         * Makefile.am (check-local): Call semdel-wrapper.
7445
7446 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
7447
7448         * mini-x86.c: Revert the last change as it seems to break the build..
7449
7450 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
7451
7452         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7453         
7454         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
7455
7456 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
7457
7458         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
7459         outside of the macro, so strange stuff doesn't happen with gcc4
7460         (NEW_AOTCONST_TOKEN): Likewise.
7461
7462 2005-06-28  Martin Baulig  <martin@ximian.com>
7463
7464         * mini.c (mini_class_is_system_array): New static method; use this
7465         instead of `klass->parent == mono_defaults.array_class' everywhere
7466         since this also works for the new generic array class.
7467
7468 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
7469
7470         * inssel.brg: Remove warnings.
7471
7472 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
7473
7474         * mini-ia64.c: Ongoing IA64 work.
7475
7476         * basic-float.cs: Add float->i1 conversion test.
7477
7478         * iltests.il: Add conv.u4 test.
7479
7480 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
7481
7482         * inssel-long.brg: Fix bug caused by last change.
7483
7484 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
7485
7486         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
7487         BSDs.  Allows the x86 JIT to work on OSX86
7488
7489 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
7490
7491         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
7492         u4->i8 conversion.
7493
7494         * mini-ia64.c: Ongoing IA64 work.
7495
7496 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
7497
7498         * mini-ia64.c: Ongoing IA64 work.
7499
7500         * driver.c: Clean up jit_code_hash as well when using --regression.
7501
7502         * inssel-long.brg: Fix long->i4/u4 conversion rules.
7503
7504         * basic-long.cs: Add tests for long->u4 conversion.
7505
7506 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
7507
7508         * mini.c: Take mono_get_domainvar out of macros. This makes sure
7509         that we do not depend on undefined C behavior: the order stuff
7510         gets evaluated within an expression. Fixes mono when compiled on
7511         GCC 4.
7512
7513 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
7514
7515         * *-ia64.*: Ongoing IA64 work.
7516
7517         * aot.c: Lower memory usage while loading AOT methods.
7518
7519         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
7520
7521         * mini.h: Bump AOT file format version.
7522
7523 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
7524
7525         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
7526
7527 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
7528
7529         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
7530         not on callee assembly). Fixed some comments.
7531
7532 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
7533
7534         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
7535         it gets proper disassembly.
7536         (emit_method_info): Remove some dead code.
7537
7538         * mini.c (mini_method_compile): Allways allocate the GOT var in
7539         mono_method_to_ir for emulating opcodes.
7540
7541 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
7542
7543         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
7544         before freeing the code memory. Fixes #74990.
7545
7546         * objects.cs: Add regression test for #74992.
7547
7548         * liveness.c: Extend live ranges of arguments to the beginning of the
7549         method. Fixes #74992.
7550
7551         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
7552         so it points into the faulting instruction.
7553
7554 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
7555
7556         * jit-icalls.c (mono_imul_ovf): Add exception handling.
7557
7558         * *-ia64.*: Ongoing IA64 work.
7559
7560         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
7561
7562 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
7563
7564         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
7565
7566         * *-ia64.*: Ongoing IA64 work.
7567
7568 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
7569
7570         * basic-long.cs: Add tests for add/sub.ovf.
7571
7572         * basic.cs: Add tests for sub.ovf.
7573
7574         * *-ia64.*: Ongoing IA64 work.
7575
7576 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
7577
7578         * *-ia64.*: Ongoing IA64 work.
7579
7580         * basic.cs: Add conv.ovf.i4.un test.
7581
7582 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
7583
7584         * mini.c: (remove_block_if_useless) Fixed bug 75061.
7585         
7586 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7587
7588         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
7589
7590 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
7591
7592         * *-ia64.*: Ongoing IA64 work.
7593
7594 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7595
7596         * trace.[ch]:
7597         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
7598
7599 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
7600
7601         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
7602
7603 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
7604
7605         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
7606
7607         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
7608         of a call is callable by a near call.
7609
7610 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
7611
7612         * mini-ia64.c: Ongoing IA64 work.
7613
7614 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
7615
7616         * genmdesc.c: Make the generated array non-static.
7617
7618         * inssel-long.brg: Fix LSHR_IMM rule.
7619
7620         * *-ia64.*: Ongoing IA64 work.
7621
7622         * *-ia64.*: Ongoing IA64 work.
7623
7624 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7625
7626         * *-ia64.*: Ongoing IA64 work.
7627
7628         * *-ia64.*: Ongoing IA64 work.
7629         
7630         * mini-ia64.c: Ongoing IA64 work.
7631
7632         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
7633
7634 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
7635
7636         * objects.cs basic-calls.cs: Move some tests to objects.cs.
7637         
7638         * objects.cs basic-long.cs: Move some tests to objects.cs.
7639
7640 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
7641
7642         * *-ia64.*: Ongoing IA64 work.
7643
7644         * iltests.il: Add a new test.
7645
7646         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
7647         newobj. Fixes #75042.
7648
7649 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
7650
7651         * *-ia64.*: Ongoing IA64 work.
7652         
7653         * *-ia64.*: Ongoing IA64 work.
7654         
7655         * *-ia64.*: Ongoing IA64 work.
7656
7657         * basic.cs objects.cs: Move tests accessing static variables as well.
7658
7659         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
7660
7661 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
7662
7663         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
7664
7665         * driver.c: Always print failed tests.
7666
7667         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
7668         frame pointer.
7669
7670         * *ia64*: Ongoing IA64 work.
7671
7672 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
7673
7674         * basic.cs: Add tests for add.ovf. Fix warnings.
7675
7676 2005-05-18  Miguel de Icaza  <miguel@novell.com>
7677
7678         * driver.c (mono_main): Avoid crash if no argument is passed to
7679         --break;  Do not use g_error, but f_printf.   And fix all other
7680         ocurrences of the same crash.
7681
7682 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
7683
7684         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
7685         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
7686         Fixes #74742.
7687
7688 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
7689
7690         * *-ia64.*: Add beginnings of IA64 backend.
7691
7692         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
7693
7694 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
7695
7696         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
7697         Fixes #74925.
7698
7699         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
7700
7701         * mini-amd64.c: Fix a warning.
7702
7703 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
7704
7705         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
7706         in float_neg. Fixes #74897.
7707
7708         * mini-amd64.c (emit_call): Fix another near call bug.
7709
7710 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
7711
7712         * declsec.c: Keep the appdomain information in the structure. Added a 
7713         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
7714         value gets overwritten).
7715         * declsec.h: Set the default MonoArray for the the stack to 6. Added
7716         an MonoAppDomain member to MonoSecurityFrame.
7717         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
7718         used in the stack walk. Now use a MonoArray which grow (double) when
7719         it gets full.
7720
7721 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
7722
7723         * mini.c: Re-enabled runtime cleanup, since running threads should
7724         now properly stop when exiting.
7725
7726 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
7727
7728         * mini-codegen.c: New file contaning the arch-independent local
7729         register allocator. Not used by any architectures yet.
7730
7731         * mini.h linear-scan.c: Merge some changes from the 
7732         mini-xp-local-regalloc branch.
7733
7734 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
7735
7736         * mini-amd64.c (emit_call): Fix calls to native functions when the
7737         runtime is compiled as a shared library. Fixes #74756.
7738
7739         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
7740         on a literal field. Fixes #74751.
7741
7742 2005-04-25  Raja R Harinath  <rharinath@novell.com>
7743
7744         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
7745
7746 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
7747
7748         * objects.cs: Add missing null casting test.
7749
7750 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
7751
7752         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
7753         in wrapper methods. Also rename 'address' variable to 'offset'.
7754
7755 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
7756
7757         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
7758         warnings.
7759         
7760         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
7761
7762         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
7763         work on windows.
7764
7765 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
7766
7767         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
7768
7769 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7770
7771         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
7772         just the last bytes.
7773
7774 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
7775
7776         * aot.c (mono_compile_assembly): Fix warning.
7777
7778         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
7779         by the _MSC_VER stuff.
7780
7781 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
7782
7783         * inssel-long.brg: Fix #74588.
7784
7785         * cpu-amd64.md: Fix #74591.
7786
7787         * iltests.il: Add new regression tests.
7788
7789 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
7790
7791         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
7792         valuetype.
7793
7794 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
7795
7796         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
7797
7798         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
7799         from Bill Middleton <flashdict@gmail.com>.
7800
7801 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
7802
7803         * arrays.cs: Add new regression test. Fix warnings.
7804
7805 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
7806
7807         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
7808         and leakage in CKFINITE.
7809
7810         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
7811         this to a null op since it is called on amd64 too.
7812
7813         * exceptions-amd64.c (get_throw_trampoline): Align stack.
7814
7815         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
7816         body since this is not used on amd64.
7817         
7818         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
7819
7820         * mini-amd64.c: Remove obsolete fixmes.
7821
7822         * mini.c (print_method_from_ip): Fix debugging support.
7823
7824 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
7825
7826         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
7827         so that expressions that don't give much gain are not reduced.
7828         * ssapre.h: Likewise.
7829
7830 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
7831
7832         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
7833
7834         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
7835
7836         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
7837
7838 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
7839
7840         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
7841
7842         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
7843
7844 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
7845
7846         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
7847         stack touching.
7848
7849         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
7850
7851         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
7852
7853         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
7854
7855         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
7856         MONO_ARCH_USE_SIGACTION. Fixes #74252.
7857
7858         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
7859
7860         * mini-x86.c: Fix up stack overflow handling.   
7861
7862         * exceptions.cs: Add new regression test.
7863
7864 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
7865
7866         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
7867         mono_jit_thread_attach.
7868
7869         * mini.c (mono_method_to_ir): Verify called method is not abstract.
7870
7871 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7872
7873         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
7874         avoid calling constructors using callvirt.
7875
7876         * inssel.brg: Fix #74073.
7877
7878 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
7879
7880         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
7881         compilation with non-GCC compilers.
7882         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
7883         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
7884
7885 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
7886
7887         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
7888         klass->interface_offsets (will likely fix bug#74073).
7889
7890 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
7891
7892         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
7893
7894 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
7895
7896         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
7897         to amd64_div_reg_size ().
7898         
7899         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
7900
7901 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
7902
7903         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
7904
7905 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7906
7907         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
7908
7909 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
7910
7911         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
7912         
7913         * mini.c (mono_precompile_assembly): Load and precompile referenced
7914         assemblies as well. Fixes #74015.
7915
7916 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
7917
7918         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
7919
7920 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
7921
7922         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
7923         a lot of checks and (anyway) permissions cannot work until corlib is 
7924         loaded.
7925
7926 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
7927
7928         * mini-ppc.c: fixed ABI issue on sysv/ppc.
7929
7930 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
7931
7932         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
7933         calls (fixes bug#72824).
7934
7935 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
7936
7937         * mini.c: fix tail recursion elimination (see test in bug#73936).
7938
7939 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
7940
7941         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
7942         some fp functions in sse2 mode.
7943
7944 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
7945
7946         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
7947
7948 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
7949
7950         * mini.h mini.c: Add mono_get_jit_tls_key ().
7951
7952         * mini-x86.c: Enable fast TLS support on windows.
7953
7954 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
7955
7956         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
7957         * mini.c: Check for p/invoke method when generating code. If a
7958         p/invoke method, or it's class, isn't decorated with [Suppress
7959         UnmanagedCodeSecurity] then generate code to call System.Security.
7960         UnmanagedDemand (only if the security manager is active).
7961
7962 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7963
7964         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
7965         last change as it seems to cause strange crashes.
7966         
7967 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
7968
7969         * *.c: handle unsafe function pointers where needed.
7970
7971 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7972
7973         * mini.c (mono_jit_free_method): Remove the fixme too.
7974
7975 2005-03-15  Miguel de Icaza  <miguel@novell.com>
7976
7977         * mini.c: As discussed, make the code actually free the delegate
7978         thunk now, to enable the debugging of delegate problems, use
7979         MONO_DEBUG=1 when running Mono. 
7980
7981         This takes also care of parts of the leaks as seen by Joe.
7982
7983 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
7984
7985         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
7986         thread_tls_offset calculation.
7987
7988 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
7989
7990         * declsec.c: Reworked linkdemand checks for icall. The previous code
7991         was using the declaration code (untrusted) and didn't work as expected
7992         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
7993         specific case.
7994
7995 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
7996
7997         * iltests.il: Add new localloc test.
7998
7999         * mini-amd64.c: Handle large stack allocations the same way as on
8000         windows if stack overflow handling is working.
8001         
8002         * mini-amd64.c: Allocate the signal stack using mmap.
8003
8004         * mini.c (sigsegv_signal_handler): Fix reading of context.
8005
8006         * mini-exceptions.c: Fix up stack overflow handling.
8007
8008         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
8009
8010         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
8011
8012         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
8013
8014         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
8015
8016         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
8017         tramp_init functions as they are no longer needed.
8018
8019 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
8020
8021         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
8022         
8023         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
8024
8025         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
8026         
8027         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
8028         support that now.
8029
8030         * mini-ops.h: Add OP_LMUL_IMM.
8031
8032         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
8033         long mul/div opcodes as intrinsic.
8034
8035         * mini-amd64.c (emit_call): Handle the case when the callee might be
8036         an AOT method.
8037
8038 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
8039
8040         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
8041         extra safe.
8042         
8043         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
8044
8045         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
8046
8047 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
8048
8049         * mini.c (mono_codegen): Don't leak here, to help people running
8050         monogrind.
8051
8052 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
8053
8054         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
8055         conversions in sse2 mode.
8056
8057         * basic-float.cs: Add regression test.
8058         
8059         * mini-amd64.c: Reenable sse2.
8060
8061 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
8062
8063         * mini-amd64.c: Disable sse2 until some regressions are fixed.
8064
8065 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
8066
8067         * driver.c: Copyright text should include 2005.
8068         
8069 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
8070
8071         * cpu-amd64.md (load_membase): Fix more max lengths.
8072
8073 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
8074
8075         * cpu-amd64.md (load_membase): Fix max length.
8076
8077         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
8078
8079         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
8080
8081         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
8082         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
8083
8084         * basic-float.cs: Add rounding regression test.
8085
8086         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
8087
8088 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
8089
8090         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
8091         structures in registers for pinvoke wrappers.
8092
8093 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
8094
8095         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
8096
8097 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
8098
8099         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
8100         wrapper to mono_jit_thread_attach.
8101
8102         * mini.c (mini_jit_thread_attach): New jit icall.
8103
8104         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
8105         native->managed wrappers.
8106
8107         * exceptions.cs: Add new regression test.
8108
8109         * mini.c (optimize_branches): Check regions in the cbranch to throw
8110         block case as well. Fixes #73242.
8111
8112 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
8113
8114         * mini.c: thread safety fixes.
8115
8116 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
8117
8118         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
8119         patching stuff, since delegates use jump trampolines so there is
8120         no caller.
8121
8122         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
8123         jump trampolines.
8124         
8125         * tramp-amd64.c: Fix build.
8126
8127         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
8128         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
8129
8130         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
8131         Rename this to mono_arch....
8132         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
8133
8134         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
8135
8136         * mini-amd64.c (emit_call): If both the caller and the callee is
8137         guaranteed to have 32 bit addresses, emit a normal call.
8138
8139         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
8140
8141         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
8142         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
8143         method_ptr inside delegates.
8144
8145 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
8146
8147         * mini.c (mono_jit_free_method): Free the method info even if the native code is
8148         invalidated. Fixes #73001.
8149
8150         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
8151
8152         * mini-x86.c: Only use stdcall for pinvokes on windows.
8153
8154 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
8155
8156         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
8157         * mini-x86.c: remove unreliable __thread var offset detection,
8158         use the correct accessors and enable by default.
8159
8160 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
8161
8162         * mini.c (mono_jit_free_method): Fix memory leak.
8163
8164 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
8165
8166         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
8167
8168 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
8169
8170         * cpu-amd64.md: Fix lengths of atomic opcodes.
8171
8172 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
8173
8174         * driver.c: try to not imply using ICU is any good.
8175
8176 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
8177
8178         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
8179         functions as inline ops.
8180
8181         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
8182         some Interlocked functions as inline ops.
8183
8184         * mini.c (move_basic_block_to_end): Fix bug in last patch.
8185
8186         * mini.h (MonoBasicBlock): Reorganize fields a bit.
8187
8188         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
8189
8190         * mini.c: Add support for OP_NOT_TAKEN.
8191
8192         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
8193         structures in registers for pinvoke wrappers.
8194
8195         * mini-amd64.c: Fix warnings.
8196
8197 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
8198
8199         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
8200
8201         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
8202
8203         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
8204         address instead of loading the address from it.
8205
8206         * mini-x86.c: Add support for returning small structs in registers
8207         on Win32. Fixes part of #70864.
8208         
8209 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
8210
8211         * trace.c (get_token): Improve error checking.
8212
8213 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
8214
8215         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
8216
8217 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
8218  
8219         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
8220         it can be reused for MonoClass.
8221         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
8222         _LINKDEMAND.
8223
8224 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
8225
8226         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
8227         instead of a MonoReflectionMethod. The method information wasn't used
8228         when displaying SecurityException details (but will be now).
8229
8230 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
8231
8232         * Makefile.am : windows build fix.
8233
8234 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
8235
8236         * iltests.il: Add new regression test.
8237
8238         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
8239         #72522.
8240
8241 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
8242  
8243         * mini.c: Moved linkdemand check into helper function check_linkdemand
8244         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
8245         LDFTN, LDVIRTFTN).
8246
8247 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
8248
8249         * declsec.c: Added statistics counter for different kinds of 
8250         LinkDemands.
8251         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
8252         (and commented) declaration.
8253         * mini.c: Added statistics counter for security Demand code 
8254         generation. Added display of security statistics.
8255
8256 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
8257
8258         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
8259         Fix compilation errors under gcc-2.95.
8260
8261 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
8262
8263         * mini.c, driver.c: Use the new jit trampoline hashtable
8264
8265 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8266
8267         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
8268
8269 2005-02-11  Martin Baulig  <martin@ximian.com>
8270
8271         * debug-mini.c (mono_debug_close_method): Free the line number array.
8272
8273 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8274
8275         * aot.c: Break up large methods into smaller ones. Share GOT slots for
8276         icalls.
8277
8278         * mini.h: Bump AOT file format version. 
8279
8280 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
8281
8282         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
8283         APTC and P/Invoke.
8284         * declsec.h: Added macros to get/set lazyly initialized security 
8285         informations about assemblies. Added new enum for different type of
8286         possible LinkDemand violation. Added function to check LinkDemands.
8287         * mini.h: Added a field to MonoCompile to hold any security violation
8288         detected when JITting a method (so it can be thrown later).
8289         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
8290         and CEE_CALLVIRT. Added code to throw exception at the end of
8291         mini_method_compile (note: the exception is unhandled right now).
8292
8293 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
8294
8295         * mini.c, jit-icalls.c: use the managed implementation of
8296         memset for initobj and memset, to avoid managed <-> unmanaged
8297         transitions.
8298
8299 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8300
8301         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
8302         optimization if it would need a GOT var.
8303
8304         * basic.cs: Add tests for constant propagation and switch statements.
8305
8306         * ssa.c: Fix out-of-range constant propagation and switch statements.
8307
8308 2005-02-09    <vargaz@freemail.hu>
8309
8310         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
8311
8312 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
8313
8314         * cpu-amd64.md (load_membase): Fix max length of load_membase.
8315
8316 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8317
8318         * mini.c: update to new signature of mono_class_get_allocation_ftn().
8319
8320 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
8321
8322         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
8323         arithmetic operations.
8324
8325 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
8326
8327         * mini-ppc.c: add a workaround for broken user code that
8328         DllImports vararg functions with non-vararg signatures.
8329
8330 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
8331
8332         * mini.c (mono_jit_compile_method_inner): Add detection and a 
8333         meaningfull error message for assemblies written in Managed C++.
8334
8335         * tramp-amd64.c mini-amd64.h: Add support for 
8336         create_trampoline_from_token ().
8337
8338         * aot.c mini-x86.c abcremoval.c: Applied patch from
8339         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
8340
8341 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
8342
8343         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
8344         which takes a MonoImage/token as parameter instead of a MonoMethod.
8345
8346         * aot.c: Use the new trampoline for initializing vtables.
8347
8348         * aot.c: Add support for ldfld/stfld_remote wrappers.
8349
8350         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
8351         rules for compare <MEM>, IMM.
8352
8353         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
8354
8355         * aot.c: Handle inherited finalizers correctly.
8356
8357 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
8358
8359         * inssel.brg (stmt): Add a missing _setup_... ().
8360
8361         * aot.c: Save some parts of the class state to the AOT file and use it
8362         to recompute that state when a class is initialized.
8363
8364         * mini.c: Install AOT hooks into the runtime.
8365
8366         * mini.h: Bump AOT file format version.
8367         
8368         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
8369         Fixes #72148.
8370
8371         * iltests.il: Add new test.
8372
8373 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8374
8375         * mini.c: fix typo.
8376
8377 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
8378
8379         * mini.c: setup the statistical profiler in the thread attach
8380         callback to cope with the new single thread code.
8381
8382 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
8383
8384         * mini-ppc.c: ensure we have enough room for the profiler
8385         calls (fixed bug#72084).
8386
8387 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
8388
8389         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
8390         it.
8391
8392 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8393
8394         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
8395
8396 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8397
8398         * ssapre.c: Fixed an issue with down safety (this allows IronPython
8399         to succesfully execute parrotbench).
8400         * ssapre.h: Likewise.
8401
8402 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8403
8404         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
8405         variable for stores to method arguments (fixes a SSAPRE issue).
8406
8407 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8408
8409         * mini.c: handle value types in dup, fixes gen-112.cs.
8410
8411 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
8412
8413         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
8414         sequence for calls in dynamic methods to avoid thunks.
8415
8416 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
8417
8418         * mini.c: correctly remove dynamic methods from the hashtable.
8419
8420 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8421
8422         * driver.c: Disabled SSAPRE until fix the bug that appears
8423         in IronPython's parrotbench.
8424
8425 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
8426
8427         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
8428
8429         * mini.c (mono_method_to_ir): Revert the previous change.
8430         
8431         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
8432         when AOT compiling.
8433
8434         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
8435         mono_jit_info_table_find () etc. when running under valgrind.
8436
8437         * inssel.brg: Fix warnings.
8438
8439         * mini-exceptions.c: Fix warnings.
8440
8441 2005-01-31  Martin Baulig  <martin@ximian.com>
8442
8443         * driver.c (compile_all_methods_thread_main): Don't try to compile
8444         generic methods or anything which has type parameters.
8445
8446 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
8447
8448         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
8449
8450         * TestDriver.cs: Add --verbose flags.
8451
8452         * graph.c ssa.c: Fix 64 bit warnings.
8453         
8454         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
8455         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
8456         Fix 64 bit warnings.
8457
8458         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
8459         variable not spotted by gcc.
8460         
8461         * mini-amd64.c inssel-amd64.brg: Applied patch from  
8462         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
8463         X86_COMPARE_MEMBASE opcodes.
8464
8465         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
8466
8467 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
8468
8469         * *: MonoMethod->signature might be NULL now. You *MUST* use
8470         mono_method_signature.
8471
8472 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8473
8474         * driver.c (compile_all_methods_thread_main): Compile the methods
8475         without invoking cctors.
8476
8477 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8478
8479         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
8480         * basic-calls.cs: test for the above.
8481
8482 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
8483
8484         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
8485         MonoJitInfo changes.
8486
8487 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
8488
8489         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
8490         eagerly if it contains dynamic methods.
8491         
8492         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
8493
8494         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
8495         trace, it is now computed by an icall from trace_ips.
8496         
8497         * mini-exceptions.c: Fix a warning.
8498
8499 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
8500
8501         * mini-exceptions.c: don't bother getting stack trace info if
8502         it's not going to be used.
8503
8504 2005-01-27  Raja R Harinath  <rharinath@novell.com>
8505
8506         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
8507         ssapre-mini-ops.h.
8508
8509 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
8510
8511         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
8512
8513         * aot.c: Avoid calling mono_method_get_header () if not needed.
8514
8515         * mini.h: Bump AOT file format version.
8516         
8517         * mini.c (mono_emit_native_call): Allocate a GOT var here.
8518
8519         * mini.c (mono_print_tree): Print more info for calls.
8520
8521 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
8522
8523         * declsec.h: Remove warning by adding missing include for marshal.h
8524
8525 2005-01-26  Martin Baulig  <martin@ximian.com>
8526
8527         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
8528         `ip' twice.
8529
8530 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
8531
8532         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
8533         flags.
8534
8535         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
8536
8537         * aot.c (mono_compile_assembly): Fix a warning.
8538
8539 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
8540
8541         * declsec.c: Look for security attributes on the original MonoMethod 
8542         (and not the wrapped one). This fix permissions on icalls.
8543
8544 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8545
8546         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8547
8548         * mini.c (mono_allocate_stack_slots): Add a fixme.
8549
8550         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
8551
8552 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
8553
8554         * inssel.brg: optimize casts of sealed types (more
8555         optimizations waiting for fixes in remoting).
8556
8557 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
8558
8559         * inssel.brg (stmt): Add another dummy rule.
8560
8561         * driver.c: Fix warnings.
8562
8563         * driver.c (mono_main): If running under valgrind, instruct glib to use
8564         the system allocation functions so valgrind can track the memory
8565         allocated by the g_... functions.
8566
8567         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
8568
8569         * mini-ops.h: Add OP_DUMMY_STORE opcode.
8570
8571         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
8572
8573         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
8574         variables in try regions.
8575
8576         * mini.c (mini_method_compile): Don't disable optimizations on large
8577         methods when AOT compiling.
8578
8579         * mini.c (mono_allocate_stack_slots): New arch independent method to 
8580         allocate stack slots. Not yet used.
8581
8582 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
8583
8584         * debug-mini.c (mono_debug_close_method): Plug some leaks.
8585
8586 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
8587
8588         * mini-ppc.c: make the branch info relative as the code
8589         buffer can be reallocated.
8590
8591 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
8592
8593         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
8594         * driver.c: Removed the AOT/security restriction. Now initialize the
8595         security manager (in metadata) if --security is used.
8596         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
8597         rather than the pointer to declarative security, when AOT is used.
8598
8599 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
8600
8601         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
8602         basic blocks, reduced intrinsic exception throwing code size.
8603
8604 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
8605
8606         * driver.c (mini_usage): Reorder the usage screen.
8607
8608 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
8609
8610         * mini.c (mono_resolve_patch_target): Fix warning.
8611
8612 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
8613
8614         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
8615         previous patch.
8616
8617         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8618
8619         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
8620         breaks the amd64 build.
8621
8622         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
8623         register allocation. Fixes #71454.
8624
8625         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
8626
8627         * arrays.cs: Add new regression test.   
8628
8629 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8630
8631         * ssapre.c: Turned usage of snprintf to GString.
8632         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
8633         (I left it on by mistake in my previous commit).
8634
8635 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
8636
8637         * mini.c, cfold.c, basic-calls.cs: preserve side effects
8638         on cond branch optimization (fixes bug# 71515).
8639
8640 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8641
8642         * abcremoval.c: Fixed bug 71062.
8643         * abcremoval.h: Likewise.
8644
8645 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8646
8647         * mini.c: Added a new functionality to optimize_branches, the removal
8648         of useless basic blocks, and fixed some problem in the removal of
8649         critical edges; some utility functions added for both purposes.
8650         * ssapre.c: Added complex expression support, and fixed bug 70637.
8651         * ssapre.h: Likewise.
8652         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
8653         enabled in SSAPRE.
8654         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
8655         * driver.c: Re-enabled SSAPRE.
8656
8657 2005-01-19  Martin Baulig  <martin@ximian.com>
8658
8659         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
8660         the result of mono_get_method_constrained().
8661
8662 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
8663
8664         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
8665         manager.
8666
8667 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
8668
8669         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
8670         be detected.  Fixes #59296.
8671
8672 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8673
8674         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
8675         which can happen. Fixes #71361.
8676
8677 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8678
8679         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
8680         manager.
8681
8682 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8683
8684         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
8685         appdomain-unload.exe to fail.
8686         
8687         * mini.c: Fix some memory leaks.
8688
8689 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
8690
8691         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
8692         Fixed bug and sped up some codepaths.
8693
8694 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8695
8696         * mini.c: Fix some memory leaks.
8697
8698         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
8699         conversion.
8700
8701         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
8702
8703         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
8704         #71320.
8705
8706         * iltests.il: Add regression test for #71320.
8707
8708 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
8709
8710         * mini.c (mono_codegen): Fix installation of profiler hooks.
8711
8712         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
8713
8714 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8715
8716         * mini.h, mini.c, cfold.c: optimize access to enum
8717         readonly fields, too. Eval conditional branches if possible
8718         to perform unreachable code removal in more cases.
8719
8720 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
8721
8722         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
8723
8724         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
8725         code manager.
8726
8727         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
8728         WinXP DEP. Fixes #71244.
8729
8730 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
8731
8732         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
8733
8734 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
8735
8736         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
8737
8738 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
8739
8740         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
8741         changes.
8742
8743         * mini.h: Bump AOT version.
8744
8745         * mini.h (MonoCompile): Change exvar to a hash table.
8746
8747         * mini.c: Allocate a separate exvar for each handler block.
8748
8749         * mini.c: Get rid of the computation of filter_lengths, its not needed.
8750
8751         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
8752         ex var with the pending exception and only throw if the two are equal.
8753         Fixes #68552.
8754         
8755         * exceptions.cs: Add tests for rethrow and nested catch clauses.
8756
8757         * mini-x86.c: Fix warnings.
8758
8759         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
8760         used by all the ports now.
8761
8762         * aot.c: Add write-symbols and save-temps options.
8763
8764 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8765
8766         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
8767
8768 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
8769
8770         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
8771         operations.
8772
8773         * tramp-s390.c: Check vtable slot belongs to the domain.
8774
8775         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
8776         as per other platforms.
8777
8778         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
8779
8780 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
8781
8782         * driver.c: we don't run the Main() code in a subthread anymore.
8783
8784 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
8785
8786         * mini.c: added experimental rtc support in the statistical
8787         profiler: if the user has the permission, more accurate statistics
8788         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
8789         The MONO_RTC value must be restricted to what the linux rtc allows:
8790         power of two from 64 to 8192 Hz.
8791
8792 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
8793
8794         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
8795
8796 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
8797
8798         * mini-ppc.c: better icache flush for smp.
8799
8800 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
8801
8802         * mini-amd64.c (emit_move_return_value): Fix memory leak.
8803
8804         * mini-x86.c (get_call_info): Add the get_call_info () code from the
8805         amd64 port, not yet used.
8806
8807 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8808
8809         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
8810         a struct type.
8811
8812 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
8813
8814         * driver.c: Added --security option to activate the security manager.
8815         Right now this will allow code generation for declarative demands and
8816         is disabled when AOT is specified.
8817         * mini.c: Add code generation for declarative security demands.
8818         * mini.h: Add mono_use_security_manager as an extern gboolean.
8819
8820 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8821
8822         * aot.c (mono_compile_assembly): Speed up compilation a bit by
8823         emitting more dense assembly code.
8824
8825         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
8826         exception throwing stuff.
8827
8828 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
8829
8830         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
8831         dead code.
8832
8833         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
8834         left in by mistake.
8835
8836         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
8837         fixed.
8838
8839         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
8840
8841         * tramp-*.c: Only patch vtable slots if the object is in the current
8842         domain. Fixes appdomain-unload.exe.
8843
8844         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
8845         
8846         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
8847         x86 branch.
8848
8849 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8850
8851         * mini.c (reverse_branch_op): New helper function.
8852
8853         * mini.c (optimize_branches): Run the new optimization only on 
8854         platforms which support it. Also reverse all kinds of branches.
8855
8856         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
8857
8858         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
8859         a throw statement.
8860
8861         * mini.c (optimize_branches): Reverse not-equals branches if the false
8862         bblock is a throw. This happens a lot of time with argument checking in
8863         corlib.
8864
8865         * mini.c (mono_codegen): Add support for placing basic blocks after
8866         the function epilogue.
8867
8868         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
8869         function epilogue.
8870         
8871 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
8872
8873         * mini.c (setup_stat_profiler): Only set this up if the platform
8874         supports ITIMER_PROF.
8875
8876 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8877
8878         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
8879         previous patch.
8880
8881         * inssel.brg: Fix a warning.
8882
8883 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
8884
8885         * mini.c: added support for statistical profiler 
8886         (run with: --profile=default:stat).
8887
8888 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
8889
8890         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
8891
8892         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
8893
8894         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
8895         related to global registers from the amd64 port.
8896
8897 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
8898
8899         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
8900
8901         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
8902         with global registers.
8903         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
8904
8905         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
8906
8907 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
8908
8909         * debug-mini.c (encode_value): Fix off-by-one.
8910
8911         * aot.c (encode_value): Likewise.
8912
8913         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
8914
8915 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
8916
8917         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
8918         AOT.
8919
8920         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
8921         
8922         * aot.c (emit_method_info): Increase size of temp buffer.
8923
8924         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
8925         the AOT case.
8926
8927 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
8928
8929         * aot.c (emit_method_info): Fix build.
8930         
8931         * aot.c: Further rework of the AOT file format to reduce the size of
8932         the method info data.
8933
8934         * mini.h: Bump AOT file format version.
8935
8936 2004-12-27  Martin Baulig  <martin@ximian.com>
8937
8938         * mini.c (mini_get_method): New static method; call
8939         mono_get_method_full() and mono_get_inflated_method().
8940         (mono_method_to_ir): Use mini_get_method() instead of
8941         mono_get_method_full(). 
8942
8943 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
8944
8945         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
8946
8947 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
8948
8949         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
8950
8951         * inssel-amd64.brg: Add some optimization rules.
8952
8953 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
8954
8955         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
8956         standard not GC'd stuff is fine.
8957
8958 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
8959
8960         * aot.c: Rework the AOT file format to get rid of most of the global
8961         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
8962
8963         * mini.h: Bump AOT file format version.
8964         
8965 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
8966
8967         * mini.h: Bump AOT file format version.
8968
8969         * aot.c (mono_aot_is_got_entry): New function to determine if an 
8970         address is inside a GOT.
8971
8972         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
8973
8974         * cpu-pentium.md: Increase the maximum size of some instructions which
8975         might involve a got access.
8976         
8977         * mini.c (get_method_from_ip): Another debug helper function.
8978
8979         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
8980         when got var accesses are created during the decompose phase.
8981
8982         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
8983
8984         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
8985         argument mini_compile_method and to MonoCompile, and use this to
8986         determine whenever a given method is compiled for AOT. This allows the
8987         other methods compiled during AOT compilation to be free of AOT stuff,
8988         so the backends does not need to add special support for them by
8989         creating a fake GOT etc.
8990
8991         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
8992         longer needed.
8993
8994 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
8995
8996         * mini.c (mono_method_to_ir): It turns out that some of the
8997         x-appdomain wrappers are lax with types, so just ignore this for
8998         all wrappers.
8999
9000         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
9001         at the vtable->klass. If it is non-shared code we can just use the
9002         vtable.
9003
9004 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
9005
9006         * mini-ppc.c: access MonoDomain from tls, too.
9007
9008 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
9009
9010         * declsec.c: Removed unused variable (and related warning ;-)
9011
9012 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
9013
9014         * iltests.il: New test for LDELEMA on an array of ref types.
9015
9016         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
9017         all ldelema's on reftypes.
9018         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
9019         it was the wrong place to put it.
9020
9021         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
9022         register to pop to make this cleaner, at the request of Paolo.
9023
9024 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
9025
9026         * mini-ops.h (OP_GETHASHCODE): New op.
9027
9028         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
9029
9030         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
9031         operation.
9032
9033         For a microbenchmark, this reduces the cost of Hashtable.get_Item
9034         by 25%.
9035         
9036         * mini-x86.c (mono_arch_output_basic_block): Rather than
9037
9038         add ebp, 4
9039
9040         Emit
9041
9042         pop edx
9043
9044         The first is 3 bytes while the second is 1. This saves 36 kb on
9045         mscorlib, quite a big saving. When bootstraping mcs, I was able to
9046         see a small boost because of icache locality.
9047
9048         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
9049
9050 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
9051
9052         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
9053         started code sharing with the generic code.
9054
9055 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
9056
9057         * mini-ppc.c, cpu-g4.md: added code for direct access to
9058         tls data slots.
9059
9060 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
9061
9062         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
9063          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
9064         to OP_TLS_GET.
9065
9066 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
9067
9068         * declsec.c|h: Added functions to cache the declarative stack modifiers
9069         in MonoJitInfo and to create a security frame from a MonoJitInfo 
9070         structure.
9071         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
9072         created. Register internal calls for System.Security.SecurityFrame::
9073         _GetSecurityFrame and _GetSecurityStack.
9074         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
9075         the definitions for the new stack walk/callback mechanism.
9076         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
9077         first security frame for LinkDemands and InheritanceDemands) and
9078         GetSecurityStack for Demands. Both use the new mono_walk_stack code
9079         from lupus.
9080         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
9081         walk initialization (lupus).
9082
9083 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
9084
9085         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
9086         idiom.
9087         (handle_loaded_temps): Do not create a temporary variable for
9088         things that we know are temps. They will never be modified.
9089         (mono_spill_call): Set MONO_INST_IS_TEMP
9090         (mono_emulate_opcode): ditto
9091         (emit_tree): ditto
9092         (mono_method_to_ir.CEE_DUP): ditto
9093
9094 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
9095
9096         * mini.c (type_to_eval_stack_type): Make this handle the void type
9097         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
9098         (emit_tree): use ip_in_bb to special case some common idioms
9099         Update all callers to pass in the IP.
9100         (mono_method_to_ir): Make CEE_CALL* do the above as well.
9101
9102         This gives us a nice 2% speedup in mcs bootstrap.
9103
9104         * mini-x86.c (peephole_pass): Peephole pass to make
9105         mov  [foo], eax
9106         push [foo]
9107
9108         into
9109
9110         mov [foo], eax
9111         push eax
9112
9113         * mini.c (ip_in_bb): new method.
9114         (mono_method_to_ir): use this method rather than doing the hash
9115         lookup ourselves.
9116
9117         * linear-scan.c (mono_linear_scan): When expiring actives, you
9118         don't need to keep around variables that expire on this
9119         instruction. This makes it so that:
9120              a = b + 1
9121         will turn into:
9122              store (ebx add (ebx, 1))
9123         which will become
9124              add ebx, 1
9125
9126 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
9127
9128         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
9129         combination to avoid doing two copies. Fix up problems with previous
9130         patch.
9131
9132         * mini.c: Fix 64 bit warnings.
9133
9134         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
9135
9136 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
9137
9138         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
9139         changes from the x86 code.
9140
9141         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
9142
9143 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
9144
9145         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
9146         throwing code to reduce its size, unify the AOT and non-aot code and 
9147         get rid of relocations in the AOT case.
9148
9149         * mini-x86.h mini.c exceptions-x86.c 
9150         (mono_arch_get_throw_corlib_exception): New arch specific function to 
9151         raise corlib exceptions which doesn't require relocations in the 
9152         caller.
9153
9154         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
9155
9156 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
9157
9158         * mini.c (mono_emit_method_call): Only allocate the got var when it is
9159         needed.
9160
9161         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
9162         in the AOT case.
9163
9164 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9165
9166         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
9167         with add function when used from Inc/dec atomic 
9168         functions. Re-enabled optimization on x86.
9169         * mini-ops.h: renamed atomic_add functions to
9170         allow _add to match the Interlocked::Add and
9171         _add_next to match Interlocked::Inc/Dec.
9172
9173 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
9174
9175         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
9176         linking of BBs to the end BB, and enabled SSAPRE also with
9177         consprop and copyprop (which was prevented by that bug).
9178
9179 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9180
9181         * mini-x86.c: disabling the Interlocked optimizing code. 
9182
9183 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
9184
9185         * aot.c (load_aot_module): Move reading of got_addr after the AOT
9186         file version check.
9187         
9188 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9189
9190         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
9191         interlocked optimization due lack of support on x86, rewrote 
9192         exchange to take into account that base may be in eax.
9193         
9194         xsp works again; activated Interlocked optimizing code.
9195         
9196 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
9197
9198         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
9199
9200 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
9201
9202         * mini-ops.h: Add new opcodes.
9203
9204         * mini.h: Add new patch types. Add got_var to MonoCompile.
9205
9206         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
9207         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
9208         make it work with all kinds of patchable code.
9209
9210         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
9211         address of the GOT, and referencing entries in the GOT.
9212
9213         * mini.c: Add code to load the GOT address if needed by an opcode.
9214
9215         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
9216         independent AOT code on the x86 using an elf-style Global Offset Table.
9217
9218 2004-12-14  Raja R Harinath  <rharinath@novell.com>
9219
9220         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
9221
9222 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9223
9224         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
9225         when running xsp.
9226
9227 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
9228
9229         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
9230         of Interlocked:Increment/Decrement/Add as inline ops.
9231         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
9232
9233 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
9234
9235         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
9236         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
9237
9238 2004-12-12  Duncan Mak  <duncan@ximian.com>
9239
9240         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
9241         again. `patch_info->table_size' is no longer valid after Zoltan's
9242         commit #37636.
9243
9244 2004-12-12  Martin Baulig  <martin@ximian.com>
9245
9246         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
9247         if we are the "real" method, ie. not an inlined method inside it.
9248
9249 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
9250
9251         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
9252         before we look in the special fields table. This fixes
9253         ../tests/thread-static-init.cs.
9254
9255 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9256
9257         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
9258         for Array get_Rank and get_Length. Fixes bug #70465.
9259
9260 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
9261
9262         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
9263         separate structure to reduce the size of MonoJumpInfo.
9264
9265 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
9266
9267         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
9268
9269 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
9270
9271         * mini.c (mini_get_inst_for_method): Changed to allow ports
9272         to return a MonoInst instead of opcode 
9273         (renamed mini_get_opcode_for_method to better reflect the new functionality)
9274         
9275         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
9276         Allow ports to return a created MonoInst instead of op-code, will enable
9277         new optimizations.
9278         (renamed mini_get_opcode_for_method to better reflected the functionality)
9279
9280 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
9281
9282         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
9283
9284 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9285
9286         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
9287         Fixes #69985.
9288
9289 2004-12-08  Martin Baulig  <martin@ximian.com>
9290
9291         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
9292         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
9293
9294 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9295
9296         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
9297         correctly.
9298
9299         * exceptions.cs: Disable some tests which depend on properties of x86 fp
9300         arithmetic.
9301
9302 2004-12-08  Raja R Harinath  <rharinath@novell.com>
9303
9304         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
9305
9306 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
9307
9308         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
9309         bug introduced by the previous patch.
9310
9311 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9312
9313         * mini-ppc.c, objectc.cs: handle large structs passed by value
9314         (fixes bug #69972).
9315
9316 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
9317
9318         * mini-ppc.c: OP_ARGLIST implementation from
9319         Geoff Norton  <gnorton@customerdna.com>.
9320
9321 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
9322
9323         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
9324         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
9325
9326 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9327
9328         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
9329
9330 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9331
9332         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
9333         support.
9334
9335 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
9336
9337         * mini-sparc.c: Zero out localled-ed memory.
9338
9339         * iltests.il: Add tests for zeroing out localloc-ed memory.
9340
9341 2004-12-04  Martin Baulig  <martin@ximian.com>
9342
9343         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
9344         mono_method_get_signature_full().       
9345
9346 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
9347
9348         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
9349         and some utility functions (always for SSAPRE), integrated SSAPRE.
9350         * mini.h: Likewise.
9351         * driver.c: Added ssapre option.
9352         * ssa.c: Small fix on OP_ARG handling.
9353         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
9354         * Makefile.am: Likewise.
9355
9356 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
9357
9358         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
9359         now in the xp code.
9360
9361         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
9362         icall.
9363
9364 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9365
9366         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
9367         
9368         * cpu-s390.md : Increase instruction length of oparglist.
9369
9370         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
9371
9372 2004-11-30  Martin Baulig  <martin@ximian.com>
9373
9374         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
9375         virtual generic methods.  We call a special helper_compile_generic_method()
9376         icall to retrieve the method from the vtable, inflate and compile
9377         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
9378
9379         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
9380
9381 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
9382
9383         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
9384
9385 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
9386
9387         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
9388         Fixes #69929.
9389
9390 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
9391
9392         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
9393         platforms with PIC aot.
9394
9395 2004-11-28  Martin Baulig  <martin@ximian.com>
9396
9397         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
9398         Fixes gen-112.cs.
9399
9400 2004-11-28  Martin Baulig  <martin@ximian.com>
9401
9402         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
9403         the result of mono_type_get_underlying_type() to check whether
9404         we're byref.
9405
9406 2004-11-26  Martin Baulig  <martin@ximian.com>
9407
9408         * mini.c
9409         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
9410         in the g_assert().
9411
9412 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
9413
9414         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
9415         the same way as the other arguments so they won't get clobbered.
9416
9417         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
9418         calls through R11 since it is clobbered by the trampoline code.
9419
9420 2004-11-26  Raja R Harinath  <rharinath@novell.com>
9421
9422         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
9423         pick up in-tree mscorlib.dll.
9424
9425 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
9426
9427         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
9428
9429         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
9430         runtime data/code are now stored in a table similar to the GOT in ELF. 
9431         This allows the code itself to be position independent.
9432
9433         * aot.c: Fix loading of referenced assemblies after the lazy assembly
9434         loading changes.
9435
9436         * aot.c: Attach ELF type (object/function) directives to all global
9437         symbols.
9438
9439         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
9440
9441         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
9442
9443         * mini-amd64.h: Turn on PIC AOT code.
9444
9445         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
9446         returning the offset within an OP_AOTCONST instruction where the GOT
9447         offset needs to be added.
9448
9449         * mini.h: Bump AOT file format version.
9450
9451 2004-11-25  Martin Baulig  <martin@ximian.com>
9452
9453         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
9454         uninflated generic methods.
9455
9456 2004-11-25  Martin Baulig  <martin@ximian.com>
9457
9458         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
9459
9460 2004-11-24  Martin Baulig  <martin@ximian.com>
9461
9462         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
9463         original klass (this only applies for generic instances).
9464
9465 2004-11-24  Martin Baulig  <martin@ximian.com>
9466
9467         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
9468         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
9469         that array).
9470
9471 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
9472
9473         * mini.c (mono_method_to_ir): Disable inlining for methods containing
9474         localloc. Fixes #69678.
9475
9476         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
9477         
9478 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
9479
9480         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
9481         used SSE registers on pinvoke calls. Fixes #69774.
9482
9483 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
9484
9485         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
9486         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
9487
9488 2004-11-23  Raja R Harinath  <rharinath@novell.com>
9489
9490         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
9491         Refer directly to the mcs/ tree.
9492
9493 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9494
9495         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
9496         Check if a trampoline for a synchronized method is required. 
9497
9498 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
9499
9500         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
9501         with localloc if needed. Throe arithmetric exception in
9502         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
9503         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
9504
9505 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
9506
9507         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
9508         types before switching on type.  Fixes #69622.
9509
9510 2004-11-19  Raja R Harinath  <rharinath@novell.com>
9511
9512         * Makefile.am (check-local): New.  Integrate into 'make check'.
9513         (MCS,RUNTIME): Define using in-tree mono and mcs.
9514         (ILASM): New.
9515         (%.exe): Use $(ILASM).
9516
9517 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
9518
9519         * mini-ppc.c: adjust initial prolog size (bug #69691).
9520
9521 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
9522
9523         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
9524         #69664.
9525
9526 2004-11-17  Raja R Harinath  <rharinath@novell.com>
9527
9528         * Makefile.am (clean-local): Rename from 'clean'.
9529
9530 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9531
9532         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
9533         to mono_arch_is_int_overflow. 
9534         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
9535         SIGFPE events.
9536
9537 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
9538
9539         * declsec.c|h: New files to support declarative security attributes.
9540         Added function to check if a method has (applicable) security.
9541         * mini.c|h: Add check for declarative security attributes in
9542         mono_method_check_inlining.
9543         * Makefile.am: Added declsec.c and declsec.h to the build.
9544
9545 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
9546
9547         * mini.c, mini.h: update to keep dynamic code info per-domain.
9548
9549 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
9550
9551         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
9552         (mini_init): Get rid of it from here too.
9553
9554 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
9555
9556         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
9557         implemented OP_RETHROW (patch by Geoff Norton
9558         <gnorton@customerdna.com>).
9559
9560 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
9561
9562         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
9563         between appdomains.  Fixes appdomain-unload on PPC.
9564
9565 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
9566
9567         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9568         mini-exceptions.c: handle the new wrapper types.
9569         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
9570         token value as a MonoClass* when compiling a wrapper.
9571         mono_jit_create_remoting_trampoline now takes an additional
9572         MonoRemotingTarget parameter.
9573         
9574 2004-11-10  Martin Baulig  <martin@localhost>
9575
9576         * mini.c (mono_method_to_ir): Use `generic_container->context'
9577         rather than creating a new one.
9578
9579 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9580
9581         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
9582
9583         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
9584
9585 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
9586
9587         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
9588         the experimental aot cache stuff.
9589
9590 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
9591
9592         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9593         mini-exceptions.c: update to exception clause structure changes.
9594
9595 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9596
9597         * exceptions-x86.c (throw_exception): Fix warnings.
9598
9599         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
9600         for OP_RETHROW.
9601
9602 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9603
9604         * exceptions-sparc.c (get_throw_exception): Really fix this.
9605
9606 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
9607
9608         * tramp-*.c: we no longer support icalls without wrappers, so
9609         a bit of code can be removed here
9610
9611 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
9612
9613         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
9614         patch.
9615
9616         * cpu-sparc.md: Add op_rethrow.
9617
9618         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
9619
9620         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
9621
9622         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
9623         * mini-ops.h: Add OP_RETHROW.
9624
9625         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
9626
9627         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
9628
9629 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
9630         
9631         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
9632         Makes the output much easier to read
9633
9634 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
9635
9636         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
9637         prevents another huge leak when compiling with ssa. Secondly, the
9638         performance of doing this rather than freeing the lists is much
9639         better. GList does a lock every time you allocate a list link,
9640         so that it can use a memory pool. So, it is better to just use
9641         a memory pool of our own.
9642         
9643         * ssa.c, linear-scan.c: replace g_list_remove_link with
9644         g_list_delete.  The remove one does not free the GList, so we were
9645         leaking memory. On -O=all --compile-all with corlib, this cut down
9646         3 MB of allocations.
9647
9648 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
9649
9650         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
9651
9652         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
9653
9654         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
9655         into a new function mono_create_jit_trampoline ().
9656
9657 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
9658
9659         * trace.c (get_spec): Allow tracing of classes without a namespace.
9660
9661 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
9662
9663         * mini.c: Fix pointer overwrite in mini_method_compile.
9664
9665 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
9666
9667         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
9668         The darwin ABI needs some special handling for 1 and 2 byte structs
9669         Lets use lbz/lhz instead of lwz everywhere.
9670         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
9671         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
9672         Use stb/sth for the former, and put the latter always on stack instead of in
9673         argument registers.
9674
9675 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
9676
9677         * trace.c (is_filenamechar): Add '_'.
9678
9679 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
9680
9681         * mini-s390.c: Fix prolog length to allow for large trace requirements.
9682
9683         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
9684
9685 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
9686
9687         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
9688         depends on libmonogc. Fixes #68805.
9689
9690 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
9691
9692         * mini.c (mono_jit_free_method): Provide extra information for
9693         this error.  Currently this leaks, but will be turned into a
9694         developer option in the future.
9695
9696 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
9697
9698         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
9699
9700 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
9701
9702         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
9703         boundary. Fixes reading of PATCH_INFO_R4 and R8.
9704         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
9705
9706 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
9707
9708         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
9709         trampolines for AOT code.
9710
9711 2004-10-22    <vargaz@freemail.hu>
9712
9713         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
9714         constructed types. Fixes #68136.
9715
9716 2004-10-21  Martin Baulig  <martin@ximian.com>
9717
9718         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
9719         if it returns true, unwind the stack to the call instruction.
9720
9721 2004-10-21    <vargaz@freemail.hu>
9722
9723         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
9724
9725         * mini.h: Bump AOT version number.
9726
9727         * objects.cs: Add another test for unbox trampolines.
9728
9729         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
9730         valuetype methods.
9731
9732 2004-10-20    <vargaz@freemail.hu>
9733
9734         * driver.c: Add SHARED to the set of optimizations tested.
9735
9736         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
9737
9738         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
9739         used by CEE_NEWARR.
9740
9741         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
9742
9743 2004-10-20  Martin Baulig  <martin@ximian.com>
9744
9745         * mini-exceptions.c (mono_handle_exception): Call
9746         mono_debugger_handle_exception() to tell the debugger about
9747         catch/finally clauses.
9748
9749 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
9750
9751         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
9752
9753         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
9754         #68447.
9755
9756 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
9757
9758         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
9759         methods as their native size, fixed bug #57543, #57545.
9760         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
9761         This saves a temporary register and mullw call down into 1 (minor perf
9762         increase for cases like sum = sum * 5;  This use to translate into:
9763             li r11,5
9764             mullw r28,r28,r11
9765         It now translates to
9766             mulli r28,r28,5
9767
9768 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
9769
9770         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
9771         #68388.
9772
9773 2004-10-11  Martin Baulig  <martin@ximian.com>
9774
9775         * mini.c (mono_method_to_ir): If we're a generic method, get the
9776         MonoGenericContainer from our MonoMethodNormal and create a
9777         MonoGenericContext from it.
9778
9779 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
9780
9781         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
9782
9783         * basic-long.cs: Add test for checked i8->i2 cast.
9784
9785 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9786
9787         * inssel-ppc.brg: added a couple of speedup rules.
9788
9789 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
9790
9791         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
9792         to speed up rebuilds.
9793
9794 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9795
9796         * mini-s390.c: Minor fix to OP_OR_IMM.
9797
9798 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
9799
9800         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
9801         better. Fixes appdomain-unload.exe on sparc.
9802
9803 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
9804
9805         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
9806         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
9807         see bug 67324.
9808
9809 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
9810
9811         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
9812
9813 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
9814
9815         * mini.c: Always generate a field read/write wrapper for members
9816         of the class MarshalByRefObject since the actual instance could
9817         be a CBO.
9818
9819 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
9820
9821         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
9822
9823 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
9824
9825         * driver.c mini.h trace.c: Move the setting of the main assembly into
9826         a separate function called mono_trace_set_assembly () and call it after
9827         actually loading the main assembly. Fixes #66872.
9828
9829 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
9830
9831         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
9832         using the code manager.
9833
9834 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
9835
9836         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
9837
9838 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
9839
9840         * cpu-amd64.md: Fix bug in previous patch.
9841         
9842         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
9843         #66650.
9844
9845 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
9846
9847         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9848         mini-exceptions.c: updates for changed stack walk interface.
9849
9850 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9851
9852         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
9853
9854 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
9855
9856         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
9857
9858 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
9859
9860         * driver.c (mini_regression_list): Do not call mono_assembly_close 
9861         since assemblies can't be unloaded.
9862         
9863 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9864
9865         * cpu-amd64.md: Fix more instruction lengths.
9866
9867         * cpu-amd64.md: Fix lengths of some instructions.
9868
9869 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
9870
9871         * inssel.brg: Make the array ldelema check aot friendly.
9872
9873 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9874
9875         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
9876
9877         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
9878
9879 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
9880
9881         * mini-x86.c: Fix build.
9882
9883         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
9884         mono_type_get_underlying_type () helper function to simplify code.
9885         
9886 2004-09-09  Martin Baulig  <martin@ximian.com>
9887
9888         * mini-amd64.c: Don't access `type->data.klass' directly, call
9889         mono_class_from_mono_type() instead since the type may be a
9890         generic instance.
9891
9892 2004-09-09  Martin Baulig  <martin@ximian.com>
9893
9894         * mini-amd64.c (get_call_info): Fix support for generic instances.
9895         (add_valuetype): Use mono_class_from_mono_type() to get the class
9896         since we can be a generic instance.
9897
9898 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
9899
9900         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
9901
9902 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
9903
9904         * liveness.c: reset spill costs on each scan: bug 62107
9905
9906 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
9907
9908         * exceptions-sparc.c (mono_arch_find_jit_info): remove
9909         unnecessary line that doesn't compile
9910
9911 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
9912
9913         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
9914         trampolines, make them call an error function so people can fix their
9915         code.
9916
9917 2004-09-06  Martin Baulig  <martin@ximian.com>
9918
9919         * mini.c (mono_method_to_ir): When initializing locals, handle a
9920         generic instances like a valuetype if it's a valuetype and like a
9921         class if it's a class.
9922
9923 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9924
9925         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
9926         stack. Fixes #64674.
9927
9928         * exceptions.cs: Add test for unwinding of call arguments.
9929
9930 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
9931
9932         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
9933         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
9934         set the carry/borrow flag). The sparc and s390 implementations
9935         can now use optimized versions (and simplify the code). ppc bugfixes.
9936
9937 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9938
9939         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
9940
9941 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
9942
9943         * inssel-amd64.brg: Remove leftover 32 bit rule.
9944
9945         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
9946
9947 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
9948
9949         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
9950         mono_arch_find_jit_info functions into a new function. Fix a memory
9951         leak.
9952
9953         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
9954         refactored code.
9955         
9956 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9957
9958         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
9959         as well.
9960         
9961         * exceptions.cs: Add array size tests.
9962
9963         * mini.c: Allocate a separate icall wrapper for each arity of 
9964         mono_array_new_va. Fixes #59509.
9965
9966         * exceptions.cs: Add testcase for 64578.
9967
9968         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
9969
9970         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
9971         
9972 2004-09-02  Martin Baulig  <martin@ximian.com>
9973
9974         * mini.c (mono_method_to_ir): When initializing the locals, call
9975         handle_initobj() on the generic instance itself, not its
9976         underlying type.
9977
9978 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9979
9980         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
9981         MonoJitInfo for dynamic methods.
9982
9983         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
9984
9985         * mini.c: Add support for freeing JIT data for dynamic methods.
9986         
9987 2004-09-01  Martin Baulig  <martin@ximian.com>
9988
9989         * mini-x86.c (is_regsize_var): Added support for generic
9990         instances.
9991         (mono_arch_emit_prolog): Make this compile again, use
9992         `x86_push_imm_template (code)'.
9993
9994 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
9995
9996         * mini-x86.c: make all push_imm instructions that get
9997         patched always emit the long form
9998
9999 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
10000
10001         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
10002         in a per-domain hash.
10003
10004         * mini-amd64.c (merge_argument_class_from_type): Handle generic
10005         types.
10006
10007 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
10008
10009         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
10010         work.
10011         
10012         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
10013         work.
10014
10015         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
10016         Beginnings of SSE2 support.
10017
10018         * exceptions.cs: Add more tests for checked int<->uint casts.
10019
10020 2004-08-28  Martin Baulig  <martin@ximian.com>
10021
10022         * mini-x86.c (mono_arch_instrument_epilog): Added support for
10023         generic instances.
10024
10025         * mini.c
10026         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
10027         Handle generic instances recursively.
10028
10029 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10030
10031         * iltests.il: test for conv.u8 on a constant
10032
10033 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10034
10035         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
10036         LCONV_x4 (shrun_32 (membase)).
10037
10038 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10039
10040         * inssel-x86.brg: c&p rules for push/setret of long
10041
10042 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
10043
10044         * inssel-x86.brg: c&p rules for compare (base, regvar) and
10045         compare (regvar, base)
10046
10047         * inssel-x86.brg: more burg love
10048
10049         * inssel.brg: more cleanup
10050
10051         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
10052
10053 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
10054
10055         * basic-long.cs, basic-calls.cs: new tests for optimization.
10056
10057 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
10058
10059         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
10060         patch.
10061
10062 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
10063
10064         * mini-amd64.c (read_tls_offset_from_method): Add another case.
10065         
10066 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
10067
10068         * inssel.brg (mini_emit_memcpy): use 
10069         NO_UNALIGNED_ACCESS to disable memcpy optimization
10070
10071 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
10072
10073         * mini-amd64.c: Handle generic types in various places.
10074
10075         * mini.c (mono_method_to_ir): Handle generic types in init locals.
10076
10077 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
10078
10079         * mini.c (handle_box): Fix warning.
10080
10081         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
10082
10083         * mini-amd64.h: Enable the emit_state optimization.
10084
10085         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
10086
10087         * mini-amd64.c: Add some new 64 bit peephole opts.
10088
10089         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
10090
10091         * cpu-amd64.md: sreg1 of div instructions must be %rax.
10092
10093         * mini-amd64.c: Register allocator fixes.
10094
10095         * mini.c: Add an optimization to emit_state to avoid allocation of new
10096         registers on some platforms.
10097
10098 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
10099
10100         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
10101
10102         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
10103         allocation. Fixes #63085.
10104
10105         * basic-long.cs: Add new regression test.
10106
10107         * mini-amd64.c: Register allocator improvements.
10108
10109 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
10110
10111         * mini-amd64.c (read_tls_offset_from_method): Add another code
10112         sequence.
10113
10114         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
10115         instruction sequence for nullifying class init trampolines.
10116
10117         * objects.cs: Add new regalloc test.
10118
10119         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
10120
10121 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
10122
10123         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
10124         
10125         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
10126         arguments.
10127
10128         * driver.c: Fix profiling after TLS changes.
10129         
10130         * driver.c (mono_main): Set mono_stats.enabled if needed.
10131
10132         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
10133         CEE_BOX.
10134
10135 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
10136
10137         * mini-x86.c: use a 1 op rather than a 2 op tls access
10138         instruction -> faster.
10139
10140 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
10141
10142         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
10143         x86 backend.
10144
10145 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
10146
10147         * exceptions-sparc.c (throw_exception): fix typo
10148
10149 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
10150
10151         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
10152         set tree->dreg correctly with tls. Allow any
10153         register to be used.
10154
10155         * mini-x86.c (read_tls_offset_from_method): add new code
10156         generation pattern seen with GCC.
10157
10158
10159 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
10160
10161         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
10162         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10163         exceptions-sparc.c: fix some performance issues in exception
10164         handling and setting of the stack trace for exceptions that were
10165         already thrown.
10166
10167 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
10168
10169         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
10170         x86 backend.
10171         
10172         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
10173         registers.
10174
10175 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
10176
10177         This patch inlines tls access, when possible.
10178         
10179         * mini.h: new arch functions for TLS intrinsics.
10180         All platforms updated with a stub.
10181
10182         * mini.c: use the new intrinsics
10183
10184         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
10185         arch specific intrinsic for tls variables
10186
10187 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
10188
10189         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
10190         under windows.
10191
10192 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10193
10194         * mini.c: thread local allocation
10195
10196 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
10197
10198         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
10199
10200         * Makefile.am: Link against the static version of libmonogc.
10201         
10202         * Makefile.am: Link the static versions of the convenience libraries
10203         into the mono executable.
10204
10205         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
10206
10207 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
10208
10209         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
10210         on integer overflow.
10211
10212         * mini-amd64.c: Reorganize function call code.
10213
10214         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
10215
10216 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10217
10218         * inssel-x86.brg: use xor eax,eax.
10219         
10220         * basic.cs: new tests
10221
10222 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10223
10224         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
10225         in exception throwing code.
10226         
10227 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10228
10229         * inssel-x86.brg: use xor esi,esi.
10230
10231 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10232
10233         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
10234         can trace methods compiled during mini_init () too.
10235
10236         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
10237         CEE_CONV_U4.
10238
10239 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10240
10241         * Makefile.am: static link on x86 (r=zoltan)
10242
10243 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10244
10245         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
10246         code since it causes some programs to fail.
10247
10248 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
10249
10250         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
10251
10252 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10253
10254         * mini.c: ovfops_op_map - add STACK_OBJ case for
10255         CONV_I 
10256         * basic.cs: add test_0_pin_string as test
10257         case for above.
10258
10259 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10260
10261         * Makefile.am: build C# if srcdir != builddir
10262
10263 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10264
10265         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
10266         fall-through blocks.
10267
10268 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10269
10270         * driver.c: enable loop by default again and include abcrem in -O=all.
10271
10272 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
10273
10274         * iltests.il: Add some localloc tests.
10275
10276         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
10277
10278         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
10279         Fixes #62574.
10280
10281         * inssel-amd64.brg: Add some optimizations.
10282
10283         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
10284         for gcc-3.4.
10285
10286         * Makefile.am: Statically link mono against libmono on AMD64.
10287         
10288         * mini-amd64.c inssel-amd64.brg: Optimizations.
10289
10290 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
10291
10292         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
10293
10294         * tramp-amd64.c: Patch calling code in trampolines.
10295
10296 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
10297
10298         * mini-amd64.c: pinvoke struct passing fixes.
10299
10300 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
10301
10302         * mini-sparc.c: redo change, make mono_arch_cpu_init call
10303         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
10304
10305 2004-08-05  Duncan Mak  <duncan@ximian.com>
10306
10307         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
10308         CEE_LDELEM_ANY.
10309
10310 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10311
10312         * mini-amd64.c (emit_move_return_value): Move return value for normal
10313         calls too.
10314
10315 2004-08-05  Martin Baulig  <martin@ximian.com>
10316
10317         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
10318         `type->type'; just modify `type' itself when dealing with enums
10319         and generic instances.
10320         (check_call_signature): Make `simple_type' a `MonoType *'.
10321
10322 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10323
10324         * mini.c: Use OP_PADD to add offsets to addresses.
10325
10326         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
10327
10328 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
10329
10330         * mini-sparc.c (mono_arch_emit_epilog): fix check
10331         for folding last op into restore instruction
10332
10333 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10334
10335         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
10336         helper methods using the code manager.
10337         
10338         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
10339
10340         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
10341
10342 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10343         
10344         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
10345           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
10346
10347         * mini-s390.c: fix tail processing
10348
10349 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
10350
10351         * mini-ppc.c: mul.ovf.un exception name fix.
10352
10353 2004-08-03  Martin Baulig  <martin@ximian.com>
10354
10355         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
10356         instances; before jumping to `handle_enum', also modify `ptype'.
10357
10358 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
10359
10360         * cpu-sparc.md: fcall maximal length too small.
10361
10362 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
10363
10364         * mini-amd64.c mini.h: Add initial support for passing/returning 
10365         structures to/from pinvoked methods.
10366
10367 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
10368
10369         * mini-ppc.c: reg allocator fix.
10370
10371 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
10372
10373         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
10374
10375         * inssel.brg: Optimize memset on 64 bit machines.
10376
10377         * mini-amd64.c: Fix some vararg cases.
10378
10379 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10380
10381         * mini-s390.c: Corrected macro in emit_float_to_int
10382
10383         * s390-abi.cs: Tests to exercise the s390 ABI
10384
10385 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10386
10387         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
10388         caller saved regs.
10389
10390         * basic.cs: Add a test for add.ovf.un.
10391
10392 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
10393
10394         * mini-sparc.c: add case for OP_IDIV_UN
10395
10396 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10397
10398         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
10399         
10400         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
10401
10402 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
10403
10404         * basic.cs: regression tests.
10405
10406         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
10407         regressions.
10408
10409 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10410
10411         * basic.cs: Add a new test.
10412
10413         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
10414         and AOT. Various fixes and optimizations.
10415
10416         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
10417
10418 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10419
10420         * mini-ppc.c: make sure temp regs are not used for global reg
10421         allocation.
10422
10423 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
10424
10425         * cpu-sparc.md: conv_i8 fix for 64bits
10426
10427         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
10428
10429 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
10430         
10431         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
10432         add opcode for cmp BYTE PTR [eax], imm.
10433
10434         * inssel.brg: Make memcpy and memset takes bases.
10435
10436 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10437
10438         * *-amd64.*: More AMD64 work.
10439         
10440 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10441
10442         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
10443         add a compare-not-equal opcode.
10444         
10445 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
10446
10447         * mini.c: Use mono_init_from_assembly instead of mono_init.
10448         
10449 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10450
10451         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
10452
10453         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
10454
10455         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
10456
10457         * inssel.brg: 64 bit fixes.
10458
10459         * mini.h (MonoCallInst): Add some AMD64 specific data.
10460
10461         * mini.h: Add some OP_P opcodes.
10462
10463 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10464
10465         * basic.cs: tests for 61797 and 61740
10466
10467 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10468
10469         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
10470         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
10471
10472 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
10473
10474         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
10475
10476         * *-amd64*.*: Ongoing AMD64 work.
10477
10478 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
10479
10480         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
10481
10482         * *-amd64*: Ongoing AMD64 work.
10483
10484         * mini-arch.h: Add AMD64 support.
10485
10486         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
10487
10488         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
10489
10490         * mini-ops.h: Add new opcodes.
10491
10492         * Makefile.am: Add AMD64 support.
10493
10494         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
10495         rules into the inssel-long*.brg files.
10496
10497         * *-amd64.*: Add beginnings of AMD64 backend.
10498
10499 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
10500
10501         * mini.c (print_dfn): commenting out the code that prints
10502         the cil. With -O=deadce, this makes -v -v crash.
10503         
10504         * cpu-pentium.md: make checkthis have a length of 2
10505
10506 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
10507
10508         * mini-sparc.h: fix implementations of __builtin
10509         functions for Sun compiler for V9.
10510
10511 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
10512
10513         * mini.c: use the new stelem.ref wrapper
10514         * exceptions.cs, arrays.cs: new stelem.ref tests
10515
10516 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10517
10518         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
10519         new XSP should work with these changes).
10520
10521 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
10522         
10523         * inssel-{long32,x86,}.brg: trivial optimizations.
10524         
10525 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
10526
10527         * mini.c: load value when emitting box operation in
10528         constrained calls.
10529
10530 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
10531
10532         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
10533         is one byte shorter than cmp DWORD PTR [eax], 0.
10534
10535 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10536
10537         * inssel-ppc.brg: arguments on the stack are always
10538         relative to the stack pointer (spotted by Neale Ferguson).
10539
10540 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10541
10542         * exceptions-x86.c: delay appending the method name to the trace until
10543         after mono_jit_info_table_find is called, as this gets the real
10544         MonoMethod.
10545
10546 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
10547
10548         * aot.c: register roots
10549
10550 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10551
10552         * aot.c : I could just use PLATFORM_WIN32 flag.
10553
10554 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10555
10556         * aot.c : Reverting the previous fix. This time it broke linux build.
10557
10558 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
10559
10560         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
10561
10562 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
10563
10564         * mini.c (handle_stack_args): Remove some more debugging code.
10565         
10566         * mini.c (handle_stack_args): Remove debug output left in by mistake.
10567
10568         * driver.c mini.h aot.c: Allow additional options to be specified with
10569         --aot and pass them to mono_compile_assembly.
10570
10571         * aot.c: Add experimental code to AOT compile all loaded assemblies
10572         on demand and save the code into a cache in the filesystem.
10573
10574         * aot.c: Add support for more wrapper methods.
10575         
10576         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
10577         58863.
10578
10579         * cpu-*.md: Remove removed opcodes.
10580
10581         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
10582         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
10583         related icalls to marshal.c.
10584
10585 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
10586
10587         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
10588
10589         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
10590
10591         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
10592
10593 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
10594         * liveness.c: If liveness is recomputated we need to reset the information
10595         for each variable. This way, if the liveness range has been narrowed
10596         by optimizations that happened after the last computation, we can return
10597         a smaller range.
10598         
10599         For example, if you have
10600         
10601         {
10602                 int i = 0;
10603                 
10604                 // Tons of code that does not affect i
10605                 
10606                 i = foo ();
10607                 ...
10608         }
10609         
10610         i = 0 is dead code and will be removed by SSA. However, when
10611         linear scan gets to the code, i will still appear to be live
10612         throughout the entire block. This prevents good register allocation.
10613
10614 2004-07-06  Martin Baulig  <martin@ximian.com>
10615
10616         * debug-mini.c (mono_debug_init_method): Allow
10617         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
10618         (mono_debug_add_icall_wrapper): New method.
10619
10620         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
10621
10622 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
10623
10624         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
10625         optimization.
10626
10627 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
10628
10629         * aot.c (mono_aot_load_method): Fix loading of debug info.
10630
10631 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10632
10633         * aot.c: Add logging support.
10634
10635 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10636
10637         * mini.h: Add prototype for mono_print_method_from_ip.
10638
10639         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
10640
10641         * inssel.brg: 64 bit fixes.
10642
10643         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
10644         inssel-long32.brg.
10645
10646         * Makefile.am: Add SPARC64 support.
10647
10648 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10649
10650         * aot.c: Fix alignment problems on 32 bit platforms.
10651
10652 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
10653
10654         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
10655         SPARC64.
10656
10657         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
10658         problems.
10659
10660         * mini.h: Bump AOT file version. Some 64 bit fixes.
10661
10662 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10663
10664         * inssel-sparc.brg: Add new rule to avoid register moves.
10665
10666         * inssel.brg: Add ldind_to_load_membase helper function.
10667
10668 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
10669
10670         * mini.c: OffsetToStringData intrinsic.
10671         
10672 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10673
10674         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
10675
10676         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
10677         regression tests.
10678
10679         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
10680 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
10681
10682         * mini.c: reinstated mono_compile_get_interface_var()
10683         on x86, too, since the change breaks the Gtk# build there as well.
10684
10685 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10686
10687         * driver.c: remove loop from the default optimizations: it seems to
10688         interact badly with some of the other options (see bug #60613).
10689
10690 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
10691
10692         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
10693         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
10694
10695 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
10696
10697         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
10698         vararg-using methods.
10699
10700 2004-06-21  Martin Baulig  <martin@ximian.com>
10701
10702         * mini/mini-exceptions.c
10703         (mono_handle_exception): Added `gpointer original_ip' argument.
10704         After calling mono_unhandled_exception(), call
10705         mono_debugger_unhandled_exception() and if that returns true,
10706         restore the context and return.
10707
10708 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10709
10710         * mini-ppc.c: prefer the use of relative branches so
10711         they won't need to be patched in aot code (patch from Patrick Beard).
10712
10713 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10714
10715         * aot.c: patch from Patrick Beard to make the output assembly
10716         more correct for the MacOSX assembler. Small tweak to
10717         generate sane images on Linux/PPC, too.
10718
10719 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10720
10721         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
10722         case until bug #59509 is fixed (shows up in #60332).
10723
10724 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10725
10726         * mini.c: make sure the needed wrappers are compiled, too, with
10727         precomp.
10728
10729 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
10730
10731         * driver.c: remove NPTL reference in --version output.
10732
10733 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10734
10735         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
10736         generate valid assembly for the Mach-O assembler.
10737
10738 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10739
10740         * driver.c: don't include abcrem in the all optimization specifier
10741         since it slows down jit compilation too much for now.
10742
10743 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
10744
10745         * mini.c: use BIGMUL only if both operands have the same signage.
10746         * iltests.il: Test for bug 60056. (errors related to signage in
10747         BIGMUL).
10748
10749         r=lupus.
10750
10751 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
10752
10753         * mini.c, aot.c: memory leak fixes.
10754
10755 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10756
10757         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
10758
10759 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
10760
10761         * Makefile.am: remove the -static hack completely, it links in
10762         statically glib as well.
10763
10764 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
10765
10766         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
10767         * exceptions.cs: make it compile with new mcs/csc.
10768
10769 2004-06-03 Massimiliano Mantione <massi@ximian.com>
10770         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
10771         and added relevant test case.
10772
10773 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10774
10775         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
10776         regressions in gtk-sharp.
10777
10778 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
10779
10780         * exceptions.cs: New regression tests.
10781
10782         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
10783
10784 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
10785
10786         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
10787
10788 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
10789
10790         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
10791
10792         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
10793
10794 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
10795
10796         * mini.c (mono_jit_runtime_invoke): Init class in this
10797         method instead of trusting mono_jit_compile_method to
10798         do the work (because wrappers can be in object class)
10799
10800 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
10801
10802         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
10803
10804         * basic-long.cs: New regression test.
10805
10806 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
10807
10808         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
10809         and div/rem checks.
10810
10811 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
10812
10813         * Makefile.am: fix miguel's change to build mono statically against
10814         libmono (track build dependencies).
10815
10816 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10817
10818         * cfold.c: Some glib versions do not have G_MININT32.
10819
10820 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
10821
10822         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
10823         with precision of tan, atan, sin and cos, and implemented related
10824         regressions tests (fixes bug 54467, but one new problem appeared and
10825         is not fixed yet).
10826
10827 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10828
10829         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
10830
10831         * exceptions.cs: Add test for constant folding && division by zero.
10832
10833         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
10834         since driver.c is in libmono too, so the optimization was useless.
10835
10836         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
10837         variable to driver.c so the compiler can emit more efficient code to
10838         access them.
10839
10840 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10841
10842         * Makefile.am: don't distribute generated inssel.[ch] files.
10843
10844 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
10845
10846         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
10847         into the default appdomain. Fixes #58707.
10848
10849         * jit-icalls.c: Remove the broken approximation for truncl, doing
10850         no conversion is better.
10851
10852         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
10853         Fixes #58863.
10854
10855 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
10856
10857         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
10858         of the mcrxr instruction which is not available on some processors
10859         even if it's documented to be. Implement add and sub overflow correctly
10860         (still not complete for long unsigned). Speed up icalls a bit.
10861
10862 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
10863
10864         * mini.c (mono_jit_compile_method_with_opt): Make sure that
10865         we run .cctor in the current domain instead of target_domain.
10866         
10867         Fixes bug #58558, .cctor not being called in -O=shared.
10868
10869 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10870
10871         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
10872
10873 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
10874
10875         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
10876         which can be done with an imm8, do it that way.
10877         (mono_arch_output_basic_block): ditto for a jmp
10878         (mono_arch_emit_prolog): Computate maximum offset of a label.
10879
10880 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
10881
10882         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
10883         now tries to allocate prefered physical reg's for virtual
10884         regs. This reduces the number of emited spills/loads with
10885         20-30% on our core assemblies.
10886
10887 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10888
10889         * jit-icalls.c: truncl() is not needed and trunc() is
10890         the correct thing to do anyway (bug #58287).
10891
10892 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
10893
10894         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
10895         if available.
10896
10897 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10898
10899         * driver.c: enable loop optimizations by default.
10900
10901 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
10902
10903         * mini-x86.c: fix calc of max loop size when aligning loops start.
10904
10905 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
10906
10907         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
10908         the stack.
10909
10910 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
10911
10912         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
10913         should set carry.
10914
10915         * basic-long.cs: Add tests for add/subtract of immediates with carry.
10916
10917         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
10918         
10919         * mini.c (inline_method): Allways inline some wrappers even if the cost
10920         is too large. Fixes #58785.
10921
10922         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
10923         
10924 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
10925
10926         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
10927         (crichton@gimp.org). Beginning of support for sparc/linux.
10928
10929         * mini-sparc.c: Optimize retrieval of LMF address.
10930
10931 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
10932
10933         * exceptions-ppc.c:  handle alloca in methods with clauses.
10934
10935 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
10936
10937         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
10938
10939 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
10940
10941         * mini.c: Delegate most of the abort signal work to 
10942           mono_thread_request_interruption, which also handles Stop and Suspend
10943           states.
10944
10945 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
10946
10947         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
10948         supports the save/restore lmf opcodes.
10949
10950 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
10951
10952         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
10953         by gcc-3.4 as well.
10954
10955         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
10956
10957 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10958
10959         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
10960         methods which contain array accesses.
10961
10962         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
10963         boundaries. Fixes #58537.
10964
10965         * iltests.il: Add regression test for #58537.
10966
10967 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10968
10969         * mini-x86.c (mono_arch_local_regalloc): Last part of
10970         fix for bug #58633 (releasing register to early).
10971
10972 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
10973
10974         * basic-long.cs: Add new regression test.
10975
10976 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
10977
10978         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
10979         register too early on the chain.
10980
10981 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10982
10983         * mini.c (create_helper_signature): Use a helper function to reduce
10984         the code which needs to be written. Also set the calling convention of
10985         icalls on windows. Fixes #57840.
10986
10987 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
10988
10989         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
10990         exceptions-ppc.c: added helper function to get the instruction address
10991         from a signal handler context.
10992
10993 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10994
10995         * helpers.c: use g_get_tmp_dir. Invokes happyness 
10996         from gonzalo.
10997
10998 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10999
11000         * helpers.c: Add new env variable to pass args to objdump.
11001         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
11002
11003 2004-05-17  Radek Doulik  <rodo@ximian.com>
11004
11005         * Makefile.am (common_sources): added abcremoval.h so it get
11006         disted and daily mono packages on go-mono.com will build again
11007
11008 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
11009
11010         * abcremoval.c: Fixed coding style, added copyright header.
11011
11012         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
11013
11014         * mini.h: Added prototype for abc removal main function.
11015
11016         * build_relations_propagation_table.pl: Added copyright header.
11017
11018 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
11019
11020         * basic-long.cs: reg test for complex ceq_long bug.
11021
11022 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
11023
11024         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
11025         reg in long and clob case (bug #58343). Fixed/added comments.
11026
11027 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
11028
11029         * mini.c (mono_jit_runtime_invoke): Follow new convention
11030         of calling the invoke method with an function pointer.
11031
11032 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
11033
11034         * ChangeLog: Fix author of memory leak patch.
11035
11036 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
11037
11038         * Makefile.am: fix make dist as well...
11039
11040
11041 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
11042
11043         * cfold.c: Made so that conversions from pointer to int4 are no-ops
11044         on archs where pointers are 4 bytes long.
11045
11046         * Makefile.am: Added abcremoval.c source file.
11047
11048         * abcremoval.c: Added abcremoval.c.
11049
11050         * abcremoval.h: Added abcremoval.h.
11051
11052         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
11053
11054         * inssel.brg: Enabled bounds check removal.
11055
11056         * mini.c: Added support for abcrem optimization.
11057
11058         * mini.h: Added abcrem optimization label.
11059
11060         * driver.c: Added support for abcrem optimization.
11061
11062         * propagated_relations_table.def: Added propagated_relations_table.def.
11063
11064 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
11065
11066         * mini.c, cfold.c: fix style.
11067
11068 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11069
11070         * mini.c: handle issue with the low-level implementation of
11071         some long opcodes (bug #54209).
11072
11073 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
11074
11075         * basic.cs: test for my new cmov stuff.
11076
11077 2004-05-13      Patrik Torstensson
11078
11079         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
11080         opt and added peephole documentation.
11081
11082 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
11083
11084         * tramp-ppc.c: rewrote the generic trampoline code.
11085
11086 2004-05-11      Patrik Torstensson
11087
11088         * mini-x86.c: optimize long shl/shr asm code (one less branch)
11089
11090 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
11091
11092         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
11093
11094         * mini.h mini.c dominators.c: Applied patch from Derek Woo
11095         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
11096
11097         * mini.c: Add new icalls for AsAny marshalling.
11098
11099 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
11100
11101         * tramp-ppc.c, mini-ppc.c: more cleanups.
11102
11103 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11104
11105         * mini.c: no warnings.
11106
11107 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11108
11109         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
11110
11111 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
11112
11113         * mini.c: In the thread abort signal handler, if the thread is in the
11114         process of being stoped, don't throw the Abort exception, just stop the
11115         thread.
11116
11117 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
11118
11119         * tramp-ppc.c: removed old code.
11120
11121 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11122
11123         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
11124         do some simple speed optimizations on ppc.
11125
11126 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
11127
11128         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
11129         and large offsets in load/store.
11130
11131 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
11132
11133         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
11134         it causes regressions.
11135
11136 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
11137
11138         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
11139         support.
11140
11141 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
11142
11143         * jit-icalls.c: remove warnings.
11144         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
11145         speedups for unsafe code.
11146
11147 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
11148
11149         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
11150
11151 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
11152
11153         * basic-calls.cs: Add new regression test.
11154
11155         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
11156         more portable.
11157
11158         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
11159
11160         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
11161         is no longer used.
11162
11163 2004-05-06      Patrik Torstensson
11164
11165         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
11166         long reg allocation in any reg (not only eax:edx) and implemented 
11167         long shl/shr ops in asm instead of helpers.
11168
11169 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
11170
11171         * mini-sparc.h: Fix warnings.
11172
11173         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
11174         stack.
11175
11176         * mini-exceptions.c (mono_handle_exception): Call the filter in a
11177         separate statement for clarity.
11178
11179         * mini-sparc.c: Update status.
11180
11181 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
11182
11183         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
11184         here.
11185
11186 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11187
11188         * inssel-ppc.brg: another small pre-release workaround:
11189         we don't do overflow detection for long_sub_un.
11190
11191 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11192
11193         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
11194         (also works around a weird ppc bug: 57957).
11195
11196 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
11197
11198         * tramp-ppc.c: trampoline fixes.
11199
11200 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
11201
11202         * mini-ppc.c: fixed typos.
11203
11204 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11205
11206         * mini-ppc.c, exceptions-ppc.c: more code saves registers
11207         at the top of the stack. Fixed typos. Use a frame registers
11208         for all the methods with exception clauses.
11209
11210 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11211
11212         * exceptions-ppc.c: restore fp registers.
11213
11214 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
11215
11216         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
11217         order from the stack top (moved the stack room to save the
11218         return value for trace after the param area). Fixed corruption
11219         in restoring registers on unwind.
11220
11221 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11222
11223         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
11224
11225 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11226
11227         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
11228         and prolog/epilog for methods that use it. Allow
11229         enough param area room for varargs methods. Fix miguel's
11230         breakage in exception handling.
11231
11232 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11233
11234         * Makefile.am: run genmdesc only on current arch.
11235
11236 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11237
11238         * exceptions-x86.c:
11239         * mini-x86.h: fix the build on windows.
11240
11241 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
11242
11243         * 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.
11244
11245         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
11246
11247         * mini-exceptions.c: New file.
11248         
11249         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
11250         Move some parts of the x86 exception handling code to an 
11251         arch-independent file so it can be shared with other ports.
11252
11253 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
11254
11255         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
11256
11257 2004-04-26  David Waite  <mass@akuma.org>
11258
11259         * driver.c: remove comma from end of enumeration declaration
11260
11261 2004-04-26  Jackson Harper  <jackson@ximian.com>
11262
11263         * driver.c: parse config file before loading first assembly. This
11264         allows the user gac to be enabled/disabled. 
11265         
11266 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
11267
11268         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
11269         simpler mechanism: we do not care what is encoded initially
11270         (branch absolute or relative), we care about the code and its
11271         target.  I kept the old code for reference for now.
11272
11273         The new code tries first to determine if the jump is anywhere in
11274         the -/+32 absolute meg range, if it succeeds, it encodes using the
11275         absolute branch;  If not, it tried to find something in the
11276         relative range, if not, it uses the handle_thunk code. 
11277
11278 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
11279
11280         * exceptions-ppc.c: use the correct ip register on macosx.
11281
11282 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
11283
11284         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
11285
11286 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
11287
11288         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
11289         Raise exception on integer divide by zero by hand since the hw
11290         doesn't support it. Handle NaNs in FP compares.
11291
11292 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
11293
11294         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
11295         code reducing duplication between the platforms and enabled
11296         signal exception handling (on linux for now).
11297
11298 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
11299
11300         * exceptions-ppc.c: more macosx support.
11301
11302 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11303
11304         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
11305
11306 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
11307
11308         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
11309
11310 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11311
11312         * iltests.il: more tests.
11313
11314 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11315
11316         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
11317         vars as well.
11318
11319 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11320
11321         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
11322
11323 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11324
11325         * liveness.c: Mark variables as volatile in all basic blocks reachable
11326         from exception clauses.
11327
11328 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
11329
11330         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
11331         inlining.
11332
11333 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11334
11335         * iltests.il, basic.cs: more tests for regalloc.
11336
11337 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11338
11339         * iltests.il: Some tests for register allocation modifications
11340         I have locally.
11341
11342 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
11343
11344         * exceptions.cs: Add regression test for bug #56782.
11345
11346         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
11347         original stack trace if an exception is rethrown. Fixes #56782. Oh,
11348         the beauty of fixing the same thing in 5 different files...
11349
11350 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
11351
11352         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
11353         methods.
11354
11355 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
11356
11357         * mini.c: Add support for STRWLPARRAY marshalling convention.
11358
11359 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11360
11361         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
11362         to init the context to setup the regs pointer).
11363
11364 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11365
11366         * exceptions-ppc.c: more exceptions work.
11367
11368 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11369
11370         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
11371         not allowed.
11372
11373 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11374
11375         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
11376         can use the memory directly.
11377
11378         * cpu-pentium.md: Update documentation from a post from Zoltan. 
11379
11380         add x86_add_membase, x86_sub_membase, x86_mul_membase
11381
11382 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11383
11384         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
11385         GENERAL_REGS they were also hardcoded for all PPC ports.
11386
11387         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
11388
11389         Remove hard-coded limit for floating point registers, use
11390         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
11391
11392         Notice that in MacOS X calling conventions you can fit a lot more
11393         floating point values in registers, so I should update the PInvoke
11394         test to excercise the passing of floating point values on the
11395         stack (currently broken).
11396         
11397 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
11398
11399         * tramp-ppc.c (create_trampoline_code): Added
11400         JUMP_TRAMPOLINE_SIZE. 
11401         (ppc_magic_trampoline): Follow the pattern from
11402         x86_magic_trampoline: if code is set to zero, return. 
11403         (create_trampoline_code): Always pass MonoMethod to the jump
11404         trampoline, before it was passing a null.
11405         (mono_arch_create_jump_trampoline): Implement the jump stub, could
11406         share the code with mono_arch_create_jit_trampoline. 
11407
11408         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
11409         implemented.
11410         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
11411         implemented.  
11412
11413         * cpu-g4.md: Added length for jmp instruction, the worst case
11414         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
11415         for save_lmf).
11416
11417 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
11418
11419         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
11420
11421 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
11422
11423         * mini.c: Only set bblock->real_offset when adding a new bblock, and
11424         before each IL instruction.
11425
11426         * mini.c (CEE_BOX): Fix warnings.
11427
11428 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11429
11430         * mini.c: removed a few unused vars and extra whitespace.
11431
11432 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
11433
11434         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
11435         checks.
11436         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
11437         index.
11438         (OP_GETCHR): use the above
11439         (CEE_LDELEMA): use the above.
11440
11441         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
11442         version of the generic impl.
11443         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
11444         (CEE_LDELEMA): use the above.
11445
11446 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11447
11448         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
11449         Fixes #56317.
11450
11451         * iltests.il: Added new regression test for #56317.
11452
11453 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11454
11455         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
11456         under NetBSD. Fixes #56450.
11457
11458         * liveness.c (update_gen_kill_set): Fix previous patch.
11459
11460 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11461
11462         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
11463
11464 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
11465
11466         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
11467         ldsfld and ldsflda.
11468
11469         * inssel-sparc.brg: Add more optimizations.
11470
11471         * mini-sparc.c: Replace multiply/divide with shifts if possible.
11472
11473 2004-04-01  Martin Baulig  <martin@ximian.com>
11474
11475         * mini.c (handle_box): New static function; moved the
11476         implementation of CEE_BOX here.
11477         (mono_method_to_ir): Added `constrained_call' variable.
11478         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
11479         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
11480         mono_method_get_constrained() to get the method.
11481
11482 2004-04-01  Martin Baulig  <martin@ximian.com>
11483
11484         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
11485         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
11486         (mono_method_to_ir): We don't need these macros anymore since
11487         mono_class_get_full() already takes care of it. 
11488
11489 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11490
11491         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
11492         use @function (as doesn't accept #function here) and check the return
11493         value of system and stop if fails.
11494
11495 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11496
11497         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
11498
11499 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
11500
11501         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
11502
11503         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
11504
11505         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
11506         #56223.
11507
11508         * basic-long.cs: Add test for negation of Int64.MinValue.
11509
11510 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
11511
11512         * mini-sparc.c: Update status.
11513
11514         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
11515
11516         * exceptions-sparc.c: Fix return value in filters.
11517
11518         * inssel-sparc.brg: Fix register allocation in some rules.
11519
11520 2004-03-28  Martin Baulig  <martin@ximian.com>
11521
11522         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
11523         if neccessary.  
11524
11525 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
11526
11527         * mini-x86.c (mono_arch_patch_code): Fix warnings.
11528         
11529         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
11530         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
11531         remove unused conv_u4 opcode.
11532
11533         * mini-x86.c: Remove valgrind workaround since it slows down things
11534         even when mono is not run under valgrind.
11535
11536 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
11537
11538         * mini-sparc.c: Update status.
11539
11540         * inssel-sparc.brg: Add some optimizations.
11541
11542         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
11543         future delay slot filling. Add support for varargs, tail calls and JMP.
11544
11545         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
11546         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
11547
11548         * inssel.brg: Fix register allocation in OP_ARGLIST.
11549
11550         * inssel.brg: Fix warnings.
11551
11552 2004-03-25  Martin Baulig  <martin@ximian.com>
11553
11554         * mini.c (inflate_generic_field): Removed.
11555         (mini_get_method): Removed, use mono_get_method_full(),
11556         (mini_get_class): Removed, use mono_class_get_full().
11557         (mono_method_to_ir): Pass our generic context to
11558         mono_field_from_token().        
11559
11560 2004-03-25  Martin Baulig  <martin@ximian.com>
11561
11562         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
11563         of a `MonoMethod *'.
11564         (mini_get_method): Take a `MonoGenericContext *' instead
11565         of a `MonoMethod *'.
11566         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
11567         a new local variable called `generic_context' which holds the
11568         current `MonoGenericContext *'; use it to lookup things.
11569
11570 2004-03-24  Martin Baulig  <martin@ximian.com>
11571
11572         * mini.c (mini_get_class): New static method; if we're inside a
11573         generic instance, inflate the class if neccessary.
11574         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
11575
11576 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
11577
11578         * iltests.il: New regression test for #55976.
11579
11580         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
11581         #55976.
11582
11583 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11584
11585         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
11586         output.
11587
11588 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
11589
11590         * liveness.c: Consider SSA stores as well as loads when making vars
11591         volatile.
11592
11593         * exceptions.cs: New regression tests for register allocation.
11594         
11595 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
11596
11597         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
11598         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
11599           domain lock only to protect puntual access to data structures.
11600           Added access lock for sighash, jit_icall_hash_name, 
11601           jit_icall_hash_addr and domain->code_mp.
11602
11603 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
11604
11605         * driver.c: Print SIGSEGV handling method.
11606
11607         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
11608
11609         * mini.c (setup_jit_tls_data): Handle case when this is called
11610         multiple times for a thread.
11611
11612         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
11613         is different from fbxx_un. Fixes #54303. Also use constants instead of
11614         magic numbers in a lot of places.
11615
11616 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
11617
11618         * exceptions.cs: Fix cctor test when --regression is used.
11619
11620 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
11621
11622         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
11623         for Linux/ppc.
11624
11625 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11626
11627         * inssel-ppc.brg: fixed register assignments for some rules.
11628
11629 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11630
11631         * exceptions.cs: Add test for exceptions in static constructors.
11632
11633         * mini.c (mono_jit_compile_method_with_out): Move the calling of
11634         static constructors outside the domain lock. Fixes #55720.
11635
11636 2004-03-17  Martin Baulig  <martin@ximian.com>
11637
11638         * mini.c (get_generic_field_inst): Removed, this'll never happen.
11639         (inflate_generic_field): Take the `MonoMethod *' instead of the
11640         `MonoClass *' and added support for generic method.
11641         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
11642         have a `field->parent->gen_params', only inflate the field if it's
11643         an open constructed type.
11644
11645 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11646
11647         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
11648         exception object instead of the preconstructed ones.
11649
11650 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11651
11652         * mini.c: reverted changed to sigsegv_signal_handler commited
11653         accidentally in the previous patch.
11654
11655 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11656
11657         * mini.c:
11658         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
11659         running --aot with an old assembly.
11660
11661 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
11662
11663         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
11664         point values.
11665
11666         * mini-sparc.c: Add support for v9 branches with prediction.
11667
11668 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
11669
11670         * mini.c (mini_init): #warning is GNUC only
11671
11672         * mini-sparc.h: implement __builtin_frame_address
11673         and __builtin_return_address for Sun C compiler
11674
11675 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
11676
11677         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
11678
11679 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
11680
11681         * basic-calls.cs: Add test for unaligned byref long argument passing.
11682
11683         * mini-ops.h: Add sparcv9 compare and branch instructions.
11684
11685         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
11686         v9 instructions if we have a v9 cpu.
11687
11688         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
11689         registers for global allocation.
11690
11691         * exceptions-sparc.c: Fixes.
11692         
11693 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
11694
11695         * liveness.c (mono_analyze_liveness): Optimized version.
11696
11697         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
11698
11699         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
11700         sparc work.
11701
11702         * basic-float.cs basic-calls.cs: New regression tests.
11703
11704 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
11705
11706         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
11707         sigaltstack implementation.
11708
11709         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
11710         
11711         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
11712         stuff if SIGSEGV_ON_ALTSTACK is not defined.
11713
11714 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
11715
11716         * mini.c: Fix warnings.
11717         
11718         * mini.c (mono_resolve_patch_target): New function which contains the
11719         arch independent part of the patching process.
11720
11721         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
11722         patching code to a separate function.
11723
11724 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
11725
11726         * mini.c (add_signal_handler): ifdef out on Windows
11727
11728 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
11729
11730         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
11731         cpu-sparc.md: Add exception handling support + other fixes.
11732
11733         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
11734         typed GC detection in --version.
11735
11736         * basic.cs exceptions.cs: New regression tests.
11737
11738         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
11739         the arch specific code can store data during a compilation.
11740
11741         * mini-ops.h: Add OP_SETFRET.
11742
11743         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
11744         function, register a separate icall for each arity, so the icalls can
11745         get a wrapper.
11746         
11747         * mini.c (mono_print_tree): Print negative offsets in a more readable
11748         form.
11749         
11750         * mini.c: Make signal handling work on sparc.
11751         
11752         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
11753
11754         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
11755
11756         * jit-icalls.c: Emulate truncl by aintl on solaris.
11757
11758         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
11759
11760 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
11761
11762         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
11763
11764 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
11765
11766         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
11767         a MarshalByRef type, inline a method that performs the check, taking into
11768         account that the object can be a proxy. Also implemented tow new opcodes:
11769         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11770         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
11771         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
11772
11773 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11774
11775         * mini-ppc.c: if a relative branch displacement is too big
11776         but it points to and area reachable with an absolute branch, 
11777         avoid the thunks.
11778
11779 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11780
11781         * mini.c: optimize small copies in cpblk.
11782
11783 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
11784
11785         * basic-calls.cs basic-float.cs: New regression tests.
11786
11787         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
11788         negative offsets from %fp. Implement localloc. Fix local register 
11789         allocation. Fix the case when the this argument needs to be saved to
11790         the stack. Implement some missing opcodes.
11791
11792 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
11793
11794         * mini.c (mini_method_compile): Reenable global regalloc in methods
11795         with exception handlers.
11796
11797         * linear-scan.c (mono_varlist_sort): Fix warning.
11798
11799         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
11800
11801         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
11802         regalloc costs.
11803
11804         * liveness.c: Make all variables uses in exception clauses volatile, to
11805         prevent them from being allocated to registers. Fixes #42136.
11806
11807 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
11808
11809         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
11810         causes regressions.
11811
11812         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
11813         argument to mono_arch_regalloc_cost.
11814
11815         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
11816         precisely.
11817
11818 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
11819
11820         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
11821         Make the cost of allocating a variable to a register arch dependent.
11822
11823         * basic-calls.cs: Fix compilation of tests.
11824         
11825         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
11826         helper function to cut back on the number of #ifdefs needed.
11827
11828         * mini-ppc.c: Fix compilation.
11829
11830         * basic-calls.cs: New regression tests.
11831
11832         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
11833
11834         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
11835         of l0 since that is callee saved.
11836
11837         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
11838         to virtual calls.
11839
11840         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
11841         of delay instruction.
11842
11843         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
11844
11845         * mini.h (MonoCallInst): Add 'virtual' flag.
11846
11847         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
11848
11849 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
11850
11851         * *.cs: New regression tests.
11852
11853         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
11854         work.
11855
11856         * mini.c (mono_runtime_install_handlers): Fix build.
11857
11858         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
11859         'signal_stack_size' members.
11860
11861         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
11862         alternate signal stack.
11863
11864         * exceptions-x86.c: Add stack overflow handling.
11865
11866         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
11867         functions to arch independent code.
11868
11869         * mini.c (mono_print_tree): Print more detailed info for load_membase
11870         opcodes.
11871         
11872 2004-02-23  Martin Baulig  <martin@ximian.com>
11873
11874         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
11875
11876 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
11877
11878         * mini-x86.c: fixed reg allocation for div/rem.
11879
11880 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
11881
11882         * driver.c (mono_main): Report some configuratio options on --version.
11883
11884 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
11885
11886         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
11887         low in the address space. Correctly flush memory in thunks where we
11888         output native code.
11889
11890 2004-02-20  Martin Baulig  <martin@ximian.com>
11891
11892         * mini.c (mini_get_method): New static method; inflate all generic
11893         methods and methods in open generic instances.
11894         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
11895         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
11896
11897 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11898
11899         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
11900
11901         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
11902
11903 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
11904
11905         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
11906
11907         * mini-sparc.c (flushi mono_arch_output_basic_block): make
11908         it compile using Sun's compiler.
11909
11910 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
11911
11912         * 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.
11913
11914         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
11915
11916 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11917
11918         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
11919         code.
11920         * mini-ppc.c: handle calls outside of the allowed range with thunks
11921         allocated using the code manager.
11922         * tramp-ppc.c: use the code manager to hold generated native code.
11923         Fixed the magic trampoline to just patch vtable entries.
11924
11925 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
11926
11927         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
11928         independent file.
11929
11930 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
11931
11932         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
11933         PPC.
11934
11935         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
11936         if we have a working __thread implementation.
11937
11938         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
11939         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
11940
11941 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
11942
11943         * mini-x86.c: Fix compilation under gcc 2.
11944         
11945 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
11946
11947         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
11948         contains a call to the wrapped function.
11949
11950         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
11951         OP_<CALL>_IMM opcodes, and use them under X86.
11952         
11953         * mini.c (mono_jit_find_compiled_method): Fix warning.
11954
11955         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
11956
11957         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
11958
11959         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
11960         functionality to mini.c.
11961
11962         * mini.c (mono_create_jump_trampoline): New function to create a jump
11963         trampoline. Return a compiled method instead of a trampoline if it
11964         exists. Add a cache for jump trampolines.
11965
11966         * mini.c (mono_jit_find_compiled_method): New function to return a
11967         compiled method if it exists.
11968
11969         * mini-x86.c: Call mono_create_jump_trampoline instead of 
11970         mono_arch_create_jit_trampoline.
11971
11972         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
11973         a jump trampoline. Fixes #52092.
11974         
11975 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
11976
11977         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
11978         which is not up-to-date. Add check_corlib_version () instead.
11979
11980         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
11981         have to call it.
11982         
11983         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
11984         since newer valgrind versions do not need it.
11985
11986         * mini.c (mono_jit_compile_method_with_opt): New helper function to
11987         compile a method with a given set of optimizations.
11988
11989         * mini.c: Compile icall wrappers on-demand instead of at startup.
11990
11991         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
11992         wrapper for an icall.
11993
11994 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
11995
11996         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
11997         #54063.
11998
11999         * iltests.il: Add test for non-empty stack before switch instruction.
12000
12001 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
12002
12003         * mini.c: Add support for new stringbuilder marshalling conventions.
12004
12005         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
12006
12007 2004-02-01  Martin Baulig  <martin@ximian.com>
12008
12009         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
12010         in `ginst->mtype_argv'.
12011
12012 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
12013
12014         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
12015         facilitate grepping.
12016
12017 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
12018
12019         * mini.c: fixed buglet in initobj generic implementation for references.
12020
12021 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
12022
12023         * Makefile.am: make the version script conditional.
12024         * jit-icalls.c: handle missing truncl().
12025
12026 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
12027
12028         * exceptions.cs: Add more tests for double->int conversion.
12029
12030         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
12031         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
12032
12033 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
12034
12035         * driver.c: make --verbose --version emit an error
12036         if the loaded corlib doesn't match the runtime version.
12037
12038 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
12039
12040         * mini-ppc.h: export ppc_patch().
12041         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
12042         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
12043         on par or better than on MacOSX.
12044
12045 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
12046
12047         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
12048         mono_lookup_pinvoke_call.
12049
12050         * mini-x86.c: Under windows, the default pinvoke calling convention is
12051         stdcall. Fixes #52834.
12052
12053         * mini.c (optimize_branches): Add an upper bound to the number of
12054         iterations to prevent infinite loops on strange loops. Fixes #53003.
12055
12056 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
12057
12058         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
12059         and ISINST. Fixes #52093.
12060
12061         * objects.cs (test_0_vector_array_cast): New tests.
12062         
12063 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
12064
12065         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
12066         checking in Array.Set ().
12067
12068         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
12069         #52590.
12070
12071         * object.cs (test_0_multi_array_cast): New regression test.
12072
12073 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
12074
12075         * exceptions-ppc.c: fix build on Linux/PPC.
12076
12077 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
12078
12079         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
12080         running under valgrind.
12081         (x86_magic_trampoline): Fix build bustage.
12082
12083         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
12084         negative values as well. This is needed for the encoding of the line number
12085         info, since sometimes the line numbers are not in increasing order.
12086
12087 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
12088
12089         * cpu-pentium.md (localloc): Increase the size of the localloc 
12090         instruction since it is a loop under Win32.
12091
12092         * debug-mini.c (record_line_number): Get rid of unneccesary memory
12093         allocation.
12094
12095 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
12096
12097         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
12098         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
12099         Max Horn (max@quendi.de). Fix file names in comments.
12100
12101 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
12102
12103         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
12104         avoid stack overflow.
12105         (replace_usage): Avoid uninitialized variable warnings.
12106
12107         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
12108         and taking the address of valuetype variables.
12109
12110 2004-01-03  Patrik Torstensson
12111
12112         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
12113         for other purposes than FP later on.
12114
12115 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
12116
12117         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
12118         of tail calls.
12119
12120 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12121
12122         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
12123
12124 2003-12-30  Patrik Torstensson <p@rxc.se>
12125
12126         * mini-x86.h: Decreased number of availiable fp regs.
12127         Solves corner cases with FP spilling.
12128
12129 2003-12-23  Patrik Torstensson <p@rxc.se>
12130
12131         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
12132         for floating point stack tracking / spilling on x86. 
12133         Fixes bug #49012.
12134         
12135         * basic-float.cs: added float mul overflow test.
12136
12137 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
12138
12139         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
12140
12141 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12142
12143         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
12144         supports for cond branches that overflow the immediate
12145         overflow offset. mcs can compile simple programs.
12146
12147 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12148
12149         * exceptions-ppc.c: exception handling support wip:
12150         finally handlers get run on exception.
12151
12152 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
12153
12154         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
12155         profiling.
12156
12157 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12158
12159         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
12160         initial support for stack walking and unwinding.
12161
12162 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
12163
12164         * driver.c (mono_main): Make corlib-out-of-sync message more 
12165         descriptive. Also remove verify_corlib call.
12166
12167 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12168
12169         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
12170         not overlap with other call's arguments, too.
12171
12172 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
12173
12174         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
12175         move to arch-specific code the choice of arch-specific
12176         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
12177         * mini.c: ensure emulation calls will not interleave
12178         with other calls.
12179
12180 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
12181
12182         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
12183         the magic trampoline stack frame is dropped before executing
12184         the new method.
12185
12186 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
12187
12188         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
12189         and integer to fp conversions. Added support for overflowing
12190         arguments on the stack. Reserve a couple more registers as temps.
12191         Added support for aot compilation (as output still needs to be
12192         tweaked, though).
12193
12194 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12195
12196         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
12197         Don't overwrite return register in some corner cases.
12198
12199 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
12200
12201         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
12202         static constructors when AOT compiling.
12203
12204         * driver.c (mono_main): Call mono_check_corlib_version.
12205
12206 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12207
12208         * cpu-g4.md, basic.cs: fixed div target register.
12209
12210 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
12211
12212         * mini-ppc.c, basic.cs: shl_imm fix with test.
12213
12214 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12215
12216         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
12217         structures by value. Misc fixes.
12218         * objects.cs: more tests.
12219
12220 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
12221
12222         * mini-ppc.c: lconv.ovf.i implemented.
12223
12224 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12225
12226         * mini.c:
12227         (mini_init): don't error out if someone already called g_thread_init.
12228
12229 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12230
12231         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
12232         to be any type per the spec. Fix abnormal memory usage when
12233         the same object is repeatedly thrown.
12234
12235 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
12236
12237         * mini.c: check for overruns in IL code.
12238
12239 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
12240
12241         * TODO: Add/remove some todo entries.
12242
12243 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
12244
12245         * driver.c (mono_main): Call mono_verify_corlib.
12246
12247 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
12248
12249         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
12250         This has been moved to mini.c
12251         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
12252         type being casted is marshalbyref it could be a proxy, so instead of
12253         emitting the type check code, emit a call to a runtime method that will
12254         perform the check by calling CanCastTo if needed.
12255
12256 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
12257
12258         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
12259         methods with large stack frames under Win32.
12260
12261 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
12262
12263         * Makefile.am: Distribute regression tests.
12264
12265         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
12266         at the end instead of inserting each variable into the sorted list.
12267
12268         * linear-scan.c (mono_varlist_sort): New helper function.
12269         
12270 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12271
12272         * mini.c: ensure arguments and locals are within bounds.
12273
12274 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12275
12276         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
12277         related fixes.
12278
12279 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12280
12281         * mini.c (mono_cprop_copy_values): Fix crash.
12282
12283         * aot.c: Set verbosity back to 0.
12284         
12285 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12286
12287         * regalloc.c: complete memory leak fix by Laurent Morichetti
12288         (l_m@pacbell.net).
12289
12290 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12291
12292         * driver.c (main_thread_handler): Revert the previous patch.
12293
12294         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
12295         under valgrind.
12296
12297         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
12298         memory from the memory pool.
12299
12300         * driver.c (main_thread_handler): Turn on all optimizations when
12301         --aot is used.
12302
12303         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
12304         an array for better performance.
12305
12306         * regalloc.c (mono_regstate_assign): Fix memory leak.
12307
12308         * debug-mini.c (mono_debug_serialize_debug_info): New function to
12309         serialize the debug info.
12310
12311         * debug-mini.c (mono_debug_add_aot_method): New function to load the
12312         debug info from the serialized representation.
12313
12314         * aot.c: Save debug info into the generated file and load it when 
12315         loading a method.
12316
12317         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12318
12319 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12320
12321         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
12322         More FP-related fixes.
12323
12324 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
12325
12326         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
12327         and register allocation buglet. Hello world now runs.
12328
12329 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12330
12331         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
12332         * tramp-ppc.c: fixed class init trampoline.
12333         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
12334
12335 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12336
12337         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
12338         mini.c: more ppc changes/fixes.
12339
12340 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12341
12342         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
12343         Also optimize the case when the arguments are the same in the caller 
12344         and in the callee.
12345
12346         * iltests.il: Add tests for tail calls with valuetype arguments.
12347
12348 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12349
12350         * mini-ppc.c: fixes for struct return type.
12351
12352 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
12353
12354         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
12355         mono_spillvar_offset() to arch-specific code.
12356
12357 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
12358
12359         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
12360
12361 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12362
12363         * exceptions-x86.c: Fix stack space leaks.
12364         
12365         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
12366         registers from the lmf if the method has save_lmf set.
12367
12368 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
12369
12370         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
12371         of icall wrappers into InvokeInDomain, since these are now per-domain.
12372
12373 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
12374
12375         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
12376         make some opcode emulation and intrinsic ops enabled/disabled 
12377         according to the architecture. More fixes.
12378
12379 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12380
12381         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
12382
12383 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12384
12385         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
12386         arch-specific handling for 'this' and struct return type to
12387         arch-specific code.
12388
12389 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12390
12391         * aot.c: prevent divide by zero error when reporting (it happened with
12392         Accessibility.dll).
12393
12394 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
12395
12396         * mini.h (inst_switch): Remove unused macro.
12397
12398 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12399
12400         * aot.c:
12401         (load_aot_module): free 'info->methods' and 'info' properly. No more
12402         "free(): invalid pointer blah" messages when you have an old aot
12403         compiled assembly.
12404
12405 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
12406
12407         * jit-icalls.c, mini.c: Added support for context static fields.
12408
12409 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12410
12411         * mini.c (mono_method_blittable): Methods which set LastError are not 
12412         blittable either. Fixes #51108.
12413         
12414 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12415
12416         * mini.c: flush icache.
12417         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
12418
12419 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12420
12421         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
12422
12423 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
12424
12425         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
12426         safe on IA32.
12427
12428         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
12429         vararg calls.
12430
12431         * inssel.brg (CEE_MKREFANY): Fix AOT case.
12432
12433 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
12434
12435         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
12436         instruction when the result is discarded.
12437
12438         * iltests.il (test_0_div_regalloc): New regression test.
12439
12440         * arrays.cs: Fix compilation error.
12441
12442 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
12443
12444         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
12445         float rules to inssel-x86.brg: sane architectures with FP registers
12446         don't need to implement these rules.
12447
12448 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12449
12450         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
12451
12452 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12453
12454         * mini.h, inssel-long32.brg: fixed endianess issues in int64
12455         implementation of 32 bit systems.
12456
12457 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12458
12459         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
12460         (Jeroen Zwartepoorte).
12461
12462 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12463
12464         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
12465         the caller and the callee matches.
12466         
12467         * mini.c (mono_method_to_ir): Add comment.
12468
12469         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
12470         signbit is missing on some platforms.
12471
12472 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
12473
12474         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
12475
12476         * mini.c (setup_jit_tls_data): Call the new function.
12477         
12478         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
12479
12480         * mini-x86.c: Add experimental support for fast access to the lmf
12481         structure under NPTL/Linux 2.6.x.
12482
12483 2003-11-06  Martin Baulig  <martin@ximian.com>
12484
12485         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
12486         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
12487         the debugger.
12488
12489 2003-11-02  Martin Baulig  <martin@ximian.com>
12490
12491         * mini.c (inflate_generic_field): New static method.
12492         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
12493         generic instance and the field is declared in a generic type, call
12494         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
12495
12496 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
12497
12498         * mini.h mini.c (mono_method_same_domain): New function to return
12499         whenever the caller and the callee are in the same domain.
12500
12501         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
12502
12503 2003-10-30  Martin Baulig  <martin@ximian.com>
12504
12505         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
12506         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
12507         method parameters.
12508         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
12509         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
12510
12511 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
12512
12513         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
12514         propagation.
12515
12516         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
12517         object here, so it is in the correct appdomain etc.
12518
12519 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
12520
12521         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
12522         already done.
12523         (mono_method_to_ir): Avoid freeing the type created returned from
12524         mono_type_create_from_typespec, since it is put into an internal cache
12525         by the function. Fixes pointer.exe.
12526
12527         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
12528         trampolines for icalls and pinvokes as well. Fixes #33569.
12529
12530 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
12531
12532         * mini.c: Update after appdomain changes.
12533
12534         * mini.c (mono_jit_compile_method_inner): Allways compile native
12535         method wrappers in the root domain, since there can only be one
12536         instance of them, whose address is stored in method->info.
12537
12538 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12539
12540         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
12541         environment variable. Instead detect automatically whenever running
12542         under valgrind using the magic macro RUNNING_ON_VALGRIND from
12543         valgrind.h.
12544
12545 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
12546
12547         * trace.c, trace.h: New files that implement the new trace option
12548         parsing. 
12549
12550         * driver.c: Document new --trace options.
12551
12552         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
12553         mini-x86.c: Apply:
12554
12555         -       if (mono_jit_trace_calls)
12556         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
12557
12558         * mini.h: prototypes.
12559         
12560 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12561
12562         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
12563
12564         * mini.c inssel.brg: Implement typedefbyref opcodes.
12565
12566         * mini.c (mono_jit_compile_method): Remove unused local variable.
12567
12568         * mini.c (mono_jit_compile_method_inner): Ditto.
12569         
12570 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
12571
12572         * tramp-x86.c (x86_class_init_trampoline): Fix build.
12573         
12574         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
12575
12576 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12577
12578         * mini.c (mono_no_aot): Remove unused global variable.
12579
12580         * mini.c: Thread safety fixes.
12581
12582 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12583
12584         * mini.c (mono_create_class_init_trampoline): Add a lock around
12585         class_init_hash_addr.
12586
12587         * arrays.cs (test_0_newarr_emulation): Add new regression test for
12588         #30073.
12589
12590         * mini.c: Decompose the NEWARR instruction before decomposing its
12591         arguments. Fixes #30073.
12592
12593 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
12594
12595         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
12596         convention.
12597
12598 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
12599
12600         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
12601
12602         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
12603
12604         * driver.c: Add support for compiling icall wrappers to --compile.
12605
12606 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
12607
12608         * inssel.brg: The empty value in class->interface_offsets is -1, not
12609         0. Fixes #49287.
12610
12611 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
12612
12613         * objects.cs: New test for 'is' operator on an array of interfaces.
12614
12615 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12616
12617         * tramp-ppc.c: update trampoline code to support jumps
12618         and class initialization.
12619
12620 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
12621
12622         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
12623
12624         * inssel.brg (OP_UNBOXCAST): Fix #46027.
12625
12626         * inssel.brg (OP_UNBOX): Remove unused rule.
12627
12628         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
12629         region instead of one for each method. Fixes #47813.
12630
12631 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
12632
12633         * exceptions.cs (test_0_nested_finally): New regression test for
12634         nested exception handlers.
12635
12636         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
12637
12638         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
12639
12640         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
12641         inlining.
12642
12643         * mini.c (mono_method_check_inlining): Make the inlining limit 
12644         configurable by an environment variable.
12645         
12646         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
12647
12648         * mini.h: Bump AOT file version.
12649
12650         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
12651         token, store the image along with the token, since the token might not 
12652         refer to the same image as the method containing the relocation, 
12653         because of inlining.
12654
12655 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
12656
12657         * mini.c (mono_precompile_assemblies): New function to compile
12658         all methods in all loaded assemblies.
12659
12660         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
12661
12662         * regalloc.h regalloc.c (MonoRegState): Change the type of 
12663         iassign and fassign to int*, since they can contain large negative
12664         values if the register is spilled. Also added some comments. Fixes
12665         #45817.
12666
12667         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
12668         under Win32. Fixes #42964.
12669
12670 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
12671
12672         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
12673
12674         * aot.c: Added support for AOT compiling methods which contain calls
12675         to wrappers. Currently, only remoting-invoke-with-check wrappers are
12676         handled.
12677         
12678         * driver.c (compile_all_methods): Run the compilation in a thread
12679         managed by mono. Fixes #44023.
12680
12681         * mini.c (mono_codegen): Print full method name in verbose output.
12682
12683         * mini-x86.c (mono_arch_patch_code): Fix warning.
12684         
12685         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
12686         jumps, since the method we are jumping to might be domain-specific.
12687
12688         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
12689
12690 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12691
12692         * inssel.brg: string chars are unsigned.
12693
12694 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
12695
12696         * TODO: New todo item.
12697
12698         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
12699         which calls mono_runtime_class_init and patches the call site to
12700         avoid further calls.
12701         (mono_arch_create_class_init_trampoline): New arch specific function 
12702         to create a class init trampoline.
12703         (create_trampoline_code): Generalized so it can create
12704         class init trampolines as well.
12705
12706         * mini.c (helper_sig_class_init_trampoline): New helper variable.
12707         (mono_create_class_init_trampoline): New function to create and cache
12708         class init trampolines.
12709         (mono_find_class_init_trampoline_by_addr): New function to lookup the
12710         vtable given the address of a class init trampoline. Used by the
12711         patching process.
12712         (mono_codegen): Generate a call to a trampoline instead of
12713         mono_runtime_class_init in LDSFLD[A].
12714         (mono_codegen): Add relocations for the new trampoline.
12715         
12716         * mini.h mini-x86.c aot.c: Added a new relocation type: 
12717         MONO_PATCH_INFO_CLASS_INIT.
12718
12719         * mini.h: Bump AOT version number.
12720
12721         * aot.c: Create a copy of the loaded code instead of using the original
12722         so methods which call each other will be close in memory, improving
12723         cache behaviour.
12724         
12725         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
12726         patch since it breaks the regression tests.
12727         
12728         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
12729         for the register saving instruction sequence since the 
12730         frame_state_for function in glibc 2.3.2 don't seem to detect it.
12731
12732 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
12733
12734         * TODO: Fix todo item && remove another.
12735
12736 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
12737
12738         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
12739         previous checkin.
12740
12741         * aot.c: Moved the check for MONO_LASTAOT into the initialization
12742         function of the module.
12743
12744         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
12745         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
12746         --no-aot command line option.
12747
12748 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
12749
12750         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
12751         by Bernie Solomon (bernard@ugsolutions.com).
12752
12753         * inssel.brg: Refactor the interface offset table related code into
12754         its separate functions and add support for the AOT case.
12755
12756 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
12757
12758         * aot.c (mono_aot_get_method_inner): Fix memory leak.
12759         
12760         * aot.c: Added mono_aot_verbose variable and made all debugging
12761         output depend on the value of this variable.
12762
12763         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
12764         method_label and info_label.
12765
12766         * mini.h mini-x86.c aot.c: Added a new relocation type 
12767         MONO_PATCH_INFO_IID for klass->interface_id.
12768
12769         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
12770         the MonoJitInfo structure.
12771
12772         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
12773         a non-root appdomain in shared mode.
12774
12775 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
12776
12777         * aot.c: make aot loader less verbose. Remove free of unused variable.
12778
12779 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
12780
12781         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
12782
12783         * .cvsignore: Added *.dll.
12784
12785         * mini.c (mono_print_tree_nl): New function callable while debugging.
12786
12787         * mini.c (mono_print_code): Export this.
12788
12789         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
12790         patched code.
12791
12792 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
12793
12794         * mini.h (MonoCompile): Added 'jit_info' field.
12795
12796         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
12797         the cfg structure, since it is needed by the AOT compiler.
12798
12799         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12800
12801         * aot.c: A major rewrite. Changes include:
12802         - save exception tables for methods which have them.
12803         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
12804         to g_module_symbol.
12805         - reworked the file format so it is now much smaller and needs
12806         fewer relocation entries.
12807         
12808 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12809
12810         * aot.c (load_aot_module): Fix build bustage on platforms without
12811         Boehm GC.
12812
12813 2003-09-04  Martin Baulig  <martin@ximian.com>
12814
12815         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
12816
12817 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12818
12819         * TODO: Some new optimization ideas.
12820
12821         * aot.c: Move AOT module loading logic here from mono_assembly_open.
12822
12823         * aot.c: Save the optimization flags used to compile the code into
12824         the AOT module.
12825
12826         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
12827         support emitting domain specific code.
12828         
12829         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
12830         no longer domain neutral. It can be made domain neutral by compiling 
12831         with --optimize=shared.
12832
12833         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
12834         between appdomains.
12835
12836         * driver.c mini.h mini.c: New --no-aot debugging option which disables
12837         loading of AOT code.
12838
12839         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
12840         
12841         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
12842         if there is no domain neutrality information.
12843
12844 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
12845
12846         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
12847         format version into the generated library.
12848
12849         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
12850         callee method into the caller since one of them could be shared.
12851
12852         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
12853         system exceptions from AOT code now works.
12854
12855         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
12856         method if it is domain neutral and the callee is not.
12857
12858         * graph.c (cfg_emit_one_loop_level): Fix warning.
12859
12860 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
12861
12862         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
12863         last checkin.
12864
12865 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
12866
12867         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
12868         is needed  by code which is executed before mono_runtime_init ().
12869         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
12870         
12871         * mini.c (mono_thread_abort): Fix warning.
12872         (mono_jit_compile_method): Call static constructor in the AOT case too.
12873
12874         * aot.c (mono_compile_assembly): Fix warning.
12875
12876 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12877
12878         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
12879
12880 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
12881
12882         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
12883
12884         * cpu-pentium.md: Fix the length of call opcodes so they include the
12885         ESP restoring instruction. Fixes #47968.
12886
12887 2003-08-28  Martin Baulig  <martin@ximian.com>
12888
12889         * mini-x86.c (mono_arch_call_opcode): Added support for
12890         MONO_TYPE_GENERICINST.
12891
12892         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
12893
12894 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
12895
12896         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
12897         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
12898
12899         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
12900         metadata_section.
12901
12902 2003-08-26  Martin Baulig  <martin@ximian.com>
12903
12904         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
12905         when reporting an error, set this to the actual error location.
12906         (mono_method_to_ir): Report the correct error location if
12907         get_basic_blocks() returned an error.
12908
12909 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
12910
12911         * mini.c (mono_type_blittable): OBJECT is not blittable.
12912         (mono_method_blittable): Methods which have marshalling descriptors
12913         are not blittable either. Fixes #47842.
12914
12915 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
12916
12917         * driver.c mini.c: Use an environment variable instead of a global 
12918         variable. Also fix the build.
12919
12920         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
12921         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
12922         reporting this. 
12923
12924         * driver.c mini.c: Added --with-valgrind option to turn off some
12925         code which prevents mono from running under valgrind.
12926
12927         * mini.c (mono_emit_call_args): Fixed warning.
12928
12929         * mini.c (mono_emulate_opcode): Fixed warning.
12930
12931 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12932
12933         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
12934         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
12935         regalloc.c, regalloc.h: specify available registers in arch-specific
12936         code and support floats in the regallocator (patch by Laurent Morichetti 
12937         <l_m@pacbell.net>)
12938
12939 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
12940
12941         * mini.c: mono_thread_current() can be called only after
12942         mono_runtime_init(): rearrange code to not call it early on.
12943
12944 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12945
12946         * mini.c: allocate jump tables in the code mempools.
12947
12948 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12949
12950         * mini.c, mini.h: make sure per-thread data allocated by the jit is
12951         freed.
12952
12953 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
12954
12955         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
12956         12 to 16.  This fixes bug #47453.
12957
12958
12959 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12960
12961         * mini-ppc.c: fixed indexed load and unsigned compares.
12962
12963 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
12964
12965         * mini.c: reenabled installation of handler for
12966           thread abort signal.
12967
12968 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12969
12970         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
12971         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
12972         until it's fixed and actually useful.
12973
12974 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
12975
12976         * inssel-long32.brg: couple more opcodes implemented.
12977
12978 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
12979         
12980         * mini-sparc.c: Even more opcodes implemeted.
12981
12982 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
12983
12984         * mini-sparc.c: More opcodes implemented.
12985
12986 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
12987
12988         * mini-sparc.c: More opcodes implemented.
12989
12990 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
12991
12992         * inssel-sparc.brg: Add some needed rules.  Direct
12993         copy from PPC.
12994         * Makefile.am: Use inssel-sparc.brg
12995         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
12996         an assert happy for now.
12997
12998 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
12999
13000         * mini-sparc.c: Fixed compile errors.
13001         * exceptions-sparc.c: Same.  We now produce a mono binary 
13002         on sparc-linux.  Yea.
13003
13004 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
13005
13006         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
13007         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
13008         They compile, but do not work.
13009
13010 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13011
13012         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
13013         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
13014         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
13015         (ct@gentoo.org).
13016
13017 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13018
13019         * mini.c: more opcodes implemented and better support for generics.
13020
13021 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
13022
13023         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
13024         * mini.c, mini.h: first cut at generics support: some new instructions 
13025         added and changed the behaviour of some of the existing ones.
13026
13027 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
13028
13029         * mini.c: Removed definition of metadata_shared mutex here.
13030
13031 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
13032
13033         * mini-x86.c: make vararg calls work for instance methods.
13034
13035 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13036
13037         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
13038         returns the arguments in a separte list, now.
13039
13040 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13041
13042         * aot.c, mini.c: updates for array type representation changes.
13043
13044 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
13045
13046         * mini.c: register function to perform jit shutdown.
13047
13048 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13049
13050         * mini.c: use a faster allocator if possible.
13051
13052 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13053
13054         * aot.c: some cleanups and portability changes.
13055
13056 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13057
13058         * mini.c: use faster allocation for CEE_BOX if possible.
13059
13060 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13061
13062         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
13063         Moved inlined mempcy code to its own function so that is can be
13064         reused. Added an inline memset function as well (optimized initobj).
13065         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
13066
13067 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13068
13069         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
13070
13071 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13072
13073         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
13074         arch code can setup the cpu for CLR execution, if needed.
13075         We use it on x86 to set the precision of FP operations.
13076
13077 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13078
13079         * mini.c: disable some optimizations if we can guess they'll cost too
13080         much for a given method.
13081
13082 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13083
13084         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
13085         
13086 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13087         * mini.h mini.c mini-x86.c: Added instruction level coverage 
13088         info collection support.
13089
13090 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13091
13092         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
13093         is now implemented in the profiling API. Get rid of a couple of
13094         unnecessary global variables.
13095
13096 2003-06-15  Nick Drochak <ndrochak@gol.com>
13097
13098         * basic-long.cs: tests for negative values for bigmul, and unsigned.
13099         * cpu-g4.md: add op_bigmul and op_bigmul_un
13100         * cpu_pentium.md: add op_bigmul_un
13101         * inssel-long32.brg: add rule for unsigned bigmul
13102         * mini-ops.h: define OP_BIGMUL_UN
13103         * mini-x86.c: THE BUG: handle (un)signed properly
13104         * mini.c: choose unsigned opcode if needed.
13105         This set of patches fixes bug #44291
13106
13107 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
13108
13109         * mini.c (optimize_branches): improved to handle all kinds of
13110         conditional branches.
13111
13112 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13113
13114         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
13115         don't raise exceptions.
13116
13117 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13118
13119         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
13120         to arch-specific files.
13121
13122 2003-06-09  Martin Baulig  <martin@ximian.com>
13123
13124         * Makefile.am (libs): Added $(LIBGC_LIBS).
13125
13126 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
13127
13128         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
13129         and OP_ATAN (fixes bug#44293).
13130
13131 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
13132
13133         * Makefile.am, mini-x86.c: rename cpu description array to
13134         pentium_desc, since some compilers define the 'pentium' preprocessor
13135         symbol.
13136
13137 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
13138
13139         * mini.c (mini_select_instructions): add explicit branch if the
13140         following block is not the false target of a conditional branch -
13141         we need this with any optimization that reorder or remove bblocks
13142
13143         * mini.c (optimize_branches): bug fixes
13144
13145 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
13146
13147         * mini.c (mono_method_to_ir): inline static readonly fields
13148
13149         * ssa.c (fold_tree): start cfold support for long (very simple
13150         cases only)
13151
13152         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
13153
13154 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13155
13156         * inssel.brg: fixed memcpy (bug #44219).
13157
13158 2003-06-05  Dick Porter  <dick@ximian.com>
13159
13160         * driver.c: Set the glib log levels to not abort if g_message
13161         recurses.
13162
13163         g_set_prgname() has to happen before mini_init() so that the
13164         process handle gets the info.
13165         
13166 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13167
13168         * driver.c: add intrins to the default optimizations to get wider
13169         exposure.
13170
13171 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13172
13173         * mini.h: some large basic blocks will overflow a 16-bit
13174         integers for symbolic registers.
13175
13176 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13177
13178         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
13179         (mono_arch_output_basic_block): fix bug 43499 
13180
13181 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13182
13183         * mini.c: kill duplicated definition of mono_debug_format.
13184
13185 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13186
13187         * mini-x86.c, arrays.cs: fixed register allocation bug.
13188
13189 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13190
13191         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
13192
13193         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
13194
13195 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13196
13197         * mini.c:
13198         (print_method_from_ip): also print source location information if
13199         available.
13200
13201 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
13202
13203         * mini.c (mono_find_block_region): bug fix in region code
13204         (mini_method_compile): enable removing unreachable code again, but
13205         only in methods without exception clauses.
13206
13207 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
13208
13209         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
13210         Implemented arglist opcode and handling of TypedReference type.
13211         Fixed x86 call convention when a structure is returned.
13212         Minimal support for calling static vararg methods.
13213
13214 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
13215
13216         * mini.c (mini_method_compile):  always remove unreachable code,
13217         because the code in them may be inconsistent  (access to dead
13218         variables for example).
13219
13220 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13221
13222         * driver.c, debug-mini.c: warning fixes.
13223
13224 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13225
13226         * Makefile.am, jit.h, mini.h: install header for embedding mono.
13227
13228 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
13229
13230         * mini.c: thread-static fields are registered in mono_class_vtable(),
13231         so ensure the function is called before checking for them.
13232
13233 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
13234
13235         * mini.c (optimize_branches): fix for bug 43586
13236
13237         * jit-icalls.c (mono_llmult_ovf): added an additional check for
13238         overflow (fixes Bug #43639)
13239
13240 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13241
13242         * mini.c, objects.cs: allow the use of stobj for primitive types.
13243
13244 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13245
13246         * mini.c: be less strict about argument checking until we support
13247         running the verifier.
13248
13249 2003-05-27  Nick Drochak <ndrochak@gol.com>
13250
13251         * basic-long.cs: tests for (ulong)int * (ulong)int also
13252         * mini.c: use the same trick for (ulong)int * (ulong)int
13253
13254 2003-05-27  Nick Drochak <ndrochak@gol.com>
13255
13256         * basic-long.cs: add regression test for (long)int * (long)int
13257         * cpu-pentium.md: add op_bigmul specification
13258         * inssel-long32.brg: add OP_BIGMUL rule
13259         * mini-ops.h: add OP_BIGMUL
13260         * mini-x86.c: register allocator: handle case where src1 needs to be
13261         in EAX.
13262         * mini.c: substitute special BIGMUL opcode in the tree for 
13263         (long)int * (long)int
13264
13265 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13266
13267         * jit-icalls.c: call the type ctor on field access if needed.
13268
13269 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13270
13271         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
13272         to a method (including results of ldelema, bug#43207).
13273
13274 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13275
13276         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
13277         colors to show exception handler blocks.
13278
13279         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
13280         (fix for pinvoke7.cs).
13281
13282 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13283
13284         * mini.h, mini.c: ensure correct initialization order for types that
13285         require it. Prepare for lazy compilation of jit icall wrappers.
13286         Provide a name for opcode emulation to reduce unneeded mallocing.
13287
13288 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13289
13290         * mini-x86.c: better register restoring code and profiling
13291         support for tail calls.
13292
13293 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13294
13295         * mini.h, driver.c: prepare for leaf methods optimization.
13296
13297 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13298
13299         * mini.c: get targets of branches before converting a method.
13300
13301 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
13302
13303         * mini.c (optimize_branches): added some experimental code (disbaled) 
13304
13305 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
13306
13307         * mini.c (optimize_branches): fix branch to branch optimization 
13308
13309         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
13310
13311         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
13312
13313         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
13314
13315         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
13316         if needed.
13317
13318 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13319
13320         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
13321         enable use of interface variables again.
13322
13323         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
13324         I1 to registers because there is no simply way to sign extend 8bit
13325         quantities in caller saved registers on x86.
13326
13327         * inssel-float.brg: set costs of some rules to 2 so
13328         that monobure always select the arch. specific ones if supplied,
13329         regardless of the order we pass the files to monoburg.
13330
13331 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13332
13333         * mini.c, mini-x86.c: since the magic trampoline for jumps
13334         can't patch the code directly, we do it as soon as the
13335         method gets compiled.
13336
13337 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13338
13339         * mini-x86.c, mini.h: introduce a new patching method
13340         to support CEE_JMP and tail calls.
13341         * mini.c: obey tail.call. Don't precompile methods target
13342         of CEE_JMP.
13343         * tramp-x86.c: new trampoline code to handle methods
13344         reached through a jump.
13345
13346 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
13347
13348         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
13349         bit values to registers
13350
13351 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
13352
13353         * mini.c (mono_compile_get_interface_var): share interface
13354         variables if possible.
13355
13356 2003-05-16  Martin Baulig  <martin@ximian.com>
13357
13358         * debug-mini.c (mono_init_debugger): New function to initialize
13359         the debugger.  This is not in the debugger since it needs to
13360         access some of mini's internals.
13361
13362 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13363
13364         * mini.c (mono_method_to_ir): inlining fixes/cleanups
13365
13366 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
13367
13368         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
13369         for value type handling.
13370
13371 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13372
13373         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
13374         (mono_method_check_inlining): enable inlining of all kinds of wrappers
13375
13376 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
13377
13378         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
13379           the constructor through a proxy.
13380
13381 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13382
13383         * jit-icalls.c, inssel.brg: fixes to array element address
13384         calculations.
13385
13386 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
13387
13388         * mini-x86.c (is_regsize_var): allocate pointer to registers
13389
13390 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13391
13392         * driver.c: fixed typo, added intrins to the set of optimizations
13393         tested with regressions.
13394
13395 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13396
13397         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
13398         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
13399         test case.
13400
13401 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
13402
13403         * inssel.brg: remove some common pop instructions without side effects
13404
13405 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13406
13407         * inssel-x86.brg: fixed thinko in int to double conversions.
13408
13409 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13410
13411         * mini.c, jit-icalls.c: added runtime thread-static variable support.
13412
13413 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13414
13415         * inssel-long32.brg: two more missing instructions.
13416
13417 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
13418
13419         * mini.c (mono_emit_call_args): set the cil_code for all arguments
13420         if not already set.
13421
13422 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
13423
13424         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
13425         correctly.
13426
13427         * basic-float.cs: Added tests for negative zero.
13428
13429 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13430
13431         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
13432         a couple of missing operations for long casts, with test cases.
13433
13434 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13435
13436         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
13437
13438 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
13439
13440         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
13441         code size estimation.
13442
13443 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
13444
13445         * mini.c (mono_jit_create_remoting_trampoline): make it work with
13446         abstract methods (fix bug 42542)
13447
13448         * aot.c: add ability to handle array types
13449         
13450 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
13451
13452         * mini.c: Call the _specific versions of the object allocation
13453         functions if possible.
13454
13455 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13456
13457         * driver.c: call setlocale ().
13458
13459 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13460
13461         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
13462         windows build.
13463
13464 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
13465
13466         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
13467
13468         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
13469         wrappers (fix bug 42122)
13470
13471 2003-05-04  Martin Baulig  <martin@ximian.com>
13472
13473         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
13474
13475         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
13476         s/mini_set_defaults/mono_set_defaults/g.
13477
13478 2003-05-04  Martin Baulig  <martin@ximian.com>
13479
13480         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
13481
13482 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13483
13484         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
13485         (reported by Don Roberts).
13486
13487 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
13488
13489         * mini.c: temporarily work around two bugs for this release.
13490
13491 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13492
13493         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
13494         that contains -export-dynamic and it makes using the ld script
13495         useless.
13496         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
13497
13498 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13499
13500         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
13501         specific cpu.
13502
13503 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13504
13505         * mini.c: make sure leave calls all the needed finally blocks,
13506         even when the target jumps out of multiple exception clauses.
13507
13508 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13509
13510         * ldscript, Makefile.am: add linker script to reduce the number of
13511         exported symbols (should also fix the issues with libwine defining
13512         some of the same symbols in io-layer).
13513
13514 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
13515
13516         * driver.c (mini_main): Avoid assertion when no file name is given on 
13517         the command line.
13518
13519 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
13520
13521         * driver.c: added --version/-V command line option.
13522         Added the inline optimization in the regression tests.
13523
13524 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13525
13526         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
13527         to the type in the method signature (fixes bug#42134).
13528
13529 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
13530
13531         * mini.c: when inlining, check this is not null only when needed (bug #42135).
13532
13533 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
13534
13535         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
13536
13537 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13538
13539         * driver.c: fixed bug #42100.
13540
13541 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
13542
13543         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
13544
13545 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13546
13547         * mini.c: moved most of the code required to do inlining to its own
13548         function so it can be reused. Inline also ctors if appropriate.
13549
13550 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
13551
13552         * Makefile.am: Link with -export-dynamic so shared libs loaded by
13553         the runtime can call mono API functions.
13554
13555 2003-04-27  Martin Baulig  <martin@ximian.com>
13556
13557         * debug-mini.c (mono_debug_init_method): Added
13558         `guint32 breakpoint_id' argument; if the method has a breakpoint,
13559         send a notification to the debugger.
13560
13561         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
13562         running in the Mono Debugger, just pass the breakpoint number to
13563         mono_debug_init_method().
13564
13565         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
13566
13567 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
13568
13569         * mini.c: allow some more unsafe compares.
13570
13571 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13572
13573         * mini-x86.c, Makefile.am: make distcheck works (partially from
13574         a patch by Richard Lee <r.h.lee@attbi.com>).
13575         * regset.c, regset.h: removed, they are unused.
13576
13577 2003-04-25  Dick Porter  <dick@ximian.com>
13578
13579         * driver.c: Usage reports the name as 'mono' not 'mini'
13580         * exceptions-x86.c: Build and run on freebsd
13581
13582 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13583
13584         * Makefile.am: install the program with the 'mono' name and
13585         the library as libmono instead of mini and libmini.
13586
13587 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13588
13589         * driver.c: provide the APIs for the embedding interface of the old jit.
13590
13591 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
13592
13593         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
13594
13595 2003-04-23  Martin Baulig  <martin@ximian.com>
13596
13597         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
13598
13599         * driver.c: Added `--debug' command line argument to enable
13600         debugging support.
13601
13602 2003-04-23  Martin Baulig  <martin@ximian.com>
13603
13604         * debug.[ch]: Removed.  The code is now in
13605         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
13606
13607         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
13608         last six months.
13609
13610 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
13611
13612         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
13613
13614 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13615
13616         * mini.c:
13617         (mini_cleanup): moved mono_runtime_cleanup call after the call to
13618         mono_domain_finalize.
13619         (mini_method_compile): use mono_method_profile* if the the option is
13620         enabled.
13621
13622 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
13623
13624         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13625         methods with their wrapper.
13626
13627         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
13628         methods with their wrapper.
13629
13630         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
13631         their wrapper.
13632
13633         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
13634         wrapper.
13635
13636         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
13637         methods.
13638
13639 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
13640
13641         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
13642
13643 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
13644
13645         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
13646         of the mempool. This is slightly faster and uses less memory
13647
13648 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13649
13650         * mini.c: avoid O(n) allocation for variables.
13651
13652 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13653
13654         * mini.c: handle items on the stack after inlining methods.
13655
13656 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13657
13658         * mini.c: make the method->opcode optimization dependent
13659         on MONO_OPT_INSTRINS and do it lazily.
13660
13661 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13662
13663         * driver.c: print overall results at the end of regression run.
13664
13665 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13666
13667         * inssel.brg: don't overwrite symbolic registers.
13668
13669 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13670
13671         * inssel-x86.brg: fix conversion from long to float.
13672
13673 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
13674
13675         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
13676
13677 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
13678
13679         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
13680
13681         * driver.c: Added --print-vtable option as in the old JIT.
13682
13683 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13684
13685         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
13686
13687 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13688
13689         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
13690
13691 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
13692
13693         * mini.c regalloc.c regalloc.h: Fix memory leak.
13694
13695 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
13696
13697         * aot.c (mono_aot_get_method): register all used strings
13698
13699 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13700
13701         * mini.c: always intern strings references with ldstr at compile time.
13702
13703 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13704
13705         * Makefile.am: add BUILT_SOURCES.
13706
13707 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
13708
13709         * driver.c: give a better error message when the assembly to execute
13710         doesn't have an entry point.
13711
13712 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
13713
13714         * Makefile.am: added hack for automake
13715
13716         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
13717         correct sematics.
13718
13719         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
13720
13721 22003-04-07  Martin Baulig  <martin@ximian.com>
13722
13723         * Makefile.am: Added Makefile.am.
13724
13725         * debugger-main.c: Removed, this is now in the debugger where it
13726         belongs.
13727
13728         * mini.pc.in: Call this package `mini' for the moment.
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738