af9fac2f562ac26be8f39241e96c82db403099a5
[mono.git] / mono / mini / ChangeLog
1
2 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
3
4         * mini.c, driver.c: don't include the cil-coff.h header.
5
6 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
7
8         * mini.c: flag places that needs fixes fo soft-float support.
9
10 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
11
12         * mini.h, inssel-float.brg: fix soft-float constant loads on big
13         endian systems (partially from Dean Jenkins, bug #81924).
14
15 2007-08-28  Mark Probst  <mark.probst@gmail.com>
16
17         * mini.c (check_linkdemand): Remove embedded reference object in
18         call to LinkDemandSecurityException.
19         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
20         with an IntPtr instead of a reference object.
21
22 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
23
24         * mini.c (handle_initobj): Handle alignment properly.
25
26         * inssel.brg (mini_emit_memset): Ditto. 
27
28         * inssel.brg (mini_emit_memcpy): Ditto. 
29
30         * inssel-sparc.brg: Ditto.              
31
32         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
33
34 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
35
36         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
37         exceptions raised in unmanaged code. Fixes part of #82594.
38
39 2007-08-24  Mark Probst  <mark.probst@gmail.com>
40
41         * mini.c (mono_method_to_ir), declsec.c
42         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
43
44 2007-08-22  Martin Baulig  <martin@ximian.com>
45
46         * debug-mini.h
47         (MonoDebuggerThreadInfo): New typedef.
48         (mono_debugger_thread_table): New global variable.
49         (mono_debugger_thread_created): New public function.
50         (mono_debugger_thread_cleanup): New public function.
51
52         * debug-debugger.h
53         (MonoDebuggerInfo):
54         - removed `get_current_thread' and `lookup_assembly'.
55         - removed `data_table'.
56         - added `thread_table'.
57
58         * mini.c
59         (mono_thread_start_cb): Call mono_debugger_thread_created().
60         (mono_thread_attach_cb): Likewise.
61         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
62         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
63         initial domain.
64
65         * driver.c (mono_main): Move mono_debug_init() up, before calling
66         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
67
68 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
69
70         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
71         together when passing several arguments of type double (gives a small
72         speedup and saves a few bytes of generated code).
73
74 2007-08-20  Jb Evain  <jbevain@novell.com>
75
76         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
77
78 2007-08-20  Jb Evain  <jbevain@novell.com>
79
80         * mini.c (mono_method_to_ir): throw MethodAccessException
81         and FieldAccessException instead of InvalidProgramException.
82
83 2007-08-20  Mark Probst  <mark.probst@gmail.com>
84
85         * mini.c: CoreCLR security checks.
86
87         * mini.h: Removed MonoSecurityMode (moved to
88         metadata/security-manager.h) and mono_security_mode global var
89         (replaced by set/get functions in security-manager.h).
90
91         * driver.c: Added "core-clr-test" security mode for testing.  Used
92         set-function for setting security mode.
93
94 2007-08-17  Mark Probst  <mark.probst@gmail.com>
95
96         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
97         the new jit_info_table.
98
99         * driver.c: Test code for the new jit_info_table (enabled by the
100         define MONO_JIT_INFO_TABLE_TEST).
101
102 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
103
104         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
105         detection of call <REG> instruction sequence. Fixes build on freebsd.
106
107 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
108
109         * mini-exceptions.c: Fix a warning.
110
111 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
112
113         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
114         stack overflow handling code on amd64 too.
115
116         * mini-exceptions.c (mono_setup_altstack): Make this use 
117         mono_thread_get_stack_bounds ().
118
119         * mini-x86.h: Disable sigaltstack on solaris x86.
120
121 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
122
123         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
124
125 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
126
127         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
128
129 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
130
131         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
132
133         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
134
135 2007-08-03  Neale Ferguson <neale@sinenomine.net>
136
137         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
138         due to alignment.
139
140 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
141
142         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
143         to be emitted (bug #82281).
144
145 2007-08-01  Martin Baulig  <martin@ximian.com>
146
147         Merged the `debugger-dublin' branch.
148
149         * debug-debugger.h (MonoDebuggerInfo):
150         Removed the `old_*' compatibility entries.
151         Added `debugger_version' and `data_table'.
152         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
153         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
154
155         * debug-mini.c
156         (MiniDebugMethodBreakpointInfo): Add `address_list'.
157         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
158         instead of a `gconstpointer'.
159         (mono_debugger_insert_method_breakpoint): Return a
160         `MonoDebugMethodAddressList *'.
161
162 2007-06-28  Martin Baulig  <martin@ximian.com>
163
164         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
165
166 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
167
168         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
169         __builtin_frame_address () since it is broken on older gcc versions.
170
171 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
172
173         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
174         on the stack overflow handling and made the managed stack overflows
175         catchable in most cases using soft guard pages.
176         * exceptions-x86.c: added code to restore the protection in the soft
177         guard pages at the end of exception handling.
178
179 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
180
181         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
182
183 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
184
185         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
186         exception handling.
187
188 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
189
190         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
191         signal handling support until it has been ported to the new mechanism.
192         * mini.c: fixed stack overflow detection and use the new
193         architecture code  to handle signals on the altstack.
194
195 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
196
197         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
198         stack overflows on the alt stack.
199
200 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
201
202         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
203         stack overflows on the alt stack.
204
205 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
206
207         * exceptions-ppc.c: cleanup preparing for altstack support.
208
209 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
210
211         * exceptions-arm.c: cleanup preparing for altstack support.
212
213 2007-07-27  Mark Probst  <mark.probst@gmail.com>
214
215         * mini.c (print_jit_stats): Output hazard pointer stats.
216
217 2007-07-26  Mark Probst  <mark.probst@gmail.com>
218
219         * driver.c, mini.c: Replaced security mode flags with a single
220         enum variable.
221
222 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
223
224         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
225
226 2007-07-25  Mark Probst  <mark.probst@gmail.com>
227
228         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
229         (which doesn't do anything yet) for activating Core CLR
230         (Silverlight) security.
231
232 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
233
234         * mini-codegen.c: work around a possible gcc bug on arm.
235
236 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
237
238         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
239         message for platforms that don't support AOT compilation.
240
241 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
242
243         * mini.h, mini.c, driver.c: temporary smcs hack.
244
245 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
246
247         * mini-arm.h, mini-arm.c: arm EABI fixes.
248
249 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
250
251         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
252         case.
253
254         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
255         trampolines taking a method argument.
256
257         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
258
259         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
260         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
261
262         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
263         JIT compilation throws an exception. Fixes #82050.
264
265 2007-07-19  Mark Probst  <mark.probst@gmail.com>
266
267         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
268         with the MONO_EXCEPTION_ defines.
269
270 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
271
272         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
273         #82117.
274         
275         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
276         the cause of an assertion.
277
278 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
279
280         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
281         removed.
282
283 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
284
285         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
286         assert. Should fix #82103.
287
288 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
289
290         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
291         here too. Fixes #82095.
292
293         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
294         addresses.
295
296         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
297
298         * mini-amd64.h: Enable IMT for amd64.
299         
300         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
301
302 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
303
304         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
305
306 2007-07-12  Mark Probst  <mark.probst@gmail.com>
307
308         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
309         as soon as check_linkdemand sets an exception_type.
310
311 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
312
313         * mini-x86.c: fixed offsets for IMT call sequence.
314         * mini-x86.h: enable IMT again.
315
316 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
317
318         * trace.c (mono_trace_enter_method): Decode MonoType too.
319
320         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
321
322         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
323
324         * mini-amd64.c: Add preliminary IMT implementation.
325         
326 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
327
328         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
329         understand the new IMT-base interface invocation (thanks to
330         Daniel Nauck for the report and the remote debugging session).
331
332 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
333
334         * mini-x86.c: size and speed optimizations for the IMT bsearch.
335
336 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
337
338         * Makefile.am (aotcheck): Make this actually use the AOTed code.
339
340 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
341
342         * mini-trampolines.c: implement AOT IMT support.
343         * mini-x86.h: enable IMT support for wider testing.
344
345 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
346
347         * inssel.brg (emit_imt_argument): Add aot support here.
348
349         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
350
351 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
352
353         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
354         of the IMT implementation, partially from massi, with my
355         implementation of the bsearch sequence. Disabled by default until
356         the AOT code is implemented.
357
358 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
359
360         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
361
362         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
363
364 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
365
366         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
367         arch-independent IMT JIT code from Massimiliano
368         Mantione (massi@ximian.com) with small cleanups from me.
369
370 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
371
372         * Makefile.am: fix svn invocation to get the svn revision to be
373         independent of the local language (build fix).
374
375 2007-07-09  Mark Probst  <mark.probst@gmail.com>
376
377         * mini.c (inline_method): Reset cfg->exception_type if the
378         inlining is aborted.  Fixes: 82049.
379
380 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
381
382         * mini.c: remove assert from exception handling code when exception_ptr
383         is not set.
384
385 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
386
387         * mini.c (mono_codegen): Add an assert.
388
389         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
390         enter and leave code.
391         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
392
393 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
394
395         * mini-ppc.c: fixed memory corruption for localloc(0)
396         (bug #81852).
397
398 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
399         
400         * mini.c: Fix warnings.
401
402 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
403
404         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
405         to emit better double->int conversions.
406
407 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
408
409         * mini.c: the provided Min/Max optimizations are valid for unisgned
410         ints.
411
412 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
413
414         * 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
415
416 2007-06-28  Miguel de Icaza  <miguel@novell.com>
417
418         * mini.c (mono_running_on_valgrind): Add support for reporting the
419         method and  its boundaries to valgrind.
420
421 2007-06-28  Martin Baulig  <martin@ximian.com>
422
423         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
424
425 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
426
427         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
428
429         * generic.2.cs: Add new test case.
430
431 2007-06-25  Martin Baulig  <martin@ximian.com>
432
433         Merged the `debugger-dublin' branch.
434
435         * debug-mini.c
436         (mono_debugger_insert_method_breakpoint): New public method.
437         (mono_debugger_remove_method_breakpoint): Likewise.
438         (mono_debugger_check_breakpoints): New static method.
439         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
440
441         * debug-debugger.h (MonoDebuggerInfo):
442         Renamed (to keep backward compatibility in the vtable):
443         `insert_breakpoint' -> `old_insert_breakpoint'.
444         `remove_breakpoint' -> `old_remove_breakpoint'.
445         `create_string' -> `old_create_string'.
446         `lookup_class' -> `old_lookup_class'.
447         `lookup_type' -> removed; changed into a dummy field.
448         `lookup_assembly' -> `old_lookup_assembly'.
449         Added (same functionality, but different signature):
450         `create_string', `lookup_class', `lookup_assembly'
451         Added new:
452         `get_method_addr_or_bpt', `remove_method_breakpoint',
453         `runtime_class_init'.
454
455         * debug-debugger.c: Merged the `debugger-dublin' branch.
456
457 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
458
459         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
460         well.
461         (peephole_pass): Likewise.
462
463 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
464
465         * driver.c: hopefully make setaffinity work also for ancient
466         versions of linux.
467
468 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
469
470         * driver.c : win32 build fix.
471
472 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
473
474         * driver.c: check for the MONO_NO_SMP env var and bind to a single
475         processor if it is set.
476
477 2007-06-21  Martin Baulig  <martin@ximian.com>
478
479         * debug-mini.h: New file.
480
481         * debug-mini.c
482         (mono_debugger_insert_breakpoint_full): Moved here from
483         ../metadata/mono-debug-debugger.c.
484         (mono_debugger_remove_breakpoint): Likewise.
485         (mono_debugger_breakpoint_callback): Likewise.
486
487 2007-06-15  Raja R Harinath  <rharinath@novell.com>
488
489         * jit-icalls.c (mono_helper_compile_generic_method): Update to
490         changes in MonoGenericClass.
491
492 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
493
494         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
495
496 2007-06-14  Raja R Harinath  <rharinath@novell.com>
497
498         * jit-icalls.c (mono_helper_compile_generic_method): Update to
499         removal of MonoGenericMethod.
500
501 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
502
503         * mini-exceptions.c: hooks for the exception events profiling API.
504
505 2007-06-14  Randolph Chung  <tausq@debian.org>
506
507         * Makefile.ma: Add hppa target.
508         * mini-arch.h: Include mini-hppa.h
509         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
510         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
511         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
512
513 2007-06-14  Randolph Chung  <tausq@debian.org>
514
515         * inssel.brg: Add rules for "chained" compare-branch operations so that
516         a single compare op can affect multiple branches.  Adjust cost for
517         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
518         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
519         cost for some rules so that they can more easily be overridden by
520         per-arch rules (with fixes from lupus).
521         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
522
523 2007-06-13  Randolph Chung  <tausq@debian.org>
524
525         * mini-ops.h: Reorder branch ops so that they match the order of the
526         corresponding CEE_* ops.  The code expects them this way.
527         Add new ops for HPPA target.
528         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
529
530 2007-06-13  Randolph Chung  <tausq@debian.org>
531
532         * mini-exceptions.c: Handle cases where the stack grows towards
533         larger addresses.
534         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
535
536 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
537
538         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
539         counter.
540         * driver.c: explain where a non-matching corlib is found.
541
542 2007-06-13  Mark Probst  <mark.probst@gmail.com>
543
544         * mini.c (print_jit_stats): Output dynamic code allocation stats.
545
546 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
547
548         * mini-exceptions.c: Generate a method profile leave event during
549         an exception to ensure that the profiler gets notified.
550
551 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
552
553         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
554         branch.
555
556         * cpu-amd64.md: Add long_and/or/xor opcodes.
557
558 2007-06-06  Wade Berrier  <wberrier@novell.com>
559
560         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
561         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
562         length of instruction shr_imm (expected 8, got 10)
563
564 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
565
566         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
567
568 2007-06-06  Mark Probst  <mark.probst@gmail.com>
569
570         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
571         MonoInternalHashTable again (fixed bug in the internal hash table
572         code).
573
574 2007-06-06  Mark Probst  <mark.probst@gmail.com>
575
576         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
577         Have to figure out what makes it crash the SWF regression.
578
579 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
580
581         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
582
583 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
584
585         * mini.c: optimize out the type check when storing null in a
586         reference array.
587
588 2007-06-04  Mark Probst  <mark.probst@gmail.com>
589
590         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
591         MonoInternalHashTable.
592
593 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
594
595         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
596         signed integer methods.
597
598 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
599
600         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
601         permanently since the current approach doesn't work.
602
603 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
604
605         * inssel.brg (stmt): Only call delegate->invoke_impl if 
606         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
607
608 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
609
610         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
611         the sreg2==rdx case.
612         
613         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
614         account if it contains a rex prefix.
615         (peephole_pass): Handle OP_FMOVE as well.
616
617 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
618
619         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
620         as it causes regressions.
621
622 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
623
624         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
625         static case as well.
626
627         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
628
629         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
630         (mono_arch_get_this_arg_from_call): Ditto.
631
632         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
633
634         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
635         invoke_impl field.
636
637         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
638         (mono_arch_get_this_arg_from_call): Ditto.
639
640         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
641         
642         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
643         try to create optimized invoke code and use that for further invocations. 
644         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
645
646         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
647
648 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
649
650         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
651         sealed classes or methods.
652         *devirtualization.cs: tests for the new optimization
653
654 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
655
656         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
657         by the update_volatile () function.
658
659 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
660
661         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
662         require it.
663
664         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
665
666 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
667
668         * mini.c: Add configure checks for header files.
669         * mini-x86.c: Add configure checks for header files.
670         * trace.c: Add configure checks for header files.
671         * aot-runtime.c: Add configure checks for header files.
672         * aot-compiler.c: Add configure checks for header files.
673         * driver.c: Add configure checks for header files.
674         * mini-codegen.c: Add configure checks for header files.
675         
676         Code is contributed under MIT/X11 license.
677
678 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
679
680         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
681         icompare_imm -128 + op_iclt. Fixes #81703.
682
683 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
684
685         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
686
687 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
688
689         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
690         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
691         so that all isinst checks now use "interface_bitmap".
692
693 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
694
695         * cpu-amd64.md (jmp): Fix a warning.
696
697         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
698
699         * basic.cs: Add new regression test.
700
701         * basic.cs: Remove test which is now in basic-long.cs.
702
703         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
704
705         * basic-long.cs: Add new test.
706         
707 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
708
709         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
710
711 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
712
713         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
714
715         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
716         places.
717         
718         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
719         throwing code a bit.
720
721         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
722         the exception throwing code a bit.
723
724         * mini-x86.c (get_call_info): Allocate result from a mempool.
725
726 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
727
728         * aot-compiler.c (find_typespec_for_class): Fix the assert.
729
730         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
731
732         * mini.h (MonoCompile): Add 'token_info_hash' field.
733
734         * mini.c: Save token->method associations during compilation so the AOT 
735         compiler can use it.
736         
737         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
738         which reference generic classes and methods.
739
740 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
741
742         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
743
744         * aot-compiler.c (compile_method): Fix a typo in a comment.
745
746         * aot-runtime.c (decode_cached_class_info): Skip generic types.
747
748         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
749         everything generic.
750
751         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
752
753 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
754
755         * mini.h (MonoCompile): Add 'args' field.
756
757         * mini.c (mono_compile_create_vars): Store variables representing the arguments
758         into cfg->args.
759
760         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
761
762 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
763
764         * mini.c (mono_compile_get_interface_var): Remove this unused function.
765
766         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
767
768         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
769         opcodes for some opcodes.
770
771         * mini.h *.brg *.c: Use the new opcodes.
772
773 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
774
775         * mini.h: Bumped aot revision.
776
777         * inssel.brg: modified code generation of type checks for interfaces
778         to use the new "MonoClass.interface_bitmap" instead of the old
779         "MonoClass.interface_offsets".
780
781 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
782
783         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
784
785 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
786
787         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
788         64 bit platforms.
789
790 2007-04-27  Neale Ferguson <neale@sinenomine.net>
791
792         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
793
794 2007-04-27  Wade Berrier  <wberrier@novell.com>
795
796         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
797         mini.h) to fix build.
798
799 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
800
801         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
802         
803         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
804         causes the corlib unit tests to fail.
805
806 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
807
808         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
809
810         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
811
812         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
813         opcodes to the comparison relations.
814
815         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
816         opcodes to their types.
817         
818         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
819
820         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
821         it in cfg->arch.cinfo.
822
823         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
824
825         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
826         cfg->cil_offset_to_bb.
827
828 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
829
830         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
831         created becase of initlocals.
832
833 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
834
835         * mini-alpha.c cpu-alpha.md: More alpha port work from 
836         Sergey Tikhonov <tsv@solvo.ru>.
837
838 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
839
840         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
841
842 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
843
844         * cpu-s390.md (break): Correct the length of break instruction.
845
846 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
847
848         * mini.c: fix a couple of soft-float issues and comments.
849
850 2007-04-15  Miguel de Icaza  <miguel@novell.com>
851
852         * trace.c (is_filenamechar): - is also a filename char.
853
854 2007-04-15  Neale Ferguson <neale@sinenomine.net>
855
856         * mini-s390.c: Correct checking for enum type in return value processing.
857
858 2007-04-14  Raja R Harinath  <rharinath@novell.com>
859
860         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
861         (version.h): Makefile is in the build directory.
862
863 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
864
865         * mini-amd64.h: fix for assertion failure on Solaris/amd64
866
867 2007-04-11  Martin Baulig  <martin@ximian.com>
868
869         * mini.c (can_access_member): Fix handling of generic classes;
870         fixes #81259.
871
872 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
873
874         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
875
876 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
877
878         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
879
880 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
881
882         * mini-codegen.c: make sure the right spill amount is
883         used for fp or integer registers (fixes the float_sub_spill() on ppc).
884
885 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
886
887         * mini-ppc.c: fixes for the fp_branch_nan test.
888
889 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
890
891         * basic.cs: Comment out new test which still fails on ia64.
892
893 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
894
895         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
896
897 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
898
899         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
900
901 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
902
903         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
904         on 64 bit machines. Fixes part of #80738.
905
906         * basic.cs: Add regression test.
907
908 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
909
910         * inssel.brg basic.cs: Revert previous change to fix build.
911
912         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
913         platforms.
914         
915         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
916
917         * basic.cs: Add new regression test.
918
919 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
920
921         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
922         many arguments.
923
924 2007-03-16  Neale Ferguson <neale@sinenomine.net>
925
926         * cpu-s390x.md: Correct length of break instruction.
927
928 2007-03-16  Neale Ferguson <neale@sinenomine.net>
929
930         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
931         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
932
933 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
934
935         * *.c: Begin WIN64 port.
936         * mini.c:  Use correct register in profiler.
937         * mini-amd64.c: No inline assembly on Win64.
938         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
939         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
940         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
941         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
942         mono_arch_ip_from_context for Win64.
943         
944         Contributed under MIT/X11 license.
945
946 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
947
948         * exceptions-amd64.c (seh_handler): Ditto.
949
950         * exceptions-x86.c (seh_handler): Fix a memory leak.
951
952 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
953
954         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
955         mini-s390x.c: fixed peephole optimizations to deal
956         correctly with 1 and 2 byte reload avoidance.
957
958 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
959
960         * cpu-s390.md, cpu-s390x.md: update localloc length.
961
962 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
963
964         * cpu-g4.md: added missing descriptions.
965
966 2007-03-14  Miguel de Icaza  <miguel@novell.com>
967
968         *  Makefile.am: Add support so the tail tests are not executed on
969         PowerPC as that is a known limitation of the PowerPC port.
970
971 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
972
973         * runmdesc.bat:  Move to msvc directory.
974         
975 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
976
977         * runmdesc.bat:  Run executable that was produced by the current
978         target and sent via an argument.
979         
980 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
981
982         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
983         #81102.
984
985         * generics.2.cs: Add regression test.
986
987 2007-03-09  Wade berrier  <wberrier@novell.com>
988
989         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
990
991 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
992
993         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
994         AOT code depends on this.
995
996 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
997
998         * mini.c: more precise tracking of types in the eval stack
999         (part of fix for bug #81044).
1000
1001 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
1002
1003         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
1004
1005         * aot-compiler.c (encode_patch): Remove an obsolete comment.
1006
1007 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
1008
1009         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
1010
1011         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
1012
1013 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
1014
1015         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
1016         a pointer on 64 bit systems. Fixes #80190.
1017
1018         * iltests.il: Add new regression test.
1019
1020 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
1021
1022         * mini.c: inline a constant for Environment.IsRunningOnWindows.
1023
1024 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
1025
1026         * trace.c: Remove an erroneous alignemnt check when tracing.
1027           Fixes --trace on OSX86.
1028
1029 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
1030
1031         * mini-$(arch).h: initialize SP in context for all the archs.
1032
1033 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
1034
1035         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
1036         regressions in the thread tests.
1037
1038 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
1039
1040         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
1041         - fixed implementation of LOCALLOC opcode
1042         - implemented non-un compare for floats
1043         - code cleanup
1044         - implementation of FDIV and CKFINITE opcodes
1045         - fixes for latest mono updates
1046         - additional arch opcodes
1047
1048 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
1049
1050         * Makefile.am: simplify and merge rules for cross-compilation.
1051
1052 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
1053
1054         * local-propagation.c: Actually *apply* the fix for bug 80591...
1055
1056 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
1057
1058         * mini-exceptions.c: backuot part of the last change
1059         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
1060
1061 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
1062         * inssel.brg: Fix bug 59286.
1063
1064
1065 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
1066
1067         * mini-exceptions.c: patch from Zoltan to correctly check for
1068         stack boundaries (using the stack register, not the frame register),
1069         fixes bugs #80724, #79717.
1070
1071 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
1072
1073         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
1074         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
1075
1076         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
1077         presence of frame pointer elimination.
1078
1079 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
1080         
1081         * mini-x86.h: NetBSD UCONTEX_REG defines.
1082
1083 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
1084
1085         * inssel-amd64.brg: Fix amd64 build.
1086
1087 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
1088
1089         * mini.h: remove extern to workaround what looks likes gcc bug 26905
1090         on amd64.
1091
1092 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
1093
1094         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
1095         ends.
1096
1097         * mini-<ARCH>.c: Use mono_is_regsize_var ().
1098
1099 2007-01-30 Mark Mason <mason@broadcom.com>
1100
1101            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
1102            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
1103            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
1104            beginning support for CEE_JMP [not quite working yet]
1105            * tramp-mips.c: LMF handling now works
1106         
1107 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
1108
1109         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
1110
1111         * mini.h (NULLIFY_INS): New macro.
1112
1113 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
1114
1115         * mini.c: statistical profiler fix for windows, patch
1116         from Tor Lillqvist (tml@novell.com).
1117
1118 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
1119         * local-propagation.c: Fix bug 80591.
1120
1121 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
1122
1123         * Makefile.am: put back the --export-dynamic option as with
1124         the previous gmodule flags (thanks to Robert Jordan).
1125
1126 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
1127
1128         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
1129
1130         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
1131         simplify and speed up the local register allocator. Also rename some fields
1132         like iassign->vassign.
1133         
1134         * regalloc.c: Remove some functions which are no longer used since their
1135         inlined version is in mini-codegen.c.
1136         
1137         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
1138
1139         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
1140
1141 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
1142
1143         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
1144         narrowing. Fixes #80622.
1145
1146         * iltests.il: Add new regresssion test. 
1147
1148 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
1149
1150         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
1151         debug-debugger.c, debug-debugger.h: warning fixes.
1152         * driver.c: updated copyright year and made it fit in one line.
1153
1154 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
1155
1156         * aot-runtime.c: updated to use mono-dl instead of gmodule.
1157
1158 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
1159
1160         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
1161
1162         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
1163
1164         * iltests.il: Add new test for bug #80507.
1165
1166 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
1167
1168         * mini-arm.h: use soft-float also on vfp for now.
1169
1170 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
1171
1172         * mini.c: fix some more soft-float issues.
1173
1174 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
1175
1176         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
1177
1178 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
1179         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
1180         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
1181         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
1182
1183 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
1184
1185         * mini-arm.c: typo fix.
1186
1187 2007-01-23  Neale Ferguson <neale@sinenomine.net>
1188
1189         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
1190
1191 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
1192
1193         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
1194         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
1195
1196         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
1197
1198         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
1199
1200         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
1201         
1202         * inssel.brg: Fix a warning.
1203
1204         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
1205
1206         * abcremoval.c ssa.c ssapre.c: Update after this change.
1207         
1208         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
1209
1210         * dominators.c (df_set): Use mono_bitset_union_fast.    
1211
1212 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
1213
1214         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
1215         mini-codegen.c: reduce relocations and memory usage for the cpu
1216         description.
1217
1218 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
1219
1220         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
1221
1222         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
1223         to reduce their size.
1224
1225 2007-01-19 Mark Mason <mason@broadcom.com>
1226
1227         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
1228         * mini-mips.c: more configuration macros, support long conditional branches, additional
1229         asserts, fix epilog instrumentation.
1230         * mini-mips.h: use standard stack walk
1231         * cpu-mips.md: increase size of div, rem and conditional branches
1232         
1233 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
1234
1235         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
1236         to cpu spec data.
1237
1238 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
1239
1240         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
1241         (compile_method): Ditto.
1242
1243         * aot-runtime.c (decode_klass_info): Ditto.
1244
1245         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
1246         needed by the code generated by inssel.brg. Also fix a warning.
1247
1248 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
1249
1250         * mini.c: deal with enums that become genericinsts by
1251         being nested in a generic class (bug #79956).
1252
1253 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
1254
1255         * mini.c: match the generic definition to check for
1256         private access with generic types (bug #78431).
1257
1258 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
1259
1260         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
1261         to make life easier for people cross-compiling that insist on not
1262         using scratchbox.
1263
1264 2007-01-17 Mark Mason <mason@broadcom.com>
1265
1266         * inssel-long.brg: patch to deal with mips missing flags
1267         * inssel-long32-mips.brg: implement overflow checks
1268         * insset-mips.brg: implement overflow checks
1269         * mini-mips.h: implement conditional exception handling
1270         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
1271           Remove unused code, minor cleanups.
1272         * exceptions-mips.c: minor cleanups
1273         * mini-ops.h: add mips conditional exception ops
1274         * cpu-mips.md: add mips conditional exception ops
1275
1276         
1277 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
1278
1279         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
1280         to deal with mips missing of flags.
1281
1282 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
1283
1284         * exceptions-ppc.c: execute fault handlers.
1285
1286 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
1287
1288         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
1289
1290 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
1291
1292         * mini.c: handle also floating point values in initialize_array.
1293
1294 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
1295
1296         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
1297         array initialization and make it conditional on the intrins option.
1298
1299 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
1300
1301         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
1302         relocations and put the patch info names close to the enum definition.
1303
1304 2007-01-15 Mark Mason <mason@broadcom.com>
1305
1306         * basic.cs, exceptions.cs: break up large tests to increase debugability.
1307
1308 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
1309
1310         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
1311
1312 2007-01-12  Raja R Harinath  <rharinath@novell.com>
1313
1314         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
1315
1316 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
1317
1318         * Makefile.am: distribute the mips sources.
1319
1320 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
1321
1322         * mini-codegen.h: handle bug #80489 here, by excluding ecx
1323         directly.
1324
1325 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
1326
1327         * cpu-x86.md: back out for now as this triggers other regressions.
1328
1329 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
1330
1331         * cpu-x86.md: force src1 and dest regpair for long shift instructions
1332         to eax:edx, so ecx can't get allocated to them (bug #80489).
1333
1334 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
1335
1336         * mini.c, mini-exceptions.c: enabled running fault handlers
1337         (bug #80469).
1338
1339 2007-01-03  Miguel de Icaza  <miguel@novell.com>
1340
1341         * driver.c: If nothing fail, do not use the string "failed",
1342         because it makes it very annoying to view test result logs on the
1343         web. 
1344
1345 2006-12-30  Miguel de Icaza  <miguel@novell.com>
1346
1347         * debug-debugger.c (mono_debugger_main): Rename "main" to
1348         "main_method" to prevent a warning.
1349
1350         Remove a warning for unused field.
1351
1352 2006-12-28  Martin Baulig  <martin@ximian.com>
1353
1354         * debug-debugger.c
1355         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
1356
1357 2006-12-22  Martin Baulig  <martin@ximian.com>
1358
1359         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
1360         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
1361         seperate `.mdb_debug_info' section, so we can access it from the
1362         debugger even if the binary is stripped.
1363
1364         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
1365         from the `.mdb_debug_info' here to prevent the linker from
1366         removing that section.
1367
1368         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
1369         mdb-debug-info64.s.
1370
1371 2006-12-19  Robert Jordan  <robertj@gmx.net>
1372
1373         * mini-x86: enable the code to return small structures in
1374         registers for FreeBSD as well. Fixes bug #80278.
1375         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
1376
1377 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1378
1379         * mini-x86.c: align the stack when calling the profiler
1380         function instrumenting the prolog (on OSX).
1381
1382 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
1383
1384         * mini.c: emit a break opcode where Debugger.Break () is called.
1385
1386 2006-12-13  Miguel de Icaza  <miguel@novell.com>
1387
1388         * mini.c (mono_method_to_ir): Provide useful information on this
1389         assert, to prevent others from debugging like I did.
1390
1391 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
1392
1393         * mini.c: enable code which was incorrectly commented
1394         (bug #80235).
1395
1396 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
1397
1398         * mini-x86.c: enable on OSX, too, the code to return small
1399         structures in registers.
1400
1401 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
1402
1403         * mini-x86.c: remove the use of the dynamic code manager here, too.
1404
1405 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
1406
1407         * mini.h, debug-debugger.c, tramp-*.c: fixed 
1408         mono_debugger_create_notification_function() to use
1409         mono_global_codeman_reserve () instead of a dynamic code manager.
1410
1411 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
1412
1413         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
1414         ves_array_element_address() jit icall and use a generated
1415         managed method instead (which is about 4 times faster for a rank 3
1416         array access).
1417
1418 2006-11-29  Mark Mason  <mason@broadcom.com>
1419
1420         * basic-calls.cs: additional tests for passing
1421         structures as function arguments.
1422
1423 2006-11-29  Mark Mason  <mason@broadcom.com>
1424
1425         * mini-mips.h: disable custom exception handling
1426         * mini-mips.c: throw/rethrow should use jalr to call
1427         exception stubs.  Fixed bug with passing structures
1428         by value. More support for tracing floating point
1429         functions.
1430
1431 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1432
1433         * mini.c: fixed typo in the soft-float ldind.r4 handling
1434         (bug #80086).
1435
1436 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
1437
1438         * mini.c, mini.h, driver.c: added --runtime command line
1439         option to select a different runtime than the autodetected one.
1440         * jit.h: added API for embedders to initialize with a specific
1441         runtime version.
1442
1443 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
1444
1445         * mini.c: handle also boxing of r4 values (bug #80024).
1446
1447 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1448
1449         * mini-ppc.c: force indirect calls until we reserve
1450         enough address space for all the generated code.
1451
1452 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
1453
1454         * exceptions-arm.c: workaround bugs in the libc definition
1455         of struct ucontext.
1456
1457 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
1458
1459         * inssel.brg: fixes from me and Mark Mason.
1460
1461 2006-11-23  Dick Porter  <dick@ximian.com>
1462
1463         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
1464         semaphore display now we've fixed the initial value
1465
1466 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1467
1468         * inssel.brg: partially revert the last change to fix the build.
1469
1470 2006-11-21  Mark Mason  <mason@broadcom.com>
1471
1472         * inssel.brg: Add and use compare-and-branch macros to support
1473         architectures that do not have condition code registers (ie. MIPS).
1474         * *-mips.{c,brg,md}: Fix copyright statements
1475
1476 2006-11-20  Mark Mason  <mason@broadcom.com>
1477
1478         * Makefile.am: remove mini-codegen.c from list of MIPS sources
1479         * mini.c: Allow GET_CONTEXT to be specified by the arch port
1480         * mini.h: Added declaration for mono_print_ins()
1481         * mini-codegen.c: added ins_spec initializer for MIPS
1482         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
1483         vreg to be virtual and hreg to be non-virtual.
1484         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
1485         is not yet working/implemented correctly.
1486         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
1487         non-static, fixup calls to print_ins() from other parts in the file.
1488
1489 2006-11-20  Mark Mason  <mason@broadcom.com>
1490
1491         * basic-calls.cs: added tests for passing structures as arguments
1492         to calls.
1493
1494 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
1495
1496         * inssel-long32.brg: optimize signed division by power of two.
1497
1498 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
1499
1500         * mini-arm.c: added support for interworking with thumb code
1501         (mono must be still be built using the ARM instruction encoding).
1502
1503 2006-11-19  Miguel de Icaza  <miguel@novell.com>
1504
1505         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
1506         verifier has different rules for it.   Fixes a few verifier issues
1507         in the test suite.
1508
1509         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
1510         at the end, so people know what happened.
1511
1512 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
1513
1514         * brach-opts.c: in optimize_exception_target() make sure we
1515         are in a catch clause (fixes bug #79871).
1516
1517 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1518
1519         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
1520         more soft-float support fixes.
1521
1522 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
1523
1524         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
1525         that are passed half on the stack and half in registers.
1526
1527 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
1528
1529         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
1530         more mips integration work from Mark E Mason 
1531         <mark.e.mason@broadcom.com>.
1532
1533 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
1534
1535         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
1536         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
1537         tramp-mips.c: added sources for the mips port, not
1538         integrated in the build yet. Contributed by
1539         Mark E Mason <mark.e.mason@broadcom.com>.
1540
1541 2006-11-14  Neale Ferguson <neale@sinenomine.net>
1542
1543         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
1544
1545 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1546
1547         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
1548         put the soft-float rules in its own file since it seems to
1549         break s390 compilation.
1550
1551 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
1552
1553         * mini-arm.c: fixed wrnings.
1554
1555 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
1556
1557         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
1558         inssel-arm.brg: ARM support for soft-float.
1559
1560 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
1561
1562         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
1563         loads and stores of 32 bit fp values.
1564
1565 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
1566
1567         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
1568
1569         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
1570         works. Fixes #79852 and #79463.
1571
1572 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1573
1574         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
1575         more soft-float support WIP and fixes.
1576
1577 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
1578
1579         * mini-arm.c: some VFP updates.
1580
1581 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
1582
1583         * mini-exceptions.c: 0 is a valid local var offset in some
1584         architectures, don't assert (bug #78508).
1585
1586 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
1587
1588         * exceptions-arm.c: fixed off by one error in stack walk code.
1589
1590 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
1591
1592         * mini.h, mini.c: more precise tracking of type load exceptions.
1593
1594 2006-11-03  Robert Jordan  <robertj@gmx.net>
1595
1596         * Makefile.am: [WIN32] Add monow.exe target.
1597         * driver.c: [WIN32] Don't detach the console when debugging.
1598         Fixes bug #79797.
1599         
1600 2006-10-30  Miguel de Icaza  <miguel@novell.com>
1601
1602         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
1603
1604 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
1605
1606         * aot-compiler.c (emit_method_info): Add a case missed earlier.
1607
1608         * driver.c (mini_regression): Fix --regression with AOT.
1609
1610         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
1611
1612 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
1613
1614         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
1615
1616         * mini-sparc.h: Don't use sigaction on sparc/linux.
1617
1618         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
1619
1620         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
1621
1622         * mini-exceptions.c: Add proper include files for getpid ().
1623
1624 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
1625
1626         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
1627         address instead of a MonoJitInfo* to avoid decoding the exception info for the
1628         method.
1629
1630         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
1631         name cache to reduce its size.
1632
1633         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1634
1635 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
1636
1637         * mini-x86.c: Save/restore the current LMF structure more efficiently using
1638         the mono_lmf TLS variable.
1639
1640         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
1641         trampoline lmf frames.  
1642
1643         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
1644
1645 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
1646
1647         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
1648         the mono_lmf TLS variable.
1649
1650         * mini-exceptions.c: Access the LMF structure through accessors.
1651
1652         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
1653         variable instead of in jit_tls->lmf.
1654
1655         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
1656         
1657         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
1658         trampoline lmf frames.
1659
1660         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
1661
1662 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
1663
1664        * mini.c trace.c mini-x86.c: Revert these too.
1665         
1666        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
1667        signature change.
1668
1669 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
1670
1671         * genmdesc.c: removed now dead code.
1672
1673 2006-10-09  Robert Jordan <robertj@gmx.net>
1674
1675         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
1676
1677 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
1678
1679         * mini.h: do not leave gaps in the opcode values.
1680
1681 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
1682
1683         * jit-icalls.h: flag functions as internal here, too.
1684
1685 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
1686
1687         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
1688         functions with the internal attribute.
1689
1690 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
1691
1692         * aot-compiler.c: fclose the file descriptor in the profile read loop.
1693
1694 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
1695
1696         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
1697         for soft-float.
1698
1699 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
1700
1701         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
1702         tail calls as on other platforms.
1703
1704         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
1705
1706         * iltests.il: Add a few tailcall tests.
1707
1708 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
1709
1710         * driver.c: fix loop for old compilers (bug #79521).
1711
1712 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
1713
1714         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
1715
1716         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
1717
1718         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
1719         metadata without any code.
1720
1721         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
1722         more precise debugging information using gdb.
1723
1724 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
1725
1726         * inssel-ia64.brg: Make the helper methods static.
1727
1728 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
1729
1730         * inssel-x86.brg: make the helper methods static.
1731
1732 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
1733
1734         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
1735
1736 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
1737
1738         * mini.c: updates for monoburg changes.
1739         * inssel.brg: make a few helper functions static as they should.
1740
1741 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
1742
1743         * Makefile.am: Move mini-codegen.c to common_sources.
1744
1745 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
1746
1747         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
1748         instructions.
1749         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
1750         mini-ppc.h: port to use the common local register allocator.
1751
1752 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
1753
1754         * mini.h: Remove the comment too then.
1755
1756 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
1757
1758         * mini.h: put back backend.data which is to be used shortly and
1759         doesn't increase the size of MonoInst. If any 64 bit arch aligned
1760         pointers on 4 byte boundaries it'd have much bigger issues running
1761         and you can ifdef it out anyway.
1762
1763 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
1764
1765         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
1766         MonoInst size by 4 bytes on 64 bit machines.
1767
1768 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
1769
1770         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
1771         replacement with more meaningful field names. Arch maintainers, please
1772         check the assigned names are good enough for your arch.
1773
1774 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
1775
1776         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
1777         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
1778
1779 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
1780
1781         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
1782         relocations and memory requirements, put the optimization flags
1783         definitions in their own file.
1784
1785 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
1786
1787         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
1788
1789         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
1790
1791 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
1792
1793         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
1794
1795 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
1796
1797         * inssel.brg: use the correct function to get the size of an item
1798         in an array, given an element class.
1799         * aot-compiler.c: do not access class->class_size directly.
1800
1801 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
1802
1803         * mini.h, debug-mini.c: added a debugging function to print
1804         info about local variables and arguments in a jitted method.
1805
1806 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
1807
1808         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
1809
1810         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
1811
1812 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
1813
1814         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
1815         inner and outer loops when passing vtypes.
1816
1817 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
1818
1819         * mini-ppc.c: take into account the cpu errata for cache flushing
1820         which caused some random errors (bug #79381).
1821
1822 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
1823
1824         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
1825         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
1826
1827 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
1828
1829         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
1830         loaded.
1831
1832         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
1833         freebsd ports tree.
1834
1835         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
1836         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
1837
1838         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
1839         displacement.
1840
1841 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
1842
1843         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
1844
1845 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
1846
1847         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
1848         macro does not have to be changed during debugging.
1849
1850         * 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>.
1851
1852         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
1853
1854         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
1855         
1856         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
1857         MONO_ARCH_NO_EMULATE_MUL is defined.
1858
1859         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
1860
1861         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
1862
1863         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
1864
1865         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
1866         
1867 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
1868
1869         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
1870         stuff to mini-exceptions.c where it is used.
1871
1872         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
1873         setup code, the real one is in mini-exceptions.c.
1874
1875         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
1876         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
1877         some changes from the freebsd ports tree.
1878
1879         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
1880         constants.
1881         
1882         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
1883
1884 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
1885
1886         * mini.c: on Linux, check for /proc to be mounted
1887         (bug# 79351, novell bug#201204).
1888
1889 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
1890
1891         * mini.c: handle cases where pthread_attr_getstack() behaves
1892         incorrectly (bug #78096).
1893
1894 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
1895
1896         * mini-arm.c: support larger stack frames (bug #79272).
1897
1898 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
1899
1900         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
1901
1902         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
1903         tokens.
1904
1905         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
1906         mono_class_from_name () to find a class from its name.
1907
1908         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
1909
1910 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
1911
1912         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
1913
1914 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
1915
1916         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
1917
1918 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
1919
1920         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
1921         callinfo->trampoline.
1922
1923         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
1924         fixes #79271.
1925         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
1926         future.
1927
1928 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
1929
1930         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
1931
1932 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
1933
1934         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
1935         stats.method_trampolines, it is already done by the generic trampoline code.
1936
1937         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
1938         
1939 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
1940
1941         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
1942
1943         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
1944
1945         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
1946
1947         * mini.c (print_jit_stats): Print mscorlib mempool size too.
1948         
1949         * mini.c (print_jit_stats): Print new stats.
1950
1951         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
1952
1953 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
1954
1955         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
1956         Address on two dimensional arrays. Fixes #78729.
1957
1958         * mini.h (MonoCompile): Add a 'skip_visibility' field.
1959
1960         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
1961         a method.
1962
1963         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
1964
1965         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
1966         #79130.
1967         
1968         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
1969         a race condition.
1970         (mini_get_ldelema_ins): Ditto.
1971
1972 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
1973
1974         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
1975         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
1976         Fixes #79213.
1977
1978 2006-08-29 Neale Ferguson <neale@sinenomine.net>
1979
1980         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
1981         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
1982
1983         * exceptions-s390x.c: Cosmetic change.
1984
1985         * tramp-s390.c: Fix warning.
1986
1987         * cpu-s390.md: Correct length of mul_imm.
1988
1989 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
1990
1991         * aot-compiler.c: added binary writer with ELF backend
1992         implementation (only on Linux/x86 for now).
1993
1994 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
1995
1996         * Makefile.am: Don't run net 2.0 AOT tests.
1997
1998         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
1999         (mono_compile_assembly): Skip net 2.0 assemblies as well.
2000
2001         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
2002
2003 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
2004
2005         * aot-compiler.c: simplified and refactored the asm-writing code
2006         to allow different backends.
2007
2008 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
2009
2010         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2011
2012         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
2013         little. Share patches of type TYPE_FROM_HANDLE as well.
2014
2015         * mini.c (mono_patch_info_equal): New helper function.
2016         (mono_patch_info_hash): Ditto.
2017
2018         * aot-compiler.c (emit_method_code): Fix s390 build.
2019
2020         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
2021         is not handled because it is stored as a flag and not as a type ctor. Fixes
2022         #79016.
2023
2024 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
2025
2026         * aot-compiler.c: Fix computation of GOT slot statistics.
2027         
2028         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
2029         Also remove support for not PIC AOT.
2030
2031         * mini.h: Bump AOT file format version.
2032
2033         * objects.cs: Add a test for #78990.
2034
2035         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
2036         (peter.dettman@iinet.net.au). Fixes #79087.
2037
2038         * basic-long.cs: Add a test for the above.
2039
2040 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
2041
2042         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
2043         
2044         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
2045         code somewhat.
2046
2047 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
2048
2049         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
2050         exceptions.
2051
2052 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
2053
2054         * mini.c: Don't verify COM proxy invoke calls
2055         
2056
2057 2006-08-10  Dick Porter  <dick@ximian.com>
2058
2059         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
2060         which process is holding semaphores locked.
2061
2062 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
2063
2064         * mini-ia64.c mini-amd64.c: Fix #79027.
2065
2066         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
2067
2068         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
2069
2070         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
2071         implicit arguments in a vararg call. Fixes #79027.
2072
2073 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
2074
2075         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
2076         (mono_get_array_new_va_signature): Ditto.
2077
2078 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
2079
2080         * aot-runtime.c: Call init_plt lazily.
2081
2082         * inssel-long.brg: Fix unsigned long->int conversion.
2083
2084         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
2085
2086         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
2087         that most data is now in the .rss/.data section.
2088
2089 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
2090
2091         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
2092
2093         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
2094
2095         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
2096
2097         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
2098
2099         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
2100         virtual call. Fixes #79010.
2101
2102         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
2103         and use the result as the this argument in the real call.
2104
2105         * generics.2.cs: Add a new test for #79010.
2106         
2107 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
2108
2109         * mini-x86.c: Fix a warning.
2110
2111         * aot-compiler.c: Add a bunch of statistics.
2112
2113         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
2114
2115 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
2116
2117         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
2118
2119 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
2120
2121         * 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>.
2122
2123 2006-07-13  Miguel de Icaza  <miguel@novell.com>
2124
2125         * mini.c (mono_method_to_ir): Obtain the original method in the
2126         CIL stream and use this to perform validation.
2127
2128         Fixed: #78816
2129
2130 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
2131
2132         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
2133         (mono_arch_call_opcode): Ditto.
2134
2135         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
2136         #78826.
2137
2138         * mini.c (mono_patch_info_dup_mp): New helper function.
2139         
2140         * aot-compiler.c (compile_method): Fix some of the memory allocated during
2141         compilation. Fixes #78827.
2142
2143 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
2144
2145         * declsec.c: Use original security informations for
2146           MONO_WRAPPER_MANAGED_TO_MANAGED.
2147
2148 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
2149
2150         * mini.c: Allow Com Interop methods/classes and
2151         don't verify COM wrapper calls
2152         
2153
2154 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
2155
2156         * inssel-long32.brg: Fix long->i4 checked conversion.
2157
2158         * exceptions.cs: Add a test for the above.
2159
2160 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
2161
2162         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
2163
2164         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
2165         leaks.
2166
2167         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
2168         #78775.
2169
2170 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
2171
2172         * mini.c: Fix solaris/x86 exception handling.
2173
2174         * Makefile.am: Get rid of $(ICU_LIBS).
2175
2176 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
2177
2178         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
2179         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
2180         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
2181
2182         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
2183
2184         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
2185         this function causes a SIGSEGV.
2186
2187 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
2188
2189         * mini.c: Remove unused solaris/x86 includes.
2190
2191 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
2192
2193         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
2194
2195 2006-06-20  Jb Evain  <jbevain@gmail.com>
2196
2197         * cpu-g4.md: fix max length of start_handler instruction.
2198
2199 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
2200         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
2201
2202 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
2203         * ssa.c: Fixed bug 78653 for SSA based deadce.
2204         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
2205         MonoInst.flags, used in SSA based deadce.
2206         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
2207         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
2208
2209 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
2210
2211         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
2212         it can end up using non executable memory on ppc64 systems
2213         running ppc32 userspace (fix from Johannes Berg).
2214
2215 2006-06-14  Dick Porter  <dick@ximian.com>
2216
2217         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
2218         4.1.1
2219
2220 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
2221         * mini.c: Made so that inline is locally disabled if it would
2222         trigger a .cctor, because too many apps depend on this behavior
2223         (which seems to be also the one of the MS CLR).
2224
2225 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
2226
2227         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
2228         No idea why this worked before.
2229
2230         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
2231         which branch to outer exception clauses since they could skip the
2232         inner finally clauses. Fixes #78633.
2233
2234         * exceptions.cs: Add a test for the above.
2235
2236         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
2237         Fixes #78629.
2238
2239         * iltests.il: Add a test for the above.
2240
2241 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
2242
2243         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
2244         after the end of a try bblock, to prevent asserts in mini_method_compile ().
2245
2246         * iltests.il: Add a test for the above.
2247
2248 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
2249
2250         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
2251         
2252         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
2253         methods as instrinsics.
2254
2255 2006-06-09  Wade Berrier <wberrier@novell.com>
2256
2257         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
2258         (simple-cee-ops.h ssapre-mini-ops.h)
2259
2260 2006-06-09  Neale Ferguson <neale@sinenomine.net>
2261
2262         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
2263         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
2264         instruction).
2265         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
2266         * cpu-s390x.md: Fix max. length values for a couple of instructions.
2267
2268 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
2269
2270         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
2271
2272 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
2273
2274         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
2275         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
2276         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
2277         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
2278         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
2279         of opcodes, so that bug 78549 should not happen again.
2280         * ssapre.c: Updated to use the renamed files.
2281
2282 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
2283
2284         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
2285         in OP_ATOMIC_EXCHANGE_I4.
2286
2287 2006-06-07  Wade Berrier <wberrier@novell.com>
2288
2289         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
2290         in mono_debugger_create_notification_function)
2291
2292 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
2293
2294         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
2295         
2296         * mini.c (type_from_stack_type): Disable some changes which do not
2297         seem to work.
2298
2299         * driver.c: Reenable opts.
2300
2301         * mini.h (MonoStackSlot): New structure to keep track of the verification state
2302         of the evaluation stack.
2303         
2304         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
2305         evaluation stack trace at entry to the bblock.
2306
2307         * mini.c (merge_stacks): New function to perform verification of stack merges.
2308         Turned off by default.
2309
2310         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
2311         STACK_MP.
2312         
2313 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
2314
2315         * local-propagation.c: Fixed bug 78549.
2316
2317 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
2318
2319         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
2320
2321 2006-06-02  Miguel de Icaza  <miguel@novell.com>
2322
2323         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
2324         tramp-arm.c, tramp-ia64.c
2325         (mono_debugger_create_notification_function): Update signature to
2326         new signature and use new protocol for creating the notification
2327         function.  
2328
2329         Should fix the build.
2330
2331 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
2332
2333         * exceptions-ppc.c (mono_jit_walk_stack)
2334         (ves_icall_get_frame_info): Fix the build
2335
2336 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
2337
2338         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
2339
2340 2006-05-31  Raja R Harinath  <rharinath@novell.com>
2341
2342         * il2tests.2.il: New file for generics CIL tests.  Add test for
2343         #78019.
2344         * Makefile.am: Update.
2345
2346         Fix #78019
2347         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
2348         to nullable types.
2349
2350 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
2351
2352         * aliasing.c: Fixed bug 78311.
2353
2354 2006-05-29  Martin Baulig  <martin@ximian.com>
2355
2356         * mini-exceptions.c (mono_find_jit_info): When computing the
2357         native offset, check whether we're actually inside the method's
2358         code; call mono_debug_print_stack_frame() to format the frame.
2359         (ves_icall_System_Exception_get_trace): Call
2360         mono_debug_print_stack_frame() to format the stack frame.
2361         (ves_icall_get_trace): Update to the new debugging API.
2362         (mono_jit_walk_stack_from_ctx): Likewise.
2363         (ves_icall_get_frame_info): Likewise.
2364
2365         * mini.c (get_method_from_ip): Use the new debugging API.
2366         (mono_print_method_from_ip): Likewise.
2367
2368         * exceptions-ppc.c
2369         (mono_jit_walk_stack): Use the new debugging API.
2370         (ves_icall_get_frame_info): Likewise.   
2371
2372 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
2373
2374         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
2375
2376 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
2377
2378         * mini.c: Added "limitator" to inline for debugging.
2379
2380 2006-05-24  Martin Baulig  <martin@ximian.com>
2381
2382         * debug-debugger.c (mono_debugger_init): Create a private,
2383         malloc()-based code manager for the notification function and
2384         intentionally leak it on exit.  This fixes the crash-on-exit race
2385         condition.
2386
2387         * tramp-amd64.c
2388         (mono_debugger_create_notification_function): Added
2389         `MonoCodeManager *' argument.
2390
2391         * tramp-x86.c
2392         (mono_debugger_create_notification_function): Added
2393         `MonoCodeManager *' argument.
2394
2395 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
2396
2397         * aliasing.c: Fixed 64 bit issue.
2398         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
2399         default since all known bugs are fixed (one more time!).
2400
2401 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
2402
2403         * mini.c: write barrier support.
2404
2405 2006-05-23  Martin Baulig  <martin@ximian.com>
2406
2407         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
2408         check at the top of the file.
2409
2410 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
2411
2412         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
2413         reverting changes without reason and without changelog entries.
2414
2415 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
2416
2417         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
2418         to a few opcodes. Fixes #78439.
2419
2420         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
2421         consistency with other archs.
2422
2423         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
2424
2425 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
2426
2427         * debug-debugger.c: fix the build.
2428
2429 2006-05-17  Martin Baulig  <martin@ximian.com>
2430
2431         * debug-debugger.c
2432         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
2433         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
2434         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
2435         (debugger_attach): Call GC_mono_debugger_add_all_threads().
2436
2437 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
2438
2439         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
2440
2441 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
2442
2443         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
2444         MONO_TYPE_GENERICINST.
2445         
2446         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
2447         MONO_TYPE_GENERICINST.
2448
2449 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
2450
2451         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
2452         #78325.
2453
2454 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
2455
2456         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
2457         mempool.
2458         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
2459
2460 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
2461
2462         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
2463         mono_trace_cleanup ().
2464
2465         * iltests.il: Fix problem with the newly added test.
2466
2467         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
2468         due to register constraints, free up the previous hreg. Fixes #78314.
2469
2470         * iltests.il: Add new test for #78314.  
2471
2472         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
2473         Interlocked.Add. Fixes #78312.
2474
2475         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
2476         
2477 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
2478
2479         * inssel.brg (mini_emit_virtual_call): Fix a warning.
2480
2481 2006-05-05  Martin Baulig  <martin@ximian.com>
2482
2483         * debug-mini.c (mono_debug_open_block): New method.
2484
2485         * mini-amd64.c
2486         (mono_arch_output_basic_block): Call mono_debug_open_block() at
2487         the beginning of each basic block.
2488
2489         * mini-x86.c
2490         (mono_arch_output_basic_block): Call mono_debug_open_block() at
2491         the beginning of each basic block.
2492
2493 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
2494
2495         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
2496         default until I understand why they break the build on amd64.
2497
2498 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
2499
2500         * mini.c (mini_cleanup): Call mono_cleanup ().
2501
2502         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
2503         errors.
2504
2505 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
2506
2507         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
2508         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
2509         default since all known bugs are fixed, and I cannot reproduce bug
2510         77944... I'm asking Matt Hargett to test again after this commit.
2511
2512 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
2513
2514         * mini-codegen.c: Fixed typo that thrashed inline.
2515
2516 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
2517
2518         * dominators.c (compute_dominators): Avoid using a worklist since
2519         it is not correct in some cases. Instead, iterate over all bblocks as
2520         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
2521
2522 2006-04-28  Miguel de Icaza  <miguel@novell.com>
2523
2524         * mini.c (mono_jit_compile_method_inner): Use
2525         mono_prepare_exception_from_error that resets the value
2526         internally.
2527
2528 2006-04-27  Miguel de Icaza  <miguel@novell.com>
2529
2530         * mini.c: Move the mini_loader_error_to_exception to metadata. 
2531         
2532 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
2533
2534         * aliasing.c: Fixed bug 78210.
2535
2536 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
2537
2538         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
2539         default until all their problems (or the ones they trigger) are fixed.
2540
2541 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
2542
2543         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
2544         
2545         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
2546         as loaded only after resolving patches since that could invoke the same method.
2547
2548         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
2549
2550         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
2551         functions.
2552
2553         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
2554         AOT loader.
2555
2556         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
2557         stack.
2558
2559         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
2560         made from AOT code through the PLT table.
2561
2562         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
2563         holding the plt offset when a call is made to the aot plt trampoline.
2564         
2565 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
2566
2567         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
2568         amd64 AOT support.
2569
2570         * Makefile.am (common_sources): Fix build breakage.
2571
2572         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
2573         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
2574         intra-assembly calls if possible.
2575         
2576         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
2577
2578         * mini-trampolines.c: Handle PLT entries.
2579
2580         * mini.c: Avoid creating a GOT var for calls.
2581
2582         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
2583         from mscorlib code.
2584
2585         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
2586         from mscorlib code.
2587
2588         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
2589         AOT code.       
2590
2591         * mini.h: Bump AOT file format version.
2592         
2593         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
2594         covers more cases.
2595
2596 2006-04-25  Martin Baulig  <martin@ximian.com>
2597
2598         * driver.c: Disable copyprop, consprop and inline when running
2599         inside the debugger.
2600
2601 2006-04-25  Martin Baulig  <martin@ximian.com>
2602
2603         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
2604         with `get_current_thread' and added `detach'.
2605         (MonoDebuggerMetadataInfo): Added `thread_size',
2606         `thread_tid_offset', `thread_stack_ptr_offset' and
2607         `thread_end_stack_offset'.
2608
2609 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
2610
2611         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
2612         aot-runtime.c.
2613
2614         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
2615         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
2616
2617         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
2618
2619         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
2620
2621         * aot.c: Add support for ADJUSTED_IID.  
2622
2623 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
2624
2625         * aot.c (emit_method_order): Don't align method_order_end.
2626
2627         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
2628         the interface ID changes.
2629
2630 2006-04-21  Dick Porter  <dick@ximian.com>
2631
2632         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
2633         cleaning up a thread.  Fixes the new part of bug 77470.
2634
2635 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
2636
2637         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
2638         to managed wrapper.
2639                      
2640 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
2641
2642         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
2643         
2644         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
2645         SIGSEGV. Fixes #78072.
2646
2647         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
2648         unregister our SIGABRT handler.
2649
2650 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
2651
2652         * mini.c: Disabled inline where it can alter the call stack in a
2653         way visible from managed code.
2654         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
2655         default.
2656
2657 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
2658
2659         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
2660         on other platforms. Fixes #78089.
2661
2662 2006-04-13  Martin Baulig  <martin@ximian.com>
2663
2664         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
2665         determine whether we're inside the debugger.
2666
2667         * debug-debugger.h
2668         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
2669
2670 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
2671
2672         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
2673         handler clauses. Fixes #78024.
2674
2675         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
2676         in the CALL_MEMBASE opcodes. Fixes #78088.
2677         (mono_arch_get_vcall_slot_addr): Ditto.
2678
2679 2006-04-10  Martin Baulig  <martin@ximian.com>
2680
2681         * debug-debugger.c: The thread handling code has now been moved
2682         into ../metadata/threads.c.
2683
2684 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
2685
2686         * driver.c (mono_main): Fix --with-gc=none build.
2687
2688         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
2689         (mono_spillvar_offset_float): Ditto.
2690         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
2691         hreg, not when its !global, since on ia64, there is a third category: stacked
2692         registers.      
2693
2694 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
2695
2696         * mini.c: set MonoInst->klass for load field address and a few other
2697         places.
2698
2699 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
2700
2701         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
2702
2703 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
2704
2705         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
2706         the branch opt changes.
2707
2708 2006-04-06  Dick Porter  <dick@ximian.com>
2709
2710         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
2711         
2712         * wapihandles.c (mini_wapi_seminfo): 
2713         * driver.c (mono_main): Add semaphore info option
2714
2715 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
2716
2717         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
2718         branch optimization changes. Fixes #78009.
2719
2720 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
2721
2722         * mini.c: ignore accessibility of methods in managed->native wrappers.
2723
2724 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
2725
2726         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
2727         
2728         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
2729
2730 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
2731
2732         * mini.c: Modify the branch optimizations to preserve the invariant that
2733         the entries inside the in_bb and out_bb arrays are unique.
2734         (mono_unlink_bblock): Avoid creation of new arrays.
2735
2736 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
2737
2738         * mini.c (mono_unlink_bblock): Fix regression caused by previous
2739         change (#77992).
2740
2741 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
2742
2743         * mini.c (optimize_branches): Remove the "optimizations" in
2744         the cbranch1/cbranch2 -> branch cases which were causing several
2745         problems in the past. Fixes #77986.
2746
2747 2006-03-31  Chris Toshok  <toshok@ximian.com>
2748
2749         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
2750         default optimizations :(
2751
2752 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
2753
2754         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
2755         branch.
2756
2757 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
2758
2759         * local-propagation.c: Added comments to structs and removed
2760         "Mono" prefixes from local tree mover types.
2761
2762 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
2763
2764         * Makefile.am (arch_sources): Define this for each architecture so 
2765         libmono_la_SOURCES is defined in one place.
2766
2767 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
2768
2769         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
2770         from handles/.
2771
2772 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
2773
2774         * driver.c: print the GC name supplied by configure.
2775
2776 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
2777
2778         * local-propagation.c: Added tree mover, and moved here all the
2779         local propagation code from mini.c
2780         * mini.c: Added support for treeprop, and moved all the local
2781         propagation code to local-propagation.c
2782         * mini.h: Added support for treeprop
2783         * driver.c: Added support for treeprop, enabled consprop, copyprop,
2784         treeprop, inline and deadce by default
2785         * Makefile.am: Added local-propagation.c
2786
2787 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
2788
2789         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
2790
2791 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
2792
2793         * debug-debugger.c: make it compile without the Boehm GC.
2794
2795 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
2796
2797         * mini.c: fixed issue with mismatch when an icall is registered
2798         with multiple names but same address.
2799
2800 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
2801
2802         * declsec.c, mini-exceptions.c: use write barrier to set reference
2803         fields of managed objects.
2804
2805 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
2806
2807         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
2808         (can_access_internals): Fix a warning.
2809
2810         * mini.c (print_method_from_ip): Rename this to 
2811         mono_print_method_from_ip so it gets exported.
2812
2813         * trace.c: Deal with strings inside StringBuilder's containing garbage
2814         and fix memory leaks. Fixes #77848.
2815
2816 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
2817
2818         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
2819         fixes #77787.
2820
2821 2006-03-16 Neale Ferguson <neale@sinenomine.net>
2822         
2823         * mini-s390.c: Remove OP_X86_TEST_NULL.
2824
2825 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
2826
2827         * mini.c: use the correct GetHashCode() for the moving collector.
2828
2829 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
2830
2831         * liveness.c: Regalloc spill cost tuning.
2832
2833 2006-03-15 Neale Ferguson <neale@sinenomine.net>
2834         
2835         * mini-s390x.h: Correct S390_LONG macro.
2836
2837         * mini-s390x.c: Cleanup unused code.
2838
2839 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
2840
2841         * jit-icalls.h: New file.
2842
2843         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
2844         icalls and include that instead of including jit-icalls.c.
2845
2846         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
2847         OP_X86 opcodes.
2848
2849 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
2850
2851         * mini.c: when checking for member accessibility, also check for
2852         friend assemblies and for explicit interface implementations.
2853
2854 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
2855
2856         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
2857
2858         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
2859
2860         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
2861         common cases are done first.    
2862
2863         * mini-ops.h: Only define platform specific opcodes on the given platform.
2864
2865         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
2866         branch.
2867         
2868 2006-03-14  Martin Baulig  <martin@ximian.com>
2869
2870         Revert Paolo's change from r57348:
2871
2872         * mini.h: don't use gboolean for bitfields.
2873         * mini.c: verifier changes for fields and methods accessibility.
2874
2875 2006-03-13  Neale Ferguson <neale@sinenomine.net>
2876
2877         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
2878
2879         * mini-s390x.c: Fix conv_r_un.
2880
2881         * cpu-s390, cpu-s390x.md: Fix lengths.
2882
2883 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
2884
2885         * mini.c: nested types have access to all the nesting
2886         levels, not just the enclosing types.
2887
2888 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
2889
2890         * mini.c: added a few more verification checks.
2891
2892 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
2893
2894         * liveness.c: Merge optimizations from the linear-il branch.
2895
2896 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
2897
2898         * mini-ia64.c (emit_call): Add a comment.
2899
2900         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
2901
2902         * tramp-ia64.c: Fix some warnings.
2903
2904 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
2905
2906         * mini.h: don't use gboolean for bitfields.
2907         * mini.c: verifier changes for fields and methods accessibility.
2908
2909 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
2910
2911         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
2912         lazy icall wrapper changes.
2913
2914         * dominators.c: Replace all the dominator algorithms with faster
2915         ones from the linear-il branch.
2916
2917         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
2918         the mempool.
2919
2920         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
2921         common cases are done first.
2922
2923         * mini-amd64.c: Fix some warnings.
2924
2925         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
2926         from the mempool.
2927
2928         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
2929         added code.
2930
2931         * mini.h: Add a missing prototype.
2932
2933 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
2934
2935         * mini.c: Compile icall wrappers lazily.
2936
2937         * mini-codegen.c: Use printf instead of g_print since its much faster.
2938
2939         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
2940         function.
2941
2942         * mini.c (optimize_branches): Cache the negative result from 
2943         remove_block_if_useless ().
2944
2945         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
2946         Also fix some bblock linking issues.
2947
2948         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
2949         assembly files.
2950
2951         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
2952
2953         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
2954         accessed fields first, for better cache behavior.
2955         
2956 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
2957
2958         * mini.c: speedup IList<T> array accesses.
2959
2960 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
2961
2962         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
2963         inline_costs counter. Fixes #77190.
2964
2965 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
2966
2967         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
2968         trace messages. Fixes #77706.
2969
2970 2006-03-04  Martin Baulig  <martin@ximian.com>
2971
2972         * tramp-amd64.c, tramp-x86.c
2973         (mono_debugger_create_notification_function): Use
2974         mono_global_codeman_reserve() to allocate a buffer at runtime and
2975         return it.
2976
2977         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
2978
2979         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
2980         notification function at runtime and then call `initialize' in the
2981         `MONO_DEBUGGER__debugger_info' vtable.
2982
2983 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
2984
2985         * iltests.il: Fix a visibility problem.
2986
2987 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
2988
2989         * driver.c, mini.c: add hooks for the counters API.
2990
2991 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
2992
2993         * driver.c: show disabled options.
2994
2995 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
2996
2997         * linear-scan.c: always use cost-driven selection.
2998
2999 2006-02-28  Raja R Harinath  <rharinath@novell.com>
3000
3001         * jit-icalls.c (helper_compile_generic_method): Revert change from
3002         2006-02-24.
3003
3004 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
3005
3006         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
3007
3008 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
3009
3010         * inssel.brg: style fixes, mostly to force the updated monoburg
3011         to run for people using svn.
3012
3013 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
3014
3015         * mini.c: match monoburg changes.
3016
3017 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
3018
3019         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
3020         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
3021         declaration in the header file.
3022
3023 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
3024
3025         * helpers.c: reduce relocations and mem usage.
3026
3027 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
3028
3029         * mini.h, mini-codegen.c: disable logging features if
3030         requested by configure.
3031
3032 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
3033
3034         * mini.c: tiny verifier changes.
3035
3036 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
3037
3038         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
3039         cpu-pentium.md: stack alignment changes for osx/x86,
3040         partially from Geoff Norton <gnorton@customerdna.com>.
3041
3042 2006-02-24  Raja R Harinath  <harinath@gmail.com>
3043
3044         * jit-icalls.c (helper_compile_generic_method): Update to changes
3045         in metadata/class.c.
3046
3047 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
3048         
3049         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
3050         
3051         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
3052         interface calls with large offsets.
3053
3054 2006-02-23  Raja R Harinath  <rharinath@novell.com>
3055
3056         * jit-icalls.c (helper_compile_generic_method): Document the
3057         special-case we depend on so that we can inflate the method twice
3058         with the same context with no bad side-effects.
3059
3060 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
3061
3062         * mini-x86.c, mini-amd64.c: fix for case when xen support
3063         is disabled.
3064
3065 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
3066
3067         * mini-x86.c, mini-amd64.c: generate code to access tls items
3068         in a faster way for Xen systems.
3069
3070 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
3071
3072         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
3073         updates and compilation fixes for the OSX/x86 port, mostly from
3074         Geoff Norton <gnorton@customerdna.com>.
3075
3076 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
3077
3078         * inssel.brg: faster interface call implementation
3079         to sync with the interface_offsets MonoVTable changes.
3080
3081 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
3082
3083         * mini.c: more verification checks.
3084
3085 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
3086
3087         * mini.c: added a few more verification checks.
3088
3089 2006-02-17      Neale Ferguson <neale@sinenomine.net>
3090
3091         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
3092         facility on the processor and use it if available.
3093
3094 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
3095
3096         * driver.c, aot.c, mini.c: throw exception if the IL code is
3097         invalid or unverifiable.
3098
3099 2006-02-17  Raja R Harinath  <rharinath@novell.com>
3100
3101         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
3102         m.StructField.
3103
3104 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
3105
3106         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
3107
3108 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
3109
3110         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
3111         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
3112         handling of instantiated generic valuetypes.
3113
3114 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
3115
3116         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
3117         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
3118         instead.
3119
3120         * generics.2.cs: Revert the nullable reftypes tests.
3121
3122 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
3123
3124         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
3125         using __builtin_frame_address (1) as it doesn't work in the presence
3126         of optimizations. Hopefully fixes #77273.
3127
3128         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
3129         -> generics.cs change as it doesn't work with some automake versions.
3130
3131 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
3132
3133         * mini.c: handle systems that sue a different way to
3134         retrieve the stack address of the current thread.
3135
3136 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
3137
3138         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
3139         it specially in the makefile.
3140
3141         * generics.2.cs: Add tests for nullable reference types.
3142
3143 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
3144
3145         * mini.c: always handle the case when mono_jit_init()
3146         is called in a thread different from the main thread,
3147         confusing libgc (bug #77309).
3148
3149 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
3150
3151         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
3152
3153 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
3154
3155         * mini.c: change optimize_branches () to use a single loop
3156         and introduce a new optimization to simplify some range checks.
3157
3158 2006-02-03  Martin Baulig  <martin@ximian.com>
3159
3160         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
3161         and merged with debugger_thread_manager_add_thread().
3162         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
3163         inform the debugger about the main thread.
3164
3165 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
3166
3167         * basic.cs: Add test for div.un/rem.un constant folding.
3168
3169 2006-02-03  Neale Ferguson <neale@sinenomine.net>
3170
3171         * cpu-s390x.md: correct int_xor_imm length
3172
3173 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
3174
3175         * generics.2.cs: New test for #77442.
3176
3177         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
3178         #77442.
3179
3180 2006-02-02  Martin Baulig  <martin@ximian.com>
3181
3182         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
3183         <mono/metadata/mono-debug-debugger.h>   
3184
3185         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
3186
3187 2006-02-02  Martin Baulig  <martin@ximian.com>
3188
3189         * debug-debugger.h: New header file for debug-debugger.c.
3190
3191         * debug-debugger.c: Big API cleanup; don't run the managed Main()
3192         function is a separate thread anymore; add support for attaching.
3193
3194 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
3195
3196         * tramp-x86.c: Fix a warning.
3197
3198 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
3199
3200         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
3201         on very large methods.
3202
3203         * aot.c (load_patch_info): Fix a warning.
3204
3205 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
3206
3207         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
3208         mini-ops.h: alu membase optimizations.
3209
3210 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
3211
3212         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
3213         to speedup StringBuilder.
3214
3215 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
3216
3217         * dominators.c (mono_compute_natural_loops): Fix detection of
3218         loop body start blocks.
3219
3220         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
3221
3222 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
3223
3224         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
3225         #75145.
3226
3227 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
3228
3229         * aliasing.c: Fixed aliasing issue on 64 bit archs.
3230
3231 2006-01-25  Martin Baulig  <martin@ximian.com>
3232
3233         * debug-debugger.c: Moved the `MonoDebuggerManager' and
3234         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
3235         started to cleanup this file a little bit.
3236
3237 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
3238
3239         * mini.c: optimize a codepath frequently happening in generics code.
3240
3241 2006-01-23  Martin Baulig  <martin@ximian.com>
3242
3243         * Makefile.am: Only compile debug-debugger.c on supported platforms.
3244
3245         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
3246         functions directly.
3247
3248         * driver.c: debug-debugger.c is only available if
3249         `MONO_DEBUGGER_SUPPORTED' is defined.   
3250
3251 2006-01-23  Martin Baulig  <martin@ximian.com>
3252
3253         * debug-debugger.c: Only enable this on platforms where the Mono
3254         Debugger is working (x86 and x86_64).
3255
3256 2006-01-21  Martin Baulig  <martin@ximian.com>
3257
3258         The Mono Debugger is now using the normal `mono' instead of the
3259         `mono-debugger-mini-wrapper' when executing managed code.
3260
3261         * debug-debugger.c: New file; previously known as
3262         debugger/wrapper/wrapper.c.
3263
3264         * debug-mini.c (mono_init_debugger): Removed.
3265
3266         * driver.c (mono_main): Added new `--inside-mdb' command line
3267         argument which is used when running inside the debugger.
3268
3269 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
3270
3271         * liveness.c (mono_analyze_liveness): Remove some unused data
3272         structures.
3273
3274 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
3275
3276         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
3277
3278 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
3279
3280         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
3281         depends on implementation details of monobitset.
3282
3283         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
3284         Fixes #77271.
3285
3286 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
3287
3288         * liveness.c: Update after monobitset changes.
3289
3290 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
3291
3292         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
3293
3294 2006-01-11 Neale Ferguson <neale@sinenomine.net>
3295
3296         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
3297
3298         * mini-s390x.c: Remove warning messages.
3299
3300 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
3301
3302         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
3303
3304 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
3305
3306         * generics.2.cs: Add ldelem/stelem_any test.
3307
3308 2006-01-10 Neale Ferguson <neale@sinenomine.net>
3309
3310         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
3311
3312 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
3313
3314         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
3315         
3316 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
3317
3318         * generics.2.cs: Reenable vtype tests.
3319
3320         * inssel-x86.brg: Remove an icorrect valuetype rule.
3321
3322 2006-01-06 Neale Ferguson <neale@sinenomine.net>
3323
3324         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
3325         initial support for OP_ABS.
3326
3327 2006-01-05 Neale Ferguson <neale@sinenomine.net>
3328
3329         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
3330
3331 2006-01-05 Neale Ferguson <neale@sinenomine.net>
3332
3333         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
3334         conversion and implement LADD/LSUB.
3335
3336         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
3337         architectures.
3338
3339 2006-01-05 Neale Ferguson <neale@sinenomine.net>
3340
3341         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
3342
3343         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
3344         architectures.
3345
3346 2006-01-05 Neale Ferguson <neale@sinenomine.net>
3347
3348         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
3349         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
3350         (stack walk problem).
3351
3352 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
3353
3354         * aot.c (mono_aot_load_method): Fix a warning.
3355
3356 2006-01-03  Neale Ferguson <neale@sinenomine.net>
3357
3358         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
3359
3360 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
3361
3362         * iltests.il: Add test for #77148.
3363
3364         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
3365         #77148.
3366
3367 2006-01-03  Neale Ferguson <neale@sinenomine.net>
3368
3369         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
3370
3371 2006-01-03  Neale Ferguson <neale@sinenomine.net>
3372
3373         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
3374         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
3375
3376         * basic-long.cs: Add lconv-to-r4/r8 tests.
3377
3378 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
3379
3380         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
3381
3382         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
3383         here as on other archs.
3384
3385 2005-12-29 Neale Ferguson <neale@sinenomine.net>
3386
3387         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
3388
3389 2005-12-29 Neale Ferguson <neale@sinenomine.net>
3390
3391         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
3392         
3393         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
3394
3395         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
3396         instrument_prolog; Add memory_barrier instruction.
3397
3398 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
3399
3400         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
3401
3402 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
3403
3404         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
3405
3406         * aliasing.c inssel.brg: Fix warnings.
3407
3408         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
3409         could skip initialization of some parts of memory.
3410
3411         * mini.c mini-ia64.c: Fix warnings.
3412
3413         * inssel-sparc.brg: Add an implementation of lneg which actually works.
3414
3415 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
3416
3417         * aliasing.c (mono_build_aliasing_information): Add a workaround for
3418         a crash seen on sparc.
3419
3420         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
3421         
3422         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
3423
3424 2005-12-21 Neale Ferguson <neale@sinenomine.net>
3425
3426         * mini-ops.h: Add s390_backchain instruction
3427
3428         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
3429
3430         * cpu-s390.md: Add s390_backchain instruction
3431
3432         * mini-s390.c: Significant ABI changes
3433
3434         * mini-s390.h: Cater for zero length structures
3435
3436 2005-12-20 Neale Ferguson <neale@sinenomine.net>
3437
3438         * mini-s390.c: ABI fixes
3439
3440         * inssel-s390.brg: Remove debug statements
3441
3442         * cpu-s390.md: Fix length of ATOMIC_xx operations
3443
3444 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
3445
3446         * basic-float.cs: Add float<->long conversion tests.
3447
3448 2005-12-16 Neale Ferguson <neale@sinenomine.net>
3449
3450         * mini-s390.c: Fix LOCALLOC processing.
3451
3452         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
3453
3454 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
3455
3456         * iltests.il: Add tests for some opcodes not covered by the other
3457         tests.
3458
3459 2005-12-15 Neale Ferguson <neale@sinenomine.net>
3460
3461         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
3462         register loading for Tail processing; Correct trace output.
3463
3464         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
3465
3466         * cpu-s390.md: Correct size of jmp instruction. 
3467
3468 2005-12-13 Neale Ferguson <neale@sinenomine.net>
3469
3470         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
3471
3472 2005-12-13 Neale Ferguson <neale@sinenomine.net>
3473
3474         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
3475           Bring s390 up to current level.
3476
3477 2005-12-12  Zltan Varga  <vargaz@gmail.com>
3478
3479         * generics.2.cs: Disable the newly added tests as they do not work yet.
3480         
3481         * generics.2.cs: Add valuetype tests.
3482
3483 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
3484
3485         * basic-long.cs: Add i4->u8 test.
3486
3487         * objects.cs: Add tests for JIT intrinsic.
3488
3489         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
3490         optimizations lost by a mistake.
3491
3492 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
3493
3494         * basic-long.cs: Remove a test moved to objects.cs.
3495
3496         * arrays.cs: Add more array tests.
3497
3498 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
3499
3500         * arrays.cs: Add new tests for multi-dimensional arrays.
3501
3502 2005-12-06  Raja R Harinath  <rharinath@novell.com>
3503
3504         * Makefile.am (test_sources2): Add generics.2.cs.
3505         (EXTRA_DIST): Add test_sources2.
3506
3507 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
3508
3509         Support for boxing and unboxing nullable types as well as the
3510         isinst operation on nullables, per the CLI ammendment.
3511
3512         * inssel.brg (CEE_ISINST): Special case for nullable
3513
3514         * mini.c (handle_unbox_nullable): new method
3515         (handle_box): Special case for nullable types
3516         (mono_method_to_ir): Call handle_unbox_nullable in correct
3517         places.
3518
3519         * generics.2.cs: New test suite
3520
3521         * Makefile.am: Support for regression tests with generics.
3522
3523 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
3524
3525         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
3526         allocated to registers. Fixes #76800.
3527
3528 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
3529
3530         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
3531
3532 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
3533
3534         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
3535         of platforms.
3536
3537 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
3538
3539         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
3540         objects.cs.
3541
3542         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
3543         
3544         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
3545 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
3546
3547         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
3548         single precision before storing to a single precision location.
3549
3550 2005-11-28  Raja R Harinath  <rharinath@novell.com>
3551
3552         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
3553
3554 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
3555
3556         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
3557         correct files.
3558
3559         * basic.cs: Remove test_0_byte_compares test which was moved to
3560         objects.cs a long time ago.
3561
3562 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
3563
3564         * aliasing.c: Fixed aliasing issue on 64 bit archs.
3565
3566 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
3567
3568         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
3569         handlers are called.
3570
3571         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
3572         throwing code.
3573
3574          * mini-ia64.c: Add support for the throw->branch exception 
3575         optimization.   
3576
3577         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
3578
3579 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
3580
3581         * mini.c: Enabled "fastpath" deadce :-)
3582         
3583 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
3584
3585         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
3586         alias analysis pass to support it.
3587         * mini.h: Likewise.
3588         * ssa.c: Likewise.
3589         * liveness.c: Likewise (liveness computation can use aliasing
3590         information to be more accurate).
3591         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
3592         moreover made so that "--compile-all" uses the given optimization
3593         flags and not the default ones.
3594         * aliasing.c: Alias analysis (new file).
3595         * aliasing.h: Likewise.
3596         * Makefile.am: added "aliasing.c" and "aliasing.h".
3597         
3598 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
3599
3600         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
3601         OP_L opcodes.
3602
3603 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
3604
3605         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
3606         fp >= end_of_stack exit condition, as it is not needed, and it might
3607         become true for fp eliminated frames.
3608
3609 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
3610
3611         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
3612         coded offsets.
3613
3614 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
3615
3616         * mini-arm.c: fixed alignment of doubles/longs to match
3617         the C ABI (bug #76635).
3618
3619 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
3620
3621         * aot.c: fix compilation with --enable-minimal=aot.
3622
3623 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
3624
3625         * mini-arm.c: fixed compatibility with the new
3626         floating point emulator package for compares.
3627
3628 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
3629
3630         * mini.c : reverted sig->pinvoke changes (r51396-51397).
3631
3632 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
3633
3634         * mini-exceptions.c (print_stack_frame): Output to stderr.
3635         (mono_handle_native_sigsegv): Ditto.
3636
3637 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
3638
3639         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
3640         OP_LCONV_TO_OVF_I implementation.
3641
3642         * mini-amd64.c: Add support for the throw->branch exception 
3643         optimization.
3644
3645         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
3646         when the catch clause catches a more general exception, i.e. Object.
3647
3648 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
3649
3650         * cpu-ia64.md: Remove unused opcodes.
3651
3652         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
3653         specific defines for architectures defining USE_SIGACTION.
3654
3655         * mini-ia64.c: Fix some warnings.
3656
3657         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
3658         version seemed to skip a frame.
3659
3660 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
3661
3662         * mini.c: Clean up the usage of sig->pinvoke flag. Now
3663         only calls which are made to native code use this flag.
3664
3665 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
3666
3667         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
3668         varargs methods as well.
3669         
3670         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
3671         which have save_lmf set. Reorganize methods prologs a bit.
3672
3673         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
3674         debugger to the proper place.
3675
3676 2005-10-29  Martin Baulig  <martin@ximian.com>
3677
3678         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
3679         when running inside the debugger until the debugger has support
3680         for it.
3681
3682 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
3683
3684         * mini.h: Fix a warning.
3685
3686 2005-10-24  Miguel de Icaza  <miguel@novell.com>
3687
3688         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
3689         we expose publicly, this returns the string.
3690
3691 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
3692
3693         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
3694         with fp elimination.
3695
3696 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
3697
3698         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
3699         native stacktrace using the glibc 'backtrace' function if available.
3700
3701 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
3702
3703         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
3704
3705         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
3706         handle SIGSEGVs received while in native code.
3707
3708         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
3709         code, call mono_handle_native_sigsegv which will abort the runtime
3710         after printing some diagnostics, instead of converting it into a
3711         confusing NullReferenceException.
3712
3713 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
3714
3715         * cpu-pentium.md: Remove unused opcodes.
3716
3717 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
3718
3719         * mini-amd64.h (MonoLMF): Add rsp field.
3720
3721         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
3722         the lmf too.
3723
3724 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
3725
3726         * mini-codegen.c (get_register_spilling): Fix some warnings.
3727
3728 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
3729
3730         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
3731         elimination during exception handling. Enable fp elimination by
3732         default.
3733
3734         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
3735         elimination.
3736
3737 2005-10-16  Martin Baulig  <martin@ximian.com>
3738
3739         * mini-exceptions.c
3740         (mono_debugger_run_finally): New public method for the debugger.
3741
3742 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
3743
3744         * debug-mini.c (mono_debug_init_method): Fix warning.
3745
3746         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
3747         the 'exname' parameter const to fix some warnings.
3748
3749 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
3750
3751         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
3752         introduced by the previous patch.
3753
3754 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
3755
3756         * basic-float.cs: Add test for precision of float arithmetic.
3757
3758         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
3759         when loading/storing single values from/to memory.
3760
3761         * mini.c (mono_jit_compile_method_with_opt): Create the function
3762         pointers in the correct domain.
3763
3764 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
3765
3766         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
3767         introduced by previous patch.
3768         
3769         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
3770         when out_filter_idx is NULL.
3771
3772         * mini-exceptions.c: Don't run filter clauses twice during exception
3773         handling. Fixes #75755.
3774
3775 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
3776
3777         * aot.c: Add support for ldflda wrappers.
3778
3779         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
3780         #75902.
3781
3782 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
3783
3784         * mini.c, mini.h: do not consider exception handlers blocks when
3785         setting up interface variables.
3786
3787 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
3788
3789         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
3790
3791 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
3792
3793         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
3794         causes a regression.
3795
3796         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
3797
3798 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
3799
3800         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
3801         of the OP_P definitions.
3802
3803         * TODO: Add a proposal for dealing with the CEE/OP mess.
3804
3805         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
3806         optimizations from the x86 port.
3807
3808         * cpu-amd64.md: Ditto.
3809
3810         * basic.cs basic-long.cs: Add tests.
3811
3812 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
3813
3814         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
3815         Patrik Torstensson's implementation of my exception-handling
3816         optimization idea, when the exception object is not used
3817         (bug #62150).
3818
3819 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
3820
3821         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
3822         of the mul_imm optimizations from the old jit.
3823
3824 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
3825
3826         * mini.c, liveness.c: patch by Patrik Torstensson and
3827         Zoltan Varga to improve performance in methods with
3828         exception clauses.
3829
3830 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
3831
3832         * driver.c: Remove 'Globalization' entry from --version.
3833
3834 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
3835
3836         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
3837         there is a profiler interested in JIT events.
3838
3839         * aot.c: Load profile files produced by the AOT profiling module, and
3840         reorder methods based on the profiling info. Add a 'method_order' table
3841         to the AOT file to make mono_aot_find_jit_info work with the reordered
3842         methods.
3843
3844         * mini.h: Bump AOT file version info.
3845
3846 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
3847
3848         * mini-arm.h: work around what looks like a gcc bug when optimizations
3849         are enabled.
3850
3851 2005-09-28  Raja R Harinath  <rharinath@novell.com>
3852
3853         * Makefile.am (AM_CFLAGS): Don't use += to append inside
3854         conditionals.  Use ...
3855         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
3856
3857 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
3858
3859         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
3860         to determine the amount of memory to copy when passing valuetypes.
3861
3862         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
3863         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
3864
3865 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
3866
3867         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
3868         information about aot.
3869
3870 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
3871
3872         * *.c: Replace the use of {Enter,Leave}CriticalSection with
3873         macros. This will allow a deadlock debugger to easily be plugged
3874         in.
3875
3876 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
3877
3878         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
3879
3880 2005-09-27  Raja R Harinath  <rharinath@novell.com>
3881
3882         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
3883         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
3884         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
3885         ($(arch_built)) [CROSS_COMPILING]: Error out.
3886
3887 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
3888
3889         * aot.c: Add support for the no_special_static flag for classes.
3890
3891 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
3892
3893         * Reapply reverted patches.
3894
3895         * *: Revert r50174 as well.
3896
3897         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
3898
3899 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
3900
3901         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
3902
3903 2005-09-23  Miguel de Icaza  <miguel@novell.com>
3904
3905         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
3906         part of the SIG_HANDLER_SIGNATURE.  
3907
3908 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3909
3910         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
3911         statistics.
3912
3913         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
3914         introduced by previous patch.
3915
3916 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
3917
3918         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
3919         saved registers too.
3920
3921         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
3922         upon the information returned by get_call_info ().
3923         
3924         * mini-x86.c (add_float): Fix stack size calculation.
3925         (mono_arch_call_opcode): Rewrite this so it works based up the
3926         information returned by get_call_info ().
3927         (mono_arch_get_this_vret_args): Ditto.
3928
3929 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
3930
3931         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
3932         in cinfo to determine the registers which need to be used.
3933
3934 2005-09-20  Miguel de Icaza  <miguel@novell.com>
3935
3936         * driver.c (mono_main): Add --server and --desktop flags. 
3937
3938 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
3939
3940         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
3941         registers as global registers.
3942
3943         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
3944         longer needed with the new register allocator.
3945
3946         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
3947
3948         * cpu-ia64.md: Remove unused opcodes.
3949         
3950         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
3951         
3952 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
3953
3954         * cpu-amd64.md: Remove unused opcodes.
3955
3956         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
3957         needed with the new register allocator.
3958
3959         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
3960         reg-reg moves.
3961
3962 2005-09-16  Raja R Harinath  <rharinath@novell.com>
3963
3964         * Makefile.am (check-local): Don't invoke semdel-wrapper.
3965
3966 2005-09-16  Martin Baulig  <martin@ximian.com>
3967
3968         * exceptions-amd64.c
3969         (throw_exception): Don't call mono_debugger_throw_exception() if
3970         we're a rethrow - see the FIXME in the code.
3971
3972 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
3973
3974         * mini.c (mono_init_exceptions): This only works on some architectures.
3975         
3976 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
3977
3978         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
3979         on ia64.
3980
3981         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
3982
3983         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
3984         now in mini-exceptions.c.
3985
3986 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
3987
3988         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
3989         now in mini-exceptions.c.
3990
3991 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
3992
3993         * exceptions-x86.c: Applied patch from Patrik Torstensson 
3994         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
3995
3996         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
3997         code into mini-exceptions.c. Add some assertions to it.
3998
3999 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
4000
4001         * aot.c (emit_section_change): Applied patch from "The Software Team" 
4002         (<software@solmersa.com>). Fix as errors on windows.
4003
4004 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
4005
4006         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
4007         method info into the LMF.
4008
4009 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
4010         
4011         * mini-ia64.c: Add proper unwind info for method epilogs.
4012
4013         * exceptions-ia64.c: Add some code to help debugging.
4014         
4015         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
4016
4017         * mini-exceptions.c: Fix warning.
4018
4019 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
4020
4021         * mini.c: Really fix build.
4022
4023         * mini-x86.c mini-amd64.c: Fix build.
4024
4025 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
4026
4027         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
4028
4029         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
4030         some Interlocked methods as intrinsics.
4031
4032         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
4033         for Thread methods as well.
4034
4035         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
4036
4037         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
4038
4039         * mini-ia64.c mini-x86.c mini-amd64.c 
4040         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
4041         OP_MEMORY_BARRIER.
4042         
4043         * mini.c (mono_init_exceptions): Fix build breakage.
4044
4045 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
4046
4047         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
4048         of instructions. Use the new ia64_unw_op macros for emitting unwind
4049         info.
4050
4051         * mini.c (mono_init_exceptions): Initialize exception handling
4052         related trampolines at startup.
4053
4054 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
4055
4056         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
4057
4058 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
4059
4060         * mini.c: Handle type loading errors gracefully during compilation and
4061         throw the appropriate exception.
4062
4063 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
4064
4065         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
4066         for the mono binary.
4067
4068 2005-09-09  Martin Baulig  <martin@ximian.com>
4069
4070         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
4071         the release.
4072
4073 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
4074
4075         * mini-arm.h: use emulation for conv.r.un for the release.
4076
4077 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
4078
4079         * mini-arm.c, objects.cs: more fixes and tests for them.
4080
4081 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
4082
4083         * mini-arm.c: align structures to at least 4 bytes to be able
4084         to keep our current optimized memcpy.
4085
4086 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
4087
4088         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
4089
4090 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4091
4092         * mini.c: ignore SIGPIPE.
4093
4094 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
4095
4096         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
4097
4098         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
4099
4100 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
4101
4102         * mini.h: Add prototype for mono_allocate_stack_slots_full.
4103
4104 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
4105
4106         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
4107         exception handling support.
4108         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
4109         patch by Brian Koropoff <briank@marakicorp.com>).
4110
4111 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
4112
4113         * mini.c: revert another 'optimization' which breaks when
4114         items on the eval stack need to be saved at a basic block end
4115         (bug #75940).
4116
4117 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
4118
4119         * jit-icalls.c: for arrays, ensure we always provide
4120         lower bounds.
4121
4122 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
4123
4124         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
4125         
4126         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
4127
4128 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
4129
4130         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
4131         arguments in their original register.
4132
4133 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
4134
4135         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
4136         memset/memcpy.
4137
4138         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
4139         when ssapre is enabled.
4140
4141         * inssel-long.brg: Fix bug in previous patch.
4142
4143         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
4144         multiplication by a constant.
4145
4146 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
4147
4148         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
4149         icc.
4150
4151         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
4152         saving registers.
4153
4154 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
4155
4156         * inssel-arm.brg: apply changes tested by Brian Koropoff
4157         <briank@marakicorp.com>.
4158
4159 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
4160
4161         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
4162         
4163 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
4164
4165         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
4166         to the same register if dreg is just a base register.
4167         (print_ins): Improve printing of membase opcodes.
4168
4169         * inssel-x86.brg: Add optimized ldind(reg) rules.
4170
4171         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
4172
4173 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
4174
4175         * mini.c: when running under valgrind, set the stack bottom for
4176         the GC at the actual approximate stack for the app (fixes running
4177         mono with valgrind).
4178
4179 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
4180
4181         * mini.c: do no break at the first valuetype to init found
4182         (fixes bug #75791).
4183
4184 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
4185
4186         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
4187
4188 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
4189
4190         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
4191
4192 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
4193
4194         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
4195
4196 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
4197
4198         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
4199
4200         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
4201         code.
4202
4203         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
4204         code.
4205
4206         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
4207         methods.
4208
4209 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
4210
4211         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
4212
4213 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
4214
4215         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
4216         in the tail recursion optimization.
4217
4218         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
4219         debug info into the assembly file.
4220
4221         * iltests.il: Add test for filter regions.
4222
4223         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
4224         initial stack of filter regions. Fixes #75755.
4225
4226 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
4227
4228         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
4229         stack requirements.
4230
4231 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
4232
4233         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
4234         the check for an already compiled method on non-ia64 platforms.
4235         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
4236         proper domain.
4237
4238         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
4239
4240         * inssel-x86.brg: Add some optimized call rules.
4241
4242 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
4243
4244         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
4245         method here.
4246
4247         * mini.h mini-trampolines.c: Pass the trampoline argument to 
4248         mono_arch_patch_delegate_trampoline.
4249
4250         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
4251
4252         * mini-trampolines.c: Fix build.
4253
4254         * mini-amd64.h: Add delegate trampolines.
4255
4256         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
4257
4258         * inssel-amd64.brg: Add optimized call rules.
4259         
4260         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
4261
4262         * inssel-ia64.brg: Add optimized ldind(reg) rules.
4263
4264 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
4265
4266         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
4267         change.
4268
4269         * mini-ia64.c: Remove LMF fixmes.
4270
4271         * mini-ia64.h: Remove most fields from LMF.
4272
4273         * inssel-ia64.brg (stmt): Fix unaligned access errors.
4274
4275         * mini-trampolines.c: Add support for IA64 function descriptors.
4276
4277         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
4278         for IA64 function descriptors.
4279
4280 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
4281
4282         * tramp-arm.c: patch the vtable for virtual calls. Added
4283         support code to register/unregister the LMF.
4284         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
4285         more LMF work.
4286
4287 2005-08-19  Dick Porter  <dick@ximian.com>
4288
4289         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
4290         bit value if needed.
4291
4292 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
4293
4294         * mini.c (mini_get_method): Move handling of wrapper data here.
4295
4296         * mini.c (mono_method_to_ir): Add support for dynamic methods.
4297
4298         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
4299         virtual.
4300
4301         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
4302         bblock->code does not remain empty.
4303
4304 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
4305
4306         * arrays.cs: Add regression test for #75832.
4307
4308         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
4309         rules. Fixes #75832.
4310
4311         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
4312         instruction scheduling.
4313
4314 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
4315
4316         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
4317
4318 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
4319
4320         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
4321
4322         * mini-codegen.c: Fix VC build.
4323
4324         * cpu-pentium.md: Increase length of atomic_exhange_i4.
4325
4326 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4327
4328         * mini.h: fix signature for mono_register_opcode_emulation.
4329
4330 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
4331
4332         * mini.c: Get rid of most of the helper_sig_... constants using
4333         mono_create_icall_signature ().
4334
4335 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
4336
4337         * jit-icalls.c (helper_ldstr): New helper function.
4338
4339         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
4340
4341         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
4342         throw, load the string using a helper call instead of creating a string object.
4343
4344         * aot.c: Update after LDSTR changes.
4345
4346         * mini.h: Bump AOT file version.
4347         
4348         * aot.c: Save class size info into the AOT file. Print more statistics during
4349         compilation.
4350
4351         * mini.h: Bump AOT file version.
4352
4353         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
4354         ordering of disasm cases. Fixes #74957.
4355
4356 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
4357
4358         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
4359         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
4360         the generic code needed for the ARM port.
4361
4362 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
4363
4364         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
4365         inssel-arm.brg: more ARM features and fixes.
4366
4367 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
4368
4369         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
4370         ARM port work in progress.
4371
4372 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
4373
4374         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
4375
4376         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
4377
4378         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
4379
4380         * inssel.brg (mini_emit_memset): Add support for unaligned access.
4381
4382         * *-ia64.*: Ongoing IA64 work.
4383         
4384         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
4385
4386 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
4387
4388         * TODO: Remove out-of-data todo stuff.
4389
4390         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
4391         dead code.
4392
4393         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
4394
4395         * mini.h: Bump corlib version.
4396
4397 2005-07-27  Martin Baulig  <martin@ximian.com>
4398
4399         * mini-codegen.c
4400         (create_copy_ins): Added `const unsigned char *ip' argument; set
4401         `copy->cil_code' from it.
4402
4403 2005-07-27  Martin Baulig  <martin@ximian.com>
4404
4405         * mini-exceptions.c (mono_handle_exception): Don't call
4406         mono_debugger_handle_exception() for filters.
4407
4408 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
4409
4410         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
4411         as well.
4412
4413 2005-07-26  Martin Baulig  <martin@ximian.com>
4414
4415         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
4416
4417         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
4418         helper_compile_generic_method() if the method is actually virtual
4419         and non-final.
4420
4421 2005-07-26  Martin Baulig  <martin@ximian.com>
4422
4423         * mini.c
4424         (trampoline_code): Renamed to `mono_trampoline_code' and made it
4425         public; this is now accessed directly by the debugger.
4426         (mono_generic_trampoline_code): Removed.
4427
4428         * debug-mini.c
4429         (mono_debug_init_method): Also add interncalls and wrappers.
4430
4431 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
4432
4433         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
4434
4435 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
4436
4437         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
4438
4439 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
4440
4441         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
4442
4443 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
4444
4445         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
4446         getting TLS offsets on AMD64 too.
4447
4448 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
4449
4450         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
4451
4452 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
4453
4454         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
4455         inssel-arm.brg, mini-arm.h: ARM port work in progress.
4456
4457 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
4458
4459         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
4460
4461         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
4462         to mini.c.
4463
4464         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
4465         mono_sparc_is_virtual_call ().
4466         
4467         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
4468
4469         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
4470         trampoline parameters.
4471
4472         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
4473         
4474         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
4475         to mono_arch_get_vcall_slot_addr.
4476
4477         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
4478         trampoline code.
4479
4480         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
4481
4482 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
4483
4484         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
4485
4486 2005-07-19  Martin Baulig  <martin@ximian.com>
4487
4488         * exceptions-amd64.c (throw_exception): Call
4489         mono_debugger_throw_exception() here like we're doing it on i386.
4490
4491 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
4492
4493         * mini-ia64.c: Add optimized TLS access support.
4494
4495 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
4496
4497         * mini-exceptions.c: Ongoing IA64 work.
4498
4499         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
4500
4501         * mini.c: Use the default optimization set when embedding. Fixes
4502         #75194.
4503
4504 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
4505
4506         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
4507         of trampolines to a separate file.
4508
4509         * mini-trampolines.c: New file.
4510
4511         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
4512         separate file.
4513         
4514         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
4515         amd64/ia64 code.
4516
4517         * mini-codegen.c: Fix cygwin build.
4518
4519 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
4520
4521         * mini.c: Add some minor changes needed by the IA64 port.
4522
4523         * *-ia64.*: Ongoing IA64 work.
4524
4525 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
4526
4527         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
4528         trampolines into arch-independent and arch-dependent parts.
4529
4530         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
4531
4532 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
4533
4534         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
4535
4536         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
4537         the xp-regalloc-branch for amd64.
4538
4539         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
4540         xp-regalloc-branch for x86.
4541
4542 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
4543
4544         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
4545
4546 2005-07-06  Martin Baulig  <martin@ximian.com>
4547
4548         * mini.c
4549         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
4550         (mono_jit_runtime_invoke): Likewise.
4551
4552 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
4553
4554         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
4555         on x86 too.
4556         
4557         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
4558         without loading their metadata. Reorganize the file format so exception handling+
4559         debug info is kept separate from normal method info. Create MonoJitInfo 
4560         structures for methods lazily.
4561
4562         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
4563         loading metadata.
4564         (x86_class_init_trampoline): Patch AOT class init trampolines too.
4565
4566         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
4567
4568         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
4569         in AOT code.
4570
4571         * mini.h: Bump AOT file version.
4572
4573 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
4574
4575         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
4576
4577 2005-07-01  Raja R Harinath  <rharinath@novell.com>
4578
4579         * Makefile.am (check-local): Call semdel-wrapper.
4580
4581 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
4582
4583         * mini-x86.c: Revert the last change as it seems to break the build..
4584
4585 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
4586
4587         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
4588         
4589         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
4590
4591 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
4592
4593         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
4594         outside of the macro, so strange stuff doesn't happen with gcc4
4595         (NEW_AOTCONST_TOKEN): Likewise.
4596
4597 2005-06-28  Martin Baulig  <martin@ximian.com>
4598
4599         * mini.c (mini_class_is_system_array): New static method; use this
4600         instead of `klass->parent == mono_defaults.array_class' everywhere
4601         since this also works for the new generic array class.
4602
4603 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
4604
4605         * inssel.brg: Remove warnings.
4606
4607 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
4608
4609         * mini-ia64.c: Ongoing IA64 work.
4610
4611         * basic-float.cs: Add float->i1 conversion test.
4612
4613         * iltests.il: Add conv.u4 test.
4614
4615 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
4616
4617         * inssel-long.brg: Fix bug caused by last change.
4618
4619 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
4620
4621         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
4622         BSDs.  Allows the x86 JIT to work on OSX86
4623
4624 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
4625
4626         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
4627         u4->i8 conversion.
4628
4629         * mini-ia64.c: Ongoing IA64 work.
4630
4631 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
4632
4633         * mini-ia64.c: Ongoing IA64 work.
4634
4635         * driver.c: Clean up jit_code_hash as well when using --regression.
4636
4637         * inssel-long.brg: Fix long->i4/u4 conversion rules.
4638
4639         * basic-long.cs: Add tests for long->u4 conversion.
4640
4641 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
4642
4643         * mini.c: Take mono_get_domainvar out of macros. This makes sure
4644         that we do not depend on undefined C behavior: the order stuff
4645         gets evaluated within an expression. Fixes mono when compiled on
4646         GCC 4.
4647
4648 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
4649
4650         * *-ia64.*: Ongoing IA64 work.
4651
4652         * aot.c: Lower memory usage while loading AOT methods.
4653
4654         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
4655
4656         * mini.h: Bump AOT file format version.
4657
4658 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
4659
4660         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
4661
4662 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
4663
4664         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
4665         not on callee assembly). Fixed some comments.
4666
4667 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
4668
4669         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
4670         it gets proper disassembly.
4671         (emit_method_info): Remove some dead code.
4672
4673         * mini.c (mini_method_compile): Allways allocate the GOT var in
4674         mono_method_to_ir for emulating opcodes.
4675
4676 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
4677
4678         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
4679         before freeing the code memory. Fixes #74990.
4680
4681         * objects.cs: Add regression test for #74992.
4682
4683         * liveness.c: Extend live ranges of arguments to the beginning of the
4684         method. Fixes #74992.
4685
4686         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
4687         so it points into the faulting instruction.
4688
4689 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
4690
4691         * jit-icalls.c (mono_imul_ovf): Add exception handling.
4692
4693         * *-ia64.*: Ongoing IA64 work.
4694
4695         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
4696
4697 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
4698
4699         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
4700
4701         * *-ia64.*: Ongoing IA64 work.
4702
4703 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
4704
4705         * basic-long.cs: Add tests for add/sub.ovf.
4706
4707         * basic.cs: Add tests for sub.ovf.
4708
4709         * *-ia64.*: Ongoing IA64 work.
4710
4711 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
4712
4713         * *-ia64.*: Ongoing IA64 work.
4714
4715         * basic.cs: Add conv.ovf.i4.un test.
4716
4717 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
4718
4719         * mini.c: (remove_block_if_useless) Fixed bug 75061.
4720         
4721 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4722
4723         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
4724
4725 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
4726
4727         * *-ia64.*: Ongoing IA64 work.
4728
4729 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4730
4731         * trace.[ch]:
4732         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
4733
4734 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
4735
4736         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
4737
4738 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
4739
4740         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
4741
4742         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
4743         of a call is callable by a near call.
4744
4745 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
4746
4747         * mini-ia64.c: Ongoing IA64 work.
4748
4749 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
4750
4751         * genmdesc.c: Make the generated array non-static.
4752
4753         * inssel-long.brg: Fix LSHR_IMM rule.
4754
4755         * *-ia64.*: Ongoing IA64 work.
4756
4757         * *-ia64.*: Ongoing IA64 work.
4758
4759 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
4760
4761         * *-ia64.*: Ongoing IA64 work.
4762
4763         * *-ia64.*: Ongoing IA64 work.
4764         
4765         * mini-ia64.c: Ongoing IA64 work.
4766
4767         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
4768
4769 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
4770
4771         * objects.cs basic-calls.cs: Move some tests to objects.cs.
4772         
4773         * objects.cs basic-long.cs: Move some tests to objects.cs.
4774
4775 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
4776
4777         * *-ia64.*: Ongoing IA64 work.
4778
4779         * iltests.il: Add a new test.
4780
4781         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
4782         newobj. Fixes #75042.
4783
4784 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
4785
4786         * *-ia64.*: Ongoing IA64 work.
4787         
4788         * *-ia64.*: Ongoing IA64 work.
4789         
4790         * *-ia64.*: Ongoing IA64 work.
4791
4792         * basic.cs objects.cs: Move tests accessing static variables as well.
4793
4794         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
4795
4796 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
4797
4798         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
4799
4800         * driver.c: Always print failed tests.
4801
4802         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
4803         frame pointer.
4804
4805         * *ia64*: Ongoing IA64 work.
4806
4807 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
4808
4809         * basic.cs: Add tests for add.ovf. Fix warnings.
4810
4811 2005-05-18  Miguel de Icaza  <miguel@novell.com>
4812
4813         * driver.c (mono_main): Avoid crash if no argument is passed to
4814         --break;  Do not use g_error, but f_printf.   And fix all other
4815         ocurrences of the same crash.
4816
4817 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
4818
4819         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
4820         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
4821         Fixes #74742.
4822
4823 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
4824
4825         * *-ia64.*: Add beginnings of IA64 backend.
4826
4827         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
4828
4829 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
4830
4831         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
4832         Fixes #74925.
4833
4834         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
4835
4836         * mini-amd64.c: Fix a warning.
4837
4838 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
4839
4840         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
4841         in float_neg. Fixes #74897.
4842
4843         * mini-amd64.c (emit_call): Fix another near call bug.
4844
4845 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
4846
4847         * declsec.c: Keep the appdomain information in the structure. Added a 
4848         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
4849         value gets overwritten).
4850         * declsec.h: Set the default MonoArray for the the stack to 6. Added
4851         an MonoAppDomain member to MonoSecurityFrame.
4852         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
4853         used in the stack walk. Now use a MonoArray which grow (double) when
4854         it gets full.
4855
4856 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
4857
4858         * mini.c: Re-enabled runtime cleanup, since running threads should
4859         now properly stop when exiting.
4860
4861 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
4862
4863         * mini-codegen.c: New file contaning the arch-independent local
4864         register allocator. Not used by any architectures yet.
4865
4866         * mini.h linear-scan.c: Merge some changes from the 
4867         mini-xp-local-regalloc branch.
4868
4869 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
4870
4871         * mini-amd64.c (emit_call): Fix calls to native functions when the
4872         runtime is compiled as a shared library. Fixes #74756.
4873
4874         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
4875         on a literal field. Fixes #74751.
4876
4877 2005-04-25  Raja R Harinath  <rharinath@novell.com>
4878
4879         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
4880
4881 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
4882
4883         * objects.cs: Add missing null casting test.
4884
4885 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
4886
4887         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
4888         in wrapper methods. Also rename 'address' variable to 'offset'.
4889
4890 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
4891
4892         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
4893         warnings.
4894         
4895         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
4896
4897         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
4898         work on windows.
4899
4900 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
4901
4902         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
4903
4904 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
4905
4906         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
4907         just the last bytes.
4908
4909 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
4910
4911         * aot.c (mono_compile_assembly): Fix warning.
4912
4913         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
4914         by the _MSC_VER stuff.
4915
4916 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
4917
4918         * inssel-long.brg: Fix #74588.
4919
4920         * cpu-amd64.md: Fix #74591.
4921
4922         * iltests.il: Add new regression tests.
4923
4924 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
4925
4926         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
4927         valuetype.
4928
4929 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
4930
4931         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
4932
4933         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
4934         from Bill Middleton <flashdict@gmail.com>.
4935
4936 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
4937
4938         * arrays.cs: Add new regression test. Fix warnings.
4939
4940 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
4941
4942         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
4943         and leakage in CKFINITE.
4944
4945         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
4946         this to a null op since it is called on amd64 too.
4947
4948         * exceptions-amd64.c (get_throw_trampoline): Align stack.
4949
4950         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
4951         body since this is not used on amd64.
4952         
4953         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
4954
4955         * mini-amd64.c: Remove obsolete fixmes.
4956
4957         * mini.c (print_method_from_ip): Fix debugging support.
4958
4959 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
4960
4961         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
4962         so that expressions that don't give much gain are not reduced.
4963         * ssapre.h: Likewise.
4964
4965 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
4966
4967         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
4968
4969         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
4970
4971         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
4972
4973 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
4974
4975         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
4976
4977         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
4978
4979 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
4980
4981         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
4982         stack touching.
4983
4984         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
4985
4986         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
4987
4988         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
4989
4990         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
4991         MONO_ARCH_USE_SIGACTION. Fixes #74252.
4992
4993         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
4994
4995         * mini-x86.c: Fix up stack overflow handling.   
4996
4997         * exceptions.cs: Add new regression test.
4998
4999 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
5000
5001         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
5002         mono_jit_thread_attach.
5003
5004         * mini.c (mono_method_to_ir): Verify called method is not abstract.
5005
5006 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
5007
5008         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
5009         avoid calling constructors using callvirt.
5010
5011         * inssel.brg: Fix #74073.
5012
5013 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
5014
5015         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
5016         compilation with non-GCC compilers.
5017         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
5018         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
5019
5020 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
5021
5022         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
5023         klass->interface_offsets (will likely fix bug#74073).
5024
5025 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
5026
5027         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
5028
5029 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
5030
5031         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
5032         to amd64_div_reg_size ().
5033         
5034         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
5035
5036 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
5037
5038         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
5039
5040 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
5041
5042         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
5043
5044 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
5045
5046         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
5047         
5048         * mini.c (mono_precompile_assembly): Load and precompile referenced
5049         assemblies as well. Fixes #74015.
5050
5051 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
5052
5053         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
5054
5055 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
5056
5057         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
5058         a lot of checks and (anyway) permissions cannot work until corlib is 
5059         loaded.
5060
5061 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
5062
5063         * mini-ppc.c: fixed ABI issue on sysv/ppc.
5064
5065 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
5066
5067         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
5068         calls (fixes bug#72824).
5069
5070 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
5071
5072         * mini.c: fix tail recursion elimination (see test in bug#73936).
5073
5074 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
5075
5076         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
5077         some fp functions in sse2 mode.
5078
5079 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
5080
5081         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
5082
5083 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
5084
5085         * mini.h mini.c: Add mono_get_jit_tls_key ().
5086
5087         * mini-x86.c: Enable fast TLS support on windows.
5088
5089 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
5090
5091         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
5092         * mini.c: Check for p/invoke method when generating code. If a
5093         p/invoke method, or it's class, isn't decorated with [Suppress
5094         UnmanagedCodeSecurity] then generate code to call System.Security.
5095         UnmanagedDemand (only if the security manager is active).
5096
5097 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
5098
5099         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
5100         last change as it seems to cause strange crashes.
5101         
5102 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
5103
5104         * *.c: handle unsafe function pointers where needed.
5105
5106 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
5107
5108         * mini.c (mono_jit_free_method): Remove the fixme too.
5109
5110 2005-03-15  Miguel de Icaza  <miguel@novell.com>
5111
5112         * mini.c: As discussed, make the code actually free the delegate
5113         thunk now, to enable the debugging of delegate problems, use
5114         MONO_DEBUG=1 when running Mono. 
5115
5116         This takes also care of parts of the leaks as seen by Joe.
5117
5118 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
5119
5120         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
5121         thread_tls_offset calculation.
5122
5123 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
5124
5125         * declsec.c: Reworked linkdemand checks for icall. The previous code
5126         was using the declaration code (untrusted) and didn't work as expected
5127         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
5128         specific case.
5129
5130 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
5131
5132         * iltests.il: Add new localloc test.
5133
5134         * mini-amd64.c: Handle large stack allocations the same way as on
5135         windows if stack overflow handling is working.
5136         
5137         * mini-amd64.c: Allocate the signal stack using mmap.
5138
5139         * mini.c (sigsegv_signal_handler): Fix reading of context.
5140
5141         * mini-exceptions.c: Fix up stack overflow handling.
5142
5143         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
5144
5145         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
5146
5147         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
5148
5149         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
5150
5151         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
5152         tramp_init functions as they are no longer needed.
5153
5154 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
5155
5156         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
5157         
5158         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
5159
5160         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
5161         
5162         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
5163         support that now.
5164
5165         * mini-ops.h: Add OP_LMUL_IMM.
5166
5167         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
5168         long mul/div opcodes as intrinsic.
5169
5170         * mini-amd64.c (emit_call): Handle the case when the callee might be
5171         an AOT method.
5172
5173 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
5174
5175         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
5176         extra safe.
5177         
5178         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
5179
5180         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
5181
5182 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
5183
5184         * mini.c (mono_codegen): Don't leak here, to help people running
5185         monogrind.
5186
5187 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
5188
5189         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
5190         conversions in sse2 mode.
5191
5192         * basic-float.cs: Add regression test.
5193         
5194         * mini-amd64.c: Reenable sse2.
5195
5196 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
5197
5198         * mini-amd64.c: Disable sse2 until some regressions are fixed.
5199
5200 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
5201
5202         * driver.c: Copyright text should include 2005.
5203         
5204 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
5205
5206         * cpu-amd64.md (load_membase): Fix more max lengths.
5207
5208 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
5209
5210         * cpu-amd64.md (load_membase): Fix max length.
5211
5212         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
5213
5214         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
5215
5216         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
5217         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
5218
5219         * basic-float.cs: Add rounding regression test.
5220
5221         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
5222
5223 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
5224
5225         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
5226         structures in registers for pinvoke wrappers.
5227
5228 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
5229
5230         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
5231
5232 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
5233
5234         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
5235         wrapper to mono_jit_thread_attach.
5236
5237         * mini.c (mini_jit_thread_attach): New jit icall.
5238
5239         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
5240         native->managed wrappers.
5241
5242         * exceptions.cs: Add new regression test.
5243
5244         * mini.c (optimize_branches): Check regions in the cbranch to throw
5245         block case as well. Fixes #73242.
5246
5247 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5248
5249         * mini.c: thread safety fixes.
5250
5251 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
5252
5253         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
5254         patching stuff, since delegates use jump trampolines so there is
5255         no caller.
5256
5257         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
5258         jump trampolines.
5259         
5260         * tramp-amd64.c: Fix build.
5261
5262         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
5263         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
5264
5265         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
5266         Rename this to mono_arch....
5267         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
5268
5269         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
5270
5271         * mini-amd64.c (emit_call): If both the caller and the callee is
5272         guaranteed to have 32 bit addresses, emit a normal call.
5273
5274         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
5275
5276         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
5277         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
5278         method_ptr inside delegates.
5279
5280 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
5281
5282         * mini.c (mono_jit_free_method): Free the method info even if the native code is
5283         invalidated. Fixes #73001.
5284
5285         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
5286
5287         * mini-x86.c: Only use stdcall for pinvokes on windows.
5288
5289 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
5290
5291         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
5292         * mini-x86.c: remove unreliable __thread var offset detection,
5293         use the correct accessors and enable by default.
5294
5295 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
5296
5297         * mini.c (mono_jit_free_method): Fix memory leak.
5298
5299 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
5300
5301         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
5302
5303 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
5304
5305         * cpu-amd64.md: Fix lengths of atomic opcodes.
5306
5307 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5308
5309         * driver.c: try to not imply using ICU is any good.
5310
5311 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
5312
5313         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
5314         functions as inline ops.
5315
5316         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
5317         some Interlocked functions as inline ops.
5318
5319         * mini.c (move_basic_block_to_end): Fix bug in last patch.
5320
5321         * mini.h (MonoBasicBlock): Reorganize fields a bit.
5322
5323         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
5324
5325         * mini.c: Add support for OP_NOT_TAKEN.
5326
5327         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
5328         structures in registers for pinvoke wrappers.
5329
5330         * mini-amd64.c: Fix warnings.
5331
5332 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
5333
5334         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
5335
5336         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
5337
5338         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
5339         address instead of loading the address from it.
5340
5341         * mini-x86.c: Add support for returning small structs in registers
5342         on Win32. Fixes part of #70864.
5343         
5344 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
5345
5346         * trace.c (get_token): Improve error checking.
5347
5348 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
5349
5350         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
5351
5352 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
5353  
5354         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
5355         it can be reused for MonoClass.
5356         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
5357         _LINKDEMAND.
5358
5359 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
5360
5361         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
5362         instead of a MonoReflectionMethod. The method information wasn't used
5363         when displaying SecurityException details (but will be now).
5364
5365 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
5366
5367         * Makefile.am : windows build fix.
5368
5369 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
5370
5371         * iltests.il: Add new regression test.
5372
5373         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
5374         #72522.
5375
5376 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
5377  
5378         * mini.c: Moved linkdemand check into helper function check_linkdemand
5379         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
5380         LDFTN, LDVIRTFTN).
5381
5382 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
5383
5384         * declsec.c: Added statistics counter for different kinds of 
5385         LinkDemands.
5386         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
5387         (and commented) declaration.
5388         * mini.c: Added statistics counter for security Demand code 
5389         generation. Added display of security statistics.
5390
5391 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
5392
5393         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
5394         Fix compilation errors under gcc-2.95.
5395
5396 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
5397
5398         * mini.c, driver.c: Use the new jit trampoline hashtable
5399
5400 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
5401
5402         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
5403
5404 2005-02-11  Martin Baulig  <martin@ximian.com>
5405
5406         * debug-mini.c (mono_debug_close_method): Free the line number array.
5407
5408 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
5409
5410         * aot.c: Break up large methods into smaller ones. Share GOT slots for
5411         icalls.
5412
5413         * mini.h: Bump AOT file format version. 
5414
5415 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
5416
5417         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
5418         APTC and P/Invoke.
5419         * declsec.h: Added macros to get/set lazyly initialized security 
5420         informations about assemblies. Added new enum for different type of
5421         possible LinkDemand violation. Added function to check LinkDemands.
5422         * mini.h: Added a field to MonoCompile to hold any security violation
5423         detected when JITting a method (so it can be thrown later).
5424         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
5425         and CEE_CALLVIRT. Added code to throw exception at the end of
5426         mini_method_compile (note: the exception is unhandled right now).
5427
5428 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
5429
5430         * mini.c, jit-icalls.c: use the managed implementation of
5431         memset for initobj and memset, to avoid managed <-> unmanaged
5432         transitions.
5433
5434 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
5435
5436         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
5437         optimization if it would need a GOT var.
5438
5439         * basic.cs: Add tests for constant propagation and switch statements.
5440
5441         * ssa.c: Fix out-of-range constant propagation and switch statements.
5442
5443 2005-02-09    <vargaz@freemail.hu>
5444
5445         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
5446
5447 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
5448
5449         * cpu-amd64.md (load_membase): Fix max length of load_membase.
5450
5451 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
5452
5453         * mini.c: update to new signature of mono_class_get_allocation_ftn().
5454
5455 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
5456
5457         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
5458         arithmetic operations.
5459
5460 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
5461
5462         * mini-ppc.c: add a workaround for broken user code that
5463         DllImports vararg functions with non-vararg signatures.
5464
5465 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5466
5467         * mini.c (mono_jit_compile_method_inner): Add detection and a 
5468         meaningfull error message for assemblies written in Managed C++.
5469
5470         * tramp-amd64.c mini-amd64.h: Add support for 
5471         create_trampoline_from_token ().
5472
5473         * aot.c mini-x86.c abcremoval.c: Applied patch from
5474         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
5475
5476 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5477
5478         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
5479         which takes a MonoImage/token as parameter instead of a MonoMethod.
5480
5481         * aot.c: Use the new trampoline for initializing vtables.
5482
5483         * aot.c: Add support for ldfld/stfld_remote wrappers.
5484
5485         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
5486         rules for compare <MEM>, IMM.
5487
5488         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
5489
5490         * aot.c: Handle inherited finalizers correctly.
5491
5492 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5493
5494         * inssel.brg (stmt): Add a missing _setup_... ().
5495
5496         * aot.c: Save some parts of the class state to the AOT file and use it
5497         to recompute that state when a class is initialized.
5498
5499         * mini.c: Install AOT hooks into the runtime.
5500
5501         * mini.h: Bump AOT file format version.
5502         
5503         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
5504         Fixes #72148.
5505
5506         * iltests.il: Add new test.
5507
5508 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5509
5510         * mini.c: fix typo.
5511
5512 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
5513
5514         * mini.c: setup the statistical profiler in the thread attach
5515         callback to cope with the new single thread code.
5516
5517 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
5518
5519         * mini-ppc.c: ensure we have enough room for the profiler
5520         calls (fixed bug#72084).
5521
5522 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
5523
5524         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
5525         it.
5526
5527 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
5528
5529         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
5530
5531 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
5532
5533         * ssapre.c: Fixed an issue with down safety (this allows IronPython
5534         to succesfully execute parrotbench).
5535         * ssapre.h: Likewise.
5536
5537 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
5538
5539         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
5540         variable for stores to method arguments (fixes a SSAPRE issue).
5541
5542 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5543
5544         * mini.c: handle value types in dup, fixes gen-112.cs.
5545
5546 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
5547
5548         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
5549         sequence for calls in dynamic methods to avoid thunks.
5550
5551 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5552
5553         * mini.c: correctly remove dynamic methods from the hashtable.
5554
5555 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
5556
5557         * driver.c: Disabled SSAPRE until fix the bug that appears
5558         in IronPython's parrotbench.
5559
5560 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
5561
5562         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
5563
5564         * mini.c (mono_method_to_ir): Revert the previous change.
5565         
5566         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
5567         when AOT compiling.
5568
5569         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
5570         mono_jit_info_table_find () etc. when running under valgrind.
5571
5572         * inssel.brg: Fix warnings.
5573
5574         * mini-exceptions.c: Fix warnings.
5575
5576 2005-01-31  Martin Baulig  <martin@ximian.com>
5577
5578         * driver.c (compile_all_methods_thread_main): Don't try to compile
5579         generic methods or anything which has type parameters.
5580
5581 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
5582
5583         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
5584
5585         * TestDriver.cs: Add --verbose flags.
5586
5587         * graph.c ssa.c: Fix 64 bit warnings.
5588         
5589         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
5590         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
5591         Fix 64 bit warnings.
5592
5593         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
5594         variable not spotted by gcc.
5595         
5596         * mini-amd64.c inssel-amd64.brg: Applied patch from  
5597         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
5598         X86_COMPARE_MEMBASE opcodes.
5599
5600         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
5601
5602 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
5603
5604         * *: MonoMethod->signature might be NULL now. You *MUST* use
5605         mono_method_signature.
5606
5607 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
5608
5609         * driver.c (compile_all_methods_thread_main): Compile the methods
5610         without invoking cctors.
5611
5612 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5613
5614         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
5615         * basic-calls.cs: test for the above.
5616
5617 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
5618
5619         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
5620         MonoJitInfo changes.
5621
5622 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
5623
5624         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
5625         eagerly if it contains dynamic methods.
5626         
5627         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
5628
5629         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
5630         trace, it is now computed by an icall from trace_ips.
5631         
5632         * mini-exceptions.c: Fix a warning.
5633
5634 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
5635
5636         * mini-exceptions.c: don't bother getting stack trace info if
5637         it's not going to be used.
5638
5639 2005-01-27  Raja R Harinath  <rharinath@novell.com>
5640
5641         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
5642         ssapre-mini-ops.h.
5643
5644 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
5645
5646         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
5647
5648         * aot.c: Avoid calling mono_method_get_header () if not needed.
5649
5650         * mini.h: Bump AOT file format version.
5651         
5652         * mini.c (mono_emit_native_call): Allocate a GOT var here.
5653
5654         * mini.c (mono_print_tree): Print more info for calls.
5655
5656 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
5657
5658         * declsec.h: Remove warning by adding missing include for marshal.h
5659
5660 2005-01-26  Martin Baulig  <martin@ximian.com>
5661
5662         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
5663         `ip' twice.
5664
5665 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
5666
5667         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
5668         flags.
5669
5670         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
5671
5672         * aot.c (mono_compile_assembly): Fix a warning.
5673
5674 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
5675
5676         * declsec.c: Look for security attributes on the original MonoMethod 
5677         (and not the wrapped one). This fix permissions on icalls.
5678
5679 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
5680
5681         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
5682
5683         * mini.c (mono_allocate_stack_slots): Add a fixme.
5684
5685         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
5686
5687 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
5688
5689         * inssel.brg: optimize casts of sealed types (more
5690         optimizations waiting for fixes in remoting).
5691
5692 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
5693
5694         * inssel.brg (stmt): Add another dummy rule.
5695
5696         * driver.c: Fix warnings.
5697
5698         * driver.c (mono_main): If running under valgrind, instruct glib to use
5699         the system allocation functions so valgrind can track the memory
5700         allocated by the g_... functions.
5701
5702         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
5703
5704         * mini-ops.h: Add OP_DUMMY_STORE opcode.
5705
5706         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
5707
5708         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
5709         variables in try regions.
5710
5711         * mini.c (mini_method_compile): Don't disable optimizations on large
5712         methods when AOT compiling.
5713
5714         * mini.c (mono_allocate_stack_slots): New arch independent method to 
5715         allocate stack slots. Not yet used.
5716
5717 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
5718
5719         * debug-mini.c (mono_debug_close_method): Plug some leaks.
5720
5721 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
5722
5723         * mini-ppc.c: make the branch info relative as the code
5724         buffer can be reallocated.
5725
5726 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
5727
5728         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
5729         * driver.c: Removed the AOT/security restriction. Now initialize the
5730         security manager (in metadata) if --security is used.
5731         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
5732         rather than the pointer to declarative security, when AOT is used.
5733
5734 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
5735
5736         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
5737         basic blocks, reduced intrinsic exception throwing code size.
5738
5739 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
5740
5741         * driver.c (mini_usage): Reorder the usage screen.
5742
5743 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
5744
5745         * mini.c (mono_resolve_patch_target): Fix warning.
5746
5747 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
5748
5749         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
5750         previous patch.
5751
5752         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
5753
5754         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
5755         breaks the amd64 build.
5756
5757         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
5758         register allocation. Fixes #71454.
5759
5760         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
5761
5762         * arrays.cs: Add new regression test.   
5763
5764 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
5765
5766         * ssapre.c: Turned usage of snprintf to GString.
5767         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
5768         (I left it on by mistake in my previous commit).
5769
5770 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
5771
5772         * mini.c, cfold.c, basic-calls.cs: preserve side effects
5773         on cond branch optimization (fixes bug# 71515).
5774
5775 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
5776
5777         * abcremoval.c: Fixed bug 71062.
5778         * abcremoval.h: Likewise.
5779
5780 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
5781
5782         * mini.c: Added a new functionality to optimize_branches, the removal
5783         of useless basic blocks, and fixed some problem in the removal of
5784         critical edges; some utility functions added for both purposes.
5785         * ssapre.c: Added complex expression support, and fixed bug 70637.
5786         * ssapre.h: Likewise.
5787         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
5788         enabled in SSAPRE.
5789         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
5790         * driver.c: Re-enabled SSAPRE.
5791
5792 2005-01-19  Martin Baulig  <martin@ximian.com>
5793
5794         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
5795         the result of mono_get_method_constrained().
5796
5797 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
5798
5799         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
5800         manager.
5801
5802 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
5803
5804         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
5805         be detected.  Fixes #59296.
5806
5807 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
5808
5809         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
5810         which can happen. Fixes #71361.
5811
5812 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
5813
5814         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
5815         manager.
5816
5817 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
5818
5819         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
5820         appdomain-unload.exe to fail.
5821         
5822         * mini.c: Fix some memory leaks.
5823
5824 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
5825
5826         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
5827         Fixed bug and sped up some codepaths.
5828
5829 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
5830
5831         * mini.c: Fix some memory leaks.
5832
5833         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
5834         conversion.
5835
5836         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
5837
5838         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
5839         #71320.
5840
5841         * iltests.il: Add regression test for #71320.
5842
5843 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
5844
5845         * mini.c (mono_codegen): Fix installation of profiler hooks.
5846
5847         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
5848
5849 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5850
5851         * mini.h, mini.c, cfold.c: optimize access to enum
5852         readonly fields, too. Eval conditional branches if possible
5853         to perform unreachable code removal in more cases.
5854
5855 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
5856
5857         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
5858
5859         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
5860         code manager.
5861
5862         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
5863         WinXP DEP. Fixes #71244.
5864
5865 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
5866
5867         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
5868
5869 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
5870
5871         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
5872
5873 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
5874
5875         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
5876         changes.
5877
5878         * mini.h: Bump AOT version.
5879
5880         * mini.h (MonoCompile): Change exvar to a hash table.
5881
5882         * mini.c: Allocate a separate exvar for each handler block.
5883
5884         * mini.c: Get rid of the computation of filter_lengths, its not needed.
5885
5886         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
5887         ex var with the pending exception and only throw if the two are equal.
5888         Fixes #68552.
5889         
5890         * exceptions.cs: Add tests for rethrow and nested catch clauses.
5891
5892         * mini-x86.c: Fix warnings.
5893
5894         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
5895         used by all the ports now.
5896
5897         * aot.c: Add write-symbols and save-temps options.
5898
5899 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
5900
5901         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
5902
5903 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
5904
5905         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
5906         operations.
5907
5908         * tramp-s390.c: Check vtable slot belongs to the domain.
5909
5910         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
5911         as per other platforms.
5912
5913         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
5914
5915 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
5916
5917         * driver.c: we don't run the Main() code in a subthread anymore.
5918
5919 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
5920
5921         * mini.c: added experimental rtc support in the statistical
5922         profiler: if the user has the permission, more accurate statistics
5923         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
5924         The MONO_RTC value must be restricted to what the linux rtc allows:
5925         power of two from 64 to 8192 Hz.
5926
5927 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
5928
5929         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
5930
5931 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
5932
5933         * mini-ppc.c: better icache flush for smp.
5934
5935 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
5936
5937         * mini-amd64.c (emit_move_return_value): Fix memory leak.
5938
5939         * mini-x86.c (get_call_info): Add the get_call_info () code from the
5940         amd64 port, not yet used.
5941
5942 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
5943
5944         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
5945         a struct type.
5946
5947 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
5948
5949         * driver.c: Added --security option to activate the security manager.
5950         Right now this will allow code generation for declarative demands and
5951         is disabled when AOT is specified.
5952         * mini.c: Add code generation for declarative security demands.
5953         * mini.h: Add mono_use_security_manager as an extern gboolean.
5954
5955 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
5956
5957         * aot.c (mono_compile_assembly): Speed up compilation a bit by
5958         emitting more dense assembly code.
5959
5960         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
5961         exception throwing stuff.
5962
5963 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
5964
5965         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
5966         dead code.
5967
5968         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
5969         left in by mistake.
5970
5971         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
5972         fixed.
5973
5974         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
5975
5976         * tramp-*.c: Only patch vtable slots if the object is in the current
5977         domain. Fixes appdomain-unload.exe.
5978
5979         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
5980         
5981         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
5982         x86 branch.
5983
5984 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
5985
5986         * mini.c (reverse_branch_op): New helper function.
5987
5988         * mini.c (optimize_branches): Run the new optimization only on 
5989         platforms which support it. Also reverse all kinds of branches.
5990
5991         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
5992
5993         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
5994         a throw statement.
5995
5996         * mini.c (optimize_branches): Reverse not-equals branches if the false
5997         bblock is a throw. This happens a lot of time with argument checking in
5998         corlib.
5999
6000         * mini.c (mono_codegen): Add support for placing basic blocks after
6001         the function epilogue.
6002
6003         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
6004         function epilogue.
6005         
6006 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
6007
6008         * mini.c (setup_stat_profiler): Only set this up if the platform
6009         supports ITIMER_PROF.
6010
6011 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
6012
6013         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
6014         previous patch.
6015
6016         * inssel.brg: Fix a warning.
6017
6018 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
6019
6020         * mini.c: added support for statistical profiler 
6021         (run with: --profile=default:stat).
6022
6023 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
6024
6025         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
6026
6027         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
6028
6029         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
6030         related to global registers from the amd64 port.
6031
6032 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
6033
6034         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
6035
6036         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
6037         with global registers.
6038         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
6039
6040         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
6041
6042 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
6043
6044         * debug-mini.c (encode_value): Fix off-by-one.
6045
6046         * aot.c (encode_value): Likewise.
6047
6048         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
6049
6050 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
6051
6052         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
6053         AOT.
6054
6055         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
6056         
6057         * aot.c (emit_method_info): Increase size of temp buffer.
6058
6059         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
6060         the AOT case.
6061
6062 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
6063
6064         * aot.c (emit_method_info): Fix build.
6065         
6066         * aot.c: Further rework of the AOT file format to reduce the size of
6067         the method info data.
6068
6069         * mini.h: Bump AOT file format version.
6070
6071 2004-12-27  Martin Baulig  <martin@ximian.com>
6072
6073         * mini.c (mini_get_method): New static method; call
6074         mono_get_method_full() and mono_get_inflated_method().
6075         (mono_method_to_ir): Use mini_get_method() instead of
6076         mono_get_method_full(). 
6077
6078 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
6079
6080         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
6081
6082 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
6083
6084         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
6085
6086         * inssel-amd64.brg: Add some optimization rules.
6087
6088 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
6089
6090         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
6091         standard not GC'd stuff is fine.
6092
6093 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
6094
6095         * aot.c: Rework the AOT file format to get rid of most of the global
6096         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
6097
6098         * mini.h: Bump AOT file format version.
6099         
6100 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
6101
6102         * mini.h: Bump AOT file format version.
6103
6104         * aot.c (mono_aot_is_got_entry): New function to determine if an 
6105         address is inside a GOT.
6106
6107         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
6108
6109         * cpu-pentium.md: Increase the maximum size of some instructions which
6110         might involve a got access.
6111         
6112         * mini.c (get_method_from_ip): Another debug helper function.
6113
6114         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
6115         when got var accesses are created during the decompose phase.
6116
6117         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
6118
6119         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
6120         argument mini_compile_method and to MonoCompile, and use this to
6121         determine whenever a given method is compiled for AOT. This allows the
6122         other methods compiled during AOT compilation to be free of AOT stuff,
6123         so the backends does not need to add special support for them by
6124         creating a fake GOT etc.
6125
6126         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
6127         longer needed.
6128
6129 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
6130
6131         * mini.c (mono_method_to_ir): It turns out that some of the
6132         x-appdomain wrappers are lax with types, so just ignore this for
6133         all wrappers.
6134
6135         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
6136         at the vtable->klass. If it is non-shared code we can just use the
6137         vtable.
6138
6139 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
6140
6141         * mini-ppc.c: access MonoDomain from tls, too.
6142
6143 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
6144
6145         * declsec.c: Removed unused variable (and related warning ;-)
6146
6147 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
6148
6149         * iltests.il: New test for LDELEMA on an array of ref types.
6150
6151         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
6152         all ldelema's on reftypes.
6153         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
6154         it was the wrong place to put it.
6155
6156         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
6157         register to pop to make this cleaner, at the request of Paolo.
6158
6159 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
6160
6161         * mini-ops.h (OP_GETHASHCODE): New op.
6162
6163         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
6164
6165         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
6166         operation.
6167
6168         For a microbenchmark, this reduces the cost of Hashtable.get_Item
6169         by 25%.
6170         
6171         * mini-x86.c (mono_arch_output_basic_block): Rather than
6172
6173         add ebp, 4
6174
6175         Emit
6176
6177         pop edx
6178
6179         The first is 3 bytes while the second is 1. This saves 36 kb on
6180         mscorlib, quite a big saving. When bootstraping mcs, I was able to
6181         see a small boost because of icache locality.
6182
6183         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
6184
6185 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
6186
6187         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
6188         started code sharing with the generic code.
6189
6190 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
6191
6192         * mini-ppc.c, cpu-g4.md: added code for direct access to
6193         tls data slots.
6194
6195 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
6196
6197         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
6198          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
6199         to OP_TLS_GET.
6200
6201 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
6202
6203         * declsec.c|h: Added functions to cache the declarative stack modifiers
6204         in MonoJitInfo and to create a security frame from a MonoJitInfo 
6205         structure.
6206         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
6207         created. Register internal calls for System.Security.SecurityFrame::
6208         _GetSecurityFrame and _GetSecurityStack.
6209         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
6210         the definitions for the new stack walk/callback mechanism.
6211         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
6212         first security frame for LinkDemands and InheritanceDemands) and
6213         GetSecurityStack for Demands. Both use the new mono_walk_stack code
6214         from lupus.
6215         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
6216         walk initialization (lupus).
6217
6218 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
6219
6220         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
6221         idiom.
6222         (handle_loaded_temps): Do not create a temporary variable for
6223         things that we know are temps. They will never be modified.
6224         (mono_spill_call): Set MONO_INST_IS_TEMP
6225         (mono_emulate_opcode): ditto
6226         (emit_tree): ditto
6227         (mono_method_to_ir.CEE_DUP): ditto
6228
6229 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
6230
6231         * mini.c (type_to_eval_stack_type): Make this handle the void type
6232         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
6233         (emit_tree): use ip_in_bb to special case some common idioms
6234         Update all callers to pass in the IP.
6235         (mono_method_to_ir): Make CEE_CALL* do the above as well.
6236
6237         This gives us a nice 2% speedup in mcs bootstrap.
6238
6239         * mini-x86.c (peephole_pass): Peephole pass to make
6240         mov  [foo], eax
6241         push [foo]
6242
6243         into
6244
6245         mov [foo], eax
6246         push eax
6247
6248         * mini.c (ip_in_bb): new method.
6249         (mono_method_to_ir): use this method rather than doing the hash
6250         lookup ourselves.
6251
6252         * linear-scan.c (mono_linear_scan): When expiring actives, you
6253         don't need to keep around variables that expire on this
6254         instruction. This makes it so that:
6255              a = b + 1
6256         will turn into:
6257              store (ebx add (ebx, 1))
6258         which will become
6259              add ebx, 1
6260
6261 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
6262
6263         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
6264         combination to avoid doing two copies. Fix up problems with previous
6265         patch.
6266
6267         * mini.c: Fix 64 bit warnings.
6268
6269         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
6270
6271 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
6272
6273         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
6274         changes from the x86 code.
6275
6276         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
6277
6278 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
6279
6280         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
6281         throwing code to reduce its size, unify the AOT and non-aot code and 
6282         get rid of relocations in the AOT case.
6283
6284         * mini-x86.h mini.c exceptions-x86.c 
6285         (mono_arch_get_throw_corlib_exception): New arch specific function to 
6286         raise corlib exceptions which doesn't require relocations in the 
6287         caller.
6288
6289         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
6290
6291 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
6292
6293         * mini.c (mono_emit_method_call): Only allocate the got var when it is
6294         needed.
6295
6296         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
6297         in the AOT case.
6298
6299 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
6300
6301         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
6302         with add function when used from Inc/dec atomic 
6303         functions. Re-enabled optimization on x86.
6304         * mini-ops.h: renamed atomic_add functions to
6305         allow _add to match the Interlocked::Add and
6306         _add_next to match Interlocked::Inc/Dec.
6307
6308 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
6309
6310         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
6311         linking of BBs to the end BB, and enabled SSAPRE also with
6312         consprop and copyprop (which was prevented by that bug).
6313
6314 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
6315
6316         * mini-x86.c: disabling the Interlocked optimizing code. 
6317
6318 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
6319
6320         * aot.c (load_aot_module): Move reading of got_addr after the AOT
6321         file version check.
6322         
6323 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
6324
6325         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
6326         interlocked optimization due lack of support on x86, rewrote 
6327         exchange to take into account that base may be in eax.
6328         
6329         xsp works again; activated Interlocked optimizing code.
6330         
6331 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
6332
6333         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
6334
6335 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
6336
6337         * mini-ops.h: Add new opcodes.
6338
6339         * mini.h: Add new patch types. Add got_var to MonoCompile.
6340
6341         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
6342         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
6343         make it work with all kinds of patchable code.
6344
6345         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
6346         address of the GOT, and referencing entries in the GOT.
6347
6348         * mini.c: Add code to load the GOT address if needed by an opcode.
6349
6350         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
6351         independent AOT code on the x86 using an elf-style Global Offset Table.
6352
6353 2004-12-14  Raja R Harinath  <rharinath@novell.com>
6354
6355         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
6356
6357 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6358
6359         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
6360         when running xsp.
6361
6362 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
6363
6364         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
6365         of Interlocked:Increment/Decrement/Add as inline ops.
6366         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
6367
6368 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
6369
6370         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
6371         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
6372
6373 2004-12-12  Duncan Mak  <duncan@ximian.com>
6374
6375         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
6376         again. `patch_info->table_size' is no longer valid after Zoltan's
6377         commit #37636.
6378
6379 2004-12-12  Martin Baulig  <martin@ximian.com>
6380
6381         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
6382         if we are the "real" method, ie. not an inlined method inside it.
6383
6384 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
6385
6386         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
6387         before we look in the special fields table. This fixes
6388         ../tests/thread-static-init.cs.
6389
6390 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6391
6392         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
6393         for Array get_Rank and get_Length. Fixes bug #70465.
6394
6395 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
6396
6397         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
6398         separate structure to reduce the size of MonoJumpInfo.
6399
6400 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
6401
6402         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
6403
6404 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
6405
6406         * mini.c (mini_get_inst_for_method): Changed to allow ports
6407         to return a MonoInst instead of opcode 
6408         (renamed mini_get_opcode_for_method to better reflect the new functionality)
6409         
6410         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
6411         Allow ports to return a created MonoInst instead of op-code, will enable
6412         new optimizations.
6413         (renamed mini_get_opcode_for_method to better reflected the functionality)
6414
6415 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
6416
6417         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
6418
6419 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
6420
6421         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
6422         Fixes #69985.
6423
6424 2004-12-08  Martin Baulig  <martin@ximian.com>
6425
6426         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
6427         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
6428
6429 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
6430
6431         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
6432         correctly.
6433
6434         * exceptions.cs: Disable some tests which depend on properties of x86 fp
6435         arithmetic.
6436
6437 2004-12-08  Raja R Harinath  <rharinath@novell.com>
6438
6439         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
6440
6441 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
6442
6443         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
6444         bug introduced by the previous patch.
6445
6446 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
6447
6448         * mini-ppc.c, objectc.cs: handle large structs passed by value
6449         (fixes bug #69972).
6450
6451 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
6452
6453         * mini-ppc.c: OP_ARGLIST implementation from
6454         Geoff Norton  <gnorton@customerdna.com>.
6455
6456 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
6457
6458         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
6459         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
6460
6461 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
6462
6463         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
6464
6465 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6466
6467         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
6468         support.
6469
6470 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
6471
6472         * mini-sparc.c: Zero out localled-ed memory.
6473
6474         * iltests.il: Add tests for zeroing out localloc-ed memory.
6475
6476 2004-12-04  Martin Baulig  <martin@ximian.com>
6477
6478         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
6479         mono_method_get_signature_full().       
6480
6481 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
6482
6483         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
6484         and some utility functions (always for SSAPRE), integrated SSAPRE.
6485         * mini.h: Likewise.
6486         * driver.c: Added ssapre option.
6487         * ssa.c: Small fix on OP_ARG handling.
6488         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
6489         * Makefile.am: Likewise.
6490
6491 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6492
6493         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
6494         now in the xp code.
6495
6496         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
6497         icall.
6498
6499 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6500
6501         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
6502         
6503         * cpu-s390.md : Increase instruction length of oparglist.
6504
6505         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
6506
6507 2004-11-30  Martin Baulig  <martin@ximian.com>
6508
6509         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
6510         virtual generic methods.  We call a special helper_compile_generic_method()
6511         icall to retrieve the method from the vtable, inflate and compile
6512         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
6513
6514         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
6515
6516 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
6517
6518         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
6519
6520 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
6521
6522         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
6523         Fixes #69929.
6524
6525 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
6526
6527         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
6528         platforms with PIC aot.
6529
6530 2004-11-28  Martin Baulig  <martin@ximian.com>
6531
6532         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
6533         Fixes gen-112.cs.
6534
6535 2004-11-28  Martin Baulig  <martin@ximian.com>
6536
6537         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
6538         the result of mono_type_get_underlying_type() to check whether
6539         we're byref.
6540
6541 2004-11-26  Martin Baulig  <martin@ximian.com>
6542
6543         * mini.c
6544         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
6545         in the g_assert().
6546
6547 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
6548
6549         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
6550         the same way as the other arguments so they won't get clobbered.
6551
6552         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
6553         calls through R11 since it is clobbered by the trampoline code.
6554
6555 2004-11-26  Raja R Harinath  <rharinath@novell.com>
6556
6557         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
6558         pick up in-tree mscorlib.dll.
6559
6560 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
6561
6562         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
6563
6564         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
6565         runtime data/code are now stored in a table similar to the GOT in ELF. 
6566         This allows the code itself to be position independent.
6567
6568         * aot.c: Fix loading of referenced assemblies after the lazy assembly
6569         loading changes.
6570
6571         * aot.c: Attach ELF type (object/function) directives to all global
6572         symbols.
6573
6574         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
6575
6576         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
6577
6578         * mini-amd64.h: Turn on PIC AOT code.
6579
6580         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
6581         returning the offset within an OP_AOTCONST instruction where the GOT
6582         offset needs to be added.
6583
6584         * mini.h: Bump AOT file format version.
6585
6586 2004-11-25  Martin Baulig  <martin@ximian.com>
6587
6588         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
6589         uninflated generic methods.
6590
6591 2004-11-25  Martin Baulig  <martin@ximian.com>
6592
6593         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
6594
6595 2004-11-24  Martin Baulig  <martin@ximian.com>
6596
6597         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
6598         original klass (this only applies for generic instances).
6599
6600 2004-11-24  Martin Baulig  <martin@ximian.com>
6601
6602         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
6603         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
6604         that array).
6605
6606 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
6607
6608         * mini.c (mono_method_to_ir): Disable inlining for methods containing
6609         localloc. Fixes #69678.
6610
6611         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
6612         
6613 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
6614
6615         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
6616         used SSE registers on pinvoke calls. Fixes #69774.
6617
6618 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
6619
6620         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
6621         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
6622
6623 2004-11-23  Raja R Harinath  <rharinath@novell.com>
6624
6625         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
6626         Refer directly to the mcs/ tree.
6627
6628 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6629
6630         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
6631         Check if a trampoline for a synchronized method is required. 
6632
6633 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
6634
6635         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
6636         with localloc if needed. Throe arithmetric exception in
6637         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
6638         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
6639
6640 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
6641
6642         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
6643         types before switching on type.  Fixes #69622.
6644
6645 2004-11-19  Raja R Harinath  <rharinath@novell.com>
6646
6647         * Makefile.am (check-local): New.  Integrate into 'make check'.
6648         (MCS,RUNTIME): Define using in-tree mono and mcs.
6649         (ILASM): New.
6650         (%.exe): Use $(ILASM).
6651
6652 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
6653
6654         * mini-ppc.c: adjust initial prolog size (bug #69691).
6655
6656 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
6657
6658         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
6659         #69664.
6660
6661 2004-11-17  Raja R Harinath  <rharinath@novell.com>
6662
6663         * Makefile.am (clean-local): Rename from 'clean'.
6664
6665 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6666
6667         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
6668         to mono_arch_is_int_overflow. 
6669         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
6670         SIGFPE events.
6671
6672 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
6673
6674         * declsec.c|h: New files to support declarative security attributes.
6675         Added function to check if a method has (applicable) security.
6676         * mini.c|h: Add check for declarative security attributes in
6677         mono_method_check_inlining.
6678         * Makefile.am: Added declsec.c and declsec.h to the build.
6679
6680 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
6681
6682         * mini.c, mini.h: update to keep dynamic code info per-domain.
6683
6684 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
6685
6686         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
6687         (mini_init): Get rid of it from here too.
6688
6689 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
6690
6691         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
6692         implemented OP_RETHROW (patch by Geoff Norton
6693         <gnorton@customerdna.com>).
6694
6695 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
6696
6697         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
6698         between appdomains.  Fixes appdomain-unload on PPC.
6699
6700 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
6701
6702         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
6703         mini-exceptions.c: handle the new wrapper types.
6704         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
6705         token value as a MonoClass* when compiling a wrapper.
6706         mono_jit_create_remoting_trampoline now takes an additional
6707         MonoRemotingTarget parameter.
6708         
6709 2004-11-10  Martin Baulig  <martin@localhost>
6710
6711         * mini.c (mono_method_to_ir): Use `generic_container->context'
6712         rather than creating a new one.
6713
6714 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6715
6716         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
6717
6718         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
6719
6720 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
6721
6722         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
6723         the experimental aot cache stuff.
6724
6725 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
6726
6727         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
6728         mini-exceptions.c: update to exception clause structure changes.
6729
6730 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
6731
6732         * exceptions-x86.c (throw_exception): Fix warnings.
6733
6734         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
6735         for OP_RETHROW.
6736
6737 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
6738
6739         * exceptions-sparc.c (get_throw_exception): Really fix this.
6740
6741 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
6742
6743         * tramp-*.c: we no longer support icalls without wrappers, so
6744         a bit of code can be removed here
6745
6746 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
6747
6748         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
6749         patch.
6750
6751         * cpu-sparc.md: Add op_rethrow.
6752
6753         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
6754
6755         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
6756
6757         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
6758         * mini-ops.h: Add OP_RETHROW.
6759
6760         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
6761
6762         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
6763
6764 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
6765         
6766         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
6767         Makes the output much easier to read
6768
6769 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
6770
6771         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
6772         prevents another huge leak when compiling with ssa. Secondly, the
6773         performance of doing this rather than freeing the lists is much
6774         better. GList does a lock every time you allocate a list link,
6775         so that it can use a memory pool. So, it is better to just use
6776         a memory pool of our own.
6777         
6778         * ssa.c, linear-scan.c: replace g_list_remove_link with
6779         g_list_delete.  The remove one does not free the GList, so we were
6780         leaking memory. On -O=all --compile-all with corlib, this cut down
6781         3 MB of allocations.
6782
6783 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
6784
6785         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
6786
6787         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
6788
6789         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
6790         into a new function mono_create_jit_trampoline ().
6791
6792 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
6793
6794         * trace.c (get_spec): Allow tracing of classes without a namespace.
6795
6796 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
6797
6798         * mini.c: Fix pointer overwrite in mini_method_compile.
6799
6800 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
6801
6802         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
6803         The darwin ABI needs some special handling for 1 and 2 byte structs
6804         Lets use lbz/lhz instead of lwz everywhere.
6805         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
6806         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
6807         Use stb/sth for the former, and put the latter always on stack instead of in
6808         argument registers.
6809
6810 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
6811
6812         * trace.c (is_filenamechar): Add '_'.
6813
6814 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
6815
6816         * mini-s390.c: Fix prolog length to allow for large trace requirements.
6817
6818         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
6819
6820 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
6821
6822         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
6823         depends on libmonogc. Fixes #68805.
6824
6825 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
6826
6827         * mini.c (mono_jit_free_method): Provide extra information for
6828         this error.  Currently this leaks, but will be turned into a
6829         developer option in the future.
6830
6831 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
6832
6833         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
6834
6835 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
6836
6837         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
6838         boundary. Fixes reading of PATCH_INFO_R4 and R8.
6839         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
6840
6841 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
6842
6843         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
6844         trampolines for AOT code.
6845
6846 2004-10-22    <vargaz@freemail.hu>
6847
6848         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
6849         constructed types. Fixes #68136.
6850
6851 2004-10-21  Martin Baulig  <martin@ximian.com>
6852
6853         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
6854         if it returns true, unwind the stack to the call instruction.
6855
6856 2004-10-21    <vargaz@freemail.hu>
6857
6858         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
6859
6860         * mini.h: Bump AOT version number.
6861
6862         * objects.cs: Add another test for unbox trampolines.
6863
6864         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
6865         valuetype methods.
6866
6867 2004-10-20    <vargaz@freemail.hu>
6868
6869         * driver.c: Add SHARED to the set of optimizations tested.
6870
6871         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
6872
6873         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
6874         used by CEE_NEWARR.
6875
6876         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
6877
6878 2004-10-20  Martin Baulig  <martin@ximian.com>
6879
6880         * mini-exceptions.c (mono_handle_exception): Call
6881         mono_debugger_handle_exception() to tell the debugger about
6882         catch/finally clauses.
6883
6884 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
6885
6886         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
6887
6888         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
6889         #68447.
6890
6891 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
6892
6893         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
6894         methods as their native size, fixed bug #57543, #57545.
6895         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
6896         This saves a temporary register and mullw call down into 1 (minor perf
6897         increase for cases like sum = sum * 5;  This use to translate into:
6898             li r11,5
6899             mullw r28,r28,r11
6900         It now translates to
6901             mulli r28,r28,5
6902
6903 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
6904
6905         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
6906         #68388.
6907
6908 2004-10-11  Martin Baulig  <martin@ximian.com>
6909
6910         * mini.c (mono_method_to_ir): If we're a generic method, get the
6911         MonoGenericContainer from our MonoMethodNormal and create a
6912         MonoGenericContext from it.
6913
6914 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
6915
6916         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
6917
6918         * basic-long.cs: Add test for checked i8->i2 cast.
6919
6920 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
6921
6922         * inssel-ppc.brg: added a couple of speedup rules.
6923
6924 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
6925
6926         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
6927         to speed up rebuilds.
6928
6929 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6930
6931         * mini-s390.c: Minor fix to OP_OR_IMM.
6932
6933 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
6934
6935         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
6936         better. Fixes appdomain-unload.exe on sparc.
6937
6938 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
6939
6940         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
6941         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
6942         see bug 67324.
6943
6944 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
6945
6946         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
6947
6948 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
6949
6950         * mini.c: Always generate a field read/write wrapper for members
6951         of the class MarshalByRefObject since the actual instance could
6952         be a CBO.
6953
6954 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
6955
6956         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
6957
6958 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
6959
6960         * driver.c mini.h trace.c: Move the setting of the main assembly into
6961         a separate function called mono_trace_set_assembly () and call it after
6962         actually loading the main assembly. Fixes #66872.
6963
6964 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
6965
6966         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
6967         using the code manager.
6968
6969 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
6970
6971         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
6972
6973 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
6974
6975         * cpu-amd64.md: Fix bug in previous patch.
6976         
6977         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
6978         #66650.
6979
6980 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
6981
6982         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
6983         mini-exceptions.c: updates for changed stack walk interface.
6984
6985 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6986
6987         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
6988
6989 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
6990
6991         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
6992
6993 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
6994
6995         * driver.c (mini_regression_list): Do not call mono_assembly_close 
6996         since assemblies can't be unloaded.
6997         
6998 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
6999
7000         * cpu-amd64.md: Fix more instruction lengths.
7001
7002         * cpu-amd64.md: Fix lengths of some instructions.
7003
7004 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
7005
7006         * inssel.brg: Make the array ldelema check aot friendly.
7007
7008 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
7009
7010         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
7011
7012         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
7013
7014 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
7015
7016         * mini-x86.c: Fix build.
7017
7018         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
7019         mono_type_get_underlying_type () helper function to simplify code.
7020         
7021 2004-09-09  Martin Baulig  <martin@ximian.com>
7022
7023         * mini-amd64.c: Don't access `type->data.klass' directly, call
7024         mono_class_from_mono_type() instead since the type may be a
7025         generic instance.
7026
7027 2004-09-09  Martin Baulig  <martin@ximian.com>
7028
7029         * mini-amd64.c (get_call_info): Fix support for generic instances.
7030         (add_valuetype): Use mono_class_from_mono_type() to get the class
7031         since we can be a generic instance.
7032
7033 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
7034
7035         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
7036
7037 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
7038
7039         * liveness.c: reset spill costs on each scan: bug 62107
7040
7041 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
7042
7043         * exceptions-sparc.c (mono_arch_find_jit_info): remove
7044         unnecessary line that doesn't compile
7045
7046 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7047
7048         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
7049         trampolines, make them call an error function so people can fix their
7050         code.
7051
7052 2004-09-06  Martin Baulig  <martin@ximian.com>
7053
7054         * mini.c (mono_method_to_ir): When initializing locals, handle a
7055         generic instances like a valuetype if it's a valuetype and like a
7056         class if it's a class.
7057
7058 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7059
7060         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
7061         stack. Fixes #64674.
7062
7063         * exceptions.cs: Add test for unwinding of call arguments.
7064
7065 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
7066
7067         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
7068         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
7069         set the carry/borrow flag). The sparc and s390 implementations
7070         can now use optimized versions (and simplify the code). ppc bugfixes.
7071
7072 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7073
7074         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
7075
7076 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
7077
7078         * inssel-amd64.brg: Remove leftover 32 bit rule.
7079
7080         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
7081
7082 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
7083
7084         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
7085         mono_arch_find_jit_info functions into a new function. Fix a memory
7086         leak.
7087
7088         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
7089         refactored code.
7090         
7091 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
7092
7093         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
7094         as well.
7095         
7096         * exceptions.cs: Add array size tests.
7097
7098         * mini.c: Allocate a separate icall wrapper for each arity of 
7099         mono_array_new_va. Fixes #59509.
7100
7101         * exceptions.cs: Add testcase for 64578.
7102
7103         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
7104
7105         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
7106         
7107 2004-09-02  Martin Baulig  <martin@ximian.com>
7108
7109         * mini.c (mono_method_to_ir): When initializing the locals, call
7110         handle_initobj() on the generic instance itself, not its
7111         underlying type.
7112
7113 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
7114
7115         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
7116         MonoJitInfo for dynamic methods.
7117
7118         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
7119
7120         * mini.c: Add support for freeing JIT data for dynamic methods.
7121         
7122 2004-09-01  Martin Baulig  <martin@ximian.com>
7123
7124         * mini-x86.c (is_regsize_var): Added support for generic
7125         instances.
7126         (mono_arch_emit_prolog): Make this compile again, use
7127         `x86_push_imm_template (code)'.
7128
7129 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
7130
7131         * mini-x86.c: make all push_imm instructions that get
7132         patched always emit the long form
7133
7134 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
7135
7136         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
7137         in a per-domain hash.
7138
7139         * mini-amd64.c (merge_argument_class_from_type): Handle generic
7140         types.
7141
7142 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
7143
7144         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
7145         work.
7146         
7147         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
7148         work.
7149
7150         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
7151         Beginnings of SSE2 support.
7152
7153         * exceptions.cs: Add more tests for checked int<->uint casts.
7154
7155 2004-08-28  Martin Baulig  <martin@ximian.com>
7156
7157         * mini-x86.c (mono_arch_instrument_epilog): Added support for
7158         generic instances.
7159
7160         * mini.c
7161         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
7162         Handle generic instances recursively.
7163
7164 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
7165
7166         * iltests.il: test for conv.u8 on a constant
7167
7168 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
7169
7170         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
7171         LCONV_x4 (shrun_32 (membase)).
7172
7173 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
7174
7175         * inssel-x86.brg: c&p rules for push/setret of long
7176
7177 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
7178
7179         * inssel-x86.brg: c&p rules for compare (base, regvar) and
7180         compare (regvar, base)
7181
7182         * inssel-x86.brg: more burg love
7183
7184         * inssel.brg: more cleanup
7185
7186         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
7187
7188 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
7189
7190         * basic-long.cs, basic-calls.cs: new tests for optimization.
7191
7192 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
7193
7194         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
7195         patch.
7196
7197 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
7198
7199         * mini-amd64.c (read_tls_offset_from_method): Add another case.
7200         
7201 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
7202
7203         * inssel.brg (mini_emit_memcpy): use 
7204         NO_UNALIGNED_ACCESS to disable memcpy optimization
7205
7206 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
7207
7208         * mini-amd64.c: Handle generic types in various places.
7209
7210         * mini.c (mono_method_to_ir): Handle generic types in init locals.
7211
7212 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
7213
7214         * mini.c (handle_box): Fix warning.
7215
7216         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
7217
7218         * mini-amd64.h: Enable the emit_state optimization.
7219
7220         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
7221
7222         * mini-amd64.c: Add some new 64 bit peephole opts.
7223
7224         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
7225
7226         * cpu-amd64.md: sreg1 of div instructions must be %rax.
7227
7228         * mini-amd64.c: Register allocator fixes.
7229
7230         * mini.c: Add an optimization to emit_state to avoid allocation of new
7231         registers on some platforms.
7232
7233 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
7234
7235         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
7236
7237         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
7238         allocation. Fixes #63085.
7239
7240         * basic-long.cs: Add new regression test.
7241
7242         * mini-amd64.c: Register allocator improvements.
7243
7244 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
7245
7246         * mini-amd64.c (read_tls_offset_from_method): Add another code
7247         sequence.
7248
7249         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
7250         instruction sequence for nullifying class init trampolines.
7251
7252         * objects.cs: Add new regalloc test.
7253
7254         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
7255
7256 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
7257
7258         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
7259         
7260         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
7261         arguments.
7262
7263         * driver.c: Fix profiling after TLS changes.
7264         
7265         * driver.c (mono_main): Set mono_stats.enabled if needed.
7266
7267         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
7268         CEE_BOX.
7269
7270 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
7271
7272         * mini-x86.c: use a 1 op rather than a 2 op tls access
7273         instruction -> faster.
7274
7275 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
7276
7277         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
7278         x86 backend.
7279
7280 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
7281
7282         * exceptions-sparc.c (throw_exception): fix typo
7283
7284 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
7285
7286         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
7287         set tree->dreg correctly with tls. Allow any
7288         register to be used.
7289
7290         * mini-x86.c (read_tls_offset_from_method): add new code
7291         generation pattern seen with GCC.
7292
7293
7294 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
7295
7296         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
7297         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
7298         exceptions-sparc.c: fix some performance issues in exception
7299         handling and setting of the stack trace for exceptions that were
7300         already thrown.
7301
7302 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
7303
7304         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
7305         x86 backend.
7306         
7307         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
7308         registers.
7309
7310 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
7311
7312         This patch inlines tls access, when possible.
7313         
7314         * mini.h: new arch functions for TLS intrinsics.
7315         All platforms updated with a stub.
7316
7317         * mini.c: use the new intrinsics
7318
7319         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
7320         arch specific intrinsic for tls variables
7321
7322 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
7323
7324         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
7325         under windows.
7326
7327 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
7328
7329         * mini.c: thread local allocation
7330
7331 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
7332
7333         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
7334
7335         * Makefile.am: Link against the static version of libmonogc.
7336         
7337         * Makefile.am: Link the static versions of the convenience libraries
7338         into the mono executable.
7339
7340         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
7341
7342 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
7343
7344         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
7345         on integer overflow.
7346
7347         * mini-amd64.c: Reorganize function call code.
7348
7349         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
7350
7351 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
7352
7353         * inssel-x86.brg: use xor eax,eax.
7354         
7355         * basic.cs: new tests
7356
7357 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
7358
7359         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
7360         in exception throwing code.
7361         
7362 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
7363
7364         * inssel-x86.brg: use xor esi,esi.
7365
7366 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
7367
7368         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
7369         can trace methods compiled during mini_init () too.
7370
7371         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
7372         CEE_CONV_U4.
7373
7374 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
7375
7376         * Makefile.am: static link on x86 (r=zoltan)
7377
7378 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
7379
7380         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
7381         code since it causes some programs to fail.
7382
7383 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
7384
7385         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
7386
7387 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
7388
7389         * mini.c: ovfops_op_map - add STACK_OBJ case for
7390         CONV_I 
7391         * basic.cs: add test_0_pin_string as test
7392         case for above.
7393
7394 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
7395
7396         * Makefile.am: build C# if srcdir != builddir
7397
7398 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
7399
7400         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
7401         fall-through blocks.
7402
7403 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
7404
7405         * driver.c: enable loop by default again and include abcrem in -O=all.
7406
7407 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
7408
7409         * iltests.il: Add some localloc tests.
7410
7411         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
7412
7413         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
7414         Fixes #62574.
7415
7416         * inssel-amd64.brg: Add some optimizations.
7417
7418         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
7419         for gcc-3.4.
7420
7421         * Makefile.am: Statically link mono against libmono on AMD64.
7422         
7423         * mini-amd64.c inssel-amd64.brg: Optimizations.
7424
7425 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
7426
7427         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
7428
7429         * tramp-amd64.c: Patch calling code in trampolines.
7430
7431 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
7432
7433         * mini-amd64.c: pinvoke struct passing fixes.
7434
7435 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
7436
7437         * mini-sparc.c: redo change, make mono_arch_cpu_init call
7438         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
7439
7440 2004-08-05  Duncan Mak  <duncan@ximian.com>
7441
7442         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
7443         CEE_LDELEM_ANY.
7444
7445 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
7446
7447         * mini-amd64.c (emit_move_return_value): Move return value for normal
7448         calls too.
7449
7450 2004-08-05  Martin Baulig  <martin@ximian.com>
7451
7452         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
7453         `type->type'; just modify `type' itself when dealing with enums
7454         and generic instances.
7455         (check_call_signature): Make `simple_type' a `MonoType *'.
7456
7457 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
7458
7459         * mini.c: Use OP_PADD to add offsets to addresses.
7460
7461         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
7462
7463 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
7464
7465         * mini-sparc.c (mono_arch_emit_epilog): fix check
7466         for folding last op into restore instruction
7467
7468 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
7469
7470         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
7471         helper methods using the code manager.
7472         
7473         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
7474
7475         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
7476
7477 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
7478         
7479         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
7480           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
7481
7482         * mini-s390.c: fix tail processing
7483
7484 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
7485
7486         * mini-ppc.c: mul.ovf.un exception name fix.
7487
7488 2004-08-03  Martin Baulig  <martin@ximian.com>
7489
7490         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
7491         instances; before jumping to `handle_enum', also modify `ptype'.
7492
7493 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
7494
7495         * cpu-sparc.md: fcall maximal length too small.
7496
7497 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
7498
7499         * mini-amd64.c mini.h: Add initial support for passing/returning 
7500         structures to/from pinvoked methods.
7501
7502 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
7503
7504         * mini-ppc.c: reg allocator fix.
7505
7506 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
7507
7508         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
7509
7510         * inssel.brg: Optimize memset on 64 bit machines.
7511
7512         * mini-amd64.c: Fix some vararg cases.
7513
7514 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
7515
7516         * mini-s390.c: Corrected macro in emit_float_to_int
7517
7518         * s390-abi.cs: Tests to exercise the s390 ABI
7519
7520 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
7521
7522         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
7523         caller saved regs.
7524
7525         * basic.cs: Add a test for add.ovf.un.
7526
7527 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
7528
7529         * mini-sparc.c: add case for OP_IDIV_UN
7530
7531 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
7532
7533         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
7534         
7535         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
7536
7537 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
7538
7539         * basic.cs: regression tests.
7540
7541         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
7542         regressions.
7543
7544 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
7545
7546         * basic.cs: Add a new test.
7547
7548         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
7549         and AOT. Various fixes and optimizations.
7550
7551         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
7552
7553 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
7554
7555         * mini-ppc.c: make sure temp regs are not used for global reg
7556         allocation.
7557
7558 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
7559
7560         * cpu-sparc.md: conv_i8 fix for 64bits
7561
7562         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
7563
7564 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
7565         
7566         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
7567         add opcode for cmp BYTE PTR [eax], imm.
7568
7569         * inssel.brg: Make memcpy and memset takes bases.
7570
7571 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
7572
7573         * *-amd64.*: More AMD64 work.
7574         
7575 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
7576
7577         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
7578         add a compare-not-equal opcode.
7579         
7580 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
7581
7582         * mini.c: Use mono_init_from_assembly instead of mono_init.
7583         
7584 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
7585
7586         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
7587
7588         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
7589
7590         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
7591
7592         * inssel.brg: 64 bit fixes.
7593
7594         * mini.h (MonoCallInst): Add some AMD64 specific data.
7595
7596         * mini.h: Add some OP_P opcodes.
7597
7598 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
7599
7600         * basic.cs: tests for 61797 and 61740
7601
7602 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
7603
7604         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
7605         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
7606
7607 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
7608
7609         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
7610
7611         * *-amd64*.*: Ongoing AMD64 work.
7612
7613 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
7614
7615         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
7616
7617         * *-amd64*: Ongoing AMD64 work.
7618
7619         * mini-arch.h: Add AMD64 support.
7620
7621         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
7622
7623         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
7624
7625         * mini-ops.h: Add new opcodes.
7626
7627         * Makefile.am: Add AMD64 support.
7628
7629         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
7630         rules into the inssel-long*.brg files.
7631
7632         * *-amd64.*: Add beginnings of AMD64 backend.
7633
7634 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
7635
7636         * mini.c (print_dfn): commenting out the code that prints
7637         the cil. With -O=deadce, this makes -v -v crash.
7638         
7639         * cpu-pentium.md: make checkthis have a length of 2
7640
7641 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
7642
7643         * mini-sparc.h: fix implementations of __builtin
7644         functions for Sun compiler for V9.
7645
7646 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
7647
7648         * mini.c: use the new stelem.ref wrapper
7649         * exceptions.cs, arrays.cs: new stelem.ref tests
7650
7651 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
7652
7653         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
7654         new XSP should work with these changes).
7655
7656 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
7657         
7658         * inssel-{long32,x86,}.brg: trivial optimizations.
7659         
7660 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
7661
7662         * mini.c: load value when emitting box operation in
7663         constrained calls.
7664
7665 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
7666
7667         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
7668         is one byte shorter than cmp DWORD PTR [eax], 0.
7669
7670 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
7671
7672         * inssel-ppc.brg: arguments on the stack are always
7673         relative to the stack pointer (spotted by Neale Ferguson).
7674
7675 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7676
7677         * exceptions-x86.c: delay appending the method name to the trace until
7678         after mono_jit_info_table_find is called, as this gets the real
7679         MonoMethod.
7680
7681 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
7682
7683         * aot.c: register roots
7684
7685 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
7686
7687         * aot.c : I could just use PLATFORM_WIN32 flag.
7688
7689 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
7690
7691         * aot.c : Reverting the previous fix. This time it broke linux build.
7692
7693 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
7694
7695         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
7696
7697 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
7698
7699         * mini.c (handle_stack_args): Remove some more debugging code.
7700         
7701         * mini.c (handle_stack_args): Remove debug output left in by mistake.
7702
7703         * driver.c mini.h aot.c: Allow additional options to be specified with
7704         --aot and pass them to mono_compile_assembly.
7705
7706         * aot.c: Add experimental code to AOT compile all loaded assemblies
7707         on demand and save the code into a cache in the filesystem.
7708
7709         * aot.c: Add support for more wrapper methods.
7710         
7711         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
7712         58863.
7713
7714         * cpu-*.md: Remove removed opcodes.
7715
7716         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
7717         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
7718         related icalls to marshal.c.
7719
7720 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
7721
7722         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
7723
7724         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
7725
7726         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
7727
7728 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
7729         * liveness.c: If liveness is recomputated we need to reset the information
7730         for each variable. This way, if the liveness range has been narrowed
7731         by optimizations that happened after the last computation, we can return
7732         a smaller range.
7733         
7734         For example, if you have
7735         
7736         {
7737                 int i = 0;
7738                 
7739                 // Tons of code that does not affect i
7740                 
7741                 i = foo ();
7742                 ...
7743         }
7744         
7745         i = 0 is dead code and will be removed by SSA. However, when
7746         linear scan gets to the code, i will still appear to be live
7747         throughout the entire block. This prevents good register allocation.
7748
7749 2004-07-06  Martin Baulig  <martin@ximian.com>
7750
7751         * debug-mini.c (mono_debug_init_method): Allow
7752         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
7753         (mono_debug_add_icall_wrapper): New method.
7754
7755         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
7756
7757 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
7758
7759         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
7760         optimization.
7761
7762 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
7763
7764         * aot.c (mono_aot_load_method): Fix loading of debug info.
7765
7766 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
7767
7768         * aot.c: Add logging support.
7769
7770 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
7771
7772         * mini.h: Add prototype for mono_print_method_from_ip.
7773
7774         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
7775
7776         * inssel.brg: 64 bit fixes.
7777
7778         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
7779         inssel-long32.brg.
7780
7781         * Makefile.am: Add SPARC64 support.
7782
7783 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
7784
7785         * aot.c: Fix alignment problems on 32 bit platforms.
7786
7787 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
7788
7789         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
7790         SPARC64.
7791
7792         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
7793         problems.
7794
7795         * mini.h: Bump AOT file version. Some 64 bit fixes.
7796
7797 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
7798
7799         * inssel-sparc.brg: Add new rule to avoid register moves.
7800
7801         * inssel.brg: Add ldind_to_load_membase helper function.
7802
7803 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
7804
7805         * mini.c: OffsetToStringData intrinsic.
7806         
7807 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
7808
7809         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
7810
7811         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
7812         regression tests.
7813
7814         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
7815 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
7816
7817         * mini.c: reinstated mono_compile_get_interface_var()
7818         on x86, too, since the change breaks the Gtk# build there as well.
7819
7820 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
7821
7822         * driver.c: remove loop from the default optimizations: it seems to
7823         interact badly with some of the other options (see bug #60613).
7824
7825 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
7826
7827         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
7828         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
7829
7830 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
7831
7832         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
7833         vararg-using methods.
7834
7835 2004-06-21  Martin Baulig  <martin@ximian.com>
7836
7837         * mini/mini-exceptions.c
7838         (mono_handle_exception): Added `gpointer original_ip' argument.
7839         After calling mono_unhandled_exception(), call
7840         mono_debugger_unhandled_exception() and if that returns true,
7841         restore the context and return.
7842
7843 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
7844
7845         * mini-ppc.c: prefer the use of relative branches so
7846         they won't need to be patched in aot code (patch from Patrick Beard).
7847
7848 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
7849
7850         * aot.c: patch from Patrick Beard to make the output assembly
7851         more correct for the MacOSX assembler. Small tweak to
7852         generate sane images on Linux/PPC, too.
7853
7854 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
7855
7856         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
7857         case until bug #59509 is fixed (shows up in #60332).
7858
7859 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
7860
7861         * mini.c: make sure the needed wrappers are compiled, too, with
7862         precomp.
7863
7864 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
7865
7866         * driver.c: remove NPTL reference in --version output.
7867
7868 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
7869
7870         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
7871         generate valid assembly for the Mach-O assembler.
7872
7873 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
7874
7875         * driver.c: don't include abcrem in the all optimization specifier
7876         since it slows down jit compilation too much for now.
7877
7878 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
7879
7880         * mini.c: use BIGMUL only if both operands have the same signage.
7881         * iltests.il: Test for bug 60056. (errors related to signage in
7882         BIGMUL).
7883
7884         r=lupus.
7885
7886 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
7887
7888         * mini.c, aot.c: memory leak fixes.
7889
7890 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
7891
7892         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
7893
7894 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
7895
7896         * Makefile.am: remove the -static hack completely, it links in
7897         statically glib as well.
7898
7899 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
7900
7901         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
7902         * exceptions.cs: make it compile with new mcs/csc.
7903
7904 2004-06-03 Massimiliano Mantione <massi@ximian.com>
7905         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
7906         and added relevant test case.
7907
7908 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
7909
7910         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
7911         regressions in gtk-sharp.
7912
7913 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
7914
7915         * exceptions.cs: New regression tests.
7916
7917         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
7918
7919 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
7920
7921         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
7922
7923 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
7924
7925         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
7926
7927         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
7928
7929 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
7930
7931         * mini.c (mono_jit_runtime_invoke): Init class in this
7932         method instead of trusting mono_jit_compile_method to
7933         do the work (because wrappers can be in object class)
7934
7935 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
7936
7937         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
7938
7939         * basic-long.cs: New regression test.
7940
7941 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
7942
7943         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
7944         and div/rem checks.
7945
7946 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
7947
7948         * Makefile.am: fix miguel's change to build mono statically against
7949         libmono (track build dependencies).
7950
7951 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
7952
7953         * cfold.c: Some glib versions do not have G_MININT32.
7954
7955 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
7956
7957         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
7958         with precision of tan, atan, sin and cos, and implemented related
7959         regressions tests (fixes bug 54467, but one new problem appeared and
7960         is not fixed yet).
7961
7962 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
7963
7964         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
7965
7966         * exceptions.cs: Add test for constant folding && division by zero.
7967
7968         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
7969         since driver.c is in libmono too, so the optimization was useless.
7970
7971         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
7972         variable to driver.c so the compiler can emit more efficient code to
7973         access them.
7974
7975 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7976
7977         * Makefile.am: don't distribute generated inssel.[ch] files.
7978
7979 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
7980
7981         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
7982         into the default appdomain. Fixes #58707.
7983
7984         * jit-icalls.c: Remove the broken approximation for truncl, doing
7985         no conversion is better.
7986
7987         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
7988         Fixes #58863.
7989
7990 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
7991
7992         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
7993         of the mcrxr instruction which is not available on some processors
7994         even if it's documented to be. Implement add and sub overflow correctly
7995         (still not complete for long unsigned). Speed up icalls a bit.
7996
7997 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
7998
7999         * mini.c (mono_jit_compile_method_with_opt): Make sure that
8000         we run .cctor in the current domain instead of target_domain.
8001         
8002         Fixes bug #58558, .cctor not being called in -O=shared.
8003
8004 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8005
8006         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
8007
8008 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
8009
8010         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
8011         which can be done with an imm8, do it that way.
8012         (mono_arch_output_basic_block): ditto for a jmp
8013         (mono_arch_emit_prolog): Computate maximum offset of a label.
8014
8015 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
8016
8017         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
8018         now tries to allocate prefered physical reg's for virtual
8019         regs. This reduces the number of emited spills/loads with
8020         20-30% on our core assemblies.
8021
8022 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
8023
8024         * jit-icalls.c: truncl() is not needed and trunc() is
8025         the correct thing to do anyway (bug #58287).
8026
8027 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
8028
8029         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
8030         if available.
8031
8032 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8033
8034         * driver.c: enable loop optimizations by default.
8035
8036 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
8037
8038         * mini-x86.c: fix calc of max loop size when aligning loops start.
8039
8040 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
8041
8042         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
8043         the stack.
8044
8045 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
8046
8047         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
8048         should set carry.
8049
8050         * basic-long.cs: Add tests for add/subtract of immediates with carry.
8051
8052         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
8053         
8054         * mini.c (inline_method): Allways inline some wrappers even if the cost
8055         is too large. Fixes #58785.
8056
8057         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
8058         
8059 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
8060
8061         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
8062         (crichton@gimp.org). Beginning of support for sparc/linux.
8063
8064         * mini-sparc.c: Optimize retrieval of LMF address.
8065
8066 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
8067
8068         * exceptions-ppc.c:  handle alloca in methods with clauses.
8069
8070 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
8071
8072         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
8073
8074 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
8075
8076         * mini.c: Delegate most of the abort signal work to 
8077           mono_thread_request_interruption, which also handles Stop and Suspend
8078           states.
8079
8080 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
8081
8082         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
8083         supports the save/restore lmf opcodes.
8084
8085 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
8086
8087         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
8088         by gcc-3.4 as well.
8089
8090         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
8091
8092 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
8093
8094         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
8095         methods which contain array accesses.
8096
8097         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
8098         boundaries. Fixes #58537.
8099
8100         * iltests.il: Add regression test for #58537.
8101
8102 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
8103
8104         * mini-x86.c (mono_arch_local_regalloc): Last part of
8105         fix for bug #58633 (releasing register to early).
8106
8107 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
8108
8109         * basic-long.cs: Add new regression test.
8110
8111 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
8112
8113         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
8114         register too early on the chain.
8115
8116 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
8117
8118         * mini.c (create_helper_signature): Use a helper function to reduce
8119         the code which needs to be written. Also set the calling convention of
8120         icalls on windows. Fixes #57840.
8121
8122 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
8123
8124         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
8125         exceptions-ppc.c: added helper function to get the instruction address
8126         from a signal handler context.
8127
8128 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
8129
8130         * helpers.c: use g_get_tmp_dir. Invokes happyness 
8131         from gonzalo.
8132
8133 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
8134
8135         * helpers.c: Add new env variable to pass args to objdump.
8136         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
8137
8138 2004-05-17  Radek Doulik  <rodo@ximian.com>
8139
8140         * Makefile.am (common_sources): added abcremoval.h so it get
8141         disted and daily mono packages on go-mono.com will build again
8142
8143 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
8144
8145         * abcremoval.c: Fixed coding style, added copyright header.
8146
8147         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
8148
8149         * mini.h: Added prototype for abc removal main function.
8150
8151         * build_relations_propagation_table.pl: Added copyright header.
8152
8153 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
8154
8155         * basic-long.cs: reg test for complex ceq_long bug.
8156
8157 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
8158
8159         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
8160         reg in long and clob case (bug #58343). Fixed/added comments.
8161
8162 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
8163
8164         * mini.c (mono_jit_runtime_invoke): Follow new convention
8165         of calling the invoke method with an function pointer.
8166
8167 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
8168
8169         * ChangeLog: Fix author of memory leak patch.
8170
8171 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
8172
8173         * Makefile.am: fix make dist as well...
8174
8175
8176 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
8177
8178         * cfold.c: Made so that conversions from pointer to int4 are no-ops
8179         on archs where pointers are 4 bytes long.
8180
8181         * Makefile.am: Added abcremoval.c source file.
8182
8183         * abcremoval.c: Added abcremoval.c.
8184
8185         * abcremoval.h: Added abcremoval.h.
8186
8187         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
8188
8189         * inssel.brg: Enabled bounds check removal.
8190
8191         * mini.c: Added support for abcrem optimization.
8192
8193         * mini.h: Added abcrem optimization label.
8194
8195         * driver.c: Added support for abcrem optimization.
8196
8197         * propagated_relations_table.def: Added propagated_relations_table.def.
8198
8199 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
8200
8201         * mini.c, cfold.c: fix style.
8202
8203 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8204
8205         * mini.c: handle issue with the low-level implementation of
8206         some long opcodes (bug #54209).
8207
8208 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
8209
8210         * basic.cs: test for my new cmov stuff.
8211
8212 2004-05-13      Patrik Torstensson
8213
8214         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
8215         opt and added peephole documentation.
8216
8217 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
8218
8219         * tramp-ppc.c: rewrote the generic trampoline code.
8220
8221 2004-05-11      Patrik Torstensson
8222
8223         * mini-x86.c: optimize long shl/shr asm code (one less branch)
8224
8225 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
8226
8227         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
8228
8229         * mini.h mini.c dominators.c: Applied patch from Derek Woo
8230         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
8231
8232         * mini.c: Add new icalls for AsAny marshalling.
8233
8234 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
8235
8236         * tramp-ppc.c, mini-ppc.c: more cleanups.
8237
8238 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8239
8240         * mini.c: no warnings.
8241
8242 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
8243
8244         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
8245
8246 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
8247
8248         * mini.c: In the thread abort signal handler, if the thread is in the
8249         process of being stoped, don't throw the Abort exception, just stop the
8250         thread.
8251
8252 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
8253
8254         * tramp-ppc.c: removed old code.
8255
8256 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
8257
8258         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
8259         do some simple speed optimizations on ppc.
8260
8261 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
8262
8263         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
8264         and large offsets in load/store.
8265
8266 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
8267
8268         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
8269         it causes regressions.
8270
8271 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
8272
8273         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
8274         support.
8275
8276 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8277
8278         * jit-icalls.c: remove warnings.
8279         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
8280         speedups for unsafe code.
8281
8282 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
8283
8284         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
8285
8286 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
8287
8288         * basic-calls.cs: Add new regression test.
8289
8290         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
8291         more portable.
8292
8293         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
8294
8295         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
8296         is no longer used.
8297
8298 2004-05-06      Patrik Torstensson
8299
8300         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
8301         long reg allocation in any reg (not only eax:edx) and implemented 
8302         long shl/shr ops in asm instead of helpers.
8303
8304 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
8305
8306         * mini-sparc.h: Fix warnings.
8307
8308         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
8309         stack.
8310
8311         * mini-exceptions.c (mono_handle_exception): Call the filter in a
8312         separate statement for clarity.
8313
8314         * mini-sparc.c: Update status.
8315
8316 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
8317
8318         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
8319         here.
8320
8321 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
8322
8323         * inssel-ppc.brg: another small pre-release workaround:
8324         we don't do overflow detection for long_sub_un.
8325
8326 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8327
8328         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
8329         (also works around a weird ppc bug: 57957).
8330
8331 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
8332
8333         * tramp-ppc.c: trampoline fixes.
8334
8335 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
8336
8337         * mini-ppc.c: fixed typos.
8338
8339 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8340
8341         * mini-ppc.c, exceptions-ppc.c: more code saves registers
8342         at the top of the stack. Fixed typos. Use a frame registers
8343         for all the methods with exception clauses.
8344
8345 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
8346
8347         * exceptions-ppc.c: restore fp registers.
8348
8349 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
8350
8351         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
8352         order from the stack top (moved the stack room to save the
8353         return value for trace after the param area). Fixed corruption
8354         in restoring registers on unwind.
8355
8356 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8357
8358         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
8359
8360 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
8361
8362         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
8363         and prolog/epilog for methods that use it. Allow
8364         enough param area room for varargs methods. Fix miguel's
8365         breakage in exception handling.
8366
8367 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
8368
8369         * Makefile.am: run genmdesc only on current arch.
8370
8371 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8372
8373         * exceptions-x86.c:
8374         * mini-x86.h: fix the build on windows.
8375
8376 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
8377
8378         * 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.
8379
8380         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
8381
8382         * mini-exceptions.c: New file.
8383         
8384         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
8385         Move some parts of the x86 exception handling code to an 
8386         arch-independent file so it can be shared with other ports.
8387
8388 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
8389
8390         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
8391
8392 2004-04-26  David Waite  <mass@akuma.org>
8393
8394         * driver.c: remove comma from end of enumeration declaration
8395
8396 2004-04-26  Jackson Harper  <jackson@ximian.com>
8397
8398         * driver.c: parse config file before loading first assembly. This
8399         allows the user gac to be enabled/disabled. 
8400         
8401 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
8402
8403         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
8404         simpler mechanism: we do not care what is encoded initially
8405         (branch absolute or relative), we care about the code and its
8406         target.  I kept the old code for reference for now.
8407
8408         The new code tries first to determine if the jump is anywhere in
8409         the -/+32 absolute meg range, if it succeeds, it encodes using the
8410         absolute branch;  If not, it tried to find something in the
8411         relative range, if not, it uses the handle_thunk code. 
8412
8413 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
8414
8415         * exceptions-ppc.c: use the correct ip register on macosx.
8416
8417 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
8418
8419         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
8420
8421 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
8422
8423         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
8424         Raise exception on integer divide by zero by hand since the hw
8425         doesn't support it. Handle NaNs in FP compares.
8426
8427 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
8428
8429         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
8430         code reducing duplication between the platforms and enabled
8431         signal exception handling (on linux for now).
8432
8433 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
8434
8435         * exceptions-ppc.c: more macosx support.
8436
8437 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
8438
8439         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
8440
8441 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
8442
8443         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
8444
8445 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
8446
8447         * iltests.il: more tests.
8448
8449 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
8450
8451         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
8452         vars as well.
8453
8454 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
8455
8456         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
8457
8458 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
8459
8460         * liveness.c: Mark variables as volatile in all basic blocks reachable
8461         from exception clauses.
8462
8463 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
8464
8465         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
8466         inlining.
8467
8468 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
8469
8470         * iltests.il, basic.cs: more tests for regalloc.
8471
8472 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
8473
8474         * iltests.il: Some tests for register allocation modifications
8475         I have locally.
8476
8477 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
8478
8479         * exceptions.cs: Add regression test for bug #56782.
8480
8481         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
8482         original stack trace if an exception is rethrown. Fixes #56782. Oh,
8483         the beauty of fixing the same thing in 5 different files...
8484
8485 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
8486
8487         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
8488         methods.
8489
8490 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
8491
8492         * mini.c: Add support for STRWLPARRAY marshalling convention.
8493
8494 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
8495
8496         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
8497         to init the context to setup the regs pointer).
8498
8499 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
8500
8501         * exceptions-ppc.c: more exceptions work.
8502
8503 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8504
8505         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
8506         not allowed.
8507
8508 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
8509
8510         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
8511         can use the memory directly.
8512
8513         * cpu-pentium.md: Update documentation from a post from Zoltan. 
8514
8515         add x86_add_membase, x86_sub_membase, x86_mul_membase
8516
8517 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
8518
8519         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
8520         GENERAL_REGS they were also hardcoded for all PPC ports.
8521
8522         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
8523
8524         Remove hard-coded limit for floating point registers, use
8525         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
8526
8527         Notice that in MacOS X calling conventions you can fit a lot more
8528         floating point values in registers, so I should update the PInvoke
8529         test to excercise the passing of floating point values on the
8530         stack (currently broken).
8531         
8532 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
8533
8534         * tramp-ppc.c (create_trampoline_code): Added
8535         JUMP_TRAMPOLINE_SIZE. 
8536         (ppc_magic_trampoline): Follow the pattern from
8537         x86_magic_trampoline: if code is set to zero, return. 
8538         (create_trampoline_code): Always pass MonoMethod to the jump
8539         trampoline, before it was passing a null.
8540         (mono_arch_create_jump_trampoline): Implement the jump stub, could
8541         share the code with mono_arch_create_jit_trampoline. 
8542
8543         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
8544         implemented.
8545         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
8546         implemented.  
8547
8548         * cpu-g4.md: Added length for jmp instruction, the worst case
8549         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
8550         for save_lmf).
8551
8552 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
8553
8554         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
8555
8556 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
8557
8558         * mini.c: Only set bblock->real_offset when adding a new bblock, and
8559         before each IL instruction.
8560
8561         * mini.c (CEE_BOX): Fix warnings.
8562
8563 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8564
8565         * mini.c: removed a few unused vars and extra whitespace.
8566
8567 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
8568
8569         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
8570         checks.
8571         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
8572         index.
8573         (OP_GETCHR): use the above
8574         (CEE_LDELEMA): use the above.
8575
8576         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
8577         version of the generic impl.
8578         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
8579         (CEE_LDELEMA): use the above.
8580
8581 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
8582
8583         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
8584         Fixes #56317.
8585
8586         * iltests.il: Added new regression test for #56317.
8587
8588 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
8589
8590         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
8591         under NetBSD. Fixes #56450.
8592
8593         * liveness.c (update_gen_kill_set): Fix previous patch.
8594
8595 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8596
8597         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
8598
8599 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
8600
8601         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
8602         ldsfld and ldsflda.
8603
8604         * inssel-sparc.brg: Add more optimizations.
8605
8606         * mini-sparc.c: Replace multiply/divide with shifts if possible.
8607
8608 2004-04-01  Martin Baulig  <martin@ximian.com>
8609
8610         * mini.c (handle_box): New static function; moved the
8611         implementation of CEE_BOX here.
8612         (mono_method_to_ir): Added `constrained_call' variable.
8613         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
8614         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
8615         mono_method_get_constrained() to get the method.
8616
8617 2004-04-01  Martin Baulig  <martin@ximian.com>
8618
8619         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
8620         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
8621         (mono_method_to_ir): We don't need these macros anymore since
8622         mono_class_get_full() already takes care of it. 
8623
8624 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8625
8626         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
8627         use @function (as doesn't accept #function here) and check the return
8628         value of system and stop if fails.
8629
8630 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8631
8632         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
8633
8634 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
8635
8636         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
8637
8638         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
8639
8640         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
8641         #56223.
8642
8643         * basic-long.cs: Add test for negation of Int64.MinValue.
8644
8645 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
8646
8647         * mini-sparc.c: Update status.
8648
8649         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
8650
8651         * exceptions-sparc.c: Fix return value in filters.
8652
8653         * inssel-sparc.brg: Fix register allocation in some rules.
8654
8655 2004-03-28  Martin Baulig  <martin@ximian.com>
8656
8657         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
8658         if neccessary.  
8659
8660 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
8661
8662         * mini-x86.c (mono_arch_patch_code): Fix warnings.
8663         
8664         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
8665         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
8666         remove unused conv_u4 opcode.
8667
8668         * mini-x86.c: Remove valgrind workaround since it slows down things
8669         even when mono is not run under valgrind.
8670
8671 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
8672
8673         * mini-sparc.c: Update status.
8674
8675         * inssel-sparc.brg: Add some optimizations.
8676
8677         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
8678         future delay slot filling. Add support for varargs, tail calls and JMP.
8679
8680         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
8681         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
8682
8683         * inssel.brg: Fix register allocation in OP_ARGLIST.
8684
8685         * inssel.brg: Fix warnings.
8686
8687 2004-03-25  Martin Baulig  <martin@ximian.com>
8688
8689         * mini.c (inflate_generic_field): Removed.
8690         (mini_get_method): Removed, use mono_get_method_full(),
8691         (mini_get_class): Removed, use mono_class_get_full().
8692         (mono_method_to_ir): Pass our generic context to
8693         mono_field_from_token().        
8694
8695 2004-03-25  Martin Baulig  <martin@ximian.com>
8696
8697         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
8698         of a `MonoMethod *'.
8699         (mini_get_method): Take a `MonoGenericContext *' instead
8700         of a `MonoMethod *'.
8701         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
8702         a new local variable called `generic_context' which holds the
8703         current `MonoGenericContext *'; use it to lookup things.
8704
8705 2004-03-24  Martin Baulig  <martin@ximian.com>
8706
8707         * mini.c (mini_get_class): New static method; if we're inside a
8708         generic instance, inflate the class if neccessary.
8709         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
8710
8711 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
8712
8713         * iltests.il: New regression test for #55976.
8714
8715         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
8716         #55976.
8717
8718 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
8719
8720         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
8721         output.
8722
8723 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
8724
8725         * liveness.c: Consider SSA stores as well as loads when making vars
8726         volatile.
8727
8728         * exceptions.cs: New regression tests for register allocation.
8729         
8730 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
8731
8732         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
8733         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
8734           domain lock only to protect puntual access to data structures.
8735           Added access lock for sighash, jit_icall_hash_name, 
8736           jit_icall_hash_addr and domain->code_mp.
8737
8738 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
8739
8740         * driver.c: Print SIGSEGV handling method.
8741
8742         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
8743
8744         * mini.c (setup_jit_tls_data): Handle case when this is called
8745         multiple times for a thread.
8746
8747         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
8748         is different from fbxx_un. Fixes #54303. Also use constants instead of
8749         magic numbers in a lot of places.
8750
8751 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
8752
8753         * exceptions.cs: Fix cctor test when --regression is used.
8754
8755 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
8756
8757         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
8758         for Linux/ppc.
8759
8760 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
8761
8762         * inssel-ppc.brg: fixed register assignments for some rules.
8763
8764 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
8765
8766         * exceptions.cs: Add test for exceptions in static constructors.
8767
8768         * mini.c (mono_jit_compile_method_with_out): Move the calling of
8769         static constructors outside the domain lock. Fixes #55720.
8770
8771 2004-03-17  Martin Baulig  <martin@ximian.com>
8772
8773         * mini.c (get_generic_field_inst): Removed, this'll never happen.
8774         (inflate_generic_field): Take the `MonoMethod *' instead of the
8775         `MonoClass *' and added support for generic method.
8776         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
8777         have a `field->parent->gen_params', only inflate the field if it's
8778         an open constructed type.
8779
8780 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
8781
8782         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
8783         exception object instead of the preconstructed ones.
8784
8785 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8786
8787         * mini.c: reverted changed to sigsegv_signal_handler commited
8788         accidentally in the previous patch.
8789
8790 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8791
8792         * mini.c:
8793         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
8794         running --aot with an old assembly.
8795
8796 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
8797
8798         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
8799         point values.
8800
8801         * mini-sparc.c: Add support for v9 branches with prediction.
8802
8803 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
8804
8805         * mini.c (mini_init): #warning is GNUC only
8806
8807         * mini-sparc.h: implement __builtin_frame_address
8808         and __builtin_return_address for Sun C compiler
8809
8810 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
8811
8812         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
8813
8814 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
8815
8816         * basic-calls.cs: Add test for unaligned byref long argument passing.
8817
8818         * mini-ops.h: Add sparcv9 compare and branch instructions.
8819
8820         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
8821         v9 instructions if we have a v9 cpu.
8822
8823         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
8824         registers for global allocation.
8825
8826         * exceptions-sparc.c: Fixes.
8827         
8828 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
8829
8830         * liveness.c (mono_analyze_liveness): Optimized version.
8831
8832         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
8833
8834         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
8835         sparc work.
8836
8837         * basic-float.cs basic-calls.cs: New regression tests.
8838
8839 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
8840
8841         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
8842         sigaltstack implementation.
8843
8844         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
8845         
8846         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
8847         stuff if SIGSEGV_ON_ALTSTACK is not defined.
8848
8849 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
8850
8851         * mini.c: Fix warnings.
8852         
8853         * mini.c (mono_resolve_patch_target): New function which contains the
8854         arch independent part of the patching process.
8855
8856         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
8857         patching code to a separate function.
8858
8859 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
8860
8861         * mini.c (add_signal_handler): ifdef out on Windows
8862
8863 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
8864
8865         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
8866         cpu-sparc.md: Add exception handling support + other fixes.
8867
8868         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
8869         typed GC detection in --version.
8870
8871         * basic.cs exceptions.cs: New regression tests.
8872
8873         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
8874         the arch specific code can store data during a compilation.
8875
8876         * mini-ops.h: Add OP_SETFRET.
8877
8878         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
8879         function, register a separate icall for each arity, so the icalls can
8880         get a wrapper.
8881         
8882         * mini.c (mono_print_tree): Print negative offsets in a more readable
8883         form.
8884         
8885         * mini.c: Make signal handling work on sparc.
8886         
8887         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
8888
8889         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
8890
8891         * jit-icalls.c: Emulate truncl by aintl on solaris.
8892
8893         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
8894
8895 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
8896
8897         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
8898
8899 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
8900
8901         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
8902         a MarshalByRef type, inline a method that performs the check, taking into
8903         account that the object can be a proxy. Also implemented tow new opcodes:
8904         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
8905         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
8906         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
8907
8908 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
8909
8910         * mini-ppc.c: if a relative branch displacement is too big
8911         but it points to and area reachable with an absolute branch, 
8912         avoid the thunks.
8913
8914 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
8915
8916         * mini.c: optimize small copies in cpblk.
8917
8918 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
8919
8920         * basic-calls.cs basic-float.cs: New regression tests.
8921
8922         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
8923         negative offsets from %fp. Implement localloc. Fix local register 
8924         allocation. Fix the case when the this argument needs to be saved to
8925         the stack. Implement some missing opcodes.
8926
8927 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
8928
8929         * mini.c (mini_method_compile): Reenable global regalloc in methods
8930         with exception handlers.
8931
8932         * linear-scan.c (mono_varlist_sort): Fix warning.
8933
8934         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
8935
8936         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
8937         regalloc costs.
8938
8939         * liveness.c: Make all variables uses in exception clauses volatile, to
8940         prevent them from being allocated to registers. Fixes #42136.
8941
8942 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
8943
8944         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
8945         causes regressions.
8946
8947         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
8948         argument to mono_arch_regalloc_cost.
8949
8950         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
8951         precisely.
8952
8953 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
8954
8955         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
8956         Make the cost of allocating a variable to a register arch dependent.
8957
8958         * basic-calls.cs: Fix compilation of tests.
8959         
8960         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
8961         helper function to cut back on the number of #ifdefs needed.
8962
8963         * mini-ppc.c: Fix compilation.
8964
8965         * basic-calls.cs: New regression tests.
8966
8967         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
8968
8969         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
8970         of l0 since that is callee saved.
8971
8972         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
8973         to virtual calls.
8974
8975         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
8976         of delay instruction.
8977
8978         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
8979
8980         * mini.h (MonoCallInst): Add 'virtual' flag.
8981
8982         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
8983
8984 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
8985
8986         * *.cs: New regression tests.
8987
8988         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
8989         work.
8990
8991         * mini.c (mono_runtime_install_handlers): Fix build.
8992
8993         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
8994         'signal_stack_size' members.
8995
8996         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
8997         alternate signal stack.
8998
8999         * exceptions-x86.c: Add stack overflow handling.
9000
9001         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
9002         functions to arch independent code.
9003
9004         * mini.c (mono_print_tree): Print more detailed info for load_membase
9005         opcodes.
9006         
9007 2004-02-23  Martin Baulig  <martin@ximian.com>
9008
9009         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
9010
9011 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
9012
9013         * mini-x86.c: fixed reg allocation for div/rem.
9014
9015 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
9016
9017         * driver.c (mono_main): Report some configuratio options on --version.
9018
9019 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
9020
9021         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
9022         low in the address space. Correctly flush memory in thunks where we
9023         output native code.
9024
9025 2004-02-20  Martin Baulig  <martin@ximian.com>
9026
9027         * mini.c (mini_get_method): New static method; inflate all generic
9028         methods and methods in open generic instances.
9029         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
9030         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
9031
9032 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
9033
9034         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
9035
9036         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
9037
9038 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
9039
9040         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
9041
9042         * mini-sparc.c (flushi mono_arch_output_basic_block): make
9043         it compile using Sun's compiler.
9044
9045 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
9046
9047         * 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.
9048
9049         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
9050
9051 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
9052
9053         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
9054         code.
9055         * mini-ppc.c: handle calls outside of the allowed range with thunks
9056         allocated using the code manager.
9057         * tramp-ppc.c: use the code manager to hold generated native code.
9058         Fixed the magic trampoline to just patch vtable entries.
9059
9060 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
9061
9062         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
9063         independent file.
9064
9065 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
9066
9067         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
9068         PPC.
9069
9070         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
9071         if we have a working __thread implementation.
9072
9073         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
9074         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
9075
9076 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
9077
9078         * mini-x86.c: Fix compilation under gcc 2.
9079         
9080 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
9081
9082         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
9083         contains a call to the wrapped function.
9084
9085         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
9086         OP_<CALL>_IMM opcodes, and use them under X86.
9087         
9088         * mini.c (mono_jit_find_compiled_method): Fix warning.
9089
9090         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
9091
9092         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
9093
9094         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
9095         functionality to mini.c.
9096
9097         * mini.c (mono_create_jump_trampoline): New function to create a jump
9098         trampoline. Return a compiled method instead of a trampoline if it
9099         exists. Add a cache for jump trampolines.
9100
9101         * mini.c (mono_jit_find_compiled_method): New function to return a
9102         compiled method if it exists.
9103
9104         * mini-x86.c: Call mono_create_jump_trampoline instead of 
9105         mono_arch_create_jit_trampoline.
9106
9107         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
9108         a jump trampoline. Fixes #52092.
9109         
9110 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
9111
9112         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
9113         which is not up-to-date. Add check_corlib_version () instead.
9114
9115         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
9116         have to call it.
9117         
9118         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
9119         since newer valgrind versions do not need it.
9120
9121         * mini.c (mono_jit_compile_method_with_opt): New helper function to
9122         compile a method with a given set of optimizations.
9123
9124         * mini.c: Compile icall wrappers on-demand instead of at startup.
9125
9126         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
9127         wrapper for an icall.
9128
9129 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
9130
9131         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
9132         #54063.
9133
9134         * iltests.il: Add test for non-empty stack before switch instruction.
9135
9136 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
9137
9138         * mini.c: Add support for new stringbuilder marshalling conventions.
9139
9140         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
9141
9142 2004-02-01  Martin Baulig  <martin@ximian.com>
9143
9144         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
9145         in `ginst->mtype_argv'.
9146
9147 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
9148
9149         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
9150         facilitate grepping.
9151
9152 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
9153
9154         * mini.c: fixed buglet in initobj generic implementation for references.
9155
9156 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
9157
9158         * Makefile.am: make the version script conditional.
9159         * jit-icalls.c: handle missing truncl().
9160
9161 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
9162
9163         * exceptions.cs: Add more tests for double->int conversion.
9164
9165         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
9166         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
9167
9168 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
9169
9170         * driver.c: make --verbose --version emit an error
9171         if the loaded corlib doesn't match the runtime version.
9172
9173 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
9174
9175         * mini-ppc.h: export ppc_patch().
9176         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
9177         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
9178         on par or better than on MacOSX.
9179
9180 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
9181
9182         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
9183         mono_lookup_pinvoke_call.
9184
9185         * mini-x86.c: Under windows, the default pinvoke calling convention is
9186         stdcall. Fixes #52834.
9187
9188         * mini.c (optimize_branches): Add an upper bound to the number of
9189         iterations to prevent infinite loops on strange loops. Fixes #53003.
9190
9191 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
9192
9193         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
9194         and ISINST. Fixes #52093.
9195
9196         * objects.cs (test_0_vector_array_cast): New tests.
9197         
9198 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
9199
9200         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
9201         checking in Array.Set ().
9202
9203         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
9204         #52590.
9205
9206         * object.cs (test_0_multi_array_cast): New regression test.
9207
9208 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
9209
9210         * exceptions-ppc.c: fix build on Linux/PPC.
9211
9212 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
9213
9214         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
9215         running under valgrind.
9216         (x86_magic_trampoline): Fix build bustage.
9217
9218         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
9219         negative values as well. This is needed for the encoding of the line number
9220         info, since sometimes the line numbers are not in increasing order.
9221
9222 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
9223
9224         * cpu-pentium.md (localloc): Increase the size of the localloc 
9225         instruction since it is a loop under Win32.
9226
9227         * debug-mini.c (record_line_number): Get rid of unneccesary memory
9228         allocation.
9229
9230 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
9231
9232         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
9233         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
9234         Max Horn (max@quendi.de). Fix file names in comments.
9235
9236 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
9237
9238         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
9239         avoid stack overflow.
9240         (replace_usage): Avoid uninitialized variable warnings.
9241
9242         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
9243         and taking the address of valuetype variables.
9244
9245 2004-01-03  Patrik Torstensson
9246
9247         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
9248         for other purposes than FP later on.
9249
9250 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
9251
9252         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
9253         of tail calls.
9254
9255 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
9256
9257         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
9258
9259 2003-12-30  Patrik Torstensson <p@rxc.se>
9260
9261         * mini-x86.h: Decreased number of availiable fp regs.
9262         Solves corner cases with FP spilling.
9263
9264 2003-12-23  Patrik Torstensson <p@rxc.se>
9265
9266         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
9267         for floating point stack tracking / spilling on x86. 
9268         Fixes bug #49012.
9269         
9270         * basic-float.cs: added float mul overflow test.
9271
9272 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
9273
9274         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
9275
9276 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
9277
9278         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
9279         supports for cond branches that overflow the immediate
9280         overflow offset. mcs can compile simple programs.
9281
9282 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
9283
9284         * exceptions-ppc.c: exception handling support wip:
9285         finally handlers get run on exception.
9286
9287 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
9288
9289         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
9290         profiling.
9291
9292 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
9293
9294         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
9295         initial support for stack walking and unwinding.
9296
9297 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
9298
9299         * driver.c (mono_main): Make corlib-out-of-sync message more 
9300         descriptive. Also remove verify_corlib call.
9301
9302 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
9303
9304         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
9305         not overlap with other call's arguments, too.
9306
9307 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
9308
9309         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
9310         move to arch-specific code the choice of arch-specific
9311         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
9312         * mini.c: ensure emulation calls will not interleave
9313         with other calls.
9314
9315 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
9316
9317         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
9318         the magic trampoline stack frame is dropped before executing
9319         the new method.
9320
9321 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
9322
9323         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
9324         and integer to fp conversions. Added support for overflowing
9325         arguments on the stack. Reserve a couple more registers as temps.
9326         Added support for aot compilation (as output still needs to be
9327         tweaked, though).
9328
9329 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
9330
9331         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
9332         Don't overwrite return register in some corner cases.
9333
9334 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
9335
9336         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
9337         static constructors when AOT compiling.
9338
9339         * driver.c (mono_main): Call mono_check_corlib_version.
9340
9341 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
9342
9343         * cpu-g4.md, basic.cs: fixed div target register.
9344
9345 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
9346
9347         * mini-ppc.c, basic.cs: shl_imm fix with test.
9348
9349 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
9350
9351         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
9352         structures by value. Misc fixes.
9353         * objects.cs: more tests.
9354
9355 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
9356
9357         * mini-ppc.c: lconv.ovf.i implemented.
9358
9359 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9360
9361         * mini.c:
9362         (mini_init): don't error out if someone already called g_thread_init.
9363
9364 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
9365
9366         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
9367         to be any type per the spec. Fix abnormal memory usage when
9368         the same object is repeatedly thrown.
9369
9370 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
9371
9372         * mini.c: check for overruns in IL code.
9373
9374 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
9375
9376         * TODO: Add/remove some todo entries.
9377
9378 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
9379
9380         * driver.c (mono_main): Call mono_verify_corlib.
9381
9382 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
9383
9384         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
9385         This has been moved to mini.c
9386         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
9387         type being casted is marshalbyref it could be a proxy, so instead of
9388         emitting the type check code, emit a call to a runtime method that will
9389         perform the check by calling CanCastTo if needed.
9390
9391 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
9392
9393         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
9394         methods with large stack frames under Win32.
9395
9396 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
9397
9398         * Makefile.am: Distribute regression tests.
9399
9400         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
9401         at the end instead of inserting each variable into the sorted list.
9402
9403         * linear-scan.c (mono_varlist_sort): New helper function.
9404         
9405 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
9406
9407         * mini.c: ensure arguments and locals are within bounds.
9408
9409 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
9410
9411         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
9412         related fixes.
9413
9414 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
9415
9416         * mini.c (mono_cprop_copy_values): Fix crash.
9417
9418         * aot.c: Set verbosity back to 0.
9419         
9420 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
9421
9422         * regalloc.c: complete memory leak fix by Laurent Morichetti
9423         (l_m@pacbell.net).
9424
9425 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
9426
9427         * driver.c (main_thread_handler): Revert the previous patch.
9428
9429         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
9430         under valgrind.
9431
9432         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
9433         memory from the memory pool.
9434
9435         * driver.c (main_thread_handler): Turn on all optimizations when
9436         --aot is used.
9437
9438         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
9439         an array for better performance.
9440
9441         * regalloc.c (mono_regstate_assign): Fix memory leak.
9442
9443         * debug-mini.c (mono_debug_serialize_debug_info): New function to
9444         serialize the debug info.
9445
9446         * debug-mini.c (mono_debug_add_aot_method): New function to load the
9447         debug info from the serialized representation.
9448
9449         * aot.c: Save debug info into the generated file and load it when 
9450         loading a method.
9451
9452         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
9453
9454 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
9455
9456         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
9457         More FP-related fixes.
9458
9459 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
9460
9461         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
9462         and register allocation buglet. Hello world now runs.
9463
9464 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
9465
9466         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
9467         * tramp-ppc.c: fixed class init trampoline.
9468         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
9469
9470 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
9471
9472         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
9473         mini.c: more ppc changes/fixes.
9474
9475 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
9476
9477         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
9478         Also optimize the case when the arguments are the same in the caller 
9479         and in the callee.
9480
9481         * iltests.il: Add tests for tail calls with valuetype arguments.
9482
9483 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
9484
9485         * mini-ppc.c: fixes for struct return type.
9486
9487 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
9488
9489         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
9490         mono_spillvar_offset() to arch-specific code.
9491
9492 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
9493
9494         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
9495
9496 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
9497
9498         * exceptions-x86.c: Fix stack space leaks.
9499         
9500         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
9501         registers from the lmf if the method has save_lmf set.
9502
9503 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
9504
9505         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
9506         of icall wrappers into InvokeInDomain, since these are now per-domain.
9507
9508 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
9509
9510         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
9511         make some opcode emulation and intrinsic ops enabled/disabled 
9512         according to the architecture. More fixes.
9513
9514 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
9515
9516         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
9517
9518 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
9519
9520         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
9521         arch-specific handling for 'this' and struct return type to
9522         arch-specific code.
9523
9524 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9525
9526         * aot.c: prevent divide by zero error when reporting (it happened with
9527         Accessibility.dll).
9528
9529 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
9530
9531         * mini.h (inst_switch): Remove unused macro.
9532
9533 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9534
9535         * aot.c:
9536         (load_aot_module): free 'info->methods' and 'info' properly. No more
9537         "free(): invalid pointer blah" messages when you have an old aot
9538         compiled assembly.
9539
9540 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
9541
9542         * jit-icalls.c, mini.c: Added support for context static fields.
9543
9544 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
9545
9546         * mini.c (mono_method_blittable): Methods which set LastError are not 
9547         blittable either. Fixes #51108.
9548         
9549 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
9550
9551         * mini.c: flush icache.
9552         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
9553
9554 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
9555
9556         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
9557
9558 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
9559
9560         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
9561         safe on IA32.
9562
9563         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
9564         vararg calls.
9565
9566         * inssel.brg (CEE_MKREFANY): Fix AOT case.
9567
9568 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
9569
9570         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
9571         instruction when the result is discarded.
9572
9573         * iltests.il (test_0_div_regalloc): New regression test.
9574
9575         * arrays.cs: Fix compilation error.
9576
9577 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
9578
9579         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
9580         float rules to inssel-x86.brg: sane architectures with FP registers
9581         don't need to implement these rules.
9582
9583 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
9584
9585         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
9586
9587 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
9588
9589         * mini.h, inssel-long32.brg: fixed endianess issues in int64
9590         implementation of 32 bit systems.
9591
9592 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
9593
9594         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
9595         (Jeroen Zwartepoorte).
9596
9597 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
9598
9599         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
9600         the caller and the callee matches.
9601         
9602         * mini.c (mono_method_to_ir): Add comment.
9603
9604         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
9605         signbit is missing on some platforms.
9606
9607 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
9608
9609         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
9610
9611         * mini.c (setup_jit_tls_data): Call the new function.
9612         
9613         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
9614
9615         * mini-x86.c: Add experimental support for fast access to the lmf
9616         structure under NPTL/Linux 2.6.x.
9617
9618 2003-11-06  Martin Baulig  <martin@ximian.com>
9619
9620         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
9621         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
9622         the debugger.
9623
9624 2003-11-02  Martin Baulig  <martin@ximian.com>
9625
9626         * mini.c (inflate_generic_field): New static method.
9627         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
9628         generic instance and the field is declared in a generic type, call
9629         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
9630
9631 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
9632
9633         * mini.h mini.c (mono_method_same_domain): New function to return
9634         whenever the caller and the callee are in the same domain.
9635
9636         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
9637
9638 2003-10-30  Martin Baulig  <martin@ximian.com>
9639
9640         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
9641         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
9642         method parameters.
9643         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
9644         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
9645
9646 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
9647
9648         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
9649         propagation.
9650
9651         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
9652         object here, so it is in the correct appdomain etc.
9653
9654 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
9655
9656         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
9657         already done.
9658         (mono_method_to_ir): Avoid freeing the type created returned from
9659         mono_type_create_from_typespec, since it is put into an internal cache
9660         by the function. Fixes pointer.exe.
9661
9662         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
9663         trampolines for icalls and pinvokes as well. Fixes #33569.
9664
9665 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
9666
9667         * mini.c: Update after appdomain changes.
9668
9669         * mini.c (mono_jit_compile_method_inner): Allways compile native
9670         method wrappers in the root domain, since there can only be one
9671         instance of them, whose address is stored in method->info.
9672
9673 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
9674
9675         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
9676         environment variable. Instead detect automatically whenever running
9677         under valgrind using the magic macro RUNNING_ON_VALGRIND from
9678         valgrind.h.
9679
9680 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
9681
9682         * trace.c, trace.h: New files that implement the new trace option
9683         parsing. 
9684
9685         * driver.c: Document new --trace options.
9686
9687         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
9688         mini-x86.c: Apply:
9689
9690         -       if (mono_jit_trace_calls)
9691         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
9692
9693         * mini.h: prototypes.
9694         
9695 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
9696
9697         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
9698
9699         * mini.c inssel.brg: Implement typedefbyref opcodes.
9700
9701         * mini.c (mono_jit_compile_method): Remove unused local variable.
9702
9703         * mini.c (mono_jit_compile_method_inner): Ditto.
9704         
9705 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
9706
9707         * tramp-x86.c (x86_class_init_trampoline): Fix build.
9708         
9709         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
9710
9711 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
9712
9713         * mini.c (mono_no_aot): Remove unused global variable.
9714
9715         * mini.c: Thread safety fixes.
9716
9717 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
9718
9719         * mini.c (mono_create_class_init_trampoline): Add a lock around
9720         class_init_hash_addr.
9721
9722         * arrays.cs (test_0_newarr_emulation): Add new regression test for
9723         #30073.
9724
9725         * mini.c: Decompose the NEWARR instruction before decomposing its
9726         arguments. Fixes #30073.
9727
9728 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
9729
9730         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
9731         convention.
9732
9733 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
9734
9735         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
9736
9737         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
9738
9739         * driver.c: Add support for compiling icall wrappers to --compile.
9740
9741 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
9742
9743         * inssel.brg: The empty value in class->interface_offsets is -1, not
9744         0. Fixes #49287.
9745
9746 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
9747
9748         * objects.cs: New test for 'is' operator on an array of interfaces.
9749
9750 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
9751
9752         * tramp-ppc.c: update trampoline code to support jumps
9753         and class initialization.
9754
9755 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
9756
9757         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
9758
9759         * inssel.brg (OP_UNBOXCAST): Fix #46027.
9760
9761         * inssel.brg (OP_UNBOX): Remove unused rule.
9762
9763         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
9764         region instead of one for each method. Fixes #47813.
9765
9766 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
9767
9768         * exceptions.cs (test_0_nested_finally): New regression test for
9769         nested exception handlers.
9770
9771         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
9772
9773         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
9774
9775         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
9776         inlining.
9777
9778         * mini.c (mono_method_check_inlining): Make the inlining limit 
9779         configurable by an environment variable.
9780         
9781         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
9782
9783         * mini.h: Bump AOT file version.
9784
9785         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
9786         token, store the image along with the token, since the token might not 
9787         refer to the same image as the method containing the relocation, 
9788         because of inlining.
9789
9790 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
9791
9792         * mini.c (mono_precompile_assemblies): New function to compile
9793         all methods in all loaded assemblies.
9794
9795         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
9796
9797         * regalloc.h regalloc.c (MonoRegState): Change the type of 
9798         iassign and fassign to int*, since they can contain large negative
9799         values if the register is spilled. Also added some comments. Fixes
9800         #45817.
9801
9802         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
9803         under Win32. Fixes #42964.
9804
9805 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
9806
9807         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
9808
9809         * aot.c: Added support for AOT compiling methods which contain calls
9810         to wrappers. Currently, only remoting-invoke-with-check wrappers are
9811         handled.
9812         
9813         * driver.c (compile_all_methods): Run the compilation in a thread
9814         managed by mono. Fixes #44023.
9815
9816         * mini.c (mono_codegen): Print full method name in verbose output.
9817
9818         * mini-x86.c (mono_arch_patch_code): Fix warning.
9819         
9820         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
9821         jumps, since the method we are jumping to might be domain-specific.
9822
9823         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
9824
9825 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
9826
9827         * inssel.brg: string chars are unsigned.
9828
9829 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
9830
9831         * TODO: New todo item.
9832
9833         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
9834         which calls mono_runtime_class_init and patches the call site to
9835         avoid further calls.
9836         (mono_arch_create_class_init_trampoline): New arch specific function 
9837         to create a class init trampoline.
9838         (create_trampoline_code): Generalized so it can create
9839         class init trampolines as well.
9840
9841         * mini.c (helper_sig_class_init_trampoline): New helper variable.
9842         (mono_create_class_init_trampoline): New function to create and cache
9843         class init trampolines.
9844         (mono_find_class_init_trampoline_by_addr): New function to lookup the
9845         vtable given the address of a class init trampoline. Used by the
9846         patching process.
9847         (mono_codegen): Generate a call to a trampoline instead of
9848         mono_runtime_class_init in LDSFLD[A].
9849         (mono_codegen): Add relocations for the new trampoline.
9850         
9851         * mini.h mini-x86.c aot.c: Added a new relocation type: 
9852         MONO_PATCH_INFO_CLASS_INIT.
9853
9854         * mini.h: Bump AOT version number.
9855
9856         * aot.c: Create a copy of the loaded code instead of using the original
9857         so methods which call each other will be close in memory, improving
9858         cache behaviour.
9859         
9860         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
9861         patch since it breaks the regression tests.
9862         
9863         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
9864         for the register saving instruction sequence since the 
9865         frame_state_for function in glibc 2.3.2 don't seem to detect it.
9866
9867 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
9868
9869         * TODO: Fix todo item && remove another.
9870
9871 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
9872
9873         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
9874         previous checkin.
9875
9876         * aot.c: Moved the check for MONO_LASTAOT into the initialization
9877         function of the module.
9878
9879         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
9880         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
9881         --no-aot command line option.
9882
9883 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
9884
9885         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
9886         by Bernie Solomon (bernard@ugsolutions.com).
9887
9888         * inssel.brg: Refactor the interface offset table related code into
9889         its separate functions and add support for the AOT case.
9890
9891 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
9892
9893         * aot.c (mono_aot_get_method_inner): Fix memory leak.
9894         
9895         * aot.c: Added mono_aot_verbose variable and made all debugging
9896         output depend on the value of this variable.
9897
9898         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
9899         method_label and info_label.
9900
9901         * mini.h mini-x86.c aot.c: Added a new relocation type 
9902         MONO_PATCH_INFO_IID for klass->interface_id.
9903
9904         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
9905         the MonoJitInfo structure.
9906
9907         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
9908         a non-root appdomain in shared mode.
9909
9910 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
9911
9912         * aot.c: make aot loader less verbose. Remove free of unused variable.
9913
9914 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
9915
9916         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
9917
9918         * .cvsignore: Added *.dll.
9919
9920         * mini.c (mono_print_tree_nl): New function callable while debugging.
9921
9922         * mini.c (mono_print_code): Export this.
9923
9924         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
9925         patched code.
9926
9927 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
9928
9929         * mini.h (MonoCompile): Added 'jit_info' field.
9930
9931         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
9932         the cfg structure, since it is needed by the AOT compiler.
9933
9934         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
9935
9936         * aot.c: A major rewrite. Changes include:
9937         - save exception tables for methods which have them.
9938         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
9939         to g_module_symbol.
9940         - reworked the file format so it is now much smaller and needs
9941         fewer relocation entries.
9942         
9943 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
9944
9945         * aot.c (load_aot_module): Fix build bustage on platforms without
9946         Boehm GC.
9947
9948 2003-09-04  Martin Baulig  <martin@ximian.com>
9949
9950         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
9951
9952 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
9953
9954         * TODO: Some new optimization ideas.
9955
9956         * aot.c: Move AOT module loading logic here from mono_assembly_open.
9957
9958         * aot.c: Save the optimization flags used to compile the code into
9959         the AOT module.
9960
9961         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
9962         support emitting domain specific code.
9963         
9964         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
9965         no longer domain neutral. It can be made domain neutral by compiling 
9966         with --optimize=shared.
9967
9968         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
9969         between appdomains.
9970
9971         * driver.c mini.h mini.c: New --no-aot debugging option which disables
9972         loading of AOT code.
9973
9974         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
9975         
9976         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
9977         if there is no domain neutrality information.
9978
9979 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
9980
9981         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
9982         format version into the generated library.
9983
9984         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
9985         callee method into the caller since one of them could be shared.
9986
9987         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
9988         system exceptions from AOT code now works.
9989
9990         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
9991         method if it is domain neutral and the callee is not.
9992
9993         * graph.c (cfg_emit_one_loop_level): Fix warning.
9994
9995 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
9996
9997         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
9998         last checkin.
9999
10000 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
10001
10002         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
10003         is needed  by code which is executed before mono_runtime_init ().
10004         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
10005         
10006         * mini.c (mono_thread_abort): Fix warning.
10007         (mono_jit_compile_method): Call static constructor in the AOT case too.
10008
10009         * aot.c (mono_compile_assembly): Fix warning.
10010
10011 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10012
10013         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
10014
10015 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
10016
10017         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
10018
10019         * cpu-pentium.md: Fix the length of call opcodes so they include the
10020         ESP restoring instruction. Fixes #47968.
10021
10022 2003-08-28  Martin Baulig  <martin@ximian.com>
10023
10024         * mini-x86.c (mono_arch_call_opcode): Added support for
10025         MONO_TYPE_GENERICINST.
10026
10027         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
10028
10029 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
10030
10031         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
10032         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
10033
10034         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
10035         metadata_section.
10036
10037 2003-08-26  Martin Baulig  <martin@ximian.com>
10038
10039         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
10040         when reporting an error, set this to the actual error location.
10041         (mono_method_to_ir): Report the correct error location if
10042         get_basic_blocks() returned an error.
10043
10044 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
10045
10046         * mini.c (mono_type_blittable): OBJECT is not blittable.
10047         (mono_method_blittable): Methods which have marshalling descriptors
10048         are not blittable either. Fixes #47842.
10049
10050 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
10051
10052         * driver.c mini.c: Use an environment variable instead of a global 
10053         variable. Also fix the build.
10054
10055         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
10056         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
10057         reporting this. 
10058
10059         * driver.c mini.c: Added --with-valgrind option to turn off some
10060         code which prevents mono from running under valgrind.
10061
10062         * mini.c (mono_emit_call_args): Fixed warning.
10063
10064         * mini.c (mono_emulate_opcode): Fixed warning.
10065
10066 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10067
10068         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
10069         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
10070         regalloc.c, regalloc.h: specify available registers in arch-specific
10071         code and support floats in the regallocator (patch by Laurent Morichetti 
10072         <l_m@pacbell.net>)
10073
10074 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
10075
10076         * mini.c: mono_thread_current() can be called only after
10077         mono_runtime_init(): rearrange code to not call it early on.
10078
10079 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
10080
10081         * mini.c: allocate jump tables in the code mempools.
10082
10083 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
10084
10085         * mini.c, mini.h: make sure per-thread data allocated by the jit is
10086         freed.
10087
10088 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
10089
10090         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
10091         12 to 16.  This fixes bug #47453.
10092
10093
10094 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
10095
10096         * mini-ppc.c: fixed indexed load and unsigned compares.
10097
10098 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
10099
10100         * mini.c: reenabled installation of handler for
10101           thread abort signal.
10102
10103 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10104
10105         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
10106         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
10107         until it's fixed and actually useful.
10108
10109 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
10110
10111         * inssel-long32.brg: couple more opcodes implemented.
10112
10113 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
10114         
10115         * mini-sparc.c: Even more opcodes implemeted.
10116
10117 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
10118
10119         * mini-sparc.c: More opcodes implemented.
10120
10121 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
10122
10123         * mini-sparc.c: More opcodes implemented.
10124
10125 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
10126
10127         * inssel-sparc.brg: Add some needed rules.  Direct
10128         copy from PPC.
10129         * Makefile.am: Use inssel-sparc.brg
10130         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
10131         an assert happy for now.
10132
10133 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
10134
10135         * mini-sparc.c: Fixed compile errors.
10136         * exceptions-sparc.c: Same.  We now produce a mono binary 
10137         on sparc-linux.  Yea.
10138
10139 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
10140
10141         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
10142         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
10143         They compile, but do not work.
10144
10145 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
10146
10147         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
10148         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
10149         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
10150         (ct@gentoo.org).
10151
10152 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10153
10154         * mini.c: more opcodes implemented and better support for generics.
10155
10156 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
10157
10158         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
10159         * mini.c, mini.h: first cut at generics support: some new instructions 
10160         added and changed the behaviour of some of the existing ones.
10161
10162 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
10163
10164         * mini.c: Removed definition of metadata_shared mutex here.
10165
10166 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
10167
10168         * mini-x86.c: make vararg calls work for instance methods.
10169
10170 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
10171
10172         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
10173         returns the arguments in a separte list, now.
10174
10175 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
10176
10177         * aot.c, mini.c: updates for array type representation changes.
10178
10179 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
10180
10181         * mini.c: register function to perform jit shutdown.
10182
10183 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
10184
10185         * mini.c: use a faster allocator if possible.
10186
10187 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
10188
10189         * aot.c: some cleanups and portability changes.
10190
10191 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
10192
10193         * mini.c: use faster allocation for CEE_BOX if possible.
10194
10195 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
10196
10197         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
10198         Moved inlined mempcy code to its own function so that is can be
10199         reused. Added an inline memset function as well (optimized initobj).
10200         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
10201
10202 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
10203
10204         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
10205
10206 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
10207
10208         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
10209         arch code can setup the cpu for CLR execution, if needed.
10210         We use it on x86 to set the precision of FP operations.
10211
10212 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
10213
10214         * mini.c: disable some optimizations if we can guess they'll cost too
10215         much for a given method.
10216
10217 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
10218
10219         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
10220         
10221 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
10222         * mini.h mini.c mini-x86.c: Added instruction level coverage 
10223         info collection support.
10224
10225 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
10226
10227         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
10228         is now implemented in the profiling API. Get rid of a couple of
10229         unnecessary global variables.
10230
10231 2003-06-15  Nick Drochak <ndrochak@gol.com>
10232
10233         * basic-long.cs: tests for negative values for bigmul, and unsigned.
10234         * cpu-g4.md: add op_bigmul and op_bigmul_un
10235         * cpu_pentium.md: add op_bigmul_un
10236         * inssel-long32.brg: add rule for unsigned bigmul
10237         * mini-ops.h: define OP_BIGMUL_UN
10238         * mini-x86.c: THE BUG: handle (un)signed properly
10239         * mini.c: choose unsigned opcode if needed.
10240         This set of patches fixes bug #44291
10241
10242 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
10243
10244         * mini.c (optimize_branches): improved to handle all kinds of
10245         conditional branches.
10246
10247 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
10248
10249         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
10250         don't raise exceptions.
10251
10252 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
10253
10254         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
10255         to arch-specific files.
10256
10257 2003-06-09  Martin Baulig  <martin@ximian.com>
10258
10259         * Makefile.am (libs): Added $(LIBGC_LIBS).
10260
10261 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
10262
10263         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
10264         and OP_ATAN (fixes bug#44293).
10265
10266 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
10267
10268         * Makefile.am, mini-x86.c: rename cpu description array to
10269         pentium_desc, since some compilers define the 'pentium' preprocessor
10270         symbol.
10271
10272 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
10273
10274         * mini.c (mini_select_instructions): add explicit branch if the
10275         following block is not the false target of a conditional branch -
10276         we need this with any optimization that reorder or remove bblocks
10277
10278         * mini.c (optimize_branches): bug fixes
10279
10280 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
10281
10282         * mini.c (mono_method_to_ir): inline static readonly fields
10283
10284         * ssa.c (fold_tree): start cfold support for long (very simple
10285         cases only)
10286
10287         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
10288
10289 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
10290
10291         * inssel.brg: fixed memcpy (bug #44219).
10292
10293 2003-06-05  Dick Porter  <dick@ximian.com>
10294
10295         * driver.c: Set the glib log levels to not abort if g_message
10296         recurses.
10297
10298         g_set_prgname() has to happen before mini_init() so that the
10299         process handle gets the info.
10300         
10301 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
10302
10303         * driver.c: add intrins to the default optimizations to get wider
10304         exposure.
10305
10306 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
10307
10308         * mini.h: some large basic blocks will overflow a 16-bit
10309         integers for symbolic registers.
10310
10311 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
10312
10313         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
10314         (mono_arch_output_basic_block): fix bug 43499 
10315
10316 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
10317
10318         * mini.c: kill duplicated definition of mono_debug_format.
10319
10320 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
10321
10322         * mini-x86.c, arrays.cs: fixed register allocation bug.
10323
10324 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
10325
10326         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
10327
10328         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
10329
10330 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10331
10332         * mini.c:
10333         (print_method_from_ip): also print source location information if
10334         available.
10335
10336 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
10337
10338         * mini.c (mono_find_block_region): bug fix in region code
10339         (mini_method_compile): enable removing unreachable code again, but
10340         only in methods without exception clauses.
10341
10342 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
10343
10344         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
10345         Implemented arglist opcode and handling of TypedReference type.
10346         Fixed x86 call convention when a structure is returned.
10347         Minimal support for calling static vararg methods.
10348
10349 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
10350
10351         * mini.c (mini_method_compile):  always remove unreachable code,
10352         because the code in them may be inconsistent  (access to dead
10353         variables for example).
10354
10355 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
10356
10357         * driver.c, debug-mini.c: warning fixes.
10358
10359 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
10360
10361         * Makefile.am, jit.h, mini.h: install header for embedding mono.
10362
10363 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
10364
10365         * mini.c: thread-static fields are registered in mono_class_vtable(),
10366         so ensure the function is called before checking for them.
10367
10368 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
10369
10370         * mini.c (optimize_branches): fix for bug 43586
10371
10372         * jit-icalls.c (mono_llmult_ovf): added an additional check for
10373         overflow (fixes Bug #43639)
10374
10375 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
10376
10377         * mini.c, objects.cs: allow the use of stobj for primitive types.
10378
10379 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
10380
10381         * mini.c: be less strict about argument checking until we support
10382         running the verifier.
10383
10384 2003-05-27  Nick Drochak <ndrochak@gol.com>
10385
10386         * basic-long.cs: tests for (ulong)int * (ulong)int also
10387         * mini.c: use the same trick for (ulong)int * (ulong)int
10388
10389 2003-05-27  Nick Drochak <ndrochak@gol.com>
10390
10391         * basic-long.cs: add regression test for (long)int * (long)int
10392         * cpu-pentium.md: add op_bigmul specification
10393         * inssel-long32.brg: add OP_BIGMUL rule
10394         * mini-ops.h: add OP_BIGMUL
10395         * mini-x86.c: register allocator: handle case where src1 needs to be
10396         in EAX.
10397         * mini.c: substitute special BIGMUL opcode in the tree for 
10398         (long)int * (long)int
10399
10400 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
10401
10402         * jit-icalls.c: call the type ctor on field access if needed.
10403
10404 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
10405
10406         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
10407         to a method (including results of ldelema, bug#43207).
10408
10409 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
10410
10411         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
10412         colors to show exception handler blocks.
10413
10414         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
10415         (fix for pinvoke7.cs).
10416
10417 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
10418
10419         * mini.h, mini.c: ensure correct initialization order for types that
10420         require it. Prepare for lazy compilation of jit icall wrappers.
10421         Provide a name for opcode emulation to reduce unneeded mallocing.
10422
10423 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
10424
10425         * mini-x86.c: better register restoring code and profiling
10426         support for tail calls.
10427
10428 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
10429
10430         * mini.h, driver.c: prepare for leaf methods optimization.
10431
10432 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
10433
10434         * mini.c: get targets of branches before converting a method.
10435
10436 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
10437
10438         * mini.c (optimize_branches): added some experimental code (disbaled) 
10439
10440 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
10441
10442         * mini.c (optimize_branches): fix branch to branch optimization 
10443
10444         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
10445
10446         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
10447
10448         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
10449
10450         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
10451         if needed.
10452
10453 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
10454
10455         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
10456         enable use of interface variables again.
10457
10458         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
10459         I1 to registers because there is no simply way to sign extend 8bit
10460         quantities in caller saved registers on x86.
10461
10462         * inssel-float.brg: set costs of some rules to 2 so
10463         that monobure always select the arch. specific ones if supplied,
10464         regardless of the order we pass the files to monoburg.
10465
10466 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
10467
10468         * mini.c, mini-x86.c: since the magic trampoline for jumps
10469         can't patch the code directly, we do it as soon as the
10470         method gets compiled.
10471
10472 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
10473
10474         * mini-x86.c, mini.h: introduce a new patching method
10475         to support CEE_JMP and tail calls.
10476         * mini.c: obey tail.call. Don't precompile methods target
10477         of CEE_JMP.
10478         * tramp-x86.c: new trampoline code to handle methods
10479         reached through a jump.
10480
10481 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
10482
10483         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
10484         bit values to registers
10485
10486 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
10487
10488         * mini.c (mono_compile_get_interface_var): share interface
10489         variables if possible.
10490
10491 2003-05-16  Martin Baulig  <martin@ximian.com>
10492
10493         * debug-mini.c (mono_init_debugger): New function to initialize
10494         the debugger.  This is not in the debugger since it needs to
10495         access some of mini's internals.
10496
10497 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
10498
10499         * mini.c (mono_method_to_ir): inlining fixes/cleanups
10500
10501 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
10502
10503         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
10504         for value type handling.
10505
10506 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
10507
10508         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
10509         (mono_method_check_inlining): enable inlining of all kinds of wrappers
10510
10511 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
10512
10513         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
10514           the constructor through a proxy.
10515
10516 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
10517
10518         * jit-icalls.c, inssel.brg: fixes to array element address
10519         calculations.
10520
10521 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
10522
10523         * mini-x86.c (is_regsize_var): allocate pointer to registers
10524
10525 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
10526
10527         * driver.c: fixed typo, added intrins to the set of optimizations
10528         tested with regressions.
10529
10530 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
10531
10532         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
10533         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
10534         test case.
10535
10536 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
10537
10538         * inssel.brg: remove some common pop instructions without side effects
10539
10540 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
10541
10542         * inssel-x86.brg: fixed thinko in int to double conversions.
10543
10544 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
10545
10546         * mini.c, jit-icalls.c: added runtime thread-static variable support.
10547
10548 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
10549
10550         * inssel-long32.brg: two more missing instructions.
10551
10552 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
10553
10554         * mini.c (mono_emit_call_args): set the cil_code for all arguments
10555         if not already set.
10556
10557 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
10558
10559         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
10560         correctly.
10561
10562         * basic-float.cs: Added tests for negative zero.
10563
10564 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
10565
10566         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
10567         a couple of missing operations for long casts, with test cases.
10568
10569 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10570
10571         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
10572
10573 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
10574
10575         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
10576         code size estimation.
10577
10578 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
10579
10580         * mini.c (mono_jit_create_remoting_trampoline): make it work with
10581         abstract methods (fix bug 42542)
10582
10583         * aot.c: add ability to handle array types
10584         
10585 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
10586
10587         * mini.c: Call the _specific versions of the object allocation
10588         functions if possible.
10589
10590 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
10591
10592         * driver.c: call setlocale ().
10593
10594 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
10595
10596         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
10597         windows build.
10598
10599 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
10600
10601         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
10602
10603         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
10604         wrappers (fix bug 42122)
10605
10606 2003-05-04  Martin Baulig  <martin@ximian.com>
10607
10608         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
10609
10610         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
10611         s/mini_set_defaults/mono_set_defaults/g.
10612
10613 2003-05-04  Martin Baulig  <martin@ximian.com>
10614
10615         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
10616
10617 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10618
10619         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
10620         (reported by Don Roberts).
10621
10622 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
10623
10624         * mini.c: temporarily work around two bugs for this release.
10625
10626 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
10627
10628         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
10629         that contains -export-dynamic and it makes using the ld script
10630         useless.
10631         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
10632
10633 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
10634
10635         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
10636         specific cpu.
10637
10638 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
10639
10640         * mini.c: make sure leave calls all the needed finally blocks,
10641         even when the target jumps out of multiple exception clauses.
10642
10643 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
10644
10645         * ldscript, Makefile.am: add linker script to reduce the number of
10646         exported symbols (should also fix the issues with libwine defining
10647         some of the same symbols in io-layer).
10648
10649 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
10650
10651         * driver.c (mini_main): Avoid assertion when no file name is given on 
10652         the command line.
10653
10654 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
10655
10656         * driver.c: added --version/-V command line option.
10657         Added the inline optimization in the regression tests.
10658
10659 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
10660
10661         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
10662         to the type in the method signature (fixes bug#42134).
10663
10664 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
10665
10666         * mini.c: when inlining, check this is not null only when needed (bug #42135).
10667
10668 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
10669
10670         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
10671
10672 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10673
10674         * driver.c: fixed bug #42100.
10675
10676 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
10677
10678         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
10679
10680 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
10681
10682         * mini.c: moved most of the code required to do inlining to its own
10683         function so it can be reused. Inline also ctors if appropriate.
10684
10685 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
10686
10687         * Makefile.am: Link with -export-dynamic so shared libs loaded by
10688         the runtime can call mono API functions.
10689
10690 2003-04-27  Martin Baulig  <martin@ximian.com>
10691
10692         * debug-mini.c (mono_debug_init_method): Added
10693         `guint32 breakpoint_id' argument; if the method has a breakpoint,
10694         send a notification to the debugger.
10695
10696         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
10697         running in the Mono Debugger, just pass the breakpoint number to
10698         mono_debug_init_method().
10699
10700         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
10701
10702 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
10703
10704         * mini.c: allow some more unsafe compares.
10705
10706 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
10707
10708         * mini-x86.c, Makefile.am: make distcheck works (partially from
10709         a patch by Richard Lee <r.h.lee@attbi.com>).
10710         * regset.c, regset.h: removed, they are unused.
10711
10712 2003-04-25  Dick Porter  <dick@ximian.com>
10713
10714         * driver.c: Usage reports the name as 'mono' not 'mini'
10715         * exceptions-x86.c: Build and run on freebsd
10716
10717 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
10718
10719         * Makefile.am: install the program with the 'mono' name and
10720         the library as libmono instead of mini and libmini.
10721
10722 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
10723
10724         * driver.c: provide the APIs for the embedding interface of the old jit.
10725
10726 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
10727
10728         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
10729
10730 2003-04-23  Martin Baulig  <martin@ximian.com>
10731
10732         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
10733
10734         * driver.c: Added `--debug' command line argument to enable
10735         debugging support.
10736
10737 2003-04-23  Martin Baulig  <martin@ximian.com>
10738
10739         * debug.[ch]: Removed.  The code is now in
10740         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
10741
10742         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
10743         last six months.
10744
10745 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
10746
10747         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
10748
10749 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10750
10751         * mini.c:
10752         (mini_cleanup): moved mono_runtime_cleanup call after the call to
10753         mono_domain_finalize.
10754         (mini_method_compile): use mono_method_profile* if the the option is
10755         enabled.
10756
10757 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
10758
10759         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
10760         methods with their wrapper.
10761
10762         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
10763         methods with their wrapper.
10764
10765         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
10766         their wrapper.
10767
10768         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
10769         wrapper.
10770
10771         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
10772         methods.
10773
10774 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
10775
10776         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
10777
10778 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
10779
10780         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
10781         of the mempool. This is slightly faster and uses less memory
10782
10783 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
10784
10785         * mini.c: avoid O(n) allocation for variables.
10786
10787 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
10788
10789         * mini.c: handle items on the stack after inlining methods.
10790
10791 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
10792
10793         * mini.c: make the method->opcode optimization dependent
10794         on MONO_OPT_INSTRINS and do it lazily.
10795
10796 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
10797
10798         * driver.c: print overall results at the end of regression run.
10799
10800 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
10801
10802         * inssel.brg: don't overwrite symbolic registers.
10803
10804 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
10805
10806         * inssel-x86.brg: fix conversion from long to float.
10807
10808 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
10809
10810         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
10811
10812 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
10813
10814         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
10815
10816         * driver.c: Added --print-vtable option as in the old JIT.
10817
10818 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
10819
10820         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
10821
10822 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
10823
10824         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
10825
10826 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
10827
10828         * mini.c regalloc.c regalloc.h: Fix memory leak.
10829
10830 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
10831
10832         * aot.c (mono_aot_get_method): register all used strings
10833
10834 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
10835
10836         * mini.c: always intern strings references with ldstr at compile time.
10837
10838 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
10839
10840         * Makefile.am: add BUILT_SOURCES.
10841
10842 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
10843
10844         * driver.c: give a better error message when the assembly to execute
10845         doesn't have an entry point.
10846
10847 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
10848
10849         * Makefile.am: added hack for automake
10850
10851         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
10852         correct sematics.
10853
10854         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
10855
10856 22003-04-07  Martin Baulig  <martin@ximian.com>
10857
10858         * Makefile.am: Added Makefile.am.
10859
10860         * debugger-main.c: Removed, this is now in the debugger where it
10861         belongs.
10862
10863         * mini.pc.in: Call this package `mini' for the moment.
10864
10865
10866
10867
10868
10869