2005-06-07 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / mini / ChangeLog
1 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
2
3         * *-ia64.*: Ongoing IA64 work.
4
5 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6
7         * trace.[ch]:
8         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
9
10 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
11
12         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
13
14 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
15
16         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
17
18         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
19         of a call is callable by a near call.
20
21 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
22
23         * mini-ia64.c: Ongoing IA64 work.
24
25 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
26
27         * genmdesc.c: Make the generated array non-static.
28
29         * inssel-long.brg: Fix LSHR_IMM rule.
30
31         * *-ia64.*: Ongoing IA64 work.
32
33         * *-ia64.*: Ongoing IA64 work.
34
35 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
36
37         * *-ia64.*: Ongoing IA64 work.
38
39         * *-ia64.*: Ongoing IA64 work.
40         
41         * mini-ia64.c: Ongoing IA64 work.
42
43         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
44
45 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
46
47         * objects.cs basic-calls.cs: Move some tests to objects.cs.
48         
49         * objects.cs basic-long.cs: Move some tests to objects.cs.
50
51 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
52
53         * *-ia64.*: Ongoing IA64 work.
54
55         * iltests.il: Add a new test.
56
57         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
58         newobj. Fixes #75042.
59
60 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
61
62         * *-ia64.*: Ongoing IA64 work.
63         
64         * *-ia64.*: Ongoing IA64 work.
65         
66         * *-ia64.*: Ongoing IA64 work.
67
68         * basic.cs objects.cs: Move tests accessing static variables as well.
69
70         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
71
72 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
73
74         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
75
76         * driver.c: Always print failed tests.
77
78         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
79         frame pointer.
80
81         * *ia64*: Ongoing IA64 work.
82
83 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
84
85         * basic.cs: Add tests for add.ovf. Fix warnings.
86
87 2005-05-18  Miguel de Icaza  <miguel@novell.com>
88
89         * driver.c (mono_main): Avoid crash if no argument is passed to
90         --break;  Do not use g_error, but f_printf.   And fix all other
91         ocurrences of the same crash.
92
93 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
94
95         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
96         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
97         Fixes #74742.
98
99 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
100
101         * *-ia64.*: Add beginnings of IA64 backend.
102
103         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
104
105 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
106
107         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
108         Fixes #74925.
109
110         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
111
112         * mini-amd64.c: Fix a warning.
113
114 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
115
116         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
117         in float_neg. Fixes #74897.
118
119         * mini-amd64.c (emit_call): Fix another near call bug.
120
121 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
122
123         * declsec.c: Keep the appdomain information in the structure. Added a 
124         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
125         value gets overwritten).
126         * declsec.h: Set the default MonoArray for the the stack to 6. Added
127         an MonoAppDomain member to MonoSecurityFrame.
128         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
129         used in the stack walk. Now use a MonoArray which grow (double) when
130         it gets full.
131
132 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
133
134         * mini.c: Re-enabled runtime cleanup, since running threads should
135         now properly stop when exiting.
136
137 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
138
139         * mini-codegen.c: New file contaning the arch-independent local
140         register allocator. Not used by any architectures yet.
141
142         * mini.h linear-scan.c: Merge some changes from the 
143         mini-xp-local-regalloc branch.
144
145 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
146
147         * mini-amd64.c (emit_call): Fix calls to native functions when the
148         runtime is compiled as a shared library. Fixes #74756.
149
150         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
151         on a literal field. Fixes #74751.
152
153 2005-04-25  Raja R Harinath  <rharinath@novell.com>
154
155         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
156
157 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
158
159         * objects.cs: Add missing null casting test.
160
161 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
162
163         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
164         in wrapper methods. Also rename 'address' variable to 'offset'.
165
166 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
167
168         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
169         warnings.
170         
171         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
172
173         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
174         work on windows.
175
176 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
177
178         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
179
180 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
181
182         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
183         just the last bytes.
184
185 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
186
187         * aot.c (mono_compile_assembly): Fix warning.
188
189         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
190         by the _MSC_VER stuff.
191
192 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
193
194         * inssel-long.brg: Fix #74588.
195
196         * cpu-amd64.md: Fix #74591.
197
198         * iltests.il: Add new regression tests.
199
200 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
201
202         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
203         valuetype.
204
205 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
206
207         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
208
209         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
210         from Bill Middleton <flashdict@gmail.com>.
211
212 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
213
214         * arrays.cs: Add new regression test. Fix warnings.
215
216 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
217
218         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
219         and leakage in CKFINITE.
220
221         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
222         this to a null op since it is called on amd64 too.
223
224         * exceptions-amd64.c (get_throw_trampoline): Align stack.
225
226         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
227         body since this is not used on amd64.
228         
229         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
230
231         * mini-amd64.c: Remove obsolete fixmes.
232
233         * mini.c (print_method_from_ip): Fix debugging support.
234
235 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
236
237         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
238         so that expressions that don't give much gain are not reduced.
239         * ssapre.h: Likewise.
240
241 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
242
243         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
244
245         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
246
247         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
248
249 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
250
251         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
252
253         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
254
255 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
256
257         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
258         stack touching.
259
260         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
261
262         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
263
264         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
265
266         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
267         MONO_ARCH_USE_SIGACTION. Fixes #74252.
268
269         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
270
271         * mini-x86.c: Fix up stack overflow handling.   
272
273         * exceptions.cs: Add new regression test.
274
275 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
276
277         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
278         mono_jit_thread_attach.
279
280         * mini.c (mono_method_to_ir): Verify called method is not abstract.
281
282 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
283
284         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
285         avoid calling constructors using callvirt.
286
287         * inssel.brg: Fix #74073.
288
289 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
290
291         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
292         compilation with non-GCC compilers.
293         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
294         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
295
296 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
297
298         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
299         klass->interface_offsets (will likely fix bug#74073).
300
301 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
302
303         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
304
305 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
306
307         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
308         to amd64_div_reg_size ().
309         
310         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
311
312 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
313
314         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
315
316 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
317
318         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
319
320 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
321
322         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
323         
324         * mini.c (mono_precompile_assembly): Load and precompile referenced
325         assemblies as well. Fixes #74015.
326
327 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
328
329         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
330
331 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
332
333         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
334         a lot of checks and (anyway) permissions cannot work until corlib is 
335         loaded.
336
337 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
338
339         * mini-ppc.c: fixed ABI issue on sysv/ppc.
340
341 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
342
343         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
344         calls (fixes bug#72824).
345
346 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
347
348         * mini.c: fix tail recursion elimination (see test in bug#73936).
349
350 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
351
352         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
353         some fp functions in sse2 mode.
354
355 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
356
357         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
358
359 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
360
361         * mini.h mini.c: Add mono_get_jit_tls_key ().
362
363         * mini-x86.c: Enable fast TLS support on windows.
364
365 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
366
367         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
368         * mini.c: Check for p/invoke method when generating code. If a
369         p/invoke method, or it's class, isn't decorated with [Suppress
370         UnmanagedCodeSecurity] then generate code to call System.Security.
371         UnmanagedDemand (only if the security manager is active).
372
373 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
374
375         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
376         last change as it seems to cause strange crashes.
377         
378 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
379
380         * *.c: handle unsafe function pointers where needed.
381
382 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
383
384         * mini.c (mono_jit_free_method): Remove the fixme too.
385
386 2005-03-15  Miguel de Icaza  <miguel@novell.com>
387
388         * mini.c: As discussed, make the code actually free the delegate
389         thunk now, to enable the debugging of delegate problems, use
390         MONO_DEBUG=1 when running Mono. 
391
392         This takes also care of parts of the leaks as seen by Joe.
393
394 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
395
396         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
397         thread_tls_offset calculation.
398
399 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
400
401         * declsec.c: Reworked linkdemand checks for icall. The previous code
402         was using the declaration code (untrusted) and didn't work as expected
403         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
404         specific case.
405
406 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
407
408         * iltests.il: Add new localloc test.
409
410         * mini-amd64.c: Handle large stack allocations the same way as on
411         windows if stack overflow handling is working.
412         
413         * mini-amd64.c: Allocate the signal stack using mmap.
414
415         * mini.c (sigsegv_signal_handler): Fix reading of context.
416
417         * mini-exceptions.c: Fix up stack overflow handling.
418
419         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
420
421         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
422
423         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
424
425         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
426
427         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
428         tramp_init functions as they are no longer needed.
429
430 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
431
432         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
433         
434         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
435
436         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
437         
438         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
439         support that now.
440
441         * mini-ops.h: Add OP_LMUL_IMM.
442
443         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
444         long mul/div opcodes as intrinsic.
445
446         * mini-amd64.c (emit_call): Handle the case when the callee might be
447         an AOT method.
448
449 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
450
451         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
452         extra safe.
453         
454         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
455
456         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
457
458 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
459
460         * mini.c (mono_codegen): Don't leak here, to help people running
461         monogrind.
462
463 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
464
465         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
466         conversions in sse2 mode.
467
468         * basic-float.cs: Add regression test.
469         
470         * mini-amd64.c: Reenable sse2.
471
472 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
473
474         * mini-amd64.c: Disable sse2 until some regressions are fixed.
475
476 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
477
478         * driver.c: Copyright text should include 2005.
479         
480 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
481
482         * cpu-amd64.md (load_membase): Fix more max lengths.
483
484 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
485
486         * cpu-amd64.md (load_membase): Fix max length.
487
488         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
489
490         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
491
492         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
493         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
494
495         * basic-float.cs: Add rounding regression test.
496
497         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
498
499 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
500
501         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
502         structures in registers for pinvoke wrappers.
503
504 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
505
506         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
507
508 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
509
510         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
511         wrapper to mono_jit_thread_attach.
512
513         * mini.c (mini_jit_thread_attach): New jit icall.
514
515         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
516         native->managed wrappers.
517
518         * exceptions.cs: Add new regression test.
519
520         * mini.c (optimize_branches): Check regions in the cbranch to throw
521         block case as well. Fixes #73242.
522
523 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
524
525         * mini.c: thread safety fixes.
526
527 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
528
529         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
530         patching stuff, since delegates use jump trampolines so there is
531         no caller.
532
533         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
534         jump trampolines.
535         
536         * tramp-amd64.c: Fix build.
537
538         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
539         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
540
541         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
542         Rename this to mono_arch....
543         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
544
545         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
546
547         * mini-amd64.c (emit_call): If both the caller and the callee is
548         guaranteed to have 32 bit addresses, emit a normal call.
549
550         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
551
552         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
553         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
554         method_ptr inside delegates.
555
556 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
557
558         * mini.c (mono_jit_free_method): Free the method info even if the native code is
559         invalidated. Fixes #73001.
560
561         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
562
563         * mini-x86.c: Only use stdcall for pinvokes on windows.
564
565 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
566
567         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
568         * mini-x86.c: remove unreliable __thread var offset detection,
569         use the correct accessors and enable by default.
570
571 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
572
573         * mini.c (mono_jit_free_method): Fix memory leak.
574
575 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
576
577         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
578
579 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
580
581         * cpu-amd64.md: Fix lengths of atomic opcodes.
582
583 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
584
585         * driver.c: try to not imply using ICU is any good.
586
587 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
588
589         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
590         functions as inline ops.
591
592         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
593         some Interlocked functions as inline ops.
594
595         * mini.c (move_basic_block_to_end): Fix bug in last patch.
596
597         * mini.h (MonoBasicBlock): Reorganize fields a bit.
598
599         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
600
601         * mini.c: Add support for OP_NOT_TAKEN.
602
603         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
604         structures in registers for pinvoke wrappers.
605
606         * mini-amd64.c: Fix warnings.
607
608 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
609
610         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
611
612         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
613
614         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
615         address instead of loading the address from it.
616
617         * mini-x86.c: Add support for returning small structs in registers
618         on Win32. Fixes part of #70864.
619         
620 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
621
622         * trace.c (get_token): Improve error checking.
623
624 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
625
626         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
627
628 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
629  
630         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
631         it can be reused for MonoClass.
632         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
633         _LINKDEMAND.
634
635 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
636
637         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
638         instead of a MonoReflectionMethod. The method information wasn't used
639         when displaying SecurityException details (but will be now).
640
641 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
642
643         * Makefile.am : windows build fix.
644
645 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
646
647         * iltests.il: Add new regression test.
648
649         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
650         #72522.
651
652 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
653  
654         * mini.c: Moved linkdemand check into helper function check_linkdemand
655         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
656         LDFTN, LDVIRTFTN).
657
658 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
659
660         * declsec.c: Added statistics counter for different kinds of 
661         LinkDemands.
662         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
663         (and commented) declaration.
664         * mini.c: Added statistics counter for security Demand code 
665         generation. Added display of security statistics.
666
667 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
668
669         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
670         Fix compilation errors under gcc-2.95.
671
672 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
673
674         * mini.c, driver.c: Use the new jit trampoline hashtable
675
676 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
677
678         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
679
680 2005-02-11  Martin Baulig  <martin@ximian.com>
681
682         * debug-mini.c (mono_debug_close_method): Free the line number array.
683
684 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
685
686         * aot.c: Break up large methods into smaller ones. Share GOT slots for
687         icalls.
688
689         * mini.h: Bump AOT file format version. 
690
691 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
692
693         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
694         APTC and P/Invoke.
695         * declsec.h: Added macros to get/set lazyly initialized security 
696         informations about assemblies. Added new enum for different type of
697         possible LinkDemand violation. Added function to check LinkDemands.
698         * mini.h: Added a field to MonoCompile to hold any security violation
699         detected when JITting a method (so it can be thrown later).
700         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
701         and CEE_CALLVIRT. Added code to throw exception at the end of
702         mini_method_compile (note: the exception is unhandled right now).
703
704 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
705
706         * mini.c, jit-icalls.c: use the managed implementation of
707         memset for initobj and memset, to avoid managed <-> unmanaged
708         transitions.
709
710 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
711
712         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
713         optimization if it would need a GOT var.
714
715         * basic.cs: Add tests for constant propagation and switch statements.
716
717         * ssa.c: Fix out-of-range constant propagation and switch statements.
718
719 2005-02-09    <vargaz@freemail.hu>
720
721         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
722
723 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
724
725         * cpu-amd64.md (load_membase): Fix max length of load_membase.
726
727 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
728
729         * mini.c: update to new signature of mono_class_get_allocation_ftn().
730
731 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
732
733         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
734         arithmetic operations.
735
736 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
737
738         * mini-ppc.c: add a workaround for broken user code that
739         DllImports vararg functions with non-vararg signatures.
740
741 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
742
743         * mini.c (mono_jit_compile_method_inner): Add detection and a 
744         meaningfull error message for assemblies written in Managed C++.
745
746         * tramp-amd64.c mini-amd64.h: Add support for 
747         create_trampoline_from_token ().
748
749         * aot.c mini-x86.c abcremoval.c: Applied patch from
750         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
751
752 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
753
754         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
755         which takes a MonoImage/token as parameter instead of a MonoMethod.
756
757         * aot.c: Use the new trampoline for initializing vtables.
758
759         * aot.c: Add support for ldfld/stfld_remote wrappers.
760
761         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
762         rules for compare <MEM>, IMM.
763
764         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
765
766         * aot.c: Handle inherited finalizers correctly.
767
768 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
769
770         * inssel.brg (stmt): Add a missing _setup_... ().
771
772         * aot.c: Save some parts of the class state to the AOT file and use it
773         to recompute that state when a class is initialized.
774
775         * mini.c: Install AOT hooks into the runtime.
776
777         * mini.h: Bump AOT file format version.
778         
779         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
780         Fixes #72148.
781
782         * iltests.il: Add new test.
783
784 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
785
786         * mini.c: fix typo.
787
788 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
789
790         * mini.c: setup the statistical profiler in the thread attach
791         callback to cope with the new single thread code.
792
793 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
794
795         * mini-ppc.c: ensure we have enough room for the profiler
796         calls (fixed bug#72084).
797
798 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
799
800         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
801         it.
802
803 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
804
805         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
806
807 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
808
809         * ssapre.c: Fixed an issue with down safety (this allows IronPython
810         to succesfully execute parrotbench).
811         * ssapre.h: Likewise.
812
813 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
814
815         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
816         variable for stores to method arguments (fixes a SSAPRE issue).
817
818 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
819
820         * mini.c: handle value types in dup, fixes gen-112.cs.
821
822 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
823
824         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
825         sequence for calls in dynamic methods to avoid thunks.
826
827 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
828
829         * mini.c: correctly remove dynamic methods from the hashtable.
830
831 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
832
833         * driver.c: Disabled SSAPRE until fix the bug that appears
834         in IronPython's parrotbench.
835
836 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
837
838         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
839
840         * mini.c (mono_method_to_ir): Revert the previous change.
841         
842         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
843         when AOT compiling.
844
845         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
846         mono_jit_info_table_find () etc. when running under valgrind.
847
848         * inssel.brg: Fix warnings.
849
850         * mini-exceptions.c: Fix warnings.
851
852 2005-01-31  Martin Baulig  <martin@ximian.com>
853
854         * driver.c (compile_all_methods_thread_main): Don't try to compile
855         generic methods or anything which has type parameters.
856
857 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
858
859         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
860
861         * TestDriver.cs: Add --verbose flags.
862
863         * graph.c ssa.c: Fix 64 bit warnings.
864         
865         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
866         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
867         Fix 64 bit warnings.
868
869         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
870         variable not spotted by gcc.
871         
872         * mini-amd64.c inssel-amd64.brg: Applied patch from  
873         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
874         X86_COMPARE_MEMBASE opcodes.
875
876         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
877
878 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
879
880         * *: MonoMethod->signature might be NULL now. You *MUST* use
881         mono_method_signature.
882
883 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
884
885         * driver.c (compile_all_methods_thread_main): Compile the methods
886         without invoking cctors.
887
888 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
889
890         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
891         * basic-calls.cs: test for the above.
892
893 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
894
895         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
896         MonoJitInfo changes.
897
898 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
899
900         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
901         eagerly if it contains dynamic methods.
902         
903         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
904
905         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
906         trace, it is now computed by an icall from trace_ips.
907         
908         * mini-exceptions.c: Fix a warning.
909
910 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
911
912         * mini-exceptions.c: don't bother getting stack trace info if
913         it's not going to be used.
914
915 2005-01-27  Raja R Harinath  <rharinath@novell.com>
916
917         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
918         ssapre-mini-ops.h.
919
920 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
921
922         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
923
924         * aot.c: Avoid calling mono_method_get_header () if not needed.
925
926         * mini.h: Bump AOT file format version.
927         
928         * mini.c (mono_emit_native_call): Allocate a GOT var here.
929
930         * mini.c (mono_print_tree): Print more info for calls.
931
932 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
933
934         * declsec.h: Remove warning by adding missing include for marshal.h
935
936 2005-01-26  Martin Baulig  <martin@ximian.com>
937
938         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
939         `ip' twice.
940
941 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
942
943         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
944         flags.
945
946         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
947
948         * aot.c (mono_compile_assembly): Fix a warning.
949
950 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
951
952         * declsec.c: Look for security attributes on the original MonoMethod 
953         (and not the wrapped one). This fix permissions on icalls.
954
955 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
956
957         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
958
959         * mini.c (mono_allocate_stack_slots): Add a fixme.
960
961         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
962
963 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
964
965         * inssel.brg: optimize casts of sealed types (more
966         optimizations waiting for fixes in remoting).
967
968 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
969
970         * inssel.brg (stmt): Add another dummy rule.
971
972         * driver.c: Fix warnings.
973
974         * driver.c (mono_main): If running under valgrind, instruct glib to use
975         the system allocation functions so valgrind can track the memory
976         allocated by the g_... functions.
977
978         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
979
980         * mini-ops.h: Add OP_DUMMY_STORE opcode.
981
982         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
983
984         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
985         variables in try regions.
986
987         * mini.c (mini_method_compile): Don't disable optimizations on large
988         methods when AOT compiling.
989
990         * mini.c (mono_allocate_stack_slots): New arch independent method to 
991         allocate stack slots. Not yet used.
992
993 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
994
995         * debug-mini.c (mono_debug_close_method): Plug some leaks.
996
997 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
998
999         * mini-ppc.c: make the branch info relative as the code
1000         buffer can be reallocated.
1001
1002 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
1003
1004         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
1005         * driver.c: Removed the AOT/security restriction. Now initialize the
1006         security manager (in metadata) if --security is used.
1007         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
1008         rather than the pointer to declarative security, when AOT is used.
1009
1010 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
1011
1012         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
1013         basic blocks, reduced intrinsic exception throwing code size.
1014
1015 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
1016
1017         * driver.c (mini_usage): Reorder the usage screen.
1018
1019 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
1020
1021         * mini.c (mono_resolve_patch_target): Fix warning.
1022
1023 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
1024
1025         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
1026         previous patch.
1027
1028         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
1029
1030         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
1031         breaks the amd64 build.
1032
1033         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
1034         register allocation. Fixes #71454.
1035
1036         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
1037
1038         * arrays.cs: Add new regression test.   
1039
1040 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
1041
1042         * ssapre.c: Turned usage of snprintf to GString.
1043         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
1044         (I left it on by mistake in my previous commit).
1045
1046 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
1047
1048         * mini.c, cfold.c, basic-calls.cs: preserve side effects
1049         on cond branch optimization (fixes bug# 71515).
1050
1051 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
1052
1053         * abcremoval.c: Fixed bug 71062.
1054         * abcremoval.h: Likewise.
1055
1056 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
1057
1058         * mini.c: Added a new functionality to optimize_branches, the removal
1059         of useless basic blocks, and fixed some problem in the removal of
1060         critical edges; some utility functions added for both purposes.
1061         * ssapre.c: Added complex expression support, and fixed bug 70637.
1062         * ssapre.h: Likewise.
1063         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
1064         enabled in SSAPRE.
1065         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
1066         * driver.c: Re-enabled SSAPRE.
1067
1068 2005-01-19  Martin Baulig  <martin@ximian.com>
1069
1070         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
1071         the result of mono_get_method_constrained().
1072
1073 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
1074
1075         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
1076         manager.
1077
1078 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
1079
1080         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
1081         be detected.  Fixes #59296.
1082
1083 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
1084
1085         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
1086         which can happen. Fixes #71361.
1087
1088 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
1089
1090         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
1091         manager.
1092
1093 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
1094
1095         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
1096         appdomain-unload.exe to fail.
1097         
1098         * mini.c: Fix some memory leaks.
1099
1100 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
1101
1102         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
1103         Fixed bug and sped up some codepaths.
1104
1105 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
1106
1107         * mini.c: Fix some memory leaks.
1108
1109         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
1110         conversion.
1111
1112         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
1113
1114         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
1115         #71320.
1116
1117         * iltests.il: Add regression test for #71320.
1118
1119 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
1120
1121         * mini.c (mono_codegen): Fix installation of profiler hooks.
1122
1123         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
1124
1125 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
1126
1127         * mini.h, mini.c, cfold.c: optimize access to enum
1128         readonly fields, too. Eval conditional branches if possible
1129         to perform unreachable code removal in more cases.
1130
1131 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
1132
1133         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
1134
1135         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
1136         code manager.
1137
1138         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
1139         WinXP DEP. Fixes #71244.
1140
1141 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
1142
1143         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
1144
1145 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
1146
1147         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
1148
1149 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
1150
1151         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
1152         changes.
1153
1154         * mini.h: Bump AOT version.
1155
1156         * mini.h (MonoCompile): Change exvar to a hash table.
1157
1158         * mini.c: Allocate a separate exvar for each handler block.
1159
1160         * mini.c: Get rid of the computation of filter_lengths, its not needed.
1161
1162         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
1163         ex var with the pending exception and only throw if the two are equal.
1164         Fixes #68552.
1165         
1166         * exceptions.cs: Add tests for rethrow and nested catch clauses.
1167
1168         * mini-x86.c: Fix warnings.
1169
1170         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
1171         used by all the ports now.
1172
1173         * aot.c: Add write-symbols and save-temps options.
1174
1175 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
1176
1177         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
1178
1179 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
1180
1181         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
1182         operations.
1183
1184         * tramp-s390.c: Check vtable slot belongs to the domain.
1185
1186         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
1187         as per other platforms.
1188
1189         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
1190
1191 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
1192
1193         * driver.c: we don't run the Main() code in a subthread anymore.
1194
1195 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
1196
1197         * mini.c: added experimental rtc support in the statistical
1198         profiler: if the user has the permission, more accurate statistics
1199         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
1200         The MONO_RTC value must be restricted to what the linux rtc allows:
1201         power of two from 64 to 8192 Hz.
1202
1203 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
1204
1205         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
1206
1207 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
1208
1209         * mini-ppc.c: better icache flush for smp.
1210
1211 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
1212
1213         * mini-amd64.c (emit_move_return_value): Fix memory leak.
1214
1215         * mini-x86.c (get_call_info): Add the get_call_info () code from the
1216         amd64 port, not yet used.
1217
1218 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
1219
1220         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
1221         a struct type.
1222
1223 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
1224
1225         * driver.c: Added --security option to activate the security manager.
1226         Right now this will allow code generation for declarative demands and
1227         is disabled when AOT is specified.
1228         * mini.c: Add code generation for declarative security demands.
1229         * mini.h: Add mono_use_security_manager as an extern gboolean.
1230
1231 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
1232
1233         * aot.c (mono_compile_assembly): Speed up compilation a bit by
1234         emitting more dense assembly code.
1235
1236         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
1237         exception throwing stuff.
1238
1239 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
1240
1241         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
1242         dead code.
1243
1244         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
1245         left in by mistake.
1246
1247         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
1248         fixed.
1249
1250         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
1251
1252         * tramp-*.c: Only patch vtable slots if the object is in the current
1253         domain. Fixes appdomain-unload.exe.
1254
1255         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
1256         
1257         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
1258         x86 branch.
1259
1260 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
1261
1262         * mini.c (reverse_branch_op): New helper function.
1263
1264         * mini.c (optimize_branches): Run the new optimization only on 
1265         platforms which support it. Also reverse all kinds of branches.
1266
1267         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
1268
1269         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
1270         a throw statement.
1271
1272         * mini.c (optimize_branches): Reverse not-equals branches if the false
1273         bblock is a throw. This happens a lot of time with argument checking in
1274         corlib.
1275
1276         * mini.c (mono_codegen): Add support for placing basic blocks after
1277         the function epilogue.
1278
1279         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
1280         function epilogue.
1281         
1282 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
1283
1284         * mini.c (setup_stat_profiler): Only set this up if the platform
1285         supports ITIMER_PROF.
1286
1287 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
1288
1289         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
1290         previous patch.
1291
1292         * inssel.brg: Fix a warning.
1293
1294 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
1295
1296         * mini.c: added support for statistical profiler 
1297         (run with: --profile=default:stat).
1298
1299 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
1300
1301         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
1302
1303         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
1304
1305         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
1306         related to global registers from the amd64 port.
1307
1308 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
1309
1310         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
1311
1312         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
1313         with global registers.
1314         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
1315
1316         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
1317
1318 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
1319
1320         * debug-mini.c (encode_value): Fix off-by-one.
1321
1322         * aot.c (encode_value): Likewise.
1323
1324         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
1325
1326 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
1327
1328         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
1329         AOT.
1330
1331         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
1332         
1333         * aot.c (emit_method_info): Increase size of temp buffer.
1334
1335         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
1336         the AOT case.
1337
1338 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
1339
1340         * aot.c (emit_method_info): Fix build.
1341         
1342         * aot.c: Further rework of the AOT file format to reduce the size of
1343         the method info data.
1344
1345         * mini.h: Bump AOT file format version.
1346
1347 2004-12-27  Martin Baulig  <martin@ximian.com>
1348
1349         * mini.c (mini_get_method): New static method; call
1350         mono_get_method_full() and mono_get_inflated_method().
1351         (mono_method_to_ir): Use mini_get_method() instead of
1352         mono_get_method_full(). 
1353
1354 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
1355
1356         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
1357
1358 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
1359
1360         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
1361
1362         * inssel-amd64.brg: Add some optimization rules.
1363
1364 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
1365
1366         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
1367         standard not GC'd stuff is fine.
1368
1369 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
1370
1371         * aot.c: Rework the AOT file format to get rid of most of the global
1372         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
1373
1374         * mini.h: Bump AOT file format version.
1375         
1376 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
1377
1378         * mini.h: Bump AOT file format version.
1379
1380         * aot.c (mono_aot_is_got_entry): New function to determine if an 
1381         address is inside a GOT.
1382
1383         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
1384
1385         * cpu-pentium.md: Increase the maximum size of some instructions which
1386         might involve a got access.
1387         
1388         * mini.c (get_method_from_ip): Another debug helper function.
1389
1390         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
1391         when got var accesses are created during the decompose phase.
1392
1393         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
1394
1395         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
1396         argument mini_compile_method and to MonoCompile, and use this to
1397         determine whenever a given method is compiled for AOT. This allows the
1398         other methods compiled during AOT compilation to be free of AOT stuff,
1399         so the backends does not need to add special support for them by
1400         creating a fake GOT etc.
1401
1402         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
1403         longer needed.
1404
1405 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
1406
1407         * mini.c (mono_method_to_ir): It turns out that some of the
1408         x-appdomain wrappers are lax with types, so just ignore this for
1409         all wrappers.
1410
1411         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
1412         at the vtable->klass. If it is non-shared code we can just use the
1413         vtable.
1414
1415 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
1416
1417         * mini-ppc.c: access MonoDomain from tls, too.
1418
1419 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
1420
1421         * declsec.c: Removed unused variable (and related warning ;-)
1422
1423 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
1424
1425         * iltests.il: New test for LDELEMA on an array of ref types.
1426
1427         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
1428         all ldelema's on reftypes.
1429         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
1430         it was the wrong place to put it.
1431
1432         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
1433         register to pop to make this cleaner, at the request of Paolo.
1434
1435 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
1436
1437         * mini-ops.h (OP_GETHASHCODE): New op.
1438
1439         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
1440
1441         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
1442         operation.
1443
1444         For a microbenchmark, this reduces the cost of Hashtable.get_Item
1445         by 25%.
1446         
1447         * mini-x86.c (mono_arch_output_basic_block): Rather than
1448
1449         add ebp, 4
1450
1451         Emit
1452
1453         pop edx
1454
1455         The first is 3 bytes while the second is 1. This saves 36 kb on
1456         mscorlib, quite a big saving. When bootstraping mcs, I was able to
1457         see a small boost because of icache locality.
1458
1459         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
1460
1461 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
1462
1463         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
1464         started code sharing with the generic code.
1465
1466 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
1467
1468         * mini-ppc.c, cpu-g4.md: added code for direct access to
1469         tls data slots.
1470
1471 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
1472
1473         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
1474          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
1475         to OP_TLS_GET.
1476
1477 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
1478
1479         * declsec.c|h: Added functions to cache the declarative stack modifiers
1480         in MonoJitInfo and to create a security frame from a MonoJitInfo 
1481         structure.
1482         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
1483         created. Register internal calls for System.Security.SecurityFrame::
1484         _GetSecurityFrame and _GetSecurityStack.
1485         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
1486         the definitions for the new stack walk/callback mechanism.
1487         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
1488         first security frame for LinkDemands and InheritanceDemands) and
1489         GetSecurityStack for Demands. Both use the new mono_walk_stack code
1490         from lupus.
1491         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
1492         walk initialization (lupus).
1493
1494 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
1495
1496         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
1497         idiom.
1498         (handle_loaded_temps): Do not create a temporary variable for
1499         things that we know are temps. They will never be modified.
1500         (mono_spill_call): Set MONO_INST_IS_TEMP
1501         (mono_emulate_opcode): ditto
1502         (emit_tree): ditto
1503         (mono_method_to_ir.CEE_DUP): ditto
1504
1505 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
1506
1507         * mini.c (type_to_eval_stack_type): Make this handle the void type
1508         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
1509         (emit_tree): use ip_in_bb to special case some common idioms
1510         Update all callers to pass in the IP.
1511         (mono_method_to_ir): Make CEE_CALL* do the above as well.
1512
1513         This gives us a nice 2% speedup in mcs bootstrap.
1514
1515         * mini-x86.c (peephole_pass): Peephole pass to make
1516         mov  [foo], eax
1517         push [foo]
1518
1519         into
1520
1521         mov [foo], eax
1522         push eax
1523
1524         * mini.c (ip_in_bb): new method.
1525         (mono_method_to_ir): use this method rather than doing the hash
1526         lookup ourselves.
1527
1528         * linear-scan.c (mono_linear_scan): When expiring actives, you
1529         don't need to keep around variables that expire on this
1530         instruction. This makes it so that:
1531              a = b + 1
1532         will turn into:
1533              store (ebx add (ebx, 1))
1534         which will become
1535              add ebx, 1
1536
1537 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
1538
1539         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
1540         combination to avoid doing two copies. Fix up problems with previous
1541         patch.
1542
1543         * mini.c: Fix 64 bit warnings.
1544
1545         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
1546
1547 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
1548
1549         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
1550         changes from the x86 code.
1551
1552         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
1553
1554 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
1555
1556         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
1557         throwing code to reduce its size, unify the AOT and non-aot code and 
1558         get rid of relocations in the AOT case.
1559
1560         * mini-x86.h mini.c exceptions-x86.c 
1561         (mono_arch_get_throw_corlib_exception): New arch specific function to 
1562         raise corlib exceptions which doesn't require relocations in the 
1563         caller.
1564
1565         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
1566
1567 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
1568
1569         * mini.c (mono_emit_method_call): Only allocate the got var when it is
1570         needed.
1571
1572         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
1573         in the AOT case.
1574
1575 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
1576
1577         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
1578         with add function when used from Inc/dec atomic 
1579         functions. Re-enabled optimization on x86.
1580         * mini-ops.h: renamed atomic_add functions to
1581         allow _add to match the Interlocked::Add and
1582         _add_next to match Interlocked::Inc/Dec.
1583
1584 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
1585
1586         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
1587         linking of BBs to the end BB, and enabled SSAPRE also with
1588         consprop and copyprop (which was prevented by that bug).
1589
1590 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
1591
1592         * mini-x86.c: disabling the Interlocked optimizing code. 
1593
1594 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
1595
1596         * aot.c (load_aot_module): Move reading of got_addr after the AOT
1597         file version check.
1598         
1599 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
1600
1601         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
1602         interlocked optimization due lack of support on x86, rewrote 
1603         exchange to take into account that base may be in eax.
1604         
1605         xsp works again; activated Interlocked optimizing code.
1606         
1607 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
1608
1609         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
1610
1611 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
1612
1613         * mini-ops.h: Add new opcodes.
1614
1615         * mini.h: Add new patch types. Add got_var to MonoCompile.
1616
1617         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
1618         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
1619         make it work with all kinds of patchable code.
1620
1621         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
1622         address of the GOT, and referencing entries in the GOT.
1623
1624         * mini.c: Add code to load the GOT address if needed by an opcode.
1625
1626         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
1627         independent AOT code on the x86 using an elf-style Global Offset Table.
1628
1629 2004-12-14  Raja R Harinath  <rharinath@novell.com>
1630
1631         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
1632
1633 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1634
1635         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
1636         when running xsp.
1637
1638 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
1639
1640         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
1641         of Interlocked:Increment/Decrement/Add as inline ops.
1642         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
1643
1644 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
1645
1646         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
1647         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
1648
1649 2004-12-12  Duncan Mak  <duncan@ximian.com>
1650
1651         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
1652         again. `patch_info->table_size' is no longer valid after Zoltan's
1653         commit #37636.
1654
1655 2004-12-12  Martin Baulig  <martin@ximian.com>
1656
1657         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
1658         if we are the "real" method, ie. not an inlined method inside it.
1659
1660 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
1661
1662         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
1663         before we look in the special fields table. This fixes
1664         ../tests/thread-static-init.cs.
1665
1666 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1667
1668         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
1669         for Array get_Rank and get_Length. Fixes bug #70465.
1670
1671 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
1672
1673         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
1674         separate structure to reduce the size of MonoJumpInfo.
1675
1676 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
1677
1678         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
1679
1680 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
1681
1682         * mini.c (mini_get_inst_for_method): Changed to allow ports
1683         to return a MonoInst instead of opcode 
1684         (renamed mini_get_opcode_for_method to better reflect the new functionality)
1685         
1686         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
1687         Allow ports to return a created MonoInst instead of op-code, will enable
1688         new optimizations.
1689         (renamed mini_get_opcode_for_method to better reflected the functionality)
1690
1691 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
1692
1693         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
1694
1695 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
1696
1697         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
1698         Fixes #69985.
1699
1700 2004-12-08  Martin Baulig  <martin@ximian.com>
1701
1702         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
1703         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
1704
1705 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
1706
1707         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
1708         correctly.
1709
1710         * exceptions.cs: Disable some tests which depend on properties of x86 fp
1711         arithmetic.
1712
1713 2004-12-08  Raja R Harinath  <rharinath@novell.com>
1714
1715         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
1716
1717 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
1718
1719         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
1720         bug introduced by the previous patch.
1721
1722 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
1723
1724         * mini-ppc.c, objectc.cs: handle large structs passed by value
1725         (fixes bug #69972).
1726
1727 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
1728
1729         * mini-ppc.c: OP_ARGLIST implementation from
1730         Geoff Norton  <gnorton@customerdna.com>.
1731
1732 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
1733
1734         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
1735         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
1736
1737 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
1738
1739         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
1740
1741 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
1742
1743         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
1744         support.
1745
1746 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
1747
1748         * mini-sparc.c: Zero out localled-ed memory.
1749
1750         * iltests.il: Add tests for zeroing out localloc-ed memory.
1751
1752 2004-12-04  Martin Baulig  <martin@ximian.com>
1753
1754         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
1755         mono_method_get_signature_full().       
1756
1757 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
1758
1759         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
1760         and some utility functions (always for SSAPRE), integrated SSAPRE.
1761         * mini.h: Likewise.
1762         * driver.c: Added ssapre option.
1763         * ssa.c: Small fix on OP_ARG handling.
1764         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
1765         * Makefile.am: Likewise.
1766
1767 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
1768
1769         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
1770         now in the xp code.
1771
1772         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
1773         icall.
1774
1775 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
1776
1777         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
1778         
1779         * cpu-s390.md : Increase instruction length of oparglist.
1780
1781         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
1782
1783 2004-11-30  Martin Baulig  <martin@ximian.com>
1784
1785         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
1786         virtual generic methods.  We call a special helper_compile_generic_method()
1787         icall to retrieve the method from the vtable, inflate and compile
1788         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
1789
1790         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
1791
1792 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
1793
1794         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
1795
1796 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
1797
1798         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
1799         Fixes #69929.
1800
1801 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
1802
1803         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
1804         platforms with PIC aot.
1805
1806 2004-11-28  Martin Baulig  <martin@ximian.com>
1807
1808         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
1809         Fixes gen-112.cs.
1810
1811 2004-11-28  Martin Baulig  <martin@ximian.com>
1812
1813         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
1814         the result of mono_type_get_underlying_type() to check whether
1815         we're byref.
1816
1817 2004-11-26  Martin Baulig  <martin@ximian.com>
1818
1819         * mini.c
1820         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
1821         in the g_assert().
1822
1823 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
1824
1825         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
1826         the same way as the other arguments so they won't get clobbered.
1827
1828         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
1829         calls through R11 since it is clobbered by the trampoline code.
1830
1831 2004-11-26  Raja R Harinath  <rharinath@novell.com>
1832
1833         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
1834         pick up in-tree mscorlib.dll.
1835
1836 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
1837
1838         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
1839
1840         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
1841         runtime data/code are now stored in a table similar to the GOT in ELF. 
1842         This allows the code itself to be position independent.
1843
1844         * aot.c: Fix loading of referenced assemblies after the lazy assembly
1845         loading changes.
1846
1847         * aot.c: Attach ELF type (object/function) directives to all global
1848         symbols.
1849
1850         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
1851
1852         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
1853
1854         * mini-amd64.h: Turn on PIC AOT code.
1855
1856         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
1857         returning the offset within an OP_AOTCONST instruction where the GOT
1858         offset needs to be added.
1859
1860         * mini.h: Bump AOT file format version.
1861
1862 2004-11-25  Martin Baulig  <martin@ximian.com>
1863
1864         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
1865         uninflated generic methods.
1866
1867 2004-11-25  Martin Baulig  <martin@ximian.com>
1868
1869         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
1870
1871 2004-11-24  Martin Baulig  <martin@ximian.com>
1872
1873         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
1874         original klass (this only applies for generic instances).
1875
1876 2004-11-24  Martin Baulig  <martin@ximian.com>
1877
1878         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
1879         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
1880         that array).
1881
1882 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
1883
1884         * mini.c (mono_method_to_ir): Disable inlining for methods containing
1885         localloc. Fixes #69678.
1886
1887         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
1888         
1889 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
1890
1891         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
1892         used SSE registers on pinvoke calls. Fixes #69774.
1893
1894 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
1895
1896         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
1897         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
1898
1899 2004-11-23  Raja R Harinath  <rharinath@novell.com>
1900
1901         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
1902         Refer directly to the mcs/ tree.
1903
1904 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
1905
1906         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
1907         Check if a trampoline for a synchronized method is required. 
1908
1909 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
1910
1911         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
1912         with localloc if needed. Throe arithmetric exception in
1913         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
1914         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
1915
1916 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
1917
1918         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
1919         types before switching on type.  Fixes #69622.
1920
1921 2004-11-19  Raja R Harinath  <rharinath@novell.com>
1922
1923         * Makefile.am (check-local): New.  Integrate into 'make check'.
1924         (MCS,RUNTIME): Define using in-tree mono and mcs.
1925         (ILASM): New.
1926         (%.exe): Use $(ILASM).
1927
1928 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
1929
1930         * mini-ppc.c: adjust initial prolog size (bug #69691).
1931
1932 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
1933
1934         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
1935         #69664.
1936
1937 2004-11-17  Raja R Harinath  <rharinath@novell.com>
1938
1939         * Makefile.am (clean-local): Rename from 'clean'.
1940
1941 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
1942
1943         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
1944         to mono_arch_is_int_overflow. 
1945         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
1946         SIGFPE events.
1947
1948 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
1949
1950         * declsec.c|h: New files to support declarative security attributes.
1951         Added function to check if a method has (applicable) security.
1952         * mini.c|h: Add check for declarative security attributes in
1953         mono_method_check_inlining.
1954         * Makefile.am: Added declsec.c and declsec.h to the build.
1955
1956 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
1957
1958         * mini.c, mini.h: update to keep dynamic code info per-domain.
1959
1960 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
1961
1962         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
1963         (mini_init): Get rid of it from here too.
1964
1965 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
1966
1967         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
1968         implemented OP_RETHROW (patch by Geoff Norton
1969         <gnorton@customerdna.com>).
1970
1971 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
1972
1973         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
1974         between appdomains.  Fixes appdomain-unload on PPC.
1975
1976 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
1977
1978         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
1979         mini-exceptions.c: handle the new wrapper types.
1980         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
1981         token value as a MonoClass* when compiling a wrapper.
1982         mono_jit_create_remoting_trampoline now takes an additional
1983         MonoRemotingTarget parameter.
1984         
1985 2004-11-10  Martin Baulig  <martin@localhost>
1986
1987         * mini.c (mono_method_to_ir): Use `generic_container->context'
1988         rather than creating a new one.
1989
1990 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
1991
1992         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
1993
1994         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
1995
1996 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
1997
1998         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
1999         the experimental aot cache stuff.
2000
2001 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
2002
2003         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
2004         mini-exceptions.c: update to exception clause structure changes.
2005
2006 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
2007
2008         * exceptions-x86.c (throw_exception): Fix warnings.
2009
2010         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
2011         for OP_RETHROW.
2012
2013 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
2014
2015         * exceptions-sparc.c (get_throw_exception): Really fix this.
2016
2017 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
2018
2019         * tramp-*.c: we no longer support icalls without wrappers, so
2020         a bit of code can be removed here
2021
2022 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
2023
2024         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
2025         patch.
2026
2027         * cpu-sparc.md: Add op_rethrow.
2028
2029         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
2030
2031         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
2032
2033         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
2034         * mini-ops.h: Add OP_RETHROW.
2035
2036         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
2037
2038         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
2039
2040 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
2041         
2042         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
2043         Makes the output much easier to read
2044
2045 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
2046
2047         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
2048         prevents another huge leak when compiling with ssa. Secondly, the
2049         performance of doing this rather than freeing the lists is much
2050         better. GList does a lock every time you allocate a list link,
2051         so that it can use a memory pool. So, it is better to just use
2052         a memory pool of our own.
2053         
2054         * ssa.c, linear-scan.c: replace g_list_remove_link with
2055         g_list_delete.  The remove one does not free the GList, so we were
2056         leaking memory. On -O=all --compile-all with corlib, this cut down
2057         3 MB of allocations.
2058
2059 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
2060
2061         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
2062
2063         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
2064
2065         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
2066         into a new function mono_create_jit_trampoline ().
2067
2068 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
2069
2070         * trace.c (get_spec): Allow tracing of classes without a namespace.
2071
2072 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
2073
2074         * mini.c: Fix pointer overwrite in mini_method_compile.
2075
2076 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
2077
2078         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
2079         The darwin ABI needs some special handling for 1 and 2 byte structs
2080         Lets use lbz/lhz instead of lwz everywhere.
2081         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
2082         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
2083         Use stb/sth for the former, and put the latter always on stack instead of in
2084         argument registers.
2085
2086 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
2087
2088         * trace.c (is_filenamechar): Add '_'.
2089
2090 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
2091
2092         * mini-s390.c: Fix prolog length to allow for large trace requirements.
2093
2094         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
2095
2096 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
2097
2098         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
2099         depends on libmonogc. Fixes #68805.
2100
2101 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
2102
2103         * mini.c (mono_jit_free_method): Provide extra information for
2104         this error.  Currently this leaks, but will be turned into a
2105         developer option in the future.
2106
2107 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
2108
2109         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
2110
2111 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
2112
2113         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
2114         boundary. Fixes reading of PATCH_INFO_R4 and R8.
2115         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
2116
2117 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
2118
2119         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
2120         trampolines for AOT code.
2121
2122 2004-10-22    <vargaz@freemail.hu>
2123
2124         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
2125         constructed types. Fixes #68136.
2126
2127 2004-10-21  Martin Baulig  <martin@ximian.com>
2128
2129         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
2130         if it returns true, unwind the stack to the call instruction.
2131
2132 2004-10-21    <vargaz@freemail.hu>
2133
2134         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
2135
2136         * mini.h: Bump AOT version number.
2137
2138         * objects.cs: Add another test for unbox trampolines.
2139
2140         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
2141         valuetype methods.
2142
2143 2004-10-20    <vargaz@freemail.hu>
2144
2145         * driver.c: Add SHARED to the set of optimizations tested.
2146
2147         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
2148
2149         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
2150         used by CEE_NEWARR.
2151
2152         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
2153
2154 2004-10-20  Martin Baulig  <martin@ximian.com>
2155
2156         * mini-exceptions.c (mono_handle_exception): Call
2157         mono_debugger_handle_exception() to tell the debugger about
2158         catch/finally clauses.
2159
2160 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
2161
2162         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
2163
2164         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
2165         #68447.
2166
2167 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
2168
2169         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
2170         methods as their native size, fixed bug #57543, #57545.
2171         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
2172         This saves a temporary register and mullw call down into 1 (minor perf
2173         increase for cases like sum = sum * 5;  This use to translate into:
2174             li r11,5
2175             mullw r28,r28,r11
2176         It now translates to
2177             mulli r28,r28,5
2178
2179 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
2180
2181         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
2182         #68388.
2183
2184 2004-10-11  Martin Baulig  <martin@ximian.com>
2185
2186         * mini.c (mono_method_to_ir): If we're a generic method, get the
2187         MonoGenericContainer from our MonoMethodNormal and create a
2188         MonoGenericContext from it.
2189
2190 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
2191
2192         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
2193
2194         * basic-long.cs: Add test for checked i8->i2 cast.
2195
2196 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
2197
2198         * inssel-ppc.brg: added a couple of speedup rules.
2199
2200 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
2201
2202         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
2203         to speed up rebuilds.
2204
2205 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
2206
2207         * mini-s390.c: Minor fix to OP_OR_IMM.
2208
2209 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
2210
2211         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
2212         better. Fixes appdomain-unload.exe on sparc.
2213
2214 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
2215
2216         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
2217         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
2218         see bug 67324.
2219
2220 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
2221
2222         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
2223
2224 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
2225
2226         * mini.c: Always generate a field read/write wrapper for members
2227         of the class MarshalByRefObject since the actual instance could
2228         be a CBO.
2229
2230 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
2231
2232         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
2233
2234 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
2235
2236         * driver.c mini.h trace.c: Move the setting of the main assembly into
2237         a separate function called mono_trace_set_assembly () and call it after
2238         actually loading the main assembly. Fixes #66872.
2239
2240 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
2241
2242         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
2243         using the code manager.
2244
2245 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
2246
2247         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
2248
2249 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
2250
2251         * cpu-amd64.md: Fix bug in previous patch.
2252         
2253         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
2254         #66650.
2255
2256 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
2257
2258         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
2259         mini-exceptions.c: updates for changed stack walk interface.
2260
2261 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
2262
2263         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
2264
2265 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
2266
2267         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
2268
2269 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
2270
2271         * driver.c (mini_regression_list): Do not call mono_assembly_close 
2272         since assemblies can't be unloaded.
2273         
2274 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
2275
2276         * cpu-amd64.md: Fix more instruction lengths.
2277
2278         * cpu-amd64.md: Fix lengths of some instructions.
2279
2280 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
2281
2282         * inssel.brg: Make the array ldelema check aot friendly.
2283
2284 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
2285
2286         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
2287
2288         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
2289
2290 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
2291
2292         * mini-x86.c: Fix build.
2293
2294         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
2295         mono_type_get_underlying_type () helper function to simplify code.
2296         
2297 2004-09-09  Martin Baulig  <martin@ximian.com>
2298
2299         * mini-amd64.c: Don't access `type->data.klass' directly, call
2300         mono_class_from_mono_type() instead since the type may be a
2301         generic instance.
2302
2303 2004-09-09  Martin Baulig  <martin@ximian.com>
2304
2305         * mini-amd64.c (get_call_info): Fix support for generic instances.
2306         (add_valuetype): Use mono_class_from_mono_type() to get the class
2307         since we can be a generic instance.
2308
2309 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
2310
2311         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
2312
2313 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
2314
2315         * liveness.c: reset spill costs on each scan: bug 62107
2316
2317 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
2318
2319         * exceptions-sparc.c (mono_arch_find_jit_info): remove
2320         unnecessary line that doesn't compile
2321
2322 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
2323
2324         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
2325         trampolines, make them call an error function so people can fix their
2326         code.
2327
2328 2004-09-06  Martin Baulig  <martin@ximian.com>
2329
2330         * mini.c (mono_method_to_ir): When initializing locals, handle a
2331         generic instances like a valuetype if it's a valuetype and like a
2332         class if it's a class.
2333
2334 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
2335
2336         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
2337         stack. Fixes #64674.
2338
2339         * exceptions.cs: Add test for unwinding of call arguments.
2340
2341 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
2342
2343         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
2344         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
2345         set the carry/borrow flag). The sparc and s390 implementations
2346         can now use optimized versions (and simplify the code). ppc bugfixes.
2347
2348 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
2349
2350         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
2351
2352 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
2353
2354         * inssel-amd64.brg: Remove leftover 32 bit rule.
2355
2356         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
2357
2358 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
2359
2360         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
2361         mono_arch_find_jit_info functions into a new function. Fix a memory
2362         leak.
2363
2364         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
2365         refactored code.
2366         
2367 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
2368
2369         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
2370         as well.
2371         
2372         * exceptions.cs: Add array size tests.
2373
2374         * mini.c: Allocate a separate icall wrapper for each arity of 
2375         mono_array_new_va. Fixes #59509.
2376
2377         * exceptions.cs: Add testcase for 64578.
2378
2379         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
2380
2381         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
2382         
2383 2004-09-02  Martin Baulig  <martin@ximian.com>
2384
2385         * mini.c (mono_method_to_ir): When initializing the locals, call
2386         handle_initobj() on the generic instance itself, not its
2387         underlying type.
2388
2389 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
2390
2391         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
2392         MonoJitInfo for dynamic methods.
2393
2394         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
2395
2396         * mini.c: Add support for freeing JIT data for dynamic methods.
2397         
2398 2004-09-01  Martin Baulig  <martin@ximian.com>
2399
2400         * mini-x86.c (is_regsize_var): Added support for generic
2401         instances.
2402         (mono_arch_emit_prolog): Make this compile again, use
2403         `x86_push_imm_template (code)'.
2404
2405 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
2406
2407         * mini-x86.c: make all push_imm instructions that get
2408         patched always emit the long form
2409
2410 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
2411
2412         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
2413         in a per-domain hash.
2414
2415         * mini-amd64.c (merge_argument_class_from_type): Handle generic
2416         types.
2417
2418 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
2419
2420         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
2421         work.
2422         
2423         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
2424         work.
2425
2426         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
2427         Beginnings of SSE2 support.
2428
2429         * exceptions.cs: Add more tests for checked int<->uint casts.
2430
2431 2004-08-28  Martin Baulig  <martin@ximian.com>
2432
2433         * mini-x86.c (mono_arch_instrument_epilog): Added support for
2434         generic instances.
2435
2436         * mini.c
2437         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
2438         Handle generic instances recursively.
2439
2440 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
2441
2442         * iltests.il: test for conv.u8 on a constant
2443
2444 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
2445
2446         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
2447         LCONV_x4 (shrun_32 (membase)).
2448
2449 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
2450
2451         * inssel-x86.brg: c&p rules for push/setret of long
2452
2453 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
2454
2455         * inssel-x86.brg: c&p rules for compare (base, regvar) and
2456         compare (regvar, base)
2457
2458         * inssel-x86.brg: more burg love
2459
2460         * inssel.brg: more cleanup
2461
2462         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
2463
2464 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
2465
2466         * basic-long.cs, basic-calls.cs: new tests for optimization.
2467
2468 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
2469
2470         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
2471         patch.
2472
2473 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
2474
2475         * mini-amd64.c (read_tls_offset_from_method): Add another case.
2476         
2477 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
2478
2479         * inssel.brg (mini_emit_memcpy): use 
2480         NO_UNALIGNED_ACCESS to disable memcpy optimization
2481
2482 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
2483
2484         * mini-amd64.c: Handle generic types in various places.
2485
2486         * mini.c (mono_method_to_ir): Handle generic types in init locals.
2487
2488 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
2489
2490         * mini.c (handle_box): Fix warning.
2491
2492         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
2493
2494         * mini-amd64.h: Enable the emit_state optimization.
2495
2496         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
2497
2498         * mini-amd64.c: Add some new 64 bit peephole opts.
2499
2500         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
2501
2502         * cpu-amd64.md: sreg1 of div instructions must be %rax.
2503
2504         * mini-amd64.c: Register allocator fixes.
2505
2506         * mini.c: Add an optimization to emit_state to avoid allocation of new
2507         registers on some platforms.
2508
2509 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
2510
2511         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
2512
2513         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
2514         allocation. Fixes #63085.
2515
2516         * basic-long.cs: Add new regression test.
2517
2518         * mini-amd64.c: Register allocator improvements.
2519
2520 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
2521
2522         * mini-amd64.c (read_tls_offset_from_method): Add another code
2523         sequence.
2524
2525         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
2526         instruction sequence for nullifying class init trampolines.
2527
2528         * objects.cs: Add new regalloc test.
2529
2530         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
2531
2532 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
2533
2534         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
2535         
2536         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
2537         arguments.
2538
2539         * driver.c: Fix profiling after TLS changes.
2540         
2541         * driver.c (mono_main): Set mono_stats.enabled if needed.
2542
2543         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
2544         CEE_BOX.
2545
2546 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
2547
2548         * mini-x86.c: use a 1 op rather than a 2 op tls access
2549         instruction -> faster.
2550
2551 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
2552
2553         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
2554         x86 backend.
2555
2556 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
2557
2558         * exceptions-sparc.c (throw_exception): fix typo
2559
2560 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
2561
2562         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
2563         set tree->dreg correctly with tls. Allow any
2564         register to be used.
2565
2566         * mini-x86.c (read_tls_offset_from_method): add new code
2567         generation pattern seen with GCC.
2568
2569
2570 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
2571
2572         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
2573         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
2574         exceptions-sparc.c: fix some performance issues in exception
2575         handling and setting of the stack trace for exceptions that were
2576         already thrown.
2577
2578 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
2579
2580         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
2581         x86 backend.
2582         
2583         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
2584         registers.
2585
2586 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
2587
2588         This patch inlines tls access, when possible.
2589         
2590         * mini.h: new arch functions for TLS intrinsics.
2591         All platforms updated with a stub.
2592
2593         * mini.c: use the new intrinsics
2594
2595         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
2596         arch specific intrinsic for tls variables
2597
2598 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
2599
2600         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
2601         under windows.
2602
2603 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
2604
2605         * mini.c: thread local allocation
2606
2607 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
2608
2609         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
2610
2611         * Makefile.am: Link against the static version of libmonogc.
2612         
2613         * Makefile.am: Link the static versions of the convenience libraries
2614         into the mono executable.
2615
2616         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
2617
2618 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
2619
2620         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
2621         on integer overflow.
2622
2623         * mini-amd64.c: Reorganize function call code.
2624
2625         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
2626
2627 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
2628
2629         * inssel-x86.brg: use xor eax,eax.
2630         
2631         * basic.cs: new tests
2632
2633 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
2634
2635         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
2636         in exception throwing code.
2637         
2638 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
2639
2640         * inssel-x86.brg: use xor esi,esi.
2641
2642 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
2643
2644         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
2645         can trace methods compiled during mini_init () too.
2646
2647         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
2648         CEE_CONV_U4.
2649
2650 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
2651
2652         * Makefile.am: static link on x86 (r=zoltan)
2653
2654 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
2655
2656         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
2657         code since it causes some programs to fail.
2658
2659 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
2660
2661         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
2662
2663 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
2664
2665         * mini.c: ovfops_op_map - add STACK_OBJ case for
2666         CONV_I 
2667         * basic.cs: add test_0_pin_string as test
2668         case for above.
2669
2670 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
2671
2672         * Makefile.am: build C# if srcdir != builddir
2673
2674 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
2675
2676         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
2677         fall-through blocks.
2678
2679 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
2680
2681         * driver.c: enable loop by default again and include abcrem in -O=all.
2682
2683 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
2684
2685         * iltests.il: Add some localloc tests.
2686
2687         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
2688
2689         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
2690         Fixes #62574.
2691
2692         * inssel-amd64.brg: Add some optimizations.
2693
2694         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
2695         for gcc-3.4.
2696
2697         * Makefile.am: Statically link mono against libmono on AMD64.
2698         
2699         * mini-amd64.c inssel-amd64.brg: Optimizations.
2700
2701 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
2702
2703         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
2704
2705         * tramp-amd64.c: Patch calling code in trampolines.
2706
2707 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
2708
2709         * mini-amd64.c: pinvoke struct passing fixes.
2710
2711 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
2712
2713         * mini-sparc.c: redo change, make mono_arch_cpu_init call
2714         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
2715
2716 2004-08-05  Duncan Mak  <duncan@ximian.com>
2717
2718         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
2719         CEE_LDELEM_ANY.
2720
2721 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
2722
2723         * mini-amd64.c (emit_move_return_value): Move return value for normal
2724         calls too.
2725
2726 2004-08-05  Martin Baulig  <martin@ximian.com>
2727
2728         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
2729         `type->type'; just modify `type' itself when dealing with enums
2730         and generic instances.
2731         (check_call_signature): Make `simple_type' a `MonoType *'.
2732
2733 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
2734
2735         * mini.c: Use OP_PADD to add offsets to addresses.
2736
2737         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
2738
2739 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
2740
2741         * mini-sparc.c (mono_arch_emit_epilog): fix check
2742         for folding last op into restore instruction
2743
2744 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
2745
2746         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
2747         helper methods using the code manager.
2748         
2749         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
2750
2751         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
2752
2753 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
2754         
2755         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
2756           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
2757
2758         * mini-s390.c: fix tail processing
2759
2760 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
2761
2762         * mini-ppc.c: mul.ovf.un exception name fix.
2763
2764 2004-08-03  Martin Baulig  <martin@ximian.com>
2765
2766         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
2767         instances; before jumping to `handle_enum', also modify `ptype'.
2768
2769 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
2770
2771         * cpu-sparc.md: fcall maximal length too small.
2772
2773 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
2774
2775         * mini-amd64.c mini.h: Add initial support for passing/returning 
2776         structures to/from pinvoked methods.
2777
2778 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
2779
2780         * mini-ppc.c: reg allocator fix.
2781
2782 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
2783
2784         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
2785
2786         * inssel.brg: Optimize memset on 64 bit machines.
2787
2788         * mini-amd64.c: Fix some vararg cases.
2789
2790 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
2791
2792         * mini-s390.c: Corrected macro in emit_float_to_int
2793
2794         * s390-abi.cs: Tests to exercise the s390 ABI
2795
2796 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
2797
2798         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
2799         caller saved regs.
2800
2801         * basic.cs: Add a test for add.ovf.un.
2802
2803 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
2804
2805         * mini-sparc.c: add case for OP_IDIV_UN
2806
2807 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
2808
2809         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
2810         
2811         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
2812
2813 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
2814
2815         * basic.cs: regression tests.
2816
2817         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
2818         regressions.
2819
2820 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
2821
2822         * basic.cs: Add a new test.
2823
2824         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
2825         and AOT. Various fixes and optimizations.
2826
2827         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
2828
2829 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
2830
2831         * mini-ppc.c: make sure temp regs are not used for global reg
2832         allocation.
2833
2834 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
2835
2836         * cpu-sparc.md: conv_i8 fix for 64bits
2837
2838         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
2839
2840 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
2841         
2842         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
2843         add opcode for cmp BYTE PTR [eax], imm.
2844
2845         * inssel.brg: Make memcpy and memset takes bases.
2846
2847 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
2848
2849         * *-amd64.*: More AMD64 work.
2850         
2851 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
2852
2853         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
2854         add a compare-not-equal opcode.
2855         
2856 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
2857
2858         * mini.c: Use mono_init_from_assembly instead of mono_init.
2859         
2860 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
2861
2862         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
2863
2864         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
2865
2866         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
2867
2868         * inssel.brg: 64 bit fixes.
2869
2870         * mini.h (MonoCallInst): Add some AMD64 specific data.
2871
2872         * mini.h: Add some OP_P opcodes.
2873
2874 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
2875
2876         * basic.cs: tests for 61797 and 61740
2877
2878 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
2879
2880         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
2881         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
2882
2883 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
2884
2885         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
2886
2887         * *-amd64*.*: Ongoing AMD64 work.
2888
2889 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
2890
2891         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
2892
2893         * *-amd64*: Ongoing AMD64 work.
2894
2895         * mini-arch.h: Add AMD64 support.
2896
2897         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
2898
2899         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
2900
2901         * mini-ops.h: Add new opcodes.
2902
2903         * Makefile.am: Add AMD64 support.
2904
2905         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
2906         rules into the inssel-long*.brg files.
2907
2908         * *-amd64.*: Add beginnings of AMD64 backend.
2909
2910 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
2911
2912         * mini.c (print_dfn): commenting out the code that prints
2913         the cil. With -O=deadce, this makes -v -v crash.
2914         
2915         * cpu-pentium.md: make checkthis have a length of 2
2916
2917 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
2918
2919         * mini-sparc.h: fix implementations of __builtin
2920         functions for Sun compiler for V9.
2921
2922 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
2923
2924         * mini.c: use the new stelem.ref wrapper
2925         * exceptions.cs, arrays.cs: new stelem.ref tests
2926
2927 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
2928
2929         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
2930         new XSP should work with these changes).
2931
2932 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
2933         
2934         * inssel-{long32,x86,}.brg: trivial optimizations.
2935         
2936 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
2937
2938         * mini.c: load value when emitting box operation in
2939         constrained calls.
2940
2941 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
2942
2943         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
2944         is one byte shorter than cmp DWORD PTR [eax], 0.
2945
2946 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
2947
2948         * inssel-ppc.brg: arguments on the stack are always
2949         relative to the stack pointer (spotted by Neale Ferguson).
2950
2951 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2952
2953         * exceptions-x86.c: delay appending the method name to the trace until
2954         after mono_jit_info_table_find is called, as this gets the real
2955         MonoMethod.
2956
2957 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
2958
2959         * aot.c: register roots
2960
2961 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
2962
2963         * aot.c : I could just use PLATFORM_WIN32 flag.
2964
2965 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
2966
2967         * aot.c : Reverting the previous fix. This time it broke linux build.
2968
2969 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
2970
2971         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
2972
2973 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
2974
2975         * mini.c (handle_stack_args): Remove some more debugging code.
2976         
2977         * mini.c (handle_stack_args): Remove debug output left in by mistake.
2978
2979         * driver.c mini.h aot.c: Allow additional options to be specified with
2980         --aot and pass them to mono_compile_assembly.
2981
2982         * aot.c: Add experimental code to AOT compile all loaded assemblies
2983         on demand and save the code into a cache in the filesystem.
2984
2985         * aot.c: Add support for more wrapper methods.
2986         
2987         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
2988         58863.
2989
2990         * cpu-*.md: Remove removed opcodes.
2991
2992         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
2993         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
2994         related icalls to marshal.c.
2995
2996 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
2997
2998         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
2999
3000         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
3001
3002         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
3003
3004 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
3005         * liveness.c: If liveness is recomputated we need to reset the information
3006         for each variable. This way, if the liveness range has been narrowed
3007         by optimizations that happened after the last computation, we can return
3008         a smaller range.
3009         
3010         For example, if you have
3011         
3012         {
3013                 int i = 0;
3014                 
3015                 // Tons of code that does not affect i
3016                 
3017                 i = foo ();
3018                 ...
3019         }
3020         
3021         i = 0 is dead code and will be removed by SSA. However, when
3022         linear scan gets to the code, i will still appear to be live
3023         throughout the entire block. This prevents good register allocation.
3024
3025 2004-07-06  Martin Baulig  <martin@ximian.com>
3026
3027         * debug-mini.c (mono_debug_init_method): Allow
3028         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
3029         (mono_debug_add_icall_wrapper): New method.
3030
3031         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
3032
3033 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
3034
3035         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
3036         optimization.
3037
3038 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
3039
3040         * aot.c (mono_aot_load_method): Fix loading of debug info.
3041
3042 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
3043
3044         * aot.c: Add logging support.
3045
3046 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
3047
3048         * mini.h: Add prototype for mono_print_method_from_ip.
3049
3050         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
3051
3052         * inssel.brg: 64 bit fixes.
3053
3054         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
3055         inssel-long32.brg.
3056
3057         * Makefile.am: Add SPARC64 support.
3058
3059 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
3060
3061         * aot.c: Fix alignment problems on 32 bit platforms.
3062
3063 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
3064
3065         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
3066         SPARC64.
3067
3068         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
3069         problems.
3070
3071         * mini.h: Bump AOT file version. Some 64 bit fixes.
3072
3073 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
3074
3075         * inssel-sparc.brg: Add new rule to avoid register moves.
3076
3077         * inssel.brg: Add ldind_to_load_membase helper function.
3078
3079 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
3080
3081         * mini.c: OffsetToStringData intrinsic.
3082         
3083 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
3084
3085         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
3086
3087         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
3088         regression tests.
3089
3090         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
3091 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
3092
3093         * mini.c: reinstated mono_compile_get_interface_var()
3094         on x86, too, since the change breaks the Gtk# build there as well.
3095
3096 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
3097
3098         * driver.c: remove loop from the default optimizations: it seems to
3099         interact badly with some of the other options (see bug #60613).
3100
3101 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
3102
3103         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
3104         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
3105
3106 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
3107
3108         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
3109         vararg-using methods.
3110
3111 2004-06-21  Martin Baulig  <martin@ximian.com>
3112
3113         * mini/mini-exceptions.c
3114         (mono_handle_exception): Added `gpointer original_ip' argument.
3115         After calling mono_unhandled_exception(), call
3116         mono_debugger_unhandled_exception() and if that returns true,
3117         restore the context and return.
3118
3119 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
3120
3121         * mini-ppc.c: prefer the use of relative branches so
3122         they won't need to be patched in aot code (patch from Patrick Beard).
3123
3124 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
3125
3126         * aot.c: patch from Patrick Beard to make the output assembly
3127         more correct for the MacOSX assembler. Small tweak to
3128         generate sane images on Linux/PPC, too.
3129
3130 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
3131
3132         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
3133         case until bug #59509 is fixed (shows up in #60332).
3134
3135 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
3136
3137         * mini.c: make sure the needed wrappers are compiled, too, with
3138         precomp.
3139
3140 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
3141
3142         * driver.c: remove NPTL reference in --version output.
3143
3144 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
3145
3146         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
3147         generate valid assembly for the Mach-O assembler.
3148
3149 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
3150
3151         * driver.c: don't include abcrem in the all optimization specifier
3152         since it slows down jit compilation too much for now.
3153
3154 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
3155
3156         * mini.c: use BIGMUL only if both operands have the same signage.
3157         * iltests.il: Test for bug 60056. (errors related to signage in
3158         BIGMUL).
3159
3160         r=lupus.
3161
3162 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
3163
3164         * mini.c, aot.c: memory leak fixes.
3165
3166 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
3167
3168         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
3169
3170 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
3171
3172         * Makefile.am: remove the -static hack completely, it links in
3173         statically glib as well.
3174
3175 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
3176
3177         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
3178         * exceptions.cs: make it compile with new mcs/csc.
3179
3180 2004-06-03 Massimiliano Mantione <massi@ximian.com>
3181         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
3182         and added relevant test case.
3183
3184 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
3185
3186         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
3187         regressions in gtk-sharp.
3188
3189 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
3190
3191         * exceptions.cs: New regression tests.
3192
3193         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
3194
3195 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
3196
3197         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
3198
3199 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
3200
3201         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
3202
3203         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
3204
3205 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
3206
3207         * mini.c (mono_jit_runtime_invoke): Init class in this
3208         method instead of trusting mono_jit_compile_method to
3209         do the work (because wrappers can be in object class)
3210
3211 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
3212
3213         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
3214
3215         * basic-long.cs: New regression test.
3216
3217 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
3218
3219         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
3220         and div/rem checks.
3221
3222 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
3223
3224         * Makefile.am: fix miguel's change to build mono statically against
3225         libmono (track build dependencies).
3226
3227 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
3228
3229         * cfold.c: Some glib versions do not have G_MININT32.
3230
3231 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
3232
3233         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
3234         with precision of tan, atan, sin and cos, and implemented related
3235         regressions tests (fixes bug 54467, but one new problem appeared and
3236         is not fixed yet).
3237
3238 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
3239
3240         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
3241
3242         * exceptions.cs: Add test for constant folding && division by zero.
3243
3244         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
3245         since driver.c is in libmono too, so the optimization was useless.
3246
3247         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
3248         variable to driver.c so the compiler can emit more efficient code to
3249         access them.
3250
3251 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3252
3253         * Makefile.am: don't distribute generated inssel.[ch] files.
3254
3255 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
3256
3257         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
3258         into the default appdomain. Fixes #58707.
3259
3260         * jit-icalls.c: Remove the broken approximation for truncl, doing
3261         no conversion is better.
3262
3263         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
3264         Fixes #58863.
3265
3266 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
3267
3268         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
3269         of the mcrxr instruction which is not available on some processors
3270         even if it's documented to be. Implement add and sub overflow correctly
3271         (still not complete for long unsigned). Speed up icalls a bit.
3272
3273 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
3274
3275         * mini.c (mono_jit_compile_method_with_opt): Make sure that
3276         we run .cctor in the current domain instead of target_domain.
3277         
3278         Fixes bug #58558, .cctor not being called in -O=shared.
3279
3280 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
3281
3282         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
3283
3284 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
3285
3286         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
3287         which can be done with an imm8, do it that way.
3288         (mono_arch_output_basic_block): ditto for a jmp
3289         (mono_arch_emit_prolog): Computate maximum offset of a label.
3290
3291 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
3292
3293         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
3294         now tries to allocate prefered physical reg's for virtual
3295         regs. This reduces the number of emited spills/loads with
3296         20-30% on our core assemblies.
3297
3298 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
3299
3300         * jit-icalls.c: truncl() is not needed and trunc() is
3301         the correct thing to do anyway (bug #58287).
3302
3303 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
3304
3305         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
3306         if available.
3307
3308 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
3309
3310         * driver.c: enable loop optimizations by default.
3311
3312 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
3313
3314         * mini-x86.c: fix calc of max loop size when aligning loops start.
3315
3316 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
3317
3318         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
3319         the stack.
3320
3321 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
3322
3323         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
3324         should set carry.
3325
3326         * basic-long.cs: Add tests for add/subtract of immediates with carry.
3327
3328         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
3329         
3330         * mini.c (inline_method): Allways inline some wrappers even if the cost
3331         is too large. Fixes #58785.
3332
3333         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
3334         
3335 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
3336
3337         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
3338         (crichton@gimp.org). Beginning of support for sparc/linux.
3339
3340         * mini-sparc.c: Optimize retrieval of LMF address.
3341
3342 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
3343
3344         * exceptions-ppc.c:  handle alloca in methods with clauses.
3345
3346 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
3347
3348         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
3349
3350 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
3351
3352         * mini.c: Delegate most of the abort signal work to 
3353           mono_thread_request_interruption, which also handles Stop and Suspend
3354           states.
3355
3356 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
3357
3358         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
3359         supports the save/restore lmf opcodes.
3360
3361 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
3362
3363         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
3364         by gcc-3.4 as well.
3365
3366         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
3367
3368 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
3369
3370         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
3371         methods which contain array accesses.
3372
3373         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
3374         boundaries. Fixes #58537.
3375
3376         * iltests.il: Add regression test for #58537.
3377
3378 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
3379
3380         * mini-x86.c (mono_arch_local_regalloc): Last part of
3381         fix for bug #58633 (releasing register to early).
3382
3383 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
3384
3385         * basic-long.cs: Add new regression test.
3386
3387 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
3388
3389         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
3390         register too early on the chain.
3391
3392 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
3393
3394         * mini.c (create_helper_signature): Use a helper function to reduce
3395         the code which needs to be written. Also set the calling convention of
3396         icalls on windows. Fixes #57840.
3397
3398 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
3399
3400         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
3401         exceptions-ppc.c: added helper function to get the instruction address
3402         from a signal handler context.
3403
3404 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
3405
3406         * helpers.c: use g_get_tmp_dir. Invokes happyness 
3407         from gonzalo.
3408
3409 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
3410
3411         * helpers.c: Add new env variable to pass args to objdump.
3412         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
3413
3414 2004-05-17  Radek Doulik  <rodo@ximian.com>
3415
3416         * Makefile.am (common_sources): added abcremoval.h so it get
3417         disted and daily mono packages on go-mono.com will build again
3418
3419 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
3420
3421         * abcremoval.c: Fixed coding style, added copyright header.
3422
3423         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
3424
3425         * mini.h: Added prototype for abc removal main function.
3426
3427         * build_relations_propagation_table.pl: Added copyright header.
3428
3429 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
3430
3431         * basic-long.cs: reg test for complex ceq_long bug.
3432
3433 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
3434
3435         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
3436         reg in long and clob case (bug #58343). Fixed/added comments.
3437
3438 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
3439
3440         * mini.c (mono_jit_runtime_invoke): Follow new convention
3441         of calling the invoke method with an function pointer.
3442
3443 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
3444
3445         * ChangeLog: Fix author of memory leak patch.
3446
3447 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
3448
3449         * Makefile.am: fix make dist as well...
3450
3451
3452 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
3453
3454         * cfold.c: Made so that conversions from pointer to int4 are no-ops
3455         on archs where pointers are 4 bytes long.
3456
3457         * Makefile.am: Added abcremoval.c source file.
3458
3459         * abcremoval.c: Added abcremoval.c.
3460
3461         * abcremoval.h: Added abcremoval.h.
3462
3463         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
3464
3465         * inssel.brg: Enabled bounds check removal.
3466
3467         * mini.c: Added support for abcrem optimization.
3468
3469         * mini.h: Added abcrem optimization label.
3470
3471         * driver.c: Added support for abcrem optimization.
3472
3473         * propagated_relations_table.def: Added propagated_relations_table.def.
3474
3475 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
3476
3477         * mini.c, cfold.c: fix style.
3478
3479 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
3480
3481         * mini.c: handle issue with the low-level implementation of
3482         some long opcodes (bug #54209).
3483
3484 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
3485
3486         * basic.cs: test for my new cmov stuff.
3487
3488 2004-05-13      Patrik Torstensson
3489
3490         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
3491         opt and added peephole documentation.
3492
3493 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
3494
3495         * tramp-ppc.c: rewrote the generic trampoline code.
3496
3497 2004-05-11      Patrik Torstensson
3498
3499         * mini-x86.c: optimize long shl/shr asm code (one less branch)
3500
3501 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
3502
3503         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
3504
3505         * mini.h mini.c dominators.c: Applied patch from Derek Woo
3506         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
3507
3508         * mini.c: Add new icalls for AsAny marshalling.
3509
3510 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
3511
3512         * tramp-ppc.c, mini-ppc.c: more cleanups.
3513
3514 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3515
3516         * mini.c: no warnings.
3517
3518 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
3519
3520         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
3521
3522 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
3523
3524         * mini.c: In the thread abort signal handler, if the thread is in the
3525         process of being stoped, don't throw the Abort exception, just stop the
3526         thread.
3527
3528 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
3529
3530         * tramp-ppc.c: removed old code.
3531
3532 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
3533
3534         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
3535         do some simple speed optimizations on ppc.
3536
3537 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
3538
3539         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
3540         and large offsets in load/store.
3541
3542 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
3543
3544         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
3545         it causes regressions.
3546
3547 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
3548
3549         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
3550         support.
3551
3552 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
3553
3554         * jit-icalls.c: remove warnings.
3555         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
3556         speedups for unsafe code.
3557
3558 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
3559
3560         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
3561
3562 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
3563
3564         * basic-calls.cs: Add new regression test.
3565
3566         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
3567         more portable.
3568
3569         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
3570
3571         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
3572         is no longer used.
3573
3574 2004-05-06      Patrik Torstensson
3575
3576         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
3577         long reg allocation in any reg (not only eax:edx) and implemented 
3578         long shl/shr ops in asm instead of helpers.
3579
3580 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
3581
3582         * mini-sparc.h: Fix warnings.
3583
3584         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
3585         stack.
3586
3587         * mini-exceptions.c (mono_handle_exception): Call the filter in a
3588         separate statement for clarity.
3589
3590         * mini-sparc.c: Update status.
3591
3592 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
3593
3594         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
3595         here.
3596
3597 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
3598
3599         * inssel-ppc.brg: another small pre-release workaround:
3600         we don't do overflow detection for long_sub_un.
3601
3602 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
3603
3604         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
3605         (also works around a weird ppc bug: 57957).
3606
3607 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
3608
3609         * tramp-ppc.c: trampoline fixes.
3610
3611 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
3612
3613         * mini-ppc.c: fixed typos.
3614
3615 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
3616
3617         * mini-ppc.c, exceptions-ppc.c: more code saves registers
3618         at the top of the stack. Fixed typos. Use a frame registers
3619         for all the methods with exception clauses.
3620
3621 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
3622
3623         * exceptions-ppc.c: restore fp registers.
3624
3625 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
3626
3627         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
3628         order from the stack top (moved the stack room to save the
3629         return value for trace after the param area). Fixed corruption
3630         in restoring registers on unwind.
3631
3632 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
3633
3634         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
3635
3636 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
3637
3638         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
3639         and prolog/epilog for methods that use it. Allow
3640         enough param area room for varargs methods. Fix miguel's
3641         breakage in exception handling.
3642
3643 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
3644
3645         * Makefile.am: run genmdesc only on current arch.
3646
3647 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3648
3649         * exceptions-x86.c:
3650         * mini-x86.h: fix the build on windows.
3651
3652 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
3653
3654         * 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.
3655
3656         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
3657
3658         * mini-exceptions.c: New file.
3659         
3660         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
3661         Move some parts of the x86 exception handling code to an 
3662         arch-independent file so it can be shared with other ports.
3663
3664 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
3665
3666         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
3667
3668 2004-04-26  David Waite  <mass@akuma.org>
3669
3670         * driver.c: remove comma from end of enumeration declaration
3671
3672 2004-04-26  Jackson Harper  <jackson@ximian.com>
3673
3674         * driver.c: parse config file before loading first assembly. This
3675         allows the user gac to be enabled/disabled. 
3676         
3677 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
3678
3679         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
3680         simpler mechanism: we do not care what is encoded initially
3681         (branch absolute or relative), we care about the code and its
3682         target.  I kept the old code for reference for now.
3683
3684         The new code tries first to determine if the jump is anywhere in
3685         the -/+32 absolute meg range, if it succeeds, it encodes using the
3686         absolute branch;  If not, it tried to find something in the
3687         relative range, if not, it uses the handle_thunk code. 
3688
3689 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
3690
3691         * exceptions-ppc.c: use the correct ip register on macosx.
3692
3693 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
3694
3695         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
3696
3697 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
3698
3699         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
3700         Raise exception on integer divide by zero by hand since the hw
3701         doesn't support it. Handle NaNs in FP compares.
3702
3703 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
3704
3705         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
3706         code reducing duplication between the platforms and enabled
3707         signal exception handling (on linux for now).
3708
3709 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
3710
3711         * exceptions-ppc.c: more macosx support.
3712
3713 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
3714
3715         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
3716
3717 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
3718
3719         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
3720
3721 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
3722
3723         * iltests.il: more tests.
3724
3725 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
3726
3727         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
3728         vars as well.
3729
3730 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
3731
3732         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
3733
3734 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
3735
3736         * liveness.c: Mark variables as volatile in all basic blocks reachable
3737         from exception clauses.
3738
3739 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
3740
3741         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
3742         inlining.
3743
3744 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
3745
3746         * iltests.il, basic.cs: more tests for regalloc.
3747
3748 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
3749
3750         * iltests.il: Some tests for register allocation modifications
3751         I have locally.
3752
3753 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
3754
3755         * exceptions.cs: Add regression test for bug #56782.
3756
3757         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
3758         original stack trace if an exception is rethrown. Fixes #56782. Oh,
3759         the beauty of fixing the same thing in 5 different files...
3760
3761 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
3762
3763         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
3764         methods.
3765
3766 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
3767
3768         * mini.c: Add support for STRWLPARRAY marshalling convention.
3769
3770 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
3771
3772         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
3773         to init the context to setup the regs pointer).
3774
3775 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
3776
3777         * exceptions-ppc.c: more exceptions work.
3778
3779 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
3780
3781         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
3782         not allowed.
3783
3784 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
3785
3786         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
3787         can use the memory directly.
3788
3789         * cpu-pentium.md: Update documentation from a post from Zoltan. 
3790
3791         add x86_add_membase, x86_sub_membase, x86_mul_membase
3792
3793 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
3794
3795         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
3796         GENERAL_REGS they were also hardcoded for all PPC ports.
3797
3798         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
3799
3800         Remove hard-coded limit for floating point registers, use
3801         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
3802
3803         Notice that in MacOS X calling conventions you can fit a lot more
3804         floating point values in registers, so I should update the PInvoke
3805         test to excercise the passing of floating point values on the
3806         stack (currently broken).
3807         
3808 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
3809
3810         * tramp-ppc.c (create_trampoline_code): Added
3811         JUMP_TRAMPOLINE_SIZE. 
3812         (ppc_magic_trampoline): Follow the pattern from
3813         x86_magic_trampoline: if code is set to zero, return. 
3814         (create_trampoline_code): Always pass MonoMethod to the jump
3815         trampoline, before it was passing a null.
3816         (mono_arch_create_jump_trampoline): Implement the jump stub, could
3817         share the code with mono_arch_create_jit_trampoline. 
3818
3819         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
3820         implemented.
3821         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
3822         implemented.  
3823
3824         * cpu-g4.md: Added length for jmp instruction, the worst case
3825         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
3826         for save_lmf).
3827
3828 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
3829
3830         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
3831
3832 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
3833
3834         * mini.c: Only set bblock->real_offset when adding a new bblock, and
3835         before each IL instruction.
3836
3837         * mini.c (CEE_BOX): Fix warnings.
3838
3839 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3840
3841         * mini.c: removed a few unused vars and extra whitespace.
3842
3843 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
3844
3845         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
3846         checks.
3847         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
3848         index.
3849         (OP_GETCHR): use the above
3850         (CEE_LDELEMA): use the above.
3851
3852         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
3853         version of the generic impl.
3854         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
3855         (CEE_LDELEMA): use the above.
3856
3857 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
3858
3859         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
3860         Fixes #56317.
3861
3862         * iltests.il: Added new regression test for #56317.
3863
3864 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
3865
3866         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
3867         under NetBSD. Fixes #56450.
3868
3869         * liveness.c (update_gen_kill_set): Fix previous patch.
3870
3871 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3872
3873         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
3874
3875 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
3876
3877         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
3878         ldsfld and ldsflda.
3879
3880         * inssel-sparc.brg: Add more optimizations.
3881
3882         * mini-sparc.c: Replace multiply/divide with shifts if possible.
3883
3884 2004-04-01  Martin Baulig  <martin@ximian.com>
3885
3886         * mini.c (handle_box): New static function; moved the
3887         implementation of CEE_BOX here.
3888         (mono_method_to_ir): Added `constrained_call' variable.
3889         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
3890         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
3891         mono_method_get_constrained() to get the method.
3892
3893 2004-04-01  Martin Baulig  <martin@ximian.com>
3894
3895         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
3896         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
3897         (mono_method_to_ir): We don't need these macros anymore since
3898         mono_class_get_full() already takes care of it. 
3899
3900 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3901
3902         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
3903         use @function (as doesn't accept #function here) and check the return
3904         value of system and stop if fails.
3905
3906 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3907
3908         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
3909
3910 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
3911
3912         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
3913
3914         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
3915
3916         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
3917         #56223.
3918
3919         * basic-long.cs: Add test for negation of Int64.MinValue.
3920
3921 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
3922
3923         * mini-sparc.c: Update status.
3924
3925         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
3926
3927         * exceptions-sparc.c: Fix return value in filters.
3928
3929         * inssel-sparc.brg: Fix register allocation in some rules.
3930
3931 2004-03-28  Martin Baulig  <martin@ximian.com>
3932
3933         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
3934         if neccessary.  
3935
3936 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
3937
3938         * mini-x86.c (mono_arch_patch_code): Fix warnings.
3939         
3940         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
3941         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
3942         remove unused conv_u4 opcode.
3943
3944         * mini-x86.c: Remove valgrind workaround since it slows down things
3945         even when mono is not run under valgrind.
3946
3947 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
3948
3949         * mini-sparc.c: Update status.
3950
3951         * inssel-sparc.brg: Add some optimizations.
3952
3953         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
3954         future delay slot filling. Add support for varargs, tail calls and JMP.
3955
3956         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
3957         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
3958
3959         * inssel.brg: Fix register allocation in OP_ARGLIST.
3960
3961         * inssel.brg: Fix warnings.
3962
3963 2004-03-25  Martin Baulig  <martin@ximian.com>
3964
3965         * mini.c (inflate_generic_field): Removed.
3966         (mini_get_method): Removed, use mono_get_method_full(),
3967         (mini_get_class): Removed, use mono_class_get_full().
3968         (mono_method_to_ir): Pass our generic context to
3969         mono_field_from_token().        
3970
3971 2004-03-25  Martin Baulig  <martin@ximian.com>
3972
3973         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
3974         of a `MonoMethod *'.
3975         (mini_get_method): Take a `MonoGenericContext *' instead
3976         of a `MonoMethod *'.
3977         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
3978         a new local variable called `generic_context' which holds the
3979         current `MonoGenericContext *'; use it to lookup things.
3980
3981 2004-03-24  Martin Baulig  <martin@ximian.com>
3982
3983         * mini.c (mini_get_class): New static method; if we're inside a
3984         generic instance, inflate the class if neccessary.
3985         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
3986
3987 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
3988
3989         * iltests.il: New regression test for #55976.
3990
3991         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
3992         #55976.
3993
3994 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
3995
3996         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
3997         output.
3998
3999 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
4000
4001         * liveness.c: Consider SSA stores as well as loads when making vars
4002         volatile.
4003
4004         * exceptions.cs: New regression tests for register allocation.
4005         
4006 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
4007
4008         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
4009         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
4010           domain lock only to protect puntual access to data structures.
4011           Added access lock for sighash, jit_icall_hash_name, 
4012           jit_icall_hash_addr and domain->code_mp.
4013
4014 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
4015
4016         * driver.c: Print SIGSEGV handling method.
4017
4018         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
4019
4020         * mini.c (setup_jit_tls_data): Handle case when this is called
4021         multiple times for a thread.
4022
4023         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
4024         is different from fbxx_un. Fixes #54303. Also use constants instead of
4025         magic numbers in a lot of places.
4026
4027 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
4028
4029         * exceptions.cs: Fix cctor test when --regression is used.
4030
4031 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
4032
4033         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
4034         for Linux/ppc.
4035
4036 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
4037
4038         * inssel-ppc.brg: fixed register assignments for some rules.
4039
4040 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
4041
4042         * exceptions.cs: Add test for exceptions in static constructors.
4043
4044         * mini.c (mono_jit_compile_method_with_out): Move the calling of
4045         static constructors outside the domain lock. Fixes #55720.
4046
4047 2004-03-17  Martin Baulig  <martin@ximian.com>
4048
4049         * mini.c (get_generic_field_inst): Removed, this'll never happen.
4050         (inflate_generic_field): Take the `MonoMethod *' instead of the
4051         `MonoClass *' and added support for generic method.
4052         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
4053         have a `field->parent->gen_params', only inflate the field if it's
4054         an open constructed type.
4055
4056 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
4057
4058         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
4059         exception object instead of the preconstructed ones.
4060
4061 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4062
4063         * mini.c: reverted changed to sigsegv_signal_handler commited
4064         accidentally in the previous patch.
4065
4066 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4067
4068         * mini.c:
4069         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
4070         running --aot with an old assembly.
4071
4072 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
4073
4074         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
4075         point values.
4076
4077         * mini-sparc.c: Add support for v9 branches with prediction.
4078
4079 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
4080
4081         * mini.c (mini_init): #warning is GNUC only
4082
4083         * mini-sparc.h: implement __builtin_frame_address
4084         and __builtin_return_address for Sun C compiler
4085
4086 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
4087
4088         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
4089
4090 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
4091
4092         * basic-calls.cs: Add test for unaligned byref long argument passing.
4093
4094         * mini-ops.h: Add sparcv9 compare and branch instructions.
4095
4096         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
4097         v9 instructions if we have a v9 cpu.
4098
4099         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
4100         registers for global allocation.
4101
4102         * exceptions-sparc.c: Fixes.
4103         
4104 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
4105
4106         * liveness.c (mono_analyze_liveness): Optimized version.
4107
4108         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
4109
4110         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
4111         sparc work.
4112
4113         * basic-float.cs basic-calls.cs: New regression tests.
4114
4115 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
4116
4117         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
4118         sigaltstack implementation.
4119
4120         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
4121         
4122         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
4123         stuff if SIGSEGV_ON_ALTSTACK is not defined.
4124
4125 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
4126
4127         * mini.c: Fix warnings.
4128         
4129         * mini.c (mono_resolve_patch_target): New function which contains the
4130         arch independent part of the patching process.
4131
4132         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
4133         patching code to a separate function.
4134
4135 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
4136
4137         * mini.c (add_signal_handler): ifdef out on Windows
4138
4139 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
4140
4141         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
4142         cpu-sparc.md: Add exception handling support + other fixes.
4143
4144         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
4145         typed GC detection in --version.
4146
4147         * basic.cs exceptions.cs: New regression tests.
4148
4149         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
4150         the arch specific code can store data during a compilation.
4151
4152         * mini-ops.h: Add OP_SETFRET.
4153
4154         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
4155         function, register a separate icall for each arity, so the icalls can
4156         get a wrapper.
4157         
4158         * mini.c (mono_print_tree): Print negative offsets in a more readable
4159         form.
4160         
4161         * mini.c: Make signal handling work on sparc.
4162         
4163         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
4164
4165         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
4166
4167         * jit-icalls.c: Emulate truncl by aintl on solaris.
4168
4169         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
4170
4171 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
4172
4173         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
4174
4175 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
4176
4177         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
4178         a MarshalByRef type, inline a method that performs the check, taking into
4179         account that the object can be a proxy. Also implemented tow new opcodes:
4180         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
4181         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
4182         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
4183
4184 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
4185
4186         * mini-ppc.c: if a relative branch displacement is too big
4187         but it points to and area reachable with an absolute branch, 
4188         avoid the thunks.
4189
4190 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
4191
4192         * mini.c: optimize small copies in cpblk.
4193
4194 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
4195
4196         * basic-calls.cs basic-float.cs: New regression tests.
4197
4198         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
4199         negative offsets from %fp. Implement localloc. Fix local register 
4200         allocation. Fix the case when the this argument needs to be saved to
4201         the stack. Implement some missing opcodes.
4202
4203 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
4204
4205         * mini.c (mini_method_compile): Reenable global regalloc in methods
4206         with exception handlers.
4207
4208         * linear-scan.c (mono_varlist_sort): Fix warning.
4209
4210         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
4211
4212         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
4213         regalloc costs.
4214
4215         * liveness.c: Make all variables uses in exception clauses volatile, to
4216         prevent them from being allocated to registers. Fixes #42136.
4217
4218 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
4219
4220         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
4221         causes regressions.
4222
4223         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
4224         argument to mono_arch_regalloc_cost.
4225
4226         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
4227         precisely.
4228
4229 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
4230
4231         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
4232         Make the cost of allocating a variable to a register arch dependent.
4233
4234         * basic-calls.cs: Fix compilation of tests.
4235         
4236         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
4237         helper function to cut back on the number of #ifdefs needed.
4238
4239         * mini-ppc.c: Fix compilation.
4240
4241         * basic-calls.cs: New regression tests.
4242
4243         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
4244
4245         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
4246         of l0 since that is callee saved.
4247
4248         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
4249         to virtual calls.
4250
4251         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
4252         of delay instruction.
4253
4254         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
4255
4256         * mini.h (MonoCallInst): Add 'virtual' flag.
4257
4258         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
4259
4260 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
4261
4262         * *.cs: New regression tests.
4263
4264         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
4265         work.
4266
4267         * mini.c (mono_runtime_install_handlers): Fix build.
4268
4269         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
4270         'signal_stack_size' members.
4271
4272         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
4273         alternate signal stack.
4274
4275         * exceptions-x86.c: Add stack overflow handling.
4276
4277         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
4278         functions to arch independent code.
4279
4280         * mini.c (mono_print_tree): Print more detailed info for load_membase
4281         opcodes.
4282         
4283 2004-02-23  Martin Baulig  <martin@ximian.com>
4284
4285         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
4286
4287 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
4288
4289         * mini-x86.c: fixed reg allocation for div/rem.
4290
4291 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
4292
4293         * driver.c (mono_main): Report some configuratio options on --version.
4294
4295 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
4296
4297         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
4298         low in the address space. Correctly flush memory in thunks where we
4299         output native code.
4300
4301 2004-02-20  Martin Baulig  <martin@ximian.com>
4302
4303         * mini.c (mini_get_method): New static method; inflate all generic
4304         methods and methods in open generic instances.
4305         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
4306         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
4307
4308 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
4309
4310         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
4311
4312         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
4313
4314 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
4315
4316         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
4317
4318         * mini-sparc.c (flushi mono_arch_output_basic_block): make
4319         it compile using Sun's compiler.
4320
4321 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
4322
4323         * 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.
4324
4325         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
4326
4327 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
4328
4329         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
4330         code.
4331         * mini-ppc.c: handle calls outside of the allowed range with thunks
4332         allocated using the code manager.
4333         * tramp-ppc.c: use the code manager to hold generated native code.
4334         Fixed the magic trampoline to just patch vtable entries.
4335
4336 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
4337
4338         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
4339         independent file.
4340
4341 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
4342
4343         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
4344         PPC.
4345
4346         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
4347         if we have a working __thread implementation.
4348
4349         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
4350         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
4351
4352 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
4353
4354         * mini-x86.c: Fix compilation under gcc 2.
4355         
4356 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
4357
4358         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
4359         contains a call to the wrapped function.
4360
4361         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
4362         OP_<CALL>_IMM opcodes, and use them under X86.
4363         
4364         * mini.c (mono_jit_find_compiled_method): Fix warning.
4365
4366         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
4367
4368         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
4369
4370         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
4371         functionality to mini.c.
4372
4373         * mini.c (mono_create_jump_trampoline): New function to create a jump
4374         trampoline. Return a compiled method instead of a trampoline if it
4375         exists. Add a cache for jump trampolines.
4376
4377         * mini.c (mono_jit_find_compiled_method): New function to return a
4378         compiled method if it exists.
4379
4380         * mini-x86.c: Call mono_create_jump_trampoline instead of 
4381         mono_arch_create_jit_trampoline.
4382
4383         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
4384         a jump trampoline. Fixes #52092.
4385         
4386 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
4387
4388         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
4389         which is not up-to-date. Add check_corlib_version () instead.
4390
4391         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
4392         have to call it.
4393         
4394         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
4395         since newer valgrind versions do not need it.
4396
4397         * mini.c (mono_jit_compile_method_with_opt): New helper function to
4398         compile a method with a given set of optimizations.
4399
4400         * mini.c: Compile icall wrappers on-demand instead of at startup.
4401
4402         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
4403         wrapper for an icall.
4404
4405 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
4406
4407         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
4408         #54063.
4409
4410         * iltests.il: Add test for non-empty stack before switch instruction.
4411
4412 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
4413
4414         * mini.c: Add support for new stringbuilder marshalling conventions.
4415
4416         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
4417
4418 2004-02-01  Martin Baulig  <martin@ximian.com>
4419
4420         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
4421         in `ginst->mtype_argv'.
4422
4423 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
4424
4425         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
4426         facilitate grepping.
4427
4428 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
4429
4430         * mini.c: fixed buglet in initobj generic implementation for references.
4431
4432 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
4433
4434         * Makefile.am: make the version script conditional.
4435         * jit-icalls.c: handle missing truncl().
4436
4437 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
4438
4439         * exceptions.cs: Add more tests for double->int conversion.
4440
4441         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
4442         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
4443
4444 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
4445
4446         * driver.c: make --verbose --version emit an error
4447         if the loaded corlib doesn't match the runtime version.
4448
4449 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
4450
4451         * mini-ppc.h: export ppc_patch().
4452         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
4453         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
4454         on par or better than on MacOSX.
4455
4456 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
4457
4458         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
4459         mono_lookup_pinvoke_call.
4460
4461         * mini-x86.c: Under windows, the default pinvoke calling convention is
4462         stdcall. Fixes #52834.
4463
4464         * mini.c (optimize_branches): Add an upper bound to the number of
4465         iterations to prevent infinite loops on strange loops. Fixes #53003.
4466
4467 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
4468
4469         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
4470         and ISINST. Fixes #52093.
4471
4472         * objects.cs (test_0_vector_array_cast): New tests.
4473         
4474 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
4475
4476         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
4477         checking in Array.Set ().
4478
4479         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
4480         #52590.
4481
4482         * object.cs (test_0_multi_array_cast): New regression test.
4483
4484 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
4485
4486         * exceptions-ppc.c: fix build on Linux/PPC.
4487
4488 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
4489
4490         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
4491         running under valgrind.
4492         (x86_magic_trampoline): Fix build bustage.
4493
4494         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
4495         negative values as well. This is needed for the encoding of the line number
4496         info, since sometimes the line numbers are not in increasing order.
4497
4498 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
4499
4500         * cpu-pentium.md (localloc): Increase the size of the localloc 
4501         instruction since it is a loop under Win32.
4502
4503         * debug-mini.c (record_line_number): Get rid of unneccesary memory
4504         allocation.
4505
4506 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
4507
4508         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
4509         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
4510         Max Horn (max@quendi.de). Fix file names in comments.
4511
4512 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
4513
4514         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
4515         avoid stack overflow.
4516         (replace_usage): Avoid uninitialized variable warnings.
4517
4518         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
4519         and taking the address of valuetype variables.
4520
4521 2004-01-03  Patrik Torstensson
4522
4523         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
4524         for other purposes than FP later on.
4525
4526 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
4527
4528         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
4529         of tail calls.
4530
4531 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
4532
4533         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
4534
4535 2003-12-30  Patrik Torstensson <p@rxc.se>
4536
4537         * mini-x86.h: Decreased number of availiable fp regs.
4538         Solves corner cases with FP spilling.
4539
4540 2003-12-23  Patrik Torstensson <p@rxc.se>
4541
4542         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
4543         for floating point stack tracking / spilling on x86. 
4544         Fixes bug #49012.
4545         
4546         * basic-float.cs: added float mul overflow test.
4547
4548 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
4549
4550         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
4551
4552 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
4553
4554         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
4555         supports for cond branches that overflow the immediate
4556         overflow offset. mcs can compile simple programs.
4557
4558 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
4559
4560         * exceptions-ppc.c: exception handling support wip:
4561         finally handlers get run on exception.
4562
4563 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
4564
4565         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
4566         profiling.
4567
4568 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
4569
4570         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
4571         initial support for stack walking and unwinding.
4572
4573 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
4574
4575         * driver.c (mono_main): Make corlib-out-of-sync message more 
4576         descriptive. Also remove verify_corlib call.
4577
4578 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
4579
4580         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
4581         not overlap with other call's arguments, too.
4582
4583 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
4584
4585         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
4586         move to arch-specific code the choice of arch-specific
4587         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
4588         * mini.c: ensure emulation calls will not interleave
4589         with other calls.
4590
4591 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
4592
4593         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
4594         the magic trampoline stack frame is dropped before executing
4595         the new method.
4596
4597 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
4598
4599         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
4600         and integer to fp conversions. Added support for overflowing
4601         arguments on the stack. Reserve a couple more registers as temps.
4602         Added support for aot compilation (as output still needs to be
4603         tweaked, though).
4604
4605 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
4606
4607         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
4608         Don't overwrite return register in some corner cases.
4609
4610 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
4611
4612         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
4613         static constructors when AOT compiling.
4614
4615         * driver.c (mono_main): Call mono_check_corlib_version.
4616
4617 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
4618
4619         * cpu-g4.md, basic.cs: fixed div target register.
4620
4621 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
4622
4623         * mini-ppc.c, basic.cs: shl_imm fix with test.
4624
4625 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
4626
4627         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
4628         structures by value. Misc fixes.
4629         * objects.cs: more tests.
4630
4631 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
4632
4633         * mini-ppc.c: lconv.ovf.i implemented.
4634
4635 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4636
4637         * mini.c:
4638         (mini_init): don't error out if someone already called g_thread_init.
4639
4640 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
4641
4642         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
4643         to be any type per the spec. Fix abnormal memory usage when
4644         the same object is repeatedly thrown.
4645
4646 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
4647
4648         * mini.c: check for overruns in IL code.
4649
4650 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
4651
4652         * TODO: Add/remove some todo entries.
4653
4654 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
4655
4656         * driver.c (mono_main): Call mono_verify_corlib.
4657
4658 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
4659
4660         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
4661         This has been moved to mini.c
4662         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
4663         type being casted is marshalbyref it could be a proxy, so instead of
4664         emitting the type check code, emit a call to a runtime method that will
4665         perform the check by calling CanCastTo if needed.
4666
4667 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
4668
4669         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
4670         methods with large stack frames under Win32.
4671
4672 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
4673
4674         * Makefile.am: Distribute regression tests.
4675
4676         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
4677         at the end instead of inserting each variable into the sorted list.
4678
4679         * linear-scan.c (mono_varlist_sort): New helper function.
4680         
4681 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
4682
4683         * mini.c: ensure arguments and locals are within bounds.
4684
4685 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
4686
4687         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
4688         related fixes.
4689
4690 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
4691
4692         * mini.c (mono_cprop_copy_values): Fix crash.
4693
4694         * aot.c: Set verbosity back to 0.
4695         
4696 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
4697
4698         * regalloc.c: complete memory leak fix by Laurent Morichetti
4699         (l_m@pacbell.net).
4700
4701 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
4702
4703         * driver.c (main_thread_handler): Revert the previous patch.
4704
4705         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
4706         under valgrind.
4707
4708         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
4709         memory from the memory pool.
4710
4711         * driver.c (main_thread_handler): Turn on all optimizations when
4712         --aot is used.
4713
4714         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
4715         an array for better performance.
4716
4717         * regalloc.c (mono_regstate_assign): Fix memory leak.
4718
4719         * debug-mini.c (mono_debug_serialize_debug_info): New function to
4720         serialize the debug info.
4721
4722         * debug-mini.c (mono_debug_add_aot_method): New function to load the
4723         debug info from the serialized representation.
4724
4725         * aot.c: Save debug info into the generated file and load it when 
4726         loading a method.
4727
4728         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
4729
4730 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
4731
4732         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
4733         More FP-related fixes.
4734
4735 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
4736
4737         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
4738         and register allocation buglet. Hello world now runs.
4739
4740 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
4741
4742         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
4743         * tramp-ppc.c: fixed class init trampoline.
4744         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
4745
4746 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
4747
4748         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
4749         mini.c: more ppc changes/fixes.
4750
4751 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
4752
4753         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
4754         Also optimize the case when the arguments are the same in the caller 
4755         and in the callee.
4756
4757         * iltests.il: Add tests for tail calls with valuetype arguments.
4758
4759 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
4760
4761         * mini-ppc.c: fixes for struct return type.
4762
4763 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
4764
4765         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
4766         mono_spillvar_offset() to arch-specific code.
4767
4768 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
4769
4770         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
4771
4772 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
4773
4774         * exceptions-x86.c: Fix stack space leaks.
4775         
4776         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
4777         registers from the lmf if the method has save_lmf set.
4778
4779 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
4780
4781         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
4782         of icall wrappers into InvokeInDomain, since these are now per-domain.
4783
4784 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
4785
4786         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
4787         make some opcode emulation and intrinsic ops enabled/disabled 
4788         according to the architecture. More fixes.
4789
4790 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
4791
4792         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
4793
4794 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
4795
4796         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
4797         arch-specific handling for 'this' and struct return type to
4798         arch-specific code.
4799
4800 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4801
4802         * aot.c: prevent divide by zero error when reporting (it happened with
4803         Accessibility.dll).
4804
4805 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
4806
4807         * mini.h (inst_switch): Remove unused macro.
4808
4809 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4810
4811         * aot.c:
4812         (load_aot_module): free 'info->methods' and 'info' properly. No more
4813         "free(): invalid pointer blah" messages when you have an old aot
4814         compiled assembly.
4815
4816 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
4817
4818         * jit-icalls.c, mini.c: Added support for context static fields.
4819
4820 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
4821
4822         * mini.c (mono_method_blittable): Methods which set LastError are not 
4823         blittable either. Fixes #51108.
4824         
4825 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
4826
4827         * mini.c: flush icache.
4828         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
4829
4830 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
4831
4832         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
4833
4834 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
4835
4836         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
4837         safe on IA32.
4838
4839         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
4840         vararg calls.
4841
4842         * inssel.brg (CEE_MKREFANY): Fix AOT case.
4843
4844 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
4845
4846         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
4847         instruction when the result is discarded.
4848
4849         * iltests.il (test_0_div_regalloc): New regression test.
4850
4851         * arrays.cs: Fix compilation error.
4852
4853 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
4854
4855         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
4856         float rules to inssel-x86.brg: sane architectures with FP registers
4857         don't need to implement these rules.
4858
4859 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
4860
4861         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
4862
4863 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
4864
4865         * mini.h, inssel-long32.brg: fixed endianess issues in int64
4866         implementation of 32 bit systems.
4867
4868 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
4869
4870         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
4871         (Jeroen Zwartepoorte).
4872
4873 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
4874
4875         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
4876         the caller and the callee matches.
4877         
4878         * mini.c (mono_method_to_ir): Add comment.
4879
4880         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
4881         signbit is missing on some platforms.
4882
4883 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
4884
4885         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
4886
4887         * mini.c (setup_jit_tls_data): Call the new function.
4888         
4889         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
4890
4891         * mini-x86.c: Add experimental support for fast access to the lmf
4892         structure under NPTL/Linux 2.6.x.
4893
4894 2003-11-06  Martin Baulig  <martin@ximian.com>
4895
4896         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
4897         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
4898         the debugger.
4899
4900 2003-11-02  Martin Baulig  <martin@ximian.com>
4901
4902         * mini.c (inflate_generic_field): New static method.
4903         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
4904         generic instance and the field is declared in a generic type, call
4905         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
4906
4907 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
4908
4909         * mini.h mini.c (mono_method_same_domain): New function to return
4910         whenever the caller and the callee are in the same domain.
4911
4912         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
4913
4914 2003-10-30  Martin Baulig  <martin@ximian.com>
4915
4916         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
4917         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
4918         method parameters.
4919         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
4920         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
4921
4922 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
4923
4924         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
4925         propagation.
4926
4927         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
4928         object here, so it is in the correct appdomain etc.
4929
4930 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
4931
4932         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
4933         already done.
4934         (mono_method_to_ir): Avoid freeing the type created returned from
4935         mono_type_create_from_typespec, since it is put into an internal cache
4936         by the function. Fixes pointer.exe.
4937
4938         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
4939         trampolines for icalls and pinvokes as well. Fixes #33569.
4940
4941 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
4942
4943         * mini.c: Update after appdomain changes.
4944
4945         * mini.c (mono_jit_compile_method_inner): Allways compile native
4946         method wrappers in the root domain, since there can only be one
4947         instance of them, whose address is stored in method->info.
4948
4949 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
4950
4951         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
4952         environment variable. Instead detect automatically whenever running
4953         under valgrind using the magic macro RUNNING_ON_VALGRIND from
4954         valgrind.h.
4955
4956 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
4957
4958         * trace.c, trace.h: New files that implement the new trace option
4959         parsing. 
4960
4961         * driver.c: Document new --trace options.
4962
4963         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
4964         mini-x86.c: Apply:
4965
4966         -       if (mono_jit_trace_calls)
4967         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
4968
4969         * mini.h: prototypes.
4970         
4971 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
4972
4973         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
4974
4975         * mini.c inssel.brg: Implement typedefbyref opcodes.
4976
4977         * mini.c (mono_jit_compile_method): Remove unused local variable.
4978
4979         * mini.c (mono_jit_compile_method_inner): Ditto.
4980         
4981 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
4982
4983         * tramp-x86.c (x86_class_init_trampoline): Fix build.
4984         
4985         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
4986
4987 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
4988
4989         * mini.c (mono_no_aot): Remove unused global variable.
4990
4991         * mini.c: Thread safety fixes.
4992
4993 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
4994
4995         * mini.c (mono_create_class_init_trampoline): Add a lock around
4996         class_init_hash_addr.
4997
4998         * arrays.cs (test_0_newarr_emulation): Add new regression test for
4999         #30073.
5000
5001         * mini.c: Decompose the NEWARR instruction before decomposing its
5002         arguments. Fixes #30073.
5003
5004 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
5005
5006         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
5007         convention.
5008
5009 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
5010
5011         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
5012
5013         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
5014
5015         * driver.c: Add support for compiling icall wrappers to --compile.
5016
5017 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
5018
5019         * inssel.brg: The empty value in class->interface_offsets is -1, not
5020         0. Fixes #49287.
5021
5022 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
5023
5024         * objects.cs: New test for 'is' operator on an array of interfaces.
5025
5026 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
5027
5028         * tramp-ppc.c: update trampoline code to support jumps
5029         and class initialization.
5030
5031 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
5032
5033         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
5034
5035         * inssel.brg (OP_UNBOXCAST): Fix #46027.
5036
5037         * inssel.brg (OP_UNBOX): Remove unused rule.
5038
5039         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
5040         region instead of one for each method. Fixes #47813.
5041
5042 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
5043
5044         * exceptions.cs (test_0_nested_finally): New regression test for
5045         nested exception handlers.
5046
5047         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
5048
5049         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
5050
5051         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
5052         inlining.
5053
5054         * mini.c (mono_method_check_inlining): Make the inlining limit 
5055         configurable by an environment variable.
5056         
5057         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
5058
5059         * mini.h: Bump AOT file version.
5060
5061         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
5062         token, store the image along with the token, since the token might not 
5063         refer to the same image as the method containing the relocation, 
5064         because of inlining.
5065
5066 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
5067
5068         * mini.c (mono_precompile_assemblies): New function to compile
5069         all methods in all loaded assemblies.
5070
5071         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
5072
5073         * regalloc.h regalloc.c (MonoRegState): Change the type of 
5074         iassign and fassign to int*, since they can contain large negative
5075         values if the register is spilled. Also added some comments. Fixes
5076         #45817.
5077
5078         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
5079         under Win32. Fixes #42964.
5080
5081 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
5082
5083         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
5084
5085         * aot.c: Added support for AOT compiling methods which contain calls
5086         to wrappers. Currently, only remoting-invoke-with-check wrappers are
5087         handled.
5088         
5089         * driver.c (compile_all_methods): Run the compilation in a thread
5090         managed by mono. Fixes #44023.
5091
5092         * mini.c (mono_codegen): Print full method name in verbose output.
5093
5094         * mini-x86.c (mono_arch_patch_code): Fix warning.
5095         
5096         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
5097         jumps, since the method we are jumping to might be domain-specific.
5098
5099         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
5100
5101 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
5102
5103         * inssel.brg: string chars are unsigned.
5104
5105 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
5106
5107         * TODO: New todo item.
5108
5109         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
5110         which calls mono_runtime_class_init and patches the call site to
5111         avoid further calls.
5112         (mono_arch_create_class_init_trampoline): New arch specific function 
5113         to create a class init trampoline.
5114         (create_trampoline_code): Generalized so it can create
5115         class init trampolines as well.
5116
5117         * mini.c (helper_sig_class_init_trampoline): New helper variable.
5118         (mono_create_class_init_trampoline): New function to create and cache
5119         class init trampolines.
5120         (mono_find_class_init_trampoline_by_addr): New function to lookup the
5121         vtable given the address of a class init trampoline. Used by the
5122         patching process.
5123         (mono_codegen): Generate a call to a trampoline instead of
5124         mono_runtime_class_init in LDSFLD[A].
5125         (mono_codegen): Add relocations for the new trampoline.
5126         
5127         * mini.h mini-x86.c aot.c: Added a new relocation type: 
5128         MONO_PATCH_INFO_CLASS_INIT.
5129
5130         * mini.h: Bump AOT version number.
5131
5132         * aot.c: Create a copy of the loaded code instead of using the original
5133         so methods which call each other will be close in memory, improving
5134         cache behaviour.
5135         
5136         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
5137         patch since it breaks the regression tests.
5138         
5139         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
5140         for the register saving instruction sequence since the 
5141         frame_state_for function in glibc 2.3.2 don't seem to detect it.
5142
5143 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
5144
5145         * TODO: Fix todo item && remove another.
5146
5147 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
5148
5149         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
5150         previous checkin.
5151
5152         * aot.c: Moved the check for MONO_LASTAOT into the initialization
5153         function of the module.
5154
5155         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
5156         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
5157         --no-aot command line option.
5158
5159 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
5160
5161         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
5162         by Bernie Solomon (bernard@ugsolutions.com).
5163
5164         * inssel.brg: Refactor the interface offset table related code into
5165         its separate functions and add support for the AOT case.
5166
5167 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
5168
5169         * aot.c (mono_aot_get_method_inner): Fix memory leak.
5170         
5171         * aot.c: Added mono_aot_verbose variable and made all debugging
5172         output depend on the value of this variable.
5173
5174         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
5175         method_label and info_label.
5176
5177         * mini.h mini-x86.c aot.c: Added a new relocation type 
5178         MONO_PATCH_INFO_IID for klass->interface_id.
5179
5180         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
5181         the MonoJitInfo structure.
5182
5183         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
5184         a non-root appdomain in shared mode.
5185
5186 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
5187
5188         * aot.c: make aot loader less verbose. Remove free of unused variable.
5189
5190 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
5191
5192         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
5193
5194         * .cvsignore: Added *.dll.
5195
5196         * mini.c (mono_print_tree_nl): New function callable while debugging.
5197
5198         * mini.c (mono_print_code): Export this.
5199
5200         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
5201         patched code.
5202
5203 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
5204
5205         * mini.h (MonoCompile): Added 'jit_info' field.
5206
5207         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
5208         the cfg structure, since it is needed by the AOT compiler.
5209
5210         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
5211
5212         * aot.c: A major rewrite. Changes include:
5213         - save exception tables for methods which have them.
5214         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
5215         to g_module_symbol.
5216         - reworked the file format so it is now much smaller and needs
5217         fewer relocation entries.
5218         
5219 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
5220
5221         * aot.c (load_aot_module): Fix build bustage on platforms without
5222         Boehm GC.
5223
5224 2003-09-04  Martin Baulig  <martin@ximian.com>
5225
5226         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
5227
5228 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
5229
5230         * TODO: Some new optimization ideas.
5231
5232         * aot.c: Move AOT module loading logic here from mono_assembly_open.
5233
5234         * aot.c: Save the optimization flags used to compile the code into
5235         the AOT module.
5236
5237         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
5238         support emitting domain specific code.
5239         
5240         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
5241         no longer domain neutral. It can be made domain neutral by compiling 
5242         with --optimize=shared.
5243
5244         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
5245         between appdomains.
5246
5247         * driver.c mini.h mini.c: New --no-aot debugging option which disables
5248         loading of AOT code.
5249
5250         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
5251         
5252         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
5253         if there is no domain neutrality information.
5254
5255 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
5256
5257         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
5258         format version into the generated library.
5259
5260         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
5261         callee method into the caller since one of them could be shared.
5262
5263         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
5264         system exceptions from AOT code now works.
5265
5266         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
5267         method if it is domain neutral and the callee is not.
5268
5269         * graph.c (cfg_emit_one_loop_level): Fix warning.
5270
5271 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
5272
5273         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
5274         last checkin.
5275
5276 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
5277
5278         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
5279         is needed  by code which is executed before mono_runtime_init ().
5280         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
5281         
5282         * mini.c (mono_thread_abort): Fix warning.
5283         (mono_jit_compile_method): Call static constructor in the AOT case too.
5284
5285         * aot.c (mono_compile_assembly): Fix warning.
5286
5287 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5288
5289         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
5290
5291 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
5292
5293         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
5294
5295         * cpu-pentium.md: Fix the length of call opcodes so they include the
5296         ESP restoring instruction. Fixes #47968.
5297
5298 2003-08-28  Martin Baulig  <martin@ximian.com>
5299
5300         * mini-x86.c (mono_arch_call_opcode): Added support for
5301         MONO_TYPE_GENERICINST.
5302
5303         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
5304
5305 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
5306
5307         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
5308         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
5309
5310         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
5311         metadata_section.
5312
5313 2003-08-26  Martin Baulig  <martin@ximian.com>
5314
5315         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
5316         when reporting an error, set this to the actual error location.
5317         (mono_method_to_ir): Report the correct error location if
5318         get_basic_blocks() returned an error.
5319
5320 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
5321
5322         * mini.c (mono_type_blittable): OBJECT is not blittable.
5323         (mono_method_blittable): Methods which have marshalling descriptors
5324         are not blittable either. Fixes #47842.
5325
5326 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
5327
5328         * driver.c mini.c: Use an environment variable instead of a global 
5329         variable. Also fix the build.
5330
5331         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
5332         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
5333         reporting this. 
5334
5335         * driver.c mini.c: Added --with-valgrind option to turn off some
5336         code which prevents mono from running under valgrind.
5337
5338         * mini.c (mono_emit_call_args): Fixed warning.
5339
5340         * mini.c (mono_emulate_opcode): Fixed warning.
5341
5342 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5343
5344         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
5345         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
5346         regalloc.c, regalloc.h: specify available registers in arch-specific
5347         code and support floats in the regallocator (patch by Laurent Morichetti 
5348         <l_m@pacbell.net>)
5349
5350 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
5351
5352         * mini.c: mono_thread_current() can be called only after
5353         mono_runtime_init(): rearrange code to not call it early on.
5354
5355 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
5356
5357         * mini.c: allocate jump tables in the code mempools.
5358
5359 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
5360
5361         * mini.c, mini.h: make sure per-thread data allocated by the jit is
5362         freed.
5363
5364 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
5365
5366         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
5367         12 to 16.  This fixes bug #47453.
5368
5369
5370 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
5371
5372         * mini-ppc.c: fixed indexed load and unsigned compares.
5373
5374 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
5375
5376         * mini.c: reenabled installation of handler for
5377           thread abort signal.
5378
5379 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5380
5381         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
5382         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
5383         until it's fixed and actually useful.
5384
5385 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
5386
5387         * inssel-long32.brg: couple more opcodes implemented.
5388
5389 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
5390         
5391         * mini-sparc.c: Even more opcodes implemeted.
5392
5393 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
5394
5395         * mini-sparc.c: More opcodes implemented.
5396
5397 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
5398
5399         * mini-sparc.c: More opcodes implemented.
5400
5401 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
5402
5403         * inssel-sparc.brg: Add some needed rules.  Direct
5404         copy from PPC.
5405         * Makefile.am: Use inssel-sparc.brg
5406         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
5407         an assert happy for now.
5408
5409 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
5410
5411         * mini-sparc.c: Fixed compile errors.
5412         * exceptions-sparc.c: Same.  We now produce a mono binary 
5413         on sparc-linux.  Yea.
5414
5415 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
5416
5417         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
5418         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
5419         They compile, but do not work.
5420
5421 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
5422
5423         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
5424         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
5425         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
5426         (ct@gentoo.org).
5427
5428 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5429
5430         * mini.c: more opcodes implemented and better support for generics.
5431
5432 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
5433
5434         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
5435         * mini.c, mini.h: first cut at generics support: some new instructions 
5436         added and changed the behaviour of some of the existing ones.
5437
5438 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
5439
5440         * mini.c: Removed definition of metadata_shared mutex here.
5441
5442 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
5443
5444         * mini-x86.c: make vararg calls work for instance methods.
5445
5446 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5447
5448         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
5449         returns the arguments in a separte list, now.
5450
5451 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
5452
5453         * aot.c, mini.c: updates for array type representation changes.
5454
5455 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
5456
5457         * mini.c: register function to perform jit shutdown.
5458
5459 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
5460
5461         * mini.c: use a faster allocator if possible.
5462
5463 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
5464
5465         * aot.c: some cleanups and portability changes.
5466
5467 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
5468
5469         * mini.c: use faster allocation for CEE_BOX if possible.
5470
5471 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
5472
5473         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
5474         Moved inlined mempcy code to its own function so that is can be
5475         reused. Added an inline memset function as well (optimized initobj).
5476         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
5477
5478 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
5479
5480         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
5481
5482 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
5483
5484         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
5485         arch code can setup the cpu for CLR execution, if needed.
5486         We use it on x86 to set the precision of FP operations.
5487
5488 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
5489
5490         * mini.c: disable some optimizations if we can guess they'll cost too
5491         much for a given method.
5492
5493 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
5494
5495         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
5496         
5497 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
5498         * mini.h mini.c mini-x86.c: Added instruction level coverage 
5499         info collection support.
5500
5501 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
5502
5503         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
5504         is now implemented in the profiling API. Get rid of a couple of
5505         unnecessary global variables.
5506
5507 2003-06-15  Nick Drochak <ndrochak@gol.com>
5508
5509         * basic-long.cs: tests for negative values for bigmul, and unsigned.
5510         * cpu-g4.md: add op_bigmul and op_bigmul_un
5511         * cpu_pentium.md: add op_bigmul_un
5512         * inssel-long32.brg: add rule for unsigned bigmul
5513         * mini-ops.h: define OP_BIGMUL_UN
5514         * mini-x86.c: THE BUG: handle (un)signed properly
5515         * mini.c: choose unsigned opcode if needed.
5516         This set of patches fixes bug #44291
5517
5518 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
5519
5520         * mini.c (optimize_branches): improved to handle all kinds of
5521         conditional branches.
5522
5523 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
5524
5525         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
5526         don't raise exceptions.
5527
5528 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
5529
5530         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
5531         to arch-specific files.
5532
5533 2003-06-09  Martin Baulig  <martin@ximian.com>
5534
5535         * Makefile.am (libs): Added $(LIBGC_LIBS).
5536
5537 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
5538
5539         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
5540         and OP_ATAN (fixes bug#44293).
5541
5542 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
5543
5544         * Makefile.am, mini-x86.c: rename cpu description array to
5545         pentium_desc, since some compilers define the 'pentium' preprocessor
5546         symbol.
5547
5548 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
5549
5550         * mini.c (mini_select_instructions): add explicit branch if the
5551         following block is not the false target of a conditional branch -
5552         we need this with any optimization that reorder or remove bblocks
5553
5554         * mini.c (optimize_branches): bug fixes
5555
5556 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
5557
5558         * mini.c (mono_method_to_ir): inline static readonly fields
5559
5560         * ssa.c (fold_tree): start cfold support for long (very simple
5561         cases only)
5562
5563         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
5564
5565 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
5566
5567         * inssel.brg: fixed memcpy (bug #44219).
5568
5569 2003-06-05  Dick Porter  <dick@ximian.com>
5570
5571         * driver.c: Set the glib log levels to not abort if g_message
5572         recurses.
5573
5574         g_set_prgname() has to happen before mini_init() so that the
5575         process handle gets the info.
5576         
5577 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
5578
5579         * driver.c: add intrins to the default optimizations to get wider
5580         exposure.
5581
5582 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
5583
5584         * mini.h: some large basic blocks will overflow a 16-bit
5585         integers for symbolic registers.
5586
5587 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
5588
5589         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
5590         (mono_arch_output_basic_block): fix bug 43499 
5591
5592 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
5593
5594         * mini.c: kill duplicated definition of mono_debug_format.
5595
5596 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
5597
5598         * mini-x86.c, arrays.cs: fixed register allocation bug.
5599
5600 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
5601
5602         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
5603
5604         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
5605
5606 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5607
5608         * mini.c:
5609         (print_method_from_ip): also print source location information if
5610         available.
5611
5612 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
5613
5614         * mini.c (mono_find_block_region): bug fix in region code
5615         (mini_method_compile): enable removing unreachable code again, but
5616         only in methods without exception clauses.
5617
5618 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
5619
5620         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
5621         Implemented arglist opcode and handling of TypedReference type.
5622         Fixed x86 call convention when a structure is returned.
5623         Minimal support for calling static vararg methods.
5624
5625 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
5626
5627         * mini.c (mini_method_compile):  always remove unreachable code,
5628         because the code in them may be inconsistent  (access to dead
5629         variables for example).
5630
5631 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
5632
5633         * driver.c, debug-mini.c: warning fixes.
5634
5635 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
5636
5637         * Makefile.am, jit.h, mini.h: install header for embedding mono.
5638
5639 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
5640
5641         * mini.c: thread-static fields are registered in mono_class_vtable(),
5642         so ensure the function is called before checking for them.
5643
5644 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
5645
5646         * mini.c (optimize_branches): fix for bug 43586
5647
5648         * jit-icalls.c (mono_llmult_ovf): added an additional check for
5649         overflow (fixes Bug #43639)
5650
5651 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
5652
5653         * mini.c, objects.cs: allow the use of stobj for primitive types.
5654
5655 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
5656
5657         * mini.c: be less strict about argument checking until we support
5658         running the verifier.
5659
5660 2003-05-27  Nick Drochak <ndrochak@gol.com>
5661
5662         * basic-long.cs: tests for (ulong)int * (ulong)int also
5663         * mini.c: use the same trick for (ulong)int * (ulong)int
5664
5665 2003-05-27  Nick Drochak <ndrochak@gol.com>
5666
5667         * basic-long.cs: add regression test for (long)int * (long)int
5668         * cpu-pentium.md: add op_bigmul specification
5669         * inssel-long32.brg: add OP_BIGMUL rule
5670         * mini-ops.h: add OP_BIGMUL
5671         * mini-x86.c: register allocator: handle case where src1 needs to be
5672         in EAX.
5673         * mini.c: substitute special BIGMUL opcode in the tree for 
5674         (long)int * (long)int
5675
5676 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5677
5678         * jit-icalls.c: call the type ctor on field access if needed.
5679
5680 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
5681
5682         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
5683         to a method (including results of ldelema, bug#43207).
5684
5685 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
5686
5687         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
5688         colors to show exception handler blocks.
5689
5690         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
5691         (fix for pinvoke7.cs).
5692
5693 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
5694
5695         * mini.h, mini.c: ensure correct initialization order for types that
5696         require it. Prepare for lazy compilation of jit icall wrappers.
5697         Provide a name for opcode emulation to reduce unneeded mallocing.
5698
5699 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
5700
5701         * mini-x86.c: better register restoring code and profiling
5702         support for tail calls.
5703
5704 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
5705
5706         * mini.h, driver.c: prepare for leaf methods optimization.
5707
5708 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
5709
5710         * mini.c: get targets of branches before converting a method.
5711
5712 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
5713
5714         * mini.c (optimize_branches): added some experimental code (disbaled) 
5715
5716 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
5717
5718         * mini.c (optimize_branches): fix branch to branch optimization 
5719
5720         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
5721
5722         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
5723
5724         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
5725
5726         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
5727         if needed.
5728
5729 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
5730
5731         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
5732         enable use of interface variables again.
5733
5734         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
5735         I1 to registers because there is no simply way to sign extend 8bit
5736         quantities in caller saved registers on x86.
5737
5738         * inssel-float.brg: set costs of some rules to 2 so
5739         that monobure always select the arch. specific ones if supplied,
5740         regardless of the order we pass the files to monoburg.
5741
5742 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
5743
5744         * mini.c, mini-x86.c: since the magic trampoline for jumps
5745         can't patch the code directly, we do it as soon as the
5746         method gets compiled.
5747
5748 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
5749
5750         * mini-x86.c, mini.h: introduce a new patching method
5751         to support CEE_JMP and tail calls.
5752         * mini.c: obey tail.call. Don't precompile methods target
5753         of CEE_JMP.
5754         * tramp-x86.c: new trampoline code to handle methods
5755         reached through a jump.
5756
5757 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
5758
5759         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
5760         bit values to registers
5761
5762 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
5763
5764         * mini.c (mono_compile_get_interface_var): share interface
5765         variables if possible.
5766
5767 2003-05-16  Martin Baulig  <martin@ximian.com>
5768
5769         * debug-mini.c (mono_init_debugger): New function to initialize
5770         the debugger.  This is not in the debugger since it needs to
5771         access some of mini's internals.
5772
5773 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
5774
5775         * mini.c (mono_method_to_ir): inlining fixes/cleanups
5776
5777 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
5778
5779         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
5780         for value type handling.
5781
5782 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
5783
5784         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
5785         (mono_method_check_inlining): enable inlining of all kinds of wrappers
5786
5787 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
5788
5789         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
5790           the constructor through a proxy.
5791
5792 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
5793
5794         * jit-icalls.c, inssel.brg: fixes to array element address
5795         calculations.
5796
5797 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
5798
5799         * mini-x86.c (is_regsize_var): allocate pointer to registers
5800
5801 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
5802
5803         * driver.c: fixed typo, added intrins to the set of optimizations
5804         tested with regressions.
5805
5806 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5807
5808         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
5809         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
5810         test case.
5811
5812 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
5813
5814         * inssel.brg: remove some common pop instructions without side effects
5815
5816 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
5817
5818         * inssel-x86.brg: fixed thinko in int to double conversions.
5819
5820 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
5821
5822         * mini.c, jit-icalls.c: added runtime thread-static variable support.
5823
5824 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
5825
5826         * inssel-long32.brg: two more missing instructions.
5827
5828 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
5829
5830         * mini.c (mono_emit_call_args): set the cil_code for all arguments
5831         if not already set.
5832
5833 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
5834
5835         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
5836         correctly.
5837
5838         * basic-float.cs: Added tests for negative zero.
5839
5840 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
5841
5842         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
5843         a couple of missing operations for long casts, with test cases.
5844
5845 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5846
5847         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
5848
5849 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
5850
5851         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
5852         code size estimation.
5853
5854 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
5855
5856         * mini.c (mono_jit_create_remoting_trampoline): make it work with
5857         abstract methods (fix bug 42542)
5858
5859         * aot.c: add ability to handle array types
5860         
5861 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
5862
5863         * mini.c: Call the _specific versions of the object allocation
5864         functions if possible.
5865
5866 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
5867
5868         * driver.c: call setlocale ().
5869
5870 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
5871
5872         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
5873         windows build.
5874
5875 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
5876
5877         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
5878
5879         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
5880         wrappers (fix bug 42122)
5881
5882 2003-05-04  Martin Baulig  <martin@ximian.com>
5883
5884         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
5885
5886         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
5887         s/mini_set_defaults/mono_set_defaults/g.
5888
5889 2003-05-04  Martin Baulig  <martin@ximian.com>
5890
5891         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
5892
5893 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5894
5895         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
5896         (reported by Don Roberts).
5897
5898 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
5899
5900         * mini.c: temporarily work around two bugs for this release.
5901
5902 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
5903
5904         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
5905         that contains -export-dynamic and it makes using the ld script
5906         useless.
5907         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
5908
5909 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
5910
5911         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
5912         specific cpu.
5913
5914 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
5915
5916         * mini.c: make sure leave calls all the needed finally blocks,
5917         even when the target jumps out of multiple exception clauses.
5918
5919 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
5920
5921         * ldscript, Makefile.am: add linker script to reduce the number of
5922         exported symbols (should also fix the issues with libwine defining
5923         some of the same symbols in io-layer).
5924
5925 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
5926
5927         * driver.c (mini_main): Avoid assertion when no file name is given on 
5928         the command line.
5929
5930 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
5931
5932         * driver.c: added --version/-V command line option.
5933         Added the inline optimization in the regression tests.
5934
5935 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
5936
5937         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
5938         to the type in the method signature (fixes bug#42134).
5939
5940 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
5941
5942         * mini.c: when inlining, check this is not null only when needed (bug #42135).
5943
5944 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
5945
5946         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
5947
5948 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5949
5950         * driver.c: fixed bug #42100.
5951
5952 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
5953
5954         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
5955
5956 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
5957
5958         * mini.c: moved most of the code required to do inlining to its own
5959         function so it can be reused. Inline also ctors if appropriate.
5960
5961 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
5962
5963         * Makefile.am: Link with -export-dynamic so shared libs loaded by
5964         the runtime can call mono API functions.
5965
5966 2003-04-27  Martin Baulig  <martin@ximian.com>
5967
5968         * debug-mini.c (mono_debug_init_method): Added
5969         `guint32 breakpoint_id' argument; if the method has a breakpoint,
5970         send a notification to the debugger.
5971
5972         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
5973         running in the Mono Debugger, just pass the breakpoint number to
5974         mono_debug_init_method().
5975
5976         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
5977
5978 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
5979
5980         * mini.c: allow some more unsafe compares.
5981
5982 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
5983
5984         * mini-x86.c, Makefile.am: make distcheck works (partially from
5985         a patch by Richard Lee <r.h.lee@attbi.com>).
5986         * regset.c, regset.h: removed, they are unused.
5987
5988 2003-04-25  Dick Porter  <dick@ximian.com>
5989
5990         * driver.c: Usage reports the name as 'mono' not 'mini'
5991         * exceptions-x86.c: Build and run on freebsd
5992
5993 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
5994
5995         * Makefile.am: install the program with the 'mono' name and
5996         the library as libmono instead of mini and libmini.
5997
5998 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
5999
6000         * driver.c: provide the APIs for the embedding interface of the old jit.
6001
6002 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
6003
6004         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
6005
6006 2003-04-23  Martin Baulig  <martin@ximian.com>
6007
6008         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
6009
6010         * driver.c: Added `--debug' command line argument to enable
6011         debugging support.
6012
6013 2003-04-23  Martin Baulig  <martin@ximian.com>
6014
6015         * debug.[ch]: Removed.  The code is now in
6016         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
6017
6018         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
6019         last six months.
6020
6021 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
6022
6023         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
6024
6025 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6026
6027         * mini.c:
6028         (mini_cleanup): moved mono_runtime_cleanup call after the call to
6029         mono_domain_finalize.
6030         (mini_method_compile): use mono_method_profile* if the the option is
6031         enabled.
6032
6033 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
6034
6035         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
6036         methods with their wrapper.
6037
6038         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
6039         methods with their wrapper.
6040
6041         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
6042         their wrapper.
6043
6044         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
6045         wrapper.
6046
6047         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
6048         methods.
6049
6050 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
6051
6052         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
6053
6054 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
6055
6056         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
6057         of the mempool. This is slightly faster and uses less memory
6058
6059 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
6060
6061         * mini.c: avoid O(n) allocation for variables.
6062
6063 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
6064
6065         * mini.c: handle items on the stack after inlining methods.
6066
6067 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
6068
6069         * mini.c: make the method->opcode optimization dependent
6070         on MONO_OPT_INSTRINS and do it lazily.
6071
6072 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
6073
6074         * driver.c: print overall results at the end of regression run.
6075
6076 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
6077
6078         * inssel.brg: don't overwrite symbolic registers.
6079
6080 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
6081
6082         * inssel-x86.brg: fix conversion from long to float.
6083
6084 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
6085
6086         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
6087
6088 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
6089
6090         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
6091
6092         * driver.c: Added --print-vtable option as in the old JIT.
6093
6094 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
6095
6096         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
6097
6098 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
6099
6100         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
6101
6102 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
6103
6104         * mini.c regalloc.c regalloc.h: Fix memory leak.
6105
6106 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
6107
6108         * aot.c (mono_aot_get_method): register all used strings
6109
6110 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
6111
6112         * mini.c: always intern strings references with ldstr at compile time.
6113
6114 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
6115
6116         * Makefile.am: add BUILT_SOURCES.
6117
6118 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
6119
6120         * driver.c: give a better error message when the assembly to execute
6121         doesn't have an entry point.
6122
6123 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
6124
6125         * Makefile.am: added hack for automake
6126
6127         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
6128         correct sematics.
6129
6130         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
6131
6132 22003-04-07  Martin Baulig  <martin@ximian.com>
6133
6134         * Makefile.am: Added Makefile.am.
6135
6136         * debugger-main.c: Removed, this is now in the debugger where it
6137         belongs.
6138
6139         * mini.pc.in: Call this package `mini' for the moment.
6140
6141
6142
6143
6144