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