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