e044eb700aa32c8403cb2f49c0608c78bf9d2bc5
[mono.git] / mono / mini / ChangeLog
1 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
2
3         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
4         and some utility functions (always for SSAPRE), integrated SSAPRE.
5         * mini.h: Likewise.
6         * driver.c: Added ssapre option.
7         * ssa.c: Small fix on OP_ARG handling.
8         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
9         * Makefile.am: Likewise.
10
11 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
12
13         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
14         now in the xp code.
15
16         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
17         icall.
18
19 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20
21         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
22         
23         * cpu-s390.md : Increase instruction length of oparglist.
24
25         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
26
27 2004-11-30  Martin Baulig  <martin@ximian.com>
28
29         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
30         virtual generic methods.  We call a special helper_compile_generic_method()
31         icall to retrieve the method from the vtable, inflate and compile
32         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
33
34         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
35
36 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
37
38         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
39
40 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
41
42         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
43         Fixes #69929.
44
45 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
46
47         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
48         platforms with PIC aot.
49
50 2004-11-28  Martin Baulig  <martin@ximian.com>
51
52         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
53         Fixes gen-112.cs.
54
55 2004-11-28  Martin Baulig  <martin@ximian.com>
56
57         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
58         the result of mono_type_get_underlying_type() to check whether
59         we're byref.
60
61 2004-11-26  Martin Baulig  <martin@ximian.com>
62
63         * mini.c
64         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
65         in the g_assert().
66
67 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
68
69         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
70         the same way as the other arguments so they won't get clobbered.
71
72         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
73         calls through R11 since it is clobbered by the trampoline code.
74
75 2004-11-26  Raja R Harinath  <rharinath@novell.com>
76
77         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
78         pick up in-tree mscorlib.dll.
79
80 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
81
82         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
83
84         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
85         runtime data/code are now stored in a table similar to the GOT in ELF. 
86         This allows the code itself to be position independent.
87
88         * aot.c: Fix loading of referenced assemblies after the lazy assembly
89         loading changes.
90
91         * aot.c: Attach ELF type (object/function) directives to all global
92         symbols.
93
94         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
95
96         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
97
98         * mini-amd64.h: Turn on PIC AOT code.
99
100         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
101         returning the offset within an OP_AOTCONST instruction where the GOT
102         offset needs to be added.
103
104         * mini.h: Bump AOT file format version.
105
106 2004-11-25  Martin Baulig  <martin@ximian.com>
107
108         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
109         uninflated generic methods.
110
111 2004-11-25  Martin Baulig  <martin@ximian.com>
112
113         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
114
115 2004-11-24  Martin Baulig  <martin@ximian.com>
116
117         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
118         original klass (this only applies for generic instances).
119
120 2004-11-24  Martin Baulig  <martin@ximian.com>
121
122         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
123         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
124         that array).
125
126 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
127
128         * mini.c (mono_method_to_ir): Disable inlining for methods containing
129         localloc. Fixes #69678.
130
131         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
132         
133 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
134
135         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
136         used SSE registers on pinvoke calls. Fixes #69774.
137
138 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
139
140         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
141         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
142
143 2004-11-23  Raja R Harinath  <rharinath@novell.com>
144
145         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
146         Refer directly to the mcs/ tree.
147
148 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
149
150         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
151         Check if a trampoline for a synchronized method is required. 
152
153 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
154
155         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
156         with localloc if needed. Throe arithmetric exception in
157         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
158         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
159
160 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
161
162         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
163         types before switching on type.  Fixes #69622.
164
165 2004-11-19  Raja R Harinath  <rharinath@novell.com>
166
167         * Makefile.am (check-local): New.  Integrate into 'make check'.
168         (MCS,RUNTIME): Define using in-tree mono and mcs.
169         (ILASM): New.
170         (%.exe): Use $(ILASM).
171
172 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
173
174         * mini-ppc.c: adjust initial prolog size (bug #69691).
175
176 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
177
178         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
179         #69664.
180
181 2004-11-17  Raja R Harinath  <rharinath@novell.com>
182
183         * Makefile.am (clean-local): Rename from 'clean'.
184
185 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
186
187         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
188         to mono_arch_is_int_overflow. 
189         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
190         SIGFPE events.
191
192 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
193
194         * declsec.c|h: New files to support declarative security attributes.
195         Added function to check if a method has (applicable) security.
196         * mini.c|h: Add check for declarative security attributes in
197         mono_method_check_inlining.
198         * Makefile.am: Added declsec.c and declsec.h to the build.
199
200 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
201
202         * mini.c, mini.h: update to keep dynamic code info per-domain.
203
204 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
205
206         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
207         (mini_init): Get rid of it from here too.
208
209 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
210
211         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
212         implemented OP_RETHROW (patch by Geoff Norton
213         <gnorton@customerdna.com>).
214
215 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
216
217         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
218         between appdomains.  Fixes appdomain-unload on PPC.
219
220 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
221
222         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
223         mini-exceptions.c: handle the new wrapper types.
224         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
225         token value as a MonoClass* when compiling a wrapper.
226         mono_jit_create_remoting_trampoline now takes an additional
227         MonoRemotingTarget parameter.
228         
229 2004-11-10  Martin Baulig  <martin@localhost>
230
231         * mini.c (mono_method_to_ir): Use `generic_container->context'
232         rather than creating a new one.
233
234 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
235
236         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
237
238         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
239
240 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
241
242         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
243         the experimental aot cache stuff.
244
245 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
246
247         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
248         mini-exceptions.c: update to exception clause structure changes.
249
250 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
251
252         * exceptions-x86.c (throw_exception): Fix warnings.
253
254         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
255         for OP_RETHROW.
256
257 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
258
259         * exceptions-sparc.c (get_throw_exception): Really fix this.
260
261 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
262
263         * tramp-*.c: we no longer support icalls without wrappers, so
264         a bit of code can be removed here
265
266 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
267
268         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
269         patch.
270
271         * cpu-sparc.md: Add op_rethrow.
272
273         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
274
275         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
276
277         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
278         * mini-ops.h: Add OP_RETHROW.
279
280         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
281
282         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
283
284 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
285         
286         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
287         Makes the output much easier to read
288
289 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
290
291         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
292         prevents another huge leak when compiling with ssa. Secondly, the
293         performance of doing this rather than freeing the lists is much
294         better. GList does a lock every time you allocate a list link,
295         so that it can use a memory pool. So, it is better to just use
296         a memory pool of our own.
297         
298         * ssa.c, linear-scan.c: replace g_list_remove_link with
299         g_list_delete.  The remove one does not free the GList, so we were
300         leaking memory. On -O=all --compile-all with corlib, this cut down
301         3 MB of allocations.
302
303 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
304
305         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
306
307         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
308
309         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
310         into a new function mono_create_jit_trampoline ().
311
312 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
313
314         * trace.c (get_spec): Allow tracing of classes without a namespace.
315
316 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
317
318         * mini.c: Fix pointer overwrite in mini_method_compile.
319
320 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
321
322         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
323         The darwin ABI needs some special handling for 1 and 2 byte structs
324         Lets use lbz/lhz instead of lwz everywhere.
325         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
326         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
327         Use stb/sth for the former, and put the latter always on stack instead of in
328         argument registers.
329
330 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
331
332         * trace.c (is_filenamechar): Add '_'.
333
334 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
335
336         * mini-s390.c: Fix prolog length to allow for large trace requirements.
337
338         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
339
340 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
341
342         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
343         depends on libmonogc. Fixes #68805.
344
345 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
346
347         * mini.c (mono_jit_free_method): Provide extra information for
348         this error.  Currently this leaks, but will be turned into a
349         developer option in the future.
350
351 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
352
353         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
354
355 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
356
357         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
358         boundary. Fixes reading of PATCH_INFO_R4 and R8.
359         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
360
361 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
362
363         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
364         trampolines for AOT code.
365
366 2004-10-22    <vargaz@freemail.hu>
367
368         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
369         constructed types. Fixes #68136.
370
371 2004-10-21  Martin Baulig  <martin@ximian.com>
372
373         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
374         if it returns true, unwind the stack to the call instruction.
375
376 2004-10-21    <vargaz@freemail.hu>
377
378         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
379
380         * mini.h: Bump AOT version number.
381
382         * objects.cs: Add another test for unbox trampolines.
383
384         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
385         valuetype methods.
386
387 2004-10-20    <vargaz@freemail.hu>
388
389         * driver.c: Add SHARED to the set of optimizations tested.
390
391         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
392
393         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
394         used by CEE_NEWARR.
395
396         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
397
398 2004-10-20  Martin Baulig  <martin@ximian.com>
399
400         * mini-exceptions.c (mono_handle_exception): Call
401         mono_debugger_handle_exception() to tell the debugger about
402         catch/finally clauses.
403
404 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
405
406         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
407
408         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
409         #68447.
410
411 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
412
413         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
414         methods as their native size, fixed bug #57543, #57545.
415         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
416         This saves a temporary register and mullw call down into 1 (minor perf
417         increase for cases like sum = sum * 5;  This use to translate into:
418             li r11,5
419             mullw r28,r28,r11
420         It now translates to
421             mulli r28,r28,5
422
423 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
424
425         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
426         #68388.
427
428 2004-10-11  Martin Baulig  <martin@ximian.com>
429
430         * mini.c (mono_method_to_ir): If we're a generic method, get the
431         MonoGenericContainer from our MonoMethodNormal and create a
432         MonoGenericContext from it.
433
434 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
435
436         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
437
438         * basic-long.cs: Add test for checked i8->i2 cast.
439
440 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
441
442         * inssel-ppc.brg: added a couple of speedup rules.
443
444 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
445
446         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
447         to speed up rebuilds.
448
449 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
450
451         * mini-s390.c: Minor fix to OP_OR_IMM.
452
453 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
454
455         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
456         better. Fixes appdomain-unload.exe on sparc.
457
458 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
459
460         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
461         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
462         see bug 67324.
463
464 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
465
466         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
467
468 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
469
470         * mini.c: Always generate a field read/write wrapper for members
471         of the class MarshalByRefObject since the actual instance could
472         be a CBO.
473
474 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
475
476         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
477
478 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
479
480         * driver.c mini.h trace.c: Move the setting of the main assembly into
481         a separate function called mono_trace_set_assembly () and call it after
482         actually loading the main assembly. Fixes #66872.
483
484 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
485
486         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
487         using the code manager.
488
489 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
490
491         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
492
493 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
494
495         * cpu-amd64.md: Fix bug in previous patch.
496         
497         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
498         #66650.
499
500 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
501
502         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
503         mini-exceptions.c: updates for changed stack walk interface.
504
505 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
506
507         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
508
509 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
510
511         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
512
513 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
514
515         * driver.c (mini_regression_list): Do not call mono_assembly_close 
516         since assemblies can't be unloaded.
517         
518 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
519
520         * cpu-amd64.md: Fix more instruction lengths.
521
522         * cpu-amd64.md: Fix lengths of some instructions.
523
524 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
525
526         * inssel.brg: Make the array ldelema check aot friendly.
527
528 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
529
530         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
531
532         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
533
534 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
535
536         * mini-x86.c: Fix build.
537
538         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
539         mono_type_get_underlying_type () helper function to simplify code.
540         
541 2004-09-09  Martin Baulig  <martin@ximian.com>
542
543         * mini-amd64.c: Don't access `type->data.klass' directly, call
544         mono_class_from_mono_type() instead since the type may be a
545         generic instance.
546
547 2004-09-09  Martin Baulig  <martin@ximian.com>
548
549         * mini-amd64.c (get_call_info): Fix support for generic instances.
550         (add_valuetype): Use mono_class_from_mono_type() to get the class
551         since we can be a generic instance.
552
553 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
554
555         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
556
557 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
558
559         * liveness.c: reset spill costs on each scan: bug 62107
560
561 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
562
563         * exceptions-sparc.c (mono_arch_find_jit_info): remove
564         unnecessary line that doesn't compile
565
566 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
567
568         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
569         trampolines, make them call an error function so people can fix their
570         code.
571
572 2004-09-06  Martin Baulig  <martin@ximian.com>
573
574         * mini.c (mono_method_to_ir): When initializing locals, handle a
575         generic instances like a valuetype if it's a valuetype and like a
576         class if it's a class.
577
578 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
579
580         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
581         stack. Fixes #64674.
582
583         * exceptions.cs: Add test for unwinding of call arguments.
584
585 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
586
587         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
588         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
589         set the carry/borrow flag). The sparc and s390 implementations
590         can now use optimized versions (and simplify the code). ppc bugfixes.
591
592 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
593
594         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
595
596 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
597
598         * inssel-amd64.brg: Remove leftover 32 bit rule.
599
600         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
601
602 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
603
604         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
605         mono_arch_find_jit_info functions into a new function. Fix a memory
606         leak.
607
608         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
609         refactored code.
610         
611 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
612
613         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
614         as well.
615         
616         * exceptions.cs: Add array size tests.
617
618         * mini.c: Allocate a separate icall wrapper for each arity of 
619         mono_array_new_va. Fixes #59509.
620
621         * exceptions.cs: Add testcase for 64578.
622
623         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
624
625         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
626         
627 2004-09-02  Martin Baulig  <martin@ximian.com>
628
629         * mini.c (mono_method_to_ir): When initializing the locals, call
630         handle_initobj() on the generic instance itself, not its
631         underlying type.
632
633 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
634
635         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
636         MonoJitInfo for dynamic methods.
637
638         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
639
640         * mini.c: Add support for freeing JIT data for dynamic methods.
641         
642 2004-09-01  Martin Baulig  <martin@ximian.com>
643
644         * mini-x86.c (is_regsize_var): Added support for generic
645         instances.
646         (mono_arch_emit_prolog): Make this compile again, use
647         `x86_push_imm_template (code)'.
648
649 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
650
651         * mini-x86.c: make all push_imm instructions that get
652         patched always emit the long form
653
654 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
655
656         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
657         in a per-domain hash.
658
659         * mini-amd64.c (merge_argument_class_from_type): Handle generic
660         types.
661
662 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
663
664         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
665         work.
666         
667         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
668         work.
669
670         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
671         Beginnings of SSE2 support.
672
673         * exceptions.cs: Add more tests for checked int<->uint casts.
674
675 2004-08-28  Martin Baulig  <martin@ximian.com>
676
677         * mini-x86.c (mono_arch_instrument_epilog): Added support for
678         generic instances.
679
680         * mini.c
681         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
682         Handle generic instances recursively.
683
684 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
685
686         * iltests.il: test for conv.u8 on a constant
687
688 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
689
690         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
691         LCONV_x4 (shrun_32 (membase)).
692
693 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
694
695         * inssel-x86.brg: c&p rules for push/setret of long
696
697 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
698
699         * inssel-x86.brg: c&p rules for compare (base, regvar) and
700         compare (regvar, base)
701
702         * inssel-x86.brg: more burg love
703
704         * inssel.brg: more cleanup
705
706         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
707
708 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
709
710         * basic-long.cs, basic-calls.cs: new tests for optimization.
711
712 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
713
714         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
715         patch.
716
717 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
718
719         * mini-amd64.c (read_tls_offset_from_method): Add another case.
720         
721 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
722
723         * inssel.brg (mini_emit_memcpy): use 
724         NO_UNALIGNED_ACCESS to disable memcpy optimization
725
726 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
727
728         * mini-amd64.c: Handle generic types in various places.
729
730         * mini.c (mono_method_to_ir): Handle generic types in init locals.
731
732 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
733
734         * mini.c (handle_box): Fix warning.
735
736         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
737
738         * mini-amd64.h: Enable the emit_state optimization.
739
740         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
741
742         * mini-amd64.c: Add some new 64 bit peephole opts.
743
744         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
745
746         * cpu-amd64.md: sreg1 of div instructions must be %rax.
747
748         * mini-amd64.c: Register allocator fixes.
749
750         * mini.c: Add an optimization to emit_state to avoid allocation of new
751         registers on some platforms.
752
753 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
754
755         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
756
757         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
758         allocation. Fixes #63085.
759
760         * basic-long.cs: Add new regression test.
761
762         * mini-amd64.c: Register allocator improvements.
763
764 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
765
766         * mini-amd64.c (read_tls_offset_from_method): Add another code
767         sequence.
768
769         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
770         instruction sequence for nullifying class init trampolines.
771
772         * objects.cs: Add new regalloc test.
773
774         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
775
776 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
777
778         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
779         
780         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
781         arguments.
782
783         * driver.c: Fix profiling after TLS changes.
784         
785         * driver.c (mono_main): Set mono_stats.enabled if needed.
786
787         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
788         CEE_BOX.
789
790 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
791
792         * mini-x86.c: use a 1 op rather than a 2 op tls access
793         instruction -> faster.
794
795 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
796
797         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
798         x86 backend.
799
800 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
801
802         * exceptions-sparc.c (throw_exception): fix typo
803
804 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
805
806         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
807         set tree->dreg correctly with tls. Allow any
808         register to be used.
809
810         * mini-x86.c (read_tls_offset_from_method): add new code
811         generation pattern seen with GCC.
812
813
814 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
815
816         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
817         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
818         exceptions-sparc.c: fix some performance issues in exception
819         handling and setting of the stack trace for exceptions that were
820         already thrown.
821
822 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
823
824         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
825         x86 backend.
826         
827         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
828         registers.
829
830 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
831
832         This patch inlines tls access, when possible.
833         
834         * mini.h: new arch functions for TLS intrinsics.
835         All platforms updated with a stub.
836
837         * mini.c: use the new intrinsics
838
839         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
840         arch specific intrinsic for tls variables
841
842 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
843
844         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
845         under windows.
846
847 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
848
849         * mini.c: thread local allocation
850
851 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
852
853         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
854
855         * Makefile.am: Link against the static version of libmonogc.
856         
857         * Makefile.am: Link the static versions of the convenience libraries
858         into the mono executable.
859
860         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
861
862 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
863
864         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
865         on integer overflow.
866
867         * mini-amd64.c: Reorganize function call code.
868
869         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
870
871 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
872
873         * inssel-x86.brg: use xor eax,eax.
874         
875         * basic.cs: new tests
876
877 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
878
879         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
880         in exception throwing code.
881         
882 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
883
884         * inssel-x86.brg: use xor esi,esi.
885
886 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
887
888         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
889         can trace methods compiled during mini_init () too.
890
891         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
892         CEE_CONV_U4.
893
894 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
895
896         * Makefile.am: static link on x86 (r=zoltan)
897
898 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
899
900         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
901         code since it causes some programs to fail.
902
903 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
904
905         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
906
907 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
908
909         * mini.c: ovfops_op_map - add STACK_OBJ case for
910         CONV_I 
911         * basic.cs: add test_0_pin_string as test
912         case for above.
913
914 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
915
916         * Makefile.am: build C# if srcdir != builddir
917
918 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
919
920         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
921         fall-through blocks.
922
923 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
924
925         * driver.c: enable loop by default again and include abcrem in -O=all.
926
927 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
928
929         * iltests.il: Add some localloc tests.
930
931         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
932
933         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
934         Fixes #62574.
935
936         * inssel-amd64.brg: Add some optimizations.
937
938         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
939         for gcc-3.4.
940
941         * Makefile.am: Statically link mono against libmono on AMD64.
942         
943         * mini-amd64.c inssel-amd64.brg: Optimizations.
944
945 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
946
947         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
948
949         * tramp-amd64.c: Patch calling code in trampolines.
950
951 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
952
953         * mini-amd64.c: pinvoke struct passing fixes.
954
955 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
956
957         * mini-sparc.c: redo change, make mono_arch_cpu_init call
958         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
959
960 2004-08-05  Duncan Mak  <duncan@ximian.com>
961
962         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
963         CEE_LDELEM_ANY.
964
965 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
966
967         * mini-amd64.c (emit_move_return_value): Move return value for normal
968         calls too.
969
970 2004-08-05  Martin Baulig  <martin@ximian.com>
971
972         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
973         `type->type'; just modify `type' itself when dealing with enums
974         and generic instances.
975         (check_call_signature): Make `simple_type' a `MonoType *'.
976
977 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
978
979         * mini.c: Use OP_PADD to add offsets to addresses.
980
981         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
982
983 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
984
985         * mini-sparc.c (mono_arch_emit_epilog): fix check
986         for folding last op into restore instruction
987
988 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
989
990         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
991         helper methods using the code manager.
992         
993         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
994
995         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
996
997 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
998         
999         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
1000           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
1001
1002         * mini-s390.c: fix tail processing
1003
1004 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
1005
1006         * mini-ppc.c: mul.ovf.un exception name fix.
1007
1008 2004-08-03  Martin Baulig  <martin@ximian.com>
1009
1010         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
1011         instances; before jumping to `handle_enum', also modify `ptype'.
1012
1013 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
1014
1015         * cpu-sparc.md: fcall maximal length too small.
1016
1017 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
1018
1019         * mini-amd64.c mini.h: Add initial support for passing/returning 
1020         structures to/from pinvoked methods.
1021
1022 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
1023
1024         * mini-ppc.c: reg allocator fix.
1025
1026 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
1027
1028         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
1029
1030         * inssel.brg: Optimize memset on 64 bit machines.
1031
1032         * mini-amd64.c: Fix some vararg cases.
1033
1034 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
1035
1036         * mini-s390.c: Corrected macro in emit_float_to_int
1037
1038         * s390-abi.cs: Tests to exercise the s390 ABI
1039
1040 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
1041
1042         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
1043         caller saved regs.
1044
1045         * basic.cs: Add a test for add.ovf.un.
1046
1047 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
1048
1049         * mini-sparc.c: add case for OP_IDIV_UN
1050
1051 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
1052
1053         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
1054         
1055         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
1056
1057 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
1058
1059         * basic.cs: regression tests.
1060
1061         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
1062         regressions.
1063
1064 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
1065
1066         * basic.cs: Add a new test.
1067
1068         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
1069         and AOT. Various fixes and optimizations.
1070
1071         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
1072
1073 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
1074
1075         * mini-ppc.c: make sure temp regs are not used for global reg
1076         allocation.
1077
1078 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
1079
1080         * cpu-sparc.md: conv_i8 fix for 64bits
1081
1082         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
1083
1084 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
1085         
1086         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
1087         add opcode for cmp BYTE PTR [eax], imm.
1088
1089         * inssel.brg: Make memcpy and memset takes bases.
1090
1091 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
1092
1093         * *-amd64.*: More AMD64 work.
1094         
1095 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
1096
1097         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
1098         add a compare-not-equal opcode.
1099         
1100 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
1101
1102         * mini.c: Use mono_init_from_assembly instead of mono_init.
1103         
1104 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
1105
1106         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
1107
1108         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
1109
1110         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
1111
1112         * inssel.brg: 64 bit fixes.
1113
1114         * mini.h (MonoCallInst): Add some AMD64 specific data.
1115
1116         * mini.h: Add some OP_P opcodes.
1117
1118 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
1119
1120         * basic.cs: tests for 61797 and 61740
1121
1122 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
1123
1124         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
1125         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
1126
1127 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
1128
1129         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
1130
1131         * *-amd64*.*: Ongoing AMD64 work.
1132
1133 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
1134
1135         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
1136
1137         * *-amd64*: Ongoing AMD64 work.
1138
1139         * mini-arch.h: Add AMD64 support.
1140
1141         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
1142
1143         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
1144
1145         * mini-ops.h: Add new opcodes.
1146
1147         * Makefile.am: Add AMD64 support.
1148
1149         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
1150         rules into the inssel-long*.brg files.
1151
1152         * *-amd64.*: Add beginnings of AMD64 backend.
1153
1154 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
1155
1156         * mini.c (print_dfn): commenting out the code that prints
1157         the cil. With -O=deadce, this makes -v -v crash.
1158         
1159         * cpu-pentium.md: make checkthis have a length of 2
1160
1161 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
1162
1163         * mini-sparc.h: fix implementations of __builtin
1164         functions for Sun compiler for V9.
1165
1166 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
1167
1168         * mini.c: use the new stelem.ref wrapper
1169         * exceptions.cs, arrays.cs: new stelem.ref tests
1170
1171 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
1172
1173         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
1174         new XSP should work with these changes).
1175
1176 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
1177         
1178         * inssel-{long32,x86,}.brg: trivial optimizations.
1179         
1180 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
1181
1182         * mini.c: load value when emitting box operation in
1183         constrained calls.
1184
1185 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
1186
1187         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
1188         is one byte shorter than cmp DWORD PTR [eax], 0.
1189
1190 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
1191
1192         * inssel-ppc.brg: arguments on the stack are always
1193         relative to the stack pointer (spotted by Neale Ferguson).
1194
1195 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1196
1197         * exceptions-x86.c: delay appending the method name to the trace until
1198         after mono_jit_info_table_find is called, as this gets the real
1199         MonoMethod.
1200
1201 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
1202
1203         * aot.c: register roots
1204
1205 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
1206
1207         * aot.c : I could just use PLATFORM_WIN32 flag.
1208
1209 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
1210
1211         * aot.c : Reverting the previous fix. This time it broke linux build.
1212
1213 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
1214
1215         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
1216
1217 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
1218
1219         * mini.c (handle_stack_args): Remove some more debugging code.
1220         
1221         * mini.c (handle_stack_args): Remove debug output left in by mistake.
1222
1223         * driver.c mini.h aot.c: Allow additional options to be specified with
1224         --aot and pass them to mono_compile_assembly.
1225
1226         * aot.c: Add experimental code to AOT compile all loaded assemblies
1227         on demand and save the code into a cache in the filesystem.
1228
1229         * aot.c: Add support for more wrapper methods.
1230         
1231         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
1232         58863.
1233
1234         * cpu-*.md: Remove removed opcodes.
1235
1236         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
1237         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
1238         related icalls to marshal.c.
1239
1240 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
1241
1242         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
1243
1244         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
1245
1246         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
1247
1248 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
1249         * liveness.c: If liveness is recomputated we need to reset the information
1250         for each variable. This way, if the liveness range has been narrowed
1251         by optimizations that happened after the last computation, we can return
1252         a smaller range.
1253         
1254         For example, if you have
1255         
1256         {
1257                 int i = 0;
1258                 
1259                 // Tons of code that does not affect i
1260                 
1261                 i = foo ();
1262                 ...
1263         }
1264         
1265         i = 0 is dead code and will be removed by SSA. However, when
1266         linear scan gets to the code, i will still appear to be live
1267         throughout the entire block. This prevents good register allocation.
1268
1269 2004-07-06  Martin Baulig  <martin@ximian.com>
1270
1271         * debug-mini.c (mono_debug_init_method): Allow
1272         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
1273         (mono_debug_add_icall_wrapper): New method.
1274
1275         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
1276
1277 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
1278
1279         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
1280         optimization.
1281
1282 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
1283
1284         * aot.c (mono_aot_load_method): Fix loading of debug info.
1285
1286 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
1287
1288         * aot.c: Add logging support.
1289
1290 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
1291
1292         * mini.h: Add prototype for mono_print_method_from_ip.
1293
1294         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
1295
1296         * inssel.brg: 64 bit fixes.
1297
1298         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
1299         inssel-long32.brg.
1300
1301         * Makefile.am: Add SPARC64 support.
1302
1303 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
1304
1305         * aot.c: Fix alignment problems on 32 bit platforms.
1306
1307 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
1308
1309         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
1310         SPARC64.
1311
1312         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
1313         problems.
1314
1315         * mini.h: Bump AOT file version. Some 64 bit fixes.
1316
1317 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
1318
1319         * inssel-sparc.brg: Add new rule to avoid register moves.
1320
1321         * inssel.brg: Add ldind_to_load_membase helper function.
1322
1323 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
1324
1325         * mini.c: OffsetToStringData intrinsic.
1326         
1327 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
1328
1329         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
1330
1331         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
1332         regression tests.
1333
1334         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
1335 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
1336
1337         * mini.c: reinstated mono_compile_get_interface_var()
1338         on x86, too, since the change breaks the Gtk# build there as well.
1339
1340 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
1341
1342         * driver.c: remove loop from the default optimizations: it seems to
1343         interact badly with some of the other options (see bug #60613).
1344
1345 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
1346
1347         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
1348         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
1349
1350 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
1351
1352         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
1353         vararg-using methods.
1354
1355 2004-06-21  Martin Baulig  <martin@ximian.com>
1356
1357         * mini/mini-exceptions.c
1358         (mono_handle_exception): Added `gpointer original_ip' argument.
1359         After calling mono_unhandled_exception(), call
1360         mono_debugger_unhandled_exception() and if that returns true,
1361         restore the context and return.
1362
1363 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
1364
1365         * mini-ppc.c: prefer the use of relative branches so
1366         they won't need to be patched in aot code (patch from Patrick Beard).
1367
1368 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
1369
1370         * aot.c: patch from Patrick Beard to make the output assembly
1371         more correct for the MacOSX assembler. Small tweak to
1372         generate sane images on Linux/PPC, too.
1373
1374 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
1375
1376         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
1377         case until bug #59509 is fixed (shows up in #60332).
1378
1379 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
1380
1381         * mini.c: make sure the needed wrappers are compiled, too, with
1382         precomp.
1383
1384 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
1385
1386         * driver.c: remove NPTL reference in --version output.
1387
1388 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
1389
1390         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
1391         generate valid assembly for the Mach-O assembler.
1392
1393 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
1394
1395         * driver.c: don't include abcrem in the all optimization specifier
1396         since it slows down jit compilation too much for now.
1397
1398 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
1399
1400         * mini.c: use BIGMUL only if both operands have the same signage.
1401         * iltests.il: Test for bug 60056. (errors related to signage in
1402         BIGMUL).
1403
1404         r=lupus.
1405
1406 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
1407
1408         * mini.c, aot.c: memory leak fixes.
1409
1410 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
1411
1412         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
1413
1414 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
1415
1416         * Makefile.am: remove the -static hack completely, it links in
1417         statically glib as well.
1418
1419 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
1420
1421         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
1422         * exceptions.cs: make it compile with new mcs/csc.
1423
1424 2004-06-03 Massimiliano Mantione <massi@ximian.com>
1425         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
1426         and added relevant test case.
1427
1428 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
1429
1430         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
1431         regressions in gtk-sharp.
1432
1433 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
1434
1435         * exceptions.cs: New regression tests.
1436
1437         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
1438
1439 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
1440
1441         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
1442
1443 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
1444
1445         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
1446
1447         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
1448
1449 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
1450
1451         * mini.c (mono_jit_runtime_invoke): Init class in this
1452         method instead of trusting mono_jit_compile_method to
1453         do the work (because wrappers can be in object class)
1454
1455 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
1456
1457         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
1458
1459         * basic-long.cs: New regression test.
1460
1461 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
1462
1463         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
1464         and div/rem checks.
1465
1466 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
1467
1468         * Makefile.am: fix miguel's change to build mono statically against
1469         libmono (track build dependencies).
1470
1471 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
1472
1473         * cfold.c: Some glib versions do not have G_MININT32.
1474
1475 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
1476
1477         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
1478         with precision of tan, atan, sin and cos, and implemented related
1479         regressions tests (fixes bug 54467, but one new problem appeared and
1480         is not fixed yet).
1481
1482 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
1483
1484         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
1485
1486         * exceptions.cs: Add test for constant folding && division by zero.
1487
1488         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
1489         since driver.c is in libmono too, so the optimization was useless.
1490
1491         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
1492         variable to driver.c so the compiler can emit more efficient code to
1493         access them.
1494
1495 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1496
1497         * Makefile.am: don't distribute generated inssel.[ch] files.
1498
1499 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
1500
1501         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
1502         into the default appdomain. Fixes #58707.
1503
1504         * jit-icalls.c: Remove the broken approximation for truncl, doing
1505         no conversion is better.
1506
1507         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
1508         Fixes #58863.
1509
1510 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
1511
1512         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
1513         of the mcrxr instruction which is not available on some processors
1514         even if it's documented to be. Implement add and sub overflow correctly
1515         (still not complete for long unsigned). Speed up icalls a bit.
1516
1517 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
1518
1519         * mini.c (mono_jit_compile_method_with_opt): Make sure that
1520         we run .cctor in the current domain instead of target_domain.
1521         
1522         Fixes bug #58558, .cctor not being called in -O=shared.
1523
1524 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
1525
1526         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
1527
1528 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
1529
1530         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
1531         which can be done with an imm8, do it that way.
1532         (mono_arch_output_basic_block): ditto for a jmp
1533         (mono_arch_emit_prolog): Computate maximum offset of a label.
1534
1535 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
1536
1537         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
1538         now tries to allocate prefered physical reg's for virtual
1539         regs. This reduces the number of emited spills/loads with
1540         20-30% on our core assemblies.
1541
1542 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
1543
1544         * jit-icalls.c: truncl() is not needed and trunc() is
1545         the correct thing to do anyway (bug #58287).
1546
1547 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
1548
1549         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
1550         if available.
1551
1552 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
1553
1554         * driver.c: enable loop optimizations by default.
1555
1556 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
1557
1558         * mini-x86.c: fix calc of max loop size when aligning loops start.
1559
1560 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
1561
1562         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
1563         the stack.
1564
1565 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
1566
1567         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
1568         should set carry.
1569
1570         * basic-long.cs: Add tests for add/subtract of immediates with carry.
1571
1572         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
1573         
1574         * mini.c (inline_method): Allways inline some wrappers even if the cost
1575         is too large. Fixes #58785.
1576
1577         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
1578         
1579 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
1580
1581         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
1582         (crichton@gimp.org). Beginning of support for sparc/linux.
1583
1584         * mini-sparc.c: Optimize retrieval of LMF address.
1585
1586 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
1587
1588         * exceptions-ppc.c:  handle alloca in methods with clauses.
1589
1590 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
1591
1592         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
1593
1594 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
1595
1596         * mini.c: Delegate most of the abort signal work to 
1597           mono_thread_request_interruption, which also handles Stop and Suspend
1598           states.
1599
1600 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
1601
1602         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
1603         supports the save/restore lmf opcodes.
1604
1605 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
1606
1607         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
1608         by gcc-3.4 as well.
1609
1610         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
1611
1612 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
1613
1614         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
1615         methods which contain array accesses.
1616
1617         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
1618         boundaries. Fixes #58537.
1619
1620         * iltests.il: Add regression test for #58537.
1621
1622 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
1623
1624         * mini-x86.c (mono_arch_local_regalloc): Last part of
1625         fix for bug #58633 (releasing register to early).
1626
1627 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
1628
1629         * basic-long.cs: Add new regression test.
1630
1631 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
1632
1633         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
1634         register too early on the chain.
1635
1636 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
1637
1638         * mini.c (create_helper_signature): Use a helper function to reduce
1639         the code which needs to be written. Also set the calling convention of
1640         icalls on windows. Fixes #57840.
1641
1642 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
1643
1644         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
1645         exceptions-ppc.c: added helper function to get the instruction address
1646         from a signal handler context.
1647
1648 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
1649
1650         * helpers.c: use g_get_tmp_dir. Invokes happyness 
1651         from gonzalo.
1652
1653 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
1654
1655         * helpers.c: Add new env variable to pass args to objdump.
1656         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
1657
1658 2004-05-17  Radek Doulik  <rodo@ximian.com>
1659
1660         * Makefile.am (common_sources): added abcremoval.h so it get
1661         disted and daily mono packages on go-mono.com will build again
1662
1663 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
1664
1665         * abcremoval.c: Fixed coding style, added copyright header.
1666
1667         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
1668
1669         * mini.h: Added prototype for abc removal main function.
1670
1671         * build_relations_propagation_table.pl: Added copyright header.
1672
1673 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
1674
1675         * basic-long.cs: reg test for complex ceq_long bug.
1676
1677 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
1678
1679         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
1680         reg in long and clob case (bug #58343). Fixed/added comments.
1681
1682 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
1683
1684         * mini.c (mono_jit_runtime_invoke): Follow new convention
1685         of calling the invoke method with an function pointer.
1686
1687 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
1688
1689         * ChangeLog: Fix author of memory leak patch.
1690
1691 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
1692
1693         * Makefile.am: fix make dist as well...
1694
1695
1696 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
1697
1698         * cfold.c: Made so that conversions from pointer to int4 are no-ops
1699         on archs where pointers are 4 bytes long.
1700
1701         * Makefile.am: Added abcremoval.c source file.
1702
1703         * abcremoval.c: Added abcremoval.c.
1704
1705         * abcremoval.h: Added abcremoval.h.
1706
1707         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
1708
1709         * inssel.brg: Enabled bounds check removal.
1710
1711         * mini.c: Added support for abcrem optimization.
1712
1713         * mini.h: Added abcrem optimization label.
1714
1715         * driver.c: Added support for abcrem optimization.
1716
1717         * propagated_relations_table.def: Added propagated_relations_table.def.
1718
1719 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
1720
1721         * mini.c, cfold.c: fix style.
1722
1723 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
1724
1725         * mini.c: handle issue with the low-level implementation of
1726         some long opcodes (bug #54209).
1727
1728 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
1729
1730         * basic.cs: test for my new cmov stuff.
1731
1732 2004-05-13      Patrik Torstensson
1733
1734         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
1735         opt and added peephole documentation.
1736
1737 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
1738
1739         * tramp-ppc.c: rewrote the generic trampoline code.
1740
1741 2004-05-11      Patrik Torstensson
1742
1743         * mini-x86.c: optimize long shl/shr asm code (one less branch)
1744
1745 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
1746
1747         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
1748
1749         * mini.h mini.c dominators.c: Applied patch from Derek Woo
1750         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
1751
1752         * mini.c: Add new icalls for AsAny marshalling.
1753
1754 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
1755
1756         * tramp-ppc.c, mini-ppc.c: more cleanups.
1757
1758 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1759
1760         * mini.c: no warnings.
1761
1762 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
1763
1764         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
1765
1766 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
1767
1768         * mini.c: In the thread abort signal handler, if the thread is in the
1769         process of being stoped, don't throw the Abort exception, just stop the
1770         thread.
1771
1772 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
1773
1774         * tramp-ppc.c: removed old code.
1775
1776 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
1777
1778         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
1779         do some simple speed optimizations on ppc.
1780
1781 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
1782
1783         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
1784         and large offsets in load/store.
1785
1786 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
1787
1788         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
1789         it causes regressions.
1790
1791 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
1792
1793         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
1794         support.
1795
1796 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
1797
1798         * jit-icalls.c: remove warnings.
1799         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
1800         speedups for unsafe code.
1801
1802 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
1803
1804         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
1805
1806 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
1807
1808         * basic-calls.cs: Add new regression test.
1809
1810         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
1811         more portable.
1812
1813         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
1814
1815         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
1816         is no longer used.
1817
1818 2004-05-06      Patrik Torstensson
1819
1820         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
1821         long reg allocation in any reg (not only eax:edx) and implemented 
1822         long shl/shr ops in asm instead of helpers.
1823
1824 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
1825
1826         * mini-sparc.h: Fix warnings.
1827
1828         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
1829         stack.
1830
1831         * mini-exceptions.c (mono_handle_exception): Call the filter in a
1832         separate statement for clarity.
1833
1834         * mini-sparc.c: Update status.
1835
1836 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
1837
1838         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
1839         here.
1840
1841 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
1842
1843         * inssel-ppc.brg: another small pre-release workaround:
1844         we don't do overflow detection for long_sub_un.
1845
1846 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
1847
1848         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
1849         (also works around a weird ppc bug: 57957).
1850
1851 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
1852
1853         * tramp-ppc.c: trampoline fixes.
1854
1855 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
1856
1857         * mini-ppc.c: fixed typos.
1858
1859 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
1860
1861         * mini-ppc.c, exceptions-ppc.c: more code saves registers
1862         at the top of the stack. Fixed typos. Use a frame registers
1863         for all the methods with exception clauses.
1864
1865 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
1866
1867         * exceptions-ppc.c: restore fp registers.
1868
1869 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
1870
1871         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
1872         order from the stack top (moved the stack room to save the
1873         return value for trace after the param area). Fixed corruption
1874         in restoring registers on unwind.
1875
1876 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
1877
1878         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
1879
1880 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
1881
1882         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
1883         and prolog/epilog for methods that use it. Allow
1884         enough param area room for varargs methods. Fix miguel's
1885         breakage in exception handling.
1886
1887 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
1888
1889         * Makefile.am: run genmdesc only on current arch.
1890
1891 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1892
1893         * exceptions-x86.c:
1894         * mini-x86.h: fix the build on windows.
1895
1896 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
1897
1898         * 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.
1899
1900         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
1901
1902         * mini-exceptions.c: New file.
1903         
1904         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
1905         Move some parts of the x86 exception handling code to an 
1906         arch-independent file so it can be shared with other ports.
1907
1908 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
1909
1910         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
1911
1912 2004-04-26  David Waite  <mass@akuma.org>
1913
1914         * driver.c: remove comma from end of enumeration declaration
1915
1916 2004-04-26  Jackson Harper  <jackson@ximian.com>
1917
1918         * driver.c: parse config file before loading first assembly. This
1919         allows the user gac to be enabled/disabled. 
1920         
1921 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
1922
1923         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
1924         simpler mechanism: we do not care what is encoded initially
1925         (branch absolute or relative), we care about the code and its
1926         target.  I kept the old code for reference for now.
1927
1928         The new code tries first to determine if the jump is anywhere in
1929         the -/+32 absolute meg range, if it succeeds, it encodes using the
1930         absolute branch;  If not, it tried to find something in the
1931         relative range, if not, it uses the handle_thunk code. 
1932
1933 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
1934
1935         * exceptions-ppc.c: use the correct ip register on macosx.
1936
1937 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
1938
1939         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
1940
1941 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
1942
1943         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
1944         Raise exception on integer divide by zero by hand since the hw
1945         doesn't support it. Handle NaNs in FP compares.
1946
1947 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
1948
1949         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
1950         code reducing duplication between the platforms and enabled
1951         signal exception handling (on linux for now).
1952
1953 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
1954
1955         * exceptions-ppc.c: more macosx support.
1956
1957 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
1958
1959         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
1960
1961 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
1962
1963         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
1964
1965 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
1966
1967         * iltests.il: more tests.
1968
1969 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
1970
1971         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
1972         vars as well.
1973
1974 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
1975
1976         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
1977
1978 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
1979
1980         * liveness.c: Mark variables as volatile in all basic blocks reachable
1981         from exception clauses.
1982
1983 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
1984
1985         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
1986         inlining.
1987
1988 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
1989
1990         * iltests.il, basic.cs: more tests for regalloc.
1991
1992 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
1993
1994         * iltests.il: Some tests for register allocation modifications
1995         I have locally.
1996
1997 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
1998
1999         * exceptions.cs: Add regression test for bug #56782.
2000
2001         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
2002         original stack trace if an exception is rethrown. Fixes #56782. Oh,
2003         the beauty of fixing the same thing in 5 different files...
2004
2005 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
2006
2007         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
2008         methods.
2009
2010 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
2011
2012         * mini.c: Add support for STRWLPARRAY marshalling convention.
2013
2014 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
2015
2016         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
2017         to init the context to setup the regs pointer).
2018
2019 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
2020
2021         * exceptions-ppc.c: more exceptions work.
2022
2023 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
2024
2025         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
2026         not allowed.
2027
2028 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
2029
2030         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
2031         can use the memory directly.
2032
2033         * cpu-pentium.md: Update documentation from a post from Zoltan. 
2034
2035         add x86_add_membase, x86_sub_membase, x86_mul_membase
2036
2037 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
2038
2039         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
2040         GENERAL_REGS they were also hardcoded for all PPC ports.
2041
2042         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
2043
2044         Remove hard-coded limit for floating point registers, use
2045         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
2046
2047         Notice that in MacOS X calling conventions you can fit a lot more
2048         floating point values in registers, so I should update the PInvoke
2049         test to excercise the passing of floating point values on the
2050         stack (currently broken).
2051         
2052 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
2053
2054         * tramp-ppc.c (create_trampoline_code): Added
2055         JUMP_TRAMPOLINE_SIZE. 
2056         (ppc_magic_trampoline): Follow the pattern from
2057         x86_magic_trampoline: if code is set to zero, return. 
2058         (create_trampoline_code): Always pass MonoMethod to the jump
2059         trampoline, before it was passing a null.
2060         (mono_arch_create_jump_trampoline): Implement the jump stub, could
2061         share the code with mono_arch_create_jit_trampoline. 
2062
2063         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
2064         implemented.
2065         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
2066         implemented.  
2067
2068         * cpu-g4.md: Added length for jmp instruction, the worst case
2069         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
2070         for save_lmf).
2071
2072 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
2073
2074         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
2075
2076 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
2077
2078         * mini.c: Only set bblock->real_offset when adding a new bblock, and
2079         before each IL instruction.
2080
2081         * mini.c (CEE_BOX): Fix warnings.
2082
2083 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2084
2085         * mini.c: removed a few unused vars and extra whitespace.
2086
2087 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
2088
2089         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
2090         checks.
2091         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
2092         index.
2093         (OP_GETCHR): use the above
2094         (CEE_LDELEMA): use the above.
2095
2096         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
2097         version of the generic impl.
2098         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
2099         (CEE_LDELEMA): use the above.
2100
2101 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
2102
2103         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
2104         Fixes #56317.
2105
2106         * iltests.il: Added new regression test for #56317.
2107
2108 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
2109
2110         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
2111         under NetBSD. Fixes #56450.
2112
2113         * liveness.c (update_gen_kill_set): Fix previous patch.
2114
2115 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2116
2117         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
2118
2119 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
2120
2121         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
2122         ldsfld and ldsflda.
2123
2124         * inssel-sparc.brg: Add more optimizations.
2125
2126         * mini-sparc.c: Replace multiply/divide with shifts if possible.
2127
2128 2004-04-01  Martin Baulig  <martin@ximian.com>
2129
2130         * mini.c (handle_box): New static function; moved the
2131         implementation of CEE_BOX here.
2132         (mono_method_to_ir): Added `constrained_call' variable.
2133         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
2134         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
2135         mono_method_get_constrained() to get the method.
2136
2137 2004-04-01  Martin Baulig  <martin@ximian.com>
2138
2139         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
2140         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
2141         (mono_method_to_ir): We don't need these macros anymore since
2142         mono_class_get_full() already takes care of it. 
2143
2144 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2145
2146         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
2147         use @function (as doesn't accept #function here) and check the return
2148         value of system and stop if fails.
2149
2150 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2151
2152         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
2153
2154 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
2155
2156         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
2157
2158         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
2159
2160         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
2161         #56223.
2162
2163         * basic-long.cs: Add test for negation of Int64.MinValue.
2164
2165 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
2166
2167         * mini-sparc.c: Update status.
2168
2169         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
2170
2171         * exceptions-sparc.c: Fix return value in filters.
2172
2173         * inssel-sparc.brg: Fix register allocation in some rules.
2174
2175 2004-03-28  Martin Baulig  <martin@ximian.com>
2176
2177         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
2178         if neccessary.  
2179
2180 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
2181
2182         * mini-x86.c (mono_arch_patch_code): Fix warnings.
2183         
2184         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
2185         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
2186         remove unused conv_u4 opcode.
2187
2188         * mini-x86.c: Remove valgrind workaround since it slows down things
2189         even when mono is not run under valgrind.
2190
2191 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
2192
2193         * mini-sparc.c: Update status.
2194
2195         * inssel-sparc.brg: Add some optimizations.
2196
2197         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
2198         future delay slot filling. Add support for varargs, tail calls and JMP.
2199
2200         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
2201         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
2202
2203         * inssel.brg: Fix register allocation in OP_ARGLIST.
2204
2205         * inssel.brg: Fix warnings.
2206
2207 2004-03-25  Martin Baulig  <martin@ximian.com>
2208
2209         * mini.c (inflate_generic_field): Removed.
2210         (mini_get_method): Removed, use mono_get_method_full(),
2211         (mini_get_class): Removed, use mono_class_get_full().
2212         (mono_method_to_ir): Pass our generic context to
2213         mono_field_from_token().        
2214
2215 2004-03-25  Martin Baulig  <martin@ximian.com>
2216
2217         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
2218         of a `MonoMethod *'.
2219         (mini_get_method): Take a `MonoGenericContext *' instead
2220         of a `MonoMethod *'.
2221         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
2222         a new local variable called `generic_context' which holds the
2223         current `MonoGenericContext *'; use it to lookup things.
2224
2225 2004-03-24  Martin Baulig  <martin@ximian.com>
2226
2227         * mini.c (mini_get_class): New static method; if we're inside a
2228         generic instance, inflate the class if neccessary.
2229         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
2230
2231 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
2232
2233         * iltests.il: New regression test for #55976.
2234
2235         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
2236         #55976.
2237
2238 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
2239
2240         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
2241         output.
2242
2243 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
2244
2245         * liveness.c: Consider SSA stores as well as loads when making vars
2246         volatile.
2247
2248         * exceptions.cs: New regression tests for register allocation.
2249         
2250 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
2251
2252         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
2253         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
2254           domain lock only to protect puntual access to data structures.
2255           Added access lock for sighash, jit_icall_hash_name, 
2256           jit_icall_hash_addr and domain->code_mp.
2257
2258 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
2259
2260         * driver.c: Print SIGSEGV handling method.
2261
2262         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
2263
2264         * mini.c (setup_jit_tls_data): Handle case when this is called
2265         multiple times for a thread.
2266
2267         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
2268         is different from fbxx_un. Fixes #54303. Also use constants instead of
2269         magic numbers in a lot of places.
2270
2271 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
2272
2273         * exceptions.cs: Fix cctor test when --regression is used.
2274
2275 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
2276
2277         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
2278         for Linux/ppc.
2279
2280 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
2281
2282         * inssel-ppc.brg: fixed register assignments for some rules.
2283
2284 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
2285
2286         * exceptions.cs: Add test for exceptions in static constructors.
2287
2288         * mini.c (mono_jit_compile_method_with_out): Move the calling of
2289         static constructors outside the domain lock. Fixes #55720.
2290
2291 2004-03-17  Martin Baulig  <martin@ximian.com>
2292
2293         * mini.c (get_generic_field_inst): Removed, this'll never happen.
2294         (inflate_generic_field): Take the `MonoMethod *' instead of the
2295         `MonoClass *' and added support for generic method.
2296         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
2297         have a `field->parent->gen_params', only inflate the field if it's
2298         an open constructed type.
2299
2300 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
2301
2302         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
2303         exception object instead of the preconstructed ones.
2304
2305 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2306
2307         * mini.c: reverted changed to sigsegv_signal_handler commited
2308         accidentally in the previous patch.
2309
2310 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2311
2312         * mini.c:
2313         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
2314         running --aot with an old assembly.
2315
2316 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
2317
2318         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
2319         point values.
2320
2321         * mini-sparc.c: Add support for v9 branches with prediction.
2322
2323 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
2324
2325         * mini.c (mini_init): #warning is GNUC only
2326
2327         * mini-sparc.h: implement __builtin_frame_address
2328         and __builtin_return_address for Sun C compiler
2329
2330 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
2331
2332         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
2333
2334 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
2335
2336         * basic-calls.cs: Add test for unaligned byref long argument passing.
2337
2338         * mini-ops.h: Add sparcv9 compare and branch instructions.
2339
2340         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
2341         v9 instructions if we have a v9 cpu.
2342
2343         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
2344         registers for global allocation.
2345
2346         * exceptions-sparc.c: Fixes.
2347         
2348 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
2349
2350         * liveness.c (mono_analyze_liveness): Optimized version.
2351
2352         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
2353
2354         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
2355         sparc work.
2356
2357         * basic-float.cs basic-calls.cs: New regression tests.
2358
2359 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
2360
2361         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
2362         sigaltstack implementation.
2363
2364         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
2365         
2366         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
2367         stuff if SIGSEGV_ON_ALTSTACK is not defined.
2368
2369 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
2370
2371         * mini.c: Fix warnings.
2372         
2373         * mini.c (mono_resolve_patch_target): New function which contains the
2374         arch independent part of the patching process.
2375
2376         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
2377         patching code to a separate function.
2378
2379 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
2380
2381         * mini.c (add_signal_handler): ifdef out on Windows
2382
2383 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
2384
2385         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
2386         cpu-sparc.md: Add exception handling support + other fixes.
2387
2388         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
2389         typed GC detection in --version.
2390
2391         * basic.cs exceptions.cs: New regression tests.
2392
2393         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
2394         the arch specific code can store data during a compilation.
2395
2396         * mini-ops.h: Add OP_SETFRET.
2397
2398         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
2399         function, register a separate icall for each arity, so the icalls can
2400         get a wrapper.
2401         
2402         * mini.c (mono_print_tree): Print negative offsets in a more readable
2403         form.
2404         
2405         * mini.c: Make signal handling work on sparc.
2406         
2407         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
2408
2409         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
2410
2411         * jit-icalls.c: Emulate truncl by aintl on solaris.
2412
2413         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
2414
2415 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
2416
2417         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
2418
2419 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
2420
2421         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
2422         a MarshalByRef type, inline a method that performs the check, taking into
2423         account that the object can be a proxy. Also implemented tow new opcodes:
2424         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
2425         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
2426         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
2427
2428 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
2429
2430         * mini-ppc.c: if a relative branch displacement is too big
2431         but it points to and area reachable with an absolute branch, 
2432         avoid the thunks.
2433
2434 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
2435
2436         * mini.c: optimize small copies in cpblk.
2437
2438 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
2439
2440         * basic-calls.cs basic-float.cs: New regression tests.
2441
2442         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
2443         negative offsets from %fp. Implement localloc. Fix local register 
2444         allocation. Fix the case when the this argument needs to be saved to
2445         the stack. Implement some missing opcodes.
2446
2447 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
2448
2449         * mini.c (mini_method_compile): Reenable global regalloc in methods
2450         with exception handlers.
2451
2452         * linear-scan.c (mono_varlist_sort): Fix warning.
2453
2454         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
2455
2456         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
2457         regalloc costs.
2458
2459         * liveness.c: Make all variables uses in exception clauses volatile, to
2460         prevent them from being allocated to registers. Fixes #42136.
2461
2462 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
2463
2464         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
2465         causes regressions.
2466
2467         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
2468         argument to mono_arch_regalloc_cost.
2469
2470         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
2471         precisely.
2472
2473 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
2474
2475         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
2476         Make the cost of allocating a variable to a register arch dependent.
2477
2478         * basic-calls.cs: Fix compilation of tests.
2479         
2480         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
2481         helper function to cut back on the number of #ifdefs needed.
2482
2483         * mini-ppc.c: Fix compilation.
2484
2485         * basic-calls.cs: New regression tests.
2486
2487         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
2488
2489         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
2490         of l0 since that is callee saved.
2491
2492         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
2493         to virtual calls.
2494
2495         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
2496         of delay instruction.
2497
2498         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
2499
2500         * mini.h (MonoCallInst): Add 'virtual' flag.
2501
2502         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
2503
2504 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
2505
2506         * *.cs: New regression tests.
2507
2508         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
2509         work.
2510
2511         * mini.c (mono_runtime_install_handlers): Fix build.
2512
2513         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
2514         'signal_stack_size' members.
2515
2516         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
2517         alternate signal stack.
2518
2519         * exceptions-x86.c: Add stack overflow handling.
2520
2521         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
2522         functions to arch independent code.
2523
2524         * mini.c (mono_print_tree): Print more detailed info for load_membase
2525         opcodes.
2526         
2527 2004-02-23  Martin Baulig  <martin@ximian.com>
2528
2529         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
2530
2531 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
2532
2533         * mini-x86.c: fixed reg allocation for div/rem.
2534
2535 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
2536
2537         * driver.c (mono_main): Report some configuratio options on --version.
2538
2539 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
2540
2541         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
2542         low in the address space. Correctly flush memory in thunks where we
2543         output native code.
2544
2545 2004-02-20  Martin Baulig  <martin@ximian.com>
2546
2547         * mini.c (mini_get_method): New static method; inflate all generic
2548         methods and methods in open generic instances.
2549         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
2550         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
2551
2552 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
2553
2554         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
2555
2556         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
2557
2558 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
2559
2560         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
2561
2562         * mini-sparc.c (flushi mono_arch_output_basic_block): make
2563         it compile using Sun's compiler.
2564
2565 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
2566
2567         * 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.
2568
2569         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
2570
2571 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
2572
2573         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
2574         code.
2575         * mini-ppc.c: handle calls outside of the allowed range with thunks
2576         allocated using the code manager.
2577         * tramp-ppc.c: use the code manager to hold generated native code.
2578         Fixed the magic trampoline to just patch vtable entries.
2579
2580 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
2581
2582         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
2583         independent file.
2584
2585 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
2586
2587         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
2588         PPC.
2589
2590         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
2591         if we have a working __thread implementation.
2592
2593         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
2594         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
2595
2596 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
2597
2598         * mini-x86.c: Fix compilation under gcc 2.
2599         
2600 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
2601
2602         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
2603         contains a call to the wrapped function.
2604
2605         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
2606         OP_<CALL>_IMM opcodes, and use them under X86.
2607         
2608         * mini.c (mono_jit_find_compiled_method): Fix warning.
2609
2610         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
2611
2612         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
2613
2614         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
2615         functionality to mini.c.
2616
2617         * mini.c (mono_create_jump_trampoline): New function to create a jump
2618         trampoline. Return a compiled method instead of a trampoline if it
2619         exists. Add a cache for jump trampolines.
2620
2621         * mini.c (mono_jit_find_compiled_method): New function to return a
2622         compiled method if it exists.
2623
2624         * mini-x86.c: Call mono_create_jump_trampoline instead of 
2625         mono_arch_create_jit_trampoline.
2626
2627         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
2628         a jump trampoline. Fixes #52092.
2629         
2630 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
2631
2632         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
2633         which is not up-to-date. Add check_corlib_version () instead.
2634
2635         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
2636         have to call it.
2637         
2638         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
2639         since newer valgrind versions do not need it.
2640
2641         * mini.c (mono_jit_compile_method_with_opt): New helper function to
2642         compile a method with a given set of optimizations.
2643
2644         * mini.c: Compile icall wrappers on-demand instead of at startup.
2645
2646         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
2647         wrapper for an icall.
2648
2649 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
2650
2651         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
2652         #54063.
2653
2654         * iltests.il: Add test for non-empty stack before switch instruction.
2655
2656 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
2657
2658         * mini.c: Add support for new stringbuilder marshalling conventions.
2659
2660         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
2661
2662 2004-02-01  Martin Baulig  <martin@ximian.com>
2663
2664         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
2665         in `ginst->mtype_argv'.
2666
2667 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
2668
2669         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
2670         facilitate grepping.
2671
2672 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
2673
2674         * mini.c: fixed buglet in initobj generic implementation for references.
2675
2676 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
2677
2678         * Makefile.am: make the version script conditional.
2679         * jit-icalls.c: handle missing truncl().
2680
2681 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
2682
2683         * exceptions.cs: Add more tests for double->int conversion.
2684
2685         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
2686         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
2687
2688 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
2689
2690         * driver.c: make --verbose --version emit an error
2691         if the loaded corlib doesn't match the runtime version.
2692
2693 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
2694
2695         * mini-ppc.h: export ppc_patch().
2696         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
2697         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
2698         on par or better than on MacOSX.
2699
2700 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
2701
2702         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
2703         mono_lookup_pinvoke_call.
2704
2705         * mini-x86.c: Under windows, the default pinvoke calling convention is
2706         stdcall. Fixes #52834.
2707
2708         * mini.c (optimize_branches): Add an upper bound to the number of
2709         iterations to prevent infinite loops on strange loops. Fixes #53003.
2710
2711 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
2712
2713         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
2714         and ISINST. Fixes #52093.
2715
2716         * objects.cs (test_0_vector_array_cast): New tests.
2717         
2718 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
2719
2720         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
2721         checking in Array.Set ().
2722
2723         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
2724         #52590.
2725
2726         * object.cs (test_0_multi_array_cast): New regression test.
2727
2728 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
2729
2730         * exceptions-ppc.c: fix build on Linux/PPC.
2731
2732 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
2733
2734         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
2735         running under valgrind.
2736         (x86_magic_trampoline): Fix build bustage.
2737
2738         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
2739         negative values as well. This is needed for the encoding of the line number
2740         info, since sometimes the line numbers are not in increasing order.
2741
2742 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
2743
2744         * cpu-pentium.md (localloc): Increase the size of the localloc 
2745         instruction since it is a loop under Win32.
2746
2747         * debug-mini.c (record_line_number): Get rid of unneccesary memory
2748         allocation.
2749
2750 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
2751
2752         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
2753         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
2754         Max Horn (max@quendi.de). Fix file names in comments.
2755
2756 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
2757
2758         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
2759         avoid stack overflow.
2760         (replace_usage): Avoid uninitialized variable warnings.
2761
2762         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
2763         and taking the address of valuetype variables.
2764
2765 2004-01-03  Patrik Torstensson
2766
2767         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
2768         for other purposes than FP later on.
2769
2770 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
2771
2772         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
2773         of tail calls.
2774
2775 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
2776
2777         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
2778
2779 2003-12-30  Patrik Torstensson <p@rxc.se>
2780
2781         * mini-x86.h: Decreased number of availiable fp regs.
2782         Solves corner cases with FP spilling.
2783
2784 2003-12-23  Patrik Torstensson <p@rxc.se>
2785
2786         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
2787         for floating point stack tracking / spilling on x86. 
2788         Fixes bug #49012.
2789         
2790         * basic-float.cs: added float mul overflow test.
2791
2792 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
2793
2794         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
2795
2796 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
2797
2798         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
2799         supports for cond branches that overflow the immediate
2800         overflow offset. mcs can compile simple programs.
2801
2802 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
2803
2804         * exceptions-ppc.c: exception handling support wip:
2805         finally handlers get run on exception.
2806
2807 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
2808
2809         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
2810         profiling.
2811
2812 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
2813
2814         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
2815         initial support for stack walking and unwinding.
2816
2817 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
2818
2819         * driver.c (mono_main): Make corlib-out-of-sync message more 
2820         descriptive. Also remove verify_corlib call.
2821
2822 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
2823
2824         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
2825         not overlap with other call's arguments, too.
2826
2827 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
2828
2829         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
2830         move to arch-specific code the choice of arch-specific
2831         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
2832         * mini.c: ensure emulation calls will not interleave
2833         with other calls.
2834
2835 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
2836
2837         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
2838         the magic trampoline stack frame is dropped before executing
2839         the new method.
2840
2841 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
2842
2843         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
2844         and integer to fp conversions. Added support for overflowing
2845         arguments on the stack. Reserve a couple more registers as temps.
2846         Added support for aot compilation (as output still needs to be
2847         tweaked, though).
2848
2849 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
2850
2851         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
2852         Don't overwrite return register in some corner cases.
2853
2854 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
2855
2856         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
2857         static constructors when AOT compiling.
2858
2859         * driver.c (mono_main): Call mono_check_corlib_version.
2860
2861 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
2862
2863         * cpu-g4.md, basic.cs: fixed div target register.
2864
2865 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
2866
2867         * mini-ppc.c, basic.cs: shl_imm fix with test.
2868
2869 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
2870
2871         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
2872         structures by value. Misc fixes.
2873         * objects.cs: more tests.
2874
2875 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
2876
2877         * mini-ppc.c: lconv.ovf.i implemented.
2878
2879 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2880
2881         * mini.c:
2882         (mini_init): don't error out if someone already called g_thread_init.
2883
2884 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
2885
2886         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
2887         to be any type per the spec. Fix abnormal memory usage when
2888         the same object is repeatedly thrown.
2889
2890 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
2891
2892         * mini.c: check for overruns in IL code.
2893
2894 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
2895
2896         * TODO: Add/remove some todo entries.
2897
2898 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
2899
2900         * driver.c (mono_main): Call mono_verify_corlib.
2901
2902 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
2903
2904         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
2905         This has been moved to mini.c
2906         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
2907         type being casted is marshalbyref it could be a proxy, so instead of
2908         emitting the type check code, emit a call to a runtime method that will
2909         perform the check by calling CanCastTo if needed.
2910
2911 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
2912
2913         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
2914         methods with large stack frames under Win32.
2915
2916 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
2917
2918         * Makefile.am: Distribute regression tests.
2919
2920         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
2921         at the end instead of inserting each variable into the sorted list.
2922
2923         * linear-scan.c (mono_varlist_sort): New helper function.
2924         
2925 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
2926
2927         * mini.c: ensure arguments and locals are within bounds.
2928
2929 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
2930
2931         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
2932         related fixes.
2933
2934 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
2935
2936         * mini.c (mono_cprop_copy_values): Fix crash.
2937
2938         * aot.c: Set verbosity back to 0.
2939         
2940 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
2941
2942         * regalloc.c: complete memory leak fix by Laurent Morichetti
2943         (l_m@pacbell.net).
2944
2945 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
2946
2947         * driver.c (main_thread_handler): Revert the previous patch.
2948
2949         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
2950         under valgrind.
2951
2952         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
2953         memory from the memory pool.
2954
2955         * driver.c (main_thread_handler): Turn on all optimizations when
2956         --aot is used.
2957
2958         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
2959         an array for better performance.
2960
2961         * regalloc.c (mono_regstate_assign): Fix memory leak.
2962
2963         * debug-mini.c (mono_debug_serialize_debug_info): New function to
2964         serialize the debug info.
2965
2966         * debug-mini.c (mono_debug_add_aot_method): New function to load the
2967         debug info from the serialized representation.
2968
2969         * aot.c: Save debug info into the generated file and load it when 
2970         loading a method.
2971
2972         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
2973
2974 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
2975
2976         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
2977         More FP-related fixes.
2978
2979 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
2980
2981         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
2982         and register allocation buglet. Hello world now runs.
2983
2984 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
2985
2986         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
2987         * tramp-ppc.c: fixed class init trampoline.
2988         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
2989
2990 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
2991
2992         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
2993         mini.c: more ppc changes/fixes.
2994
2995 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
2996
2997         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
2998         Also optimize the case when the arguments are the same in the caller 
2999         and in the callee.
3000
3001         * iltests.il: Add tests for tail calls with valuetype arguments.
3002
3003 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
3004
3005         * mini-ppc.c: fixes for struct return type.
3006
3007 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
3008
3009         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
3010         mono_spillvar_offset() to arch-specific code.
3011
3012 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
3013
3014         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
3015
3016 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
3017
3018         * exceptions-x86.c: Fix stack space leaks.
3019         
3020         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
3021         registers from the lmf if the method has save_lmf set.
3022
3023 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
3024
3025         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
3026         of icall wrappers into InvokeInDomain, since these are now per-domain.
3027
3028 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
3029
3030         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
3031         make some opcode emulation and intrinsic ops enabled/disabled 
3032         according to the architecture. More fixes.
3033
3034 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
3035
3036         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
3037
3038 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
3039
3040         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
3041         arch-specific handling for 'this' and struct return type to
3042         arch-specific code.
3043
3044 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3045
3046         * aot.c: prevent divide by zero error when reporting (it happened with
3047         Accessibility.dll).
3048
3049 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
3050
3051         * mini.h (inst_switch): Remove unused macro.
3052
3053 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3054
3055         * aot.c:
3056         (load_aot_module): free 'info->methods' and 'info' properly. No more
3057         "free(): invalid pointer blah" messages when you have an old aot
3058         compiled assembly.
3059
3060 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
3061
3062         * jit-icalls.c, mini.c: Added support for context static fields.
3063
3064 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
3065
3066         * mini.c (mono_method_blittable): Methods which set LastError are not 
3067         blittable either. Fixes #51108.
3068         
3069 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
3070
3071         * mini.c: flush icache.
3072         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
3073
3074 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
3075
3076         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
3077
3078 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
3079
3080         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
3081         safe on IA32.
3082
3083         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
3084         vararg calls.
3085
3086         * inssel.brg (CEE_MKREFANY): Fix AOT case.
3087
3088 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
3089
3090         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
3091         instruction when the result is discarded.
3092
3093         * iltests.il (test_0_div_regalloc): New regression test.
3094
3095         * arrays.cs: Fix compilation error.
3096
3097 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
3098
3099         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
3100         float rules to inssel-x86.brg: sane architectures with FP registers
3101         don't need to implement these rules.
3102
3103 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
3104
3105         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
3106
3107 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
3108
3109         * mini.h, inssel-long32.brg: fixed endianess issues in int64
3110         implementation of 32 bit systems.
3111
3112 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
3113
3114         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
3115         (Jeroen Zwartepoorte).
3116
3117 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
3118
3119         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
3120         the caller and the callee matches.
3121         
3122         * mini.c (mono_method_to_ir): Add comment.
3123
3124         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
3125         signbit is missing on some platforms.
3126
3127 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
3128
3129         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
3130
3131         * mini.c (setup_jit_tls_data): Call the new function.
3132         
3133         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
3134
3135         * mini-x86.c: Add experimental support for fast access to the lmf
3136         structure under NPTL/Linux 2.6.x.
3137
3138 2003-11-06  Martin Baulig  <martin@ximian.com>
3139
3140         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
3141         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
3142         the debugger.
3143
3144 2003-11-02  Martin Baulig  <martin@ximian.com>
3145
3146         * mini.c (inflate_generic_field): New static method.
3147         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
3148         generic instance and the field is declared in a generic type, call
3149         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
3150
3151 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
3152
3153         * mini.h mini.c (mono_method_same_domain): New function to return
3154         whenever the caller and the callee are in the same domain.
3155
3156         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
3157
3158 2003-10-30  Martin Baulig  <martin@ximian.com>
3159
3160         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
3161         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
3162         method parameters.
3163         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
3164         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
3165
3166 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
3167
3168         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
3169         propagation.
3170
3171         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
3172         object here, so it is in the correct appdomain etc.
3173
3174 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
3175
3176         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
3177         already done.
3178         (mono_method_to_ir): Avoid freeing the type created returned from
3179         mono_type_create_from_typespec, since it is put into an internal cache
3180         by the function. Fixes pointer.exe.
3181
3182         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
3183         trampolines for icalls and pinvokes as well. Fixes #33569.
3184
3185 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
3186
3187         * mini.c: Update after appdomain changes.
3188
3189         * mini.c (mono_jit_compile_method_inner): Allways compile native
3190         method wrappers in the root domain, since there can only be one
3191         instance of them, whose address is stored in method->info.
3192
3193 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
3194
3195         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
3196         environment variable. Instead detect automatically whenever running
3197         under valgrind using the magic macro RUNNING_ON_VALGRIND from
3198         valgrind.h.
3199
3200 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
3201
3202         * trace.c, trace.h: New files that implement the new trace option
3203         parsing. 
3204
3205         * driver.c: Document new --trace options.
3206
3207         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
3208         mini-x86.c: Apply:
3209
3210         -       if (mono_jit_trace_calls)
3211         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
3212
3213         * mini.h: prototypes.
3214         
3215 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
3216
3217         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
3218
3219         * mini.c inssel.brg: Implement typedefbyref opcodes.
3220
3221         * mini.c (mono_jit_compile_method): Remove unused local variable.
3222
3223         * mini.c (mono_jit_compile_method_inner): Ditto.
3224         
3225 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
3226
3227         * tramp-x86.c (x86_class_init_trampoline): Fix build.
3228         
3229         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
3230
3231 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
3232
3233         * mini.c (mono_no_aot): Remove unused global variable.
3234
3235         * mini.c: Thread safety fixes.
3236
3237 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
3238
3239         * mini.c (mono_create_class_init_trampoline): Add a lock around
3240         class_init_hash_addr.
3241
3242         * arrays.cs (test_0_newarr_emulation): Add new regression test for
3243         #30073.
3244
3245         * mini.c: Decompose the NEWARR instruction before decomposing its
3246         arguments. Fixes #30073.
3247
3248 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
3249
3250         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
3251         convention.
3252
3253 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
3254
3255         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
3256
3257         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
3258
3259         * driver.c: Add support for compiling icall wrappers to --compile.
3260
3261 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
3262
3263         * inssel.brg: The empty value in class->interface_offsets is -1, not
3264         0. Fixes #49287.
3265
3266 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
3267
3268         * objects.cs: New test for 'is' operator on an array of interfaces.
3269
3270 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
3271
3272         * tramp-ppc.c: update trampoline code to support jumps
3273         and class initialization.
3274
3275 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
3276
3277         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
3278
3279         * inssel.brg (OP_UNBOXCAST): Fix #46027.
3280
3281         * inssel.brg (OP_UNBOX): Remove unused rule.
3282
3283         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
3284         region instead of one for each method. Fixes #47813.
3285
3286 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
3287
3288         * exceptions.cs (test_0_nested_finally): New regression test for
3289         nested exception handlers.
3290
3291         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
3292
3293         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
3294
3295         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
3296         inlining.
3297
3298         * mini.c (mono_method_check_inlining): Make the inlining limit 
3299         configurable by an environment variable.
3300         
3301         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
3302
3303         * mini.h: Bump AOT file version.
3304
3305         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
3306         token, store the image along with the token, since the token might not 
3307         refer to the same image as the method containing the relocation, 
3308         because of inlining.
3309
3310 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
3311
3312         * mini.c (mono_precompile_assemblies): New function to compile
3313         all methods in all loaded assemblies.
3314
3315         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
3316
3317         * regalloc.h regalloc.c (MonoRegState): Change the type of 
3318         iassign and fassign to int*, since they can contain large negative
3319         values if the register is spilled. Also added some comments. Fixes
3320         #45817.
3321
3322         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
3323         under Win32. Fixes #42964.
3324
3325 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
3326
3327         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
3328
3329         * aot.c: Added support for AOT compiling methods which contain calls
3330         to wrappers. Currently, only remoting-invoke-with-check wrappers are
3331         handled.
3332         
3333         * driver.c (compile_all_methods): Run the compilation in a thread
3334         managed by mono. Fixes #44023.
3335
3336         * mini.c (mono_codegen): Print full method name in verbose output.
3337
3338         * mini-x86.c (mono_arch_patch_code): Fix warning.
3339         
3340         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
3341         jumps, since the method we are jumping to might be domain-specific.
3342
3343         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
3344
3345 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
3346
3347         * inssel.brg: string chars are unsigned.
3348
3349 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
3350
3351         * TODO: New todo item.
3352
3353         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
3354         which calls mono_runtime_class_init and patches the call site to
3355         avoid further calls.
3356         (mono_arch_create_class_init_trampoline): New arch specific function 
3357         to create a class init trampoline.
3358         (create_trampoline_code): Generalized so it can create
3359         class init trampolines as well.
3360
3361         * mini.c (helper_sig_class_init_trampoline): New helper variable.
3362         (mono_create_class_init_trampoline): New function to create and cache
3363         class init trampolines.
3364         (mono_find_class_init_trampoline_by_addr): New function to lookup the
3365         vtable given the address of a class init trampoline. Used by the
3366         patching process.
3367         (mono_codegen): Generate a call to a trampoline instead of
3368         mono_runtime_class_init in LDSFLD[A].
3369         (mono_codegen): Add relocations for the new trampoline.
3370         
3371         * mini.h mini-x86.c aot.c: Added a new relocation type: 
3372         MONO_PATCH_INFO_CLASS_INIT.
3373
3374         * mini.h: Bump AOT version number.
3375
3376         * aot.c: Create a copy of the loaded code instead of using the original
3377         so methods which call each other will be close in memory, improving
3378         cache behaviour.
3379         
3380         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
3381         patch since it breaks the regression tests.
3382         
3383         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
3384         for the register saving instruction sequence since the 
3385         frame_state_for function in glibc 2.3.2 don't seem to detect it.
3386
3387 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
3388
3389         * TODO: Fix todo item && remove another.
3390
3391 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
3392
3393         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
3394         previous checkin.
3395
3396         * aot.c: Moved the check for MONO_LASTAOT into the initialization
3397         function of the module.
3398
3399         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
3400         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
3401         --no-aot command line option.
3402
3403 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
3404
3405         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
3406         by Bernie Solomon (bernard@ugsolutions.com).
3407
3408         * inssel.brg: Refactor the interface offset table related code into
3409         its separate functions and add support for the AOT case.
3410
3411 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
3412
3413         * aot.c (mono_aot_get_method_inner): Fix memory leak.
3414         
3415         * aot.c: Added mono_aot_verbose variable and made all debugging
3416         output depend on the value of this variable.
3417
3418         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
3419         method_label and info_label.
3420
3421         * mini.h mini-x86.c aot.c: Added a new relocation type 
3422         MONO_PATCH_INFO_IID for klass->interface_id.
3423
3424         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
3425         the MonoJitInfo structure.
3426
3427         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
3428         a non-root appdomain in shared mode.
3429
3430 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
3431
3432         * aot.c: make aot loader less verbose. Remove free of unused variable.
3433
3434 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
3435
3436         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
3437
3438         * .cvsignore: Added *.dll.
3439
3440         * mini.c (mono_print_tree_nl): New function callable while debugging.
3441
3442         * mini.c (mono_print_code): Export this.
3443
3444         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
3445         patched code.
3446
3447 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
3448
3449         * mini.h (MonoCompile): Added 'jit_info' field.
3450
3451         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
3452         the cfg structure, since it is needed by the AOT compiler.
3453
3454         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
3455
3456         * aot.c: A major rewrite. Changes include:
3457         - save exception tables for methods which have them.
3458         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
3459         to g_module_symbol.
3460         - reworked the file format so it is now much smaller and needs
3461         fewer relocation entries.
3462         
3463 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
3464
3465         * aot.c (load_aot_module): Fix build bustage on platforms without
3466         Boehm GC.
3467
3468 2003-09-04  Martin Baulig  <martin@ximian.com>
3469
3470         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
3471
3472 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
3473
3474         * TODO: Some new optimization ideas.
3475
3476         * aot.c: Move AOT module loading logic here from mono_assembly_open.
3477
3478         * aot.c: Save the optimization flags used to compile the code into
3479         the AOT module.
3480
3481         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
3482         support emitting domain specific code.
3483         
3484         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
3485         no longer domain neutral. It can be made domain neutral by compiling 
3486         with --optimize=shared.
3487
3488         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
3489         between appdomains.
3490
3491         * driver.c mini.h mini.c: New --no-aot debugging option which disables
3492         loading of AOT code.
3493
3494         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
3495         
3496         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
3497         if there is no domain neutrality information.
3498
3499 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
3500
3501         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
3502         format version into the generated library.
3503
3504         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
3505         callee method into the caller since one of them could be shared.
3506
3507         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
3508         system exceptions from AOT code now works.
3509
3510         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
3511         method if it is domain neutral and the callee is not.
3512
3513         * graph.c (cfg_emit_one_loop_level): Fix warning.
3514
3515 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
3516
3517         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
3518         last checkin.
3519
3520 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
3521
3522         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
3523         is needed  by code which is executed before mono_runtime_init ().
3524         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
3525         
3526         * mini.c (mono_thread_abort): Fix warning.
3527         (mono_jit_compile_method): Call static constructor in the AOT case too.
3528
3529         * aot.c (mono_compile_assembly): Fix warning.
3530
3531 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3532
3533         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
3534
3535 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
3536
3537         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
3538
3539         * cpu-pentium.md: Fix the length of call opcodes so they include the
3540         ESP restoring instruction. Fixes #47968.
3541
3542 2003-08-28  Martin Baulig  <martin@ximian.com>
3543
3544         * mini-x86.c (mono_arch_call_opcode): Added support for
3545         MONO_TYPE_GENERICINST.
3546
3547         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
3548
3549 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
3550
3551         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
3552         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
3553
3554         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
3555         metadata_section.
3556
3557 2003-08-26  Martin Baulig  <martin@ximian.com>
3558
3559         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
3560         when reporting an error, set this to the actual error location.
3561         (mono_method_to_ir): Report the correct error location if
3562         get_basic_blocks() returned an error.
3563
3564 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
3565
3566         * mini.c (mono_type_blittable): OBJECT is not blittable.
3567         (mono_method_blittable): Methods which have marshalling descriptors
3568         are not blittable either. Fixes #47842.
3569
3570 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
3571
3572         * driver.c mini.c: Use an environment variable instead of a global 
3573         variable. Also fix the build.
3574
3575         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
3576         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
3577         reporting this. 
3578
3579         * driver.c mini.c: Added --with-valgrind option to turn off some
3580         code which prevents mono from running under valgrind.
3581
3582         * mini.c (mono_emit_call_args): Fixed warning.
3583
3584         * mini.c (mono_emulate_opcode): Fixed warning.
3585
3586 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
3587
3588         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
3589         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
3590         regalloc.c, regalloc.h: specify available registers in arch-specific
3591         code and support floats in the regallocator (patch by Laurent Morichetti 
3592         <l_m@pacbell.net>)
3593
3594 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
3595
3596         * mini.c: mono_thread_current() can be called only after
3597         mono_runtime_init(): rearrange code to not call it early on.
3598
3599 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
3600
3601         * mini.c: allocate jump tables in the code mempools.
3602
3603 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
3604
3605         * mini.c, mini.h: make sure per-thread data allocated by the jit is
3606         freed.
3607
3608 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
3609
3610         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
3611         12 to 16.  This fixes bug #47453.
3612
3613
3614 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
3615
3616         * mini-ppc.c: fixed indexed load and unsigned compares.
3617
3618 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
3619
3620         * mini.c: reenabled installation of handler for
3621           thread abort signal.
3622
3623 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
3624
3625         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
3626         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
3627         until it's fixed and actually useful.
3628
3629 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
3630
3631         * inssel-long32.brg: couple more opcodes implemented.
3632
3633 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
3634         
3635         * mini-sparc.c: Even more opcodes implemeted.
3636
3637 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
3638
3639         * mini-sparc.c: More opcodes implemented.
3640
3641 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
3642
3643         * mini-sparc.c: More opcodes implemented.
3644
3645 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
3646
3647         * inssel-sparc.brg: Add some needed rules.  Direct
3648         copy from PPC.
3649         * Makefile.am: Use inssel-sparc.brg
3650         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
3651         an assert happy for now.
3652
3653 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
3654
3655         * mini-sparc.c: Fixed compile errors.
3656         * exceptions-sparc.c: Same.  We now produce a mono binary 
3657         on sparc-linux.  Yea.
3658
3659 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
3660
3661         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
3662         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
3663         They compile, but do not work.
3664
3665 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
3666
3667         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
3668         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
3669         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
3670         (ct@gentoo.org).
3671
3672 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
3673
3674         * mini.c: more opcodes implemented and better support for generics.
3675
3676 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
3677
3678         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
3679         * mini.c, mini.h: first cut at generics support: some new instructions 
3680         added and changed the behaviour of some of the existing ones.
3681
3682 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
3683
3684         * mini.c: Removed definition of metadata_shared mutex here.
3685
3686 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
3687
3688         * mini-x86.c: make vararg calls work for instance methods.
3689
3690 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
3691
3692         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
3693         returns the arguments in a separte list, now.
3694
3695 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
3696
3697         * aot.c, mini.c: updates for array type representation changes.
3698
3699 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
3700
3701         * mini.c: register function to perform jit shutdown.
3702
3703 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
3704
3705         * mini.c: use a faster allocator if possible.
3706
3707 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
3708
3709         * aot.c: some cleanups and portability changes.
3710
3711 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
3712
3713         * mini.c: use faster allocation for CEE_BOX if possible.
3714
3715 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
3716
3717         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
3718         Moved inlined mempcy code to its own function so that is can be
3719         reused. Added an inline memset function as well (optimized initobj).
3720         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
3721
3722 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
3723
3724         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
3725
3726 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
3727
3728         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
3729         arch code can setup the cpu for CLR execution, if needed.
3730         We use it on x86 to set the precision of FP operations.
3731
3732 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
3733
3734         * mini.c: disable some optimizations if we can guess they'll cost too
3735         much for a given method.
3736
3737 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
3738
3739         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
3740         
3741 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
3742         * mini.h mini.c mini-x86.c: Added instruction level coverage 
3743         info collection support.
3744
3745 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
3746
3747         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
3748         is now implemented in the profiling API. Get rid of a couple of
3749         unnecessary global variables.
3750
3751 2003-06-15  Nick Drochak <ndrochak@gol.com>
3752
3753         * basic-long.cs: tests for negative values for bigmul, and unsigned.
3754         * cpu-g4.md: add op_bigmul and op_bigmul_un
3755         * cpu_pentium.md: add op_bigmul_un
3756         * inssel-long32.brg: add rule for unsigned bigmul
3757         * mini-ops.h: define OP_BIGMUL_UN
3758         * mini-x86.c: THE BUG: handle (un)signed properly
3759         * mini.c: choose unsigned opcode if needed.
3760         This set of patches fixes bug #44291
3761
3762 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
3763
3764         * mini.c (optimize_branches): improved to handle all kinds of
3765         conditional branches.
3766
3767 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
3768
3769         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
3770         don't raise exceptions.
3771
3772 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
3773
3774         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
3775         to arch-specific files.
3776
3777 2003-06-09  Martin Baulig  <martin@ximian.com>
3778
3779         * Makefile.am (libs): Added $(LIBGC_LIBS).
3780
3781 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
3782
3783         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
3784         and OP_ATAN (fixes bug#44293).
3785
3786 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
3787
3788         * Makefile.am, mini-x86.c: rename cpu description array to
3789         pentium_desc, since some compilers define the 'pentium' preprocessor
3790         symbol.
3791
3792 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
3793
3794         * mini.c (mini_select_instructions): add explicit branch if the
3795         following block is not the false target of a conditional branch -
3796         we need this with any optimization that reorder or remove bblocks
3797
3798         * mini.c (optimize_branches): bug fixes
3799
3800 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
3801
3802         * mini.c (mono_method_to_ir): inline static readonly fields
3803
3804         * ssa.c (fold_tree): start cfold support for long (very simple
3805         cases only)
3806
3807         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
3808
3809 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
3810
3811         * inssel.brg: fixed memcpy (bug #44219).
3812
3813 2003-06-05  Dick Porter  <dick@ximian.com>
3814
3815         * driver.c: Set the glib log levels to not abort if g_message
3816         recurses.
3817
3818         g_set_prgname() has to happen before mini_init() so that the
3819         process handle gets the info.
3820         
3821 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
3822
3823         * driver.c: add intrins to the default optimizations to get wider
3824         exposure.
3825
3826 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
3827
3828         * mini.h: some large basic blocks will overflow a 16-bit
3829         integers for symbolic registers.
3830
3831 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
3832
3833         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
3834         (mono_arch_output_basic_block): fix bug 43499 
3835
3836 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
3837
3838         * mini.c: kill duplicated definition of mono_debug_format.
3839
3840 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
3841
3842         * mini-x86.c, arrays.cs: fixed register allocation bug.
3843
3844 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
3845
3846         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
3847
3848         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
3849
3850 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3851
3852         * mini.c:
3853         (print_method_from_ip): also print source location information if
3854         available.
3855
3856 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
3857
3858         * mini.c (mono_find_block_region): bug fix in region code
3859         (mini_method_compile): enable removing unreachable code again, but
3860         only in methods without exception clauses.
3861
3862 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
3863
3864         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
3865         Implemented arglist opcode and handling of TypedReference type.
3866         Fixed x86 call convention when a structure is returned.
3867         Minimal support for calling static vararg methods.
3868
3869 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
3870
3871         * mini.c (mini_method_compile):  always remove unreachable code,
3872         because the code in them may be inconsistent  (access to dead
3873         variables for example).
3874
3875 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
3876
3877         * driver.c, debug-mini.c: warning fixes.
3878
3879 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
3880
3881         * Makefile.am, jit.h, mini.h: install header for embedding mono.
3882
3883 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
3884
3885         * mini.c: thread-static fields are registered in mono_class_vtable(),
3886         so ensure the function is called before checking for them.
3887
3888 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
3889
3890         * mini.c (optimize_branches): fix for bug 43586
3891
3892         * jit-icalls.c (mono_llmult_ovf): added an additional check for
3893         overflow (fixes Bug #43639)
3894
3895 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
3896
3897         * mini.c, objects.cs: allow the use of stobj for primitive types.
3898
3899 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
3900
3901         * mini.c: be less strict about argument checking until we support
3902         running the verifier.
3903
3904 2003-05-27  Nick Drochak <ndrochak@gol.com>
3905
3906         * basic-long.cs: tests for (ulong)int * (ulong)int also
3907         * mini.c: use the same trick for (ulong)int * (ulong)int
3908
3909 2003-05-27  Nick Drochak <ndrochak@gol.com>
3910
3911         * basic-long.cs: add regression test for (long)int * (long)int
3912         * cpu-pentium.md: add op_bigmul specification
3913         * inssel-long32.brg: add OP_BIGMUL rule
3914         * mini-ops.h: add OP_BIGMUL
3915         * mini-x86.c: register allocator: handle case where src1 needs to be
3916         in EAX.
3917         * mini.c: substitute special BIGMUL opcode in the tree for 
3918         (long)int * (long)int
3919
3920 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
3921
3922         * jit-icalls.c: call the type ctor on field access if needed.
3923
3924 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
3925
3926         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
3927         to a method (including results of ldelema, bug#43207).
3928
3929 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
3930
3931         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
3932         colors to show exception handler blocks.
3933
3934         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
3935         (fix for pinvoke7.cs).
3936
3937 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
3938
3939         * mini.h, mini.c: ensure correct initialization order for types that
3940         require it. Prepare for lazy compilation of jit icall wrappers.
3941         Provide a name for opcode emulation to reduce unneeded mallocing.
3942
3943 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
3944
3945         * mini-x86.c: better register restoring code and profiling
3946         support for tail calls.
3947
3948 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
3949
3950         * mini.h, driver.c: prepare for leaf methods optimization.
3951
3952 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
3953
3954         * mini.c: get targets of branches before converting a method.
3955
3956 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
3957
3958         * mini.c (optimize_branches): added some experimental code (disbaled) 
3959
3960 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
3961
3962         * mini.c (optimize_branches): fix branch to branch optimization 
3963
3964         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
3965
3966         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
3967
3968         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
3969
3970         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
3971         if needed.
3972
3973 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
3974
3975         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
3976         enable use of interface variables again.
3977
3978         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
3979         I1 to registers because there is no simply way to sign extend 8bit
3980         quantities in caller saved registers on x86.
3981
3982         * inssel-float.brg: set costs of some rules to 2 so
3983         that monobure always select the arch. specific ones if supplied,
3984         regardless of the order we pass the files to monoburg.
3985
3986 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
3987
3988         * mini.c, mini-x86.c: since the magic trampoline for jumps
3989         can't patch the code directly, we do it as soon as the
3990         method gets compiled.
3991
3992 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
3993
3994         * mini-x86.c, mini.h: introduce a new patching method
3995         to support CEE_JMP and tail calls.
3996         * mini.c: obey tail.call. Don't precompile methods target
3997         of CEE_JMP.
3998         * tramp-x86.c: new trampoline code to handle methods
3999         reached through a jump.
4000
4001 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
4002
4003         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
4004         bit values to registers
4005
4006 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
4007
4008         * mini.c (mono_compile_get_interface_var): share interface
4009         variables if possible.
4010
4011 2003-05-16  Martin Baulig  <martin@ximian.com>
4012
4013         * debug-mini.c (mono_init_debugger): New function to initialize
4014         the debugger.  This is not in the debugger since it needs to
4015         access some of mini's internals.
4016
4017 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
4018
4019         * mini.c (mono_method_to_ir): inlining fixes/cleanups
4020
4021 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
4022
4023         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
4024         for value type handling.
4025
4026 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
4027
4028         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
4029         (mono_method_check_inlining): enable inlining of all kinds of wrappers
4030
4031 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
4032
4033         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
4034           the constructor through a proxy.
4035
4036 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
4037
4038         * jit-icalls.c, inssel.brg: fixes to array element address
4039         calculations.
4040
4041 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
4042
4043         * mini-x86.c (is_regsize_var): allocate pointer to registers
4044
4045 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
4046
4047         * driver.c: fixed typo, added intrins to the set of optimizations
4048         tested with regressions.
4049
4050 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
4051
4052         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
4053         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
4054         test case.
4055
4056 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
4057
4058         * inssel.brg: remove some common pop instructions without side effects
4059
4060 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
4061
4062         * inssel-x86.brg: fixed thinko in int to double conversions.
4063
4064 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
4065
4066         * mini.c, jit-icalls.c: added runtime thread-static variable support.
4067
4068 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
4069
4070         * inssel-long32.brg: two more missing instructions.
4071
4072 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
4073
4074         * mini.c (mono_emit_call_args): set the cil_code for all arguments
4075         if not already set.
4076
4077 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
4078
4079         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
4080         correctly.
4081
4082         * basic-float.cs: Added tests for negative zero.
4083
4084 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
4085
4086         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
4087         a couple of missing operations for long casts, with test cases.
4088
4089 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4090
4091         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
4092
4093 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
4094
4095         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
4096         code size estimation.
4097
4098 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
4099
4100         * mini.c (mono_jit_create_remoting_trampoline): make it work with
4101         abstract methods (fix bug 42542)
4102
4103         * aot.c: add ability to handle array types
4104         
4105 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
4106
4107         * mini.c: Call the _specific versions of the object allocation
4108         functions if possible.
4109
4110 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
4111
4112         * driver.c: call setlocale ().
4113
4114 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
4115
4116         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
4117         windows build.
4118
4119 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
4120
4121         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
4122
4123         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
4124         wrappers (fix bug 42122)
4125
4126 2003-05-04  Martin Baulig  <martin@ximian.com>
4127
4128         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
4129
4130         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
4131         s/mini_set_defaults/mono_set_defaults/g.
4132
4133 2003-05-04  Martin Baulig  <martin@ximian.com>
4134
4135         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
4136
4137 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
4138
4139         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
4140         (reported by Don Roberts).
4141
4142 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
4143
4144         * mini.c: temporarily work around two bugs for this release.
4145
4146 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
4147
4148         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
4149         that contains -export-dynamic and it makes using the ld script
4150         useless.
4151         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
4152
4153 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
4154
4155         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
4156         specific cpu.
4157
4158 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
4159
4160         * mini.c: make sure leave calls all the needed finally blocks,
4161         even when the target jumps out of multiple exception clauses.
4162
4163 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
4164
4165         * ldscript, Makefile.am: add linker script to reduce the number of
4166         exported symbols (should also fix the issues with libwine defining
4167         some of the same symbols in io-layer).
4168
4169 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
4170
4171         * driver.c (mini_main): Avoid assertion when no file name is given on 
4172         the command line.
4173
4174 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
4175
4176         * driver.c: added --version/-V command line option.
4177         Added the inline optimization in the regression tests.
4178
4179 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
4180
4181         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
4182         to the type in the method signature (fixes bug#42134).
4183
4184 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
4185
4186         * mini.c: when inlining, check this is not null only when needed (bug #42135).
4187
4188 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
4189
4190         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
4191
4192 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4193
4194         * driver.c: fixed bug #42100.
4195
4196 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
4197
4198         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
4199
4200 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
4201
4202         * mini.c: moved most of the code required to do inlining to its own
4203         function so it can be reused. Inline also ctors if appropriate.
4204
4205 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
4206
4207         * Makefile.am: Link with -export-dynamic so shared libs loaded by
4208         the runtime can call mono API functions.
4209
4210 2003-04-27  Martin Baulig  <martin@ximian.com>
4211
4212         * debug-mini.c (mono_debug_init_method): Added
4213         `guint32 breakpoint_id' argument; if the method has a breakpoint,
4214         send a notification to the debugger.
4215
4216         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
4217         running in the Mono Debugger, just pass the breakpoint number to
4218         mono_debug_init_method().
4219
4220         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
4221
4222 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
4223
4224         * mini.c: allow some more unsafe compares.
4225
4226 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
4227
4228         * mini-x86.c, Makefile.am: make distcheck works (partially from
4229         a patch by Richard Lee <r.h.lee@attbi.com>).
4230         * regset.c, regset.h: removed, they are unused.
4231
4232 2003-04-25  Dick Porter  <dick@ximian.com>
4233
4234         * driver.c: Usage reports the name as 'mono' not 'mini'
4235         * exceptions-x86.c: Build and run on freebsd
4236
4237 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
4238
4239         * Makefile.am: install the program with the 'mono' name and
4240         the library as libmono instead of mini and libmini.
4241
4242 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
4243
4244         * driver.c: provide the APIs for the embedding interface of the old jit.
4245
4246 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
4247
4248         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
4249
4250 2003-04-23  Martin Baulig  <martin@ximian.com>
4251
4252         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
4253
4254         * driver.c: Added `--debug' command line argument to enable
4255         debugging support.
4256
4257 2003-04-23  Martin Baulig  <martin@ximian.com>
4258
4259         * debug.[ch]: Removed.  The code is now in
4260         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
4261
4262         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
4263         last six months.
4264
4265 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
4266
4267         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
4268
4269 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4270
4271         * mini.c:
4272         (mini_cleanup): moved mono_runtime_cleanup call after the call to
4273         mono_domain_finalize.
4274         (mini_method_compile): use mono_method_profile* if the the option is
4275         enabled.
4276
4277 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
4278
4279         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
4280         methods with their wrapper.
4281
4282         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
4283         methods with their wrapper.
4284
4285         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
4286         their wrapper.
4287
4288         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
4289         wrapper.
4290
4291         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
4292         methods.
4293
4294 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
4295
4296         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
4297
4298 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
4299
4300         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
4301         of the mempool. This is slightly faster and uses less memory
4302
4303 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
4304
4305         * mini.c: avoid O(n) allocation for variables.
4306
4307 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
4308
4309         * mini.c: handle items on the stack after inlining methods.
4310
4311 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
4312
4313         * mini.c: make the method->opcode optimization dependent
4314         on MONO_OPT_INSTRINS and do it lazily.
4315
4316 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
4317
4318         * driver.c: print overall results at the end of regression run.
4319
4320 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
4321
4322         * inssel.brg: don't overwrite symbolic registers.
4323
4324 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
4325
4326         * inssel-x86.brg: fix conversion from long to float.
4327
4328 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
4329
4330         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
4331
4332 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
4333
4334         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
4335
4336         * driver.c: Added --print-vtable option as in the old JIT.
4337
4338 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
4339
4340         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
4341
4342 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
4343
4344         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
4345
4346 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
4347
4348         * mini.c regalloc.c regalloc.h: Fix memory leak.
4349
4350 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
4351
4352         * aot.c (mono_aot_get_method): register all used strings
4353
4354 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
4355
4356         * mini.c: always intern strings references with ldstr at compile time.
4357
4358 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
4359
4360         * Makefile.am: add BUILT_SOURCES.
4361
4362 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
4363
4364         * driver.c: give a better error message when the assembly to execute
4365         doesn't have an entry point.
4366
4367 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
4368
4369         * Makefile.am: added hack for automake
4370
4371         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
4372         correct sematics.
4373
4374         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
4375
4376 22003-04-07  Martin Baulig  <martin@ximian.com>
4377
4378         * Makefile.am: Added Makefile.am.
4379
4380         * debugger-main.c: Removed, this is now in the debugger where it
4381         belongs.
4382
4383         * mini.pc.in: Call this package `mini' for the moment.
4384
4385
4386
4387
4388