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