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